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

Cleanup orphaned course modules CLI script

XMLWordPrintable

      As outlined in MDL-68365 there are cases where the core_course\task\course_delete_modules fails because there are records in the course_modules table (and possibly context and course_sections tables) but no record in the corresponding module table itself, e.g. assign

      In these cases we are in an inconsistent state where some required data is missing, so we can't remove the modules cleanly. But admins should still have an option via a cli script to clean things up as best we can. 

      Conceptually, this is likely going to be a version of course_delete_module  that continues on even when some steps fail (throw errors), cleaning up things as best as they can be done.

      This will still be required even when the root cause is addressed

            Unassigned Unassigned
            matt.porritt@moodle.com Matt Porritt
            Votes:
            5 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 minute
                1m

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