From e36cd5d394f407f77137ca2656eb3179bd91e759 Mon Sep 17 00:00:00 2001 From: tjhunt Date: Mon, 23 Jun 2008 14:34:56 +0000 Subject: [PATCH] MDL-13229 - Cannot export group events - now make it export group events if 'all' is selected - Oops, allow for course without groups. --- calendar/export_execute.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/calendar/export_execute.php b/calendar/export_execute.php index e2cd72c5b3..60b832b5d2 100644 --- a/calendar/export_execute.php +++ b/calendar/export_execute.php @@ -38,6 +38,9 @@ if(!empty($what) && !empty($time)) { $course_groups = groups_get_all_groups($course->id, $user->id); $groups = $groups + array_keys($course_groups); } + if (empty($groups)) { + $groups = false; + } $courses[SITEID] = new stdClass; $courses[SITEID]->shortname = get_string('globalevents', 'calendar'); } else { -- 2.39.5