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

Feature Request: sections within other sections #41

Open
stdoma opened this issue Jul 3, 2023 · 6 comments
Open

Feature Request: sections within other sections #41

stdoma opened this issue Jul 3, 2023 · 6 comments

Comments

@stdoma
Copy link

stdoma commented Jul 3, 2023

In my opinion, the format is much better suited to structuring courses than the normal topic format. Thanks for that!

Another big step in the direction of flexible structuring would be the possibility of being able to define sections within sections.
This possibility has the "Flexible sections format" (https://moodle.org/plugins/format_flexsections).

Are there any plans in this direction? Maybe you could merge the plugins?

@james-cnz
Copy link
Owner

Hi stdoma,

Sorry, I basically only add to my format what my employer needs, and just make it available to anyone else who finds it useful as-is.

I think my format and the Flexible sections format have made some different design choices that would make merging them quite tricky. My format is quite rigid with possible sections, defining each section by a level, 0=top-level page, 1=subpage, 2=topic in a page. The Flexible sections format defines sections by what its parent is, and whether it's shown on the same page or a separate page. To merge them, I think I'd probably have to rewrite all my code to use the Flexible sections approach. Also, I'm not even sure if Moodle has a way to import section settings from one format into another. (I have looked, but haven't found any.)

@stdoma
Copy link
Author

stdoma commented Jul 3, 2023

Hi @james-cnz,
Thanks for the info.

I understand that the level system differs at the point.
I hadn't looked at any code or database elements. I'm also not that deep into Moodle development to be able to assess this effectively.

It would probably not be possible to solve this without further data fields.
If I had to build this I would probably save the normal order for just for all other formats (top to bottom, left to right). Besides that, I would store the structure in its own fields for general compatibility. (rough theory ^^)

It definitely sounds like a little work.
Do you also make changes to the plugin as commissioned work? - If you had to estimate the cost in monetary terms, how much would it be (rough estimate)?

@stdoma
Copy link
Author

stdoma commented Jul 5, 2023

Hi @james-cnz ,
I was thinking about the level elements of the sections while jogging yesterday.
I came up with something that should theoretically work to add sections to sections.

You could leave the level status from 0 to 2 as it currently works.
Now you could continue with the 3. Where 3 is a section below 2. 4 is again a section under 3 and so on.
You could then have several Level 3 elements under a Level 2 element. Since the order of the sections is saved, you can actually work through them properly.
In the current settings you would have to make sure that the new levels do not appear there. Which shouldn't be a problem.
So the order and the level would be enough to build a tree and you wouldn't need the direct parent section in the database to show a section or mount it in the tree.
Possibly the maximum depth is then regulated.

Would that be an approach or would that not work?
That should work with the database. I'm not sure about the code though...
I haven't really thought about the handling yet. At first it was only about the storage without making major changes in the database.

@james-cnz
Copy link
Owner

Hi @stdoma,

Sorry, when I said I basically only add what my employer needs, the exceptions have been things like simple internationalisation fixes. The vast majority of the work I've put into the plugin has been funded by my employer, so I think of it as belonging to them really, and get approval from my supervisor before making any significant changes.

What you describe would be easier to do, I think, but I've remembered something else. I think I heard that there was a plan to add nested sections to core Moodle, maybe in 4.3. I guess it would probably make sense to wait and see what Moodle does before making any decisions for my plugin.

@james-cnz
Copy link
Owner

FYI, it looks like this is the Moodle issue related to adding subsections within sections: https://tracker.moodle.org/browse/MDL-76888
I'll look into trying to support it in my format when it becomes available in Moodle.

@james-cnz
Copy link
Owner

Apparently it's planned to ship the subsections feature with Moodle 4.5 (although disabled by default), so I'll work on getting it working in the Multitopic format.

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

No branches or pull requests

2 participants