diff --git a/mod/quiz/accessrule/seb/rule.php b/mod/quiz/accessrule/seb/rule.php index c4c75c2d78c..54a7c2f2e00 100644 --- a/mod/quiz/accessrule/seb/rule.php +++ b/mod/quiz/accessrule/seb/rule.php @@ -454,7 +454,6 @@ class quizaccess_seb extends quiz_access_rule_base { */ public function setup_attempt_page($page) { $page->set_title($this->quizobj->get_course()->shortname . ': ' . $page->title); - $page->set_cacheable(false); $page->set_popup_notification_allowed(false); // Prevent message notifications. $page->set_heading($page->title); $page->set_pagelayout('secure'); diff --git a/mod/quiz/accessrule/securewindow/rule.php b/mod/quiz/accessrule/securewindow/rule.php index bbeda5449c9..1857dbcd7e5 100644 --- a/mod/quiz/accessrule/securewindow/rule.php +++ b/mod/quiz/accessrule/securewindow/rule.php @@ -72,7 +72,6 @@ class quizaccess_securewindow extends quiz_access_rule_base { public function setup_attempt_page($page) { $page->set_popup_notification_allowed(false); // Prevent message notifications. $page->set_title($this->quizobj->get_course()->shortname . ': ' . $page->title); - $page->set_cacheable(false); $page->set_pagelayout('secure'); if ($this->quizobj->is_preview_user()) { diff --git a/mod/quiz/attempt.php b/mod/quiz/attempt.php index 5a03823e217..53bb81459a5 100644 --- a/mod/quiz/attempt.php +++ b/mod/quiz/attempt.php @@ -44,6 +44,8 @@ $cmid = optional_param('cmid', null, PARAM_INT); $attemptobj = quiz_create_attempt_handling_errors($attemptid, $cmid); $page = $attemptobj->force_page_number_into_range($page); $PAGE->set_url($attemptobj->attempt_url(null, $page)); +// During quiz attempts, the browser back/forwards buttons should force a reload. +$PAGE->set_cacheable(false); // Check login. require_login($attemptobj->get_course(), false, $attemptobj->get_cm()); diff --git a/mod/quiz/startattempt.php b/mod/quiz/startattempt.php index 7d2398ebce6..ed05d61fca3 100644 --- a/mod/quiz/startattempt.php +++ b/mod/quiz/startattempt.php @@ -44,6 +44,8 @@ if (!$course = $DB->get_record('course', array('id' => $cm->course))) { $quizobj = quiz::create($cm->instance, $USER->id); // This script should only ever be posted to, so set page URL to the view page. $PAGE->set_url($quizobj->view_url()); +// During quiz attempts, the browser back/forwards buttons should force a reload. +$PAGE->set_cacheable(false); // Check login and sesskey. require_login($quizobj->get_course(), false, $quizobj->get_cm()); diff --git a/mod/quiz/summary.php b/mod/quiz/summary.php index bd98110f574..682c8b3e7c5 100644 --- a/mod/quiz/summary.php +++ b/mod/quiz/summary.php @@ -30,6 +30,8 @@ $attemptid = required_param('attempt', PARAM_INT); // The attempt to summarise. $cmid = optional_param('cmid', null, PARAM_INT); $PAGE->set_url('/mod/quiz/summary.php', array('attempt' => $attemptid)); +// During quiz attempts, the browser back/forwards buttons should force a reload. +$PAGE->set_cacheable(false); $attemptobj = quiz_create_attempt_handling_errors($attemptid, $cmid);