Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

MDL-31086 Calendar : fix sql to get distinct list of courses

  • Loading branch information...
commit 8b4e28f87e5f918eda5b20ec85c036822134db5e 1 parent 415dd48
Dan Marsden danmarsden authored nebgor committed

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. +1 1  calendar/lib.php
2  calendar/lib.php
@@ -1351,7 +1351,7 @@ function calendar_get_default_courses() {
1351 1351 $courses = array();
1352 1352 if (!empty($CFG->calendar_adminseesall) && has_capability('moodle/calendar:manageentries', get_context_instance(CONTEXT_SYSTEM))) {
1353 1353 list ($select, $join) = context_instance_preload_sql('c.id', CONTEXT_COURSE, 'ctx');
1354   - $sql = "SELECT c.* $select
  1354 + $sql = "SELECT DISTINCT c.* $select
1355 1355 FROM {course} c
1356 1356 JOIN {event} e ON e.courseid = c.id
1357 1357 $join";

0 comments on commit 8b4e28f

Please sign in to comment.
Something went wrong with that request. Please try again.