-
Bug
-
Resolution: Fixed
-
Major
-
2.2.4, 2.3.1
-
MOODLE_22_STABLE, MOODLE_23_STABLE
-
MOODLE_22_STABLE, MOODLE_23_STABLE
-
MDL-34259-master -
Replication steps
- Create a lesson
- Add a true/false question
- Attempt the lesson as a student
- On the true/false question page, do not select any answer and click 'Submit'
Expected:
- You loop on the page, or silently skip the page
Actual:
- Exception is raised
Debug info: SELECT * FROM {lesson_answers} WHERE id IS NULL
|
[array (
|
)]
|
Error code: invalidrecord
|
Stack trace:
|
line 1321 of /lib/dml/moodle_database.php: dml_missing_record_exception thrown
|
line 1297 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
|
line 85 of /mod/lesson/pagetypes/truefalse.php: call to moodle_database->get_record()
|
line 1922 of /mod/lesson/locallib.php: call to lesson_page_type_truefalse->check_answer()
|
line 79 of /mod/lesson/continue.php: call to lesson_page->record_attempt()
|
|
Output buffer: Notice: Undefined property: stdClass::$answerid in /home/fred/www/repositories/testing_23/moodle/mod/lesson/pagetypes/truefalse.php on line 79 Call Stack: 0.0015 781592 1. {main}() /home/fred/www/repositories/testing_23/moodle/mod/lesson/continue.php:0 0.3289 51681816 2. lesson_page->record_attempt() /home/fred/www/repositories/testing_23/moodle/mod/lesson/continue.php:79 0.3289 51681816 3. lesson_page_type_truefalse->check_answer() /home/fred/www/repositories/testing_23/moodle/mod/lesson/locallib.php:1922
|