Topic outline
-
-
The most complex question we'll look at here is one which uses adaptive marking, as for the last example, and adds allowable error, either relative or absolute.
We'll use the same example as for the last two sections again:
If a = (random number), b = (random number) and c = 10, calculate a + b, b + c and then add the two numbers together.
Watch out for this: Using both adaptive marking and error in the grading criterion can make the question act very unpredictably. It may seem like it is working correctly when testing reasonable answers, but it can also mark unreasonably large/small answers correct. Please use this function with caution and test using both reasonable and unreasonable answers.
If you don't need adaptive marking, it's best to use different parts for different answers - it's more reliable.
You can see the final version of the question embedded at the bottom of this page.
(We have included an .xml file of this question below. You can download this and import it into your course website question bank. Use it to develop your own basic formula questions.)
-
Steps
1. Create and name the formula question.
2. Add random and global variables.
3. Add the answers. You will need to include the answers for all required responses, separated by commas.
4. Add the main question text. You will need to define spaces in the question text for the various answers (and units.)
5. Assign grading variables and the grading criterion for adaptive marking, to be used in conjunction with the answer variables.
- The grading variables will be the same as they were for the last example.
- However, the grading criteria will be expanded. As well as including options for adaptive marking, the criteria will also need to include specifications for the allowable error. This is expressed as a condition in the grading criteria instructions. For each string, the allowable error is added in the format:
- Relative error: (relerr<xxx) or
- Absolute error: (_err<xxx)
If the student's answer is within the error tolerance, Moodle will assign the marks for whichever string applies.Watch out for this: The more complex the grading criterion becomes, the more layers of brackets it requires. This can lead to errors. Remember that every set of brackets has to have an opening bracket and a closing bracket. If Moodle gives you a warning message when you try to save the question, make sure to go back and make sure that you've closed all your brackets.
-
6. Write the text for the question, defining a space for the student's answer and the unit if needed. Make sure that you tell the student how the mark allocation will work.
7. Add feedback, and instantiate if you wish.
8. Save and preview your question.
You can see the final form of the example question embedded below. Try out correct and incorrect answers, both within and outside of the allowable error.
-
You can import this question into your course question bank. You can then copy and adapt it.
Administration - Course administration - Question bank - Import - Moodle xml format - Choose the file - Import. (Watch a video on how to import the question into a course website.)
-