From 0a36b931e210e62745e68c17380244d5d149e52f Mon Sep 17 00:00:00 2001 From: Adrian Greeve Date: Tue, 20 Dec 2016 14:01:30 +0800 Subject: [PATCH] MDL-57366 mod_lesson: Zero now acceptable numeric answer. When creating a numerical question. If the answer to the question is 0 then the answer will not save. --- mod/lesson/locallib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/lesson/locallib.php b/mod/lesson/locallib.php index 160d80f89cb..4e02e441fc5 100644 --- a/mod/lesson/locallib.php +++ b/mod/lesson/locallib.php @@ -2955,7 +2955,7 @@ abstract class lesson_page extends lesson_base { for ($i = 0; $i < $this->lesson->maxanswers; $i++) { $answer = clone($newanswer); - if (!empty($properties->answer_editor[$i])) { + if (isset($properties->answer_editor[$i])) { if (is_array($properties->answer_editor[$i])) { // Multichoice and true/false pages have an HTML editor. $answer->answer = $properties->answer_editor[$i]['text'];