From 7d6af8ca5a9ef54d1199ed587505a46214264aaf Mon Sep 17 00:00:00 2001 From: tjhunt Date: Fri, 28 Jul 2006 10:56:47 +0000 Subject: [PATCH] Bug #6185 - bug with matching questions. --- question/type/match/questiontype.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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); -- 2.39.5