mirror of
https://github.com/moodle/moodle.git
synced 2025-04-20 16:04:25 +02:00
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:
parent
a672f021ea
commit
21d6123fbd
@ -4549,7 +4549,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];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user