mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-16427 changing $answer=='*' to $answer ==='*'
This commit is contained in:
parent
078cc3f044
commit
fac1189dee
1 changed files with 2 additions and 2 deletions
|
@ -124,7 +124,7 @@ class question_numerical_qtype extends question_shortanswer_qtype {
|
||||||
|
|
||||||
$answer = new stdClass;
|
$answer = new stdClass;
|
||||||
$answer->question = $question->id;
|
$answer->question = $question->id;
|
||||||
if (trim($dataanswer) == '*') {
|
if (trim($dataanswer) === '*') {
|
||||||
$answer->answer = '*';
|
$answer->answer = '*';
|
||||||
} else {
|
} else {
|
||||||
$answer->answer = $this->apply_unit($dataanswer, $units);
|
$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) {
|
function test_response(&$question, &$state, $answer) {
|
||||||
// Deal with the match anything answer.
|
// Deal with the match anything answer.
|
||||||
if ($answer->answer == '*') {
|
if ($answer->answer === '*') {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue