diff --git a/admin/auth_config.php b/admin/auth_config.php index 4b2e9d880ab..d89332a9055 100644 --- a/admin/auth_config.php +++ b/admin/auth_config.php @@ -65,7 +65,7 @@ echo "\n"; // auth plugin description print_simple_box_start('center', '80%'); -print_heading($authtitle); +echo $OUTPUT->heading($authtitle); print_simple_box_start('center', '80%', '', 5, 'informationbox'); echo $authdescription; print_simple_box_end(); @@ -89,9 +89,9 @@ function print_auth_lock_options ($auth, $user_fields, $helptext, $retrieveopts, echo ''; if ($retrieveopts) { - print_heading(get_string('auth_data_mapping', 'auth')); + echo $OUTPUT->heading(get_string('auth_data_mapping', 'auth')); } else { - print_heading(get_string('auth_fieldlocks', 'auth')); + echo $OUTPUT->heading(get_string('auth_fieldlocks', 'auth')); } echo ''; diff --git a/admin/block.php b/admin/block.php index b85efe83a52..fdf3d91839f 100644 --- a/admin/block.php +++ b/admin/block.php @@ -51,7 +51,7 @@ admin_externalpage_print_header(); - print_heading($strblockname); + echo $OUTPUT->heading($strblockname); notify('This block still uses an old-style config_global.html file. ' . 'It must be updated by a developer to use a settings.php file.'); diff --git a/admin/blocks.php b/admin/blocks.php index 7bb19c24a05..2764b6b6e46 100644 --- a/admin/blocks.php +++ b/admin/blocks.php @@ -45,7 +45,7 @@ if (!empty($delete) && confirm_sesskey()) { admin_externalpage_print_header(); - print_heading($strmanageblocks); + echo $OUTPUT->heading($strmanageblocks); if (!$block = blocks_get_record($delete)) { print_error('blockdoesnotexist', 'error'); @@ -99,7 +99,7 @@ } admin_externalpage_print_header(); - print_heading($strmanageblocks); + echo $OUTPUT->heading($strmanageblocks); /// Main display starts here @@ -190,7 +190,7 @@ $table->print_html(); if(!empty($incompatible)) { - print_heading(get_string('incompatibleblocks', 'admin')); + echo $OUTPUT->heading(get_string('incompatibleblocks', 'admin')); $table = new flexible_table('admin-blocks-incompatible'); diff --git a/admin/dbtransfer/index.php b/admin/dbtransfer/index.php index 0ee0489e1de..b9c5aefb2ca 100644 --- a/admin/dbtransfer/index.php +++ b/admin/dbtransfer/index.php @@ -25,7 +25,7 @@ if ($data = $form->get_data()) { // Start output. admin_externalpage_print_header(); $data->dbtype = $dbtype; - print_heading(get_string('transferringdbto', 'dbtransfer', $data)); + echo $OUTPUT->heading(get_string('transferringdbto', 'dbtransfer', $data)); // Do the transfer. $feedback = new html_list_progress_trace(); @@ -41,7 +41,7 @@ if ($data = $form->get_data()) { // Otherwise display the settings form. admin_externalpage_print_header(); -print_heading(get_string('transferdbtoserver', 'dbtransfer')); +echo $OUTPUT->heading(get_string('transferdbtoserver', 'dbtransfer')); echo '

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

