Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Check to see if a scale grade exists for the given grade and if not s…

…et it

to an empty string. This should never occur through normal use but just
in case ...
  • Loading branch information...
commit 1244ed75d2cf9008ac5b1f906af5a1629349a544 1 parent ac757a9
ikawhero authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 mod/assignment/lib.php
6 mod/assignment/lib.php
View
@@ -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];
+ }
}
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.