Cannot delete orphaned grade items

Cannot delete orphaned grade items

by Diane Soini -
Number of replies: 2
Moodle 3.1

An instructor has restored his course over the years and ended up with a chaotic gradebook with many orphaned items. The activities corresponding to these orphaned grade items no longer exist. They are not hidden, they were deleted in the past but their grade items did not go away when they were deleted. It is not possible to delete them from the grade book. There is no "Delete" option in the edit menu. How can they be deleted?


In reply to Diane Soini

Re: Cannot delete orphaned grade items

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Are you sure the activities are not orphaned too?  Just in a deleted section?  If so, just add back the section and then delete the activities.

 

In reply to Emma Richardson

Re: Cannot delete orphaned grade items

by Diane Soini -

Actually, I think what has happened is that he has been importing the same course for many years and he just re-uses the activities. The trouble then is that somehow with each use the gradebook gets more and more items in it.

I tested importing his course but unchecking all the activities and suddenly instead of dozens of orphaned gradebook items you get a clean and empty gradebook. I also tested importing all the activites and then deleting them after the import, but the gradebook is still cluttered with dozens of items. At least those items can all be deleted and there aren't any of those weird un-deletable items.

This seems like a problem if you ask me, but moodle seems to like things to be horridly messy.