Details
Description
There is a notice on numerical cloze because
line 348
if (empty($chosenanswer) && !empty($response)) {
$chosenanswer = new stdClass;
$chosenanswer->fraction = 0.0;
}
and line 365
if ($options->feedback && $response != '') {
$style = 'class = "'.question_get_feedback_class($chosenanswer->fraction).'"';
$feedbackimg = question_get_feedback_image($chosenanswer->fraction);
} else {
$style = '';
$feedbackimg = '';
}
as response = 0 test as empty() , the $chosenanswer->fraction was not initialized.
change line 348 to
if (empty($chosenanswer) && $response != '') { $chosenanswer = new stdClass; $chosenanswer->fraction = 0.0; } }
tested, seems OK.
Even with the notice the history was rendered correctly.