This commit is contained in:
Sara Arjona 2021-02-03 08:51:11 +01:00
commit 4d5c3c3914
5 changed files with 6 additions and 2 deletions

View File

@ -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');

View File

@ -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()) {

View File

@ -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());

View File

@ -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());

View File

@ -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);