omit empty answers from JQuiz import

This commit is contained in:
gbateson
2007-02-03 00:35:54 +00:00
parent db8598ca48
commit e8dc4c6cb1
+6 -3
View File
@@ -433,9 +433,12 @@ class qformat_hotpot extends qformat_default {
$fraction = 1;
}
}
$question->fraction[] = $fraction;
$question->feedback[] = $this->hotpot_prepare_str($xml->xml_value($tags, $answer."['feedback'][0]['#']"));
$question->answer[] = $this->hotpot_prepare_str($xml->xml_value($tags, $answer."['text'][0]['#']"));
$answertext = $this->hotpot_prepare_str($xml->xml_value($tags, $answer."['text'][0]['#']"));
if ($answertext!='') {
$question->answer[] = $answertext;
$question->fraction[] = $fraction;
$question->feedback[] = $this->hotpot_prepare_str($xml->xml_value($tags, $answer."['feedback'][0]['#']"));
}
$a++;
}
$questions[] = $question;