Bug #6185 - bug with matching questions.

This commit is contained in:
tjhunt 2006-07-28 10:56:47 +00:00
parent bdfad57b83
commit 7d6af8ca5a

View File

@ -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);