lesson: quiz (true/false) submit without selecting option gives debug error.
Field Tab
Scrum
Time Tracking
Field Tab
Scrum
Time Tracking
Description
when i have a true/false quiz page on a lesson activity, i select submit without selecting a radio button, i get the following error.
using version Moodle 2.2+ (Build: 20111209) Debug info: SELECT * FROM {lesson_answers} WHERE id IS NULL [array ( )] Stack trace:
line 1272 of /lib/dml/moodle_database.php: dml_missing_record_exception thrown line 1249 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 1935 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()
Testing Instructions
create a lesson activity with true/false quiz preview the page, select submit without selecting true or false radio button.
Automated test results
None
Pre-check results
None
Environment
mac osx 10.7.2
PHP Version 5.3.6
mysqlnd 5.0.8-dev - 20102224 - $Revision: 308673 $
Workaround
don't click the submit button until you select an option!
when i have a true/false quiz page on a lesson activity, i select submit without selecting a radio button, i get the following error.
using version Moodle 2.2+ (Build: 20111209)
Debug info: SELECT * FROM {lesson_answers} WHERE id IS NULL
[array (
)]
Stack trace:
line 1272 of /lib/dml/moodle_database.php: dml_missing_record_exception thrown
line 1249 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 1935 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()