Drag and Drop - Scoring issue with multiple correct solutions and static texts
Description
Environment
Content is created in Moodle 3.1
Acceptance Criteria
Activity
Former user May 22, 2020 at 1:54 PM
Fixed in
Should probably be accompanied by changes in H5P.DragQuestion for either fixing existing content once in an upgrade script or by sanitizing parameters on each content initialization. Otherwise users will have to open existing content and save it again to get rid of the problem.
Svein-Tore Griff With April 24, 2018 at 9:08 AM
I had a quick look at the json and the dropZones are storing correct answers from 0 - 13 making it 14 in total, so somehow some incorrect id's have sneaked in there and from there they make their way into this.correctDZs and affect the maxScore calculation.
We should:
1. Figure out how invalid id's are stored as drop zones
2. Make sure that we don't give points for static content in max score calculation (content that can't be moved to any drop zone can't have a score no matter what)
Svein-Tore Griff With April 24, 2018 at 8:56 AM
Static texts normally won't affect scoring, but in this H5P they do. Maybe three of the four static texts at one point were possible to drag and some left-overs of that is still in the system making it think that they are draggables when the max score is calculated?
Acceptance Criteria
Static texts should not affect the total score of the task (even if they might have been not static before).
Background
Text objects without an assigned drops zones adds to the total points.
Issue is reported here: https://h5p.org/node/223805 - In these report there are 11 drop zones and 11 text draggables but the total points is showing 14. There are also 4 text without an assigned drop zones. It should also be noted that all drop zones have multiple possible answers since the draggables are interchangeable within this activity.
Test Contents:
Original content: https://h5p.org/node/223946 (Removed other activities and left the DnD with the issue.
Multiple possible answers removed: https://h5p.org/node/223900 (I edited the content thinking that the multiple answers in the dropzones is the cause of the issue)
Removed all texts without dropzones: https://h5p.org/node/225216
Note: I am unable to reproduce the issue with a fresh content.