use of org.olat.ims.qti21.ui.event.RetrieveAssessmentTestSessionEvent in project OpenOLAT by OpenOLAT.
the class AssessmentTestDisplayController method event.
@Override
public void event(Event event) {
if (event instanceof RetrieveAssessmentTestSessionEvent) {
RetrieveAssessmentTestSessionEvent rats = (RetrieveAssessmentTestSessionEvent) event;
if (candidateSession != null && candidateSession.getKey().equals(rats.getAssessmentTestSessionKey())) {
candidateSession = qtiService.reloadAssessmentTestSession(candidateSession);
extraTime = candidateSession.getExtraTime();
if (extraTime != null) {
qtiWorksCtrl.extraTime();
}
}
}
}
use of org.olat.ims.qti21.ui.event.RetrieveAssessmentTestSessionEvent in project openolat by klemens.
the class QTI21ServiceImpl method extraTimeAssessmentTestSession.
@Override
public void extraTimeAssessmentTestSession(AssessmentTestSession session, int extraTime, Identity actor) {
testSessionDao.extraTime(session, extraTime);
// commit before event
dbInstance.commit();
AssessmentSessionAuditLogger candidateAuditLogger = getAssessmentSessionAuditLogger(session, false);
candidateAuditLogger.logTestExtend(session, extraTime, actor);
RetrieveAssessmentTestSessionEvent event = new RetrieveAssessmentTestSessionEvent(session.getKey());
OLATResourceable sessionOres = OresHelper.createOLATResourceableInstance(AssessmentTestSession.class, session.getKey());
coordinatorManager.getCoordinator().getEventBus().fireEventToListenersOf(event, sessionOres);
}
use of org.olat.ims.qti21.ui.event.RetrieveAssessmentTestSessionEvent in project openolat by klemens.
the class AssessmentTestDisplayController method event.
@Override
public void event(Event event) {
if (event instanceof RetrieveAssessmentTestSessionEvent) {
RetrieveAssessmentTestSessionEvent rats = (RetrieveAssessmentTestSessionEvent) event;
if (candidateSession != null && candidateSession.getKey().equals(rats.getAssessmentTestSessionKey())) {
candidateSession = qtiService.reloadAssessmentTestSession(candidateSession);
extraTime = candidateSession.getExtraTime();
if (extraTime != null) {
qtiWorksCtrl.extraTime();
}
}
}
}
Aggregations