Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
authored June 06, 2005

Showing 1 changed file with 5 additions and 1 deletion. Show diff stats Hide diff stats

  1. 6  mod/assignment/lib.php
6  mod/assignment/lib.php
@@ -1294,7 +1294,11 @@ function assignment_grades($assignmentid) {
1294 1294
             if ($scale = get_record('scale', 'id', $scaleid)) {
1295 1295
                 $scalegrades = make_menu_from_list($scale->scale);
1296 1296
                 foreach ($grades as $key => $grade) {
1297  
-                    $grades[$key] = $scalegrades[$grade];
  1297
+                    if (empty($scalegrades[$key])) {
  1298
+                        $grades[$key] = '';
  1299
+                    } else {
  1300
+                        $grades[$key] = $scalegrades[$grade];
  1301
+                    }
1298 1302
                 }
1299 1303
             }
1300 1304
         }

0 notes on commit 1244ed7

Please sign in to comment.
Something went wrong with that request. Please try again.