]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-19027 Added <th> for controls row in edit mode with screenreader and editing...
authornicolasconnault <nicolasconnault>
Thu, 30 Apr 2009 07:12:00 +0000 (07:12 +0000)
committernicolasconnault <nicolasconnault>
Thu, 30 Apr 2009 07:12:00 +0000 (07:12 +0000)
grade/report/grader/lib.php

index 130d416483aacdf8d1d2b6b081bf7018cc2704d2..ae6d98d526f1dccb93c369cdda78e09e24e3a0f4 100644 (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