From 61faff2eecbfbb78e71058a3332551cf3f92b5d5 Mon Sep 17 00:00:00 2001 From: tjhunt Date: Mon, 23 Jun 2008 14:28:52 +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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/calendar/export_execute.php b/calendar/export_execute.php index d6cc16311b5..d34bf0f63b9 100644 --- a/calendar/export_execute.php +++ b/calendar/export_execute.php @@ -36,7 +36,9 @@ if(!empty($what) && !empty($time)) { $groups = array(); foreach ($courses as $course) { $course_groups = groups_get_all_groups($course->id, $user->id); - $groups = $groups + array_keys($course_groups); + if ($course_groups) { + $groups = $groups + array_keys($course_groups); + } } $courses[SITEID] = new stdClass; $courses[SITEID]->shortname = get_string('globalevents', 'calendar');