Bug #5825 redonly attribute does not work on checkboxes, so using disabled instead when displaying quizzes read-only.

This commit is contained in:
tjhunt 2006-06-15 10:12:17 +00:00
parent b282e815d5
commit 1cc1fa2425
3 changed files with 3 additions and 3 deletions

View file

@ -315,7 +315,7 @@ class embedded_cloze_qtype extends default_questiontype {
? ' selected="selected" ' : ''; ? ' selected="selected" ' : '';
$outputoptions .= "<option value=\"$mcanswer->id\" $selected>$mcanswer->answer</option>"; $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 $outputoptions;
echo '</select>'; echo '</select>';
break; break;

View file

@ -258,7 +258,7 @@ class question_multichoice_qtype extends default_questiontype {
$answers = &$question->options->answers; $answers = &$question->options->answers;
$correctanswers = $this->get_correct_responses($question, $state); $correctanswers = $this->get_correct_responses($question, $state);
$readonly = empty($options->readonly) ? '' : 'readonly="readonly"'; $readonly = empty($options->readonly) ? '' : 'disabled="disabled"';
$formatoptions = new stdClass; $formatoptions = new stdClass;
$formatoptions->noclean = true; $formatoptions->noclean = true;

View file

@ -137,7 +137,7 @@ class question_truefalse_qtype extends default_questiontype {
$cmoptions, $options) { $cmoptions, $options) {
global $CFG; global $CFG;
$readonly = $options->readonly ? ' readonly="readonly"' : ''; $readonly = $options->readonly ? ' disabled="disabled"' : '';
$formatoptions->noclean = true; $formatoptions->noclean = true;
$formatoptions->para = false; $formatoptions->para = false;