From bded7f70b5fe03703e47f20fd7f0147148147608 Mon Sep 17 00:00:00 2001 From: moodler Date: Fri, 12 Mar 2004 13:29:33 +0000 Subject: [PATCH] Get coursemodule so the groups checking works correctly --- mod/chat/gui_header_js/index.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mod/chat/gui_header_js/index.php b/mod/chat/gui_header_js/index.php index 2948a4fbe8..8561581afb 100644 --- a/mod/chat/gui_header_js/index.php +++ b/mod/chat/gui_header_js/index.php @@ -13,6 +13,10 @@ if (!$course = get_record("course", "id", $chat->course)) { error("Could not find the course this belongs to!"); } + + if (!$cm = get_coursemodule_from_instance("chat", $chat->id, $course->id)) { + error("Course Module ID was incorrect"); + } require_login($course->id); -- 2.39.5