From e909c8d0903cfcd0de735a73c164886af0360d03 Mon Sep 17 00:00:00 2001 From: moodler Date: Mon, 21 Oct 2002 12:39:46 +0000 Subject: [PATCH] Some error checking --- mod/quiz/lib.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mod/quiz/lib.php b/mod/quiz/lib.php index 879da90564..056167c579 100644 --- a/mod/quiz/lib.php +++ b/mod/quiz/lib.php @@ -754,6 +754,7 @@ function quiz_save_best_grade($quiz, $user) { /// and then saves that grade in the quiz_grades table. if (!$attempts = quiz_get_user_attempts($quiz->id, $user->id)) { + notify("Could not find any user attempts"); return false; } @@ -764,6 +765,7 @@ function quiz_save_best_grade($quiz, $user) { $grade->grade = $bestgrade; $grade->timemodified = time(); if (!update_record("quiz_grades", $grade)) { + notify("Could not update best grade"); return false; } } else { @@ -772,6 +774,7 @@ function quiz_save_best_grade($quiz, $user) { $grade->grade = $bestgrade; $grade->timemodified = time(); if (!insert_record("quiz_grades", $grade)) { + notify("Could not insert new best grade"); return false; } } -- 2.39.5