You're not reading the latest revision of this page, which is
here.
mc.questions
Types of multiple choice questions
In MUMIE currently there are four types of MC questions available:
 mc.multiple: Multiple choice question with an arbitrary number of correct choices.
 mc.unique: Multiple choice question with exactly one correct choice.
 mc.yesno: Multiple choice question where each for each choice, one has to choose between yes and no
 mc.matrix: The user has to checkmark the entries of a tablelike task.
The structure for mc.matrix is different from the others and is explained here.
Scores
How the MC score is computed and how you can change that. (for mc.multiple and mc.matrix)
Choices
For each MC problem type one has to define choices. Every choice must be declared by an own choice environment,
containing a text and a solution. The solution can be either:
 true: this choice must be selected for a correct answer.
 false: this choice must NOT be selected for a correct answer.
 compute: the correct answer will be computed automatically. The use of one of the additional commands \iscorrect or \checkCorrect is required.
Constrains
 For mc.multiple, make sure that there is at least one answer that is set (or evaluates) to true, otherwise an error will occur when correcting the question.
 For mc.unique at least one answer has to evaluate to true. Of course, normally exactly only one answer is true
 For mc.yesno no restriction applies.
Example:
1 2 3 4  \begin{choice}
\text{$3\cdot 4 = 12$.}
\solution{true}
\end{choice}

Example:
1 2 3 4 5 6 7 8 9  \begin{variables}
\randint{a}{2}{5}
\end{variables}
\begin{choice}
\text{$3\cdot \var{a} = 12$.}
\solution{compute}
\iscorrect{a}{=}{4}
\end{choice}

Custom labels for type mc.yesno
You can change the label of the two choices of a mc.yesno type answer/question by using the following command: \YesNoLabel{first label}{second label}
. By default, if you don't use that command, the labels are "Yes" and "No" respectively their corresponding term in other languages like for example "Ja" and "Nein" in German.
example
Permute the order in which the choices are shown
Choices may be permutated automatically by using the command \permutechoices{begin}{end}
which requires 2 arguments: they describe the starting and ending index of the choices which should be permutated.
An example: If a question contains 5 choices and the choices one to four should be permutated, then the following code is required: \permutechoices{1}{4}
Optional parameter
The command \permutechoices
has two optional parameter: \permutechoices[n][list of indices]{begin}{end}
where
 _n_ is the number of choices that will be chosen from the indices begin, ..., end and
 list of indices is a comma separated list of the indices that have to be part of the resulting list
Some examples: Again the question contains 5 choices.
\permutechoices[4]{1}{4}
is the same as \permutechoices{1}{4}
. (see above)
\permutechoices[3]{1}{4}
results in e.g. 1,2,3,5 or 2,4,3,5 or 4,1,2,5 and so on. The fifth choice is always part of the result list. The first 3 choices are randomnly chosen from the indices 14.
\permutechoices[4]{1}{5}
results in e.g. 1,2,3,4 or 2,5,1,3 or 1,5,4,2 and so on. Four out of the five choices will be randomly chosen.
\permutechoices[4][1,3]{1}{5}
results in e.g. 1,2,3,4 or 2,1,3,5 or 5,4,3,1 and so on. Four out of the five choices will be randomly chosen, but index 1 and index 3 will be always part of the resulting list.
Compute solutions in MC questions
When using the compute
option in multiple choice answers inside the \solution
command one of those two additional commands is required:
\iscorrect
(deprecated) or
\checkCorrect{relation}
\iscorrect
This command is deprecated. But it is still available for legacy reasons. The syntax is the following: \iscorrect{left side}{relation symbol}{right side}
.
 left side of the relation; must be an expression (possibly containing variables) evaluating in a number
 relation sign (i.e.
<
, >
, =
, >=
, <=
, !=
)
 right side of the relation; must be an expression (possibly containing variables) evaluating in a number
When the relation solves to true then the correct answer for this choice will be yes:
1 2 3 4 5 6 7 8 9  \begin{question}
...
\begin{choice}
\text{Is $\var{g}<\var{f}$ correct?}
\solution{compute}
\iscorrect{g}{<}{f}
\end{choice}
...
\end{question}

\checkCorrect
Use this command instead of \iscorrect
. The syntax is simpler and it's more powerful, because it allows the evaluation of more complex relations. The syntax is the following: \checkCorrect{relation}
.
When the relation solves to true then the correct answer for this choice will be yes:
1 2 3 4 5 6 7 8 9  \begin{question}
...
\begin{choice}
\text{...}
\solution{compute}
\checkCorrect{g < f AND f + abs(g) > 1}
\end{choice}
...
\end{question}

example in WebMiau
Complete Example
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  \begin{problem}
\begin{question} % start of question 1
\text{Exercise  choose the correct answer}
\type{mc.multiple}
\begin{variables}
\randint{a}{2}{5}
\function[calculate]{b}{2+a}
\end{variables}
\begin{choice}
\text{$1+2=3$}
\solution{true}
\end{choice}
\begin{choice}
\text{2+3=7}
\solution{false}
\end{choice}
\begin{choice}
\text{2+\var{a}>6}
\solution{compute}
\checkCorrect{b>6}
\end{choice}
\end{question}
\end{problem}

Mixed MC types in one question
In one question, one can also have several MC tasks of different type, and also mix MC questions and input question.
See Different Answer Type or the example in WebMiau