echo '<button id="comments_delete">'.get_string('delete').'</button>';
echo '<div>';
}
-admin_externalpage_print_footer();
+echo $OUTPUT->footer();
} else {
print_continue($CFG->wwwroot);
}
- print_footer();
+ echo $OUTPUT->footer();
?>
$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 {
echo '</div></form>';
}
-print_footer('empty');
+echo $OUTPUT->footer();
$optionsyes['sesskey'] = sesskey();
notice_yesno (get_string('deletecheckfiles'), 'index.php', 'index.php', $optionsyes, $optionsno, 'post', 'get');
- print_footer();
+ echo $OUTPUT->footer();
die;
}
/// UI functions /////////////////////////
function html_footer() {
+ global $OUTPUT;
echo '</td></tr></table>';
- print_footer();
+ echo $OUTPUT->footer();
}
function html_header($context, $file_info){
}
$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);
*/
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();
}
/**
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
* @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)) {
} 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;
* @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;
print_simple_box_start();
$mform->display();
print_simple_box_end();
- print_footer();
+ echo $OUTPUT->footer();
return false;;
}
} else {
print_table($table);
notice_yesno($strconfirm, $yesurl, $nourl);
print_simple_box_end();
- print_footer();
+ echo $OUTPUT->footer();
return false;
}
* @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();
echo '<a href="' . $link . '">' . $string . '</a><br />';
}
}
- print_footer();
+ echo $OUTPUT->footer();
return false;
}
* 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;
}
* <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>
*
print_single_button($baseurl, array('action' => 'test'), 'Run tests', 'get', '', false, '', $issetup != count($requiredtables));
echo '</div>';
-print_footer();
+echo $OUTPUT->footer();
function noop($context) {
}
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;
}
}
}
}
-print_footer();
+echo $OUTPUT->footer();
/**
* plays back one of the files recored by turning on the logging option in string_manager.
* @global object
*/
function upgrade_finished($continueurl=null) {
- global $CFG, $DB;
+ global $CFG, $DB, $OUTPUT;
if (!empty($CFG->upgraderunning)) {
unset_config('upgraderunning');
ignore_user_abort(false);
if ($continueurl) {
print_continue($continueurl);
- print_footer();
+ echo $OUTPUT->footer();
die;
}
}
* 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'));
$PAGE->requires->js_function_call($function)->after_delay($delay);
- print_footer('empty');
+ echo $OUTPUT->footer();
exit;
}
* @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
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
}
echo $CFG->maintenance_message;
print_box_end();
}
- print_footer();
+ echo $OUTPUT->footer();
die;
}
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;
}
echo '<br />...';
}
- print_footer();
+ echo $OUTPUT->footer();
?>
echo "</a> \n";
}
- print_footer();
+ echo $OUTPUT->footer();
?>
echo "</a> \n";
}
- print_footer();
+ echo $OUTPUT->footer();
?>