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 07:36:15 +0000 (15:36 +0800)
commita1d81dc6d96b745d848c19cecfb6659030f8bfad
tree026acdd615a86ac92641f85a9ed0c9ad61447528
parent99680d1be4b564f9abae3f17a49223eda1459c95
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