[QTI] Response processing of text entry interaction
Steve Lay
swl10 at cam.ac.uk
Wed Sep 17 14:35:55 BST 2008
Jean Pierre Malrieu wrote:
> So basically, if this is "not difficult" to you, an example of
> translation would be welcome!
So the responseProcessing for such an item might look like this (the
SCORE value of 0 can be implied but I've added to make the code clearer
and it does no harm):
<responseProcessing>
<setOutcomeValue identifier="SCORE">
<baseValue baseType="float">0</baseValue>
</setOutcomeValue>
<responseCondition>
<responseIf>
<substring caseSensitive="false">
<baseValue baseType="string">mecanisation</baseValue>
<variable identifier="RESPONSE"/>
</substring>
<setOutcomeValue identifier="SCORE">
<sum>
<variable identifier="SCORE"/>
<baseValue baseType="float">0.5</baseValue>
</sum>
</setOutcomeValue>
</responseIf>
<responseIf>
<substring caseSensitive="false">
<baseValue baseType="string">fertilization</baseValue>
<variable identifier="RESPONSE"/>
</substring>
<setOutcomeValue identifier="SCORE">
<sum>
<variable identifier="SCORE"/>
<baseValue baseType="float">0.5</baseValue>
</sum>
</setOutcomeValue>
</responseIf>
</responseCondition>
</responseProcessing>
To accommodate different spellings you might want to experiment with the
patternMatch operator instead of the simple subString as this will
enable things like:
<patternMatch pattern=".*(mecanisation|mechanization).*">
<variable identifier="RESPONSE"/>
</patternMatch>
...assuming a single line of input.
Steve
More information about the IMS-QTI
mailing list