use of uk.ac.ed.ph.jqtiplus.node.shared.FieldValue in project openolat by klemens.
the class AssessmentItemFactory method appendFloatValue.
private static void appendFloatValue(CorrectResponse correctResponse, double response) {
FieldValue fieldValue = new FieldValue(correctResponse);
FloatValue identifierValue = new FloatValue(response);
fieldValue.setSingleValue(identifierValue);
correctResponse.getFieldValues().add(fieldValue);
}
use of uk.ac.ed.ph.jqtiplus.node.shared.FieldValue in project openolat by klemens.
the class AssessmentItemFactory method appendStringValue.
private static void appendStringValue(CorrectResponse correctResponse, String response) {
FieldValue fieldValue = new FieldValue(correctResponse);
StringValue identifierValue = new StringValue(response);
fieldValue.setSingleValue(identifierValue);
correctResponse.getFieldValues().add(fieldValue);
}
use of uk.ac.ed.ph.jqtiplus.node.shared.FieldValue in project openolat by klemens.
the class AssessmentTestFactory method createOutcomeDeclaration.
public static OutcomeDeclaration createOutcomeDeclaration(AssessmentTest assessmentTest, Identifier identifier, Double defaultValue) {
OutcomeDeclaration outcomeDeclaration = new OutcomeDeclaration(assessmentTest);
outcomeDeclaration.setIdentifier(identifier);
outcomeDeclaration.setCardinality(Cardinality.SINGLE);
outcomeDeclaration.setBaseType(BaseType.FLOAT);
DefaultValue defaultVal = new DefaultValue(outcomeDeclaration);
outcomeDeclaration.setDefaultValue(defaultVal);
FieldValue fieldValue = new FieldValue(defaultVal);
FloatValue identifierValue = new FloatValue(defaultValue);
fieldValue.setSingleValue(identifierValue);
defaultVal.getFieldValues().add(fieldValue);
return outcomeDeclaration;
}
Aggregations