Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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...
commit 58c98fa2078713ca5dc89122fc415219782f11f9 1 parent beb6c6c
martinlanghoff authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 mod/assignment/lib.php
View
4 mod/assignment/lib.php
@@ -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;
Please sign in to comment.
Something went wrong with that request. Please try again.