]> git.mjollnir.org Git - moodle.git/commitdiff
Don't give fatal error when questions were not found.
authorpaca70 <paca70>
Mon, 28 Apr 2003 06:36:14 +0000 (06:36 +0000)
committerpaca70 <paca70>
Mon, 28 Apr 2003 06:36:14 +0000 (06:36 +0000)
mod/quiz/lib.php

index effd244ef1ae9873b2d1a9e273c206b5ff657f1c..a436b2ba3898635fcb227c07007aaf4ccc0327db 100644 (file)
@@ -967,7 +967,11 @@ function quiz_print_question_list($questionlist, $grades) {
     $order = explode(",", $questionlist);
 
     if (!$questions = get_records_list("quiz_questions", "id", $questionlist)) {
-        error("No questions were found!");
+        echo "<P align=center>";
+        print_string("noquestions", "quiz");
+        echo "</P>";
+        return;
+
     }
 
     $strorder = get_string("order");