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:
@@ -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];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user