Structure of 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.
Notice: If you have additional content like text, formulas and so on outside the problem environment, make sure to insert an empty line before the \begin{problem}. Otherwise you might get a cryptic compilation error: Improper nesting: environment "problem" must be closed before paragraph can be closed.
1 2 3 | ..some text and other content outside of the problem environment...
\begin{problem}
|
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 15 16 17 | \usepackage{mumie.genericproblem}
\begin{problem}
\text{...} % text, formulas and so on, that should be displayed before the first question
\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}
|
The \text
command may reference variables that are defined in the problem's variable environment. It is an optional command and can be handy when you have text or information that is necessary or helpful for all the questions within the problem.
With the optional 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
Disabling or customizing the automatic labeling of questions
As a default all questions are labeled automatically with Latin letters.
You can disable the automatic labeling of question by adding the command \showQuestionLabels{no}
to the @problem@ environment of the TeX file.
\begin{problem}
\showQuestionLabels{no}
...
\end{problem}
|
You can further customize the labeling type with the following parameters in the \showQuestionLabels
command:
parameter |
label type |
no |
no numbering at all |
yes or alph |
alphabetical: (a), (b), ... [default value] |
Alph |
alphabetical upper-case: (A), (B), ... |
num |
Arabic numerals: (1), (2), ... |
roman |
Roman numerals: (i), (ii), ... |
Roman |
Roman numerals upper-case: (I), (II), ... |
\begin{problem}
\showQuestionLabels{Roman}
...
\end{problem}
|
Question environment
Each question environment has the following structure
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 | \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.
\explanation[...]{...} % An explanation that is shown, when not all answers were given
% correctly, and the condition in square brackets is fulfilled.
\end{question}
|
Click the following links for more details on types, fields, variables and explanations.
Multiple choice questions are question of a specific question-type, and are explained in detail 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.
More details on different answer types in one question
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.
The content for multiple choice types is explained in the page mc.questions, so we focus here on the general commands which are common for all answers of input-type or graphics-type:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | \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.
\explanation[..]{..} % optional explanation text that appears if the student answer was not correct,
% and the condition in square brackets is fulfilled.
\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.
WebMiau 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}
|
Alt-S
results in
1 2 3 4 5 6 7 8 | \begin{switch}
\begin{case}{...}
\end{case}
\begin{case}{...}
\end{case}
\begin{default}
\end{default}
\end{switch}
|