Can I create a calculated question that includes units?

Can I create a calculated question that includes units?

by Matthew Inman -
Number of replies: 2
Is there a way to create a calculated question that require units to be included in the answer. I am teaching physics and chemistry and units are very important to assess student understanding and comprehension. Is there a way that I can use the random number generation of the calculated question type while forcing the students to include units in the answer?

Example:

If I travel a distance of {x} miles during a time of {t} hours, what is my average speed?

I want the correct answer to be average speed = {x}/{t} mph

Currently I can only use = {x}/{t} in this type of question.
Average of ratings: -
In reply to Matthew Inman

Re: Can I create a calculated question that includes units?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I agree that units are important. Unfortunately, currently in numerical and calculated questions they only work in a strange optional way that does not do what most teachers want. One day, we will get around to fixing it.
In reply to Matthew Inman

Re: Can I create a calculated question that includes units?

by Pierre Pichet -
Effectively the units are used on Moodle to allow the student to give the answer in another unit than the one which comes normally from the question.
So if the student give you the rigth numerical answer, you can conclude that he knows the rigth unit values and manipulate them correctly.
You can also want to know if the student always writes the units alongside the numerical value which is another question.
If you want the number and the units, you want two answers with a separate grade for the numerical value and the unit and the question is transformed in a multianswer one.
I am working on a prototype about transfroming calculated question in a multianswer type but the implementation of multianswer type on moodle is not complete actually (i.e. for reports or manual grading).
I want to complete the Cloze multianswer implementation before calculated as the cloze is simpler.
in the mean time you could use excel (or similar software) to generate many cloze questions having a numerical field followed with a short answer for the units and use random question to randomize.

Pierre