Problem/Motivation
When I create new course outlines, I sometimes reuse sections from already existing outlines. However, to make it easier to add a lot of sections at once, I add dummy sections and replace them with the already existing ones.
When I replace the dummy sections, they become orphaned. Orphaned and unused sections should be deleted. (The same goes for lessons that may be orphaned – though I have no example workflow of how these might appear.)
Proposed resolution
Have a custom-written Rules action that fetches and deletes orphaned items.
Provide a setting in Course planner, where automatic orphan deletion can be turned on and off.
Remaining tasks
Do the stuff.
User interface changes
A settings page will be introduced. (This could also be used for controlling how select lists for VBO are created, as well as turning on/off the blocking of the bookmarks flag.)
API changes
–
Comments
Comment #1
itangalo commentedSince kursplanering.se (where this module primarily is used) is picking up quite a bit of Google indexing, it is a bit urgent to delete orphan items. I'm upping the priority.
Comment #2
itangalo commentedChanged the proposed resolution – it seems that the reverse relationships necessary in Views doesn't work as I expected.
Best solution is probably/maybe to write a custom Rules action or so, that fetches the orphaned items with a custom query. :-/
Comment #3
itangalo commentedI think this feature would be helped a lot by having a boolean attached to Course planner items, telling whether it is marked for deletion or not.
Comment #4
itangalo commentedOrphan stuff on kursplanering.se is now manually deleted – solving this issue will take too much time.
Downing the priority.
Comment #5
itangalo commentedLessons in 2.x can no longer be orphaned, since they are field collection items and not nodes.
Sections are still an issue.
Comment #5.0
itangalo commentedUpdated the proposed solution – it seems Views can't be used for this.
Comment #6
itangalo commented