Open heather-williams opened 9 years ago
As you can see in your report, the issue is caused by a non compliant situation in question internal data model. The stack actually shows the error is thrown on a deep sub call in the question library, and thus comes outside of the functional responsibility of the flashcard module. It is thus not easy or even architecturally consistant that flashcard have to care about a deep functional condition handled elsewhere. Perhaps also your output reveals that you are runnign your Moodle at high debugging level, which might not be essential on production sites (or ?)
cheers
Since it appears that this is only happening for the flashcard module and makes it quite unusable, I thought it would be fruitful to open an issue for it. But if you think I should take another route (maybe a Moodle tracker?) then I can do that.
The high debugging level was turned on so I could capture that stack and provide it here.
Thanks!
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:
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?