use of org.olat.modules.coach.model.IdentityRepositoryEntryKey in project OpenOLAT by OpenOLAT.
the class StudentCoursesController method loadModel.
private List<EfficiencyStatementEntry> loadModel() {
List<RepositoryEntry> courses = fullAccess ? coachingService.getUserCourses(student) : coachingService.getStudentsCourses(getIdentity(), student);
List<EfficiencyStatementEntry> statements = coachingService.getEfficencyStatements(student, courses, userPropertyHandlers, getLocale());
List<CertificateLight> certificates = certificatesManager.getLastCertificates(student);
ConcurrentMap<IdentityResourceKey, CertificateLight> certificateMap = new ConcurrentHashMap<>();
for (CertificateLight certificate : certificates) {
IdentityResourceKey key = new IdentityResourceKey(student.getKey(), certificate.getOlatResourceKey());
certificateMap.put(key, certificate);
}
ConcurrentMap<IdentityRepositoryEntryKey, LectureBlockStatistics> lecturesMap = new ConcurrentHashMap<>();
if (lectureModule.isEnabled()) {
List<LectureBlockStatistics> lectureStats = lectureService.getParticipantLecturesStatistics(student);
for (LectureBlockStatistics lectureStat : lectureStats) {
IdentityRepositoryEntryKey key = new IdentityRepositoryEntryKey(student.getKey(), lectureStat.getRepoKey());
lecturesMap.put(key, lectureStat);
}
}
model.setObjects(statements, certificateMap, lecturesMap);
tableEl.reset();
tableEl.reloadData();
return statements;
}
use of org.olat.modules.coach.model.IdentityRepositoryEntryKey in project openolat by klemens.
the class StudentCoursesController method loadModel.
private List<EfficiencyStatementEntry> loadModel() {
List<RepositoryEntry> courses = fullAccess ? coachingService.getUserCourses(student) : coachingService.getStudentsCourses(getIdentity(), student);
List<EfficiencyStatementEntry> statements = coachingService.getEfficencyStatements(student, courses, userPropertyHandlers, getLocale());
List<CertificateLight> certificates = certificatesManager.getLastCertificates(student);
ConcurrentMap<IdentityResourceKey, CertificateLight> certificateMap = new ConcurrentHashMap<>();
for (CertificateLight certificate : certificates) {
IdentityResourceKey key = new IdentityResourceKey(student.getKey(), certificate.getOlatResourceKey());
certificateMap.put(key, certificate);
}
ConcurrentMap<IdentityRepositoryEntryKey, LectureBlockStatistics> lecturesMap = new ConcurrentHashMap<>();
if (lectureModule.isEnabled()) {
List<LectureBlockStatistics> lectureStats = lectureService.getParticipantLecturesStatistics(student);
for (LectureBlockStatistics lectureStat : lectureStats) {
IdentityRepositoryEntryKey key = new IdentityRepositoryEntryKey(student.getKey(), lectureStat.getRepoKey());
lecturesMap.put(key, lectureStat);
}
}
model.setObjects(statements, certificateMap, lecturesMap);
tableEl.reset();
tableEl.reloadData();
return statements;
}
Aggregations