Permalink
Browse files

mod/assignment if we are not using a numeric scale and a custom scale

return that as the max grade


Author: Jun Yamog <jun@catalyst.net.nz>
  • Loading branch information...
1 parent 2c93e66 commit bed24ce7f58cac009a7225d0720e60494684d6a1 martinlanghoff committed Aug 4, 2006
Showing with 3 additions and 1 deletion.
  1. +3 −1 mod/assignment/lib.php
View
@@ -1816,6 +1816,7 @@ function assignment_grades($assignmentid) {
} else { // Scale
if ($grades) {
$scaleid = - ($assignment->grade);
+ $maxgrade = "";
if ($scale = get_record('scale', 'id', $scaleid)) {
$scalegrades = make_menu_from_list($scale->scale);
foreach ($grades as $userid => $grade) {
@@ -1825,10 +1826,11 @@ function assignment_grades($assignmentid) {
$grades[$userid] = $scalegrades[$grade];
}
}
+ $maxgrade = $scale->name;
}
}
$return->grades = $grades;
- $return->maxgrade = "";
+ $return->maxgrade = $maxgrade;
}
return $return;

0 comments on commit bed24ce

Please sign in to comment.