Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-20185 detect zero, "0", as an answer for a gap in a JCloze when i…

…mporting to the Moodle's question bank / Quiz module
  • Loading branch information...
commit 8fbc9739017a8fb526e386817530c641c3a56aa7 1 parent 6a77e4c
gbateson authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  question/format/hotpot/format.php
View
2  question/format/hotpot/format.php
@@ -188,7 +188,7 @@ function process_jcloze(&$xml, &$questions) {
$text = $this->hotpot_prepare_str($xml->xml_value($tags, $answer."['text'][0]['#']"));
$correct = $xml->xml_value($tags, $answer."['correct'][0]['#']");
$feedback = $this->hotpot_prepare_str($xml->xml_value($tags, $answer."['feedback'][0]['#']"));
- if ($text) {
+ if (strlen($text)) {
// set score (0=0%, 1=100%)
$fraction = empty($correct) ? 0 : 1;
// store answer
Please sign in to comment.
Something went wrong with that request. Please try again.