IMS-QTI 2.1 allows to declare parameters of exercise templates, to describe the initialization of the parameters and the solutions, to define expressions with mathematical operators.
Thus it is possible to define two integer parameters a and b, to declare that a is between 2 and 6 and to declare that the value of b depends on the value of a: for example, if a is greater than 4, then b is between 2 and 6, else b is between 10 and 15.

In this example, a and b are linked, but b cannot be initialized before a.
There is a **sequential dependance** between a and b.

But it is necessary to be able to express the **interdependance of parameters** in mathematical exercises at secondary school level.

Example 1: a et b are integers such that a is between 2 and 10, b between 2 and 40, b is odd and a+b is multiple of 10.

Example 2: n is an integer between 10 and 12 ; t is a table of n integers between 4 and 10 and the sum of the elements of t must be equal to 65.

The interdependance cannot be expressed in IMS-QTI 2.1.

MathQTI enriches the possibilities of expressing a template variable (template parameter) as a function of variables, but does not enable to define constraints between template variables.

We have thus extended IMS-QTI 2.1 to express **constraints** between **interdependant template parameters** [AIED 2007] [EIAH 2007].

imsqti_v2p1_upmc.xsd file | imsqti_v2p1_upmc.dtd file |

**Declarations of the extensions**

We propose to enrich the class *templateRule* by adding the class *templateConstraint* to describe constraints (see Figure 2), and to enrich the class
*expression* by adding classes of new operators: *repeat, sumContainer,* and of usual mathematical operators such as *gcd*, *lcm*
(see Figure 3).

**Use of operator "repeat" to enrich the templateRule**

In IMS-QTI versions 2.1, ordered collections can be defined by a *templateRule* which contains as many unnamed *templateVariables* as necessary.

But it is impossible to define a template collection whose **size** is itself a *templateVariable*.
To remedy that, our operator *repeat* enables to define such a template collection.

For example, if you want the learner to calculate the mean of a collection of n integers bounded by 10 and 80, this collection will be defined as in Figure 5.

**Use of templateConstraint**

Semantics on *templateConstraint* is that the variables (parameters) must be valued so that they satisfy the conditions binding them.
The operators used to express these constraints are the same as those already defined as expressions. This is the **interpretation** of the *templateConstraint*
in the *templateProcessing* which enables **to reiterate the process of valuation of the variables (parameters) until they satisfy the constraints**.

First example

2≤B<40

if A=6 then B≠7 and B≠15

The constraint binding A and B is an implication (A=6) ==> ((B≠7) .AND. (B≠15)) which can be expressed in conjunctive normal form ((A≠6) .OR. (B≠7)) .AND. ((A≠6) .OR. (B≠15)).

We can also express it as two templateConstraints (A≠6).OR.(B≠7) and (A≠6).OR.(B≠15), see Figure6:

Second example

2≤B<40

B odd

A+B is multiple of 10

The fourth constraint is expressed using the declaration of the expression S = A+B and the constraint S is a multiple of 10, see Figure 7.

**Use of sumContainer**

For constraints on the elements of a template collection, we propose the operator *sumContainer* which calculates the sum of all these elements.

In the example of definition of a template collection (Figure 5), if the teacher wants the sum to be equal to 850,
the constraint will be written as in Figure 8.