Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
james-cnz opened this issue May 1, 2024 · 3 comments

Comments

@james-cnz
Copy link

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):

  • Moodle: 4.1 on the production server
  • Format: 400.2.0 on the production server (but I downloaded the latest on a test server to check the feature was still present)
  • Browser and version: Firefox version 115.10.0esr (Debian version) (64-bit) on Debian GNU/Linux 12 (bookworm) at home, mainly. Firefox on Windows 10 at work, mainly, but not sure about the version, because I'm currently at home.

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
Copy link
Collaborator

gjb2048 commented May 1, 2024

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
Copy link
Author

james-cnz commented Aug 5, 2024

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 ]

@james-cnz
Copy link
Author

I've raised an issue about the behaviour of get_last_section_number() in relation to delegated sections/subsections here:
https://tracker.moodle.org/browse/MDL-83450
I don't know what should be done about this. Perhaps you have an idea?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants