-
Bug
-
Resolution: Fixed
-
Minor
-
2.0.9, 2.1.6, 2.2.3, 2.3
-
None
-
MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
-
MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
-
MDL-33932_master -
While testing MDL-27675, I discovered that multiple same results could be injected via a multiple choice question with multiple anwsers, which leads to wrong statistics.
- Create a new feedback, add a few questions to it
- Create a multiple choice question with multiple answer allowed and 5 possible answers
- As a student go to answer the questions
- Use the inspector to change the value of the input type checkbox tags
- Set the same (existing value) for 4 of them
- Don't change the value for the 5th one
- Submit your form
- As an admin, check the submission, everything is correct, only two different answers appear
- On the analysis page, the data are wrong, the percentages exceed 100% for the hacked question
Expected:
- The analysis page does not exceed 100% per possible answer
The fix must be an array_unique() or equivalent on the values gathered.