Permalink
Browse files

omit empty answers from JQuiz import

  • Loading branch information...
1 parent fc35fab commit 3f4df7071b6015aa899d9b92d437a0f659e0ffea gbateson committed Feb 3, 2007
Showing with 6 additions and 3 deletions.
  1. +6 −3 question/format/hotpot/format.php
@@ -433,9 +433,12 @@ function process_jquiz(&$xml, &$questions) {
$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;

0 comments on commit 3f4df70

Please sign in to comment.