Permutequestions

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
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
\begin{problem}
 
  \randomquestionpool{1}{2}
  \randomquestionpool{3}{3}
  \permutequestions
 
  \begin{question} % Question 1
 
    \type{mc.multiple}
 
    \lang{de}{
      \text{Frage 1}
      \explanation{Die Erklärung}
    }
 
    \lang{en}{
      \text{Question 1}
      \explanation{Explanation}
    }
 
    \begin{choice}
      \text{$-5 = -5$}
      \solution{true}
    \end{choice}
 
    \begin{choice}
      \text{$5 = |-5|$}
      \solution{true}
    \end{choice}
 
    \begin{choice}
      \text{$5 = -5$}
      \solution{false}
    \end{choice}
 
  \end{question}
 
 
  \begin{question} % Question 2
 
    \begin{variables}
      \randint[Z]{a}{-3}{3}
      \randint[Z]{b}{1}{5}
      \randint[Z]{c}{1}{2}
      \randint[Z]{d}{1}{5}
      \randint[Z]{f}{-5}{5}
      \matrix[calculate]{v1}{a\\b\\c}
      \matrix[calculate]{v2}{d\\f\\0}
      \matrix[calculate]{cr}{-c*f\\c*d\\(a*f)-(d*b)}
      \function[calculate]{dot}{a*d+b*f}
    \end{variables}
 
    \field{real}   
 
    \lang{de}{
      \text{Gegeben sind:\\ $\vec{v1} = \var{v1}, \vec{v2} = \var{v2}$}
    }
 
    \lang{en}{
      \text{Given:\\ $\vec{v1} = \var{v1}, \vec{v2} = \var{v2}$}
    }
 
    \begin{answer}
      \type{input.matrix}
      \text{$\vec{v1} \times \vec{v2} = $}
      \solution{cr}
      \format{3}{1}
    \end{answer}
 
    \begin{answer}
      %Second answer with type input.number
      \type{input.number} %set a different answer type than the default type
      \text{$\vec{v1} \cdot \vec{v2} =$}
      \solution{dot}
    \end{answer}
 
  \end{question}
 
 
  \begin{question} % Question 3
    \type{input.interval}
 
    \text{Write down the Interval from 1 to 3:}
    \field{rational}
 
    \begin{answer}
      \text{ A = }
      \solution{[1;3]} % or ] for open type, the boundaries should be separated by ";"
    \end{answer}
 
  \end{question}
 
\end{problem}