From: nicolasconnault Date: Thu, 6 Aug 2009 08:15:05 +0000 (+0000) Subject: MDL-19825 Migrated calls to print_heading X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=8fa89bfd04220766d5bebac2653f8668b604e636;p=moodle.git MDL-19825 Migrated calls to print_heading --- diff --git a/user/addnote.php b/user/addnote.php index 93b25581f3..7896daec13 100644 --- a/user/addnote.php +++ b/user/addnote.php @@ -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 '
'; echo '
'; echo ''; diff --git a/user/edit.php b/user/edit.php index 0d42b5adc6..3f677954e3 100644 --- a/user/edit.php +++ b/user/edit.php @@ -83,7 +83,7 @@ if ($user->deleted) { print_header(); - print_heading(get_string('userdeleted')); + echo $OUTPUT->heading(get_string('userdeleted')); print_footer($course); die; } diff --git a/user/editadvanced.php b/user/editadvanced.php index 41e867f5e0..dd24fb443c 100644 --- a/user/editadvanced.php +++ b/user/editadvanced.php @@ -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'); diff --git a/user/extendenrol.php b/user/extendenrol.php index c44f2fd2fe..5319f217b1 100644 --- a/user/extendenrol.php +++ b/user/extendenrol.php @@ -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 "\n"; echo ''; echo ''; diff --git a/user/groupaddnote.php b/user/groupaddnote.php index 96c453bbe9..823880e763 100644 --- a/user/groupaddnote.php +++ b/user/groupaddnote.php @@ -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 ''; echo '
'; echo ''; diff --git a/user/groupextendenrol.php b/user/groupextendenrol.php index 8a64a5893f..7adca55c27 100755 --- a/user/groupextendenrol.php +++ b/user/groupextendenrol.php @@ -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 ''; echo ''; echo ''; diff --git a/user/index.php b/user/index.php index e925d6cabb..269a81015c 100644 --- a/user/index.php +++ b/user/index.php @@ -154,7 +154,7 @@ $navigation = build_navigation($navlinks); print_header("$course->shortname: ".get_string('participants'), $course->fullname, $navigation, "", "", true, " ", navmenu($course)); - print_heading(get_string("notingroup")); + echo $OUTPUT->heading(get_string("notingroup")); print_footer($course); exit; } @@ -615,7 +615,7 @@ $heading .= ' '; $heading .= ''; } - print_heading($heading, 'center', 3); + echo $OUTPUT->heading($heading, 3, 'mdl-align'); } else { if ($course->id != SITEID && has_capability('moodle/role:assign', $context)) { $editlink = ' '; @@ -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')); } } diff --git a/user/messageselect.php b/user/messageselect.php index 0ab50d50a6..386edb74ea 100644 --- a/user/messageselect.php +++ b/user/messageselect.php @@ -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 '

'.get_string('backtoparticipants').'

'; } diff --git a/user/policy.php b/user/policy.php index 00a58a6e88..897f05a6b9 100644 --- a/user/policy.php +++ b/user/policy.php @@ -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') { diff --git a/user/portfolio.php b/user/portfolio.php index c413fbe0af..933800ad63 100644 --- a/user/portfolio.php +++ b/user/portfolio.php @@ -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)) { diff --git a/user/portfoliologs.php b/user/portfoliologs.php index 18e0706fb2..e3cfa2c785 100644 --- a/user/portfoliologs.php +++ b/user/portfoliologs.php @@ -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?'); diff --git a/user/profile/definelib.php b/user/profile/definelib.php index 2e4ee0f9e4..064de8dea6 100644 --- a/user/profile/definelib.php +++ b/user/profile/definelib.php @@ -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; diff --git a/user/profile/index.php b/user/profile/index.php index 9752d0c017..72b04c80cf 100644 --- a/user/profile/index.php +++ b/user/profile/index.php @@ -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 { diff --git a/user/repository.php b/user/repository.php index 876e28d5c5..4f6db2bc5d 100644 --- a/user/repository.php +++ b/user/repository.php @@ -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)) { diff --git a/user/tabs.php b/user/tabs.php index ff61f18c9c..010488d80f 100644 --- a/user/tabs.php +++ b/user/tabs.php @@ -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); diff --git a/user/view.php b/user/view.php index 9e575d9fd5..c3b0e35f83 100644 --- a/user/view.php +++ b/user/view.php @@ -91,7 +91,7 @@ $navigation = build_navigation($navlinks); print_header("$strpersonalprofile: ", "$strpersonalprofile: ", $navigation, "", "", true, " ", 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, " ", 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, " ", 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 '
'; - print_heading('DEBUG MODE: User session variables'); + echo $OUPTUT->heading('DEBUG MODE: User session variables'); print_object($USER); }