\n\n"; $form->display(); admin_externalpage_print_footer(); diff --git a/admin/delete.php b/admin/delete.php index 55f52c8e09d..401ca757e9b 100644 --- a/admin/delete.php +++ b/admin/delete.php @@ -18,7 +18,7 @@ $deletedir = $CFG->dataroot; // The directory to delete! admin_externalpage_print_header(); - print_heading('Purge moodledata'); + echo $OUTPUT->heading('Purge moodledata'); if (empty($sure)) { $optionsyes = array('sure'=>'yes', 'sesskey'=>sesskey()); diff --git a/admin/enrol.php b/admin/enrol.php index 5e68bd10566..774471a7926 100644 --- a/admin/enrol.php +++ b/admin/enrol.php @@ -115,7 +115,7 @@ echo '
frametarget.' id="adminsettings" method="post" action="enrol.php">'; echo '
'; - print_heading(get_string('commonsettings', 'admin')); + echo $OUTPUT->heading(get_string('commonsettings', 'admin')); echo ''; echo ''; echo '
'; diff --git a/admin/enrol_config.php b/admin/enrol_config.php index 95990d454f4..3b0f1d1577b 100644 --- a/admin/enrol_config.php +++ b/admin/enrol_config.php @@ -49,7 +49,7 @@ /// Print current enrolment type description print_simple_box_start("center", "80%"); - print_heading($options[$enrol]); + echo $OUTPUT->heading($options[$enrol]); print_simple_box_start("center", "60%", '', 5, 'informationbox'); print_string("description", "enrol_$enrol"); diff --git a/admin/environment.php b/admin/environment.php index 8acd2786807..11f2e42739d 100644 --- a/admin/environment.php +++ b/admin/environment.php @@ -57,7 +57,7 @@ /// Print the component download link echo ''; - print_heading($strenvironment); + echo $OUTPUT->heading($strenvironment); /// Handle the 'updatecomponent' action if ($action == 'updatecomponent' && confirm_sesskey()) { diff --git a/admin/filters.php b/admin/filters.php index e27990eb7af..2fe45184954 100644 --- a/admin/filters.php +++ b/admin/filters.php @@ -119,7 +119,7 @@ if (!optional_param('confirm', '', PARAM_BOOL)) { $title = get_string('deletefilterareyousure', 'admin', $filtername); admin_externalpage_print_header(); - print_heading($title); + echo $OUTPUT->heading($title); notice_yesno(get_string('deletefilterareyousuremessage', 'admin', $filtername), $returnurl . '?action=delete&filterpath=' . $filterpath . '&confirm=1&sesskey=' . sesskey(), $returnurl, NULL, NULL, 'post', 'get'); @@ -130,7 +130,7 @@ // Do the deletion. $title = get_string('deletingfilter', 'admin', $filtername); admin_externalpage_print_header(); - print_heading($title); + echo $OUTPUT->heading($title); // Delete all data for this plugin. filter_delete_all_for_filter($filterpath); @@ -159,7 +159,7 @@ /// Print the page heading. admin_externalpage_print_header(); - print_heading(get_string('filtersettings', 'admin')); + echo $OUTPUT->heading(get_string('filtersettings', 'admin')); $activechoices = array( TEXTFILTER_DISABLED => get_string('disabled', 'filters'), diff --git a/admin/generator.php b/admin/generator.php index 5447148fd81..ef612cbe2ca 100755 --- a/admin/generator.php +++ b/admin/generator.php @@ -1198,10 +1198,11 @@ class generator_web extends generator { } public function display() { + global $OUTPUT; print_header("Data generator"); - print_heading("Data generator: web interface"); - print_heading("FOR DEVELOPMENT PURPOSES ONLY. DO NOT USE ON A PRODUCTION SITE!", '', 3); - print_heading("Your database contents will probably be massacred. You have been warned", '', 5); + echo $OUTPUT->heading("Data generator: web interface"); + echo $OUTPUT->heading("FOR DEVELOPMENT PURPOSES ONLY. DO NOT USE ON A PRODUCTION SITE!", 3); + echo $OUTPUT->heading("Your database contents will probably be massacred. You have been warned", 5); $systemcontext = get_context_instance(CONTEXT_SYSTEM); diff --git a/admin/health.php b/admin/health.php index b68fa467059..af9e82a4967 100644 --- a/admin/health.php +++ b/admin/health.php @@ -105,7 +105,7 @@ STYLES; function health_find_problems() { - print_heading(get_string('healthcenter')); + echo $OUTPUT->heading(get_string('healthcenter')); $issues = array( SEVERITY_CRITICAL => array(), @@ -139,7 +139,7 @@ function health_find_problems() { echo '
'; } else { - print_heading(get_string('healthproblemsdetected')); + echo $OUTPUT->heading(get_string('healthproblemsdetected')); $severities = array(SEVERITY_CRITICAL, SEVERITY_SIGNIFICANT, SEVERITY_ANNOYANCE, SEVERITY_NOTICE); foreach($severities as $severity) { if(!empty($issues[$severity])) { @@ -158,6 +158,7 @@ function health_find_problems() { } function health_print_solution($classname) { + global $OUTPUT; $problem = new $classname; $data = array( 'title' => $problem->title(), @@ -166,8 +167,8 @@ function health_print_solution($classname) { 'solution' => $problem->solution() ); - print_heading(get_string('healthcenter')); - print_heading(get_string('healthproblemsolution')); + echo $OUTPUT->heading(get_string('healthcenter')); + echo $OUTPUT->heading(get_string('healthproblemsolution')); echo '
'; echo '
'.$data['title'].'
'; echo '
'.$data['description'].'
'; diff --git a/admin/index.php b/admin/index.php index de39048f052..b1e7043538e 100644 --- a/admin/index.php +++ b/admin/index.php @@ -121,8 +121,8 @@ if (!core_tables_exist()) { $strlicense = get_string('license'); $navigation = build_navigation(array(array('name'=>$strlicense, 'link'=>null, 'type'=>'misc'))); print_header($strinstallation.' - Moodle '.$CFG->target_release, $strinstallation, $navigation, '', '', false, ' ', ' '); - print_heading('Moodle - Modular Object-Oriented Dynamic Learning Environment'); - print_heading(get_string('copyrightnotice')); + echo $OUTPUT->heading('Moodle - Modular Object-Oriented Dynamic Learning Environment'); + echo $OUTPUT->heading(get_string('copyrightnotice')); $copyrightnotice = text_to_html(get_string('gpl')); $copyrightnotice = str_replace('target="_blank"', 'onclick="this.target=\'_blank\'"', $copyrightnotice); // extremely ugly validation hack print_box($copyrightnotice, 'copyrightnotice'); @@ -136,7 +136,7 @@ if (!core_tables_exist()) { $strcurrentrelease = get_string('currentrelease'); $navigation = build_navigation(array(array('name'=>$strcurrentrelease, 'link'=>null, 'type'=>'misc'))); print_header($strinstallation.' - Moodle '.$CFG->target_release, $strinstallation, $navigation, '', '', false, ' ', ' '); - print_heading("Moodle $release"); + echo $OUTPUT->heading("Moodle $release"); $releasenoteslink = get_string('releasenoteslink', 'admin', 'http://docs.moodle.org/en/Release_Notes'); $releasenoteslink = str_replace('target="_blank"', 'onclick="this.target=\'_blank\'"', $releasenoteslink); // extremely ugly validation hack print_box($releasenoteslink, 'generalbox boxaligncenter boxwidthwide'); @@ -200,7 +200,7 @@ if ($version > $CFG->version) { // upgrade $strcurrentrelease = get_string('currentrelease'); $navigation = build_navigation(array(array('name'=>$strcurrentrelease, 'link'=>null, 'type'=>'misc'))); print_header($strcurrentrelease, $strcurrentrelease, $navigation, '', '', false, ' ', ' '); - print_heading("Moodle $release"); + echo $OUTPUT->heading("Moodle $release"); $releasenoteslink = get_string('releasenoteslink', 'admin', 'http://docs.moodle.org/en/Release_Notes'); $releasenoteslink = str_replace('target="_blank"', 'onclick="this.target=\'_blank\'"', $releasenoteslink); // extremely ugly validation hack print_box($releasenoteslink); @@ -225,7 +225,7 @@ if ($version > $CFG->version) { // upgrade $strplugincheck = get_string('plugincheck'); $navigation = build_navigation(array(array('name'=>$strplugincheck, 'link'=>null, 'type'=>'misc'))); print_header($strplugincheck, $strplugincheck, $navigation, '', '', false, ' ', ' '); - print_heading($strplugincheck); + echo $OUTPUT->heading($strplugincheck); print_box_start('generalbox', 'notice'); print_string('pluginchecknotice'); print_box_end(); diff --git a/admin/innodb.php b/admin/innodb.php index 98e7991e295..6f6f9c0930c 100644 --- a/admin/innodb.php +++ b/admin/innodb.php @@ -12,7 +12,7 @@ require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM)); admin_externalpage_print_header(); - print_heading('Convert all MySQL tables from MYISAM to InnoDB'); + echo $OUTPUT->heading('Convert all MySQL tables from MYISAM to InnoDB'); if ($DB->get_dbfamily() != 'mysql') { notice('This function is for MySQL databases only!', 'index.php'); diff --git a/admin/lang.php b/admin/lang.php index c6142f6601e..db5b9724ffd 100644 --- a/admin/lang.php +++ b/admin/lang.php @@ -323,9 +323,9 @@ if ($totalcounter->missing > 0) { $totalcounter->missingpercent = sprintf('%02.1f', ($totalcounter->missing / $totalcounter->strings * 100)); - print_heading(get_string('numberofstrings', 'admin', $totalcounter), '', 4); + echo $OUTPUT->heading(get_string('numberofstrings', 'admin', $totalcounter), 4); } else { - print_heading($strnomissingstrings, '', 4, 'notifysuccess'); + echo $OUTPUT->heading($strnomissingstrings, 4, 'notifysuccess'); } if ($m <> '') { @@ -501,14 +501,14 @@ if (!isset($editable) || $editable) { if (!file_exists("$saveto/$currentfile")) { if (!@touch("$saveto/$currentfile")) { - print_heading(get_string("filemissing", "", "$saveto/$currentfile"), '', 4, 'error'); + echo $OUTPUT->heading(get_string("filemissing", "", "$saveto/$currentfile"), 4, 'error'); } else { - print_heading($strfilecreated, '', 4, 'notifysuccess'); + echo $OUTPUT->heading($strfilecreated, 4, 'notifysuccess'); } } if ($currentlang == "en_utf8" && !$uselocal) { $editable = false; - print_heading($streditennotallowed, '', 4); + echo $OUTPUT->heading($streditennotallowed, 4); } elseif ($f = fopen("$saveto/$currentfile","r+")) { $editable = true; fclose($f); @@ -684,12 +684,12 @@ if (LANG_DISPLAY_MISSING_LINKS) { if ($missingcounter > 0) { - print_heading(get_string('numberofmissingstrings', 'admin', $missingcounter), '', 4); + echo $OUTPUT->heading(get_string('numberofmissingstrings', 'admin', $missingcounter), 4); if ($editable) { - print_heading(''.$strgotofirst.'', "", 4); + echo $OUTPUT->heading(''.$strgotofirst.'', 4); } } else { - print_heading($strnomissingstrings, '', 4, 'notifysuccess'); + echo $OUTPUT->heading($strnomissingstrings, 4, 'notifysuccess'); } } echo $o; @@ -885,7 +885,7 @@ if (false && $CFG->debugdisplay && debugging('', DEBUG_DEVELOPER) ) { echo '
'; - print_heading('Debugging info'); + echo $OUTPUT->heading('Debugging info'); echo '
';
             print_r($dbg);
             print_r("\n\$currentfile = $currentfile");
