Search in sources :

Example 6 with RetrieveAssessmentTestSessionEvent

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();
            }
        }
    }
}
Also used : RetrieveAssessmentTestSessionEvent(org.olat.ims.qti21.ui.event.RetrieveAssessmentTestSessionEvent)

Example 7 with RetrieveAssessmentTestSessionEvent

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);
}
Also used : OLATResourceable(org.olat.core.id.OLATResourceable) AssessmentSessionAuditLogger(org.olat.ims.qti21.AssessmentSessionAuditLogger) RetrieveAssessmentTestSessionEvent(org.olat.ims.qti21.ui.event.RetrieveAssessmentTestSessionEvent)

Example 8 with RetrieveAssessmentTestSessionEvent

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();
            }
        }
    }
}
Also used : RetrieveAssessmentTestSessionEvent(org.olat.ims.qti21.ui.event.RetrieveAssessmentTestSessionEvent)

Aggregations

RetrieveAssessmentTestSessionEvent (org.olat.ims.qti21.ui.event.RetrieveAssessmentTestSessionEvent)8 OLATResourceable (org.olat.core.id.OLATResourceable)6 AssessmentSessionAuditLogger (org.olat.ims.qti21.AssessmentSessionAuditLogger)6 Date (java.util.Date)2 HashMap (java.util.HashMap)2 LinkedHashMap (java.util.LinkedHashMap)2 Map (java.util.Map)2 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)2 ConcurrentMap (java.util.concurrent.ConcurrentMap)2 AssessmentTestSession (org.olat.ims.qti21.AssessmentTestSession)2 InMemoryAssessmentTestSession (org.olat.ims.qti21.model.InMemoryAssessmentTestSession)2 ItemSessionState (uk.ac.ed.ph.jqtiplus.state.ItemSessionState)2 TestPlan (uk.ac.ed.ph.jqtiplus.state.TestPlan)2 TestPlanNode (uk.ac.ed.ph.jqtiplus.state.TestPlanNode)2 TestPlanNodeKey (uk.ac.ed.ph.jqtiplus.state.TestPlanNodeKey)2 TestSessionState (uk.ac.ed.ph.jqtiplus.state.TestSessionState)2