]> git.mjollnir.org Git - moodle.git/commitdiff
Fix for off-by-one grade error when 'Save Grades' had not been used
authormoodler <moodler>
Mon, 14 Apr 2003 13:52:59 +0000 (13:52 +0000)
committermoodler <moodler>
Mon, 14 Apr 2003 13:52:59 +0000 (13:52 +0000)
mod/quiz/lib.php

index 4409ab4427da58316b94af670999ce95342effe3..d8a16dda6079de606b98355054ee97c3b76f0a7b 100644 (file)
@@ -924,6 +924,10 @@ function quiz_get_all_question_grades($questionlist, $quizid) {
 // Given a list of question IDs, finds grades or invents them to 
 // create an array of matching grades
 
+    if (empty($questionlist)) {
+        return array();
+    }
+
     $questions = quiz_get_question_grades($quizid, $questionlist);
 
     $list = explode(",", $questionlist);