]> git.mjollnir.org Git - moodle.git/commitdiff
Export classes added, not yet complete however
authorthepurpleblob <thepurpleblob>
Tue, 29 Jun 2004 09:26:51 +0000 (09:26 +0000)
committerthepurpleblob <thepurpleblob>
Tue, 29 Jun 2004 09:26:51 +0000 (09:26 +0000)
mod/quiz/format/gift/format.php

index cd39a62e9709b20d875bc3fbd6f2cb56ef41e1b9..14bd175a670b948e000b227d3baf6632a159642d 100755 (executable)
@@ -476,6 +476,19 @@ function writequestion( $question ) {
         }
         $expout .= "}\n";
         break;
+    case SHORTANSWER:
+        $expout .= $question->questiontext."{\n";
+        foreach($question->answers as $answer) {
+            $weight = 100 * $answer->fraction;
+            $expout .= "\t=%".$weight."%".$answer->answer."#".$answer->feedback."\n";
+        }
+        $expout .= "}\n";
+        break;
+    case NUMERICAL:
+        $expout .= $question->questiontext."{\n";
+        $expout .= "\t#".$question->min."..".$question->max."#".$question->answer->feedback."\n";
+        $expout .= "}\n";
+        break;
     default:
         error( "No handler for qtype $question->qtype for GIFT export" );
     }