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);
}
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);
}
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);
}
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);
}
Aggregations