use of uk.ac.ed.ph.jqtiplus.node.expression.general.MapResponse in project openolat by klemens.
the class AssessmentItemFactory method appendSetOutcomeScoreMapResponse.
/*
<setOutcomeValue identifier="SCORE">
<sum>
<variable identifier="SCORE"/>
<mapResponse identifier="RESPONSE_1"/>
</sum>
</setOutcomeValue>
*/
public static void appendSetOutcomeScoreMapResponse(ResponseConditionChild responseCondition, Identifier responseIdentifier) {
SetOutcomeValue scoreOutcome = new SetOutcomeValue(responseCondition);
scoreOutcome.setIdentifier(QTI21Constants.SCORE_IDENTIFIER);
responseCondition.getResponseRules().add(scoreOutcome);
Sum sum = new Sum(scoreOutcome);
scoreOutcome.getExpressions().add(sum);
Variable scoreVar = new Variable(sum);
scoreVar.setIdentifier(QTI21Constants.SCORE_CLX_IDENTIFIER);
sum.getExpressions().add(scoreVar);
MapResponse mapResponse = new MapResponse(sum);
mapResponse.setIdentifier(responseIdentifier);
sum.getExpressions().add(mapResponse);
}
Aggregations