]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-19806 Migrated calls to print_heading
authornicolasconnault <nicolasconnault>
Thu, 6 Aug 2009 08:21:01 +0000 (08:21 +0000)
committernicolasconnault <nicolasconnault>
Thu, 6 Aug 2009 08:21:01 +0000 (08:21 +0000)
mod/chat/report.php
mod/chat/view.php
mod/data/edit.php
mod/data/export.php
mod/data/import.php
mod/data/lib.php
mod/data/templates.php
mod/data/view.php

index 6858eecd63d93b8957c5f302152b77c6fceac53e..09fb2fcbc8c012931c7da74631b0de1d5eb31f0b 100644 (file)
@@ -65,7 +65,7 @@
         }
 
         if (!$messages = $DB->get_records_select('chat_messages', "chatid = :chatid AND timestamp >= :start AND timestamp <= :end $groupselect", $params, "timestamp ASC")) {
-            print_heading(get_string('nomessages', 'chat'));
+            echo $OUTPUT->heading(get_string('nomessages', 'chat'));
 
         } else {
             echo '<p class="boxaligncenter">'.userdate($start).' --> '. userdate($end).'</p>';
     print_header_simple(format_string($chat->name).": $strchatreport", '', $navigation,
                   '', '', true, '', navmenu($course, $cm));
 
-    print_heading(format_string($chat->name).': '.get_string('sessions', 'chat'));
+    echo $OUTPUT->heading(format_string($chat->name).': '.get_string('sessions', 'chat'));
 
 
 /// Check to see if groups are being used here
 
     if (empty($messages)) {   /// May have already got them above
         if (!$messages = $DB->get_records_select('chat_messages', "chatid = :chatid $groupselect", $params, "timestamp DESC")) {
-            print_heading(get_string('nomessages', 'chat'));
+            echo $OUTPUT->heading(get_string('nomessages', 'chat'));
             print_footer($course);
             exit;
         }
index e0d05bb390e50cd7fe9aaa02d088076079d729a1..dfc82e273a4b73fada3fb1a8bef8ba276d442861 100644 (file)
     }
 
 
-    print_heading(format_string($chat->name));
+    echo $OUTPUT->heading(format_string($chat->name));
 
     if (has_capability('mod/chat:chat',$context)) {
         /// Print the main part of the page
     if ($chatusers = chat_get_users($chat->id, $currentgroup, $cm->groupingid)) {
         $timenow = time();
         print_simple_box_start('center');
-        print_heading($strcurrentusers);
+        echo $OUTPUT->heading($strcurrentusers);
         echo '<table id="chatcurrentusers">';
         foreach ($chatusers as $chatuser) {
             $lastping = $timenow - $chatuser->lastmessageping;
index 9e21d13f264964b83b8ed4bd0e3f93a8ba6966a3..981ddb1f19653957c57707e141af388c51b272fc 100755 (executable)
     $currentgroup = groups_get_activity_group($cm);
     $groupmode = groups_get_activity_groupmode($cm);
 
-    print_heading(format_string($data->name));
+    echo $OUTPUT->heading(format_string($data->name));
 
     if ($currentgroup) {
         $groupselect = " AND groupid = '$currentgroup'";
     print_simple_box_start('center','80%');
 
     if (!$rid){
-        print_heading(get_string('newentry','data'), '', 2);
+        echo $OUTPUT->heading(get_string('newentry','data'), 2);
     }
 
     /******************************************
     if (has_capability('mod/data:manageentries',$context)) {
         if ($import) {
             print_simple_box_start('center','80%');
-            print_heading(get_string('uploadrecords', 'data'), '', 3);
+            echo $OUTPUT->heading(get_string('uploadrecords', 'data'), 3);
 
             $maxuploadsize = get_max_upload_file_size();
             echo '<div style="text-align:center">';
index b63630cc07901402d7c174ac3c7f1c2e7eb152da..19b11c85d705148018e98898dd2d5443ecaeac46 100644 (file)
@@ -59,7 +59,7 @@ if($mform->is_cancelled()) {
     print_header_simple($data->name, '', $nav,
         '', '', true, update_module_button($cm->id, $course->id, get_string('modulename', 'data')),
         navmenu($course, $cm), '', '');
-    print_heading(format_string($data->name));
+    echo $OUTPUT->heading(format_string($data->name));
 
     // these are for the tab display
     $currentgroup = groups_get_activity_group($cm);
index b802154ef7c9971f6b67053218b262ca4c51d1b8..b417f9a7ae557da8804131ffa4b925dad0880931 100755 (executable)
@@ -67,7 +67,7 @@
     
     $navigation = build_navigation('', $cm);
     print_header_simple($data->name, "", $navigation, "", "", true, "", navmenu($course));
-    print_heading(format_string($data->name));
+    echo $OUTPUT->heading(format_string($data->name));
 
 /// Groups needed for Add entry tab
     $currentgroup = groups_get_activity_group($cm);
index 5d8c5bc960ff09cac74e63fc7aacc19acdddc59a..ba3d01e3daec556ed4eba77353595f6cba8687f9 100755 (executable)
@@ -255,7 +255,7 @@ class data_field_base {     // Base class for Database Field Types (see field/*/
      * @return void Output is echo'd
      */
     function display_edit_field() {
-        global $CFG, $DB;
+        global $CFG, $DB, $OUTPUT;
 
         if (empty($this->field)) {   // No field has been defined yet, try and make one
             $this->define_default_field();
@@ -275,7 +275,7 @@ class data_field_base {     // Base class for Database Field Types (see field/*/
         echo '<input type="hidden" name="type" value="'.$this->type.'" />'."\n";
         echo '<input name="sesskey" value="'.sesskey().'" type="hidden" />'."\n";
 
-        print_heading($this->name());
+        echo $OUTPUT->heading($this->name());
 
         require_once($CFG->dirroot.'/mod/data/field/'.$this->type.'/mod.html');
 
@@ -2044,14 +2044,14 @@ function data_get_available_presets($context) {
  */
 function data_print_header($course, $cm, $data, $currenttab='') {
 
-    global $CFG, $displaynoticegood, $displaynoticebad;
+    global $CFG, $displaynoticegood, $displaynoticebad, $OUTPUT;
 
     $navigation = build_navigation('', $cm);
     print_header_simple($data->name, '', $navigation,
             '', '', true, update_module_button($cm->id, $course->id, get_string('modulename', 'data')),
             navmenu($course, $cm));
 
-    print_heading(format_string($data->name));
+    echo $OUTPUT->heading(format_string($data->name));
 
 // Groups needed for Add entry tab
     $currentgroup = groups_get_activity_group($cm);
index a8591808316bb8586741588cdbdd831f3b34c71c..df07eadbdaeeb5d0c81415c18ccd69932dde8618 100755 (executable)
@@ -84,7 +84,7 @@
                         '', '', true, update_module_button($cm->id, $course->id, get_string('modulename', 'data')),
                         navmenu($course, $cm), '', $bodytag);
 
-    print_heading(format_string($data->name));
+    echo $OUTPUT->heading(format_string($data->name));
 
 
 /// Groups needed for Add entry tab
index 8501027627417d706c7f01838e8aa7a8e9f26fd7..f7b019bb45473f05874018be915fd971153fe642 100755 (executable)
     $currentgroup = groups_get_activity_group($cm);
     $groupmode = groups_get_activity_groupmode($cm);
 
-    print_heading(format_string($data->name));
+    echo $OUTPUT->heading(format_string($data->name));
 
     // Do we need to show a link to the RSS feed for the records?
     if (!empty($CFG->enablerssfeeds) && !empty($CFG->data_enablerssfeeds) && $data->rssarticles > 0) {