Merge branch 'MDL-68970_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE

This commit is contained in:
Sara Arjona 2021-02-03 08:51:23 +01:00
commit 5f2879986a
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) { public function setup_attempt_page($page) {
$page->set_title($this->quizobj->get_course()->shortname . ': ' . $page->title); $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_popup_notification_allowed(false); // Prevent message notifications.
$page->set_heading($page->title); $page->set_heading($page->title);
$page->set_pagelayout('secure'); $page->set_pagelayout('secure');

View file

@ -72,7 +72,6 @@ class quizaccess_securewindow extends quiz_access_rule_base {
public function setup_attempt_page($page) { public function setup_attempt_page($page) {
$page->set_popup_notification_allowed(false); // Prevent message notifications. $page->set_popup_notification_allowed(false); // Prevent message notifications.
$page->set_title($this->quizobj->get_course()->shortname . ': ' . $page->title); $page->set_title($this->quizobj->get_course()->shortname . ': ' . $page->title);
$page->set_cacheable(false);
$page->set_pagelayout('secure'); $page->set_pagelayout('secure');
if ($this->quizobj->is_preview_user()) { 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); $attemptobj = quiz_create_attempt_handling_errors($attemptid, $cmid);
$page = $attemptobj->force_page_number_into_range($page); $page = $attemptobj->force_page_number_into_range($page);
$PAGE->set_url($attemptobj->attempt_url(null, $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. // Check login.
require_login($attemptobj->get_course(), false, $attemptobj->get_cm()); 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); $quizobj = quiz::create($cm->instance, $USER->id);
// This script should only ever be posted to, so set page URL to the view page. // This script should only ever be posted to, so set page URL to the view page.
$PAGE->set_url($quizobj->view_url()); $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. // Check login and sesskey.
require_login($quizobj->get_course(), false, $quizobj->get_cm()); 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); $cmid = optional_param('cmid', null, PARAM_INT);
$PAGE->set_url('/mod/quiz/summary.php', array('attempt' => $attemptid)); $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); $attemptobj = quiz_create_attempt_handling_errors($attemptid, $cmid);