use of uk.ac.ed.ph.jqtiplus.running.TestSessionControllerSettings in project OpenOLAT by OpenOLAT.
the class AssessmentTestDisplayController method createNewTestSessionStateAndController.
private TestSessionController createNewTestSessionStateAndController(NotificationRecorder notificationRecorder) {
TestProcessingMap testProcessingMap = getTestProcessingMap();
/* Generate a test plan for this session */
final TestPlanner testPlanner = new TestPlanner(testProcessingMap);
if (notificationRecorder != null) {
testPlanner.addNotificationListener(notificationRecorder);
}
final TestPlan testPlan = testPlanner.generateTestPlan();
final TestSessionState testSessionState = new TestSessionState(testPlan);
final TestSessionControllerSettings testSessionControllerSettings = new TestSessionControllerSettings();
testSessionControllerSettings.setTemplateProcessingLimit(computeTemplateProcessingLimit());
testProcessingMap.reduceItemProcessingMapMap(testPlan.getTestPlanNodeList());
/* Create controller and wire up notification recorder */
final TestSessionController result = new TestSessionController(qtiService.jqtiExtensionManager(), testSessionControllerSettings, testProcessingMap, testSessionState);
if (notificationRecorder != null) {
result.addNotificationListener(notificationRecorder);
}
return result;
}
use of uk.ac.ed.ph.jqtiplus.running.TestSessionControllerSettings in project OpenOLAT by OpenOLAT.
the class AssessmentTestDisplayController method createTestSessionController.
public TestSessionController createTestSessionController(TestSessionState testSessionState, NotificationRecorder notificationRecorder) {
/* Try to resolve the underlying JQTI+ object */
final TestProcessingMap testProcessingMap = getTestProcessingMap();
if (testProcessingMap == null) {
return null;
}
/* Create config for TestSessionController */
final TestSessionControllerSettings testSessionControllerSettings = new TestSessionControllerSettings();
testSessionControllerSettings.setTemplateProcessingLimit(computeTemplateProcessingLimit());
/* Create controller and wire up notification recorder (if passed) */
final TestSessionController result = new TestSessionController(qtiService.jqtiExtensionManager(), testSessionControllerSettings, testProcessingMap, testSessionState);
if (notificationRecorder != null) {
result.addNotificationListener(notificationRecorder);
}
return result;
}
use of uk.ac.ed.ph.jqtiplus.running.TestSessionControllerSettings in project openolat by klemens.
the class AssessmentTestDisplayController method createNewTestSessionStateAndController.
private TestSessionController createNewTestSessionStateAndController(NotificationRecorder notificationRecorder) {
TestProcessingMap testProcessingMap = getTestProcessingMap();
/* Generate a test plan for this session */
final TestPlanner testPlanner = new TestPlanner(testProcessingMap);
if (notificationRecorder != null) {
testPlanner.addNotificationListener(notificationRecorder);
}
final TestPlan testPlan = testPlanner.generateTestPlan();
final TestSessionState testSessionState = new TestSessionState(testPlan);
final TestSessionControllerSettings testSessionControllerSettings = new TestSessionControllerSettings();
testSessionControllerSettings.setTemplateProcessingLimit(computeTemplateProcessingLimit());
testProcessingMap.reduceItemProcessingMapMap(testPlan.getTestPlanNodeList());
/* Create controller and wire up notification recorder */
final TestSessionController result = new TestSessionController(qtiService.jqtiExtensionManager(), testSessionControllerSettings, testProcessingMap, testSessionState);
if (notificationRecorder != null) {
result.addNotificationListener(notificationRecorder);
}
return result;
}
use of uk.ac.ed.ph.jqtiplus.running.TestSessionControllerSettings in project openolat by klemens.
the class AssessmentTestDisplayController method createTestSessionController.
public TestSessionController createTestSessionController(TestSessionState testSessionState, NotificationRecorder notificationRecorder) {
/* Try to resolve the underlying JQTI+ object */
final TestProcessingMap testProcessingMap = getTestProcessingMap();
if (testProcessingMap == null) {
return null;
}
/* Create config for TestSessionController */
final TestSessionControllerSettings testSessionControllerSettings = new TestSessionControllerSettings();
testSessionControllerSettings.setTemplateProcessingLimit(computeTemplateProcessingLimit());
/* Create controller and wire up notification recorder (if passed) */
final TestSessionController result = new TestSessionController(qtiService.jqtiExtensionManager(), testSessionControllerSettings, testProcessingMap, testSessionState);
if (notificationRecorder != null) {
result.addNotificationListener(notificationRecorder);
}
return result;
}
Aggregations