]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-19825 Migrated calls to print_heading
authornicolasconnault <nicolasconnault>
Thu, 6 Aug 2009 08:15:05 +0000 (08:15 +0000)
committernicolasconnault <nicolasconnault>
Thu, 6 Aug 2009 08:15:05 +0000 (08:15 +0000)
16 files changed:
user/addnote.php
user/edit.php
user/editadvanced.php
user/extendenrol.php
user/groupaddnote.php
user/groupextendenrol.php
user/index.php
user/messageselect.php
user/policy.php
user/portfolio.php
user/portfoliologs.php
user/profile/definelib.php
user/profile/index.php
user/repository.php
user/tabs.php
user/view.php

index 93b25581f3094f9a292d7d29b6b0ca266dcee0c5..7896daec132593bc4eedc45dd2b57fc9d81260d4 100644 (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.'" />';
index 0d42b5adc6d75ac42753171017056ccf16e66121..3f677954e3b9c193eef25025eb5039f5f52b8bf4 100644 (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;
     }
index 41e867f5e08334e2da886ad0ff2d8cadf7e076d7..dd24fb443c88912d3ecc644ab8b86c7398c4df5d 100644 (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;
     }
         } 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');
index c44f2fd2fe6d93a1f757e2ea0428b70ba157b180..5319f217b11a53f22d2c7a014a4ad26f46ab5843 100644 (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().'" />';
index 96c453bbe94a878ff5ad0191fa9c47abe28e7629..823880e7634440440df9e962500a0d7484fbddc5 100644 (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.'" />';
index 8a64a5893fd0cead4c320acb9bd743a69a6f2597..7adca55c271b1555f505cb4ba62ba80d4de16caf 100755 (executable)
@@ -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().'" />';
index e925d6cabb8aff53e08866482f763809535c372a..269a81015c5a76dcc92a6fd50fe9dae018090574 100644 (file)
         $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;
     }
             $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.'">';
             $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);
         }
     }
 
 
     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) {
 
                 }
 
             } else {
-                print_heading(get_string('nothingtodisplay'));
+                echo $OUTPUT->heading(get_string('nothingtodisplay'));
             }
         }
 
index 0ab50d50a6f6ef21ff90fc0998402c58d2dee164..386edb74ea5ef2cb16d7aca26d0db7b2b1655ae4 100644 (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)) {
                     $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>';
             }
index 00a58a6e886682c948c3d3b002f5006de60c00af..897f05a6b9b77cd72f8eebd22b3b7deb2ef41e18 100644 (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') {
index c413fbe0af27bb9afed8276cdfd6839ef4fe7412..933800ad635ce6403e5e512302f6fa78cc126b4d 100644 (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)) {
index 18e0706fb27b22dbe8a563596db2556cbb876aa4..e3cfa2c785d4d4ea5ff9af34b94a141e208fed42 100644 (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?');
index 2e4ee0f9e46ac59ba728824f2af74658da6e3f36..064de8dea689190c1ef57fb5a83ad2acc8cef6ca 100644 (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;
index 9752d0c017e2fae6623f13dd0168eb18b6a6d8e1..72b04c80cfd9fc341605d9bd933952eeba2e31c7 100644 (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 {
index 876e28d5c58e7cf310cc70f240164415a80dd9c0..4f6db2bc5d08def1fc855d80fd8fadd5d785f64d 100644 (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)) {
index ff61f18c9c68971b5ed663666b9471d39132dc24..010488d80ffdf560229b5f42ca4d3bc1ecbfa272 100644 (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);
index 9e575d9fd57aa7244d65cd36129d8948d9daa0c4..c3b0e35f83c7711fcb968bac28dd9daec6c04ef9 100644 (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;
             }
                     $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);
 
     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;
 
     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);
     }