Merge branch 'MDL-34259-master' of git://github.com/FMCorz/moodle

This commit is contained in:
Dan Poltawski
2012-08-06 12:21:24 +08:00
+2 -3
View File
@@ -76,12 +76,11 @@ class lesson_page_type_truefalse extends lesson_page {
$result = parent::check_answer();
$answerid = $data->answerid;
if ($answerid === false) {
if (empty($data->answerid)) {
$result->noanswer = true;
return $result;
}
$result->answerid = $answerid;
$result->answerid = $data->answerid;
$answer = $DB->get_record("lesson_answers", array("id" => $result->answerid), '*', MUST_EXIST);
if ($this->lesson->jumpto_is_correct($this->properties->id, $answer->jumpto)) {
$result->correctanswer = true;