Search in sources :

Example 1 with CorrectionOverviewModel

use of org.olat.ims.qti21.ui.assessment.CorrectionOverviewModel in project OpenOLAT by OpenOLAT.

the class QTI21AssessmentDetailsController method doCorrection.

private void doCorrection(UserRequest ureq, AssessmentTestSession session) {
    File unzippedDirRoot = FileResourceManager.getInstance().unzipFileResource(testEntry.getOlatResource());
    ResolvedAssessmentTest resolvedAssessmentTest = qtiService.loadAndResolveAssessmentTest(unzippedDirRoot, false, false);
    ManifestBuilder manifestBuilder = ManifestBuilder.read(new File(unzippedDirRoot, "imsmanifest.xml"));
    TestSessionState testSessionState = qtiService.loadTestSessionState(session);
    CorrectionOverviewModel model = new CorrectionOverviewModel(entry, subIdent, testEntry, resolvedAssessmentTest, manifestBuilder, Collections.singletonMap(assessedIdentity, session), Collections.singletonMap(assessedIdentity, testSessionState));
    correctionCtrl = new CorrectionIdentityAssessmentItemListController(ureq, getWindowControl(), stackPanel, model, session, assessedIdentity);
    listenTo(correctionCtrl);
    stackPanel.pushController(translate("correction"), correctionCtrl);
}
Also used : CorrectionOverviewModel(org.olat.ims.qti21.ui.assessment.CorrectionOverviewModel) ManifestBuilder(org.olat.ims.qti21.model.xml.ManifestBuilder) TestSessionState(uk.ac.ed.ph.jqtiplus.state.TestSessionState) CorrectionIdentityAssessmentItemListController(org.olat.ims.qti21.ui.assessment.CorrectionIdentityAssessmentItemListController) ResolvedAssessmentTest(uk.ac.ed.ph.jqtiplus.resolution.ResolvedAssessmentTest) File(java.io.File)

Example 2 with CorrectionOverviewModel

use of org.olat.ims.qti21.ui.assessment.CorrectionOverviewModel in project OpenOLAT by OpenOLAT.

the class QTI21IdentityListCourseNodeToolsController method doOpenCorrection.

private void doOpenCorrection(UserRequest ureq) {
    File unzippedDirRoot = FileResourceManager.getInstance().unzipFileResource(testEntry.getOlatResource());
    ResolvedAssessmentTest resolvedAssessmentTest = qtiService.loadAndResolveAssessmentTest(unzippedDirRoot, false, false);
    ManifestBuilder manifestBuilder = ManifestBuilder.read(new File(unzippedDirRoot, "imsmanifest.xml"));
    TestSessionState testSessionState = qtiService.loadTestSessionState(lastSession);
    Map<Identity, AssessmentTestSession> lastSessionMap = new HashMap<>();
    lastSessionMap.put(assessedIdentity, lastSession);
    CorrectionOverviewModel model = new CorrectionOverviewModel(courseEntry, testCourseNode.getIdent(), testEntry, resolvedAssessmentTest, manifestBuilder, lastSessionMap, Collections.singletonMap(assessedIdentity, testSessionState));
    correctionCtrl = new CorrectionIdentityAssessmentItemListController(ureq, getWindowControl(), stackPanel, model, lastSession, assessedIdentity);
    listenTo(correctionCtrl);
    stackPanel.pushController(translate("tool.correction"), correctionCtrl);
}
Also used : CorrectionOverviewModel(org.olat.ims.qti21.ui.assessment.CorrectionOverviewModel) ManifestBuilder(org.olat.ims.qti21.model.xml.ManifestBuilder) AssessmentTestSession(org.olat.ims.qti21.AssessmentTestSession) TestSessionState(uk.ac.ed.ph.jqtiplus.state.TestSessionState) CorrectionIdentityAssessmentItemListController(org.olat.ims.qti21.ui.assessment.CorrectionIdentityAssessmentItemListController) HashMap(java.util.HashMap) ResolvedAssessmentTest(uk.ac.ed.ph.jqtiplus.resolution.ResolvedAssessmentTest) Identity(org.olat.core.id.Identity) File(java.io.File)

Example 3 with CorrectionOverviewModel

use of org.olat.ims.qti21.ui.assessment.CorrectionOverviewModel in project openolat by klemens.

the class QTI21IdentityListCourseNodeToolsController method doOpenCorrection.

