]> git.mjollnir.org Git - moodle.git/commitdiff
Get coursemodule so the groups checking works correctly
authormoodler <moodler>
Fri, 12 Mar 2004 13:29:33 +0000 (13:29 +0000)
committermoodler <moodler>
Fri, 12 Mar 2004 13:29:33 +0000 (13:29 +0000)
mod/chat/gui_header_js/index.php

index 2948a4fbe803a9be8785dfe1ddf12ffd2b22c81f..8561581afbd5581f6e0260cd6d3647aebf1dc346 100644 (file)
     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);