$string['nextsession'] = 'Next scheduled session';
$string['noguests'] = 'The chat is not open to guests';
$string['nomessages'] = 'No messages yet';
+$string['noscheduledsession'] = 'No scheduled session';
$string['repeatdaily'] = 'At the same time every day';
$string['repeatnone'] = 'No repeats - publish the specified time only';
$string['repeattimes'] = 'Repeat sessions';
return array('talk');
}
+function chat_print_overview($courses, &$htmlarray) {
+ global $USER, $CFG;
+
+ if (empty($courses) || !is_array($courses) || count($courses) == 0) {
+ return array();
+ }
+
+ if (!$chats = get_all_instances_in_courses('chat',$courses)) {
+ return;
+ }
+
+ $strchat = get_string('modulename', 'chat');
+ $strnextsession = get_string('nextsession', 'chat');
+ $strnoscheduledsession = get_string('noscheduledsession', 'chat');
+
+ foreach ($chats as $chat) {
+ $str = '<a '.($chat->visible?'':' class="dimmed"').' href="'.$CFG->wwwroot.'/mod/chat/view.php?id='.$chat->coursemodule.'">'
+ .$strchat.': '.$chat->name.'</a><br />';
+ if ($chat->chattime and $chat->schedule) { // A chat is scheduled
+ $str .= "$strnextsession: ".userdate($chat->chattime).' ('.usertimezone($USER->timezone).')<br />';
+ } else {
+ $str .= $strnoscheduledsession.'<br />';
+ }
+ $htmlarray[$chat->course]['chat'] .= $str;
+ }
+}
+
?>