use of uk.ac.ed.ph.jqtiplus.serialization.SaxFiringOptions in project openolat by klemens.
the class QTI21ServiceImpl method persistAssessmentObject.
@Override
public boolean persistAssessmentObject(File resourceFile, AssessmentObject assessmentObject) {
try (FileOutputStream out = new FileOutputStream(resourceFile)) {
final XsltSerializationOptions xsltSerializationOptions = new XsltSerializationOptions();
xsltSerializationOptions.setIndenting(false);
qtiSerializer().serializeJqtiObject(assessmentObject, new StreamResult(out), new SaxFiringOptions(), xsltSerializationOptions);
assessmentTestsCache.remove(resourceFile);
assessmentItemsCache.remove(resourceFile);
return true;
} catch (Exception e) {
log.error("", e);
return false;
}
}
Aggregations