Merge branch 'MDL-34259-master' of git://github.com/FMCorz/moodle
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user