From: nicolasconnault Date: Thu, 6 Aug 2009 14:13:48 +0000 (+0000) Subject: MDL-19813 Converted all print_footer() calls X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=867847e3524988d1c4b605f467b15839d9c17c90;p=moodle.git MDL-19813 Converted all print_footer() calls --- diff --git a/mod/quiz/accessrules.php b/mod/quiz/accessrules.php index 6773c9f263..e7eeb711fe 100644 --- a/mod/quiz/accessrules.php +++ b/mod/quiz/accessrules.php @@ -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; } } diff --git a/mod/quiz/addrandom.php b/mod/quiz/addrandom.php index ed9f42adad..3e445eed82 100644 --- a/mod/quiz/addrandom.php +++ b/mod/quiz/addrandom.php @@ -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(); ?> diff --git a/mod/quiz/attempt.php b/mod/quiz/attempt.php index 9157fce96b..c9d0e09a2e 100644 --- a/mod/quiz/attempt.php +++ b/mod/quiz/attempt.php @@ -158,9 +158,5 @@ // 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(); ?> diff --git a/mod/quiz/comment.php b/mod/quiz/comment.php index 9364201abf..68658969cc 100644 --- a/mod/quiz/comment.php +++ b/mod/quiz/comment.php @@ -79,5 +79,5 @@ echo ''; /// End of the page. - print_footer('empty'); + echo $OUTPUT->footer(); ?> diff --git a/mod/quiz/edit.php b/mod/quiz/edit.php index 9a5f803550..7a9367dc09 100644 --- a/mod/quiz/edit.php +++ b/mod/quiz/edit.php @@ -592,5 +592,5 @@ $qcobject->display_randomquestion_user_interface(); footer(); ?> diff --git a/mod/quiz/index.php b/mod/quiz/index.php index f6f0647fcd..c9ee3287fd 100644 --- a/mod/quiz/index.php +++ b/mod/quiz/index.php @@ -164,5 +164,5 @@ print_table($table); // Finish the page - print_footer($course); + echo $OUTPUT->footer(); ?> diff --git a/mod/quiz/report.php b/mod/quiz/report.php index 8ef7462852..6e2c74f320 100644 --- a/mod/quiz/report.php +++ b/mod/quiz/report.php @@ -85,6 +85,6 @@ /// Print footer - print_footer($course); + echo $OUTPUT->footer(); ?> diff --git a/mod/quiz/review.php b/mod/quiz/review.php index 4a5c6bdef0..e2ed53a061 100644 --- a/mod/quiz/review.php +++ b/mod/quiz/review.php @@ -239,10 +239,5 @@ } echo ""; - // Finish the page - if ($accessmanager->securewindow_required($attemptobj->is_preview_user())) { - print_footer('empty'); - } else { - print_footer($attemptobj->get_course()); - } + echo $OUTPUT->footer(); ?> diff --git a/mod/quiz/reviewquestion.php b/mod/quiz/reviewquestion.php index d536124001..f13abdaf6a 100644 --- a/mod/quiz/reviewquestion.php +++ b/mod/quiz/reviewquestion.php @@ -119,5 +119,5 @@ $attemptobj->print_question($questionid, true, $baseurl); /// Finish the page - print_footer(); + echo $OUTPUT->footer(); ?> diff --git a/mod/quiz/summary.php b/mod/quiz/summary.php index 5f0562b0c1..59db7c3554 100644 --- a/mod/quiz/summary.php +++ b/mod/quiz/summary.php @@ -120,10 +120,6 @@ echo "\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(); ?> diff --git a/mod/quiz/view.php b/mod/quiz/view.php index a8130b7408..175f111f2f 100644 --- a/mod/quiz/view.php +++ b/mod/quiz/view.php @@ -117,7 +117,7 @@ if (isguestuser()) { notice_yesno('

' . get_string('guestsno', 'quiz') . "

\n\n

" . get_string('liketologin') . "

\n", get_login_url(), get_referer(false)); - print_footer($course); + echo $OUTPUT->footer(); exit; } @@ -126,7 +126,7 @@ print_box('

' . get_string('youneedtoenrol', 'quiz') . "

\n\n

" . print_continue($CFG->wwwroot . '/course/view.php?id=' . $course->id, true) . "

\n", 'generalbox', 'notice'); - print_footer($course); + echo $OUTPUT->footer(); exit; } @@ -390,4 +390,4 @@ $completion=new completion_info($course); $completion->set_module_viewed($cm); - print_footer($course); + echo $OUTPUT->footer();