MDL-20960 testing correctly response 0 as not null line 393 merged from 1.9

This commit is contained in:
Pierre Pichet 2009-12-19 21:30:31 +00:00
parent dc98ad65de
commit b7c81cf066

View file

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