We are having a problem with the deletion of modules in a course. We have an adhoc task failing to delete a module in a course and because of that all the other modules from that course are not being deleted. We get several items in the course grade book labeled [Deletion in progress].
- Checking the mdl_task_adhoc table, I get 3 items with faildelay 24h and classname \core_course\task\course_delete_modules.
- Checking the cron log, I can confirm the problem: "Adhoc task failed: core_course\task\course_delete_modules... The course module xxxx could not be deleted."
- Checking mdl_course_modules for that module, I could understand it is a turnitintooltwo module that is causing the issue and I noticed that the "instance" field is '0'.
- I was not able to find the module when looking for the module instance in mdl_turnitintooltwo table.
- I suspect it must be some problem with turnitintwotool module related to the restore process...
Anyway, my question is:
Why is the deleting process stuck because of a problem in a module? What should I do to get the deleting process to proceed in order all other deleted modules in that course are actually deleted?
PS: Moodle 3.5 - PostgreSQL