Skip to content

Commit

Permalink
Check to see if a scale grade exists for the given grade and if not s…
Browse files Browse the repository at this point in the history
…et it

to an empty string. This should never occur through normal use but just
in case ...
  • Loading branch information
ikawhero committed Jun 6, 2005
1 parent ac757a9 commit 1244ed7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mod/assignment/lib.php
Expand Up @@ -1294,7 +1294,11 @@ function assignment_grades($assignmentid) {
if ($scale = get_record('scale', 'id', $scaleid)) {
$scalegrades = make_menu_from_list($scale->scale);
foreach ($grades as $key => $grade) {
$grades[$key] = $scalegrades[$grade];
if (empty($scalegrades[$key])) {
$grades[$key] = '';
} else {
$grades[$key] = $scalegrades[$grade];
}
}
}
}
Expand Down

0 comments on commit 1244ed7

Please sign in to comment.