From 61ef8f9f88440fe334ec5a0b369aa0890228975a Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Wed, 31 Mar 2010 08:05:53 +0000 Subject: [PATCH] MDL-20204 removing deprecated admin headers --- admin/auth_config.php | 2 +- admin/block.php | 2 +- admin/blocks.php | 4 ++-- admin/bloglevelupgrade.php | 2 +- admin/dbtransfer/dbexport.php | 2 +- admin/dbtransfer/index.php | 4 ++-- admin/delete.php | 2 +- admin/editors.php | 2 +- admin/enrol.php | 2 +- admin/enrol_config.php | 2 +- admin/environment.php | 2 +- admin/filters.php | 6 +++--- admin/health.php | 2 +- admin/index.php | 2 +- admin/innodb.php | 2 +- admin/lang.php | 2 +- admin/langimport.php | 6 +++--- admin/localplugins.php | 4 ++-- admin/mnet/access_control.php | 2 +- admin/mnet/delete.php | 2 +- admin/mnet/enr_course_enrol.php | 2 +- admin/mnet/enr_courses.php | 2 +- admin/mnet/enr_hosts.php | 2 +- admin/mnet/index.php | 6 +++--- admin/mnet/mnet_themes.html | 2 +- admin/mnet/peers.php | 8 ++++---- admin/mnet/profilefields.php | 2 +- admin/mnet/services.php | 2 +- admin/mnet/testclient.php | 2 +- admin/mnet/trustedhosts.html | 2 +- admin/mnet/trustedhosts.php | 2 +- admin/modules.php | 4 ++-- admin/multilangupgrade.php | 2 +- admin/oacleanup.php | 2 +- admin/phpinfo.php | 2 +- admin/portfolio.php | 6 +++--- admin/qtypes.php | 6 +++--- admin/register.php | 2 +- admin/replace.php | 2 +- admin/report/backups/index.php | 2 +- admin/report/capability/index.php | 2 +- admin/report/configlog/index.php | 2 +- admin/report/courseoverview/index.php | 2 +- admin/report/questioninstances/index.php | 2 +- admin/report/security/index.php | 2 +- admin/report/spamcleaner/index.php | 2 +- admin/report/unittest/dbtest.php | 2 +- admin/report/unittest/index.php | 4 ++-- admin/repository.php | 4 ++-- admin/repositoryinstance.php | 6 +++--- admin/roles/define.php | 2 +- admin/roles/manage.php | 4 ++-- admin/search.php | 2 +- admin/timezoneimport.php | 2 +- admin/upgradesettings.php | 2 +- admin/uploadpicture.php | 2 +- admin/uploaduser.php | 6 +++--- admin/user.php | 8 ++++---- admin/user/user_bulk.php | 2 +- admin/user/user_bulk_confirm.php | 2 +- admin/user/user_bulk_delete.php | 2 +- admin/user/user_bulk_display.php | 2 +- admin/user/user_bulk_download.php | 2 +- admin/user/user_bulk_enrol.php | 2 +- admin/user/user_bulk_forcepasswordchange.php | 2 +- admin/user/user_bulk_message.php | 4 ++-- admin/webservice/service.php | 4 ++-- admin/webservice/service_functions.php | 6 +++--- admin/webservice/service_users.php | 2 +- admin/webservice/testclient.php | 6 +++--- admin/webservice/tokens.php | 4 ++-- admin/xmldb/index.php | 2 +- comment/index.php | 2 +- course/category.php | 2 +- course/index.php | 6 +++--- course/pending.php | 4 ++-- course/report/log/index.php | 4 ++-- course/report/log/indexlive.php | 2 +- course/report/stats/index.php | 2 +- enrol/mnet/allowed_courses.php | 2 +- filter/manage.php | 2 +- grade/edit/letter/edit.php | 2 +- grade/edit/outcome/edit.php | 2 +- grade/edit/outcome/import.php | 2 +- grade/edit/outcome/index.php | 2 +- grade/edit/scale/edit.php | 2 +- grade/edit/scale/index.php | 2 +- lib/adminlib.php | 3 +-- lib/deprecatedlib.php | 10 ++-------- mod/glossary/formats.php | 2 +- repository/manage_instances.php | 6 +++--- theme/index.php | 4 ++-- user/editadvanced.php | 4 ++-- user/profile/definelib.php | 4 ++-- user/profile/index.php | 6 +++--- 95 files changed, 141 insertions(+), 148 deletions(-) diff --git a/admin/auth_config.php b/admin/auth_config.php index 201ec78b522..76cad535fd2 100644 --- a/admin/auth_config.php +++ b/admin/auth_config.php @@ -55,7 +55,7 @@ $user_fields = $authplugin->userfields; $authdescription = $authplugin->get_description(); // output configuration form -admin_externalpage_print_header(); +echo $OUTPUT->header(); // choose an authentication method echo "
\n"; diff --git a/admin/block.php b/admin/block.php index b5243bde330..59938ec1fef 100644 --- a/admin/block.php +++ b/admin/block.php @@ -49,7 +49,7 @@ $strmanageblocks = get_string('manageblocks'); $strblockname = $block->get_title(); - admin_externalpage_print_header(); + echo $OUTPUT->header(); echo $OUTPUT->heading($strblockname); diff --git a/admin/blocks.php b/admin/blocks.php index a8718a6c58a..d878e49e788 100644 --- a/admin/blocks.php +++ b/admin/blocks.php @@ -44,7 +44,7 @@ } if (!empty($delete) && confirm_sesskey()) { - admin_externalpage_print_header(); + echo $OUTPUT->header(); echo $OUTPUT->heading($strmanageblocks); if (!$block = blocks_get_record($delete)) { @@ -96,7 +96,7 @@ } } - admin_externalpage_print_header(); + echo $OUTPUT->header(); echo $OUTPUT->heading($strmanageblocks); /// Main display starts here diff --git a/admin/bloglevelupgrade.php b/admin/bloglevelupgrade.php index 5b38998936f..f833c176915 100644 --- a/admin/bloglevelupgrade.php +++ b/admin/bloglevelupgrade.php @@ -12,7 +12,7 @@ $PAGE->set_pagelayout('maintenance'); $go = optional_param('go', 0, PARAM_BOOL); -admin_externalpage_print_header(); +echo $OUTPUT->header(); echo $OUTPUT->heading(get_string('bloglevelupgrade', 'admin')); $strbloglevelupgrade = get_string('bloglevelupgradeinfo', 'admin'); diff --git a/admin/dbtransfer/dbexport.php b/admin/dbtransfer/dbexport.php index 28127b4d8c1..d21a806e5bb 100644 --- a/admin/dbtransfer/dbexport.php +++ b/admin/dbtransfer/dbexport.php @@ -15,7 +15,7 @@ if ($data = $form->get_data()) { die; } -admin_externalpage_print_header(); +echo $OUTPUT->header(); // TODO: add some more info here $form->display(); echo $OUTPUT->footer(); diff --git a/admin/dbtransfer/index.php b/admin/dbtransfer/index.php index a3d61545e36..0d24d15778b 100644 --- a/admin/dbtransfer/index.php +++ b/admin/dbtransfer/index.php @@ -23,7 +23,7 @@ if ($data = $form->get_data()) { } // Start output. - admin_externalpage_print_header(); + echo $OUTPUT->header(); $data->dbtype = $dbtype; echo $OUTPUT->heading(get_string('transferringdbto', 'dbtransfer', $data)); @@ -40,7 +40,7 @@ if ($data = $form->get_data()) { } // Otherwise display the settings form. -admin_externalpage_print_header(); +echo $OUTPUT->header(); echo $OUTPUT->heading(get_string('transferdbtoserver', 'dbtransfer')); echo '

', get_string('transferdbintro', 'dbtransfer'), "

