From f6ee5e041cd08cab3e8d085f45cf1c15246dc5f9 Mon Sep 17 00:00:00 2001 From: moodler Date: Wed, 10 Oct 2007 08:18:59 +0000 Subject: [PATCH] Just a small fix that would make this SQL work ... no idea what bug it would fix. It's not MDL-9059 --- calendar/lib.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/calendar/lib.php b/calendar/lib.php index 5474d8e96b..e5a50b76ce 100644 --- a/calendar/lib.php +++ b/calendar/lib.php @@ -1282,12 +1282,14 @@ function calendar_set_filters(&$courses, &$group, &$user, $courseeventsfrom = NU } if (!empty($groupids)) { - $sql = "SELECT id + $sql = "SELECT * FROM {$CFG->prefix}groups WHERE courseid IN (".implode(',', $groupids).')'; if ($grouprecords= get_records_sql($sql)) { - $grouparray = array_merge($grouparray, array_keys($grouprecords)); + foreach ($grouprecords as $grouprecord) { + $grouparray[] = $grouprecord->id; + } } } -- 2.39.5