]> git.mjollnir.org Git - moodle.git/commitdiff
Show no grade on entries without any feedback
authormoodler <moodler>
Mon, 26 Apr 2004 13:35:33 +0000 (13:35 +0000)
committermoodler <moodler>
Mon, 26 Apr 2004 13:35:33 +0000 (13:35 +0000)
mod/assignment/lib.php

index 9f8addcc397bae14ff9504c07a02a92ef3a352e1..a538067f461789f30b2ae149087edf532b20f4c6 100644 (file)
@@ -535,6 +535,9 @@ function assignment_print_submission($assignment, $user, $submission, $teachers,
     } else {
         echo "<TD BGCOLOR=\"$THEME->cellheading\">";
     }
+    if (!$submission->grade and !$submission->timemarked) {
+        $submission->grade = -1;   /// Hack to stop zero being selected on the menu below (so it shows 'no grade')
+    }
     echo get_string("feedback", "assignment").":";
     choose_from_menu($grades, "g$submission->id", $submission->grade, get_string("nograde"));
     if ($submission->timemarked) {