AssessmentItem:Item Variable Declarations

Much of the internal functionality of QTI – response processing, outcome processing and item cloning – relies heavily on the use of item variables.

An item variable is an internal variable declared inside a question (akin to local variables in computer programs). Item variables are used to hold information temporarily at different times during the run time processing of an item.

There are three types of item variable
 * response variables – these hold answers submitted by the candidate
 * outcome variables – these hold scores attained by the candidate
 * template variables – these are used to generate cloned items

Each of these types of variable is declared within a particular declaration section of the item. We will now look at these three sections :-

Response Declaration Section
The response declaration section declares one response variable inside the item.

A response declaration is an XML element which starts with a  tag and ends with a  tag.

Response variables store candidates’ answers. Figure 3 shows where and how response variables are used within the AssessmentItem element.



Example of a response declaration section
      ChoiceA     This declares a response variable called RESPONSE which can hold one (because its cardinality is single) identifier (an identifier is a string which refers to another value declared elsewhere).  It also declares the identifier “ChoiceA” as the correct response for this variable.

At the appropriate point during item processing, a candidate response will be stored inside RESPONSE. This value will be referenced later in the Response Processing section of AssessmentItem.

Note that a response declaration declares just one response variable; if you require several response variables you will need to include a response declaration section for each.

Outcome Declaration Section
The outcome declaration section declares one outcome variable inside the item. An outcome declaration is an XML element which starts with a  and ends with a  tags.

An outcome variable holds a score gained by a candidate.

Figure 4 shows where and how outcome variables are used within the AssessmentItem element.



Example of an outcome declaration
  0    This declares an outcome variable called SCORE which can hold one (because its cardinality is single) integer value. The section also declares zero to be the default value for SCORE.

Note that an outcome declaration declares just one outcome variable; if you require several outcome variables you will need to include an outcome declaration section for each.

Template Declaration Section
The template declaration section declares one template variable inside the item. A template declaration is an XML element which begins with a  and ends with a  tag.

Template variables are used during the generation of cloned items. They hold values which are subsequently used within the body of an item.

Figure 5 shows where and how template variables are used within the AssessmentItem element.



Example of a template declaration
 This declares a template variable called PEOPLE which holds a single string value. We’ll see later how it is referenced inside a Template Processing section.

Note that a template declaration declares just one template variable; if you need several template variables you need to include a template declaration section for each.