use of org.olat.ims.qti21.ui.statistics.interactions.TextEntryInteractionsStatisticsController in project OpenOLAT by OpenOLAT.
the class QTI21AssessmentItemStatisticsController method initInteractionControllers.
private List<String> initInteractionControllers(UserRequest ureq, StatisticsItem itemStats) {
List<Interaction> interactions = item.getItemBody().findInteractions();
List<String> interactionIds = new ArrayList<>(interactions.size());
int counter = 0;
List<TextEntryInteraction> textEntryInteractions = new ArrayList<>();
for (Interaction interaction : interactions) {
if (interaction instanceof TextEntryInteraction) {
textEntryInteractions.add((TextEntryInteraction) interaction);
} else if (interaction instanceof EndAttemptInteraction) {
continue;
} else {
Component cmp = interactionControllerFactory(ureq, interaction, itemStats);
String componentId = "interaction" + counter++;
mainVC.put(componentId, cmp);
interactionIds.add(componentId);
}
}
if (textEntryInteractions.size() > 0) {
Controller interactionCtrl = new TextEntryInteractionsStatisticsController(ureq, getWindowControl(), itemRef, item, textEntryInteractions, resourceResult);
listenTo(interactionCtrl);
String componentId = "interaction" + counter++;
mainVC.put(componentId, interactionCtrl.getInitialComponent());
interactionIds.add(componentId);
}
return interactionIds;
}
use of org.olat.ims.qti21.ui.statistics.interactions.TextEntryInteractionsStatisticsController in project openolat by klemens.
the class QTI21AssessmentItemStatisticsController method initInteractionControllers.
private List<String> initInteractionControllers(UserRequest ureq, StatisticsItem itemStats) {
List<Interaction> interactions = item.getItemBody().findInteractions();
List<String> interactionIds = new ArrayList<>(interactions.size());
int counter = 0;
List<TextEntryInteraction> textEntryInteractions = new ArrayList<>();
for (Interaction interaction : interactions) {
if (interaction instanceof TextEntryInteraction) {
textEntryInteractions.add((TextEntryInteraction) interaction);
} else if (interaction instanceof EndAttemptInteraction) {
continue;
} else {
Component cmp = interactionControllerFactory(ureq, interaction, itemStats);
String componentId = "interaction" + counter++;
mainVC.put(componentId, cmp);
interactionIds.add(componentId);
}
}
if (textEntryInteractions.size() > 0) {
Controller interactionCtrl = new TextEntryInteractionsStatisticsController(ureq, getWindowControl(), itemRef, item, textEntryInteractions, resourceResult);
listenTo(interactionCtrl);
String componentId = "interaction" + counter++;
mainVC.put(componentId, interactionCtrl.getInitialComponent());
interactionIds.add(componentId);
}
return interactionIds;
}
Aggregations