Search in sources :

Example 1 with TestPlanner

use of uk.ac.ed.ph.jqtiplus.running.TestPlanner 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;
}
Also used : TestSessionControllerSettings(uk.ac.ed.ph.jqtiplus.running.TestSessionControllerSettings) TestProcessingMap(uk.ac.ed.ph.jqtiplus.state.TestProcessingMap) TestPlanner(uk.ac.ed.ph.jqtiplus.running.TestPlanner) TestSessionState(uk.ac.ed.ph.jqtiplus.state.TestSessionState) TestPlan(uk.ac.ed.ph.jqtiplus.state.TestPlan) TestSessionController(uk.ac.ed.ph.jqtiplus.running.TestSessionController)

Example 2 with TestPlanner

use of uk.ac.ed.ph.jqtiplus.running.TestPlanner 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;
}
Also used : TestSessionControllerSettings(uk.ac.ed.ph.jqtiplus.running.TestSessionControllerSettings) TestProcessingMap(uk.ac.ed.ph.jqtiplus.state.TestProcessingMap) TestPlanner(uk.ac.ed.ph.jqtiplus.running.TestPlanner) TestSessionState(uk.ac.ed.ph.jqtiplus.state.TestSessionState) TestPlan(uk.ac.ed.ph.jqtiplus.state.TestPlan) TestSessionController(uk.ac.ed.ph.jqtiplus.running.TestSessionController)

Aggregations

TestPlanner (uk.ac.ed.ph.jqtiplus.running.TestPlanner)2 TestSessionController (uk.ac.ed.ph.jqtiplus.running.TestSessionController)2 TestSessionControllerSettings (uk.ac.ed.ph.jqtiplus.running.TestSessionControllerSettings)2 TestPlan (uk.ac.ed.ph.jqtiplus.state.TestPlan)2 TestProcessingMap (uk.ac.ed.ph.jqtiplus.state.TestProcessingMap)2 TestSessionState (uk.ac.ed.ph.jqtiplus.state.TestSessionState)2