Permalink
Browse files

Merge branch 'MDL-60842-master' of git://github.com/lameze/moodle

  • Loading branch information...
dmonllao committed Nov 20, 2017
2 parents 3e6daba + 2dc93a3 commit 087b3303a58468189dcd9b7cf5f17e28c09d8503
Showing with 2 additions and 2 deletions.
  1. +2 −2 calendar/lib.php
@@ -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

0 comments on commit 087b330

Please sign in to comment.