mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-19799 Converted all print_footer() calls
This commit is contained in:
parent
641f16bafc
commit
7e0d66753e
@ -72,4 +72,4 @@ if (empty($action)) {
|
||||
echo '<button id="comments_delete">'.get_string('delete').'</button>';
|
||||
echo '<div>';
|
||||
}
|
||||
admin_externalpage_print_footer();
|
||||
echo $OUTPUT->footer();
|
||||
|
@ -63,5 +63,5 @@
|
||||
} else {
|
||||
print_continue($CFG->wwwroot);
|
||||
}
|
||||
print_footer();
|
||||
echo $OUTPUT->footer();
|
||||
?>
|
||||
|
@ -103,7 +103,7 @@ if ($delete !== '' and $file = $fs->get_file($contextid, $filearea, $itemid, $fi
|
||||
$optionsno = array('itemid'=>$itemid, 'filepath'=>$filepath, 'subdirs'=>$subdirs);
|
||||
$optionsyes = array('itemid'=>$itemid, 'filepath'=>$filepath, 'delete'=>$delete, 'sesskey'=>sesskey(), 'subdirs'=>$subdirs);
|
||||
notice_yesno (get_string('deletecheckfiles'), 'draftfiles.php', 'draftfiles.php', $optionsyes, $optionsno, 'post', 'get');
|
||||
print_footer('empty');
|
||||
echo $OUTPUT->footer();
|
||||
die;
|
||||
|
||||
} else {
|
||||
@ -201,6 +201,6 @@ if ($subdirs) {
|
||||
echo '</div></form>';
|
||||
}
|
||||
|
||||
print_footer('empty');
|
||||
echo $OUTPUT->footer();
|
||||
|
||||
|
||||
|
@ -118,7 +118,7 @@ if ($file_info and $delete) {
|
||||
$optionsyes['sesskey'] = sesskey();
|
||||
|
||||
notice_yesno (get_string('deletecheckfiles'), 'index.php', 'index.php', $optionsyes, $optionsno, 'post', 'get');
|
||||
print_footer();
|
||||
echo $OUTPUT->footer();
|
||||
die;
|
||||
}
|
||||
|
||||
@ -174,8 +174,9 @@ html_footer();
|
||||
/// UI functions /////////////////////////
|
||||
|
||||
function html_footer() {
|
||||
global $OUTPUT;
|
||||
echo '</td></tr></table>';
|
||||
print_footer();
|
||||
echo $OUTPUT->footer();
|
||||
}
|
||||
|
||||
function html_header($context, $file_info){
|
||||
|
2
help.php
2
help.php
@ -125,7 +125,7 @@ if ($file && $helpfound && ($foundlang != 'en_utf8' || ($forcelang == 'en_utf8'
|
||||
}
|
||||
|
||||
$CFG->docroot = ''; // We don't want a doc link here
|
||||
print_footer('none');
|
||||
echo $OUTPUT->footer();
|
||||
|
||||
function file_exists_and_readable($filepath) {
|
||||
return file_exists($filepath) and is_file($filepath) and is_readable($filepath);
|
||||
|
@ -5096,9 +5096,9 @@ function admin_externalpage_print_header($focus='') {
|
||||
*/
|
||||
function admin_externalpage_print_footer() {
|
||||
// TODO Still 103 referernces in core code. Don't do debugging output yet.
|
||||
// debugging('admin_externalpage_print_footer is deprecated. Please use print_footer ' .
|
||||
// '(or even $OUTPUT->footer() instead.', DEBUG_DEVELOPER);
|
||||
print_footer();
|
||||
debugging('admin_externalpage_print_footer is deprecated. Please $OUTPUT->footer() instead.', DEBUG_DEVELOPER);
|
||||
global $OUTPUT;
|
||||
echo $OUTPUT->footer();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -71,7 +71,7 @@ global $CFG;
|
||||
echo '<p align="center"><a href="'.$CFG->wwwroot.'/help.php?file=index.html">'. get_string('helpindex') .'</a></p>';
|
||||
|
||||
$CFG->docroot = ''; // We don't want a doc link here
|
||||
print_footer('none');
|
||||
echo $OUTPUT->footer();
|
||||
die;
|
||||
/**
|
||||
* A function to return a simple link to a help page. We don't want a popup here
|
||||
|
@ -1977,7 +1977,7 @@ function get_login_url($loginguest=false) {
|
||||
* @return mixed Void, exit, and die depending on path
|
||||
*/
|
||||
function require_login($courseorid=0, $autologinguest=true, $cm=null, $setwantsurltome=true) {
|
||||
global $CFG, $SESSION, $USER, $COURSE, $FULLME, $PAGE, $SITE, $DB;
|
||||
global $CFG, $SESSION, $USER, $COURSE, $FULLME, $PAGE, $SITE, $DB, $OUTPUT;
|
||||
|
||||
/// setup global $COURSE, themes, language and locale
|
||||
if (!empty($courseorid)) {
|
||||
@ -2195,7 +2195,7 @@ function require_login($courseorid=0, $autologinguest=true, $cm=null, $setwantsu
|
||||
} else {
|
||||
notify(get_string('guestsnotallowed', '', format_string($COURSE->fullname)));
|
||||
echo '<div class="notifyproblem">'.switchroles_form($COURSE->id).'</div>';
|
||||
print_footer($COURSE);
|
||||
echo $OUTPUT->footer();
|
||||
exit;
|
||||
}
|
||||
break;
|
||||
|
@ -276,7 +276,7 @@ class portfolio_exporter {
|
||||
* @return boolean whether or not to process the next stage. this is important as the control function is called recursively.
|
||||
*/
|
||||
public function process_stage_config() {
|
||||
|
||||
global $OUTPUT;
|
||||
$pluginobj = $callerobj = null;
|
||||
if ($this->instance->has_export_config()) {
|
||||
$pluginobj = $this->instance;
|
||||
@ -336,7 +336,7 @@ class portfolio_exporter {
|
||||
print_simple_box_start();
|
||||
$mform->display();
|
||||
print_simple_box_end();
|
||||
print_footer();
|
||||
echo $OUTPUT->footer();
|
||||
return false;;
|
||||
}
|
||||
} else {
|
||||
@ -418,7 +418,7 @@ class portfolio_exporter {
|
||||
print_table($table);
|
||||
notice_yesno($strconfirm, $yesurl, $nourl);
|
||||
print_simple_box_end();
|
||||
print_footer();
|
||||
echo $OUTPUT->footer();
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -536,6 +536,7 @@ class portfolio_exporter {
|
||||
* @return boolean whether or not to process the next stage. this is important as the control function is called recursively.
|
||||
*/
|
||||
public function process_stage_finished($queued=false) {
|
||||
global $OUTPUT;
|
||||
$returnurl = $this->caller->get_return_url();
|
||||
$continueurl = $this->instance->get_continue_url();
|
||||
$extras = $this->instance->get_extra_finish_options();
|
||||
@ -559,7 +560,7 @@ class portfolio_exporter {
|
||||
echo '<a href="' . $link . '">' . $string . '</a><br />';
|
||||
}
|
||||
}
|
||||
print_footer();
|
||||
echo $OUTPUT->footer();
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -787,12 +788,12 @@ class portfolio_exporter {
|
||||
* through the usage of the backbutton
|
||||
*/
|
||||
public static function print_expired_export() {
|
||||
global $CFG;
|
||||
global $CFG, $OUTPUT;
|
||||
$title = get_string('exportexpired', 'portfolio');
|
||||
print_header($title, $title, build_navigation(get_string('exportexpired', 'portfolio')));
|
||||
notify(get_string('exportexpireddesc', 'portfolio'));
|
||||
print_continue($CFG->wwwroot);
|
||||
print_footer();
|
||||
echo $OUTPUT->footer();
|
||||
exit;
|
||||
}
|
||||
|
||||
|
@ -785,7 +785,7 @@ function init_eaccelerator() {
|
||||
* <ol>
|
||||
* <li>We will initialise $OUTPUT the first time it is used.</li>
|
||||
* <li>If, after $OUTPUT has been initialised, the script tries to change something
|
||||
* that $OUPTUT depends on, we throw an exception making it clear that the script
|
||||
* that $OUTPUT depends on, we throw an exception making it clear that the script
|
||||
* did something wrong.
|
||||
* </ol>
|
||||
*
|
||||
|
@ -116,7 +116,7 @@ print_single_button($baseurl, array('action' => 'teardown'), 'Drop test tables',
|
||||
print_single_button($baseurl, array('action' => 'test'), 'Run tests', 'get', '', false, '', $issetup != count($requiredtables));
|
||||
echo '</div>';
|
||||
|
||||
print_footer();
|
||||
echo $OUTPUT->footer();
|
||||
|
||||
function noop($context) {
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ array_pop($requiredlangs);
|
||||
foreach ($requiredlangs as $lang) {
|
||||
if (!isset($installedlangs[$lang])) {
|
||||
notify('You must install the following language packs to run these test: ' . implode(', ', $requiredlangs));
|
||||
print_footer();
|
||||
echo $OUTPUT->footer();
|
||||
die;
|
||||
}
|
||||
}
|
||||
@ -101,7 +101,7 @@ try {
|
||||
}
|
||||
}
|
||||
|
||||
print_footer();
|
||||
echo $OUTPUT->footer();
|
||||
|
||||
/**
|
||||
* plays back one of the files recored by turning on the logging option in string_manager.
|
||||
|
@ -756,7 +756,7 @@ function upgrade_finished_handler() {
|
||||
* @global object
|
||||
*/
|
||||
function upgrade_finished($continueurl=null) {
|
||||
global $CFG, $DB;
|
||||
global $CFG, $DB, $OUTPUT;
|
||||
|
||||
if (!empty($CFG->upgraderunning)) {
|
||||
unset_config('upgraderunning');
|
||||
@ -764,7 +764,7 @@ function upgrade_finished($continueurl=null) {
|
||||
ignore_user_abort(false);
|
||||
if ($continueurl) {
|
||||
print_continue($continueurl);
|
||||
print_footer();
|
||||
echo $OUTPUT->footer();
|
||||
die;
|
||||
}
|
||||
}
|
||||
|
@ -599,7 +599,7 @@ function break_up_long_words($string, $maxsize=20, $cutchar=' ') {
|
||||
* to reload the parent window before this one closes.
|
||||
*/
|
||||
function close_window($delay = 0, $reloadopener = false) {
|
||||
global $THEME, $PAGE;
|
||||
global $THEME, $PAGE, $OUTPUT;
|
||||
|
||||
if (!$PAGE->headerprinted) {
|
||||
print_header(get_string('closewindow'));
|
||||
@ -616,7 +616,7 @@ function close_window($delay = 0, $reloadopener = false) {
|
||||
|
||||
$PAGE->requires->js_function_call($function)->after_delay($delay);
|
||||
|
||||
print_footer('empty');
|
||||
echo $OUTPUT->footer();
|
||||
exit;
|
||||
}
|
||||
|
||||
@ -3063,7 +3063,7 @@ function editorshortcutshelpbutton() {
|
||||
* @return void This function simply exits
|
||||
*/
|
||||
function notice ($message, $link='', $course=NULL) {
|
||||
global $CFG, $SITE, $THEME, $COURSE, $PAGE;
|
||||
global $CFG, $SITE, $THEME, $COURSE, $PAGE, $OUTPUT;
|
||||
|
||||
$message = clean_text($message); // In case nasties are in here
|
||||
|
||||
@ -3082,11 +3082,7 @@ function notice ($message, $link='', $course=NULL) {
|
||||
print_box($message, 'generalbox', 'notice');
|
||||
print_continue($link);
|
||||
|
||||
if (empty($course)) {
|
||||
print_footer($COURSE);
|
||||
} else {
|
||||
print_footer($course);
|
||||
}
|
||||
echo $OUTPUT->footer();
|
||||
exit(1); // general error code
|
||||
}
|
||||
|
||||
@ -3282,7 +3278,7 @@ function print_maintenance_message() {
|
||||
echo $CFG->maintenance_message;
|
||||
print_box_end();
|
||||
}
|
||||
print_footer();
|
||||
echo $OUTPUT->footer();
|
||||
die;
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
print_header($strmymoodle);
|
||||
notice_yesno(get_string('noguest', 'my') . '<br /><br />' .
|
||||
get_string('liketologin'), get_login_url(), $CFG->wwwroot);
|
||||
print_footer();
|
||||
echo $OUTPUT->footer();
|
||||
die;
|
||||
}
|
||||
|
||||
@ -91,6 +91,6 @@
|
||||
echo '<br />...';
|
||||
}
|
||||
|
||||
print_footer();
|
||||
echo $OUTPUT->footer();
|
||||
|
||||
?>
|
||||
|
@ -32,6 +32,6 @@
|
||||
echo "</a> \n";
|
||||
}
|
||||
|
||||
print_footer();
|
||||
echo $OUTPUT->footer();
|
||||
|
||||
?>
|
||||
|
@ -29,6 +29,6 @@
|
||||
echo "</a> \n";
|
||||
}
|
||||
|
||||
print_footer();
|
||||
echo $OUTPUT->footer();
|
||||
|
||||
?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user