From d0d1293d4cef81f6d852199355fb4a884b3783ba Mon Sep 17 00:00:00 2001 From: nicolasconnault Date: Thu, 30 Apr 2009 07:12:00 +0000 Subject: [PATCH] MDL-19027 Added for controls row in edit mode with screenreader and editing on. Merged from MOODLE_19_STABLE --- grade/report/grader/lib.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/grade/report/grader/lib.php b/grade/report/grader/lib.php index 130d416483a..ae6d98d526f 100644 --- a/grade/report/grader/lib.php +++ b/grade/report/grader/lib.php @@ -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 = ''; + $fixedstudents = empty($USER->screenreader) && $CFG->grade_report_fixedstudents; + $showuseridnumber = $this->get_pref('showuseridnumber'); + + $colspan = ''; + if ($showuseridnumber) { + $colspan = 'colspan="2"'; + } + + if (!$fixedstudents) { + $iconshtml .= ''.$this->get_lang_string('controls','grades').''; + } + $columncount = 0; foreach ($this->gtree->items as $itemid=>$unused) { // emulate grade element