Skip to content
Browse files

Bug in export of multichoice-multianswer questions fixed.

Thanks to Nguyen Tuan Anh for spotting this and providing the fix!
  • Loading branch information...
1 parent 1c4e73b commit 3397020814014b84f3837658ac23e58d5192bd4e thepurpleblob committed Dec 9, 2004
Showing with 5 additions and 1 deletion.
  1. +5 −1 mod/quiz/format/gift/format.php
View
6 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;

0 comments on commit 3397020

Please sign in to comment.
Something went wrong with that request. Please try again.