]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed tolerance problem, see bug 3225
authorgustav_delius <gustav_delius>
Mon, 27 Mar 2006 16:38:44 +0000 (16:38 +0000)
committergustav_delius <gustav_delius>
Mon, 27 Mar 2006 16:38:44 +0000 (16:38 +0000)
question/type/numerical/questiontype.php

index f3f12c4b3e196f19032a1f0019015046472b0a3a..ec10b840b80d011f94cb72ddc8b84abb6a1883ff 100644 (file)
@@ -349,7 +349,7 @@ class question_numerical_qtype extends question_shortanswer_qtype {
         // We need to add a tiny fraction (0.00000000000000001) to make the
         // comparison work correctly. Otherwise seemingly equal values can yield
         // false. (fixes bug #3225)
-        $tolerance = (float)$answer->tolerance + 0.00000000000000001;
+        $tolerance = (float)$answer->tolerance + 0.0000000000001;
         switch ($answer->tolerancetype) {
             case '1': case 'relative':
                 /// Recalculate the tolerance and fall through