Browse files

Fix for bug 4143:

If a user was a teacher, they didn't see any events from courses
where they were students.

I 'm back at looooooong last! :)
  • Loading branch information...
1 parent 7770bee commit 74d60e20baedde9a4e2e01c03cf4024bbc1bf549 defacer committed Oct 21, 2005
Showing with 2 additions and 2 deletions.
  1. +2 −2 calendar/lib.php
View
4 calendar/lib.php
@@ -1128,10 +1128,10 @@ function calendar_get_default_courses($ignoreref = false) {
}
}
if(isset($USER->student) && is_array($USER->student)) {
- $courses = $USER->student;
+ $courses = $courses + $USER->student;
}
if(isset($USER->teacher) && is_array($USER->teacher)) {
- $courses = $USER->teacher;
+ $courses = $courses + $USER->teacher;
}
return $courses;
}

0 comments on commit 74d60e2

Please sign in to comment.