From: toyomoyo Date: Wed, 13 Dec 2006 05:25:45 +0000 (+0000) Subject: fixing accessibility issues X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=fc9b712ef333af334bacdaeec00800be35b2b9d3;p=moodle.git fixing accessibility issues --- diff --git a/grade/lib.php b/grade/lib.php index f8bbc0bbf0..3f2c7681c5 100644 --- a/grade/lib.php +++ b/grade/lib.php @@ -262,7 +262,7 @@ function grade_get_formatted_grades() { if (isset($students) && $students) { - foreach ($students as $userid => $student) { + foreach ($students as $userid => $student) { $grades_by_student["$userid"]['student_data']['firstname'] = $student->firstname; $grades_by_student["$userid"]['student_data']['lastname'] = $student->lastname; $grades_by_student["$userid"]['student_data']['email'] = $student->email; @@ -1631,9 +1631,9 @@ function grade_stats() { // output our data print_header(); - echo ''; + echo '
'.$category.' '.get_string('stats','grades').'
'; if ($preferences->show_weighted == 1 && $preferences->use_weighted_for_letter == 1 && $category== 'all') { - echo ''; + echo ''; } echo ''; @@ -1681,7 +1681,7 @@ function grade_view_category_grades($view_by_student) { global $USER; global $preferences; global $group; - + $context = get_context_instance(CONTEXT_COURSE, $course->id); // if can't see course grades, print single grade view @@ -1731,7 +1731,7 @@ function grade_view_category_grades($view_by_student) { } echo '
'.$category.' '.get_string('stats','grades').'
 '.get_string('points','grades').''.get_string('weight','grades').'
 '.get_string('points','grades').''.get_string('weight','grades').'
'.get_string('max','grades').':'.$stats[$category]['max'].'
'; if (has_capability('moodle/course:viewcoursegrades', $context)) { - $header = ''; + $header = ''; } else { $header = ''; @@ -1790,7 +1790,7 @@ function grade_view_category_grades($view_by_student) { $student_link = ''; } $student_link .= $grades_by_student[$student]['student_data']['lastname'].', '.$grades_by_student[$student]['student_data']['firstname'].''; - $row .= ''; + $row .= ''; } foreach($categories as $category => $items) { @@ -1809,17 +1809,17 @@ function grade_view_category_grades($view_by_student) { $link = $CFG->wwwroot.'/mod/'.$all_categories[$category][$assignment]['modname'].'/view.php?id='.$link_id->id; $all_categories[$category][$assignment]['link'] = $link; if ($all_categories[$category][$assignment]['hidden'] == 0) { - $header .= ''; if ($preferences->show_points) { - $header1 .= ''; + $header1 .= ''; } else { - $header1 .= ''; + $header1 .= ''; } } if ($preferences->show_weighted) { @@ -1841,7 +1841,7 @@ function grade_view_category_grades($view_by_student) { else { $cur_weighted_max = 0; } - $header1 .= ''; + $header1 .= ''; } } @@ -1879,32 +1879,32 @@ function grade_view_category_grades($view_by_student) { $total_sort_link = ''; } - $stats_link = ''.get_string('statslink','grades').''; + $stats_link = ''.get_string('statslink','grades').''; if ($all_categories[$cview]['stats']['drop'] != 0) { - $header .= ''; + $header .= ''; } else { - $header .= ''; + $header .= ''; } if ($preferences->show_points) { - $header1 .= ''; } if ($preferences->show_percent) { - $header1 .= ''; + $header1 .= ''; } if ($preferences->show_weighted) { - $header1 .= ''; + $header1 .= ''; } if (has_capability('moodle/course:viewcoursegrades', $context)) { - $header .= ''; + $header .= ''; } else { $header .= ''; @@ -1913,7 +1913,7 @@ function grade_view_category_grades($view_by_student) { //adjust colcount to reflect the actual number of columns output $colcount++; // total column $colcount = $colcount*$grade_columns + 2; - echo ''; + $header = ''; } else { $header = ''; @@ -2056,7 +2056,7 @@ function grade_view_all_grades($view_by_student) { // if mode=='grade' then we a else { $studentviewlink = ''.$grades_by_student[$student]['student_data']['lastname'].', '.$grades_by_student[$student]['student_data']['firstname'].''; } - $row .= ''; + $row .= ''; } ksort($categories); @@ -2073,7 +2073,7 @@ function grade_view_all_grades($view_by_student) { // if mode=='grade' then we a // only print the category headers if something is displayed for them if ($preferences->show_weighted || $preferences->show_percent || $preferences->show_points) { $stats_link = ''.get_string('statslink','grades').''; - $header .= ''; } if ($preferences->show_percent) { - $header1 .= ''; + $header1 .= ''; } if ($preferences->show_weighted) { - $header1 .= ''; + $header1 .= ''; } $maxpercent = $all_categories["$category"]['stats']['weight'] + $maxpercent; //$total_course_points = $all_categories[$category]['stats']['totalpoints']+ $total_course_points; @@ -2133,10 +2133,10 @@ function grade_view_all_grades($view_by_student) { // if mode=='grade' then we a $percent_sort_link .= ''.get_string('percentascending','grades').''; } $stats_link = ''.get_string('statslink','grades').''; - $header .= ''; + $header .= ''; if (has_capability('moodle/course:viewcoursegrades', $context) && $view_by_student == -1) { if ($preferences->show_points) { - $header1 .= ''; } if ($preferences->show_percent) { - $header1 .= ''; + $header1 .= ''; } if ($preferences->show_weighted) { - $header1 .= ''; + $header1 .= ''; } if ($preferences->show_letters) { - $header1 .= ''; + $header1 .= ''; } $header1 .= ''; } else { if ($preferences->show_points) { - $header1 .= ''; } if ($preferences->show_percent) { - $header1 .= ''; + $header1 .= ''; } if ($preferences->show_weighted) { - $header1 .= ''; + $header1 .= ''; } if ($preferences->show_letters) { - $header1 .= ''; + $header1 .= ''; } $header1 .= ''; } if (has_capability('moodle/course:viewcoursegrades', $context)) { - $header .= ''; + $header .= ''; } // adjust colcount to reflect actual number of columns output $colcount = $colcount * $grade_columns + $total_columns + 2; - echo '
'.$student_heading_link.'
'.$student_heading_link.'
'.$student_link.''.$student_link.''.format_string($assignment,true).''; + $header .= ''.format_string($assignment,true).''; } else { - $header .= ''.format_string($assignment,true).''; + $header .= ''.format_string($assignment,true).''; } if ($all_categories[$category][$assignment]['extra_credit'] == 1) { $header .= '('.get_string('extracredit','grades').')'; } $header .=''. $all_categories[$category][$assignment]['maxgrade']; + $header1 .= ''. $all_categories[$category][$assignment]['maxgrade']; if ($all_categories[$category][$assignment]['grade_against'] != $all_categories[$category][$assignment]['maxgrade']) { $header1 .= '('. $all_categories[$category][$assignment]['grade_against'].')'; } @@ -1828,10 +1828,10 @@ function grade_view_category_grades($view_by_student) { if($preferences->show_percent) { if ($all_categories[$category][$assignment]['grade_against'] != $all_categories[$category][$assignment]['maxgrade']) { - $header1 .= ''.get_string('scaledpct','grades').''.get_string('scaledpct','grades').''.get_string('rawpct','grades').''.get_string('rawpct','grades').''.$cur_weighted_max.get_string('pctoftotalgrade','grades').''.$cur_weighted_max.get_string('pctoftotalgrade','grades').''.get_string('total','grades').'  (Lowest '. $all_categories[$cview]['stats']['drop']. ' Dropped)'.$total_sort_link.' '.$stats_link.''.get_string('total','grades').'  (Lowest '. $all_categories[$cview]['stats']['drop']. ' Dropped)'.$total_sort_link.' '.$stats_link.''.get_string('total','grades').' '.$total_sort_link.' '.$stats_link.''.get_string('total','grades').' '.$total_sort_link.' '.$stats_link.''.$all_categories[$cview]['stats']['totalpoints']; + $header1 .= ''.$all_categories[$cview]['stats']['totalpoints']; if ($all_categories[$cview]['stats']['bonus_points'] != 0) { $header1 .='(+'.$all_categories[$cview]['stats']['bonus_points'].')'; } $header1 .=''.get_string('percent','grades').''.get_string('percent','grades').''.$all_categories[$cview]['stats']['weight'].get_string('pctoftotalgrade','grades').''.$all_categories[$cview]['stats']['weight'].get_string('pctoftotalgrade','grades').''.$student_heading_link.'
'.$student_heading_link.'
'; + echo '
'; if ($preferences->use_advanced != 0) { echo $cview.' '.get_string('grades','grades'); } @@ -2023,7 +2023,7 @@ function grade_view_all_grades($view_by_student) { // if mode=='grade' then we a else { $student_heading_link .= '
'.get_string('showallstudents','grades').''; } - $header = '
'.$student_heading_link.'
'.$student_heading_link.'
'. $studentviewlink .''. $studentviewlink .''.get_string('points','grades').'('.$all_categories[$category]['stats']['totalpoints'].')'; if ($all_categories[$category]['stats']['bonus_points'] != 0) { $header1 .='(+'.$all_categories[$category]['stats']['bonus_points'].')'; } $header1 .=''.get_string('percent','grades').''.get_string('percent','grades').''.get_string('weightedpctcontribution','grades').''.get_string('weightedpctcontribution','grades').''.get_string('total','grades').' '.$stats_link.''.get_string('total','grades').' '.$stats_link.''.get_string('points','grades').'('.$all_categories['stats']['totalpoints'].')'; + $header1 .= ''.get_string('points','grades').'('.$all_categories['stats']['totalpoints'].')'; if ($category != 'student_data' && $all_categories[$category]['stats']['bonus_points'] != 0) { $header1 .='(+'.$total_bonus_points.')'; @@ -2144,42 +2144,42 @@ function grade_view_all_grades($view_by_student) { // if mode=='grade' then we a $header1 .= '
'.$points_sort_link.' '.'
'.get_string('percentshort','grades').'
'.$percent_sort_link.' '.'
'.get_string('percentshort','grades').'
'.$percent_sort_link.' '.'
'.get_string('weightedpct','grades').'('.$all_categories['stats']['weight'].')'.'
'.$weighted_sort_link.' '.'
'.get_string('weightedpct','grades').'('.$all_categories['stats']['weight'].')'.'
'.$weighted_sort_link.' '.'
'.get_string('lettergrade','grades').'
'.$grade_sort_link.' '.'
'.get_string('lettergrade','grades').'
'.$grade_sort_link.' '.'
'.get_string('points','grades').'('.$all_categories['stats']['totalpoints'].')'; + $header1 .= ''.get_string('points','grades').'('.$all_categories['stats']['totalpoints'].')'; if ($category != 'student_data' && $all_categories[$category]['stats']['bonus_points'] != 0) { $header1 .='(+'.$total_bonus_points.')'; } $header1 .= ''.get_string('percentshort','grades').''.get_string('percentshort','grades').''.get_string('weightedpct','grades').'('.$all_categories['stats']['weight'].')'.get_string('weightedpct','grades').'('.$all_categories['stats']['weight'].')'.get_string('lettergrade','grades').''.get_string('lettergrade','grades').'
'.$student_heading_link.'
'.$student_heading_link.'
'.get_string('allgrades','grades').''; + echo '
'.get_string('allgrades','grades').''; if (has_capability('moodle/course:viewcoursegrades', $context)) { helpbutton('teacher', get_string('gradehelp','grades'), 'grade'); } @@ -2316,7 +2316,7 @@ function grade_display_grade_weights() { $categories = get_records('grade_category', 'courseid', $course->id); if ($categories) { - echo '
'.get_string('setweights','grades'); + echo ''; echo ''; @@ -2371,7 +2371,7 @@ function grade_set_categories() { /// Collect modules data get_all_mods($course->id, $mods, $modnames, $modnamesplural, $modnamesused); - echo '
'.get_string('setweights','grades'); helpbutton('weight', get_string('gradeweighthelp','grades'), 'grade'); echo '
'.get_string('category','grades').''.get_string('weight','grades').''.get_string('dropxlowest','grades').''.get_string('bonuspoints','grades').''.get_string('hidecategory','grades').'
'.get_string('setcategories','grades'); + echo ''; echo ''; @@ -2807,7 +2807,7 @@ function grade_display_letter_grades() { $letters[10]->courseid = $course->id; } - echo '
'.get_string('setcategories','grades'); helpbutton('category', get_string('gradecategoryhelp','grades'), 'grade'); echo '
'.get_string('gradeitem','grades').''.get_string('category','grades').''.get_string('maxgrade','grades').''.get_string('curveto','grades').''.get_string('extracredit','grades').'
'.get_string('setgradeletters','grades'); + echo ''; echo ''; @@ -2958,7 +2958,7 @@ function print_student_grade($user, $course) { // prints table - echo ('
'.get_string('setgradeletters','grades'); helpbutton('letter', get_string('gradeletterhelp','grades'), 'grade'); echo '
'.get_string('gradeletter','grades').''.get_string('lowgradeletter','grades').''.get_string('highgradeletter','grades').'
'); + echo ('
'.get_string('activity').''.get_string('yourgrade','grades').''.get_string('maxgrade','grades').'
'); for ($i=0; $i<=$course->numsections; $i++) { if (isset($sections[$i])) { // should always be true diff --git a/user/message.html b/user/message.html index 0db9f18474..ca3619c120 100644 --- a/user/message.html +++ b/user/message.html @@ -49,7 +49,7 @@
'.get_string('activity').''.get_string('yourgrade','grades').''.get_string('maxgrade','grades').'
- +
emailto[$id])) { if (!$course->teacher) {