Search in sources :

Example 1 with AssessmentItemFactory.createSingleChoiceCorrectResponseDeclaration

use of org.olat.ims.qti21.model.xml.AssessmentItemFactory.createSingleChoiceCorrectResponseDeclaration in project OpenOLAT by OpenOLAT.

the class SingleChoiceAssessmentItemBuilder method buildResponseAndOutcomeDeclarations.

@Override
protected void buildResponseAndOutcomeDeclarations() {
    ResponseDeclaration responseDeclaration = AssessmentItemFactory.createSingleChoiceCorrectResponseDeclaration(assessmentItem, responseIdentifier, correctAnswer);
    if (scoreEvaluation == ScoreEvaluation.perAnswer) {
        AssessmentItemFactory.appendMapping(responseDeclaration, scoreMapping);
    }
    assessmentItem.getResponseDeclarations().add(responseDeclaration);
}
Also used : AssessmentItemFactory.createSingleChoiceCorrectResponseDeclaration(org.olat.ims.qti21.model.xml.AssessmentItemFactory.createSingleChoiceCorrectResponseDeclaration) ResponseDeclaration(uk.ac.ed.ph.jqtiplus.node.item.response.declaration.ResponseDeclaration)

Example 2 with AssessmentItemFactory.createSingleChoiceCorrectResponseDeclaration

use of org.olat.ims.qti21.model.xml.AssessmentItemFactory.createSingleChoiceCorrectResponseDeclaration in project openolat by klemens.

the class SingleChoiceAssessmentItemBuilder method buildResponseAndOutcomeDeclarations.

@Override
protected void buildResponseAndOutcomeDeclarations() {
    ResponseDeclaration responseDeclaration = AssessmentItemFactory.createSingleChoiceCorrectResponseDeclaration(assessmentItem, responseIdentifier, correctAnswer);
    if (scoreEvaluation == ScoreEvaluation.perAnswer) {
        AssessmentItemFactory.appendMapping(responseDeclaration, scoreMapping);
    }
    assessmentItem.getResponseDeclarations().add(responseDeclaration);
}
Also used : AssessmentItemFactory.createSingleChoiceCorrectResponseDeclaration(org.olat.ims.qti21.model.xml.AssessmentItemFactory.createSingleChoiceCorrectResponseDeclaration) ResponseDeclaration(uk.ac.ed.ph.jqtiplus.node.item.response.declaration.ResponseDeclaration)

Aggregations

AssessmentItemFactory.createSingleChoiceCorrectResponseDeclaration (org.olat.ims.qti21.model.xml.AssessmentItemFactory.createSingleChoiceCorrectResponseDeclaration)2 ResponseDeclaration (uk.ac.ed.ph.jqtiplus.node.item.response.declaration.ResponseDeclaration)2