mirror of
https://github.com/moodle/moodle.git
synced 2025-01-23 08:38:23 +01:00
Get coursemodule so the groups checking works correctly
This commit is contained in:
parent
8c0f49667f
commit
bded7f70b5
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user