use of org.olat.modules.coach.model.EfficiencyStatementEntry in project OpenOLAT by OpenOLAT.
the class GroupController 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 row : model.getObjects()) {
if (identityKey.equals(row.getIdentityKey())) {
selectDetails(ureq, row);
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 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 OpenOLAT.
the class GroupController method formInnerEvent.
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (tableEl == source) {
if (event instanceof SelectionEvent) {
SelectionEvent se = (SelectionEvent) event;
String cmd = se.getCommand();
EfficiencyStatementEntry selectedRow = model.getObject(se.getIndex());
if ("select".equals(cmd)) {
selectDetails(ureq, selectedRow);
}
}
}
super.formInnerEvent(ureq, source, event);
}
use of org.olat.modules.coach.model.EfficiencyStatementEntry in project OpenOLAT by OpenOLAT.
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 OpenOLAT.
the class CourseController method loadModel.
public List<EfficiencyStatementEntry> loadModel() {
List<EfficiencyStatementEntry> entries = coachingService.getCourse(getIdentity(), course, userPropertyHandlers, getLocale());
Long resourceKey = course.getOlatResource().getKey();
List<CertificateLight> certificates = certificatesManager.getLastCertificates(course.getOlatResource());
ConcurrentMap<IdentityResourceKey, CertificateLight> certificateMap = new ConcurrentHashMap<>();
for (CertificateLight certificate : certificates) {
IdentityResourceKey key = new IdentityResourceKey(certificate.getIdentityKey(), resourceKey);
certificateMap.put(key, certificate);
}
model.setObjects(entries, certificateMap);
tableEl.reloadData();
tableEl.reset();
return entries;
}
Aggregations