Skip to content

Commit

Permalink
MDL-10414 Implemented tab indices (student_grades, then student_feedb…
Browse files Browse the repository at this point in the history
…acks, from left to right and top to bottom)
  • Loading branch information
nicolasconnault committed Jul 13, 2007
1 parent bd6c9dd commit 18effef
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions grade/report/grader/lib.php
Expand Up @@ -560,6 +560,8 @@ function get_studentshtml() {
global $CFG, $USER;
$studentshtml = '';
$strfeedback = get_string("feedback");
$gradetabindex = 1;
$feedbacktabindex = 16380; // The maximum number of tabindices on 1 page is 32767

foreach ($this->users as $userid => $user) {
// Student name and link
Expand Down Expand Up @@ -616,7 +618,7 @@ function get_studentshtml() {

if ($this->get_pref('quickgrading') and $grade->is_editable()) {
$studentshtml .= choose_from_menu($scaleopt, 'grade_'.$userid.'_'.$item->id,
$gradeval, get_string('nograde'), '', -1, true);
$gradeval, get_string('nograde'), '', -1, true, false, $gradetabindex++);
} elseif ($scale = get_record('scale', 'id', $item->scaleid)) {
$scales = explode(",", $scale->scale);

Expand All @@ -633,7 +635,7 @@ function get_studentshtml() {

} else if ($item->gradetype != GRADE_TYPE_TEXT) {
if ($this->get_pref('quickgrading') and $grade->is_editable()) {
$studentshtml .= '<input size="6" type="text" name="grade_'.$userid.'_'
$studentshtml .= '<input size="6" tabindex="' . $gradetabindex++ . '" type="text" name="grade_'.$userid.'_'
.$item->id.'" value="'.$this->get_grade_clean($gradeval).'"/>';
} else {
$studentshtml .= $this->get_grade_clean($gradeval);
Expand All @@ -646,8 +648,8 @@ function get_studentshtml() {
if ($this->get_pref('quickgrading')) {
$studentshtml .= '<br />';
}
$studentshtml .= '<input size="6" type="text" name="feedback_'.$userid.'_'.$item->id.'" value="'
. s($grade->feedback) . '"/>';
$studentshtml .= '<input tabindex="' . $feedbacktabindex++ . '" size="6" type="text" name="feedback_'
.$userid.'_'.$item->id.'" value="' . s($grade->feedback) . '"/>';
}

} else {
Expand Down

0 comments on commit 18effef

Please sign in to comment.