This follows on from MDL-27418. You really need to read the full discussion there, or at least the last few explanations from Pierre.
In 2.0, we would try the multipliers from all the units in order to decide if the number part was right. That is, Moodle was as permissive as possible.
In 2.1, I changed it to just use the multiplier 1 (first unit) if number did not match with the unit the student typed.
I still can't decide which approach is better, but I did not want to forget about it, so I am creating this issue to continue the discussion.
- Discovered while testing
-
MDLQA-8370 CLONE - A teacher can create, edit and preview a numerical question with optional units
- Passed
- has a non-specific relationship to
-
MDL-27418 apply_unit() does not handle well is_numeric() valid numbers when decsep = ,
- Closed
- is duplicated by
-
MDL-51826 Numerical question with optional units: multipliers not used if numerical value is correct for Unit 1
- Closed