Search in sources :

Example 1 with TestProcessingInitializer

use of uk.ac.ed.ph.jqtiplus.running.TestProcessingInitializer in project OpenOLAT by OpenOLAT.

the class AssessmentTestDisplayController method getTestProcessingMap.

private TestProcessingMap getTestProcessingMap() {
    boolean assessmentPackageIsValid = true;
    BadResourceException ex = resolvedAssessmentTest.getTestLookup().getBadResourceException();
    if (ex instanceof QtiXmlInterpretationException) {
        try {
            // try to log some informations
            QtiXmlInterpretationException exml = (QtiXmlInterpretationException) ex;
            logError(exml.getInterpretationFailureReason().toString(), null);
            for (QtiModelBuildingError err : exml.getQtiModelBuildingErrors()) {
                logError(err.toString(), null);
            }
        } catch (Exception e) {
            logError("", e);
        }
    }
    TestProcessingInitializer initializer = new TestProcessingInitializer(resolvedAssessmentTest, assessmentPackageIsValid);
    TestProcessingMap result = initializer.initialize();
    return result;
}
Also used : TestProcessingMap(uk.ac.ed.ph.jqtiplus.state.TestProcessingMap) BadResourceException(uk.ac.ed.ph.jqtiplus.provision.BadResourceException) QtiXmlInterpretationException(uk.ac.ed.ph.jqtiplus.reading.QtiXmlInterpretationException) TestProcessingInitializer(uk.ac.ed.ph.jqtiplus.running.TestProcessingInitializer) QtiModelBuildingError(uk.ac.ed.ph.jqtiplus.reading.QtiModelBuildingError) ResponseBindingException(uk.ac.ed.ph.jqtiplus.exception.ResponseBindingException) QtiXmlInterpretationException(uk.ac.ed.ph.jqtiplus.reading.QtiXmlInterpretationException) QtiCandidateStateException(uk.ac.ed.ph.jqtiplus.exception.QtiCandidateStateException) BadResourceException(uk.ac.ed.ph.jqtiplus.provision.BadResourceException) OLATRuntimeException(org.olat.core.logging.OLATRuntimeException)

Example 2 with TestProcessingInitializer

use of uk.ac.ed.ph.jqtiplus.running.TestProcessingInitializer in project openolat by klemens.

the class AssessmentTestDisplayController method getTestProcessingMap.

private TestProcessingMap getTestProcessingMap() {
    boolean assessmentPackageIsValid = true;
    BadResourceException ex = resolvedAssessmentTest.getTestLookup().getBadResourceException();
    if (ex instanceof QtiXmlInterpretationException) {
        try {
            // try to log some informations
            QtiXmlInterpretationException exml = (QtiXmlInterpretationException) ex;
            logError(exml.getInterpretationFailureReason().toString(), null);
            for (QtiModelBuildingError err : exml.getQtiModelBuildingErrors()) {
                logError(err.toString(), null);
            }
        } catch (Exception e) {
            logError("", e);
        }
    }
    TestProcessingInitializer initializer = new TestProcessingInitializer(resolvedAssessmentTest, assessmentPackageIsValid);
    TestProcessingMap result = initializer.initialize();
    return result;
}
Also used : TestProcessingMap(uk.ac.ed.ph.jqtiplus.state.TestProcessingMap) BadResourceException(uk.ac.ed.ph.jqtiplus.provision.BadResourceException) QtiXmlInterpretationException(uk.ac.ed.ph.jqtiplus.reading.QtiXmlInterpretationException) TestProcessingInitializer(uk.ac.ed.ph.jqtiplus.running.TestProcessingInitializer) QtiModelBuildingError(uk.ac.ed.ph.jqtiplus.reading.QtiModelBuildingError) ResponseBindingException(uk.ac.ed.ph.jqtiplus.exception.ResponseBindingException) QtiXmlInterpretationException(uk.ac.ed.ph.jqtiplus.reading.QtiXmlInterpretationException) QtiCandidateStateException(uk.ac.ed.ph.jqtiplus.exception.QtiCandidateStateException) BadResourceException(uk.ac.ed.ph.jqtiplus.provision.BadResourceException) OLATRuntimeException(org.olat.core.logging.OLATRuntimeException)

Aggregations

OLATRuntimeException (org.olat.core.logging.OLATRuntimeException)2 QtiCandidateStateException (uk.ac.ed.ph.jqtiplus.exception.QtiCandidateStateException)2 ResponseBindingException (uk.ac.ed.ph.jqtiplus.exception.ResponseBindingException)2 BadResourceException (uk.ac.ed.ph.jqtiplus.provision.BadResourceException)2 QtiModelBuildingError (uk.ac.ed.ph.jqtiplus.reading.QtiModelBuildingError)2 QtiXmlInterpretationException (uk.ac.ed.ph.jqtiplus.reading.QtiXmlInterpretationException)2 TestProcessingInitializer (uk.ac.ed.ph.jqtiplus.running.TestProcessingInitializer)2 TestProcessingMap (uk.ac.ed.ph.jqtiplus.state.TestProcessingMap)2