MDL-19027 Added <th> for controls row in edit mode with screenreader and editing on. Merged from MOODLE_19_STABLE

This commit is contained in:
nicolasconnault 2009-04-30 07:12:00 +00:00
parent ef42c03fd7
commit d0d1293d4c

View File

@ -1263,13 +1263,25 @@ class grade_report_grader extends grade_report {
* @return string HTML
*/
public function get_iconshtml() {
global $USER;
global $USER, $CFG;
$iconshtml = '';
if ($USER->gradeediting[$this->courseid]) {
$iconshtml = '<tr class="controls">';
$fixedstudents = empty($USER->screenreader) && $CFG->grade_report_fixedstudents;
$showuseridnumber = $this->get_pref('showuseridnumber');
$colspan = '';
if ($showuseridnumber) {
$colspan = 'colspan="2"';
}
if (!$fixedstudents) {
$iconshtml .= '<th class="header c0 controls" scope="row" '.$colspan.'>'.$this->get_lang_string('controls','grades').'</th>';
}
$columncount = 0;
foreach ($this->gtree->items as $itemid=>$unused) {
// emulate grade element