KQMATH / moodle-local_qtracker

:bug: Local Moodle plugin providing issue tracking for Moodle questions
https://moodle.org/plugins/local_qtracker
GNU General Public License v3.0
2 stars 1 forks source link

Error when deleting activity where an issue was created #33

Closed andstor closed 3 years ago

andstor commented 3 years ago

When deleting a course module / activity (e.g. quiz module) where issues have been reported, viewing the issues results in an error. This is due to the context validation which is done for the deleted contextid. We either have to delete all related issues, or we could elevate the contextid to the course contextid.

By making use of the Moodle Event API, it should be possible to hook into the deletion event and change the contextid saved related to the issue to the course context.