From 3397020814014b84f3837658ac23e58d5192bd4e Mon Sep 17 00:00:00 2001 From: thepurpleblob Date: Thu, 9 Dec 2004 16:18:23 +0000 Subject: [PATCH] Bug in export of multichoice-multianswer questions fixed. Thanks to Nguyen Tuan Anh for spotting this and providing the fix! --- mod/quiz/format/gift/format.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mod/quiz/format/gift/format.php b/mod/quiz/format/gift/format.php index 2835d42276..c4258aae12 100755 --- a/mod/quiz/format/gift/format.php +++ b/mod/quiz/format/gift/format.php @@ -470,9 +470,13 @@ function writequestion( $question ) { if ($answer->fraction==1) { $answertext = '='; } - else { + elseif ($answer->fraction==0) { $answertext = '~'; } + else { + $export_weight = $answer->fraction*100; + $answertext = "~%$export_weight%"; + } $expout .= "\t".$answertext.$answer->answer; if ($answer->feedback!="") { $expout .= "#".$answer->feedback; -- 2.39.5