Merge branch 'MDL-60842-34' of git://github.com/lameze/moodle into MOODLE_34_STABLE
This commit is contained in:
+2
-2
@@ -2538,7 +2538,7 @@ function calendar_get_allowed_types(&$allowed, $course = null, $groups = null, $
|
||||
|
||||
if (!empty($course)) {
|
||||
if (!is_object($course)) {
|
||||
$course = $DB->get_record('course', array('id' => $course), '*', MUST_EXIST);
|
||||
$course = $DB->get_record('course', array('id' => $course), 'id, groupmode, groupmodeforce', MUST_EXIST);
|
||||
}
|
||||
if ($course->id != SITEID) {
|
||||
$coursecontext = \context_course::instance($course->id);
|
||||
@@ -2602,7 +2602,7 @@ function calendar_get_all_allowed_types() {
|
||||
// This function warms the context cache for the course so the calls
|
||||
// to load the course context in calendar_get_allowed_types don't result
|
||||
// in additional DB queries.
|
||||
$courses = calendar_get_default_courses(null, '*', true);
|
||||
$courses = calendar_get_default_courses(null, 'id, groupmode, groupmodeforce', true);
|
||||
|
||||
// We want to pre-fetch all of the groups for each course in a single
|
||||
// query to avoid calendar_get_allowed_types from hitting the DB for
|
||||
|
||||
Reference in New Issue
Block a user