]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-16427 changing $answer=='*' to $answer ==='*'
authorpichetp <pichetp>
Thu, 18 Sep 2008 06:16:50 +0000 (06:16 +0000)
committerpichetp <pichetp>
Thu, 18 Sep 2008 06:16:50 +0000 (06:16 +0000)
question/type/numerical/questiontype.php

index 00d31d146ca2fad89cc8311fcae4d5b5a1f3ed14..806a626c10240b2e89c75d8a71512fb9edc19c9d 100644 (file)
@@ -124,7 +124,7 @@ class question_numerical_qtype extends question_shortanswer_qtype {
 
             $answer = new stdClass;
             $answer->question = $question->id;
-            if (trim($dataanswer) == '*') {
+            if (trim($dataanswer) === '*') {
                 $answer->answer = '*';
             } else {
                 $answer->answer = $this->apply_unit($dataanswer, $units);
@@ -252,7 +252,7 @@ class question_numerical_qtype extends question_shortanswer_qtype {
      */
     function test_response(&$question, &$state, $answer) {
         // Deal with the match anything answer.
-        if ($answer->answer == '*') {
+        if ($answer->answer === '*') {
             return true;
         }