Are subsections really sections?

Are subsections really sections?

by Gareth J Barnard -
Number of replies: 4
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hello,

I've been looking at trying to make both Collapsed Topics and Grid formats work with subsections in Moodle 4.5 (https://docs.moodle.org/405/en/Course_homepage#Add_a_subsection).  As both formats retain the ability to alter the number of sections via a setting after the course has been created is problematic.  This has lead me to look at how things work, which has lead me to raise MDL-84038 (related to core functionality) which I then discovered links to MDL-83056, were subsections are considered 'real sections' and should respect the 'maxsections' core setting.

But... are subsections really 'sections' in a course but are actually a means of breaking apart a parent section?  On MDL-83056 in relation to subsections obeying 'maxsections', I've commented:

I've been thinking about this and now it seems to me to be a bad idea. Take the situation where a user creates a course. They select the number of sections they want in the first instance. These 'sections' are full ones. Now if they have the maximum number of sections then go and discover that they can't add sub sections such that they can break apart the content in a section then they're going to get frustrated. They'll then have to deleted some sections (not what they want to do for the course design they have in mind) in order to add sub sections. Now the course is not structured in the way that they wanted in the first place. Therefore sub sections should not obey 'maxsections' but possibly have a new 'maxsubsections'. As when creating a course you can't say that I want ten sections with the third and fifth having two sub sections each.

To me sections and subsections are two different things and shouldn't be restricted by the same thing.  Just like mixing up different units and thinking that the measurement represents the same thing.

What do you think please?  Also comment on the respective tracker issues if desired.

Gareth

Average of ratings: -
In reply to Gareth J Barnard

Re: Are subsections really sections?

by Kimberley Johnston -
I've been asking myself similar (ish) things recently. We're running into issues where a section exists and it might be nice to switch it into being a sub-section but to do this as far as I can tell you have to create a sub-section and then move the content into it and the same with going in the opposite direction. If a sub-section is indeed the same as a section then it would be good to share some expected functionality. Early days yet so I'm just off to find out where such comments may already have been made smile
In reply to Kimberley Johnston

Re: Are subsections really sections?

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
Dear Kimberley,
 
I've done a quick test and investigation and sub-sections are sections from a code point of view. Just that there is added data that allows them to be recognised as 'mod_subsection's too. That it is possible via database manipulation to convert a sub-section into a section. And perhaps, though I've not tried, to go the other way around. The complexity would be implementing this in the UI and specifying the exact place the section should be.
 
Gareth
Average of ratings:Useful (2)
In reply to Gareth J Barnard

Re: Are subsections really sections?

by Mark Sharp -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
I suspect the only way in this instance is to backup in code the section you want to move, delete that section, then restore that section into the new subsection or otherwise.
We've been using a course format that manages its own subsections, so we've decided not to use Moodle's subsection until we can get our heads around what changes we need to migrate. Obviously a better sidebar navigation experience is a motivator to switch to subsections.
Average of ratings:Useful (1)