better filtering of null answers MDL-8475 merged from HEAD

This commit is contained in:
pichetp
2008-08-15 11:22:35 +00:00
parent 1e6da87629
commit 605d0b0c49
+1 -1
View File
@@ -107,7 +107,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) == '*') {