Commit 2fff8846 authored by nicolasconnault's avatar nicolasconnault
Browse files

MDL-19787 Migrated calls to print_heading

parent c018f973
......@@ -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>';
......
......@@ -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.');
......
......@@ -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');
......
......@@ -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();
......@@ -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());
......
......@@ -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>';
......
......@@ -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");
......
......@@ -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()) {
......
......@@ -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'),
......
......@@ -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);
......
......@@ -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>';
......
......@@ -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();
......
......@@ -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');
......
......@@ -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");
......
......@@ -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;
......
......@@ -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">
......
<?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.
......
......@@ -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
......
......@@ -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');
......
......@@ -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 *
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment