mirror of
https://github.com/moodle/moodle.git
synced 2025-04-25 10:26:17 +02:00
MDL-31086 Calendar : fix sql to get distinct list of courses
This commit is contained in:
parent
20a903c34f
commit
0ec75d9ffe
@ -1510,7 +1510,7 @@ function calendar_get_default_courses() {
|
||||
$courses = array();
|
||||
if (!empty($CFG->calendar_adminseesall) && has_capability('moodle/calendar:manageentries', get_context_instance(CONTEXT_SYSTEM))) {
|
||||
list ($select, $join) = context_instance_preload_sql('c.id', CONTEXT_COURSE, 'ctx');
|
||||
$sql = "SELECT c.* $select
|
||||
$sql = "SELECT DISTINCT c.* $select
|
||||
FROM {course} c
|
||||
JOIN {event} e ON e.courseid = c.id
|
||||
$join";
|
||||
|
Loading…
x
Reference in New Issue
Block a user