]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-10786 - Short Answer questions will not allow 0 as the sole answer. Merged from...
authortjhunt <tjhunt>
Fri, 10 Aug 2007 10:48:58 +0000 (10:48 +0000)
committertjhunt <tjhunt>
Fri, 10 Aug 2007 10:48:58 +0000 (10:48 +0000)
question/type/shortanswer/edit_shortanswer_form.php

index 89a8d181b95c458e117affa006590cc234c027fe..38580b7213b2fe2a0b297219d43fa6af232ec2ea 100644 (file)
@@ -76,7 +76,7 @@ class question_edit_shortanswer_form extends question_edit_form {
         $maxgrade = false;
         foreach ($answers as $key => $answer) {
             $trimmedanswer = trim($answer);
-            if (!empty($trimmedanswer)){
+            if ($trimmedanswer !== ''){
                 $answercount++;
                 if ($data['fraction'][$key] == 1) {
                     $maxgrade = true;