Search in sources :

Example 1 with OutcomeDeclarationGroup

use of uk.ac.ed.ph.jqtiplus.group.outcome.declaration.OutcomeDeclarationGroup in project openolat by klemens.

the class AssessmentItemFactory method appendDefaultOutcomeDeclarations.

/**
 * Append the default outcome declaration for score, max score and feedback basic.
 *
 * @param assessmentItem
 */
public static void appendDefaultOutcomeDeclarations(AssessmentItem assessmentItem, double maxScore) {
    NodeGroupList nodeGroups = assessmentItem.getNodeGroups();
    // outcomes
    OutcomeDeclarationGroup outcomeDeclarations = nodeGroups.getOutcomeDeclarationGroup();
    // outcome score
    OutcomeDeclaration scoreOutcomeDeclaration = createOutcomeDeclarationForScore(assessmentItem);
    outcomeDeclarations.getOutcomeDeclarations().add(scoreOutcomeDeclaration);
    // outcome max score
    OutcomeDeclaration maxScoreOutcomeDeclaration = createOutcomeDeclarationForMaxScore(assessmentItem, maxScore);
    outcomeDeclarations.getOutcomeDeclarations().add(maxScoreOutcomeDeclaration);
    // outcome min score
    OutcomeDeclaration minScoreOutcomeDeclaration = createOutcomeDeclarationForMinScore(assessmentItem, 0.0d);
    outcomeDeclarations.getOutcomeDeclarations().add(minScoreOutcomeDeclaration);
    // outcome feedback
    OutcomeDeclaration feedbackOutcomeDeclaration = createOutcomeDeclarationForFeedbackBasic(assessmentItem);
    outcomeDeclarations.getOutcomeDeclarations().add(feedbackOutcomeDeclaration);
}
Also used : NodeGroupList(uk.ac.ed.ph.jqtiplus.group.NodeGroupList) OutcomeDeclarationGroup(uk.ac.ed.ph.jqtiplus.group.outcome.declaration.OutcomeDeclarationGroup) OutcomeDeclaration(uk.ac.ed.ph.jqtiplus.node.outcome.declaration.OutcomeDeclaration)

Example 2 with OutcomeDeclarationGroup

use of uk.ac.ed.ph.jqtiplus.group.outcome.declaration.OutcomeDeclarationGroup in project OpenOLAT by OpenOLAT.

the class AssessmentItemFactory method appendDefaultOutcomeDeclarations.

/**
 * Append the default outcome declaration for score, max score and feedback basic.
 *
 * @param assessmentItem
 */
public static void appendDefaultOutcomeDeclarations(AssessmentItem assessmentItem, double maxScore) {
    NodeGroupList nodeGroups = assessmentItem.getNodeGroups();
    // outcomes
    OutcomeDeclarationGroup outcomeDeclarations = nodeGroups.getOutcomeDeclarationGroup();
    // outcome score
    OutcomeDeclaration scoreOutcomeDeclaration = createOutcomeDeclarationForScore(assessmentItem);
    outcomeDeclarations.getOutcomeDeclarations().add(scoreOutcomeDeclaration);
    // outcome max score
    OutcomeDeclaration maxScoreOutcomeDeclaration = createOutcomeDeclarationForMaxScore(assessmentItem, maxScore);
    outcomeDeclarations.getOutcomeDeclarations().add(maxScoreOutcomeDeclaration);
    // outcome min score
    OutcomeDeclaration minScoreOutcomeDeclaration = createOutcomeDeclarationForMinScore(assessmentItem, 0.0d);
    outcomeDeclarations.getOutcomeDeclarations().add(minScoreOutcomeDeclaration);
    // outcome feedback
    OutcomeDeclaration feedbackOutcomeDeclaration = createOutcomeDeclarationForFeedbackBasic(assessmentItem);
    outcomeDeclarations.getOutcomeDeclarations().add(feedbackOutcomeDeclaration);
}
Also used : NodeGroupList(uk.ac.ed.ph.jqtiplus.group.NodeGroupList) OutcomeDeclarationGroup(uk.ac.ed.ph.jqtiplus.group.outcome.declaration.OutcomeDeclarationGroup) OutcomeDeclaration(uk.ac.ed.ph.jqtiplus.node.outcome.declaration.OutcomeDeclaration)

Aggregations

NodeGroupList (uk.ac.ed.ph.jqtiplus.group.NodeGroupList)2 OutcomeDeclarationGroup (uk.ac.ed.ph.jqtiplus.group.outcome.declaration.OutcomeDeclarationGroup)2 OutcomeDeclaration (uk.ac.ed.ph.jqtiplus.node.outcome.declaration.OutcomeDeclaration)2