MDL-70032 qtype_multichoice: Fix answer labelling
authorJun Pataleta <jun@moodle.com>
Thu, 29 Oct 2020 07:36:15 +0000 (15:36 +0800)
committerJun Pataleta <jun@moodle.com>
Thu, 29 Oct 2020 08:21:53 +0000 (16:21 +0800)
commit5d7bd0208a79c92377919567c8b1094fac64eb9a
tree50ea59b0abde761e86a47b8423a1469854e262b7
parent46f6bae0022dc469bcef20c484b1f08c8cbebb35
MDL-70032 qtype_multichoice: Fix answer labelling

* Discard the use of the label element in order to be able to render
multiple choice answers as they are and have these act as the radio
button/checkbox' label through the aria-labelledby attribute.
* New JS module qtype_multichoice/answers that listens for click events
on the answer text container and selects the appropriate answer radio
button/checkbox.
question/type/multichoice/amd/build/answers.min.js [new file with mode: 0644]
question/type/multichoice/amd/build/answers.min.js.map [new file with mode: 0644]
question/type/multichoice/amd/src/answers.js [new file with mode: 0644]
question/type/multichoice/renderer.php