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