Skip to content
Browse files

MDL-34561 accessibility compliance for assignment module: Add forform…

… input text and select tag
  • Loading branch information...
1 parent 02814bf commit 519adbc6844bdae5dce13fc1215e280d46760cb0 @rwijaya rwijaya committed Jul 27, 2012
Showing with 7 additions and 4 deletions.
  1. +7 −4 mod/assignment/lib.php
View
11 mod/assignment/lib.php
@@ -1475,7 +1475,8 @@ function display_submissions($message='') {
} else if ($quickgrade) {
$attributes = array();
$attributes['tabindex'] = $tabindex++;
- $menu = html_writer::select(make_grades_menu($this->assignment->grade), 'menu['.$auser->id.']', $auser->grade, array(-1=>get_string('nograde')), $attributes);
+ $menu = html_writer::label(get_string('assignment:grade', 'assignment'), 'menumenu'. $auser->id, false, array('class' => ''));
+ $menu .= html_writer::select(make_grades_menu($this->assignment->grade), 'menu['.$auser->id.']', $auser->grade, array(-1=>get_string('nograde')), $attributes);
$grade = '<div id="g'.$auser->id.'">'. $menu .'</div>';
} else {
$grade = '<div id="g'.$auser->id.'">'.$this->display_grade($auser->grade).'</div>';
@@ -1488,7 +1489,8 @@ function display_submissions($message='') {
} else if ($quickgrade) {
$attributes = array();
$attributes['tabindex'] = $tabindex++;
- $menu = html_writer::select(make_grades_menu($this->assignment->grade), 'menu['.$auser->id.']', $auser->grade, array(-1=>get_string('nograde')), $attributes);
+ $menu = html_writer::label(get_string('assignment:grade', 'assignment'), 'menumenu'. $auser->id, false, array('class' => 'accesshide'));
+ $menu .= html_writer::select(make_grades_menu($this->assignment->grade), 'menu['.$auser->id.']', $auser->grade, array(-1=>get_string('nograde')), $attributes);
$grade = '<div id="g'.$auser->id.'">'.$menu.'</div>';
} else {
$grade = '<div id="g'.$auser->id.'">'.$this->display_grade($auser->grade).'</div>';
@@ -1516,7 +1518,8 @@ function display_submissions($message='') {
} else if ($quickgrade) { // allow editing
$attributes = array();
$attributes['tabindex'] = $tabindex++;
- $menu = html_writer::select(make_grades_menu($this->assignment->grade), 'menu['.$auser->id.']', $auser->grade, array(-1=>get_string('nograde')), $attributes);
+ $menu = html_writer::label(get_string('assignment:grade', 'assignment'), 'menumenu'. $auser->id, false, array('class' => 'accesshide'));
+ $menu .= html_writer::select(make_grades_menu($this->assignment->grade), 'menu['.$auser->id.']', $auser->grade, array(-1=>get_string('nograde')), $attributes);
$grade = '<div id="g'.$auser->id.'">'.$menu.'</div>';
$hassubmission = true;
} else {
@@ -1560,7 +1563,7 @@ function display_submissions($message='') {
if ($uses_outcomes) {
foreach($grading_info->outcomes as $n=>$outcome) {
- $outcomes .= '<div class="outcome"><label>'.$outcome->name.'</label>';
+ $outcomes .= '<div class="outcome"><label for="'. 'outcome_'.$n.'_'.$auser->id .'">'.$outcome->name.'</label>';
$options = make_grades_menu(-$outcome->scaleid);
if ($outcome->grades[$auser->id]->locked or !$quickgrade) {

0 comments on commit 519adbc

Please sign in to comment.
Something went wrong with that request. Please try again.