use of org.olat.ims.qti.export.helper.ItemWithResponseLid in project OpenOLAT by OpenOLAT.
the class QTIStatisticsManagerLargeTest method getItemObjectList.
@SuppressWarnings("rawtypes")
private void getItemObjectList() {
InputStream in = QTIStatisticsManagerLargeTest.class.getResourceAsStream("qti.xml");
XMLParser xmlParser = new XMLParser(new IMSEntityResolver());
Document doc = xmlParser.parse(in, false);
Element root = doc.getRootElement();
List items = root.selectNodes("//item");
itemObjects = new ArrayList<QTIItemObject>();
for (Iterator iter = items.iterator(); iter.hasNext(); ) {
Element el_item = (Element) iter.next();
if (el_item.selectNodes(".//response_lid").size() > 0) {
itemObjects.add(new ItemWithResponseLid(el_item));
} else if (el_item.selectNodes(".//response_str").size() > 0) {
itemObjects.add(new ItemWithResponseStr(el_item));
}
}
}
use of org.olat.ims.qti.export.helper.ItemWithResponseLid in project openolat by klemens.
the class QTIStatisticsManagerLargeTest method getItemObjectList.
@SuppressWarnings("rawtypes")
private void getItemObjectList() {
InputStream in = QTIStatisticsManagerLargeTest.class.getResourceAsStream("qti.xml");
XMLParser xmlParser = new XMLParser(new IMSEntityResolver());
Document doc = xmlParser.parse(in, false);
Element root = doc.getRootElement();
List items = root.selectNodes("//item");
itemObjects = new ArrayList<QTIItemObject>();
for (Iterator iter = items.iterator(); iter.hasNext(); ) {
Element el_item = (Element) iter.next();
if (el_item.selectNodes(".//response_lid").size() > 0) {
itemObjects.add(new ItemWithResponseLid(el_item));
} else if (el_item.selectNodes(".//response_str").size() > 0) {
itemObjects.add(new ItemWithResponseStr(el_item));
}
}
}
Aggregations