]> git.mjollnir.org Git - moodle.git/commitdiff
Bug #5825 redonly attribute does not work on checkboxes, so using disabled instead...
authortjhunt <tjhunt>
Thu, 15 Jun 2006 10:12:17 +0000 (10:12 +0000)
committertjhunt <tjhunt>
Thu, 15 Jun 2006 10:12:17 +0000 (10:12 +0000)
question/type/multianswer/questiontype.php
question/type/multichoice/questiontype.php
question/type/truefalse/questiontype.php

index 752f1c9ab07a3c4e89c30b69135a25ac79d321b5..46dbbe2a59175ce0cdecadcc6e50c4f0a7813510 100644 (file)
@@ -315,7 +315,7 @@ class embedded_cloze_qtype extends default_questiontype {
                                 ? ' selected="selected" ' : '';
                         $outputoptions .= "<option value=\"$mcanswer->id\" $selected>$mcanswer->answer</option>";
                     }
-                   echo "<select $popup $readonly $style name=\"$inputname\">";
+                   echo "<select $popup $disabled $style name=\"$inputname\">";
                    echo $outputoptions;
                    echo '</select>';
                    break;
index cc3bc51a76e635da964299e2070471682469fa4f..86612dfb2191df5c55d8aaca348fe34a68466455 100644 (file)
@@ -258,7 +258,7 @@ class question_multichoice_qtype extends default_questiontype {
 
         $answers = &$question->options->answers;
         $correctanswers = $this->get_correct_responses($question, $state);
-        $readonly = empty($options->readonly) ? '' : 'readonly="readonly"';
+        $readonly = empty($options->readonly) ? '' : 'disabled="disabled"';
 
         $formatoptions = new stdClass;
         $formatoptions->noclean = true;
index e3d25c18da2f7df4537160f1e02629efb86ca477..49043bbe5ae0db025005a611bef06864dc35bc30 100644 (file)
@@ -137,7 +137,7 @@ class question_truefalse_qtype extends default_questiontype {
             $cmoptions, $options) {
         global $CFG;
 
-        $readonly = $options->readonly ? ' readonly="readonly"' : '';
+        $readonly = $options->readonly ? ' disabled="disabled"' : '';
         $formatoptions->noclean = true;
         $formatoptions->para = false;