Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-80594

Course Modules which are scheduled for deletion never get deleted

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 4.1.6
    • Course
    • MOODLE_401_STABLE

      When a user deletes a Course Module, the deletioninprogress field for that course module is set to 1 in the database, and an Ad Hoc task is scheduled to actually do the deletion. If that Ad Hoc task fails to run, then the Course Module is never deleted. I.e. there is no clean-up process which picks up on Course Modules in this state and deletes them.

      In our case, we know why the Ad Hoc tasks failed (we were having some problems with server load), but having resolved that issue, the Course Modules which were scheduled for deletion while we were having those issues, are now stuck in limbo.

       

      A bit of description of what is happening behind the scene:

      • When deleting a module, this triggers the course_delete_module with the async = true parameter
      • This then creates  a task core_course\task\course_delete_modules
      • The task is ran once (if an exception arise, the module is not delete) and calls course_delete_module() which does the deletion non asynchronously (on the spot)

       

            Unassigned Unassigned
            DavidNorman99 David Norman
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.