MDL-19787 Migrated calls to print_heading

This commit is contained in:
nicolasconnault 2009-08-06 08:17:12 +00:00
parent c018f97328
commit 2fff8846f2
51 changed files with 110 additions and 109 deletions

View File

@ -65,7 +65,7 @@ echo "<input type=\"hidden\" name=\"auth\" value=\"".$auth."\" />\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 '<tr><td colspan="3">';
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 '</td></tr>';

View File

@ -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.');

View File

@ -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');

View File

@ -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 '<p>', get_string('transferdbintro', 'dbtransfer'), "</p>\n\n";
$form->display();
admin_externalpage_print_footer();

View File

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

View File

@ -115,7 +115,7 @@
echo '<form '.$CFG->frametarget.' id="adminsettings" method="post" action="enrol.php">';
echo '<div class="settingsform clearfix">';
print_heading(get_string('commonsettings', 'admin'));
echo $OUTPUT->heading(get_string('commonsettings', 'admin'));
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
echo '<input type="hidden" name="savesettings" value="1" />';
echo '<fieldset>';

View File

@ -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");

View File

@ -57,7 +57,7 @@
/// Print the component download link
echo '<div class="reportlink"><a href="environment.php?action=updatecomponent&amp;sesskey='.sesskey().'">'.$strupdate.'</a></div>';
print_heading($strenvironment);
echo $OUTPUT->heading($strenvironment);
/// Handle the 'updatecomponent' action
if ($action == 'updatecomponent' && confirm_sesskey()) {

View File

@ -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&amp;filterpath=' . $filterpath . '&amp;confirm=1&amp;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'),

View File

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

View File

@ -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 '</div>';
}
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 '<dl class="healthissues '.$data['severity'].'">';
echo '<dt>'.$data['title'].'</dt>';
echo '<dd>'.$data['description'].'</dd>';

View File

@ -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, '&nbsp;', '&nbsp;');
print_heading('<a href="http://moodle.org">Moodle</a> - Modular Object-Oriented Dynamic Learning Environment');
print_heading(get_string('copyrightnotice'));
echo $OUTPUT->heading('<a href="http://moodle.org">Moodle</a> - 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, '&nbsp;', '&nbsp;');
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, '&nbsp;', '&nbsp;');
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, '&nbsp;', '&nbsp;');
print_heading($strplugincheck);
echo $OUTPUT->heading($strplugincheck);
print_box_start('generalbox', 'notice');
print_string('pluginchecknotice');
print_box_end();

View File

@ -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');

View File

@ -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('<a href="#missing1">'.$strgotofirst.'</a>', "", 4);
echo $OUTPUT->heading('<a href="#missing1">'.$strgotofirst.'</a>', 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 '<hr />';
print_heading('Debugging info');
echo $OUTPUT->heading('Debugging info');
echo '<pre class="notifytiny">';
print_r($dbg);
print_r("\n\$currentfile = $currentfile");

View File

@ -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;

View File

@ -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'));
?>
<div id="trustedhosts"><!-- See theme/standard/styles_layout.css #trustedhosts .generaltable for rules -->
<table class="generalbox standard" border="0" cellpadding="5" cellspacing="0">

View File

@ -1,6 +1,6 @@
<?php
admin_externalpage_print_header();
print_heading(get_string('themes'));
echo $OUTPUT->heading(get_string('themes'));
$original_theme = fullclone($THEME);
$logurl = $CFG->wwwroot.
'/course/report/log/index.php?chooselog=1&amp;showusers=1&amp;showcourses=1&amp;host_course='.$mnet_peer->id.

View File

@ -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

View File

@ -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');

View File

@ -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 '<center>';
}
@ -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 *

View File

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

View File

@ -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 . '&amp;confirm=1&amp;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');

View File

@ -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%");

View File

@ -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

View File

@ -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');

View File

