Skip to content
Snippets Groups Projects
Commit eebc9ac4 authored by User expired's avatar User expired
Browse files

openolat#127: do load all calendars as only the public entries will be visible...

openolat#127: do load all calendars as only the public entries will be visible to non members anyway
parent 3145f732
No related branches found
No related tags found
No related merge requests found
......@@ -145,13 +145,20 @@ public class CourseCalendars {
// learning groups
List<BusinessGroup> ownerGroups = cgm.getOwnedBusinessGroups(identity);
addCalendars(ureq, userCourseEnv, ownerGroups, !readOnly, clpc, calendars);
List<BusinessGroup> attendedGroups = cgm.getParticipatingBusinessGroups(identity);
//@UIBK always add all group calendars in this course no matter if the identity is a member
// as public entries should be visible anyway
//List<BusinessGroup> attendedGroups = cgm.getParticipatingBusinessGroups(identity); //@UIBK
List<BusinessGroup> allGroups = cgm.getAllBusinessGroups();
for (BusinessGroup ownerGroup : ownerGroups) {
if (attendedGroups.contains(ownerGroup)) {
attendedGroups.remove(ownerGroup);
//if (attendedGroups.contains(ownerGroup)) { //@UIBK
// attendedGroups.remove(ownerGroup);
//}
if (allGroups.contains(ownerGroup)) {
allGroups.remove(ownerGroup);
}
}
addCalendars(ureq, userCourseEnv, attendedGroups, false, clpc, calendars);
//addCalendars(ureq, userCourseEnv, attendedGroups, false, clpc, calendars); //@UIBK
addCalendars(ureq, userCourseEnv, allGroups, false, clpc, calendars);
}
return new CourseCalendars(courseKalendarWrapper, calendars);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment