While editing the quiz setting, when we try to save form it works fine most of the time but at certain point it throws error.
Debug info: SELECT id,course FROM
{course_modules} WHERE id IS NULL
[array (
)]
Error code: invalidrecord
Stack trace:
line 1451 of /lib/dml/moodle_database.php: dml_missing_record_exception thrown
line 1427 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
line 7074 of /lib/accesslib.php: call to moodle_database->get_record()
line 382 of /mod/quiz/locallib.php: call to context_module::instance()
line 418 of /mod/quiz/locallib.php: call to quiz_delete_attempt()
line 143 of /mod/quiz/lib.php: call to quiz_delete_previews()
line 507 of /course/modlib.php: call to quiz_update_instance()
line 266 of /course/modedit.php: call to update_moduleinfo()