From: tjhunt Date: Mon, 23 Jun 2008 14:34:56 +0000 (+0000) Subject: MDL-13229 - Cannot export group events - now make it export group events if 'all... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=e36cd5d394f407f77137ca2656eb3179bd91e759;p=moodle.git MDL-13229 - Cannot export group events - now make it export group events if 'all' is selected - Oops, allow for course without groups. --- 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 {