Hi All,
I tried searching for this but the searching is pretty horrible to find what you're looking for (in comparison to something like MSDN).
I have created a plugin much like external_database enrolment. This plugin connects to a database that won't work well with the default plugin. I now have an issue where there is a rare occurance that 2 (sometimes more) classes are actually 1 class or a group of classes would like a central hub page used for generic information that all the students enrolled would be linked to.
Obviously a solution is to modify the database to make this work, however this isn't viable in this situation.
My solution is that I can make some "courses"/classes deemed as parents and others as "children". I would also have another option that says to either create the child course to not create it.
I was going to add this as a setting at the course level but realised you can't natively plug into the settings of a course page without "hacking" at it. It would also be bad form as it will be directly related to that of the enrolment plugin I made.
So my idea is to have the setting within the plugin it would in the following way:
So my idea here is to add a "Tree-Node" settings box (not how to do that) and have these buttons work with it.
You type in the name that the mapped field will be (I should better label this) and you click "Add Parent" this would be the parent course in a single example. This will add that course to the Tree-Node box as a top level item. Then you select this course and Type in the name of a child course you may want to link enrolments from. Then click an add button that applies to how you want it handled. In one case it would be to click "Add Displayed Child" meaning that all its enrolments (from this plugin) would also be passed to the parent but would also still create this course.
However you could also click "Add Hidden Child" meaning that all its enrolments (from this plugin) would also be passed to the parent but the course would not be created or have users enrolled into it
Even an example that lays out this type of interface and adds values etc it would be greatly appreciated