use of org.olat.modules.coach.model.EfficiencyStatementEntry in project openolat by klemens.
the class GroupController 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 klemens.
the class GroupController method loadModel.
private List<EfficiencyStatementEntry> loadModel() {
List<EfficiencyStatementEntry> allGroup = coachingService.getGroup(group, userPropertyHandlers, getLocale());
List<CertificateLight> certificates = certificatesManager.getLastCertificates(group);
ConcurrentMap<IdentityResourceKey, CertificateLight> certificateMap = new ConcurrentHashMap<>();
for (CertificateLight certificate : certificates) {
IdentityResourceKey key = new IdentityResourceKey(certificate.getIdentityKey(), certificate.getOlatResourceKey());
certificateMap.put(key, certificate);
}
model.setObjects(allGroup, certificateMap);
tableEl.reloadData();
tableEl.reset();
return allGroup;
}
use of org.olat.modules.coach.model.EfficiencyStatementEntry in project openolat by klemens.
the class GroupController 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);
selectDetails(ureq, nextEntry);
}
use of org.olat.modules.coach.model.EfficiencyStatementEntry in project openolat by klemens.
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);
}
use of org.olat.modules.coach.model.EfficiencyStatementEntry in project openolat by klemens.
the class CoachingServiceImpl method getCourse.
@Override
public List<EfficiencyStatementEntry> getCourse(Identity coach, RepositoryEntry entry, List<UserPropertyHandler> userPropertyHandlers, Locale locale) {
List<Identity> students = coachingDao.getStudents(coach, entry);
List<UserEfficiencyStatement> statements = efficiencyStatementManager.getUserEfficiencyStatementLight(entry);
Map<Identity, UserEfficiencyStatement> identityToStatements = new HashMap<>();
for (UserEfficiencyStatement statement : statements) {
identityToStatements.put(statement.getIdentity(), statement);
}
List<EfficiencyStatementEntry> entries = new ArrayList<>(students.size());
for (Identity student : students) {
UserEfficiencyStatement statement = identityToStatements.get(student);
entries.add(new EfficiencyStatementEntry(student, entry, statement, userPropertyHandlers, locale));
}
return entries;
}
Aggregations