Using AsciiMathML in numerical quiz

Using AsciiMathML in numerical quiz

by Steve Garlick -
Number of replies: 3
Hi,

I've loaded ASCIIMathML as per instructions here, in meta.php in the theme folder. Works fine in the question body. However, Moodle won't accept the answer as numerical in answer fields.

The answer is a fraction. It will not accept `13/20` or 13/20.

Any pointers?

Regards,

Steve Garlick
Average of ratings: -
In reply to Steve Garlick

Re: Using AsciiMathML in numerical quiz

by Mauno Korpelainen -

You can't use slash / in a number - but you could try other question types...

http://docs.moodle.org/en/Numerical_question_type

http://docs.moodle.org/en/Question_types

In reply to Mauno Korpelainen

Re: Using AsciiMathML in numerical quiz

by Steve Garlick -
Thanks for the reply.

I am using numerical_question_type. Fractions can be displayed, but I can't enter a fraction as an answer. It wants an integer or float. Is there any way to accept a fraction answer?
In reply to Steve Garlick

Re: Using AsciiMathML in numerical quiz

by Mauno Korpelainen -

I'm afraid there is no way to do it without rewriting the code of that question type.

The point is that division (slash) is an operation like addition, subtraction or multiplication, they are not parts of a number and can't be used in an answer that must be a number.