use of org.olat.ims.qti21.ui.statistics.interactions.UnsupportedInteractionController in project OpenOLAT by OpenOLAT.
the class QTI21AssessmentItemStatisticsController method interactionControllerFactory.
private Component interactionControllerFactory(UserRequest ureq, Interaction interaction, StatisticsItem itemStats) {
Controller interactionCtrl = null;
if (interaction instanceof ChoiceInteraction) {
interactionCtrl = new SimpleChoiceInteractionStatisticsController(ureq, getWindowControl(), itemRef, item, (ChoiceInteraction) interaction, itemStats, resourceResult);
} else if (interaction instanceof MatchInteraction) {
String responseIdentifier = interaction.getResponseIdentifier().toString();
if (responseIdentifier.startsWith("KPRIM_") || QTI21QuestionType.hasClass(interaction, QTI21Constants.CSS_MATCH_KPRIM)) {
interactionCtrl = new KPrimStatisticsController(ureq, getWindowControl(), itemRef, item, (MatchInteraction) interaction, resourceResult);
} else {
interactionCtrl = new MatchStatisticsController(ureq, getWindowControl(), itemRef, item, (MatchInteraction) interaction, resourceResult);
}
} else if (interaction instanceof HotspotInteraction) {
interactionCtrl = new HotspotInteractionStatisticsController(ureq, getWindowControl(), itemRef, item, (HotspotInteraction) interaction, itemStats, resourceResult);
} else if (interaction instanceof HottextInteraction) {
interactionCtrl = new HottextInteractionStatisticsController(ureq, getWindowControl(), itemRef, item, (HottextInteraction) interaction, itemStats, resourceResult);
}
if (interactionCtrl == null) {
interactionCtrl = new UnsupportedInteractionController(ureq, getWindowControl(), interaction);
}
listenTo(interactionCtrl);
return interactionCtrl.getInitialComponent();
}
use of org.olat.ims.qti21.ui.statistics.interactions.UnsupportedInteractionController in project openolat by klemens.
the class QTI21AssessmentItemStatisticsController method interactionControllerFactory.
private Component interactionControllerFactory(UserRequest ureq, Interaction interaction, StatisticsItem itemStats) {
Controller interactionCtrl = null;
if (interaction instanceof ChoiceInteraction) {
interactionCtrl = new SimpleChoiceInteractionStatisticsController(ureq, getWindowControl(), itemRef, item, (ChoiceInteraction) interaction, itemStats, resourceResult);
} else if (interaction instanceof MatchInteraction) {
String responseIdentifier = interaction.getResponseIdentifier().toString();
if (responseIdentifier.startsWith("KPRIM_") || QTI21QuestionType.hasClass(interaction, QTI21Constants.CSS_MATCH_KPRIM)) {
interactionCtrl = new KPrimStatisticsController(ureq, getWindowControl(), itemRef, item, (MatchInteraction) interaction, resourceResult);
} else {
interactionCtrl = new MatchStatisticsController(ureq, getWindowControl(), itemRef, item, (MatchInteraction) interaction, resourceResult);
}
} else if (interaction instanceof HotspotInteraction) {
interactionCtrl = new HotspotInteractionStatisticsController(ureq, getWindowControl(), itemRef, item, (HotspotInteraction) interaction, itemStats, resourceResult);
} else if (interaction instanceof HottextInteraction) {
interactionCtrl = new HottextInteractionStatisticsController(ureq, getWindowControl(), itemRef, item, (HottextInteraction) interaction, itemStats, resourceResult);
}
if (interactionCtrl == null) {
interactionCtrl = new UnsupportedInteractionController(ureq, getWindowControl(), interaction);
}
listenTo(interactionCtrl);
return interactionCtrl.getInitialComponent();
}
Aggregations