use of org.olat.modules.coach.model.EfficiencyStatementEntry in project OpenOLAT by OpenOLAT.
the class CourseController method nextEntry.
private void nextEntry(UserRequest ureq) {
EfficiencyStatementEntry currentEntry = statementCtrl.getEntry();
int nextIndex = model.getObjects().indexOf(currentEntry) + 1;
if (nextIndex < 0 || nextIndex >= model.getRowCount()) {
nextIndex = 0;
}
EfficiencyStatementEntry nextEntry = model.getObject(nextIndex);
doSelectDetails(ureq, nextEntry);
}
use of org.olat.modules.coach.model.EfficiencyStatementEntry in project OpenOLAT by OpenOLAT.
the class CourseController method activate.
@Override
public void activate(UserRequest ureq, List<ContextEntry> entries, StateEntry state) {
if (entries == null || entries.isEmpty())
return;
ContextEntry ce = entries.get(0);
OLATResourceable ores = ce.getOLATResourceable();
if ("Identity".equals(ores.getResourceableTypeName())) {
Long identityKey = ores.getResourceableId();
for (EfficiencyStatementEntry entry : model.getObjects()) {
if (identityKey.equals(entry.getIdentityKey())) {
doSelectDetails(ureq, entry);
statementCtrl.activate(ureq, entries.subList(1, entries.size()), ce.getTransientState());
break;
}
}
}
}
use of org.olat.modules.coach.model.EfficiencyStatementEntry in project OpenOLAT by OpenOLAT.
the class StudentCoursesController method previousEntry.
private void previousEntry(UserRequest ureq) {
EfficiencyStatementEntry currentEntry = statementCtrl.getEntry();
int previousIndex = model.getObjects().indexOf(currentEntry) - 1;
if (previousIndex < 0 || previousIndex >= model.getRowCount()) {
previousIndex = model.getRowCount() - 1;
}
EfficiencyStatementEntry previousEntry = model.getObject(previousIndex);
selectDetails(ureq, previousEntry);
}
use of org.olat.modules.coach.model.EfficiencyStatementEntry 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.EfficiencyStatementEntry in project OpenOLAT by OpenOLAT.
the class CoachingDAO method getEfficencyStatementEntry.
public EfficiencyStatementEntry getEfficencyStatementEntry(UserEfficiencyStatement statement, List<UserPropertyHandler> userPropertyHandlers, Locale locale) {
RepositoryEntry re = repositoryManager.lookupRepositoryEntry(statement.getCourseRepoKey(), false);
Identity identity = statement.getIdentity();
return new EfficiencyStatementEntry(identity, re, statement, userPropertyHandlers, locale);
}
Aggregations