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

structure problems

Main structure of problems

All the code for a problem will be written between \begin{content} and \end{content}.
This content-block should start with

1
2
\usepackage{mumie.genericproblem}
\begin{problem}

and should end with

1
2
\end{problem}
\embedmathlet{gwtmathlet}

If you created a new problem in the file explorer with type Problem and template Problem the lines \usepackage{mumie.genericproblem} and \embedmathlet{gwtmathlet} will already be there.

Problem environment

Within a problem environment you can define variables and several questions:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
\usepackage{mumie.genericproblem}
\begin{problem}
    \begin{variables} % global variables valid for all questions.
      ...
    \end{variables}
 
    \begin{question} % start of question 1
      ...
    \end{question}
 
    \begin{question} % start of question 2
      ...
    \end{question}
\end{problem}

With the command \randomquestionpool, one can tell Mumie to randomly choose one question from a set of (consecutive) questions within a problem.

Usage: \randomquestionpool{number of first pool-question}{number of last pool-question}

If \randomquestionpool is specified, then only questions that are within the range of the indices are included. So questions that should be always displayed have to get their own "questionpool", e.g. by \randomquestionpool{1}{1} for the very first question.

In addition, one can use the command \permutequestions. Then the questions chosen from the question pools will be presented to each student in random order.

More details on randomquestionpool

More details on permutequestions

Question environment

Each question environment has one of the following two structures depending on whether

  • the type is an mc-type like mc.yesno, mc.multiple, mc.unique or ...
  • the type is an input-type like input.number, input.function, input.generic or ...

For mc-types:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
\begin{question}
    \type{mc.unique}     % or another mc-type
    \field{...}          % optional: default is real
    \begin{variables}
        ...
    \end{variables}
 
    \text{...}           % A text for all the answer task
 
    \begin{choice}
        ...
    \end{choice}
 
    \begin{choice}
        ...
    \end{choice}
 
    \showExplanation{always}  % only set this, if all explanations of the question should be
                              % shown regardless of the correctness of the users answer.
 
    \explanation{...}    % An explanation that is shown, when
                         % not all answers were given correctly.
\end{question}

For input-types:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
\begin{question}
    \type{...}           % optional: default is input.generic
    \field{...}          % optional: default is real
    \begin{variables}
        ...
    \end{variables}
 
    \text{...}           % A text for all the answer task
 
    \begin{answer}
        ...
    \end{answer}
 
    \begin{answer}
        ...
    \end{answer}
 
    \showExplanation{always}  % only set this, if all explanations of the question
                              % (including those in the answer environment) should be
                              % shown regardless of the correctness of the users answer.
 
    \explanation{...}    % An explanation that is shown, when
                         % not all answers were given correctly.
\end{question}

Click the following links for more details on types, fields, variables and explanations.

Multiple choice questions are explained here.

It is possible to have different types in one question. In this case the question-type has to be input.generic (and can be omitted), and one has to give the needed type within each answer environment.

Multiple choice tasks can also be wrapped by an answer environment of the specific type. Using this wrapping, one can also mix multiple choice tasks and input-tasks within one question, and also different types of multiple choice tasks.

More details on different answer types

Answer environment

The answer environments are defined within a question environment. The commands appearing in such an answer environment depend on the type of answer, but there are some general commands for all answers of input-type:

1
2
3
4
5
6
7
8
9
10
11
12
\begin{answer}
    \type{...}       % only if the question-type is input.generic
    \text{...}       % Text that appears next to the input box. This command is ignored,
                     % if in the question text the answer is referenced by \ansref.
 
    \solution{...}   % A variable representing a correct solution
 
    ...              % Some commands specifying how the student input should be
                     % checked for correctness.
    \explanation{..} % optional explanation text that appears if the student answer was not correct.
    \score{..}       % optional, provides the answer with a different score than 1. 
\end{answer}
  • The \type-command determines the type of the answer field. It is omitted if a type is set on question level.
  • The \text-command provides the text that gives the task of the answer input. If the answer is referenced in the question text by \ansref, this text here is ignored.
  • With the \solution-command the author provides a correct solution to the task.
  • After the \solution-command there might be several commands that specify in which way the answer should be corrected (e.g. \checkAsFunction ).
  • The \explanation-command on answer-level works similar as that on question-level, see explanations for more details.
  • for more details on the \score-command see Weighting the score of answers.

Shortcuts for environments in problems

There are some shortcuts that makes the coding easier for you by creating the \begin{..} \end{.} environment for you (and sometimes more). It is inserted in the problem document at the place, where the cursor is set, when you press the shortcut.

Shortcuts:

  • Alt-P results in

    1
    2
    3
    4
    5
    6
    7
    \begin{problem}
    \begin{question}
     \begin{answer}
     
     \end{answer}         
    \end{question}    
    \end{problem}
  • Alt-Q results in

    1
    2
    3
    4
    5
    \begin{question}
    \begin{answer}
     
    \end{answer}         
    \end{question}
  • Alt-A results in

    1
    2
    3
    \begin{answer}
     
    \end{answer}
  • Alt-V results in

    1
    2
    3
    \begin{variables}
     
    \end{variables}