From: moodler Date: Wed, 10 Oct 2007 08:18:59 +0000 (+0000) Subject: Just a small fix that would make this SQL work ... no idea what bug it would fix... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=f6ee5e041cd08cab3e8d085f45cf1c15246dc5f9;p=moodle.git Just a small fix that would make this SQL work ... no idea what bug it would fix. It's not MDL-9059 --- 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; + } } }