Right here's a question
I have a 2 semester course format, it is inherits from the topics course format, and the *only* difference is that it presents the sections under 2 tabs: Semester 1 and Semester 2.
Without any additional modifications (really) drag and drop works nicely for uploading and reordering *resources*, but it doesn't work for re-ordering sections.
I've implemented this by setting section 0 to be always displayed but each subsequent section is semester 1 or semester 2 based on if it is an odd or even section (by doing $section % 2)
Section 1: Semester 2
Section 2: Semester 1
My renderer then simply does a "continue" on each section that doesn't satisfy this condition.
Now it would appear that the section re-ordering works on the basis of knowing the section being dragged (by it's "id", which apparently is actually it's ordinal position) and the "position" of the destination section that its being dropped on to.
This is obviously not going to work in this case, because I'm not actually simply moving items up or down, I'm needing to reorder them within the odd or event items of the whole list.
I have a nice piece of PHP that does this perfectly *if* you're not using Javascript (ie the up/down buttons) which is easy to hooking as the renderer for the up/down icons simply points at this script instead of the default one.
How do I get the Drag & drop to have different logic?
Or equally how can I disable *only* the drag & drop section re-ordering (so I get the "static" reorder controls) but keep the d&d upload & resource reordering..
Oh and how can I do this from within the course format only, and *without* hacking the core.