use of org.olat.modules.assessment.ui.AssessmentToolContainer in project openolat by klemens.
the class STIdentityListCourseNodeController method loadModel.
@Override
protected void loadModel(UserRequest ureq) {
Map<Long, Date> initialLaunchDates = userInfosMgr.getInitialLaunchDates(getCourseRepositoryEntry().getOlatResource());
super.loadModel(ureq);
List<AssessedIdentityElementRow> rows = usersTableModel.getObjects();
for (AssessedIdentityElementRow row : rows) {
Date initialLaunchDate = initialLaunchDates.get(row.getIdentityKey());
row.setInitialCourseLaunchDate(initialLaunchDate);
}
AssessmentToolContainer toolContainer = getToolContainer();
if (toolContainer.getCertificateMap() == null) {
List<CertificateLight> certificates = certificatesManager.getLastCertificates(getCourseRepositoryEntry().getOlatResource());
ConcurrentMap<Long, CertificateLight> certificateMap = new ConcurrentHashMap<>();
for (CertificateLight certificate : certificates) {
certificateMap.put(certificate.getIdentityKey(), certificate);
}
toolContainer.setCertificateMap(certificateMap);
}
usersTableModel.setCertificateMap(toolContainer.getCertificateMap());
}
use of org.olat.modules.assessment.ui.AssessmentToolContainer in project OpenOLAT by OpenOLAT.
the class STIdentityListCourseNodeController method loadModel.
@Override
protected void loadModel(UserRequest ureq) {
Map<Long, Date> initialLaunchDates = userInfosMgr.getInitialLaunchDates(getCourseRepositoryEntry().getOlatResource());
super.loadModel(ureq);
List<AssessedIdentityElementRow> rows = usersTableModel.getObjects();
for (AssessedIdentityElementRow row : rows) {
Date initialLaunchDate = initialLaunchDates.get(row.getIdentityKey());
row.setInitialCourseLaunchDate(initialLaunchDate);
}
AssessmentToolContainer toolContainer = getToolContainer();
if (toolContainer.getCertificateMap() == null) {
List<CertificateLight> certificates = certificatesManager.getLastCertificates(getCourseRepositoryEntry().getOlatResource());
ConcurrentMap<Long, CertificateLight> certificateMap = new ConcurrentHashMap<>();
for (CertificateLight certificate : certificates) {
certificateMap.put(certificate.getIdentityKey(), certificate);
}
toolContainer.setCertificateMap(certificateMap);
}
usersTableModel.setCertificateMap(toolContainer.getCertificateMap());
}
Aggregations