Permalink
Browse files

Revert "MDL-34257 quiz 'secure' mode: PAGE initialisation order issues."

This reverts commit 0e708c3.

note : there is another commit prefixed with MDL-34257 hash 'ddda79c' which was really for MDL-34187. 'ddda79c' is not being reverted as its not really about MDL-34257.
  • Loading branch information...
1 parent 0e08f39 commit 7183a1f4a47a5ec066184fb855ef3689884e1324 @nebgor nebgor committed Sep 6, 2012
Showing with 6 additions and 8 deletions.
  1. +2 −2 mod/quiz/attempt.php
  2. +1 −2 mod/quiz/review.php
  3. +2 −2 mod/quiz/summary.php
  4. +1 −2 theme/base/config.php
View
@@ -76,9 +76,8 @@
// Check the access rules.
$accessmanager = $attemptobj->get_access_manager(time());
-$accessmanager->setup_attempt_page($PAGE);
-$output = $PAGE->get_renderer('mod_quiz');
$messages = $accessmanager->prevent_access();
+$output = $PAGE->get_renderer('mod_quiz');
if (!$attemptobj->is_preview_user() && $messages) {
print_error('attempterror', 'quiz', $attemptobj->view_url(),
$output->access_messages($messages));
@@ -121,6 +120,7 @@
$headtags = $attemptobj->get_html_head_contributions($page);
$PAGE->set_title(format_string($attemptobj->get_quiz_name()));
$PAGE->set_heading($attemptobj->get_course()->fullname);
+$accessmanager->setup_attempt_page($PAGE);
if ($attemptobj->is_last_page($page)) {
$nextpage = -1;
View
@@ -52,8 +52,6 @@
// Create an object to manage all the other (non-roles) access rules.
$accessmanager = $attemptobj->get_access_manager(time());
-$accessmanager->setup_attempt_page($PAGE);
-
$options = $attemptobj->get_display_options(true);
// Check permissions.
@@ -105,6 +103,7 @@
$headtags = $attemptobj->get_html_head_contributions($page, $showall);
$PAGE->set_title(format_string($attemptobj->get_quiz_name()));
$PAGE->set_heading($attemptobj->get_course()->fullname);
+$accessmanager->setup_attempt_page($PAGE);
// Summary table start. ============================================================================
View
@@ -52,9 +52,8 @@
// Check access.
$accessmanager = $attemptobj->get_access_manager(time());
-$accessmanager->setup_attempt_page($PAGE);
-$output = $PAGE->get_renderer('mod_quiz');
$messages = $accessmanager->prevent_access();
+$output = $PAGE->get_renderer('mod_quiz');
if (!$attemptobj->is_preview_user() && $messages) {
print_error('attempterror', 'quiz', $attemptobj->view_url(),
$output->access_messages($messages));
@@ -90,6 +89,7 @@
$PAGE->navbar->add(get_string('summaryofattempt', 'quiz'));
$PAGE->set_title(format_string($attemptobj->get_quiz_name()));
$PAGE->set_heading($attemptobj->get_course()->fullname);
+$accessmanager->setup_attempt_page($PAGE);
// Display the page.
echo $output->summary_page($attemptobj, $displayoptions);
View
@@ -162,8 +162,7 @@
// The pagelayout used for safebrowser and securewindow.
'secure' => array(
'file' => 'general.php',
- 'regions' => array('side-pre'),
- 'defaultregion' => 'side-pre',
+ 'regions' => array(),
'options' => array('nofooter'=>true, 'nonavbar'=>true, 'nocustommenu'=>true, 'nologinlinks'=>true),
),
);

0 comments on commit 7183a1f

Please sign in to comment.