public abstract class ExternalAnswerValue<R extends ExternalResponseValue> extends TeacherAnswerValue<ExternalAnswerValuePart,R>
| Constructor and Description |
|---|
ExternalAnswerValue(ExternalAnswerValuePart avp)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
isMatch(R response,
java.util.Map<java.lang.String,java.lang.String> args)
Determines whether a student's response matches this answer value.
|
isAllowedEvalType, isMatchDefault, validatePartsCount, validatePartsCountequals, getValuePart, getValuePart, getValueParts, getValuePartsCount, getValuePartType, getValuePartType, getValuePartValue, getValuePartValue, hashCode, partsToList, setValueParts, setValueParts, toString, toViewStringpublic ExternalAnswerValue(ExternalAnswerValuePart avp)
avp - Answerprotected boolean isMatch(R response, java.util.Map<java.lang.String,java.lang.String> args)
TeacherAnswerValueA matching response does not imply the given response is correct.
Your subclass can implement this method by calling the default method
#isMatchDefault(StudentResponseValue).
The semantics of your problem type might prevent your AnswerValue subclass from calling the isMatchDefault(StudentResponseValue) method.
One case is when the problem type does not implement a 1:1 matching of answer value parts to response value parts.
For example: A range problem is not going to match the student's response (with a single value part) to the answer value parts (which represent a lower- and upper-limit). Rather the range problem must provide an isMatch() implementation that checks if the student's response, a single-part answer value, falls between the two limits.
isMatch in class TeacherAnswerValue<ExternalAnswerValuePart,R extends ExternalResponseValue>response - The response to compare to this answer value.args - Map for problem specific properties that will
be used in calculating correctness for the problem.#isMatchDefault(StudentResponseValue),
Answer#isMatch(StudentResponseValue),
AnswerValuePart#isMatch(AnswerValuePart)