Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
2.6.4
-
None
-
None
-
2.4.0
-
MOODLE_26_STABLE
Description
If you have a site that has question categories that are in an incorrect context (seen by running a health report), you will receive the following error when trying to add a flashcard module to a course;
More information about this error
|
Debug info: SELECT * FROM {context} WHERE id = ?
|
[array (
|
0 => '16310',
|
)]
|
Error code: invalidrecord
|
Stack trace:
|
|
line 1403 of /lib/dml/moodle_database.php: dml_missing_record_exception thrown
|
line 1379 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
|
line 5349 of /lib/accesslib.php: call to moodle_database->get_record()
|
line 1377 of /lib/questionlib.php: call to context::instance_by_id()
|
line 66 of /mod/flashcard/mod_form.php: call to question_has_capability_on()
|
line ? of unknownfile: call to drop_questions()
|
line 69 of /mod/flashcard/mod_form.php: call to array_filter()
|
line 191 of /lib/formslib.php: call to mod_flashcard_mod_form->definition()
|
line 86 of /course/moodleform_mod.php: call to moodleform->moodleform()
|
line 256 of /course/modedit.php: call to moodleform_mod->moodleform_mod()
|
If you run the health report and the categories have questions in them it is difficult to resolve. As a work around I have created a course and moved those categories into it's context, so they are in a valid context and the error goes away. However, I am wondering if it is possible that the module could just skip over these categories instead of throwing an error and not being usable?
Attachments
Issue Links
- will be (partly) resolved by
-
MDL-47787 After deleting a quiz, its question categories and questions remain in database
-
- Closed
-