MDL-66409 mod_lesson: Fix editing of numerical pages

This avoids using the "magic" `isset` function implemented
within the lesson_base class (which returns the `empty` function).
In the case of the answer beeing `0`, the test fails and the answer
is considered to be deleted.
This commit is contained in:
Raphaël Santos
2019-09-09 09:41:49 +02:00
parent 7de0c0f1ad
commit 5c37c61b42
+1 -1
View File
@@ -4476,7 +4476,7 @@ abstract class lesson_page extends lesson_base {
$this->answers[$i]->responseformat = $properties->response_editor[$i]['format'];
}
if (isset($this->answers[$i]->answer) && $this->answers[$i]->answer != '') {
if ($this->answers[$i]->answer !== null && $this->answers[$i]->answer !== '') {
if (isset($properties->jumpto[$i])) {
$this->answers[$i]->jumpto = $properties->jumpto[$i];
}