From a478b383cd67cef1fe8925b83dbd9124bc92862b Mon Sep 17 00:00:00 2001 From: pichetp Date: Fri, 15 Aug 2008 11:26:58 +0000 Subject: [PATCH] better filtering of null answers MDL-8475 merged from HEAD --- question/type/numerical/questiontype.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/question/type/numerical/questiontype.php b/question/type/numerical/questiontype.php index 65db4bc332a..310f10de2c3 100644 --- a/question/type/numerical/questiontype.php +++ b/question/type/numerical/questiontype.php @@ -114,7 +114,7 @@ class question_numerical_qtype extends question_shortanswer_qtype { // Insert all the new answers foreach ($question->answer as $key => $dataanswer) { - if (!isset( $question->deleteanswer[$key] ) && !( trim($dataanswer) == 0 && $question->fraction[$key]== 0 &&trim($question->feedback[$key])=='')) { + if ( !( trim($dataanswer)=='' && $question->fraction[$key]== 0 && trim($question->feedback[$key])=='')) { $answer = new stdClass; $answer->question = $question->id; if (trim($dataanswer) == '*') {