use of uk.ac.ed.ph.jqtiplus.node.item.response.processing.ResponseCondition in project OpenOLAT by OpenOLAT.
the class AssessmentItemBuilder method appendAdditionalFeedback.
protected void appendAdditionalFeedback(ModalFeedbackBuilder feedback, List<ModalFeedback> modalFeedbacks, List<ResponseRule> responseRules) {
Identifier feedbackIdentifier = feedback.getIdentifier();
ModalFeedback modalFeedback = AssessmentItemFactory.createModalFeedback(assessmentItem, feedbackIdentifier, feedback.getTitle(), feedback.getText());
modalFeedbacks.add(modalFeedback);
Cardinality cardinality = null;
Identifier responseIdentifier = null;
if (this instanceof ResponseIdentifierForFeedback) {
responseIdentifier = ((ResponseIdentifierForFeedback) this).getResponseIdentifier();
cardinality = assessmentItem.getResponseDeclaration(responseIdentifier).getCardinality();
}
ResponseCondition feedbackCondition = AssessmentItemFactory.createModalFeedbackRuleWithConditions(assessmentItem.getResponseProcessing(), feedbackIdentifier, responseIdentifier, cardinality, feedback.getFeedbackConditons());
responseRules.add(feedbackCondition);
}
use of uk.ac.ed.ph.jqtiplus.node.item.response.processing.ResponseCondition in project OpenOLAT by OpenOLAT.
the class AssessmentItemBuilder method appendModalFeedback.
protected void appendModalFeedback(ModalFeedbackBuilder feedbackBuilder, String inCorrect, List<ModalFeedback> modalFeedbacks, List<ResponseRule> responseRules) {
ModalFeedback modalFeedback = AssessmentItemFactory.createModalFeedback(assessmentItem, feedbackBuilder.getIdentifier(), feedbackBuilder.getTitle(), feedbackBuilder.getText());
modalFeedbacks.add(modalFeedback);
ResponseCondition feedbackCondition = AssessmentItemFactory.createModalFeedbackBasicRule(assessmentItem.getResponseProcessing(), feedbackBuilder.getIdentifier(), inCorrect, hint != null);
responseRules.add(feedbackCondition);
}
use of uk.ac.ed.ph.jqtiplus.node.item.response.processing.ResponseCondition in project OpenOLAT by OpenOLAT.
the class HottextAssessmentItemBuilder method buildMainScoreRule.
@Override
protected void buildMainScoreRule(List<OutcomeDeclaration> outcomeDeclarations, List<ResponseRule> responseRules) {
ResponseCondition rule = new ResponseCondition(assessmentItem.getResponseProcessing());
responseRules.add(0, rule);
if (scoreEvaluation == ScoreEvaluation.perAnswer) {
buildMainScoreRulePerAnswer(rule);
} else {
buildMainScoreRuleAllCorrectAnswers(rule);
}
}
use of uk.ac.ed.ph.jqtiplus.node.item.response.processing.ResponseCondition in project OpenOLAT by OpenOLAT.
the class LobAssessmentItemBuilder method buildMainScoreRule.
@Override
protected void buildMainScoreRule(List<OutcomeDeclaration> outcomeDeclarations, List<ResponseRule> responseRules) {
ResponseCondition rule = new ResponseCondition(assessmentItem.getResponseProcessing());
responseRules.add(0, rule);
buildMainEssayFeedbackRule(rule);
}
use of uk.ac.ed.ph.jqtiplus.node.item.response.processing.ResponseCondition in project OpenOLAT by OpenOLAT.
the class MultipleChoiceAssessmentItemBuilder method buildMainScoreRule.
@Override
protected void buildMainScoreRule(List<OutcomeDeclaration> outcomeDeclarations, List<ResponseRule> responseRules) {
ResponseCondition rule = new ResponseCondition(assessmentItem.getResponseProcessing());
responseRules.add(0, rule);
if (scoreEvaluation == ScoreEvaluation.perAnswer) {
buildMainScoreRulePerAnswer(rule);
} else {
buildMainScoreRuleAllCorrectAnswers(rule);
}
}
Aggregations