MDL-27418 fix minor regression found by Rajesh.
authorTim Hunt <T.J.Hunt@open.ac.uk>
Fri, 1 Jul 2011 08:44:31 +0000 (09:44 +0100)
committerTim Hunt <T.J.Hunt@open.ac.uk>
Fri, 1 Jul 2011 08:44:31 +0000 (09:44 +0100)
question/type/numerical/edit_numerical_form.php

index d57e157..512f694 100644 (file)
@@ -291,7 +291,7 @@ class qtype_numerical_edit_form extends question_edit_form {
      * @return bool whether this is a valid answer.
      */
     protected function is_valid_answer($answer, $data) {
-        return $answer == '*' || $this->is_valid_number($x);
+        return $answer == '*' || $this->is_valid_number($answer);
     }
 
     /**