diff --git a/admin/mnet/access_control.php b/admin/mnet/access_control.php
index 2b8a8e08e2d..ef43d196d53 100644
--- a/admin/mnet/access_control.php
+++ b/admin/mnet/access_control.php
@@ -160,7 +160,7 @@ $acl = $DB->get_records('mnet_sso_access_control', null, "$sort $dir", '*'); //,
 $aclcount = $DB->count_records('mnet_sso_access_control');
 
 if (!$acl) {
-    print_heading(get_string('noaclentries','mnet'));
+    echo $OUTPUT->heading(get_string('noaclentries','mnet'));
     $table = NULL;
 } else {
     $table->head = $headings;
diff --git a/admin/mnet/delete.html b/admin/mnet/delete.html
index 4ff22fad551..f1523002fc6 100644
--- a/admin/mnet/delete.html
+++ b/admin/mnet/delete.html
@@ -6,7 +6,7 @@ $navlinks[] = array('name' => get_string('deletehost', 'mnet'), 'link' => null,
 $navigation = build_navigation($navlinks);
 print_header("$site->shortname: $strmnetsettings", "$site->fullname", $navigation);
 
-print_heading(get_string('mnetsettings', 'mnet'));
+echo $OUTPUT->heading(get_string('mnetsettings', 'mnet'));
 ?>
 
diff --git a/admin/mnet/mnet_themes.html b/admin/mnet/mnet_themes.html index 2e1c4a2e3ab..bdeeaea44bb 100644 --- a/admin/mnet/mnet_themes.html +++ b/admin/mnet/mnet_themes.html @@ -1,6 +1,6 @@ heading(get_string('themes')); $original_theme = fullclone($THEME); $logurl = $CFG->wwwroot. '/course/report/log/index.php?chooselog=1&showusers=1&showcourses=1&host_course='.$mnet_peer->id. diff --git a/admin/modules.php b/admin/modules.php index 2f125de65c5..09e0f5cd53b 100644 --- a/admin/modules.php +++ b/admin/modules.php @@ -72,7 +72,7 @@ if (!empty($delete) and confirm_sesskey()) { admin_externalpage_print_header(); - print_heading($stractivities); + echo $OUTPUT->heading($stractivities); $strmodulename = get_string("modulename", "$delete"); @@ -179,7 +179,7 @@ } admin_externalpage_print_header(); - print_heading($stractivities); + echo $OUTPUT->heading($stractivities); /// Get and sort the existing modules diff --git a/admin/multilangupgrade.php b/admin/multilangupgrade.php index da5ee8a1bc9..158747ef0a5 100644 --- a/admin/multilangupgrade.php +++ b/admin/multilangupgrade.php @@ -12,7 +12,7 @@ $go = optional_param('go', 0, PARAM_BOOL); ################################################################### admin_externalpage_print_header(); -print_heading(get_string('multilangupgrade', 'admin')); +echo $OUTPUT->heading(get_string('multilangupgrade', 'admin')); $strmultilangupgrade = get_String('multilangupgradeinfo', 'admin'); diff --git a/admin/oacleanup.php b/admin/oacleanup.php index ae3e6923cec..e7e7d9d798a 100644 --- a/admin/oacleanup.php +++ b/admin/oacleanup.php @@ -16,10 +16,10 @@ if (!isset($CFG)) { function online_assignment_cleanup($output=false) { - global $CFG, $DB; + global $CFG, $DB, $OUTPUT; if ($output) { - print_heading('Online Assignment Cleanup'); + echo $OUTPUT->heading('Online Assignment Cleanup'); echo '
'; } @@ -48,7 +48,7 @@ function online_assignment_cleanup($output=false) { foreach ($courses as $course) { $fullname = empty($course->fullname) ? 'Course: '.$course->id : $course->fullname; - if ($output) print_heading($fullname); + if ($output) echo $OUTPUT->heading($fullname); /// retrieve a list of sections beyond what is currently being shown $sql = "SELECT * diff --git a/admin/portfolio.php b/admin/portfolio.php index a7db7142308..af4ccab4f57 100644 --- a/admin/portfolio.php +++ b/admin/portfolio.php @@ -62,12 +62,12 @@ if (!empty($edit) || !empty($new)) { } $savedstr = get_string('instancesaved', 'portfolio'); admin_externalpage_print_header(); - print_heading($savedstr); + echo $OUTPUT->heading($savedstr); redirect($baseurl, $savedstr, 3); exit; } else { admin_externalpage_print_header(); - print_heading(get_string('configplugin', 'portfolio')); + echo $OUTPUT->heading(get_string('configplugin', 'portfolio')); print_simple_box_start(); $mform->display(); print_simple_box_end(); @@ -94,7 +94,7 @@ if (!empty($edit) || !empty($new)) { } if ($instance->delete()) { $deletedstr = get_string('instancedeleted', 'portfolio'); - print_heading($deletedstr); + echo $OUTPUT->heading($deletedstr); redirect($baseurl, $deletedstr, 3); } else { print_error('instancenotdeleted', 'portfolio', $baseurl); diff --git a/admin/qtypes.php b/admin/qtypes.php index ae378b8a39d..40ac6c791fc 100644 --- a/admin/qtypes.php +++ b/admin/qtypes.php @@ -121,7 +121,7 @@ if (!optional_param('confirm', '', PARAM_BOOL)) { $qtypename = $QTYPES[$delete]->local_name(); admin_externalpage_print_header(); - print_heading(get_string('deleteqtypeareyousure', 'admin', $qtypename)); + echo $OUTPUT->heading(get_string('deleteqtypeareyousure', 'admin', $qtypename)); notice_yesno(get_string('deleteqtypeareyousuremessage', 'admin', $qtypename), admin_url('qtypes.php?delete=' . $delete . '&confirm=1&sesskey=' . sesskey()), admin_url('qtypes.php'), NULL, NULL, 'post', 'get'); @@ -131,7 +131,7 @@ // Do the deletion. admin_externalpage_print_header(); - print_heading(get_string('deletingqtype', 'admin', $qtypename)); + echo $OUTPUT->heading(get_string('deletingqtype', 'admin', $qtypename)); // Delete any configuration records. if (!unset_all_config_for_plugin('qtype_' . $delete)) { @@ -158,7 +158,7 @@ /// Print the page heading. admin_externalpage_print_header(); - print_heading(get_string('manageqtypes', 'admin')); + echo $OUTPUT->heading(get_string('manageqtypes', 'admin')); /// Set up the table. $table = new flexible_table('qtypeadmintable'); diff --git a/admin/register.php b/admin/register.php index fc6b62b0b13..9f77f88c9e4 100644 --- a/admin/register.php +++ b/admin/register.php @@ -36,7 +36,7 @@ $navlinks[] = array('name' => $strregistration, 'link' => null, 'type' => 'misc'); $navigation = build_navigation($navlinks); - print_heading($strregistration); + echo $OUTPUT->heading($strregistration); print_simple_box($strregistrationinfo, "center", "70%"); diff --git a/admin/replace.php b/admin/replace.php index ff145dc2721..2e75a5947b1 100644 --- a/admin/replace.php +++ b/admin/replace.php @@ -13,7 +13,7 @@ $replace = optional_param('replace', '', PARAM_RAW); ################################################################### admin_externalpage_print_header(); -print_heading('Search and replace text throughout the whole database'); +echo $OUTPUT->heading('Search and replace text throughout the whole database'); if (!data_submitted() or !$search or !$replace or !confirm_sesskey()) { /// Print a form diff --git a/admin/report/backups/index.php b/admin/report/backups/index.php index ef93e70f0d7..cb077b5673a 100644 --- a/admin/report/backups/index.php +++ b/admin/report/backups/index.php @@ -43,7 +43,7 @@ /// Decide when to show last execution logs or detailed logs /// Lastlog view if (!$courseid) { - print_heading($backuploglaststatus); + echo $OUTPUT->heading($backuploglaststatus); print_simple_box_start('center'); /// Now, get every record from backup_courses $courses = $DB->get_records("backup_courses"); @@ -85,10 +85,10 @@ print_simple_box_end(); /// Detailed View !! } else { - print_heading($backuplogdetailed); + echo $OUTPUT->heading($backuplogdetailed); $coursename = $DB->get_field("course", "fullname", array("id"=>"$courseid")); - print_heading("$strcourse: $coursename"); + echo $OUTPUT->heading("$strcourse: $coursename"); print_simple_box_start('center'); diff --git a/admin/report/capability/index.php b/admin/report/capability/index.php index 7256f8b7640..3c701c8f3b1 100644 --- a/admin/report/capability/index.php +++ b/admin/report/capability/index.php @@ -71,7 +71,7 @@ if (count($cleanedroleids) == count($allroles)) { // Print the settings form. print_box_start('generalbox boxwidthwide boxaligncenter centerpara'); echo ''; -print_heading(get_string('reportsettings', 'report_capability')); +echo $OUTPUT->heading(get_string('reportsettings', 'report_capability')); echo '

', get_string('intro', 'report_capability') , '

'; echo '

'; choose_from_menu($capabilitychoices, 'capability', $capability, 'choose', '', '', false, false, 0, '', true); @@ -143,8 +143,7 @@ if ($capability) { } // Print the report heading. - print_heading(get_string('reportforcapability', 'report_capability', get_capability_string($capability)), - '', 2, 'main', false, 'report'); + echo $OUTPUT->heading(get_string('reportforcapability', 'report_capability', get_capability_string($capability)), 2, 'main', 'report'); if (count($cleanedroleids) != count($allroles)) { $rolenames = array(); foreach ($cleanedroleids as $roleid) { diff --git a/admin/report/configlog/index.php b/admin/report/configlog/index.php index ee567dea8f1..723e84ad38c 100644 --- a/admin/report/configlog/index.php +++ b/admin/report/configlog/index.php @@ -12,7 +12,7 @@ $dir = optional_param('dir', 'DESC', PARAM_ALPHA); admin_externalpage_setup('reportconfiglog'); admin_externalpage_print_header(); -print_heading(get_string('configlog', 'report_configlog')); +echo $OUTPUT->heading(get_string('configlog', 'report_configlog')); $changescount = $DB->count_records('config_log'); diff --git a/admin/report/courseoverview/index.php b/admin/report/courseoverview/index.php index b819514133a..84c5817f0a3 100644 --- a/admin/report/courseoverview/index.php +++ b/admin/report/courseoverview/index.php @@ -59,7 +59,7 @@ echo ''; echo ''; - print_heading($reportoptions[$report]); + echo $OUTPUT->heading($reportoptions[$report]); if (!empty($report) && !empty($time)) { diff --git a/admin/report/questioninstances/index.php b/admin/report/questioninstances/index.php index d4852422ca4..202fc671152 100644 --- a/admin/report/questioninstances/index.php +++ b/admin/report/questioninstances/index.php @@ -30,7 +30,7 @@ foreach ($QTYPES as $qtype) { // Print the settings form. print_box_start('generalbox boxwidthwide boxaligncenter centerpara'); echo '
'; -print_heading(get_string('reportsettings', 'report_questioninstances')); +echo $OUTPUT->heading(get_string('reportsettings', 'report_questioninstances')); echo '

', get_string('intro', 'report_questioninstances') , '

'; echo '

'; choose_from_menu($qtypechoices, 'qtype', $requestedqtype, get_string('all'), '', '_all_'); @@ -73,7 +73,7 @@ if ($requestedqtype) { ORDER BY numquestions DESC, numhidden ASC, con.contextlevel ASC, con.id ASC", $params); // Print the report heading. - print_heading($title); + echo $OUTPUT->heading($title); // Initialise the table. $table = new stdClass; diff --git a/admin/report/security/index.php b/admin/report/security/index.php index 1e8d2d92122..cdc0da88ede 100644 --- a/admin/report/security/index.php +++ b/admin/report/security/index.php @@ -46,7 +46,7 @@ if (array_search($issue, $issues, true) === false) { admin_externalpage_setup('reportsecurity'); admin_externalpage_print_header(); -print_heading(get_string('reportsecurity', 'report_security')); +echo $OUTPUT->heading(get_string('reportsecurity', 'report_security')); echo '

'.get_string('timewarning', 'report_security').'
'; while(@ob_end_flush()); @@ -124,4 +124,4 @@ if ($issue and ($result = $issue(true))) { print_table($table); } -print_footer(); \ No newline at end of file +print_footer(); diff --git a/admin/report/unittest/dbtest.php b/admin/report/unittest/dbtest.php index 34cdb92270a..ee352a00ce1 100644 --- a/admin/report/unittest/dbtest.php +++ b/admin/report/unittest/dbtest.php @@ -76,7 +76,7 @@ if (!empty($tests)) { $UNITTEST->func_test_db = $database; // pass the db to the tests through global - print_heading('Running tests on: '.$dbinfo['name'], '', 3); // TODO: localise + echo $OUTPUT->heading('Running tests on: '.$dbinfo['name'], 3); // TODO: localise // Create the group of tests. $test = new autogroup_test_coverage(false, true, $codecoverage); @@ -106,7 +106,7 @@ if (!empty($tests)) { echo $OUTPUT->box_start('generalbox boxwidthwide boxaligncenter'); echo ''; echo '
'; -print_heading("Run functional database tests"); // TODO: localise +echo $OUTPUT->heading("Run functional database tests"); // TODO: localise echo '

'; echo $OUTPUT->checkbox(html_select_option::make_checkbox(1, $showpasses, get_string('showpasses', 'simpletest')), 'showpasses') ; echo '

'; if (moodle_coverage_recorder::can_run_codecoverage()) { echo '

'; echo $OUTPUT->checkbox(html_select_option::make_checkbox(1, $codecoverage, get_string('codecoverageanalysis', 'simpletest')), 'codecoverage') ; echo '

'; diff --git a/admin/report/unittest/index.php b/admin/report/unittest/index.php index 3b74664762c..615ded66af2 100644 --- a/admin/report/unittest/index.php +++ b/admin/report/unittest/index.php @@ -58,7 +58,7 @@ if (!is_null($path)) { $reporter = new ExHtmlReporter($showpasses); if ($showsearch) { - print_heading('Searching for test cases'); + echo $OUTPUT->heading('Searching for test cases'); } flush(); @@ -88,7 +88,7 @@ if (!is_null($path)) { } else { $title = get_string('moodleunittests', $langfile, $displaypath); } - print_heading($title); + echo $OUTPUT->heading($title); set_time_limit(300); // 5 mins $test->run($reporter); } @@ -101,7 +101,7 @@ if (!is_null($path)) { } // Print the form for adjusting options. echo $OUTPUT->box_start('generalbox boxwidthwide boxaligncenter'); -print_heading($formheader); +echo $OUTPUT->heading($formheader); echo ''; echo '
'; echo '

'; echo $OUTPUT->checkbox(html_select_option::make_checkbox(1, $showpasses, get_string('showpasses', $langfile)), 'showpasses') ; echo '

'; @@ -125,12 +125,12 @@ if (true) { echo "

Fake test tables are disabled for now, sorry

"; // DO NOT LOCALISE!!! to be removed soon } else if (empty($CFG->unittestprefix)) { - print_heading(get_string('testdboperations', 'simpletest')); + echo $OUTPUT->heading(get_string('testdboperations', 'simpletest')); // TODO: localise echo '

Please add $CFG->unittestprefix="tst_"; or some other unique test table prefix if you want to execute all tests'; } else { - print_heading(get_string('testdboperations', 'simpletest')); + echo $OUTPUT->heading(get_string('testdboperations', 'simpletest')); echo '

'.get_string('unittestprefixsetting', 'simpletest', $CFG).'

'; echo ''; diff --git a/admin/repository.php b/admin/repository.php index 7ee03f0705d..8965a12dbbf 100644 --- a/admin/repository.php +++ b/admin/repository.php @@ -97,7 +97,7 @@ if (!empty($edit) || !empty($new)) { if ($success) { $savedstr = get_string('configsaved', 'repository'); admin_externalpage_print_header(); - print_heading($savedstr); + echo $OUTPUT->heading($savedstr); redirect($baseurl, $savedstr, 3); } else { print_error('instancenotsaved', 'repository', $baseurl); @@ -105,7 +105,7 @@ if (!empty($edit) || !empty($new)) { exit; } else { admin_externalpage_print_header(); - print_heading(get_string('configplugin', 'repository_'.$plugin)); + echo $OUTPUT->heading(get_string('configplugin', 'repository_'.$plugin)); $displaysettingform = true; if ($edit) { $typeoptionnames = repository::static_function($edit, 'get_type_option_names'); @@ -149,7 +149,7 @@ if (!empty($edit) || !empty($new)) { } if ($repositorytype->delete()) { $deletedstr = get_string('removed', 'repository'); - print_heading($deletedstr); + echo $OUTPUT->heading($deletedstr); redirect($baseurl, $deletedstr, 3); } else { print_error('instancenotdeleted', 'repository', $baseurl); diff --git a/admin/repositoryinstance.php b/admin/repositoryinstance.php index 70ed60ea152..d5165336446 100644 --- a/admin/repositoryinstance.php +++ b/admin/repositoryinstance.php @@ -81,7 +81,7 @@ if (!empty($edit) || !empty($new)) { if ($success) { $savedstr = get_string('configsaved', 'repository'); admin_externalpage_print_header(); - print_heading($savedstr); + echo $OUTPUT->heading($savedstr); redirect($baseurl, $savedstr, 3); } else { print_error('instancenotsaved', 'repository', $baseurl); @@ -89,7 +89,7 @@ if (!empty($edit) || !empty($new)) { exit; } else { admin_externalpage_print_header(); - print_heading(get_string('configplugin', 'repository_'.$plugin)); + echo $OUTPUT->heading(get_string('configplugin', 'repository_'.$plugin)); print_simple_box_start(); $mform->display(); print_simple_box_end(); @@ -115,7 +115,7 @@ if (!empty($edit) || !empty($new)) { } if ($instance->delete()) { $deletedstr = get_string('instancedeleted', 'repository'); - print_heading($deletedstr); + echo $OUTPUT->heading($deletedstr); redirect($baseurl, $deletedstr, 3); } else { print_error('instancenotdeleted', 'repository', $baseurl); diff --git a/admin/roles/assign.php b/admin/roles/assign.php index 3025499cdad..3bf0d0b7d60 100755 --- a/admin/roles/assign.php +++ b/admin/roles/assign.php @@ -380,7 +380,7 @@ } else if (empty($assignableroles)) { /// Print a message that there are no roles that can me assigned here. - print_heading(get_string('notabletoassignroleshere', 'role'), '', 3); + echo $OUTPUT->heading(get_string('notabletoassignroleshere', 'role'), 3); } else { /// Show UI for choosing a role to assign. @@ -391,7 +391,7 @@ } // Print instruction - print_heading(get_string('chooseroletoassign', 'role'), '', 3); + echo $OUTPUT->heading(get_string('chooseroletoassign', 'role'), 3); // sync metacourse enrolments if needed if ($inmeta) { diff --git a/admin/roles/check.php b/admin/roles/check.php index ae6a14d742a..141845dc4cc 100755 --- a/admin/roles/check.php +++ b/admin/roles/check.php @@ -151,7 +151,7 @@ $reportuser = $userselector->get_selected_user(); if (!is_null($reportuser)) { print_box_start('generalbox boxaligncenter boxwidthwide'); - print_heading(get_string('permissionsforuser', 'role', fullname($reportuser)), '', 3); + echo $OUTPUT->heading(get_string('permissionsforuser', 'role', fullname($reportuser)), 3); $table = new explain_capability_table($context, $reportuser, $contextname); $table->display(); @@ -176,7 +176,7 @@ } /// User selector. - print_heading('', '', 3); + echo $OUTPUT->heading('', 3); $userselector->display(); /// Submit button and the end of the form. diff --git a/admin/roles/explain.php b/admin/roles/explain.php index 90c73fa11d8..87f27dcf04a 100755 --- a/admin/roles/explain.php +++ b/admin/roles/explain.php @@ -178,7 +178,7 @@ $strperm = array( // Start the output. print_header(get_string('explainpermission', 'role')); -print_heading(get_string('explainpermission', 'role')); +echo $OUTPUT->heading(get_string('explainpermission', 'role')); // Print a summary of what we are doing. $a = new stdClass; diff --git a/admin/roles/override.php b/admin/roles/override.php index c8cf6ee85bc..4ffc4c98e8b 100755 --- a/admin/roles/override.php +++ b/admin/roles/override.php @@ -238,7 +238,7 @@ } else if (empty($overridableroles)) { /// Print a message that there are no roles that can me assigned here. - print_heading(get_string('notabletooverrideroleshere', 'role'), 'center', 3); + echo $OUTPUT->heading(get_string('notabletooverrideroleshere', 'role'), 3, 'mdl-align'); } else { /// Show UI for choosing a role to assign. diff --git a/admin/roles/usersroles.php b/admin/roles/usersroles.php index 60c7290c7df..3264b655d2c 100644 --- a/admin/roles/usersroles.php +++ b/admin/roles/usersroles.php @@ -144,7 +144,7 @@ if ($courseid != SITEID) { $showroles = 1; $currenttab = 'usersroles'; include_once($CFG->dirroot.'/user/tabs.php'); -print_heading($title, '', 3); +echo $OUTPUT->heading($title, 3); print_box_start('generalbox boxaligncenter boxwidthnormal'); // Display them. @@ -175,7 +175,7 @@ function print_report_tree($contextid, $contexts, $systemcontext, $fullname) { $context = $contexts[$contextid]; // Print the context name. - print_heading(print_context_name($contexts[$contextid]), '', 4, 'contextname'); + echo $OUTPUT->heading(print_context_name($contexts[$contextid]), 4, 'contextname'); // If there are any role assignments here, print them. foreach ($context->roleassignments as $ra) { diff --git a/admin/settings.php b/admin/settings.php index 58bd013e705..7cefc1de379 100644 --- a/admin/settings.php +++ b/admin/settings.php @@ -118,7 +118,7 @@ if (empty($SITE->fullname)) { echo $PAGE->url->hidden_params_out(); echo ''; echo ''; - print_heading($settingspage->visiblename); + echo $OUTPUT->heading($settingspage->visiblename); echo $settingspage->output_html(); diff --git a/admin/timezone.php b/admin/timezone.php index d09f0e6cdd0..b3c1578ef37 100644 --- a/admin/timezone.php +++ b/admin/timezone.php @@ -20,7 +20,7 @@ print_header($strtimezone, $strtimezone, build_navigation(array(array('name' => $strtimezone, 'link' => null, 'type' => 'misc')))); - print_heading(""); + echo $OUTPUT->heading(""); if (data_submitted() and !empty($zone) and confirm_sesskey()) { echo "
"; diff --git a/admin/timezoneimport.php b/admin/timezoneimport.php index 89a4459750c..bdb81175f94 100644 --- a/admin/timezoneimport.php +++ b/admin/timezoneimport.php @@ -18,7 +18,7 @@ admin_externalpage_print_header(); - print_heading($strimporttimezones); + echo $OUTPUT->heading($strimporttimezones); if (!$ok or !confirm_sesskey()) { $message = '

'; @@ -92,7 +92,7 @@ $a = null; $a->count = count($timezones); $a->source = $importdone; - print_heading(get_string('importtimezonescount', 'admin', $a), '', 3); + echo $OUTPUT->heading(get_string('importtimezonescount', 'admin', $a), 3); print_continue('index.php'); @@ -117,7 +117,7 @@ print_simple_box_end(); } else { - print_heading(get_string('importtimezonesfailed', 'admin'), '', 3); + echo $OUTPUT->heading(get_string('importtimezonesfailed', 'admin'), 3); print_continue('index.php'); } diff --git a/admin/uploaduser.php b/admin/uploaduser.php index 07baf3c9592..ba104f865c6 100755 --- a/admin/uploaduser.php +++ b/admin/uploaduser.php @@ -130,7 +130,7 @@ if ($formdata = $mform->is_cancelled()) { } else if ($formdata = $mform->get_data()) { // Print the header admin_externalpage_print_header(); - print_heading(get_string('uploadusersresult', 'admin')); + echo $OUTPUT->heading(get_string('uploadusersresult', 'admin')); $optype = $formdata->uutype; diff --git a/admin/user.php b/admin/user.php index 4d35597fe85..4b2fd933a47 100644 --- a/admin/user.php +++ b/admin/user.php @@ -71,7 +71,7 @@ if ($confirm != md5($delete)) { admin_externalpage_print_header(); $fullname = fullname($user, true); - print_heading(get_string('deleteuser', 'admin')); + echo $OUTPUT->heading(get_string('deleteuser', 'admin')); $optionsyes = array('delete'=>$delete, 'confirm'=>md5($delete), 'sesskey'=>sesskey()); notice_yesno(get_string('deletecheckfull', '', "'$fullname'"), 'user.php', 'user.php', $optionsyes, NULL, 'post', 'get'); admin_externalpage_print_footer(); @@ -156,10 +156,10 @@ $usersearchcount = get_users(false, '', true, null, "", '', '', '', '', '*', $extrasql, $params); if ($extrasql !== '') { - print_heading("$usersearchcount / $usercount ".get_string('users')); + echo $OUTPUT->heading("$usersearchcount / $usercount ".get_string('users')); $usercount = $usersearchcount; } else { - print_heading("$usercount ".get_string('users')); + echo $OUTPUT->heading("$usercount ".get_string('users')); } $alphabet = explode(',', get_string('alphabet')); @@ -173,7 +173,7 @@ if (!$users) { $match = array(); - print_heading(get_string('nousersfound')); + echo $OUTPUT->heading(get_string('nousersfound')); $table = NULL; @@ -293,14 +293,14 @@ $ufiltering->display_active(); if (has_capability('moodle/user:create', $sitecontext)) { - print_heading(''.get_string('addnewuser').''); + echo $OUTPUT->heading(''.get_string('addnewuser').''); } if (!empty($table)) { print_table($table); print_paging_bar($usercount, $page, $perpage, "user.php?sort=$sort&dir=$dir&perpage=$perpage&"); if (has_capability('moodle/user:create', $sitecontext)) { - print_heading(''.get_string('addnewuser').''); + echo $OUTPUT->heading(''.get_string('addnewuser').''); } } diff --git a/admin/user/user_bulk_confirm.php b/admin/user/user_bulk_confirm.php index 2935ad4adfc..7d71c2af807 100755 --- a/admin/user/user_bulk_confirm.php +++ b/admin/user/user_bulk_confirm.php @@ -46,9 +46,9 @@ if ($confirm and confirm_sesskey()) { $optionsyes = array(); $optionsyes['confirm'] = 1; $optionsyes['sesskey'] = sesskey(); - print_heading(get_string('confirmation', 'admin')); + echo $OUTPUT->heading(get_string('confirmation', 'admin')); notice_yesno(get_string('confirmcheckfull', '', $usernames), 'user_bulk_confirm.php', 'user_bulk.php', $optionsyes, NULL, 'post', 'get'); } admin_externalpage_print_footer(); -?> \ No newline at end of file +?> diff --git a/admin/user/user_bulk_delete.php b/admin/user/user_bulk_delete.php index 099d288676c..41127a0dc45 100755 --- a/admin/user/user_bulk_delete.php +++ b/admin/user/user_bulk_delete.php @@ -46,7 +46,7 @@ if ($confirm and confirm_sesskey()) { $optionsyes = array(); $optionsyes['confirm'] = 1; $optionsyes['sesskey'] = sesskey(); - print_heading(get_string('confirmation', 'admin')); + echo $OUTPUT->heading(get_string('confirmation', 'admin')); notice_yesno(get_string('deletecheckfull', '', $usernames), 'user_bulk_delete.php', 'user_bulk.php', $optionsyes, NULL, 'post', 'get'); } diff --git a/admin/user/user_bulk_display.php b/admin/user/user_bulk_display.php index 79bcbf1ab3a..25aa2f8ed0c 100755 --- a/admin/user/user_bulk_display.php +++ b/admin/user/user_bulk_display.php @@ -72,10 +72,10 @@ foreach($users as $user) { ); } -print_heading("$usercount / $usertotal ".get_string('users')); +echo $OUTPUT->heading("$usercount / $usertotal ".get_string('users')); print_table($table); print_continue($return); admin_externalpage_print_footer(); -?> \ No newline at end of file +?> diff --git a/admin/user/user_bulk_download.php b/admin/user/user_bulk_download.php index 34cbe3ccaa7..0ee20bdb51c 100755 --- a/admin/user/user_bulk_download.php +++ b/admin/user/user_bulk_download.php @@ -54,7 +54,7 @@ if ($format) { } admin_externalpage_print_header(); -print_heading(get_string('download', 'admin')); +echo $OUTPUT->heading(get_string('download', 'admin')); print_box_start(); echo '
    '; diff --git a/admin/user/user_bulk_enrol.php b/admin/user/user_bulk_enrol.php index 36c5a84061b..737f76d2f08 100644 --- a/admin/user/user_bulk_enrol.php +++ b/admin/user/user_bulk_enrol.php @@ -123,7 +123,7 @@ foreach($users as $user) } $table->data[] = $temparray; } -print_heading("$usercount / $usertotal ".get_string('users')); +echo $OUTPUT->heading("$usercount / $usertotal ".get_string('users')); print_table($table); echo '
    '; echo ''; diff --git a/admin/user/user_bulk_message.php b/admin/user/user_bulk_message.php index 3b9b2d0a227..c5c92768d60 100755 --- a/admin/user/user_bulk_message.php +++ b/admin/user/user_bulk_message.php @@ -60,7 +60,7 @@ if ($msgform->is_cancelled()) { $optionsyes['sesskey'] = sesskey(); $optionsyes['msg'] = $msg; admin_externalpage_print_header(); - print_heading(get_string('confirmation', 'admin')); + echo $OUTPUT->heading(get_string('confirmation', 'admin')); print_box($msg, 'boxwidthnarrow boxaligncenter generalbox', 'preview'); notice_yesno(get_string('confirmmessage', 'bulkusers', $usernames), 'user_bulk_message.php', 'user_bulk.php', $optionsyes, NULL, 'post', 'get'); admin_externalpage_print_footer(); diff --git a/admin/xmldb/index.php b/admin/xmldb/index.php index ffad1bdac45..f5b67332efd 100644 --- a/admin/xmldb/index.php +++ b/admin/xmldb/index.php @@ -100,7 +100,7 @@ /// Go with standard admin header admin_externalpage_print_header(); - print_heading($xmldb_action->getTitle()); + echo $OUTPUT->heading($xmldb_action->getTitle()); echo $xmldb_action->getOutput(); admin_externalpage_print_footer(); break;