';
diff --git a/mod/chat/gui_header_js/chat_gui_header.js b/mod/chat/gui_header_js/chat_gui_header.js
index ddfe2614a34..c9c9b7039dc 100644
--- a/mod/chat/gui_header_js/chat_gui_header.js
+++ b/mod/chat/gui_header_js/chat_gui_header.js
@@ -28,6 +28,7 @@ function stop() {
function start() {
timer = setTimeout("update()", f*1000);
+ YAHOO.util.Event.addListener(document.body, 'unload', stop);
}
function update() {
diff --git a/mod/chat/gui_header_js/chatinput.php b/mod/chat/gui_header_js/chatinput.php
index 33e56d57517..cd52b35bb73 100644
--- a/mod/chat/gui_header_js/chatinput.php
+++ b/mod/chat/gui_header_js/chatinput.php
@@ -32,8 +32,9 @@
$PAGE->set_course($course);
$PAGE->requires->js('mod/chat/gui_header_js/chat_gui_header.js')->in_head();
$PAGE->set_generaltype('embedded');
-
- print_header('', '', '', 'input_chat_message', '', false);
+ $PAGE->set_focuscontrol('input_chat_message');
+ $PAGE->set_cacheable(false);
+ echo $OUTPUT->header();
?>
diff --git a/mod/chat/gui_sockets/index.php b/mod/chat/gui_sockets/index.php
index 3830d0482ee..37be772fdc6 100644
--- a/mod/chat/gui_sockets/index.php
+++ b/mod/chat/gui_sockets/index.php
@@ -25,7 +25,7 @@
}
if (!$cm->visible and !has_capability('moodle/course:viewhiddenactivities', get_context_instance(CONTEXT_MODULE, $cm->id))) {
- print_header();
+ echo $OUTPUT->header();
notice(get_string("activityiscurrentlyhidden"));
}
diff --git a/mod/chat/index.php b/mod/chat/index.php
index 15f6111532f..b3f12f42d6e 100644
--- a/mod/chat/index.php
+++ b/mod/chat/index.php
@@ -21,12 +21,9 @@
/// Print the header
-
- $navlinks = array();
- $navlinks[] = array('name' => $strchats, 'link' => '', 'type' => 'activity');
- $navigation = build_navigation($navlinks);
-
- print_header_simple($strchats, '', $navigation, '', '', true, '', navmenu($course));
+ $PAGE->navbar->add($strchats);
+ $PAGE->set_title($strchats);
+ echo $OUTPUT->header();
/// Get all the appropriate data
diff --git a/mod/chat/report.php b/mod/chat/report.php
index f67ea8d5d6e..c25382e5979 100644
--- a/mod/chat/report.php
+++ b/mod/chat/report.php
@@ -39,9 +39,9 @@
/// Print a session if one has been specified
if ($start and $end and !$confirmdelete) { // Show a full transcript
- $navigation = build_navigation($strchatreport, $cm);
- print_header_simple(format_string($chat->name).": $strchatreport", '', $navigation,
- '', '', true, '', navmenu($course, $cm));
+ $PAGE->navbar->add($strchatreport);
+ $PAGE->set_title(format_string($chat->name).": $strchatreport");
+ echo $OUTPUT->header();
/// Check to see if groups are being used here
$groupmode = groups_get_activity_groupmode($cm);
@@ -103,9 +103,9 @@
/// Print the Sessions display
- $navigation = build_navigation($strchatreport, $cm);
- print_header_simple(format_string($chat->name).": $strchatreport", '', $navigation,
- '', '', true, '', navmenu($course, $cm));
+ $PAGE->navbar->add($strchatreport);
+ $PAGE->set_title(format_string($chat->name).": $strchatreport");
+ echo $OUTPUT->header();
echo $OUTPUT->heading(format_string($chat->name).': '.get_string('sessions', 'chat'));
diff --git a/mod/chat/view.php b/mod/chat/view.php
index 9b17b916c38..21e08dd411a 100644
--- a/mod/chat/view.php
+++ b/mod/chat/view.php
@@ -45,10 +45,8 @@
// show some info for guests
if (isguestuser()) {
- $navigation = build_navigation('', $cm);
- print_header_simple(format_string($chat->name), '', $navigation,
- '', '', true, '', navmenu($course, $cm));
-
+ $PAGE->set_title(format_string($chat->name));
+ echo $OUTPUT->header();
echo $OUTPUT->confirm(get_string('noguests', 'chat').'
'.get_string('liketologin'),
get_login_url(), $CFG->wwwroot.'/course/view.php?id='.$course->id);
@@ -83,8 +81,10 @@
}
$buttons .= '';
- $navigation = build_navigation(array(), $cm);
- print_header($title, $course->fullname, $navigation, '', '', true, $buttons, navmenu($course, $cm));
+ $PAGE->set_title($title);
+ $PAGE->set_heading($course->fullname);
+ $PAGE->set_button($buttons);
+ echo $OUTPUT->header();
/// Check to see if groups are being used here
$groupmode = groups_get_activity_groupmode($cm);