use of org.olat.ims.qti21.model.xml.ModalFeedbackBuilder.ModalFeedbackType in project OpenOLAT by OpenOLAT.
the class AssessmentItemBuilder method extractModalFeedbacks.
private void extractModalFeedbacks() {
List<ModalFeedback> feedbacks = assessmentItem.getModalFeedbacks();
for (ModalFeedback feedback : feedbacks) {
ModalFeedbackBuilder feedbackBuilder = new ModalFeedbackBuilder(assessmentItem, feedback);
ModalFeedbackType feedbackType = feedbackBuilder.getType();
if (feedbackType != null && feedbackType != ModalFeedbackType.unkown) {
switch(feedbackType) {
case correct:
correctFeedback = feedbackBuilder;
break;
case incorrect:
incorrectFeedback = feedbackBuilder;
break;
case correctSolution:
correctSolutionFeedback = feedbackBuilder;
break;
case empty:
emptyFeedback = feedbackBuilder;
break;
case answered:
answeredFeedback = feedbackBuilder;
break;
case hint:
hint = feedbackBuilder;
break;
case additional:
additionalFeedbacks.add(feedbackBuilder);
break;
case unkown:
log.error("Unkown feedback:");
break;
}
}
}
}
use of org.olat.ims.qti21.model.xml.ModalFeedbackBuilder.ModalFeedbackType in project openolat by klemens.
the class AssessmentItemBuilder method extractModalFeedbacks.
private void extractModalFeedbacks() {
List<ModalFeedback> feedbacks = assessmentItem.getModalFeedbacks();
for (ModalFeedback feedback : feedbacks) {
ModalFeedbackBuilder feedbackBuilder = new ModalFeedbackBuilder(assessmentItem, feedback);
ModalFeedbackType feedbackType = feedbackBuilder.getType();
if (feedbackType != null && feedbackType != ModalFeedbackType.unkown) {
switch(feedbackType) {
case correct:
correctFeedback = feedbackBuilder;
break;
case incorrect:
incorrectFeedback = feedbackBuilder;
break;
case correctSolution:
correctSolutionFeedback = feedbackBuilder;
break;
case empty:
emptyFeedback = feedbackBuilder;
break;
case answered:
answeredFeedback = feedbackBuilder;
break;
case hint:
hint = feedbackBuilder;
break;
case additional:
additionalFeedbacks.add(feedbackBuilder);
break;
case unkown:
log.error("Unkown feedback:");
break;
}
}
}
}
Aggregations