Studio deletion creates orphans
Steps to Reproduce
Create a course in split modulestore (in devstack, create a course then create a rerun of the course)
Create a new section, subsection, unit, and problem.
Publish the unit.
Delete the unit.
Enter the Django shell: ./manage.py cms shell --settings=devstack
In the Django shell, run these commands:
The problem is not returned by `modulestore().get_items()`
The problem is returned by `modulestore().get_items()` and has its parent set to None.
This has issue has led to an ugly workaround when searching the course tree for credit requirements in which we retrieve items, then go up the course tree until we find the root to check if the item is still available. It would be really nice to remove this to reduce the number of Mongo queries we need to make.
Steps to Reproduce
Reason for Variance
User Impact Summary
As we were discussing about this, we were concerned that we're seeing this ItemNotFoundError error. we are concerned that there's a bug we're glossing over and we do not need to pass that exception. We can do it either way
1. Fix the fixture (We can discuss the amount of time and effort on this and who will be right person to take this on) and then continue
2. As we were discussing that chaining the base class might resolve the issue, can we also try that?
Let me know what you think. We can discuss it if you have any questions on Monday.
Ah! Here's a case of something being an orphan in LMS but not in studio. and I were talking about this earlier today. Ali didn't know if these actually existed in the wild. Turns out they do
turns up one orphan
orphan/<course_id> is empty
This is also bad because it's not being caught in the orphans handler— it's not showing up in /orphans/<course_id>
, looping you in
I think it belongs in Platform because the split modulestore is not doing the right thing in delete_item.
Note that this is particularly bad for units that contain discussion modules, because orphaned discussion modules really screw up the forums.
I wasn't sure whether to put this into T&L or Platform. what do you think?