Merge branch 'MDL-54894-31' of git://github.com/crazyserver/moodle into MOODLE_31_STABLE
This commit is contained in:
+5
-1
@@ -153,7 +153,11 @@ class comment {
|
||||
} else if (!empty($options->courseid)) {
|
||||
$this->courseid = $options->courseid;
|
||||
} else {
|
||||
$this->courseid = SITEID;
|
||||
if ($coursecontext = $this->context->get_course_context(false)) {
|
||||
$this->courseid = $coursecontext->instanceid;
|
||||
} else {
|
||||
$this->courseid = SITEID;
|
||||
}
|
||||
}
|
||||
|
||||
// setup coursemodule
|
||||
|
||||
Reference in New Issue
Block a user