Topic outline
-
-
You can also set up non-standard unit conversions.
This is useful if the question is dealing with industry-specific units which are not part of the standard Moodle unit conversion list. For example, miles are not standard Moodle units, but there may be a context in which you want to set them up as a desired unit for a question.
The example question we'll use here is:
The trip from town A to town B is (random number) km and the trip from town B to town C is (random number) miles.
Calculate the total distance traveled for the two trips.
You can answer in either kms or miles, but make sure that you put the correct unit in the 2nd box, using the correct format and case.
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. Add random and global variables and the main question text. Set up the allowable error and enter the question text for the part.
2. Click Show more… to view the additional settings and add a non-standard unit conversion rule to the Other rule box. This is a rule which defines the non-standard unit in terms of a standard unit which Moodle already recognises. Use the format:
1 (standard unit) = x (non-standard unit)
Ensure that there is a space between the number and the unit.
Moodle will work out the non-standard unit answer based on the rule you've given. However, the number must match the unit, or the answer will be marked wrong. Check unit conversions which are common/standard in Moodle.
-
3. Specify the correct unit for the answer, using standard abbreviations. Use the = sign between different units.
4. Write the text for the question, defining a space for the student's answer and the unit if needed, using the format {_u}. Make sure that you include instructions to the students to include the unit in their answer and advise them that units are format and case specific.
Watch out for this if using unit conversions: Since there are now 2 layers of calculations, make sure that you've allowed for some error (absolute or relative) so that the marking is not too harsh. -
5. Add feedback, and instantiate if you wish.
6. Save and preview your question.
You can see the final form of the example question embedded below. Try inputting different answers, in both miles and km, to see how the question responds.
-
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.)
-