diff --git a/mod/chat/lib.php b/mod/chat/lib.php index bd787088f46..4441233579d 100644 --- a/mod/chat/lib.php +++ b/mod/chat/lib.php @@ -1136,44 +1136,10 @@ function chat_get_post_actions() { } /** - * @deprecated since 3.3 - * @todo The final deprecation of this function will take place in Moodle 3.7 - see MDL-57487. - * @global object - * @global object - * @param array $courses - * @param array $htmlarray Passed by reference + * @deprecated since Moodle 3.3, when the block_course_overview block was removed. */ -function chat_print_overview($courses, &$htmlarray) { - global $USER, $CFG; - - debugging('The function chat_print_overview() is now deprecated.', DEBUG_DEVELOPER); - - 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'); - - foreach ($chats as $chat) { - if ($chat->chattime and $chat->schedule) { // A chat is scheduled. - $str = '
'. - $strchat.': visible ? '' : ' class="dimmed"'). - ' href="'.$CFG->wwwroot.'/mod/chat/view.php?id='.$chat->coursemodule.'">'. - $chat->name.'
'; - $str .= '
'.$strnextsession.': '.userdate($chat->chattime).'
'; - - if (empty($htmlarray[$chat->course]['chat'])) { - $htmlarray[$chat->course]['chat'] = $str; - } else { - $htmlarray[$chat->course]['chat'] .= $str; - } - } - } +function chat_print_overview() { + throw new coding_exception('chat_print_overview() can not be used any more and is obsolete.'); }