Compare two revisions of: Structure of problems

... ... @@ -89,38 +89,8 @@ You can further customize the labeling type with the following parameters in the
89 89
90 90 ## Question environment
91 91
92 -Each question environment has one of the following two structures depending on whether
93 -* the type is an mc-type like mc.yesno, mc.multiple, mc.unique or ...
94 -* the type is an input-type like input.number, input.function, input.generic or ...
92 +Each question environment has the following structure
95 93
96 -For mc-types:
97 -```LaTeX
98 -\begin{question}
99 - \type{mc.unique} % or another mc-type
100 - \field{...} % optional: default is real
101 - \begin{variables}
102 - ...
103 - \end{variables}
104 -
105 - \text{...} % A text for all the answer task
106 -
107 - \begin{choice}
108 - ...
109 - \end{choice}
110 -
111 - \begin{choice}
112 - ...
113 - \end{choice}
114 -
115 - \showExplanation{always} % only set this, if all explanations of the question should be
116 - % shown regardless of the correctness of the users answer.
117 -
118 - \explanation{...} % An explanation that is shown, when
119 - % not all answers were given correctly.
120 -\end{question}
121 -```
122 -
123 -For input-types:
124 94 ```LaTeX
125 95 \begin{question}
126 96 \type{...} % optional: default is input.generic
... ... @@ -145,23 +115,25 @@ For input-types:
145 115
146 116 \explanation{...} % An explanation that is shown, when
147 117 % not all answers were given correctly.
118 + \explanation[...]{...} % An explanation that is shown, when not all answers were given
119 + % correctly, and the condition in square brackets is fulfilled.
148 120 \end{question}
149 121 ```
150 122
151 123 Click the following links for more details on [types](Answer-types.md), [fields](number-fields.md), [variables](Variables.md) and [explanations](Feeback-and-Explanations.md).
152 124
153 -Multiple choice questions are explained [here](mc.questions.md).
125 +Multiple choice questions are question of a specific question-type, and are explained in detail [here](mc.questions.md).
154 126
155 127 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.
156 128
157 -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.
158 -
159 -[More details on different answer types](DifferentAnswerType.md)
129 +[More details on different answer types in one question](DifferentAnswerType.md)
160 130
161 131
162 132 ## Answer environment
163 133
164 -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:
134 +The answer environments are defined within a question environment. The commands appearing in such an answer environment depend on the type of answer.
135 +The content for multiple choice types is explained in the page [mc.questions](mc.questions.md), so we focus here on the general commands which are common for all answers of input-type or graphics-type:
136 +
165 137 ```LaTeX
166 138 \begin{answer}
167 139 \type{...} % only if the question-type is input.generic
... ... @@ -173,6 +145,8 @@ The answer environments are defined within a question environment. The commands
173 145 ... % Some commands specifying how the student input should be
174 146 % checked for correctness.
175 147 \explanation{..} % optional explanation text that appears if the student answer was not correct.
148 + \explanation[..]{..} % optional explanation text that appears if the student answer was not correct,
149 + % and the condition in square brackets is fulfilled.
176 150 \score{..} % optional, provides the answer with a different score than 1.
177 151 \end{answer}
178 152 ```
179 153