use of uk.ac.ed.ph.jqtiplus.SimpleJqtiFacade in project OpenOLAT by OpenOLAT.
the class RunningItemHelper method run.
public static ItemSessionController run(URI inputUri, Map<Identifier, ResponseData> responseMap, ResourceLocator inputResourceLocator) {
SimpleJqtiFacade simpleJqtiFacade = new SimpleJqtiFacade();
ResolvedAssessmentItem resolvedAssessmentItem = simpleJqtiFacade.loadAndResolveAssessmentItem(inputResourceLocator, inputUri);
ItemProcessingMap itemProcessingMap = new ItemProcessingInitializer(resolvedAssessmentItem, false).initialize();
ItemSessionState itemSessionState = new ItemSessionState();
ItemSessionControllerSettings itemSessionControllerSettings = new ItemSessionControllerSettings();
ItemSessionController itemSessionController = simpleJqtiFacade.createItemSessionController(itemSessionControllerSettings, itemProcessingMap, itemSessionState);
itemSessionController.initialize(new Date());
itemSessionController.performTemplateProcessing(new Date());
itemSessionController.enterItem(new Date());
itemSessionController.bindResponses(new Date(), responseMap);
itemSessionController.commitResponses(new Date());
itemSessionController.performResponseProcessing(new Date());
AssessmentItem assessmentItem = resolvedAssessmentItem.getRootNodeLookup().extractIfSuccessful();
assessmentItem.getItemBody().willShowFeedback(itemSessionController);
itemSessionController.endItem(new Date());
itemSessionController.exitItem(new Date());
return itemSessionController;
}
use of uk.ac.ed.ph.jqtiplus.SimpleJqtiFacade in project openolat by klemens.
the class RunningItemHelper method run.
public static ItemSessionController run(URI inputUri, Map<Identifier, ResponseData> responseMap, ResourceLocator inputResourceLocator) {
SimpleJqtiFacade simpleJqtiFacade = new SimpleJqtiFacade();
ResolvedAssessmentItem resolvedAssessmentItem = simpleJqtiFacade.loadAndResolveAssessmentItem(inputResourceLocator, inputUri);
ItemProcessingMap itemProcessingMap = new ItemProcessingInitializer(resolvedAssessmentItem, false).initialize();
ItemSessionState itemSessionState = new ItemSessionState();
ItemSessionControllerSettings itemSessionControllerSettings = new ItemSessionControllerSettings();
ItemSessionController itemSessionController = simpleJqtiFacade.createItemSessionController(itemSessionControllerSettings, itemProcessingMap, itemSessionState);
itemSessionController.initialize(new Date());
itemSessionController.performTemplateProcessing(new Date());
itemSessionController.enterItem(new Date());
itemSessionController.bindResponses(new Date(), responseMap);
itemSessionController.commitResponses(new Date());
itemSessionController.performResponseProcessing(new Date());
AssessmentItem assessmentItem = resolvedAssessmentItem.getRootNodeLookup().extractIfSuccessful();
assessmentItem.getItemBody().willShowFeedback(itemSessionController);
itemSessionController.endItem(new Date());
itemSessionController.exitItem(new Date());
return itemSessionController;
}
Aggregations