-
Bug
-
Resolution: Fixed
-
Minor
-
4.1.4, 4.2.1
-
MOODLE_401_STABLE, MOODLE_402_STABLE
-
MOODLE_401_STABLE, MOODLE_402_STABLE
-
MDL-78608_401 -
This is really a bug in report_embedquestion, but Moodle core should be robust to bugs in plugins.
Steps to reproduce.
- Install the three embedquestion plugins: https://moodle.org/plugins/filter_embedquestion, https://moodle.org/plugins/atto_embedquestion, https://moodle.org/plugins/report_embedquestion
- Enable the filter at Admin -> Plugins -> Filters -> Manage filters. And add the atto button to the toolbar (as it says in the plugin install instructions.)
- Create a test course.
- Create a question in the course question bank.
- Ensure that both the question category and the question have an idnumber set.
- Create a Page resource in the course. and embedded the question in the page content.
- Log in as student, and attempt the question in the page. (Hopefully you won't suffer from
MDL-78585.) - Log back in as admin.
- Delete the page.
- Go to the question bank.
Expected result: you see the question bank.
Actual result: fatal error "Can't find data record in database table context."
What is going on is that when the Page was deleted, the attempts are the embedded question are not removed from the database. (This is the bit that is a bug in report_embedquestion). Then, those left over question_usages lead to the fatal error, which is the bit where Moodle core code needs to be more robust.
- is a regression caused by
-
MDL-75576 Question bank statistics are fetched in a terribly inefficient way
- Closed