Skip to content

Commit

Permalink
MDL-19787 Migrated calls to print_heading
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasconnault committed Aug 6, 2009
1 parent c018f97 commit 2fff884
Show file tree
Hide file tree
Showing 51 changed files with 110 additions and 109 deletions.
6 changes: 3 additions & 3 deletions admin/auth_config.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@

// 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();
Expand All @@ -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>';

Expand Down
2 changes: 1 addition & 1 deletion admin/block.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.');
Expand Down
6 changes: 3 additions & 3 deletions admin/blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -99,7 +99,7 @@
}

admin_externalpage_print_header();
print_heading($strmanageblocks);
echo $OUTPUT->heading($strmanageblocks);

/// Main display starts here

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

Expand Down
4 changes: 2 additions & 2 deletions admin/dbtransfer/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
// 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();
Expand All @@ -41,7 +41,7 @@

// 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();
2 changes: 1 addition & 1 deletion admin/delete.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
2 changes: 1 addition & 1 deletion admin/enrol.php
Original file line number Diff line number Diff line change
Expand Up @@ -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>';
Expand Down
2 changes: 1 addition & 1 deletion admin/enrol_config.php
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion admin/environment.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down
6 changes: 3 additions & 3 deletions admin/filters.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -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);
Expand Down Expand Up @@ -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'),
Expand Down
7 changes: 4 additions & 3 deletions admin/generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -1198,10 +1198,11 @@ public function setup() {
}

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);
Expand Down
9 changes: 5 additions & 4 deletions admin/health.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@

function health_find_problems() {

print_heading(get_string('healthcenter'));
echo $OUTPUT->heading(get_string('healthcenter'));

$issues = array(
SEVERITY_CRITICAL => array(),
Expand Down Expand Up @@ -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])) {
Expand All @@ -158,6 +158,7 @@ function health_find_problems() {
}

function health_print_solution($classname) {
global $OUTPUT;
$problem = new $classname;
$data = array(
'title' => $problem->title(),
Expand All @@ -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>';
Expand Down
10 changes: 5 additions & 5 deletions admin/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@
$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');
Expand All @@ -136,7 +136,7 @@
$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');
Expand Down Expand Up @@ -200,7 +200,7 @@
$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);
Expand All @@ -225,7 +225,7 @@
$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();
Expand Down
2 changes: 1 addition & 1 deletion admin/innodb.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
18 changes: 9 additions & 9 deletions admin/lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <> '') {
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion admin/mnet/access_control.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
$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;
Expand Down
2 changes: 1 addition & 1 deletion admin/mnet/delete.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
$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">
Expand Down
2 changes: 1 addition & 1 deletion admin/mnet/mnet_themes.html
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 2 additions & 2 deletions admin/modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down Expand Up @@ -179,7 +179,7 @@
}

admin_externalpage_print_header();
print_heading($stractivities);
echo $OUTPUT->heading($stractivities);

/// Get and sort the existing modules

Expand Down
2 changes: 1 addition & 1 deletion admin/multilangupgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
###################################################################
admin_externalpage_print_header();

print_heading(get_string('multilangupgrade', 'admin'));
echo $OUTPUT->heading(get_string('multilangupgrade', 'admin'));

$strmultilangupgrade = get_String('multilangupgradeinfo', 'admin');

Expand Down
6 changes: 3 additions & 3 deletions admin/oacleanup.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@


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

Expand Down Expand Up @@ -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 *
Expand Down
6 changes: 3 additions & 3 deletions admin/portfolio.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@
}
$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();
Expand All @@ -94,7 +94,7 @@
}
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);
Expand Down
Loading

0 comments on commit 2fff884

Please sign in to comment.