use of org.olat.ims.qti.export.helper.QTIItemObject in project openolat by klemens.
the class QTIExportManager method createContentOfExportFile.
/**
* @param locale Locale used for export file headers / default values
* @param results
* @param type
* @param anonymizerCallback
* @return String
*/
private void createContentOfExportFile(List<QTIResult> qtiResults, List<QTIItemObject> qtiItemObjectList, QTIExportFormatter qef) {
qef.openReport();
// formatter has information about how to format the different qti objects
Map<Class<?>, QTIExportItemFormatConfig> mapWithConfigs = qef.getMapWithExportItemConfigs();
QTIExportItemFactory qeif = new QTIExportItemFactory(mapWithConfigs);
while (qtiResults.size() > 0) {
List<QTIResult> assessIDresults = stripNextAssessID(qtiResults);
qef.openResultSet(new QTIExportSet(assessIDresults.get(0)));
for (QTIItemObject element : qtiItemObjectList) {
QTIResult qtir = element.extractQTIResult(assessIDresults);
qef.visit(qeif.getExportItem(qtir, element));
}
qef.closeResultSet();
}
qef.closeReport();
}
Aggregations