MDL-19825 Migrated calls to print_heading

This commit is contained in:
nicolasconnault
2009-08-06 08:15:05 +00:00
parent be96a47206
commit 8fa89bfd04
16 changed files with 40 additions and 40 deletions
+1 -1
View File
@@ -55,7 +55,7 @@ print_header("$course->shortname: ".get_string('extendenrol'), $course->fullname
// this will contain all available the based On select options, but we'll disable some on them on a per user basis
print_heading($straddnote);
echo $OUTPUT->heading($straddnote);
echo '<form method="post" action="addnote.php">';
echo '<fieldset class="invisiblefieldset">';
echo '<input type="hidden" name="id" value="'.$course->id.'" />';
+1 -1
View File
@@ -83,7 +83,7 @@
if ($user->deleted) {
print_header();
print_heading(get_string('userdeleted'));
echo $OUTPUT->heading(get_string('userdeleted'));
print_footer($course);
die;
}
+2 -2
View File
@@ -61,7 +61,7 @@
if ($user->deleted) {
print_header();
print_heading(get_string('userdeleted'));
echo $OUTPUT->heading(get_string('userdeleted'));
print_footer($course);
die;
}
@@ -198,7 +198,7 @@
} else {
admin_externalpage_print_header();
$userfullname = fullname($user, true);
print_heading($userfullname);
echo $OUTPUT->heading($userfullname);
}
} else if (!empty($USER->newadminuser)) {
$strinstallation = get_string('installation', 'install');
+1 -1
View File
@@ -112,7 +112,7 @@ if($course->enrollable == 2) {
}
$title = get_string('extendenrol');
print_heading($title . helpbutton('extendenrol', $title, 'moodle', true, false, '', true));
echo $OUTPUT->heading($title . helpbutton('extendenrol', $title, 'moodle', true, false, '', true));
echo "<form method=\"post\" action=\"extendenrol.php\">\n";
echo '<input type="hidden" name="id" value="'.$course->id.'" />';
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
+1 -1
View File
@@ -53,7 +53,7 @@ print_header("$course->shortname: ".get_string('extendenrol'), $course->fullname
// this will contain all available the based On select options, but we'll disable some on them on a per user basis
print_heading($straddnote);
echo $OUPTUT->heading($straddnote);
echo '<form method="post" action="groupaddnote.php" >';
echo '<div style="width:100%;text-align:center;">';
echo '<input type="hidden" name="id" value="'.$course->id.'" />';
+1 -1
View File
@@ -109,7 +109,7 @@ if($course->enrollable == 2) {
}
$title = get_string('groupextendenrol');
print_heading($title . helpbutton('groupextendenrol', $title, 'moodle', true, false, '', true));
echo $OUTPUT->heading($title . helpbutton('groupextendenrol', $title, 'moodle', true, false, '', true));
echo '<form method="post" action="groupextendenrol.php">';
echo '<input type="hidden" name="id" value="'.$course->id.'" />';
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
+6 -6
View File
@@ -154,7 +154,7 @@
$navigation = build_navigation($navlinks);
print_header("$course->shortname: ".get_string('participants'), $course->fullname, $navigation, "", "", true, "&nbsp;", navmenu($course));
print_heading(get_string("notingroup"));
echo $OUTPUT->heading(get_string("notingroup"));
print_footer($course);
exit;
}
@@ -615,7 +615,7 @@
$heading .= ' <a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/roles/assign.php?roleid='.$roleid.'&amp;contextid='.$context->id.'">';
$heading .= '<img src="'.$OUTPUT->old_icon_url('i/edit') . '" class="icon" alt="" /></a>';
}
print_heading($heading, 'center', 3);
echo $OUTPUT->heading($heading, 3, 'mdl-align');
} else {
if ($course->id != SITEID && has_capability('moodle/role:assign', $context)) {
$editlink = ' <a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/roles/assign.php?contextid='.$context->id.'">';
@@ -629,9 +629,9 @@
$strallparticipants = get_string('allparticipants');
}
if ($matchcount < $totalcount) {
print_heading($strallparticipants.': '.$matchcount.'/'.$totalcount . $editlink, '', 3);
echo $OUTPUT->heading($strallparticipants.': '.$matchcount.'/'.$totalcount . $editlink, 3);
} else {
print_heading($strallparticipants.': '.$matchcount . $editlink, '', 3);
echo $OUTPUT->heading($strallparticipants.': '.$matchcount . $editlink, 3);
}
}
@@ -650,7 +650,7 @@
if ($mode===MODE_USERDETAILS) { // Print simple listing
if ($totalcount < 1) {
print_heading(get_string('nothingtodisplay'));
echo $OUTPUT->heading(get_string('nothingtodisplay'));
} else {
if ($totalcount > $perpage) {
@@ -810,7 +810,7 @@
}
} else {
print_heading(get_string('nothingtodisplay'));
echo $OUTPUT->heading(get_string('nothingtodisplay'));
}
}
+3 -3
View File
@@ -82,7 +82,7 @@
} else {
$heading = get_string('addedrecips','moodle',$count);
}
print_heading($heading);
echo $OUPTUT->heading($heading);
}
if (!empty($messagebody) && !$edit && !$deluser && ($preview || $send)) {
@@ -103,11 +103,11 @@
$good = $good && message_post_message($USER,$user,$messagebody,$format,'direct');
}
if (!empty($good)) {
print_heading(get_string('messagedselectedusers'));
echo $OUPTUT->heading(get_string('messagedselectedusers'));
unset($SESSION->emailto[$id]);
unset($SESSION->emailselect[$id]);
} else {
print_heading(get_string('messagedselectedusersfailed'));
echo $OUPTUT->heading(get_string('messagedselectedusersfailed'));
}
echo '<p align="center"><a href="index.php?id='.$id.'">'.get_string('backtoparticipants').'</a></p>';
}
+1 -1
View File
@@ -35,7 +35,7 @@
print_header($strpolicyagreement, $SITE->fullname, build_navigation(array(array('name'=>$strpolicyagreement, 'link'=>null, 'type'=>'misc'))));
print_heading($strpolicyagreement);
echo $OUTPUT->heading($strpolicyagreement);
$mimetype = mimeinfo('type', $CFG->sitepolicy);
if ($mimetype == 'document/unknown') {
+2 -2
View File
@@ -61,7 +61,7 @@ if (!empty($config)) {
}
exit;
} else {
print_heading(get_string('configplugin', 'portfolio'));
echo $OUTPUT->heading(get_string('configplugin', 'portfolio'));
print_simple_box_start();
$mform->display();
print_simple_box_end();
@@ -74,7 +74,7 @@ if (!empty($config)) {
}
if ($display) {
print_heading($configstr);
echo $OUTPUT->heading($configstr);
print_simple_box_start();
if (!$instances = portfolio_instances(true, false)) {
+2 -2
View File
@@ -55,7 +55,7 @@ if (count($queued) > 0) {
);
unset($e); // this could potentially be quite big, so free it.
}
print_heading(get_string('queuesummary', 'portfolio'));
echo $OUPTUT->heading(get_string('queuesummary', 'portfolio'));
print_table($table);
}
$logcount = $DB->count_records('portfolio_log', array('userid' => $USER->id));
@@ -84,7 +84,7 @@ if ($logcount > 0) {
userdate($log->time),
);
}
print_heading(get_string('logsummary', 'portfolio'));
echo $OUPTUT->heading(get_string('logsummary', 'portfolio'));
print_paging_bar($logcount, $page, $perpage, $CFG->wwwroot . '/user/portfoliologs.php?');
print_table($table);
print_paging_bar($logcount, $page, $perpage, $CFG->wwwroot . '/user/portfoliologs.php?');
+4 -4
View File
@@ -405,7 +405,7 @@ function profile_list_categories() {
/// Are we adding or editing a cateogory?
function profile_edit_category($id, $redirect) {
global $CFG, $DB;
global $CFG, $DB, $OUTPUT;
require_once('index_category_form.php');
$categoryform = new category_form();
@@ -438,7 +438,7 @@ function profile_edit_category($id, $redirect) {
/// Print the page
admin_externalpage_print_header();
print_heading($strheading);
echo $OUPTUT->heading($strheading);
$categoryform->display();
admin_externalpage_print_footer();
die;
@@ -447,7 +447,7 @@ function profile_edit_category($id, $redirect) {
}
function profile_edit_field($id, $datatype, $redirect) {
global $CFG, $DB;
global $CFG, $DB, $OUTPUT;
if (!$field = $DB->get_record('user_info_field', array('id'=>$id))) {
$field = new object();
@@ -482,7 +482,7 @@ function profile_edit_field($id, $datatype, $redirect) {
/// Print the page
admin_externalpage_print_header();
print_heading($strheading);
echo $OUPTUT->heading($strheading);
$fieldform->display();
admin_externalpage_print_footer();
die;
+4 -4
View File
@@ -52,7 +52,7 @@ switch ($action) {
$fieldcount = $DB->count_records('user_info_field', array('categoryid'=>$id));
$optionsyes = array ('id'=>$id, 'confirm'=>1, 'action'=>'deletecategory', 'sesskey'=>sesskey());
admin_externalpage_print_header();
print_heading('profiledeletecategory', 'admin');
echo $OUPTUT->heading('profiledeletecategory', 'admin');
notice_yesno(get_string('profileconfirmcategorydeletion', 'admin', $fieldcount), $redirect, $redirect, $optionsyes, null, 'post', 'get');
admin_externalpage_print_footer();
die;
@@ -70,7 +70,7 @@ switch ($action) {
$datacount = $DB->count_records('user_info_data', array('fieldid'=>$id));
$optionsyes = array ('id'=>$id, 'confirm'=>1, 'action'=>'deletefield', 'sesskey'=>sesskey());
admin_externalpage_print_header();
print_heading('profiledeletefield', 'admin');
echo $OUPTUT->heading('profiledeletefield', 'admin');
notice_yesno(get_string('profileconfirmfielddeletion', 'admin', $datacount), $redirect, $redirect, $optionsyes, null, 'post', 'get');
admin_externalpage_print_footer();
die;
@@ -94,7 +94,7 @@ switch ($action) {
/// Print the header
admin_externalpage_print_header();
print_heading(get_string('profilefields', 'admin'));
echo $OUPTUT->heading(get_string('profilefields', 'admin'));
/// Check that we have at least one category defined
if ($DB->count_records('user_info_category') == 0) {
@@ -122,7 +122,7 @@ foreach ($categories as $category) {
}
}
print_heading(format_string($category->name) .' '.profile_category_icons($category));
echo $OUPTUT->heading(format_string($category->name) .' '.profile_category_icons($category));
if (count($table->data)) {
print_table($table);
} else {
+1 -1
View File
@@ -32,7 +32,7 @@ print_header("$course->fullname: $fullname: $strrepos", $course->fullname,
$currenttab = 'repositories';
include('tabs.php');
print_heading($configstr);
echo $OUTPUT->heading($configstr);
print_simple_box_start();
if (!$instances = repository::get_instances($COURSE->context, $USER->id)) {
+4 -4
View File
@@ -34,7 +34,7 @@
if ($filtertype == 'site') {
$site = get_site();
print_heading(format_string($site->fullname));
echo $OUTPUT->heading(format_string($site->fullname));
if ($CFG->bloglevel >= 4) {
if (has_capability('moodle/site:viewparticipants', $systemcontext)) {
@@ -53,7 +53,7 @@
$course = $DB->get_record('course', array('id'=>$filterselect));
$coursecontext = get_context_instance(CONTEXT_COURSE, $course->id);
print_heading(format_string($course->fullname));
echo $OUTPUT->heading(format_string($course->fullname));
$toprow[] = new tabobject('participants', $CFG->wwwroot.'/user/index.php?id='.$filterselect,
get_string('participants'));
@@ -72,7 +72,7 @@
} else if ($filtertype == 'group' && $filterselect) {
$group_name = groups_get_group_name($filterselect);
print_heading($group_name);
echo $OUTPUT->heading($group_name);
if ($CFG->bloglevel >= 2) {
@@ -90,7 +90,7 @@
if (isset($userid)) {
$user = $DB->get_record('user', array('id'=>$userid));
}
print_heading(fullname($user, has_capability('moodle/site:viewfullnames', get_context_instance(CONTEXT_COURSE, $course->id))));
echo $OUTPUT->heading(fullname($user, has_capability('moodle/site:viewfullnames', get_context_instance(CONTEXT_COURSE, $course->id))));
$coursecontext = get_context_instance(CONTEXT_COURSE, $course->id);
$personalcontext = get_context_instance(CONTEXT_USER, $user->id);
+6 -6
View File
@@ -91,7 +91,7 @@
$navigation = build_navigation($navlinks);
print_header("$strpersonalprofile: ", "$strpersonalprofile: ", $navigation, "", "", true, "&nbsp;", navmenu($course));
print_heading(get_string('usernotavailable', 'error'));
echo $OUTPUT->heading(get_string('usernotavailable', 'error'));
print_footer($course);
exit;
}
@@ -107,12 +107,12 @@
$navlinks[] = array('name' => $fullname, 'link' => null, 'type' => 'misc');
$navigation = build_navigation($navlinks);
print_header("$strpersonalprofile: ", "$strpersonalprofile: ", $navigation, "", "", true, "&nbsp;", navmenu($course));
print_heading(get_string('notenrolled', '', $fullname));
echo $OUTPUT->heading(get_string('notenrolled', $fullname));
} else {
$navlinks[] = array('name' => $struser, 'link' => null, 'type' => 'misc');
$navigation = build_navigation($navlinks);
print_header("$strpersonalprofile: ", "$strpersonalprofile: ", $navigation, "", "", true, "&nbsp;", navmenu($course));
print_heading(get_string('notenrolledprofile'));
echo $OUPTUT->heading(get_string('notenrolledprofile'));
}
print_continue($_SERVER['HTTP_REFERER']);
print_footer($course);
@@ -148,14 +148,14 @@
if (($course->id != SITEID) and ! isguest() ) { // Need to have access to a course to see that info
if (!has_capability('moodle/course:view', $coursecontext, $user->id)) {
print_heading(get_string('notenrolled', '', $fullname));
echo $OUPTUT->heading(get_string('notenrolled', '', $fullname));
print_footer($course);
die;
}
}
if ($user->deleted) {
print_heading(get_string('userdeleted'));
echo $OUPTUT->heading(get_string('userdeleted'));
if (!has_capability('moodle/user:update', $coursecontext)) {
print_footer($course);
die;
@@ -540,7 +540,7 @@
if ($CFG->debugdisplay && debugging('', DEBUG_DEVELOPER) && $USER->id == $user->id) { // Show user object
echo '<hr />';
print_heading('DEBUG MODE: User session variables');
echo $OUPTUT->heading('DEBUG MODE: User session variables');
print_object($USER);
}