.getAllRightGroupsFromAllContexts();
learningGroups.addAll(rightGroups);
//all learning and right group calendars
for (BusinessGroup bg : learningGroups) {
KalendarRenderWrapper calRenderWrapper = calMan.getGroupCalendar(bg);
SubscriptionProvider subProvider = new SubscriptionProviderImpl(calRenderWrapper);
SubscriptionContext subsContext = subProvider.getSubscriptionContext();
Publisher pub = nfm.getPublisher(subsContext);
if (pub != null) {
pub.setState(1); //int 0 is OK -> all other is not OK
}
}
//the course calendar
try {
/**
* TODO:gs 2010-01-26
* OLAT-4947: if we do not have an repo entry we get an exception here.
* This is normal in the case of courseimport and click canceling.
*/
course.getCourseTitle();
KalendarRenderWrapper courseCalendar = calMan.getCourseCalendar(course);
SubscriptionProvider subProvider = new SubscriptionProviderImpl(courseCalendar, course);
Publisher pub = nfm.getPublisher(subProvider.getSubscriptionContext());
if (pub != null) {
pub.setState(1);
}
} catch (AssertException e) {
//if we have a broken course (e.g. canceled import or no repo entry somehow) skip calendar deletion...