Check the tracker for a patch to the issue.
The problem is that the API call of core_course_delete_courses does not make a call to "fix_course_sortorder" after deleting the courses.
Check the tracker for a patch to the issue.
The problem is that the API call of core_course_delete_courses does not make a call to "fix_course_sortorder" after deleting the courses.