// BEGIN EFFICIENCY STATEMENT
// create all efficiency statements for all users in all courses
if (! uhd.getBooleanDataValue(TASK_EFFICIENCY_STATEMENT_DONE)) {
RepositoryManager rm = RepositoryManager.getInstance();
EfficiencyStatementManager esm = EfficiencyStatementManager.getInstance();
// get all course repository entries
List entries = rm.queryByType(CourseModule.ORES_TYPE_COURSE);
Iterator iter = entries.iterator();
while (iter.hasNext()) {
RepositoryEntry re = (RepositoryEntry) iter.next();
// load course from entry
ICourse course = CourseFactory.loadCourse(re.getOlatResource());
CoursePropertyManager cpm = course.getCourseEnvironment().getCoursePropertyManager();
List identities = cpm.getAllIdentitiesWithCourseAssessmentData();
// now create all statements for this course
esm.updateEfficiencyStatements(course,identities, false);
}
uhd.setBooleanDataValue(TASK_EFFICIENCY_STATEMENT_DONE, true);
upgradeManager.setUpgradesHistory(uhd, VERSION);
}
// END EFFICIENCY STATEMENT