@ -71,7 +71,7 @@ if (count($cleanedroleids) == count($allroles)) {
// Print the settings form.
print_box_start('generalbox boxwidthwide boxaligncenter centerpara');
echo '<form method="get" action="." id="settingsform">';
print_heading(get_string('reportsettings', 'report_capability'));
echo $OUTPUT->heading(get_string('reportsettings', 'report_capability'));
echo '<p id="intro">', get_string('intro', 'report_capability') , '</p>';
echo '<p><label for="menucapability"> ' . get_string('capabilitylabel', 'report_capability') . '</label></p>';
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) {

View File

@ -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');

View File

@ -59,7 +59,7 @@
echo '</div>';
echo '</form>';
print_heading($reportoptions[$report]);
echo $OUTPUT->heading($reportoptions[$report]);
if (!empty($report) && !empty($time)) {

View File

@ -30,7 +30,7 @@ foreach ($QTYPES as $qtype) {
// Print the settings form.
print_box_start('generalbox boxwidthwide boxaligncenter centerpara');
echo '<form method="get" action="." id="settingsform"><div>';
print_heading(get_string('reportsettings', 'report_questioninstances'));
echo $OUTPUT->heading(get_string('reportsettings', 'report_questioninstances'));
echo '<p id="intro">', get_string('intro', 'report_questioninstances') , '</p>';
echo '<p><label for="menuqtype"> ' . get_string('questiontype', 'admin') . '</label> ';
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;

View File

@ -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 '<div id="timewarning">'.get_string('timewarning', 'report_security').'</div>';
while(@ob_end_flush());
@ -124,4 +124,4 @@ if ($issue and ($result = $issue(true))) {
print_table($table);
}
print_footer();
print_footer();

View File

@ -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 '<form method="post" action="dbtest.php">';
echo '<div>';
print_heading("Run functional database tests"); // TODO: localise
echo $OUTPUT->heading("Run functional database tests"); // TODO: localise
echo '<p>'; echo $OUTPUT->checkbox(html_select_option::make_checkbox(1, $showpasses, get_string('showpasses', 'simpletest')), 'showpasses') ; echo '</p>';
if (moodle_coverage_recorder::can_run_codecoverage()) {
echo '<p>'; echo $OUTPUT->checkbox(html_select_option::make_checkbox(1, $codecoverage, get_string('codecoverageanalysis', 'simpletest')), 'codecoverage') ; echo '</p>';

View File

@ -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 '<form method="get" action="index.php">';
echo '<fieldset class="invisiblefieldset">';
echo '<p>'; echo $OUTPUT->checkbox(html_select_option::make_checkbox(1, $showpasses, get_string('showpasses', $langfile)), 'showpasses') ; echo '</p>';
@ -125,12 +125,12 @@ if (true) {
echo "<p>Fake test tables are disabled for now, sorry</p>"; // 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 '<p>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 '<p>'.get_string('unittestprefixsetting', 'simpletest', $CFG).'</p>';
echo '<form style="display:inline" method="get" action="index.php">';

View File

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

View File

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

View File

@ -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) {

View File

@ -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('<label for="reportuser">' . $selectheading . '</label>', '', 3);
echo $OUTPUT->heading('<label for="reportuser">' . $selectheading . '</label>', 3);
$userselector->display();
/// Submit button and the end of the form.

View File

@ -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;

View File

@ -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.

View File

@ -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) {

View File

@ -118,7 +118,7 @@ if (empty($SITE->fullname)) {
echo $PAGE->url->hidden_params_out();
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
echo '<input type="hidden" name="return" value="'.$return.'" />';
print_heading($settingspage->visiblename);
echo $OUTPUT->heading($settingspage->visiblename);
echo $settingspage->output_html();

View File

@ -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 "<center>";

View File

@ -18,7 +18,7 @@
admin_externalpage_print_header();
print_heading($strimporttimezones);
echo $OUTPUT->heading($strimporttimezones);
if (!$ok or !confirm_sesskey()) {
$message = '<br /><br />';
@ -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');
}

View File

@ -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;

View File

@ -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('<a href="'.$securewwwroot.'/user/editadvanced.php?id=-1">'.get_string('addnewuser').'</a>');
echo $OUTPUT->heading('<a href="'.$securewwwroot.'/user/editadvanced.php?id=-1">'.get_string('addnewuser').'</a>');
}
if (!empty($table)) {
print_table($table);
print_paging_bar($usercount, $page, $perpage,
"user.php?sort=$sort&amp;dir=$dir&amp;perpage=$perpage&amp;");
if (has_capability('moodle/user:create', $sitecontext)) {
print_heading('<a href="'.$securewwwroot.'/user/editadvanced.php?id=-1">'.get_string('addnewuser').'</a>');
echo $OUTPUT->heading('<a href="'.$securewwwroot.'/user/editadvanced.php?id=-1">'.get_string('addnewuser').'</a>');
}
}

View File

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

View File

@ -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');
}

View File

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

View File

@ -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 '<ul>';

View File

@ -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 '<div class="continuebutton">';
echo '<input type="submit" name="multienrolsubmit" value="save changes" />';

View File

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

View File

@ -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;