by Emma Richardson.
I haven't actually had this issue so haven't done this but if you are able to find the reference to the file (look at the tables for assign_submission and the files one), then you should be able to remove it and I would think that would get your course back to normal. The file sitting somewhere in moodledata shouldn't cause any problems.
Of course, backup your database before you make any changes!