Permalink
Browse files

Fixed problem with label tag in single answer multichoice questions.

  • Loading branch information...
1 parent dd05085 commit 0591a08cf13d642cb4cb055db5f719ef7da1ad84 mindforge committed Jun 30, 2005
Showing with 3 additions and 3 deletions.
  1. +3 −3 mod/quiz/questiontypes/multichoice/questiontype.php
@@ -265,16 +265,16 @@ function print_question_formulation_and_controls(&$question, &$state, $quiz, $op
if ($question->options->single) {
$type = 'type="radio"';
- $id = $question->name_prefix;
+ $name = "name=\"{$question->name_prefix}\"";
$checked = $aid == $state->responses['']
? 'checked="checked"' : '';
} else {
$type = ' type="checkbox" ';
- $id = $question->name_prefix . $aid;
+ $name = "name=\"{$question->name_prefix}{$aid}\"";
$checked = isset($state->responses[$aid])
? 'checked="checked"' : '';
}
- $name = "name=\"$id\"";
+ $id = $question->name_prefix . $aid;
$fullid = "id=\"$id\"";
// Print the control

0 comments on commit 0591a08

Please sign in to comment.