-
Improvement
-
Resolution: Fixed
-
Minor
-
3.6.3
-
MOODLE_36_STABLE
-
MOODLE_37_STABLE
-
If, as in, qtype_multichoice, get_expected_data() says that some expected data is PARAM_INT, then when handling the request where the data is submitted, the value will be in int.
However, later, once the data has been saved to the database, and loaded back (for example when re-grading the attempt) it will be treated as a string.
If question types are using === to compare resonses, this could lead to very subtle bugs.
It would be better if the value was consistently a string always.