From: tjhunt Date: Thu, 11 Dec 2008 05:01:37 +0000 (+0000) Subject: matching qtype: MDL-14420 Could not use '0' as a question stem. Oops, more tests... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=f932b819531f25c674696ae0b5468eafc505b327;p=moodle.git matching qtype: MDL-14420 Could not use '0' as a question stem. Oops, more tests need to be corrected. --- diff --git a/question/type/match/questiontype.php b/question/type/match/questiontype.php index 408f03c9a5..012b9c4998 100644 --- a/question/type/match/questiontype.php +++ b/question/type/match/questiontype.php @@ -279,7 +279,7 @@ class question_match_qtype extends default_questiontype { // Print the input controls foreach ($subquestions as $key => $subquestion) { - if ($subquestion->questiontext != '') { + if ($subquestion->questiontext !== '') { // Subquestion text: $a = new stdClass; $a->text = $this->format_text($subquestion->questiontext, @@ -341,7 +341,7 @@ class question_match_qtype extends default_questiontype { $sumgrade = 0; $totalgrade = 0; foreach ($subquestions as $key => $sub) { - if ($sub->questiontext) { + if ($sub->questiontext !== '') { $totalgrade += 1; $response = $responses[$key]; if ($response && !array_key_exists($response, $sub->options->answers)) {