Merge branch 'MDL-70004-310' of git://github.com/junpataleta/moodle into MOODLE_310_S...
authorAndrew Nicols <andrew@nicols.co.uk>
Wed, 28 Oct 2020 05:14:12 +0000 (13:14 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Wed, 28 Oct 2020 05:14:12 +0000 (13:14 +0800)
question/type/multichoice/amd/build/clearchoice.min.js
question/type/multichoice/amd/build/clearchoice.min.js.map
question/type/multichoice/amd/src/clearchoice.js
question/type/multichoice/renderer.php

index 3c4443a..627d017 100644 (file)
Binary files a/question/type/multichoice/amd/build/clearchoice.min.js and b/question/type/multichoice/amd/build/clearchoice.min.js differ
index 0defcae..28de62b 100644 (file)
Binary files a/question/type/multichoice/amd/build/clearchoice.min.js.map and b/question/type/multichoice/amd/build/clearchoice.min.js.map differ
index 7fed1d4..5990fe2 100644 (file)
@@ -25,7 +25,7 @@ define(['jquery', 'core/custom_interaction_events'], function($, CustomEvents) {
 
     var SELECTORS = {
         CHOICE_ELEMENT: '.answer input',
-        LINK: 'label',
+        LINK: 'a',
         RADIO: 'input[type="radio"]'
     };
 
index c886cda..d4be869 100644 (file)
@@ -313,9 +313,9 @@ class qtype_multichoice_single_renderer extends qtype_multichoice_renderer_base
         }
         // Adds an hidden radio that will be checked to give the impression the choice has been cleared.
         $clearchoiceradio = html_writer::empty_tag('input', $clearchoiceradioattrs);
-        $clearchoiceradio .= html_writer::tag('label', get_string('clearchoice', 'qtype_multichoice'),
-            ['for' => $clearchoiceid, 'role' => 'button', 'tabindex' => $linktabindex,
-            'class' => 'btn btn-link ml-4 pl-1 mt-2']);
+        $clearchoice = html_writer::link('#', get_string('clearchoice', 'qtype_multichoice'),
+            ['tabindex' => $linktabindex, 'role' => 'button', 'class' => 'btn btn-link ml-3 mt-n1 mb-n1']);
+        $clearchoiceradio .= html_writer::label($clearchoice, $clearchoiceid);
 
         // Now wrap the radio and label inside a div.
         $result = html_writer::tag('div', $clearchoiceradio, $clearchoicewrapperattrs);