\n\n"; $form->display(); diff --git a/admin/delete.php b/admin/delete.php index 090ecf490c7..9ffc222e96c 100644 --- a/admin/delete.php +++ b/admin/delete.php @@ -17,7 +17,7 @@ $deletedir = $CFG->dataroot; // The directory to delete! - admin_externalpage_print_header(); + echo $OUTPUT->header(); echo $OUTPUT->heading('Purge moodledata'); if (empty($sure)) { diff --git a/admin/editors.php b/admin/editors.php index db068ac76db..30b8b823ede 100644 --- a/admin/editors.php +++ b/admin/editors.php @@ -108,7 +108,7 @@ switch ($action) { } $form->set_data($data); $PAGE->set_pagetype('admin-editors-' . $editor); - admin_externalpage_print_header(); + echo $OUTPUT->header(); echo $OUTPUT->heading(get_string('modulename', 'editor_'.$editor)); $OUTPUT->box_start(); $form->display(); diff --git a/admin/enrol.php b/admin/enrol.php index 63f655aa28c..0bd4866c760 100644 --- a/admin/enrol.php +++ b/admin/enrol.php @@ -49,7 +49,7 @@ $str = get_strings(array('enrolmentplugins', 'users', 'administration', 'settings', 'edit')); - admin_externalpage_print_header(); + echo $OUTPUT->header(); $modules = get_plugin_list('enrol'); $options = array(); diff --git a/admin/enrol_config.php b/admin/enrol_config.php index 2ad5c8f99d9..cf8e60aee7b 100644 --- a/admin/enrol_config.php +++ b/admin/enrol_config.php @@ -40,7 +40,7 @@ } asort($options); - admin_externalpage_print_header(); + echo $OUTPUT->header(); echo ""; echo "
"; diff --git a/admin/environment.php b/admin/environment.php index 4c7222b2f23..8042d943906 100644 --- a/admin/environment.php +++ b/admin/environment.php @@ -52,7 +52,7 @@ $strmisc = get_string('miscellaneous'); /// Print the header stuff - admin_externalpage_print_header(); + echo $OUTPUT->header(); /// Print the component download link echo ''; diff --git a/admin/filters.php b/admin/filters.php index aa7f4c6d53f..27e41d253ed 100644 --- a/admin/filters.php +++ b/admin/filters.php @@ -118,7 +118,7 @@ // If not yet confirmed, display a confirmation message. if (!optional_param('confirm', '', PARAM_BOOL)) { $title = get_string('deletefilterareyousure', 'admin', $filtername); - admin_externalpage_print_header(); + echo $OUTPUT->header(); echo $OUTPUT->heading($title); $linkcontinue = new moodle_url($returnurl, array('action' => 'delete', 'filterpath' => $filterpath, 'confirm' => 1)); @@ -130,7 +130,7 @@ // Do the deletion. $title = get_string('deletingfilter', 'admin', $filtername); - admin_externalpage_print_header(); + echo $OUTPUT->header(); echo $OUTPUT->heading($title); // Delete all data for this plugin. @@ -159,7 +159,7 @@ /// End of process actions ===================================================== /// Print the page heading. - admin_externalpage_print_header(); + echo $OUTPUT->header(); echo $OUTPUT->heading(get_string('filtersettings', 'admin')); $activechoices = array( diff --git a/admin/health.php b/admin/health.php index 77d1471ce6a..7dc9817f62b 100644 --- a/admin/health.php +++ b/admin/health.php @@ -28,7 +28,7 @@ $site = get_site(); - admin_externalpage_print_header(); + echo $OUTPUT->header(); echo << diff --git a/admin/index.php b/admin/index.php index 6e02c92592b..ecadd64f199 100644 --- a/admin/index.php +++ b/admin/index.php @@ -355,7 +355,7 @@ if (any_new_admin_settings($adminroot)){ // Print default admin page with notifications. admin_externalpage_setup('adminnotifications'); -admin_externalpage_print_header(); +echo $OUTPUT->header(); if ($insecuredataroot == INSECURE_DATAROOT_WARNING) { echo $OUTPUT->box(get_string('datarootsecuritywarning', 'admin', $CFG->dataroot), 'generalbox adminwarning'); diff --git a/admin/innodb.php b/admin/innodb.php index 5715641c5dc..a26c23f0b81 100644 --- a/admin/innodb.php +++ b/admin/innodb.php @@ -11,7 +11,7 @@ require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM)); - admin_externalpage_print_header(); + echo $OUTPUT->header(); echo $OUTPUT->heading('Convert all MySQL tables from MYISAM to InnoDB'); if ($DB->get_dbfamily() != 'mysql') { diff --git a/admin/lang.php b/admin/lang.php index 4edaee5bd4e..6f355ea2754 100644 --- a/admin/lang.php +++ b/admin/lang.php @@ -101,7 +101,7 @@ break; } - admin_externalpage_print_header(); + echo $OUTPUT->header(); // Prepare and render menu tabs $firstrow = array(); diff --git a/admin/langimport.php b/admin/langimport.php index d7fef7508a3..e4f5141e425 100755 --- a/admin/langimport.php +++ b/admin/langimport.php @@ -12,7 +12,7 @@ admin_externalpage_setup('langimport'); if (!empty($CFG->skiplangupgrade)) { - admin_externalpage_print_header(); + echo $OUTPUT->header(); echo $OUTPUT->box(get_string('langimportdisabled', 'admin')); echo $OUTPUT->footer(); die; @@ -103,7 +103,7 @@ $notice_error[] = 'en_utf8 can not be uninstalled!'; } else if (!$confirm && confirm_sesskey()) { - admin_externalpage_print_header(); + echo $OUTPUT->header(); echo $OUTPUT->confirm(get_string('uninstallconfirm', 'admin', $uninstalllang), 'langimport.php?mode='.DELETION_OF_SELECTED_LANG.'&uninstalllang='.$uninstalllang.'&confirm=1', 'langimport.php'); @@ -241,7 +241,7 @@ } //close of main switch - admin_externalpage_print_header(); + echo $OUTPUT->header(); $installedlangs = get_list_of_languages(true, true); diff --git a/admin/localplugins.php b/admin/localplugins.php index 022dcc68ce5..10b994e7ece 100644 --- a/admin/localplugins.php +++ b/admin/localplugins.php @@ -39,7 +39,7 @@ $confirm = optional_param('confirm', '', PARAM_BOOL); /// If data submitted, then process and store. if (!empty($delete) and confirm_sesskey()) { - admin_externalpage_print_header(); + echo $OUTPUT->header(); echo $OUTPUT->heading(get_string('localplugins')); if (!$confirm) { @@ -62,7 +62,7 @@ if (!empty($delete) and confirm_sesskey()) { } } -admin_externalpage_print_header(); +echo $OUTPUT->header(); echo $OUTPUT->heading(get_string('localplugins')); /// Print the table of all installed local plugins diff --git a/admin/mnet/access_control.php b/admin/mnet/access_control.php index 353e43dac74..7ad5294faf6 100644 --- a/admin/mnet/access_control.php +++ b/admin/mnet/access_control.php @@ -16,7 +16,7 @@ require_login(); admin_externalpage_setup('ssoaccesscontrol'); -admin_externalpage_print_header(); +echo $OUTPUT->header(); if (!extension_loaded('openssl')) { print_error('requiresopenssl', 'mnet'); diff --git a/admin/mnet/delete.php b/admin/mnet/delete.php index c83813c343b..a891c552c98 100644 --- a/admin/mnet/delete.php +++ b/admin/mnet/delete.php @@ -49,7 +49,7 @@ $mnet_peer = new mnet_peer(); $mnet_peer->set_id($hostid); if ('verify' == $step) { - admin_externalpage_print_header(); + echo $OUTPUT->header(); echo $OUTPUT->heading(get_string('deleteaserver', 'mnet')); if ($mnet_peer->count_live_sessions() > 0) { echo $OUTPUT->notification(get_string('usersareonline', 'mnet', $live_users)); diff --git a/admin/mnet/enr_course_enrol.php b/admin/mnet/enr_course_enrol.php index b595f1068ce..6cea4621f12 100644 --- a/admin/mnet/enr_course_enrol.php +++ b/admin/mnet/enr_course_enrol.php @@ -291,7 +291,7 @@ $strshowall = get_string('showall'); $strparticipants = get_string('participants'); $strsearchresults = get_string('searchresults'); -admin_externalpage_print_header(); +echo $OUTPUT->header(); echo $OUTPUT->box('' . s($mnet_peer->name) . ' : ' . format_string($course->shortname) .' '. format_string($course->fullname) diff --git a/admin/mnet/enr_courses.php b/admin/mnet/enr_courses.php index 24071de6c9b..cee043ede11 100644 --- a/admin/mnet/enr_courses.php +++ b/admin/mnet/enr_courses.php @@ -23,7 +23,7 @@ /// Print the page - admin_externalpage_print_header(); + echo $OUTPUT->header(); echo $OUTPUT->box('' . s($host->name) . '
' . get_string("enrolcourses_desc", "mnet")); diff --git a/admin/mnet/enr_hosts.php b/admin/mnet/enr_hosts.php index 539340c6615..ae964f5551e 100644 --- a/admin/mnet/enr_hosts.php +++ b/admin/mnet/enr_hosts.php @@ -16,7 +16,7 @@ /// get language strings - admin_externalpage_print_header(); + echo $OUTPUT->header(); echo $OUTPUT->box(get_string("remoteenrolhosts_desc", "mnet")); diff --git a/admin/mnet/index.php b/admin/mnet/index.php index 83aff87633c..a54aefccc41 100644 --- a/admin/mnet/index.php +++ b/admin/mnet/index.php @@ -17,13 +17,13 @@ $mnet = get_mnet_environment(); if (!extension_loaded('openssl')) { - admin_externalpage_print_header(); + echo $OUTPUT->header(); set_config('mnet_dispatcher_mode', 'off'); print_error('requiresopenssl', 'mnet'); } if (!function_exists('curl_init') ) { - admin_externalpage_print_header(); + echo $OUTPUT->header(); set_config('mnet_dispatcher_mode', 'off'); print_error('nocurl', 'mnet'); } @@ -82,7 +82,7 @@ } $hosts = $DB->get_records_select('mnet_host', "id <> ? AND deleted = 0", array($CFG->mnet_localhost_id), 'wwwroot ASC'); - admin_externalpage_print_header(); + echo $OUTPUT->header(); ?>
diff --git a/admin/mnet/mnet_themes.html b/admin/mnet/mnet_themes.html index 88555e668c3..11701645594 100644 --- a/admin/mnet/mnet_themes.html +++ b/admin/mnet/mnet_themes.html @@ -2,7 +2,7 @@ //TODO: this code needs to be redesigned, see MDL-21137 -admin_externalpage_print_header(); +echo $OUTPUT->header(); echo $OUTPUT->heading(get_string('themes')); $original_theme = fullclone($THEME); $currenttab = 'mnetthemes'; diff --git a/admin/mnet/peers.php b/admin/mnet/peers.php index 25db689b929..c799159347d 100644 --- a/admin/mnet/peers.php +++ b/admin/mnet/peers.php @@ -94,7 +94,7 @@ if ($formdata = $simpleform->get_data()) { $reviewform = new mnet_review_host_form(null, array('peer' => $mnet_peer)); // the second step (also the edit host form) $formdata->oldpublickey = $mnet_peer->public_key; // set this so we can confirm on form post without having to recreate the mnet_peer object $reviewform->set_data($mnet_peer); - admin_externalpage_print_header(); + echo $OUTPUT->header(); echo $OUTPUT->box_start(); $reviewform->display(); echo $OUTPUT->box_end(); @@ -108,7 +108,7 @@ if ($formdata = $simpleform->get_data()) { if (!empty($hostid)) { // TODO print a nice little heading $mnet_peer->set_id($hostid); - admin_externalpage_print_header(); + echo $OUTPUT->header(); $currenttab = 'mnetdetails'; require_once($CFG->dirroot . '/admin/mnet/tabs.php'); @@ -178,7 +178,7 @@ if ($formdata = $reviewform->get_data()) { print_error('invalidaction', 'error', 'index.php'); } } else if ($reviewform->is_submitted()) { // submitted, but errors - admin_externalpage_print_header(); + echo $OUTPUT->header(); echo $OUTPUT->box_start(); $reviewform->display(); echo $OUTPUT->box_end(); @@ -188,7 +188,7 @@ if ($formdata = $reviewform->get_data()) { // normal flow - just display all hosts with links -admin_externalpage_print_header(); +echo $OUTPUT->header(); $hosts = mnet_get_hosts(); // print the table to display the register all hosts setting diff --git a/admin/mnet/profilefields.php b/admin/mnet/profilefields.php index 07fc5920c13..e672459b100 100644 --- a/admin/mnet/profilefields.php +++ b/admin/mnet/profilefields.php @@ -63,7 +63,7 @@ if ($data = $form->get_data()) { redirect(new moodle_url('/admin/mnet/peers.php', array('hostid' => $hostid))); } -admin_externalpage_print_header(); +echo $OUTPUT->header(); $currenttab = 'mnetprofilefields'; require_once('tabs.php'); diff --git a/admin/mnet/services.php b/admin/mnet/services.php index a053e659380..0e6dcb57e5e 100644 --- a/admin/mnet/services.php +++ b/admin/mnet/services.php @@ -79,7 +79,7 @@ if ($formdata = $mform->get_data()) { redirect($redirecturl, get_string('changessaved')); } -admin_externalpage_print_header(); +echo $OUTPUT->header(); $currenttab = 'mnetservices'; require_once($CFG->dirroot . '/admin/mnet/tabs.php'); echo $OUTPUT->box_start(); diff --git a/admin/mnet/testclient.php b/admin/mnet/testclient.php index 91f10bb4453..82331c6e8d0 100644 --- a/admin/mnet/testclient.php +++ b/admin/mnet/testclient.php @@ -27,7 +27,7 @@ require_capability('moodle/site:config', $context); error_reporting(E_ALL); -admin_externalpage_print_header(); +echo $OUTPUT->header(); if (!extension_loaded('openssl')) { print_error('requiresopenssl', 'mnet', '', NULL, true); } diff --git a/admin/mnet/trustedhosts.html b/admin/mnet/trustedhosts.html index 3cf6032b8f3..e48a3d3b542 100644 --- a/admin/mnet/trustedhosts.html +++ b/admin/mnet/trustedhosts.html @@ -1,5 +1,5 @@ header(); ?>
diff --git a/admin/mnet/trustedhosts.php b/admin/mnet/trustedhosts.php index df80fe0ed57..8f0bef15fdf 100644 --- a/admin/mnet/trustedhosts.php +++ b/admin/mnet/trustedhosts.php @@ -13,7 +13,7 @@ require_capability('moodle/site:config', $context, $USER->id, true, "nopermissions"); if (!extension_loaded('openssl')) { - admin_externalpage_print_header(); + echo $OUTPUT->header(); print_error('requiresopenssl', 'mnet', '', NULL, true); } diff --git a/admin/modules.php b/admin/modules.php index 6642d96434c..5b07d2ba075 100644 --- a/admin/modules.php +++ b/admin/modules.php @@ -71,7 +71,7 @@ } if (!empty($delete) and confirm_sesskey()) { - admin_externalpage_print_header(); + echo $OUTPUT->header(); echo $OUTPUT->heading($stractivities); $strmodulename = get_string("modulename", "$delete"); @@ -97,7 +97,7 @@ } } - admin_externalpage_print_header(); + echo $OUTPUT->header(); echo $OUTPUT->heading($stractivities); /// Get and sort the existing modules diff --git a/admin/multilangupgrade.php b/admin/multilangupgrade.php index bb1e958a4f4..453e68227d4 100644 --- a/admin/multilangupgrade.php +++ b/admin/multilangupgrade.php @@ -10,7 +10,7 @@ admin_externalpage_setup('multilangupgrade'); $go = optional_param('go', 0, PARAM_BOOL); ################################################################### -admin_externalpage_print_header(); +echo $OUTPUT->header(); echo $OUTPUT->heading(get_string('multilangupgrade', 'admin')); diff --git a/admin/oacleanup.php b/admin/oacleanup.php index d05b18f13f4..12a1e4413d6 100644 --- a/admin/oacleanup.php +++ b/admin/oacleanup.php @@ -7,7 +7,7 @@ if (!isset($CFG)) { admin_externalpage_setup('oacleanup'); - admin_externalpage_print_header(); + echo $OUTPUT->header(); online_assignment_cleanup(true); echo $OUTPUT->footer(); diff --git a/admin/phpinfo.php b/admin/phpinfo.php index 447fe529e26..6b0ffa050c9 100644 --- a/admin/phpinfo.php +++ b/admin/phpinfo.php @@ -6,7 +6,7 @@ admin_externalpage_setup('phpinfo'); - admin_externalpage_print_header(); + echo $OUTPUT->header(); echo '
'; diff --git a/admin/portfolio.php b/admin/portfolio.php index fc6c5e1a981..5a9fceb3099 100644 --- a/admin/portfolio.php +++ b/admin/portfolio.php @@ -60,12 +60,12 @@ if (!empty($edit) || !empty($new)) { portfolio_static_function($plugin, 'create_instance', $plugin, $fromform->name, $fromform); } $savedstr = get_string('instancesaved', 'portfolio'); - admin_externalpage_print_header(); + echo $OUTPUT->header(); echo $OUTPUT->heading($savedstr); redirect($baseurl, $savedstr, 3); exit; } else { - admin_externalpage_print_header(); + echo $OUTPUT->header(); echo $OUTPUT->heading(get_string('configplugin', 'portfolio')); echo $OUTPUT->box_start(); $mform->display(); @@ -85,7 +85,7 @@ if (!empty($edit) || !empty($new)) { $instance->save(); $return = true; } else if (!empty($delete)) { - admin_externalpage_print_header(); + echo $OUTPUT->header(); $instance = portfolio_instance($delete); if ($sure) { if (!confirm_sesskey()) { diff --git a/admin/qtypes.php b/admin/qtypes.php index be03869b264..553654022da 100644 --- a/admin/qtypes.php +++ b/admin/qtypes.php @@ -120,7 +120,7 @@ // If not yet confirmed, display a confirmation message. if (!optional_param('confirm', '', PARAM_BOOL)) { $qtypename = $QTYPES[$delete]->local_name(); - admin_externalpage_print_header(); + echo $OUTPUT->header(); echo $OUTPUT->heading(get_string('deleteqtypeareyousure', 'admin', $qtypename)); echo $OUTPUT->confirm(get_string('deleteqtypeareyousuremessage', 'admin', $qtypename), admin_url('qtypes.php?delete=' . $delete . '&confirm=1'), @@ -130,7 +130,7 @@ } // Do the deletion. - admin_externalpage_print_header(); + echo $OUTPUT->header(); echo $OUTPUT->heading(get_string('deletingqtype', 'admin', $qtypename)); // Delete any configuration records. @@ -157,7 +157,7 @@ // End of process actions ================================================== /// Print the page heading. - admin_externalpage_print_header(); + echo $OUTPUT->header(); echo $OUTPUT->heading(get_string('manageqtypes', 'admin')); /// Set up the table. diff --git a/admin/register.php b/admin/register.php index c4bcdb30567..d90140d53d0 100644 --- a/admin/register.php +++ b/admin/register.php @@ -22,7 +22,7 @@ } /// Print the header stuff - admin_externalpage_print_header(); + echo $OUTPUT->header(); /// Print headings $stradministration = get_string("administration"); diff --git a/admin/replace.php b/admin/replace.php index 6e090513eff..37b67c0ceb5 100644 --- a/admin/replace.php +++ b/admin/replace.php @@ -16,7 +16,7 @@ $search = optional_param('search', '', PARAM_RAW); $replace = optional_param('replace', '', PARAM_RAW); ################################################################### -admin_externalpage_print_header(); +echo $OUTPUT->header(); echo $OUTPUT->heading('Search and replace text throughout the whole database'); diff --git a/admin/report/backups/index.php b/admin/report/backups/index.php index d8bb4b2dddf..5a425d1aa70 100644 --- a/admin/report/backups/index.php +++ b/admin/report/backups/index.php @@ -8,7 +8,7 @@ $courseid = optional_param('courseid', 0, PARAM_INT); admin_externalpage_setup('reportbackups'); - admin_externalpage_print_header(); + echo $OUTPUT->header(); /// Scheduled backups are disabled by the server admin if (!empty($CFG->disablescheduledbackups)) { diff --git a/admin/report/capability/index.php b/admin/report/capability/index.php index d9171da82fb..a3d08520ee6 100644 --- a/admin/report/capability/index.php +++ b/admin/report/capability/index.php @@ -45,7 +45,7 @@ add_to_log(SITEID, "admin", "report capability", "report/capability/index.php?ca // Print the header. admin_externalpage_setup('reportcapability'); -admin_externalpage_print_header(); +echo $OUTPUT->header(); // Prepare the list of capabilites to choose from $allcapabilities = fetch_context_capabilities($systemcontext); diff --git a/admin/report/configlog/index.php b/admin/report/configlog/index.php index b5929bd4357..fed4891fa73 100644 --- a/admin/report/configlog/index.php +++ b/admin/report/configlog/index.php @@ -10,7 +10,7 @@ $sort = optional_param('sort', 'timemodified', PARAM_ALPHA); $dir = optional_param('dir', 'DESC', PARAM_ALPHA); admin_externalpage_setup('reportconfiglog'); -admin_externalpage_print_header(); +echo $OUTPUT->header(); echo $OUTPUT->heading(get_string('configlog', 'report_configlog')); diff --git a/admin/report/courseoverview/index.php b/admin/report/courseoverview/index.php index bfaabc6eef2..74c6d2400ce 100644 --- a/admin/report/courseoverview/index.php +++ b/admin/report/courseoverview/index.php @@ -9,7 +9,7 @@ $numcourses = optional_param('numcourses', 20, PARAM_INT); admin_externalpage_setup('reportcourseoverview'); - admin_externalpage_print_header(); + echo $OUTPUT->header(); if (empty($CFG->enablestats)) { if (has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM))) { diff --git a/admin/report/questioninstances/index.php b/admin/report/questioninstances/index.php index 3176a9892d4..6a206ebabe7 100644 --- a/admin/report/questioninstances/index.php +++ b/admin/report/questioninstances/index.php @@ -16,7 +16,7 @@ $requestedqtype = optional_param('qtype', '', PARAM_SAFEDIR); // Print the header & check permissions. admin_externalpage_setup('reportquestioninstances'); -admin_externalpage_print_header(); +echo $OUTPUT->header(); // Log. add_to_log(SITEID, "admin", "report questioninstances", "report/questioninstances/index.php?qtype=$requestedqtype", $requestedqtype); diff --git a/admin/report/security/index.php b/admin/report/security/index.php index 48ea8ad87c3..8a5d0887597 100644 --- a/admin/report/security/index.php +++ b/admin/report/security/index.php @@ -44,7 +44,7 @@ if (array_search($issue, $issues, true) === false) { // Print the header. admin_externalpage_setup('reportsecurity'); -admin_externalpage_print_header(); +echo $OUTPUT->header(); echo $OUTPUT->heading(get_string('reportsecurity', 'report_security')); diff --git a/admin/report/spamcleaner/index.php b/admin/report/spamcleaner/index.php index c221006d697..37815460e35 100755 --- a/admin/report/spamcleaner/index.php +++ b/admin/report/spamcleaner/index.php @@ -83,7 +83,7 @@ $PAGE->requires->js_init_call('M.report_spamcleaner.init', array(me()), true); $strings = Array('spaminvalidresult','spamdeleteallconfirm','spamcannotdelete','spamdeleteconfirm'); $PAGE->requires->strings_for_js($strings, 'report_spamcleaner'); -admin_externalpage_print_header(); +echo $OUTPUT->header(); // Print headers and things echo $OUTPUT->box(get_string('spamcleanerintro', 'report_spamcleaner')); diff --git a/admin/report/unittest/dbtest.php b/admin/report/unittest/dbtest.php index bdbda725900..cb5ad53c3a9 100644 --- a/admin/report/unittest/dbtest.php +++ b/admin/report/unittest/dbtest.php @@ -17,7 +17,7 @@ $selected = optional_param('selected', array(), PARAM_INT); // Print the header and check access. admin_externalpage_setup('reportdbtest'); -admin_externalpage_print_header(); +echo $OUTPUT->header(); global $UNITTEST; $UNITTEST = new object(); diff --git a/admin/report/unittest/index.php b/admin/report/unittest/index.php index f64a9ec6839..335e2e6a9f5 100644 --- a/admin/report/unittest/index.php +++ b/admin/report/unittest/index.php @@ -40,7 +40,7 @@ if (!is_null($path)) { // Turn off xmlstrictheaders during the unit test run. $origxmlstrictheaders = !empty($CFG->xmlstrictheaders); $CFG->xmlstrictheaders = false; - admin_externalpage_print_header(); + echo $OUTPUT->header(); $CFG->xmlstrictheaders = $origxmlstrictheaders; unset($origxmlstrictheaders); @@ -94,7 +94,7 @@ if (!is_null($path)) { $formheader = get_string('retest', 'simpletest'); } else { $displaypath = ''; - admin_externalpage_print_header(); + echo $OUTPUT->header(); $formheader = get_string('rununittests', 'simpletest'); } // Print the form for adjusting options. diff --git a/admin/repository.php b/admin/repository.php index da5d19e0a72..dbbd0a3f80e 100644 --- a/admin/repository.php +++ b/admin/repository.php @@ -113,7 +113,7 @@ if (!empty($edit) || !empty($new)) { } exit; } else { - admin_externalpage_print_header(); + echo $OUTPUT->header(); echo $OUTPUT->heading(get_string('configplugin', 'repository_'.$plugin)); $displaysettingform = true; if ($edit) { @@ -164,7 +164,7 @@ if (!empty($edit) || !empty($new)) { } exit; } else { - admin_externalpage_print_header(); + echo $OUTPUT->header(); echo $OUTPUT->confirm(get_string('confirmremove', 'repository', $repositorytype->get_readablename()), $sesskeyurl . '&delete=' . $delete . '&sure=yes', $baseurl); $return = false; } diff --git a/admin/repositoryinstance.php b/admin/repositoryinstance.php index f0d999c6473..68383463702 100644 --- a/admin/repositoryinstance.php +++ b/admin/repositoryinstance.php @@ -79,7 +79,7 @@ if (!empty($edit) || !empty($new)) { } if ($success) { $savedstr = get_string('configsaved', 'repository'); - admin_externalpage_print_header(); + echo $OUTPUT->header(); echo $OUTPUT->heading($savedstr); redirect($baseurl, $savedstr, 3); } else { @@ -87,7 +87,7 @@ if (!empty($edit) || !empty($new)) { } exit; } else { - admin_externalpage_print_header(); + echo $OUTPUT->header(); echo $OUTPUT->heading(get_string('configplugin', 'repository_'.$plugin)); echo $OUTPUT->box_start(); $mform->display(); @@ -102,7 +102,7 @@ if (!empty($edit) || !empty($new)) { $instance->hide(); $return = true; } else if (!empty($delete)) { - admin_externalpage_print_header(); + echo $OUTPUT->header(); $instance = repository::get_instance($delete); //if you try to delete an instance set as readonly, display an error message if ($instance->readonly) { diff --git a/admin/roles/define.php b/admin/roles/define.php index 9e6e2194b2b..617d740453a 100755 --- a/admin/roles/define.php +++ b/admin/roles/define.php @@ -100,7 +100,7 @@ } /// Print the page header and tabs. - admin_externalpage_print_header(); + echo $OUTPUT->header(); $currenttab = 'manage'; include('managetabs.php'); diff --git a/admin/roles/manage.php b/admin/roles/manage.php index f09efb5ee14..f0a77888db9 100755 --- a/admin/roles/manage.php +++ b/admin/roles/manage.php @@ -71,7 +71,7 @@ } if (!$confirmed) { // show confirmation - admin_externalpage_print_header(); + echo $OUTPUT->header(); $optionsyes = array('action'=>'delete', 'roleid'=>$roleid, 'sesskey'=>sesskey(), 'confirm'=>1); $a = new object(); $a->id = $roleid; @@ -148,7 +148,7 @@ } if (!$confirmed) { // show confirmation - admin_externalpage_print_header(); + echo $OUTPUT->header(); $optionsyes = array('action'=>'reset', 'roleid'=>$roleid, 'sesskey'=>sesskey(), 'confirm'=>1); $optionsno = array('action'=>'view', 'roleid'=>$roleid); $a = new object(); diff --git a/admin/search.php b/admin/search.php index 57bd730f38c..55d93c070af 100644 --- a/admin/search.php +++ b/admin/search.php @@ -34,7 +34,7 @@ if ($data = data_submitted() and confirm_sesskey()) { // and finally, if we get here, then there are matching settings and we have to print a form // to modify them -admin_externalpage_print_header($focus); +echo $OUTPUT->header($focus); if ($errormsg !== '') { echo $OUTPUT->notification($errormsg); diff --git a/admin/timezoneimport.php b/admin/timezoneimport.php index b61c68140c4..a09f17d5330 100644 --- a/admin/timezoneimport.php +++ b/admin/timezoneimport.php @@ -16,7 +16,7 @@ $strimporttimezones = get_string('importtimezones', 'admin'); - admin_externalpage_print_header(); + echo $OUTPUT->header(); echo $OUTPUT->heading($strimporttimezones); diff --git a/admin/upgradesettings.php b/admin/upgradesettings.php index d5100faf888..c87a5ddce57 100644 --- a/admin/upgradesettings.php +++ b/admin/upgradesettings.php @@ -47,7 +47,7 @@ if (!empty($adminroot->errors)) { // and finally, if we get here, then there are new settings and we have to print a form // to modify them -admin_externalpage_print_header($focus); +echo $OUTPUT->header($focus); if (!empty($SITE->fullname) and !empty($SITE->shortname)) { echo $OUTPUT->box(get_string('upgradesettingsintro','admin'), 'generalbox'); diff --git a/admin/uploadpicture.php b/admin/uploadpicture.php index fc06a3897d0..9d32896360a 100644 --- a/admin/uploadpicture.php +++ b/admin/uploadpicture.php @@ -56,7 +56,7 @@ $userfield = optional_param('userfield', 0, PARAM_INT); $overwritepicture = optional_param('overwritepicture', 0, PARAM_BOOL); /// Print the header -admin_externalpage_print_header(); +echo $OUTPUT->header(); echo $OUTPUT->heading_with_help($struploadpictures, 'uploadpictures'); diff --git a/admin/uploaduser.php b/admin/uploaduser.php index 39669f9bbf2..71b48b0b0e8 100755 --- a/admin/uploaduser.php +++ b/admin/uploaduser.php @@ -111,7 +111,7 @@ if (empty($iid)) { // continue to form2 } else { - admin_externalpage_print_header(); + echo $OUTPUT->header(); echo $OUTPUT->heading_with_help(get_string('uploadusers'), 'uploadusers3'); @@ -137,7 +137,7 @@ if ($formdata = $mform->is_cancelled()) { } else if ($formdata = $mform->get_data()) { // Print the header - admin_externalpage_print_header(); + echo $OUTPUT->header(); echo $OUTPUT->heading(get_string('uploadusersresult', 'admin')); $optype = $formdata->uutype; @@ -755,7 +755,7 @@ if ($formdata = $mform->is_cancelled()) { } // Print the header -admin_externalpage_print_header(); +echo $OUTPUT->header(); /// Print the form diff --git a/admin/user.php b/admin/user.php index 47e7fe47398..e1fc1888db9 100644 --- a/admin/user.php +++ b/admin/user.php @@ -50,7 +50,7 @@ if ($result == AUTH_CONFIRM_OK or $result == AUTH_CONFIRM_ALREADY) { redirect($returnurl); } else { - admin_externalpage_print_header(); + echo $OUTPUT->header(); redirect($returnurl, get_string('usernotconfirmed', '', fullname($user, true))); } @@ -69,7 +69,7 @@ } if ($confirm != md5($delete)) { - admin_externalpage_print_header(); + echo $OUTPUT->header(); $fullname = fullname($user, true); echo $OUTPUT->heading(get_string('deleteuser', 'admin')); $optionsyes = array('delete'=>$delete, 'confirm'=>md5($delete), 'sesskey'=>sesskey()); @@ -82,7 +82,7 @@ redirect($returnurl); } else { session_gc(); // remove stale sessions - admin_externalpage_print_header(); + echo $OUTPUT->header(); echo $OUTPUT->notification($returnurl, get_string('deletednot', '', fullname($user, true))); } } @@ -118,7 +118,7 @@ // create the user filter form $ufiltering = new user_filtering(); - admin_externalpage_print_header(); + echo $OUTPUT->header(); // Carry on with the user listing diff --git a/admin/user/user_bulk.php b/admin/user/user_bulk.php index e4146268558..557d2f4cdd2 100755 --- a/admin/user/user_bulk.php +++ b/admin/user/user_bulk.php @@ -74,7 +74,7 @@ if ($data = $user_bulk_form->get_data()) { $user_bulk_form = new user_bulk_form(null, get_selection_data($ufiltering)); } // do output -admin_externalpage_print_header(); +echo $OUTPUT->header(); $ufiltering->display_add(); $ufiltering->display_active(); diff --git a/admin/user/user_bulk_confirm.php b/admin/user/user_bulk_confirm.php index a129b859539..4f538a90088 100755 --- a/admin/user/user_bulk_confirm.php +++ b/admin/user/user_bulk_confirm.php @@ -18,7 +18,7 @@ if (empty($SESSION->bulk_users)) { redirect($return); } -admin_externalpage_print_header(); +echo $OUTPUT->header(); //TODO: add support for large number of users diff --git a/admin/user/user_bulk_delete.php b/admin/user/user_bulk_delete.php index a30b3fe179c..50fa276b03b 100755 --- a/admin/user/user_bulk_delete.php +++ b/admin/user/user_bulk_delete.php @@ -18,7 +18,7 @@ if (empty($SESSION->bulk_users)) { redirect($return); } -admin_externalpage_print_header(); +echo $OUTPUT->header(); //TODO: add support for large number of users diff --git a/admin/user/user_bulk_display.php b/admin/user/user_bulk_display.php index f7383a29be3..b3648019eda 100755 --- a/admin/user/user_bulk_display.php +++ b/admin/user/user_bulk_display.php @@ -20,7 +20,7 @@ $usercount = count($users); $strnever = get_string('never'); -admin_externalpage_print_header(); +echo $OUTPUT->header(); $countries = get_list_of_countries(); diff --git a/admin/user/user_bulk_download.php b/admin/user/user_bulk_download.php index 1e24fbc363e..4115454195c 100755 --- a/admin/user/user_bulk_download.php +++ b/admin/user/user_bulk_download.php @@ -53,7 +53,7 @@ if ($format) { die; } -admin_externalpage_print_header(); +echo $OUTPUT->header(); echo $OUTPUT->heading(get_string('download', 'admin')); echo $OUTPUT->box_start(); diff --git a/admin/user/user_bulk_enrol.php b/admin/user/user_bulk_enrol.php index 0d6cf650693..4b99ef87e9a 100644 --- a/admin/user/user_bulk_enrol.php +++ b/admin/user/user_bulk_enrol.php @@ -20,7 +20,7 @@ $users = $SESSION->bulk_users; //Get users to display $usertotal = get_users(false); //Total number of users registered $usercount = count($users); //number of users -admin_externalpage_print_header(); +echo $OUTPUT->header(); //take user info foreach ($users as $key => $id) { diff --git a/admin/user/user_bulk_forcepasswordchange.php b/admin/user/user_bulk_forcepasswordchange.php index 9af2050b6cc..c47b44e001a 100644 --- a/admin/user/user_bulk_forcepasswordchange.php +++ b/admin/user/user_bulk_forcepasswordchange.php @@ -19,7 +19,7 @@ if (empty($SESSION->bulk_users)) { redirect($return); } -admin_externalpage_print_header(); +echo $OUTPUT->header(); if ($confirm and confirm_sesskey()) { // only force password change if user may actually change the password diff --git a/admin/user/user_bulk_message.php b/admin/user/user_bulk_message.php index cd2e2e4e58e..a739a01e3ca 100755 --- a/admin/user/user_bulk_message.php +++ b/admin/user/user_bulk_message.php @@ -55,7 +55,7 @@ if ($msgform->is_cancelled()) { list($in, $params) = $DB->get_in_or_equal($SESSION->bulk_users); $userlist = $DB->get_records_select_menu('user', "id $in", $params, 'fullname', 'id,'.$DB->sql_fullname().' AS fullname'); $usernames = implode(', ', $userlist); - admin_externalpage_print_header(); + echo $OUTPUT->header(); echo $OUTPUT->heading(get_string('confirmation', 'admin')); echo $OUTPUT->box($msg, 'boxwidthnarrow boxaligncenter generalbox', 'preview'); @@ -66,6 +66,6 @@ if ($msgform->is_cancelled()) { die; } -admin_externalpage_print_header(); +echo $OUTPUT->header(); $msgform->display(); echo $OUTPUT->footer(); diff --git a/admin/webservice/service.php b/admin/webservice/service.php index 0c3f2b0dc76..379468730fa 100644 --- a/admin/webservice/service.php +++ b/admin/webservice/service.php @@ -57,7 +57,7 @@ if ($id) { if ($action == 'delete' and confirm_sesskey() and $service and empty($service->component)) { if (!$confirm) { - admin_externalpage_print_header(); + echo $OUTPUT->header(); $optionsyes = array('id'=>$id, 'action'=>'delete', 'confirm'=>1, 'sesskey'=>sesskey()); $optionsno = array('section'=>'externalservices'); $formcontinue = new single_button(new moodle_url('service.php', $optionsyes), get_string('delete'), 'post'); @@ -98,7 +98,7 @@ if ($mform->is_cancelled()) { redirect($returnurl); } -admin_externalpage_print_header(); +echo $OUTPUT->header(); $mform->display(); echo $OUTPUT->footer(); diff --git a/admin/webservice/service_functions.php b/admin/webservice/service_functions.php index 26eee6ac3d0..52f3e3cedfa 100644 --- a/admin/webservice/service_functions.php +++ b/admin/webservice/service_functions.php @@ -56,7 +56,7 @@ $service = $DB->get_record('external_services', array('id'=>$id), '*', MUST_EXIS if ($action === 'delete' and confirm_sesskey() and $service and empty($service->component)) { $function = $DB->get_record('external_functions', array('id'=>$fid), '*', MUST_EXIST); if (!$confirm) { - admin_externalpage_print_header(); + echo $OUTPUT->header(); $optionsyes = array('id'=>$id, 'action'=>'delete', 'confirm'=>1, 'sesskey'=>sesskey(), 'fid'=>$function->id); $optionsno = array('id'=>$id); $formcontinue = new single_button(new moodle_url('service_functions.php', $optionsyes), get_string('remove')); @@ -89,14 +89,14 @@ if ($action === 'delete' and confirm_sesskey() and $service and empty($service-> } //ask for function id - admin_externalpage_print_header(); + echo $OUTPUT->header(); echo $OUTPUT->heading($service->name); $mform->display(); echo $OUTPUT->footer(); die; } -admin_externalpage_print_header(); +echo $OUTPUT->header(); echo $OUTPUT->heading($service->name); diff --git a/admin/webservice/service_users.php b/admin/webservice/service_users.php index 8811c1a46f5..ce6cee2f51a 100644 --- a/admin/webservice/service_users.php +++ b/admin/webservice/service_users.php @@ -40,7 +40,7 @@ $PAGE->navbar->add(get_string('serviceusers', 'webservice')); $PAGE->requires->js('/admin/webservice/script.js'); admin_externalpage_setup('externalserviceusers'); -admin_externalpage_print_header(); +echo $OUTPUT->header(); /// Get the user_selector we will need. diff --git a/admin/webservice/testclient.php b/admin/webservice/testclient.php index 7751e7f2faa..556227276e5 100644 --- a/admin/webservice/testclient.php +++ b/admin/webservice/testclient.php @@ -88,7 +88,7 @@ if (!isset($protocols[$protocol])) { // whitelisting security if (!$function or !$protocol) { $mform = new webservice_test_client_form(null, array($functions, $protocols)); - admin_externalpage_print_header(); + echo $OUTPUT->header(); echo $OUTPUT->heading(get_string('testclient', 'webservice')); echo $OUTPUT->box_start(); $url = new moodle_url('/admin/settings.php?section=debugging'); @@ -140,7 +140,7 @@ if ($mform->is_cancelled()) { // now test the parameters, this also fixes PHP data types $params = external_api::validate_parameters($functioninfo->parameters_desc, $params); - admin_externalpage_print_header(); + echo $OUTPUT->header(); echo $OUTPUT->heading(get_string('pluginname', 'webservice_'.$protocol).': '.$function); echo 'URL: '.s($serverurl); @@ -162,7 +162,7 @@ if ($mform->is_cancelled()) { die; } else { - admin_externalpage_print_header(); + echo $OUTPUT->header(); echo $OUTPUT->heading(get_string('pluginname', 'webservice_'.$protocol).': '.$function); $mform->display(); echo $OUTPUT->footer(); diff --git a/admin/webservice/tokens.php b/admin/webservice/tokens.php index 8cc4f6c8e92..63f0888d0af 100644 --- a/admin/webservice/tokens.php +++ b/admin/webservice/tokens.php @@ -72,7 +72,7 @@ switch ($action) { } //ask for function id - admin_externalpage_print_header(); + echo $OUTPUT->header(); echo $OUTPUT->heading(get_string('createtoken', 'webservice')); $mform->display(); echo $OUTPUT->footer(); @@ -88,7 +88,7 @@ switch ($action) { t.creatorid=? AND t.id=? AND t.tokentype = ".EXTERNAL_TOKEN_PERMANENT." AND s.id = t.externalserviceid AND t.userid = u.id"; $token = $DB->get_record_sql($sql, array($USER->id, $tokenid), MUST_EXIST); //must be the token creator if (!$confirm) { - admin_externalpage_print_header(); + echo $OUTPUT->header(); $optionsyes = array('tokenid'=>$tokenid, 'action'=>'delete', 'confirm'=>1, 'sesskey'=>sesskey()); $optionsno = array('section'=>'webservicetokens', 'sesskey'=>sesskey()); $formcontinue = new single_button(new moodle_url('/admin/webservice/tokens.php', $optionsyes), get_string('delete')); diff --git a/admin/xmldb/index.php b/admin/xmldb/index.php index d455d674f0d..53daf816ed6 100644 --- a/admin/xmldb/index.php +++ b/admin/xmldb/index.php @@ -97,7 +97,7 @@ } /// Go with standard admin header - admin_externalpage_print_header(); + echo $OUTPUT->header(); echo $OUTPUT->heading($xmldb_action->getTitle()); echo $xmldb_action->getOutput(); echo $OUTPUT->footer(); diff --git a/comment/index.php b/comment/index.php index c2f6221f765..b7af2c3607f 100644 --- a/comment/index.php +++ b/comment/index.php @@ -67,7 +67,7 @@ if ($action === 'delete') { } } -admin_externalpage_print_header(); +echo $OUTPUT->header(); echo $OUTPUT->heading(get_string('comments')); if (!empty($err)) { print_error($err, 'error', $CFG->httpswwwroot.'/comment/'); diff --git a/course/category.php b/course/category.php index 793640f0c35..e8e3cf49a67 100644 --- a/course/category.php +++ b/course/category.php @@ -162,7 +162,7 @@ require_once($CFG->libdir . '/adminlib.php'); admin_externalpage_setup('coursemgmt', '', $urlparams, $CFG->wwwroot . '/course/category.php'); $PAGE->set_context($context); // Ensure that we are actually showing blocks etc for the cat context - admin_externalpage_print_header(); + echo $OUTPUT->header(); } else { $PAGE->set_title("$site->shortname: $category->name"); $PAGE->set_heading("$site->fullname: $strcourses"); diff --git a/course/index.php b/course/index.php index b168b2c2b78..9ccccf0ac62 100644 --- a/course/index.php +++ b/course/index.php @@ -134,14 +134,14 @@ if (!empty($delete) and confirm_sesskey()) { } else if (!$data= $mform->get_data()) { require_once($CFG->libdir . '/questionlib.php'); - admin_externalpage_print_header(); + echo $OUTPUT->header(); echo $OUTPUT->heading($heading); $mform->display(); echo $OUTPUT->footer(); exit(); } - admin_externalpage_print_header(); + echo $OUTPUT->header(); echo $OUTPUT->heading($heading); if ($data->fulldelete) { @@ -236,7 +236,7 @@ if ((!empty($moveup) or !empty($movedown)) and confirm_sesskey()) { } /// Print headings -admin_externalpage_print_header(); +echo $OUTPUT->header(); echo $OUTPUT->heading($strcategories); /// Print out the categories with all the knobs diff --git a/course/pending.php b/course/pending.php index 71f28013add..54d502e8714 100644 --- a/course/pending.php +++ b/course/pending.php @@ -82,14 +82,14 @@ if (!empty($reject)) { } /// Display the form for giving a reason for rejecting the request. - admin_externalpage_print_header($rejectform->focus()); + echo $OUTPUT->header($rejectform->focus()); $rejectform->display(); echo $OUTPUT->footer(); exit; } /// Print a list of all the pending requests. -admin_externalpage_print_header(); +echo $OUTPUT->header(); $pending = $DB->get_records('course_request'); if (empty($pending)) { diff --git a/course/report/log/index.php b/course/report/log/index.php index 4ee8c0fba12..88d315f6e57 100644 --- a/course/report/log/index.php +++ b/course/report/log/index.php @@ -93,7 +93,7 @@ case 'showashtml': if ($hostid != $CFG->mnet_localhost_id || $course->id == SITEID) { admin_externalpage_setup('reportlog'); - admin_externalpage_print_header(); + echo $OUTPUT->header(); } else { $PAGE->set_title($course->shortname .': '. $strlogs); @@ -142,7 +142,7 @@ } else { if ($hostid != $CFG->mnet_localhost_id || $course->id == SITEID) { admin_externalpage_setup('reportlog'); - admin_externalpage_print_header(); + echo $OUTPUT->header(); } else { $PAGE->set_title($course->shortname .': '. $strlogs); $PAGE->set_heading($course->fullname); diff --git a/course/report/log/indexlive.php b/course/report/log/indexlive.php index 6b0a0d2d597..09978b98e84 100644 --- a/course/report/log/indexlive.php +++ b/course/report/log/indexlive.php @@ -22,7 +22,7 @@ if ($course->id == SITEID) { admin_externalpage_setup('reportloglive'); - admin_externalpage_print_header(); + echo $OUTPUT->header(); } else { $PAGE->set_title($course->shortname .': '. $strlogs); diff --git a/course/report/stats/index.php b/course/report/stats/index.php index d5ef891649c..e124bf91dda 100644 --- a/course/report/stats/index.php +++ b/course/report/stats/index.php @@ -45,7 +45,7 @@ if ($course->id == SITEID) { admin_externalpage_setup('reportstats'); - admin_externalpage_print_header(); + echo $OUTPUT->header(); } else { $strreports = get_string("reports"); $strstats = get_string('stats'); diff --git a/enrol/mnet/allowed_courses.php b/enrol/mnet/allowed_courses.php index 244f8914825..7711381ff32 100644 --- a/enrol/mnet/allowed_courses.php +++ b/enrol/mnet/allowed_courses.php @@ -12,7 +12,7 @@ include_once $CFG->dirroot . '/mnet/lib.php'; admin_externalpage_setup('ssoaccesscontrol'); -admin_externalpage_print_header(); +echo $OUTPUT->header(); $addcategory = optional_param('addcategory', 0, PARAM_BOOL); $removecategory = optional_param('removecategory', 0, PARAM_BOOL); diff --git a/filter/manage.php b/filter/manage.php index af34d4b2160..0699e66c555 100644 --- a/filter/manage.php +++ b/filter/manage.php @@ -124,7 +124,7 @@ $straction = get_string('filters', 'admin'); // Used by tabs.php /// Print the header and tabs if ($context->contextlevel == CONTEXT_COURSE and $context->instanceid == SITEID) { admin_externalpage_setup('frontpagefilters'); - admin_externalpage_print_header(); + echo $OUTPUT->header(); } else { $currenttab = 'filters'; include_once($CFG->dirroot . '/' . $CFG->admin . '/roles/tabs.php'); diff --git a/grade/edit/letter/edit.php b/grade/edit/letter/edit.php index 89d6515cc4f..9bd73e63b83 100644 --- a/grade/edit/letter/edit.php +++ b/grade/edit/letter/edit.php @@ -132,7 +132,7 @@ if ($mform->is_cancelled()) { //page header if ($admin) { - admin_externalpage_print_header(); + echo $OUTPUT->header(); } else { print_grade_page_head($COURSE->id, 'letter', 'edit', get_string('editgradeletters', 'grades')); diff --git a/grade/edit/outcome/edit.php b/grade/edit/outcome/edit.php index a9f0628908b..6d355b0246a 100644 --- a/grade/edit/outcome/edit.php +++ b/grade/edit/outcome/edit.php @@ -145,7 +145,7 @@ if ($courseid) { } else { require_once $CFG->libdir.'/adminlib.php'; admin_externalpage_setup('outcomes'); - admin_externalpage_print_header(); + echo $OUTPUT->header(); } if (!grade_scale::fetch_all_local($courseid) && !grade_scale::fetch_all_global()) { diff --git a/grade/edit/outcome/import.php b/grade/edit/outcome/import.php index 8b49ac7e17f..94e772b3a0e 100644 --- a/grade/edit/outcome/import.php +++ b/grade/edit/outcome/import.php @@ -75,7 +75,7 @@ if ($courseid) { $caneditcoursescales = has_capability('moodle/course:managescales', $context); } else { - admin_externalpage_print_header(); + echo $OUTPUT->header(); $caneditcoursescales = $caneditsystemscales; } diff --git a/grade/edit/outcome/index.php b/grade/edit/outcome/index.php index 2cee9645076..9caa2d5a27f 100644 --- a/grade/edit/outcome/index.php +++ b/grade/edit/outcome/index.php @@ -129,7 +129,7 @@ if ($courseid) { $caneditcoursescales = has_capability('moodle/course:managescales', $context); } else { - admin_externalpage_print_header(); + echo $OUTPUT->header(); $caneditcoursescales = $caneditsystemscales; } diff --git a/grade/edit/scale/edit.php b/grade/edit/scale/edit.php index 25a0c7bbfb5..66c2e8696a4 100644 --- a/grade/edit/scale/edit.php +++ b/grade/edit/scale/edit.php @@ -131,7 +131,7 @@ if ($mform->is_cancelled()) { if ($courseid) { print_grade_page_head($course->id, 'scale', 'edit', $heading); } else { - admin_externalpage_print_header(); + echo $OUTPUT->header(); } $mform->display(); diff --git a/grade/edit/scale/index.php b/grade/edit/scale/index.php index 8a1e12a9f0d..c25009f910c 100644 --- a/grade/edit/scale/index.php +++ b/grade/edit/scale/index.php @@ -91,7 +91,7 @@ switch ($action) { } if (!$courseid) { - admin_externalpage_print_header(); + echo $OUTPUT->header(); } $table = new html_table(); diff --git a/lib/adminlib.php b/lib/adminlib.php index 26a32d1cf89..2ad04970fe3 100644 --- a/lib/adminlib.php +++ b/lib/adminlib.php @@ -23,8 +23,7 @@ * This file performs the following tasks: * -it defines the necessary objects and interfaces to build the Moodle * admin hierarchy - * -it defines the admin_externalpage_setup(), admin_externalpage_print_header(), - * and admin_externalpage_print_footer() functions used on admin pages + * -it defines the admin_externalpage_setup() * * ADMIN_SETTING OBJECTS * diff --git a/lib/deprecatedlib.php b/lib/deprecatedlib.php index f40e141bb40..b6d07169ae3 100644 --- a/lib/deprecatedlib.php +++ b/lib/deprecatedlib.php @@ -3651,15 +3651,9 @@ function navmenu($course, $cm=NULL, $targetwindow='self') { * @param string $focus focus element */ function admin_externalpage_print_header($focus='') { - global $CFG, $PAGE, $SITE, $OUTPUT; + global $OUTPUT; - //debugging('admin_externalpage_print_header is deprecated. Please $OUTPUT->header() instead.', DEBUG_DEVELOPER); - - if (!is_string($focus)) { - $focus = ''; // BC compatibility, there used to be adminroot parameter - } - - $PAGE->set_focuscontrol($focus); + debugging('admin_externalpage_print_header is deprecated. Please $OUTPUT->header() instead.', DEBUG_DEVELOPER); echo $OUTPUT->header(); } diff --git a/mod/glossary/formats.php b/mod/glossary/formats.php index d161a03bef4..5d6500974db 100644 --- a/mod/glossary/formats.php +++ b/mod/glossary/formats.php @@ -50,7 +50,7 @@ if ( $mode == 'visible' and confirm_sesskey()) { $strmodulename = get_string("modulename", "glossary"); $strdisplayformats = get_string("displayformats","glossary"); -admin_externalpage_print_header(); +echo $OUTPUT->header(); echo $OUTPUT->heading($strmodulename . ': ' . get_string("displayformats","glossary")); diff --git a/repository/manage_instances.php b/repository/manage_instances.php index 7acc6cb46ef..45ebc6c6f29 100644 --- a/repository/manage_instances.php +++ b/repository/manage_instances.php @@ -188,7 +188,7 @@ if (!empty($edit) || !empty($new)) { } if ($success) { $savedstr = get_string('configsaved', 'repository'); - //admin_externalpage_print_header(); + //echo $OUTPUT->header(); echo $OUTPUT->heading($savedstr); redirect($baseurl, $savedstr, 3); } else { @@ -196,7 +196,7 @@ if (!empty($edit) || !empty($new)) { } exit; } else { // Display the form - // admin_externalpage_print_header(); + // echo $OUTPUT->header(); echo $OUTPUT->heading(get_string('configplugin', 'repository_'.$plugin)); $OUTPUT->box_start(); $mform->display(); @@ -204,7 +204,7 @@ if (!empty($edit) || !empty($new)) { $return = false; } } else if (!empty($delete)) { - // admin_externalpage_print_header(); + // echo $OUTPUT->header(); $instance = repository::get_instance($delete); //if you try to delete an instance set as readonly, display an error message if ($instance->readonly) { diff --git a/theme/index.php b/theme/index.php index f6f75f0bf0b..cca26fdd66d 100644 --- a/theme/index.php +++ b/theme/index.php @@ -41,7 +41,7 @@ if ($reset and confirm_sesskey()) { set_config('theme', $choose); - admin_externalpage_print_header(); + echo $OUTPUT->header(); echo $OUTPUT->heading(get_string('themesaved')); echo $OUTPUT->box_start(); @@ -56,7 +56,7 @@ if ($reset and confirm_sesskey()) { } // Otherwise, show a list of themes. -admin_externalpage_print_header('themeselector'); +echo $OUTPUT->header('themeselector'); echo $OUTPUT->heading(get_string('themes')); echo $OUTPUT->single_button(new moodle_url('index.php', array('sesskey'=>sesskey(),'reset'=>1)), get_string('themeresetcaches', 'admin')); diff --git a/user/editadvanced.php b/user/editadvanced.php index be41c17e7b8..58ba5901397 100644 --- a/user/editadvanced.php +++ b/user/editadvanced.php @@ -235,9 +235,9 @@ if ($usernew = $userform->get_data()) { /// Display page header if ($user->id == -1 or ($user->id != $USER->id)) { if ($user->id == -1) { - admin_externalpage_print_header(); + echo $OUTPUT->header(); } else { - admin_externalpage_print_header(); + echo $OUTPUT->header(); $userfullname = fullname($user, true); echo $OUTPUT->heading($userfullname); } diff --git a/user/profile/definelib.php b/user/profile/definelib.php index b2679f43708..104d82d3a5c 100644 --- a/user/profile/definelib.php +++ b/user/profile/definelib.php @@ -448,7 +448,7 @@ function profile_edit_category($id, $redirect) { } /// Print the page - admin_externalpage_print_header(); + echo $OUTPUT->header(); echo $OUTPUT->heading($strheading); $categoryform->display(); echo $OUTPUT->footer(); @@ -537,7 +537,7 @@ function profile_edit_field($id, $datatype, $redirect) { /// Print the page $PAGE->navbar->add($strheading); - admin_externalpage_print_header(); + echo $OUTPUT->header(); echo $OUTPUT->heading($strheading); $fieldform->display(); echo $OUTPUT->footer(); diff --git a/user/profile/index.php b/user/profile/index.php index 93ac6765f43..32daa1ce16d 100644 --- a/user/profile/index.php +++ b/user/profile/index.php @@ -51,7 +51,7 @@ switch ($action) { //ask for confirmation $fieldcount = $DB->count_records('user_info_field', array('categoryid'=>$id)); $optionsyes = array ('id'=>$id, 'confirm'=>1, 'action'=>'deletecategory', 'sesskey'=>sesskey()); - admin_externalpage_print_header(); + echo $OUTPUT->header(); echo $OUTPUT->heading('profiledeletecategory', 'admin'); $formcontinue = new single_button(new moodle_url($redirect, $optionsyes), get_string('yes'), 'post'); @@ -74,7 +74,7 @@ switch ($action) { $optionsyes = array ('id'=>$id, 'confirm'=>1, 'action'=>'deletefield', 'sesskey'=>sesskey()); $strheading = get_string('profiledeletefield', 'admin'); $PAGE->navbar->add($strheading); - admin_externalpage_print_header(); + echo $OUTPUT->header(); echo $OUTPUT->heading($strheading); $formcontinue = new single_button(new moodle_url($redirect, $optionsyes), get_string('yes'), 'post'); $formcancel = new single_button($redirect, get_string('no'), 'get'); @@ -100,7 +100,7 @@ switch ($action) { } /// Print the header -admin_externalpage_print_header(); +echo $OUTPUT->header(); echo $OUTPUT->heading(get_string('profilefields', 'admin')); /// Check that we have at least one category defined