// 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();
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>';
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.');
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');
}
admin_externalpage_print_header();
- print_heading($strmanageblocks);
+ echo $OUTPUT->heading($strmanageblocks);
/// Main display starts here
$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');
// 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();
// 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();
$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());
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>';
/// 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");
/// Print the component download link
echo '<div class="reportlink"><a href="environment.php?action=updatecomponent&sesskey='.sesskey().'">'.$strupdate.'</a></div>';
- print_heading($strenvironment);
+ echo $OUTPUT->heading($strenvironment);
/// Handle the 'updatecomponent' action
if ($action == 'updatecomponent' && confirm_sesskey()) {
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');
// 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);
/// 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'),
}
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);
function health_find_problems() {
- print_heading(get_string('healthcenter'));
+ echo $OUTPUT->heading(get_string('healthcenter'));
$issues = array(
SEVERITY_CRITICAL => array(),
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])) {
}
function health_print_solution($classname) {
+ global $OUTPUT;
$problem = new $classname;
$data = array(
'title' => $problem->title(),
'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>';
$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('<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');
$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');
$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);
$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();
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');
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 <> '') {
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);
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;
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");
$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;
$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&showusers=1&showcourses=1&host_course='.$mnet_peer->id.
if (!empty($delete) and confirm_sesskey()) {
admin_externalpage_print_header();
- print_heading($stractivities);
+ echo $OUTPUT->heading($stractivities);
$strmodulename = get_string("modulename", "$delete");
}
admin_externalpage_print_header();
- print_heading($stractivities);
+ echo $OUTPUT->heading($stractivities);
/// Get and sort the existing modules
###################################################################
admin_externalpage_print_header();
-print_heading(get_string('multilangupgrade', 'admin'));
+echo $OUTPUT->heading(get_string('multilangupgrade', 'admin'));
$strmultilangupgrade = get_String('multilangupgradeinfo', 'admin');
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>';
}
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 *
}
$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();
}
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);
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');
// 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)) {
/// 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');
$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%");
###################################################################
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
/// 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");
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');
// 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);
}
// 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) {
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');
echo '</div>';
echo '</form>';
- print_heading($reportoptions[$report]);
+ echo $OUTPUT->heading($reportoptions[$report]);
if (!empty($report) && !empty($time)) {
// 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_');
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;
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());
print_table($table);
}
-print_footer();
\ No newline at end of file
+print_footer();
$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);
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>';
$reporter = new ExHtmlReporter($showpasses);
if ($showsearch) {
- print_heading('Searching for test cases');
+ echo $OUTPUT->heading('Searching for test cases');
}
flush();
} else {
$title = get_string('moodleunittests', $langfile, $displaypath);
}
- print_heading($title);
+ echo $OUTPUT->heading($title);
set_time_limit(300); // 5 mins
$test->run($reporter);
}
}
// 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>';
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">';
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);
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');
}
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);
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);
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();
}
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);
} 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.
}
// Print instruction
- print_heading(get_string('chooseroletoassign', 'role'), '', 3);
+ echo $OUTPUT->heading(get_string('chooseroletoassign', 'role'), 3);
// sync metacourse enrolments if needed
if ($inmeta) {
$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();
}
/// 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.
// 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;
} 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.
$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.
$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) {
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();
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>";
admin_externalpage_print_header();
- print_heading($strimporttimezones);
+ echo $OUTPUT->heading($strimporttimezones);
if (!$ok or !confirm_sesskey()) {
$message = '<br /><br />';
$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');
print_simple_box_end();
} else {
- print_heading(get_string('importtimezonesfailed', 'admin'), '', 3);
+ echo $OUTPUT->heading(get_string('importtimezonesfailed', 'admin'), 3);
print_continue('index.php');
}
} 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;
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();
$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'));
if (!$users) {
$match = array();
- print_heading(get_string('nousersfound'));
+ echo $OUTPUT->heading(get_string('nousersfound'));
$table = NULL;
$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&dir=$dir&perpage=$perpage&");
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>');
}
}
$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
+?>
$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');
}
);
}
-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
+?>
}
admin_externalpage_print_header();
-print_heading(get_string('download', 'admin'));
+echo $OUTPUT->heading(get_string('download', 'admin'));
print_box_start();
echo '<ul>';
}
$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" />';
$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();
/// 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;