]> git.mjollnir.org Git - moodle.git/commitdiff
correct the setting the fixed flag in JMatch quizzes
authorgbateson <gbateson>
Mon, 30 Oct 2006 08:55:35 +0000 (08:55 +0000)
committergbateson <gbateson>
Mon, 30 Oct 2006 08:55:35 +0000 (08:55 +0000)
mod/hotpot/template/v6.php

index 4ce607414a8af99ea89b966c77aa7d5835ac1a97..d6e4d94e3a6f51b0512a793d5e1b34f63b96a9ee 100644 (file)
@@ -724,7 +724,7 @@ class hotpot_xml_quiz_template extends hotpot_xml_template_default {
             $str .= "D[$i] = new Array();\n";
             $str .= "D[$i][0] = '".$this->js_safe($item['text'][0]['#'], true)."';\n";
             $str .= "D[$i][1] = ".($i+1).";\n";
-            $str .= "D[$i][2] = '".$this->int_value($item['fixed'][0]['#'])."';\n";
+            $str .= "D[$i][2] = '".(empty($item['fixed'][0]['#']) ? 0 : 1)."';\n";
         }
         return $str;
     }