From da3802dbaeafc84018e23c2400027ec73a45051c Mon Sep 17 00:00:00 2001 From: tjhunt Date: Fri, 10 Aug 2007 10:48:58 +0000 Subject: [PATCH] MDL-10786 - Short Answer questions will not allow 0 as the sole answer. Merged from MOODLE_18_STABLE. --- question/type/shortanswer/edit_shortanswer_form.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.39.5