From: nicolasconnault Date: Thu, 6 Aug 2009 08:21:01 +0000 (+0000) Subject: MDL-19806 Migrated calls to print_heading X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=b2dc6880e4bc979542398aad75cc0a53b033b0c3;p=moodle.git MDL-19806 Migrated calls to print_heading --- diff --git a/mod/chat/report.php b/mod/chat/report.php index 6858eecd63..09fb2fcbc8 100644 --- a/mod/chat/report.php +++ b/mod/chat/report.php @@ -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 '

'.userdate($start).' --> '. userdate($end).'

'; @@ -107,7 +107,7 @@ 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 @@ -143,7 +143,7 @@ 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; } diff --git a/mod/chat/view.php b/mod/chat/view.php index e0d05bb390..dfc82e273a 100644 --- a/mod/chat/view.php +++ b/mod/chat/view.php @@ -109,7 +109,7 @@ } - 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 @@ -166,7 +166,7 @@ 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 ''; foreach ($chatusers as $chatuser) { $lastping = $timenow - $chatuser->lastmessageping; diff --git a/mod/data/edit.php b/mod/data/edit.php index 9e21d13f26..981ddb1f19 100755 --- a/mod/data/edit.php +++ b/mod/data/edit.php @@ -118,7 +118,7 @@ $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'"; @@ -260,7 +260,7 @@ print_simple_box_start('center','80%'); if (!$rid){ - print_heading(get_string('newentry','data'), '', 2); + echo $OUTPUT->heading(get_string('newentry','data'), 2); } /****************************************** @@ -301,7 +301,7 @@ 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 '
'; diff --git a/mod/data/export.php b/mod/data/export.php index b63630cc07..19b11c85d7 100644 --- a/mod/data/export.php +++ b/mod/data/export.php @@ -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); diff --git a/mod/data/import.php b/mod/data/import.php index b802154ef7..b417f9a7ae 100755 --- a/mod/data/import.php +++ b/mod/data/import.php @@ -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); diff --git a/mod/data/lib.php b/mod/data/lib.php index 5d8c5bc960..ba3d01e3da 100755 --- a/mod/data/lib.php +++ b/mod/data/lib.php @@ -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 ''."\n"; echo ''."\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); diff --git a/mod/data/templates.php b/mod/data/templates.php index a859180831..df07eadbda 100755 --- a/mod/data/templates.php +++ b/mod/data/templates.php @@ -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 diff --git a/mod/data/view.php b/mod/data/view.php index 8501027627..f7b019bb45 100755 --- a/mod/data/view.php +++ b/mod/data/view.php @@ -297,7 +297,7 @@ $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) {