gjbarnard / moodle-format_grid

Grid course format contributed by Gareth J Barnard originally created by Paul Krix
GNU General Public License v3.0
21 stars 54 forks source link

Remove the numsections/orphan sections option, and just rely on hidden sections #208

Open james-cnz opened 4 months ago

james-cnz commented 4 months ago

Is your feature request related to a problem? Please describe. I think the numsections/orphan sections option can be a bit confusing, and isn't really necessary, as sections can be hidden instead. Also, I think it would be nice to be able to simplify the Moodle course format code, by removing the numsections/orphan sections related code. I was thinking about creating a Moodle pull request for that, but remembered the Grid format still uses this code.

Describe the solution you'd like I think the Moodle 3.3 Topics format has code to convert orphan sections into hidden sections when the course format is updated, or when a course from an old format is restored. I guess this code could be copied, and the change would otherwise probably mainly involve removing numsections/orphan sections related code.

Versions you are currently using (please complete the following information):

Funding I can't offer any funding. Maybe I could contribute code, though--I'm a Moodle plugin developer myself. If it's of interest, and I get some time, I'll look into it.

gjb2048 commented 4 months ago

Dear @james-cnz,

The number of sections functionality works as it should and copes with old courses and restorations. Orphaned sections are not the same as hidden sections. They are sections beyond the set number of sections. Hidden sections are within the number of sections range and thus are hidden only if they are set to be or the given criteria facilitates it.

I have no intention of removing the number of sections code, as that has already happened once and I got quite a backlash from the community, so put it back in. The duration where it was absent and the fallout of such has caused me no end of technical grief and I'm not going through that again!

Gareth

james-cnz commented 1 month ago

Kind of related, just a heads up, in case you're not aware: There's a subsections feature that's been added to Moodle 4.5 development, that allows adding sections inside sections. I think these subsections are stored at the end of the section list. Since the core Moodle formats no longer use orphaned sections, I'd guess there may not be much testing for whether these play nicely with orphaned sections. (But perhaps you already know this, dunno.)

[EDIT: Here's the issue: https://tracker.moodle.org/browse/MDL-76888 ]