From: tjhunt Date: Fri, 28 Jul 2006 10:56:47 +0000 (+0000) Subject: Bug #6185 - bug with matching questions. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=7d6af8ca5a9ef54d1199ed587505a46214264aaf;p=moodle.git Bug #6185 - bug with matching questions. --- diff --git a/question/type/match/questiontype.php b/question/type/match/questiontype.php index 96cf90085b..e8a7f563aa 100644 --- a/question/type/match/questiontype.php +++ b/question/type/match/questiontype.php @@ -190,6 +190,7 @@ class question_match_qtype extends default_questiontype { // Serialize responses $responses = array(); foreach ($subquestions as $key => $subquestion) { + $response = 0; if ($subquestion->questiontext) { if ($state->responses[$key]) { $response = $state->responses[$key]; @@ -203,11 +204,9 @@ class question_match_qtype extends default_questiontype { $state->responses[$key] = $response; } } - } else { - $response = 0; } - $responses[] = $key.'-'.$response; } + $responses[] = $key.'-'.$response; } $responses = implode(',', $responses);