From af707a64b7c5c36cf17b2dc6c08ba3e63939fe74 Mon Sep 17 00:00:00 2001 From: tjhunt Date: Mon, 28 Jul 2008 14:41:15 +0000 Subject: [PATCH] MDL-15542 - followup bug fixes thanks to sam. --- mod/quiz/processattempt.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mod/quiz/processattempt.php b/mod/quiz/processattempt.php index f82383a04d..9f50adb08d 100644 --- a/mod/quiz/processattempt.php +++ b/mod/quiz/processattempt.php @@ -158,7 +158,7 @@ if (!$success) { if (!$finishattempt) { $attempt->timemodified = $timenow; if (!$DB->update_record('quiz_attempts', $attempt)) { - quiz_error($quiz, 'saveattemptfailed'); + quiz_error($attemptobj->get_quiz(), 'saveattemptfailed'); } redirect($nexturl); @@ -200,12 +200,12 @@ add_to_log($attemptobj->get_courseid(), 'quiz', 'close attempt', $attempt->timemodified = $timenow; $attempt->timefinish = $timenow; if (!$DB->update_record('quiz_attempts', $attempt)) { - quiz_error($quiz, 'saveattemptfailed'); + quiz_error($attemptobj->get_quiz(), 'saveattemptfailed'); } if (!$attempt->preview) { /// Record this user's best grade (if this is not a preview). - quiz_save_best_grade($quiz); + quiz_save_best_grade($attemptobj->get_quiz()); /// Send any notification emails (if this is not a preview). $attemptobj->quiz_send_notification_emails(); -- 2.39.5