MDL-13229 - Cannot export group events - now make it export group events if 'all' is selected - Oops, allow for course without groups.

This commit is contained in:
tjhunt
2008-06-23 14:28:52 +00:00
parent c0d5964594
commit 61faff2eec
+3 -1
View File
@@ -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');