From 9350263a961e18a3b6af222f4a48417938c726d1 Mon Sep 17 00:00:00 2001 From: moodler Date: Tue, 27 Jul 2004 13:19:12 +0000 Subject: [PATCH] Merged fix from stable --- mod/quiz/lib.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mod/quiz/lib.php b/mod/quiz/lib.php index 7e5c2ca9be..52d7e86e06 100644 --- a/mod/quiz/lib.php +++ b/mod/quiz/lib.php @@ -1575,10 +1575,10 @@ function quiz_save_attempt($quiz, $questions, $result, $attemptnum) { return false; } - if ($attempt->attempt != $attemptnum) { // Double check. - notify("Number of this attempt is different to the unfinished one!"); - return false; - } + // Not usually necessary, but there's some sort of very rare glitch + // I've seen where the number wasn't already the same. In these cases + // We upgrade the database to match the attemptnum we calculated + $attempt->attempt = $attemptnum; // Now let's complete this record and save it -- 2.39.5