News
Index
Working with MUMIE as author
- Initial steps:
- Articles:
- Problems:
- Programming with Python
- Visualizations with JSXGraph
- Media Documents:
Working with MUMIE as teacher
Using MUMIE via plugin in local LMS
FAQ
You're not logged in
Working with MUMIE as author
Working with MUMIE as teacher
Using MUMIE via plugin in local LMS
FAQ
The automatic correction of generic TeX problems can take into account consecutive errors. This feature is only
available for questions of type input.number
or input.function
.
Consider a problem with several questions, all of them of type input.number
or type input.function
.
Assume the solution of the n-th question depends on the solution of the m-th question for some question numbers $$m$$,$$n$$
with $$m < n$$. Say the student's solution of the m-th question was wrong. Then the student used a wrong input for the
n-th question. Assume that, apart from starting with a wrong input, the student solved the n-th question correctly.
This is what we call a consecutive error.
Taking into account consecutive errors means the student doesn't get the points for the m-th question, but the solution
of the n-th question is counted as correct and the points are awarded.
Taking into account consecutive errors works as follows. The questions are corrected one after the other.
For each question, the following happens:
\earlierAnswer
command described below.The \earlierAnswer
command has the following form:
\earlierAnswer{VARIABLE}{QUESTION_NUMBER,ANSWER_NUMBER}
where VARIABLE
is the name of the variable defined on global (not question) level, QUESTION_NUMBER
the number of the question and ANSWER_NUMBER
the number of the answer.
You can also use -1 for the QUESTION_NUMBER
to refer to the same question (see below)
The \earlierAnswer
command is only allowed in the "variables" environment of a question.
\earlierAnswer
to refer to an earlier question in a problem that has
\randomquestionpool
enabled! This can cause unwanted behaviour.
Problems with random question pools should only use \earlierAnswer
for subtasks within the same question, by using the value -1 for the question number.\earlierAnswer
doesn't work in combination with \permuteAnswers
. Below is a complete example of a problem. The problem is trivial: a random number Q is given, and the student has to
compute $$x = Q + 1$$ in the first question, $$y = x + 1$$ in the second, and $$z = y + 1$$ in the third. The second
and third question depend on the solutions of previous questions. To take this into account, we added \earlierAnswer
commands to bind variables to earlier answers. In the second question, for example, we bound x to the first answer of
question 1.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 \begin{problem}
\begin{variables}
\randint{Q}{-4}{4}
\function{x}{Q+1}
\function{y}{x+1}
\function{z}{y+1}
\end{variables}
\begin{question}
\text{\textbf{Step 1}\\ \textit{Let Q = $\var{Q}$. Compute x = Q + 1:}}
\explanation{Simply add one}
\type{input.number}
\precision{3}
\field{real}
\begin{answer}
\text{ x = }
\solution{x}
\end{answer}
\end{question}
\begin{question}
\begin{variables}
\earlierAnswer{x}{1,1}
\end{variables}
\text{\textbf{Step 2}\\ \textit{Compute y = x + 1:}}
\explanation{Simply add one}
\type{input.number}
\precision{3}
\field{real}
\begin{answer}
\text{ y = }
\solution{y}
\end{answer}
\end{question}
\begin{question}
\begin{variables}
\earlierAnswer{x}{1,1}
\earlierAnswer{y}{2,1}
\end{variables}
\text{\textbf{Step 3}\\ \textit{Compute z = y + 1:}}
\explanation{Simply add one}
\type{input.number}
\precision{3}
\field{real}
\begin{answer}
\text{ z = }
\solution{z}
\end{answer}
\end{question}
\end{problem}
Here you find a more advanced example in WebMiau with consecutive errors with text answers:
Example 1
Example 2
You can also set the QUESTION_NUMBER
to -1 to refer to a previous answer in the same question:
\earlierAnswer{VARIABLE}{-1,ANSWER_NUMBER}
When you use \randomquestionpool
(see Randomquestionpool) at the begin of
a problem to make a selection, this is the only case of \earlierAnswer
that you can use.
Warning:
If you use \earlierAnswer{VARIABLE}{-1,ANSWER_NUMBER}
, be aware of the correction procedure described above.
Wrong use:
123456789101112131415161718192021222324252627 \begin{problem}
\begin{variables}
\randint{Q}{-4}{4}
\function{x}{Q+1}
\function{y}{x+1}
\end{variables}
\begin{question}
\begin{variables}
\earlierAnswer{x}{-1,1}
\end{variables}
\text{Let Q = $\var{Q}$.}
\type{input.number}
\begin{answer} % this answer will always be marked as correct!!
\text{Compute x = Q + 1:}
\solution{x}
\end{answer}
\begin{answer}
\text{Compute y = x + 1:}
\solution{y}
\end{answer}
\end{question}
\end{problem}
In this line of code, the student will always get full score for the first answer. Indeed, if
the answer is wrong, the correction will be repeated with x
being the student's first answer,
and so evaluate the first answer as conditionally correct.
The correct way is given by using a copy of the variable x
:
12345678910111213141516171819202122232425262728 \begin{problem}
\begin{variables}
\randint{Q}{-4}{4}
\function{x}{Q+1}
\function{xc}{x}
\function{y}{xc+1}
\end{variables}
\begin{question}
\begin{variables}
\earlierAnswer{xc}{-1,1}
\end{variables}
\text{Let Q = $\var{Q}$.}
\type{input.number}
\begin{answer}
\text{Compute x = Q + 1:}
\solution{x}
\end{answer}
\begin{answer}
\text{Compute y = x + 1:}
\solution{y}
\end{answer}
\end{question}
\end{problem}
Now the solution x
of the first answer is not affected by the \earlierAnswer
-command,
but the solution y
of the second answer will.
By default the user obtains the same amount of points for every correct answer within a problem.
An exception is the case where an answer is not evaluated directly (compare the example for CheckFunctionForZero ).
This default can be changed by using the \score
-command.
123456789101112131415161718192021222324252627282930313233 \usepackage{mumie.genericproblem}
\title{Different Score Weights Per Answer}
\begin{problem}
\begin{variables}
\number{a}{1}
\number{b}{2}
\end{variables}
\begin{question}
\text{1 or 2?}
\explanation{}
\type{input.number}
\field{real}
\begin{answer}
\text{$1\cdot 1=$}
\solution{a}
\end{answer}
\begin{answer}
\text{$1\cdot 2=$}
\solution{b}
\score{2} % default score is 1
\end{answer}
\end{question}
\end{problem}
In the example above, the second answer is given the score weight 2.
Hence, if the total amount of points for the problem is 6, a correct first answer gives 2 points, a correct second answer 4 points.
This also works with answers in multiple questions.
Remark: The total amount of points for a problem is set in the "Settings" of a course in which it is used, and can change from course to course.
If a student's answer was only partially incorrect, you may want to award partial credit for the response.
You can achieve this by using the command \partialScore[condition]{score}
within an answer environment. Specify the condition that must be met to receive the points. You can use the command multiple times within an answer environment. Make sure that the total possible partial scores do not exceed the maximum score (default: 1). An example for answer type input.number:
123456789101112131415161718192021222324 \begin{variables}
\randint{a}{-5}{-2}
\randint{b}{6}{9}
\function[calculate]{sol}{a*b}
\end{variables}
\begin{answer}
\type{input.number}
% maximum score is 2 (default: 1)
\score{2}
% +0.25 partial score, if the student tried to answer at all
\partialScore{0.25}{edited(ans)}
% +1 partial score, if the absolute value of the student's answer ist at least correct
\partialScore{1}{equal(|sol|,|ans|)}
\solution{sol}
% give an explanation for the partial scores (not mandatory)
\explanation[edited(ans)]{+0.25 point, at least you tried it}
\explanation[equal(|ssol|,|ans|)]{+1 point, absolute value correct}
\end{answer}
So far partial scores can be used for the following answer types: input.number
, input.function
, input.text
, input.interval
.
The condition syntax is similar to the one used for the optional condition in explanations.
For answer type input.matrix
only the very basic equal comparison is for now implemented.
12345678910 \begin{variables}
\matrix{m}{1&0\\0&1}
\end{variables}
\begin{answer}
\type{input.matrix}
% ...
\partialScore{0.5}{equal(m,ans)}
% ...
\end{answer}
For partial scores for answer types mc.multiple
and mc.matrix
see: MC Score Types.
Updated by Michael Heimann, 5 months ago – ebcbc94