From 5c6262b8ccecb892f28eff69d993e65b359d6e92 Mon Sep 17 00:00:00 2001 From: tjhunt Date: Mon, 23 Jun 2008 14:28:51 +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 e2cd72c5b34..c9713c48d58 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');