Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 3.4.5, 3.5.2, 3.6
-
Component/s: Questions
-
Testing Instructions:
-
Affected Branches:MOODLE_34_STABLE, MOODLE_35_STABLE, MOODLE_36_STABLE
-
Fixed Branches:MOODLE_35_STABLE, MOODLE_36_STABLE
-
Pull from Repository:
-
Pull 3.5 Branch:
MDL-63905_35 -
Pull Master Branch:
-
Pull Master Diff URL:
Description
Currently no validation is done in question/format/multianswer/format.php in the readquestions function of the qformat_multianswer class after calling qtype_multianswer_extract_question. As a consequence it is possible to create broken multianswer questions in the database.
The same problem also exists in question/format/xml/format.php in the import_multianswer function after the call to qtype_multianswer_extract_question.
I discovered this while working on MDL-60897 but here the problem is more severe as there is no validation at all while in MDL-60897 only the number of multichoice subquestion's answers was not validated properly.