AssessmentItem:Response Processing

Response processing is a major feature of the QTI specification. It allows an item author to embed marking instructions inside an item. Moreover, these instructions are expressed in a high-level language, not tied to any particular delivery tool or scoring engine.

There are similarities between response processing and template processing. Both execute logic written using QTI rules and update item variables.

This section is scoped between the  and  tags of the AssessmentItem element.

Writing response processing logic
A response processing section is logic written using QTI response processing elements. The main task is to read the values of response variables and set the values of outcome variables accordingly.

The following elements are available to express response processing logic
 * responseRule
 * responseCondition
 * responseIf
 * responseElse
 * responseElseIf
 * setOutcomeValue
 * lookupOutcomeValue
 * exitResponse

The following example item (“Grand Prix of Bahrain”) comes from the QTI specification:-



First look at the item variable declarations

  DriverC DriverA DriverB   


 * a response variable RESPONSE which stores an ordered list of identifiers. It also specifies the correct answer i.e. the sequence Driver C then Driver A then Driver B.
 * an integer outcome variable called SCORE.

The ItemBody section uses an orderInteraction interaction to present the options to the candidate, and updates the response variable RESPONSE with the candidate’s answer. For example, RESPONSE may store the sequence DriverA DriverB DriverC (not the correct answer!).   The following F1 drivers finished on the podium in the first ever Grand Prix of Bahrain. Can you rearrange them into the correct finishing order? Rubens Barrichello Jenson Button Michael Schumacher  </itemBody> Now let’s look at the response processing section.  <responseCondition> <responseIf> <variable identifier="RESPONSE" /> <correct identifier="RESPONSE" /> <setOutcomeValue identifier="SCORE"> <baseValue baseType="integer">2</baseValue> </setOutcomeValue> </responseIf> <responseElseIf> <variable identifier="RESPONSE" /> <baseValue baseType="identifier">DriverC</baseValue> <baseValue baseType="identifier">DriverB</baseValue> <baseValue baseType="identifier">DriverA</baseValue> <setOutcomeValue identifier="SCORE"> <baseValue baseType="integer">1</baseValue> </setOutcomeValue> </responseElseIf> <responseElse> <setOutcomeValue identifier="SCORE"> <baseValue baseType="integer">0</baseValue> </setOutcomeValue> </responseElse> </responseCondition> </responseProcessing> It comprises one response condition, which compares the candidate’s answer to the correct answer (which, as we saw, is stipulated in the declaration of RESPONSE), and updates SCORE according to the following logic If current value of RESPONSE equals the “correct value” of RESPONSE then Set SCORE to 2. ElseIf current value of RESPONSE equals the sequence “DriverC,DriverB,DriverA” then Set SCORE to 1 (i.e. give partial credit for nearly-correct response. Else	Set SCORE to 0

Response Processing Templates
Response processing templates offer an alternative to hard wiring logic inside an item.

Templates are prewritten segments of response processing which you can reference inside an responseProcessing element.

Let’s return to the “Unattended Luggage” example item.



It contains the following one line to implement response processing <responseProcessing template="http://www.imsglobal.org/question/qti_v2p0/rptemplates/match_correct.xml" /> This, in turn, references the following pre-written logic <?xml version="1.0" encoding="UTF-8" ?> <responseProcessing xmlns="http://www.imsglobal.org/xsd/imsqti_v2p0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqti_v2p0 imsqti_v2p0.xsd"> <responseCondition> <responseIf> <variable identifier="RESPONSE" /> <correct identifier="RESPONSE" /> <setOutcomeValue identifier="SCORE"> <baseValue baseType="integer">1</baseValue> </setOutcomeValue> </responseIf> <responseElse> <setOutcomeValue identifier="SCORE"> <baseValue baseType="integer">0</baseValue> </setOutcomeValue> </responseElse> </responseCondition> </responseProcessing> Therefore a (potentially complex) segment of processing logic can be shared amongst many items. The item author need only know of the template’s existence, without having to understand the logic it invokes.

Note, however, if you use a template, you must know the names of the item variables used within it, and uses these identical names in other sections of your assessmentItem.