mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 12:32:08 +02:00
MDL-72010 quiz: prevent session timeouts during attempts
This commit is contained in:
parent
338b60f43b
commit
8f20d1627b
@ -116,6 +116,7 @@ if (!$attemptobj->set_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());
|
||||
\core\session\manager::keepalive(); // Try to prevent sessions expiring during quiz attempts.
|
||||
|
||||
// Arrange for the navigation to be displayed in the first region on the page.
|
||||
$navbc = $attemptobj->get_navigation_panel($output, 'quiz_attempt_nav_panel', $page);
|
||||
|
@ -79,6 +79,8 @@ if ($attemptobj->is_finished()) {
|
||||
redirect($attemptobj->review_url());
|
||||
}
|
||||
|
||||
\core\session\manager::keepalive(); // Try to prevent sessions expiring during quiz attempts.
|
||||
|
||||
// Arrange for the navigation to be displayed.
|
||||
if (empty($attemptobj->get_quiz()->showblocks)) {
|
||||
$PAGE->blocks->show_only_fake_blocks();
|
||||
|
Loading…
x
Reference in New Issue
Block a user