Permalink
Browse files

Fixing bug 1384 again. It seems to have been caused by optimizing cod…

…e which

doesn't work, because unfortunately $courses is actually NOT a collection of
course records in this function. With the optimization removed all is well
again.
  • Loading branch information...
1 parent f3f90ac commit 88a5277af1fcaaa9a0bc003822dce0931f998305 defacer committed Jan 12, 2005
Showing with 3 additions and 8 deletions.
  1. +3 −8 calendar/lib.php
View
@@ -1001,14 +1001,9 @@ function calendar_set_filters(&$courses, &$group, &$user, $courseeventsfrom = NU
foreach($groupcourses as $courseid) {
// If the user is an editing teacher in there,
if(!empty($USER->id) && isteacheredit($courseid, $USER->id)) {
- if (isset($courses[$courseid])) {
- $checkcourse = $courses[$courseid];
- if (!empty($checkcourse->groupmode)) {
- // Show events from all groups
- if(($grouprecords = get_groups($courseid)) !== false) {
- $grouparray = array_merge($grouparray, array_keys($grouprecords));
- }
- }
+ // Show events from all groups
+ if(($grouprecords = get_groups($courseid)) !== false) {
+ $grouparray = array_merge($grouparray, array_keys($grouprecords));
}
}
// Otherwise show events from the group he is a member of

0 comments on commit 88a5277

Please sign in to comment.