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

itangalo’s picture

Priority: Normal » Major

Since 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.

itangalo’s picture

Changed 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. :-/

itangalo’s picture

I 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.

itangalo’s picture

Priority: Major » Normal

Orphan stuff on kursplanering.se is now manually deleted – solving this issue will take too much time.
Downing the priority.

itangalo’s picture

Lessons in 2.x can no longer be orphaned, since they are field collection items and not nodes.
Sections are still an issue.

itangalo’s picture

Issue summary: View changes

Updated the proposed solution – it seems Views can't be used for this.

itangalo’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)