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.
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.