From: jamiesensei Date: Wed, 9 Apr 2008 13:01:40 +0000 (+0000) Subject: MDL-14283 attempt in mdl_question_states is always 1 - typo in attempt.php introduced... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=e89e09d21ddda5d285cffa7066ba8ff34aaaa80e;p=moodle.git MDL-14283 attempt in mdl_question_states is always 1 - typo in attempt.php introduced in Tim's access rules refactor meant that attempt in quiz_attempts table was always set to 1. This meant that only one attempt was shown on the quiz/view.php page as well as causing other problems. --- diff --git a/mod/quiz/locallib.php b/mod/quiz/locallib.php index f570613b16..3de18bf029 100644 --- a/mod/quiz/locallib.php +++ b/mod/quiz/locallib.php @@ -78,7 +78,7 @@ define('QUIZ_SHOW_TIME_BEFORE_DEADLINE', '3600'); function quiz_create_attempt($quiz, $attemptnumber, $lastattempt, $timenow, $ispreview = false) { global $USER; - if ($attemptnumber = 1 || !$quiz->attemptonlast) { + if ($attemptnumber == 1 || !$quiz->attemptonlast) { /// We are not building on last attempt so create a new attempt. $attempt = new stdClass; $attempt->quiz = $quiz->id;