]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-19813 Converted all print_footer() calls
authornicolasconnault <nicolasconnault>
Thu, 6 Aug 2009 14:13:48 +0000 (14:13 +0000)
committernicolasconnault <nicolasconnault>
Thu, 6 Aug 2009 14:13:48 +0000 (14:13 +0000)
mod/quiz/accessrules.php
mod/quiz/addrandom.php
mod/quiz/attempt.php
mod/quiz/comment.php
mod/quiz/edit.php
mod/quiz/index.php
mod/quiz/report.php
mod/quiz/review.php
mod/quiz/reviewquestion.php
mod/quiz/summary.php
mod/quiz/view.php

index 6773c9f2632ec1dc627d0bff410619e66e2f0580..e7eeb711fe4b6917f7e6f3625648e19d373533cb 100644 (file)
@@ -220,7 +220,7 @@ class quiz_access_manager {
      * @param boolean $canpreview This affects whether we have to worry about secure window stuff.
      */
     public function back_to_view_page($canpreview, $message = '') {
-        global $CFG;
+        global $CFG, $OUTPUT;
         $url = $this->_quizobj->view_url();
         if ($this->securewindow_required($canpreview)) {
             print_header();
@@ -234,7 +234,7 @@ class quiz_access_manager {
             }
             print_box_end();
             $PAGE->requires->js_function_call('quiz_secure_window.close', array($url, $delay));
-            print_footer('empty');
+            echo $OUTPUT->footer();
             die();
         } else {
             redirect($url, $message);
@@ -596,7 +596,7 @@ class password_access_rule extends quiz_access_rule_base {
      * @return mixed return null, unless $return is true, and a form needs to be displayed.
      */
     public function do_password_check($canpreview, $accessmanager, $return = false) {
-        global $CFG, $SESSION;
+        global $CFG, $SESSION, $OUTPUT;
 
     /// We have already checked the password for this quiz this session, so don't ask again.
         if (!empty($SESSION->passwordcheckedquizzes[$this->_quiz->id])) {
@@ -657,7 +657,7 @@ class password_access_rule extends quiz_access_rule_base {
             return $output;
         } else {
             echo $output;
-            print_footer('empty');
+            echo $OUTPUT->footer();
             exit;
         }
     }
index ed9f42adadaa5cf6a2829fb1eff26fee0e0d0d79..3e445eed827da334a56a59b3dbc87b8f44ff0c8c 100644 (file)
@@ -83,5 +83,5 @@ echo $OUTPUT->heading(get_string('addrandomquestiontoquiz', 'quiz', $quizname),
 $addonpage = optional_param('addonpage_form', 0, PARAM_SEQUENCE);
 $qcobject->display_randomquestion_user_interface($addonpage);
 
-print_footer($course);
+echo $OUTPUT->footer();
 ?>
index 9157fce96b2b655d666d3b00549970f19170e94a..c9d0e09a2ed276d908122074e3f1be172c54d4c1 100644 (file)
 
     // Finish the page
     $accessmanager->show_attempt_timer_if_needed($attemptobj->get_attempt(), time());
-    if ($accessmanager->securewindow_required($attemptobj->is_preview_user())) {
-        print_footer('empty');
-    } else {
-        print_footer($attemptobj->get_course());
-    }
+    echo $OUTPUT->footer();
 ?>
index 9364201abff844acc6bf778523790d0cd6e55bb6..68658969cc2cc23bf7b7e3a8ecbc835fc5201f1b 100644 (file)
@@ -79,5 +79,5 @@
     echo '</form>';
 
 /// End of the page.
-    print_footer('empty');
+    echo $OUTPUT->footer();
 ?>
index 9a5f803550b5813a45c563dff4c84048fde45cb4..7a9367dc09037d59df581493c722f79750c25c30 100644 (file)
@@ -592,5 +592,5 @@ $qcobject->display_randomquestion_user_interface();
 </div>
     <?php
 }
-print_footer($course);
+echo $OUTPUT->footer();
 ?>
index f6f0647fcdc34e5f527bec164a80acb9359d619e..c9ee3287fdb58cc9a8d4e9e0cde141c665487233 100644 (file)
     print_table($table);
 
 // Finish the page
-    print_footer($course);
+    echo $OUTPUT->footer();
 ?>
index 8ef746285272d8cc0754340e76f87dd2629ccffa..6e2c74f32019a60fc6d078e639db6baa12a237f2 100644 (file)
@@ -85,6 +85,6 @@
 
 /// Print footer
 
-    print_footer($course);
+    echo $OUTPUT->footer();
 
 ?>
index 4a5c6bdef0c4d718986ff8db7dc13796b0554e13..e2ed53a061b679d1fe36a10895cc76043bb177f0 100644 (file)
     }
     echo "</div>";
 
-    // Finish the page
-    if ($accessmanager->securewindow_required($attemptobj->is_preview_user())) {
-        print_footer('empty');
-    } else {
-        print_footer($attemptobj->get_course());
-    }
+    echo $OUTPUT->footer();
 ?>
index d536124001b26468fdfa7c8c23dbbd9e4eb75154..f13abdaf6ae75f272f4fcd2230cde634f22d41cc 100644 (file)
     $attemptobj->print_question($questionid, true, $baseurl);
 
 /// Finish the page
-    print_footer();
+    echo $OUTPUT->footer();
 ?>
index 5f0562b0c1d43914886c8db0d6fdc63e305494ae..59db7c35548ad2cfb8319c2885df75ba76f98235 100644 (file)
@@ -120,10 +120,6 @@ echo "</div>\n";
 
 /// Finish the page
 $accessmanager->show_attempt_timer_if_needed($attemptobj->get_attempt(), time());
-if ($accessmanager->securewindow_required($attemptobj->is_preview_user())) {
-    print_footer('empty');
-} else {
-    print_footer($attemptobj->get_course());
-}
+echo $OUTPUT->footer();
 
 ?>
index a8130b74081502c19032b06ace60057b50e6f7a9..175f111f2fc47549d65e3d2dd4d872469f081bfc 100644 (file)
     if (isguestuser()) {
         notice_yesno('<p>' . get_string('guestsno', 'quiz') . "</p>\n\n<p>" .
                 get_string('liketologin') . "</p>\n", get_login_url(), get_referer(false));
-        print_footer($course);
+        echo $OUTPUT->footer();
         exit;
     }
 
         print_box('<p>' . get_string('youneedtoenrol', 'quiz') . "</p>\n\n<p>" .
                 print_continue($CFG->wwwroot . '/course/view.php?id=' . $course->id, true) .
                 "</p>\n", 'generalbox', 'notice');
-        print_footer($course);
+        echo $OUTPUT->footer();
         exit;
     }
 
     $completion=new completion_info($course);
     $completion->set_module_viewed($cm);
 
-    print_footer($course);
+    echo $OUTPUT->footer();