MDL-34451 quiz Fixed problem where attempt page is updated for ALL attempts, not...
authorEric Merrill <merrill@oakland.edu>
Sun, 22 Jul 2012 16:22:28 +0000 (12:22 -0400)
committerEric Merrill <merrill@oakland.edu>
Sun, 22 Jul 2012 16:22:28 +0000 (12:22 -0400)
mod/quiz/attempt.php

index bb8c01f..cdff54e 100644 (file)
@@ -103,7 +103,7 @@ if ($attemptobj->get_currentpage() != $page) {
         // Prevent out of sequence access.
         redirect($attemptobj->start_attempt_url(null, $attemptobj->get_currentpage()));
     }
-    $DB->set_field('quiz_attempts', 'currentpage', $page);
+    $DB->set_field('quiz_attempts', 'currentpage', $page, array('id' => $attemptid));
 }
 
 // Initialise the JavaScript.