You're not reading the latest revision of this page, which is here.

Permute questions and random subset of questions

Permute questions

When the questions of a problem are grouped into question pools using the command `\randomquestionpool', it is possible to also randomize the order in which the questions chosen from the pools are presented to the user.
This is done by the command \permutequestions.

CAUTION: The effect is not seen when randomquestionpool is deactivated (e.g. in webmiau-preview). You need to put this on a server with randomquestionpool activated to see the questions permuted.

Example

Here you can see an example of 3 different questions which are put in two question pools which are permuted randomly by \permutequestions.

The first pool contains questions 1 and 2. The second pool only contains question 3.
The student sees either the 1st or 2nd question and the 3rd question. The 3rd question might be shown as question a) or as question b).

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
\begin{problem}
 
  \randomquestionpool{1}{2}
  \randomquestionpool{3}{3}
  \permutequestions
 
  % question 1
  \begin{question}
    ...
  \end{question}
 
  % question 2
  \begin{question}
    ...
  \end{question}
 
  % question 3
  \begin{question}
    ...
  \end{question}
 
\end{problem}

Random subset of questions

Another option is to choose k questions from a set of n question pools. As above, the questions of a problem have to be grouped in question pools using the command `\randomquestionpool' fo this. Use \permutequestions[k] with the optional parameter to define, how many question pools should be selected (default is n ).

Example

A similar example as above, but this time with four questions and three question pools. The student will see two questions (in random order), either

  • 1st or 2nd question and the 3rd question or
  • 1st or 2nd question and the 4th question or
  • 3rd and 4th question.
    So, only two out of those three question pools are randomly chosen.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
\begin{problem}
 
  \randomquestionpool{1}{2}
  \randomquestionpool{3}{3}
  \randomquestionpool{4}{4}
  \permutequestions[2]
 
  % question 1
  \begin{question}
    ...
  \end{question}
 
  % question 2
  \begin{question}
    ...
  \end{question}
 
  % question 3
  \begin{question}
    ...
  \end{question}
 
  % question 4
  \begin{question}
    ...
  \end{question}
 
\end{problem}