Skip to content

Commit 087b330

Browse files
author
David Monllao
committed
Merge branch 'MDL-60842-master' of git://github.com/lameze/moodle
2 parents 3e6daba + 2dc93a3 commit 087b330

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

calendar/lib.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -2538,7 +2538,7 @@ function calendar_get_allowed_types(&$allowed, $course = null, $groups = null, $
25382538

25392539
if (!empty($course)) {
25402540
if (!is_object($course)) {
2541-
$course = $DB->get_record('course', array('id' => $course), '*', MUST_EXIST);
2541+
$course = $DB->get_record('course', array('id' => $course), 'id, groupmode, groupmodeforce', MUST_EXIST);
25422542
}
25432543
if ($course->id != SITEID) {
25442544
$coursecontext = \context_course::instance($course->id);
@@ -2602,7 +2602,7 @@ function calendar_get_all_allowed_types() {
26022602
// This function warms the context cache for the course so the calls
26032603
// to load the course context in calendar_get_allowed_types don't result
26042604
// in additional DB queries.
2605-
$courses = calendar_get_default_courses(null, '*', true);
2605+
$courses = calendar_get_default_courses(null, 'id, groupmode, groupmodeforce', true);
26062606

26072607
// We want to pre-fetch all of the groups for each course in a single
26082608
// query to avoid calendar_get_allowed_types from hitting the DB for

0 commit comments

Comments
 (0)