From: tjhunt Date: Fri, 10 Aug 2007 10:48:58 +0000 (+0000) Subject: MDL-10786 - Short Answer questions will not allow 0 as the sole answer. Merged from... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=da3802dbaeafc84018e23c2400027ec73a45051c;p=moodle.git MDL-10786 - Short Answer questions will not allow 0 as the sole answer. Merged from MOODLE_18_STABLE. --- diff --git a/question/type/shortanswer/edit_shortanswer_form.php b/question/type/shortanswer/edit_shortanswer_form.php index 89a8d181b9..38580b7213 100644 --- a/question/type/shortanswer/edit_shortanswer_form.php +++ b/question/type/shortanswer/edit_shortanswer_form.php @@ -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;