// first create the efficiencies, send event to agency (all courses add link)
List identitiesWithData = course.getCourseEnvironment().getCoursePropertyManager().getAllIdentitiesWithCourseAssessmentData();
EfficiencyStatementManager.getInstance().updateEfficiencyStatements(course, identitiesWithData, false);
} else {
// delete really the efficiencies of the users.
RepositoryEntry courseRepoEntry = RepositoryManager.getInstance().lookupRepositoryEntry(course, true);
EfficiencyStatementManager.getInstance().deleteEfficiencyStatementsFromCourse(courseRepoEntry.getKey());
}
//inform everybody else
EventBus eventBus = CoordinatorManager.getCoordinator().getEventBus();
CourseConfigEvent courseConfigEvent = new CourseConfigEvent(CourseConfigEvent.EFFICIENCY_STATEMENT_TYPE, course.getResourceableId());
eventBus.fireEventToListenersOf(courseConfigEvent, course);
ThreadLocalUserActivityLogger.log(ceffC.getLoggingAction(), getClass());
}
// CourseCalendarConfigController
if(changedCourseConfig.isCalendarEnabled()!= initialCourseConfig.isCalendarEnabled() && calCfgCtr.getLoggingAction()!=null) {
ThreadLocalUserActivityLogger.log(calCfgCtr.getLoggingAction(), getClass());
// notify calendar components to refresh their calendars
CoordinatorManager.getCoordinator().getEventBus().fireEventToListenersOf(new KalendarModifiedEvent(), OresHelper.lookupType(CalendarManager.class));
}
// CourseConfigGlossaryController
if((changedCourseConfig.getGlossarySoftKey()==null && initialCourseConfig.getGlossarySoftKey()!=null)
|| (changedCourseConfig.getGlossarySoftKey()!=null && initialCourseConfig.getGlossarySoftKey()==null)
&& cglosCtr.getLoggingAction()!=null) {
final String glossarySoftKey = changedCourseConfig.getGlossarySoftKey();
LoggingResourceable lri = null;
if (glossarySoftKey!=null) {
lri = LoggingResourceable.wrapNonOlatResource(StringResourceableType.glossarySoftKey, glossarySoftKey, glossarySoftKey);
}
ThreadLocalUserActivityLogger.log(cglosCtr.getLoggingAction(), getClass(), lri);
if(changedCourseConfig.getGlossarySoftKey()==null) {
// update references
ReferenceManager refM = ReferenceManager.getInstance();
List repoRefs = refM.getReferences(course);
for (Iterator iter = repoRefs.iterator(); iter.hasNext();) {
ReferenceImpl ref = (ReferenceImpl) iter.next();
if (ref.getUserdata().equals(GlossaryManager.GLOSSARY_REPO_REF_IDENTIFYER)) {
refM.delete(ref);
continue;
}
}
} else if(changedCourseConfig.getGlossarySoftKey()!=null) {
// update references
RepositoryManager rm = RepositoryManager.getInstance();
RepositoryEntry repoEntry = rm.lookupRepositoryEntryBySoftkey(changedCourseConfig.getGlossarySoftKey(), false);
ReferenceManager.getInstance().addReference(course, repoEntry.getOlatResource(), GlossaryManager.GLOSSARY_REPO_REF_IDENTIFYER);
}
}
//course config transaction fihished
initialCourseConfig = course.getCourseEnvironment().getCourseConfig().clone();