MDL-19813 Converted all print_footer() calls

This commit is contained in:
nicolasconnault 2009-08-06 14:13:48 +00:00
parent 0578c9a2a9
commit 867847e352
11 changed files with 16 additions and 29 deletions

View 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;
}
}

View 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();
?>

View file

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

View file

@ -79,5 +79,5 @@
echo '</form>';
/// End of the page.
print_footer('empty');
echo $OUTPUT->footer();
?>

View file

@ -592,5 +592,5 @@ $qcobject->display_randomquestion_user_interface();
</div>
<?php
}
print_footer($course);
echo $OUTPUT->footer();
?>

View file

@ -164,5 +164,5 @@
print_table($table);
// Finish the page
print_footer($course);
echo $OUTPUT->footer();
?>

View file

@ -85,6 +85,6 @@
/// Print footer
print_footer($course);
echo $OUTPUT->footer();
?>

View file

@ -239,10 +239,5 @@
}
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();
?>

View file

@ -119,5 +119,5 @@
$attemptobj->print_question($questionid, true, $baseurl);
/// Finish the page
print_footer();
echo $OUTPUT->footer();
?>

View 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();
?>

View file

@ -117,7 +117,7 @@
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;
}
@ -126,7 +126,7 @@
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;
}
@ -390,4 +390,4 @@
$completion=new completion_info($course);
$completion->set_module_viewed($cm);
print_footer($course);
echo $OUTPUT->footer();