]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-7602 - Multianswer question type only works with invalid HTML. Merged from MOODLE...
authortjhunt <tjhunt>
Tue, 12 Dec 2006 08:58:53 +0000 (08:58 +0000)
committertjhunt <tjhunt>
Tue, 12 Dec 2006 08:58:53 +0000 (08:58 +0000)
question/type/multianswer/questiontype.php

index e3e546ce1fe5ff8067ef18a49a7b2732b3a96d19..c23b2f50c7a4ab2d1fd4db4dd34566749a098f2a 100644 (file)
@@ -311,7 +311,12 @@ class embedded_cloze_qtype extends default_questiontype {
                                 ? ' selected="selected" ' : '';
                         $outputoptions .= "<option value=\"$mcanswer->id\" $selected>$mcanswer->answer</option>";
                     }
-                   echo "<select $popup $disabled $style name=\"$inputname\">";
+                   // In the next line, $readonly is invalid HTML, but it works in
+                   // all browsers. $disabled would be valid, but then the JS for
+                   // displaying the feedback does not work. Of course, we should
+                   // not be relying on JS (for accessibility reasons), but that is
+                   //a bigger problem.
+                   echo "<select $popup $readonly $style name=\"$inputname\">";
                    echo $outputoptions;
                    echo '</select>';
                    if (!empty($feedback) && $USER->screenreader) {