MDL-3054 record the current page of a quiz attempt

This commit is contained in:
Charles Fulton 2012-01-08 14:14:09 -08:00
parent 60e99097e4
commit 5db8294940
6 changed files with 35 additions and 4 deletions

View file

@ -96,6 +96,11 @@ if (empty($slots)) {
throw new moodle_quiz_exception($attemptobj->get_quizobj(), 'noquestionsfound');
}
// Update attempt page
if ($attemptobj->get_currentpage() != $page) {
$DB->set_field('quiz_attempts', 'currentpage', $page);
}
// Initialise the JavaScript.
$headtags = $attemptobj->get_html_head_contributions($page);
$PAGE->requires->js_init_call('M.mod_quiz.init_attempt_form', null, false, quiz_get_js_module());