use of org.olat.ims.qti21.model.xml.AssessmentItemBuilder in project openolat by klemens.
the class CSVToAssessmentItemConverter method processFeedbackCorrectAnswer.
private void processFeedbackCorrectAnswer(String[] parts) {
if (currentItem == null || parts.length < 2)
return;
String feedback = parts[1];
if (StringHelper.containsNonWhitespace(feedback)) {
AssessmentItemBuilder itemBuilder = currentItem.getItemBuilder();
itemBuilder.createCorrectFeedback().setText(feedback);
}
}
use of org.olat.ims.qti21.model.xml.AssessmentItemBuilder in project openolat by klemens.
the class CSVToAssessmentItemConverter method processFeedbackWrongAnswer.
private void processFeedbackWrongAnswer(String[] parts) {
if (currentItem == null || parts.length < 2)
return;
String feedback = parts[1];
if (StringHelper.containsNonWhitespace(feedback)) {
AssessmentItemBuilder itemBuilder = currentItem.getItemBuilder();
itemBuilder.createIncorrectFeedback().setText(feedback);
}
}
use of org.olat.ims.qti21.model.xml.AssessmentItemBuilder in project openolat by klemens.
the class AssessmentItemEditorController method initMatchChoiceEditors.
private AssessmentItemBuilder initMatchChoiceEditors(UserRequest ureq, AssessmentItem item) {
MatchAssessmentItemBuilder matchItemBuilder = new MatchAssessmentItemBuilder(item, qtiService.qtiSerializer());
itemEditor = new MatchEditorController(ureq, getWindowControl(), matchItemBuilder, rootDirectory, rootContainer, itemFile, restrictedEdit, readOnly);
listenTo(itemEditor);
scoreEditor = new MatchScoreController(ureq, getWindowControl(), matchItemBuilder, itemRef, itemFile, true, restrictedEdit, readOnly);
listenTo(scoreEditor);
feedbackEditor = new FeedbacksEditorController(ureq, getWindowControl(), matchItemBuilder, rootDirectory, rootContainer, itemFile, FeedbacksEnabler.standardFeedbacks(), restrictedEdit, readOnly);
listenTo(feedbackEditor);
tabbedPane.addTab(translate("form.match"), itemEditor);
tabbedPane.addTab(translate("form.score"), scoreEditor);
tabbedPane.addTab(translate("form.feedback"), feedbackEditor);
return matchItemBuilder;
}
use of org.olat.ims.qti21.model.xml.AssessmentItemBuilder in project openolat by klemens.
the class AssessmentItemEditorController method initHotspotEditors.
private AssessmentItemBuilder initHotspotEditors(UserRequest ureq, AssessmentItem item) {
HotspotAssessmentItemBuilder hotspotItemBuilder = new HotspotAssessmentItemBuilder(item, qtiService.qtiSerializer());
itemEditor = new HotspotEditorController(ureq, getWindowControl(), hotspotItemBuilder, rootDirectory, rootContainer, itemFile, restrictedEdit, readOnly);
listenTo(itemEditor);
scoreEditor = new HotspotChoiceScoreController(ureq, getWindowControl(), hotspotItemBuilder, itemRef, itemFile, restrictedEdit, readOnly);
listenTo(scoreEditor);
feedbackEditor = new FeedbacksEditorController(ureq, getWindowControl(), hotspotItemBuilder, rootDirectory, rootContainer, itemFile, FeedbacksEnabler.standardFeedbacks(), restrictedEdit, readOnly);
listenTo(feedbackEditor);
tabbedPane.addTab(translate("form.hotspot"), itemEditor);
tabbedPane.addTab(translate("form.score"), scoreEditor);
tabbedPane.addTab(translate("form.feedback"), feedbackEditor);
return hotspotItemBuilder;
}
use of org.olat.ims.qti21.model.xml.AssessmentItemBuilder in project openolat by klemens.
the class AssessmentItemEditorController method initMultipleChoiceEditors.
private AssessmentItemBuilder initMultipleChoiceEditors(UserRequest ureq, AssessmentItem item) {
MultipleChoiceAssessmentItemBuilder mcItemBuilder = new MultipleChoiceAssessmentItemBuilder(item, qtiService.qtiSerializer());
itemEditor = new MultipleChoiceEditorController(ureq, getWindowControl(), mcItemBuilder, rootDirectory, rootContainer, itemFile, restrictedEdit, readOnly);
listenTo(itemEditor);
scoreEditor = new ChoiceScoreController(ureq, getWindowControl(), mcItemBuilder, itemRef, itemFile, restrictedEdit, readOnly, "Test editor QTI 2.1 in detail#details_testeditor_score");
listenTo(scoreEditor);
feedbackEditor = new FeedbacksEditorController(ureq, getWindowControl(), mcItemBuilder, rootDirectory, rootContainer, itemFile, FeedbacksEnabler.standardFeedbacks(), restrictedEdit, readOnly);
listenTo(feedbackEditor);
tabbedPane.addTab(translate("form.choice"), itemEditor);
tabbedPane.addTab(translate("form.score"), scoreEditor);
tabbedPane.addTab(translate("form.feedback"), feedbackEditor);
return mcItemBuilder;
}
Aggregations