]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-20960 testing correctly response 0 as not null line 393 merged from 1.9
authorPierre Pichet <pichet.pierre@uqam.ca>
Sat, 19 Dec 2009 21:30:31 +0000 (21:30 +0000)
committerPierre Pichet <pichet.pierre@uqam.ca>
Sat, 19 Dec 2009 21:30:31 +0000 (21:30 +0000)
question/type/multianswer/questiontype.php

index 6a9c1027f027924be1bced2b6912f4aeb217a8bd..30eab72da2fbd42f39c29ff1cd05ee2aef8efc8f 100644 (file)
@@ -390,7 +390,7 @@ class embedded_cloze_qtype extends default_questiontype {
 
                 // Set up a default chosenanswer so that all non-empty wrong
                 // answers are highlighted red
-                if (empty($chosenanswer) && !empty($response)) {
+                if (empty($chosenanswer) && $response != '') {
                     $chosenanswer = new stdClass;
                     $chosenanswer->fraction = 0.0;
                 }