diff --git a/question/type/match/questiontype.php b/question/type/match/questiontype.php index 1097870a6f6..a4fe69dbf13 100644 --- a/question/type/match/questiontype.php +++ b/question/type/match/questiontype.php @@ -270,7 +270,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, @@ -332,7 +332,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)) {