use of org.olat.modules.coach.model.EfficiencyStatementEntry in project OpenOLAT by OpenOLAT.
the class CourseController 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);
doSelectDetails(ureq, previousEntry);
}
use of org.olat.modules.coach.model.EfficiencyStatementEntry in project OpenOLAT by OpenOLAT.
the class CourseController 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)) {
doSelectDetails(ureq, selectedRow);
}
}
} else if (source == openCourse) {
doOpenCourse(ureq);
}
super.formInnerEvent(ureq, source, event);
}
use of org.olat.modules.coach.model.EfficiencyStatementEntry in project OpenOLAT by OpenOLAT.
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 CoachingLargeTest method getCourse.
@Test
public void getCourse() {
List<Long> coachedCourses = coachToCourseMap.get(coach10.getKey());
Assert.assertNotNull(coachedCourses);
List<EfficiencyStatementEntry> statEntries = coachingService.getCourse(coach10, course10, userPropertyHandlers, Locale.ENGLISH);
Assert.assertNotNull(statEntries);
Assert.assertFalse(statEntries.isEmpty());
Assert.assertTrue(coachedCourses.contains(course10.getKey()));
for (EfficiencyStatementEntry statEntry : statEntries) {
Assert.assertNotNull(statEntry.getCourse());
Assert.assertEquals(course10.getKey(), statEntry.getCourse().getKey());
}
}
use of org.olat.modules.coach.model.EfficiencyStatementEntry in project openolat by klemens.
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);
}
Aggregations