private void doOpenCorrection(UserRequest ureq) {
    File unzippedDirRoot = FileResourceManager.getInstance().unzipFileResource(testEntry.getOlatResource());
    ResolvedAssessmentTest resolvedAssessmentTest = qtiService.loadAndResolveAssessmentTest(unzippedDirRoot, false, false);
    ManifestBuilder manifestBuilder = ManifestBuilder.read(new File(unzippedDirRoot, "imsmanifest.xml"));
    TestSessionState testSessionState = qtiService.loadTestSessionState(lastSession);
    Map<Identity, AssessmentTestSession> lastSessionMap = new HashMap<>();
    lastSessionMap.put(assessedIdentity, lastSession);
    Map<Identity, TestSessionState> testSessionStates = new HashMap<>();
    testSessionStates.put(assessedIdentity, testSessionState);
    CorrectionOverviewModel model = new CorrectionOverviewModel(courseEntry, testCourseNode.getIdent(), testEntry, resolvedAssessmentTest, manifestBuilder, lastSessionMap, testSessionStates);
    correctionCtrl = new CorrectionIdentityAssessmentItemListController(ureq, getWindowControl(), stackPanel, model, lastSession, assessedIdentity);
    listenTo(correctionCtrl);
    stackPanel.pushController(translate("tool.correction"), correctionCtrl);
}
Also used : CorrectionOverviewModel(org.olat.ims.qti21.ui.assessment.CorrectionOverviewModel) ManifestBuilder(org.olat.ims.qti21.model.xml.ManifestBuilder) AssessmentTestSession(org.olat.ims.qti21.AssessmentTestSession) TestSessionState(uk.ac.ed.ph.jqtiplus.state.TestSessionState) CorrectionIdentityAssessmentItemListController(org.olat.ims.qti21.ui.assessment.CorrectionIdentityAssessmentItemListController) HashMap(java.util.HashMap) ResolvedAssessmentTest(uk.ac.ed.ph.jqtiplus.resolution.ResolvedAssessmentTest) Identity(org.olat.core.id.Identity) File(java.io.File)

Example 4 with CorrectionOverviewModel

use of org.olat.ims.qti21.ui.assessment.CorrectionOverviewModel in project openolat by klemens.

the class QTI21AssessmentDetailsController method doCorrection.

private void doCorrection(UserRequest ureq, AssessmentTestSession session) {
    File unzippedDirRoot = FileResourceManager.getInstance().unzipFileResource(testEntry.getOlatResource());
    ResolvedAssessmentTest resolvedAssessmentTest = qtiService.loadAndResolveAssessmentTest(unzippedDirRoot, false, false);
    ManifestBuilder manifestBuilder = ManifestBuilder.read(new File(unzippedDirRoot, "imsmanifest.xml"));
    TestSessionState testSessionState = qtiService.loadTestSessionState(session);
    // use mutable maps to allow updates
    Map<Identity, AssessmentTestSession> lastSessions = new HashMap<>();
    lastSessions.put(assessedIdentity, session);
    Map<Identity, TestSessionState> testSessionStates = new HashMap<>();
    testSessionStates.put(assessedIdentity, testSessionState);
    CorrectionOverviewModel model = new CorrectionOverviewModel(entry, subIdent, testEntry, resolvedAssessmentTest, manifestBuilder, lastSessions, testSessionStates);
    correctionCtrl = new CorrectionIdentityAssessmentItemListController(ureq, getWindowControl(), stackPanel, model, session, assessedIdentity);
    listenTo(correctionCtrl);
    stackPanel.pushController(translate("correction"), correctionCtrl);
}
Also used : CorrectionOverviewModel(org.olat.ims.qti21.ui.assessment.CorrectionOverviewModel) ManifestBuilder(org.olat.ims.qti21.model.xml.ManifestBuilder) AssessmentTestSession(org.olat.ims.qti21.AssessmentTestSession) TestSessionState(uk.ac.ed.ph.jqtiplus.state.TestSessionState) CorrectionIdentityAssessmentItemListController(org.olat.ims.qti21.ui.assessment.CorrectionIdentityAssessmentItemListController) HashMap(java.util.HashMap) ResolvedAssessmentTest(uk.ac.ed.ph.jqtiplus.resolution.ResolvedAssessmentTest) Identity(org.olat.core.id.Identity) File(java.io.File)

Aggregations

File (java.io.File)4 ManifestBuilder (org.olat.ims.qti21.model.xml.ManifestBuilder)4 CorrectionIdentityAssessmentItemListController (org.olat.ims.qti21.ui.assessment.CorrectionIdentityAssessmentItemListController)4 CorrectionOverviewModel (org.olat.ims.qti21.ui.assessment.CorrectionOverviewModel)4 ResolvedAssessmentTest (uk.ac.ed.ph.jqtiplus.resolution.ResolvedAssessmentTest)4 TestSessionState (uk.ac.ed.ph.jqtiplus.state.TestSessionState)4 HashMap (java.util.HashMap)3 Identity (org.olat.core.id.Identity)3 AssessmentTestSession (org.olat.ims.qti21.AssessmentTestSession)3