MDL-16427 changing $answer=='*' to $answer ==='*'

This commit is contained in:
pichetp 2008-09-18 06:16:50 +00:00
parent 078cc3f044
commit fac1189dee

View 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;
}