]> git.mjollnir.org Git - moodle.git/commitdiff
merge from 18_STABLE MDL-8475
authorpichetp <pichetp>
Sat, 3 Mar 2007 04:43:50 +0000 (04:43 +0000)
committerpichetp <pichetp>
Sat, 3 Mar 2007 04:43:50 +0000 (04:43 +0000)
question/type/numerical/questiontype.php

index dd7864c05fe6deefc92460072ef9651a7c779d4a..65db4bc332a2b5981b156e4adb04a07658bb2115 100644 (file)
@@ -114,7 +114,7 @@ class question_numerical_qtype extends question_shortanswer_qtype {
 
         // Insert all the new answers
         foreach ($question->answer as $key => $dataanswer) {
-            if ($dataanswer != '' || trim($question->feedback[$key])) {
+            if (!isset( $question->deleteanswer[$key] ) && !( trim($dataanswer) == 0 && $question->fraction[$key]== 0 &&trim($question->feedback[$key])=='')) { 
                 $answer = new stdClass;
                 $answer->question = $question->id;
                 if (trim($dataanswer) == '*') {