numbas / Numbas

A completely browser-based e-assessment/e-learning system, with an emphasis on mathematics
http://www.numbas.org.uk
Apache License 2.0
200 stars 117 forks source link

Displaying input of fractions #68

Closed BillFoster closed 12 years ago

BillFoster commented 12 years ago

If there is a requirement for inputting fractions on the user, via the rule fractionNumbers, then Numbas is very kind to the user by displaying any decimal input by the user as a fraction where possible e.g. user input of 0.5 is dynamically displayed as 1/2 in the input box. This should be displayed as a decimal to reinforce the stern message that comes up asking for the input of fractions - otherwise the user may get confused!

christianp commented 12 years ago

I assume you're talking about the answerSimplification setting. That is only for display. It doesn't affect marking. You'll have to use string restrictions.

BillFoster commented 12 years ago

This is the dynamic display of user input not the answer display - I already have the string restriction in place, but if the user inputs e^(0.5x) for example, which is not accepted by the restriction, the display as he or she types in becomes e^(x/2)