]> git.mjollnir.org Git - moodle.git/commitdiff
Fix bugs with GIFT import. Merged from MOODLE_17_STABLE.
authortjhunt <tjhunt>
Tue, 17 Oct 2006 10:56:35 +0000 (10:56 +0000)
committertjhunt <tjhunt>
Tue, 17 Oct 2006 10:56:35 +0000 (10:56 +0000)
question/format.php
question/format/gift/format.php

index 8dd3b45213b9007902805a851a16de06badfbb52..464c7094f6f9abfc88a9baa6224b183a789d7577 100644 (file)
@@ -181,6 +181,7 @@ class qformat_default {
         $question->image = "";
         $question->usecase = 0;
         $question->multiplier = array();
+        $question->generalfeedback = '';
 
         return $question;
     }
index 62af329d682f222ae0af2aec8fc10e3b2cf323ff..b0c4823335bc45e8ef06876a7a7db38c8fbcbb4f 100755 (executable)
@@ -292,7 +292,10 @@ class qformat_gift extends qformat_default {
                     }
                     $question->fraction[$key] = $answer_weight;
                     $question->feedback[$key] = $this->commentparser($answer); // commentparser also removes comment from $answer
-                    $question->answer[$key]   = addslashes($this->escapedchar_post($answer));    
+                    $question->answer[$key]   = addslashes($this->escapedchar_post($answer));
+                    $question->correctfeedback = '';
+                    $question->partiallycorrectfeedback = '';
+                    $question->incorrectfeedback = '';
                 }  // end foreach answer
     
                 //$question->defaultgrade = 1;