Whoever found a solution to the problem, I have the same situation
We have had a similar issue and were unable to delete the problematic course. In the end we deleted records manually in the Moodle database
deleted records related to the courseid of the problematic course. We could then delete the course.
The problem was caused by two users creating assignments in the same course at exactly the same time. How did we manage to do this you might well ask - I was talking through a new Moodle admin person on the phone who needed to create a copy of a course which had two assignments. So I was telling them what to put on all the sections and to save time they added one while I added the other!