davidherney / moodle-format_onetopic

Course format Onetopic to LMS Moodle
GNU General Public License v3.0
19 stars 42 forks source link

Update section control menu for Moodle 4.2 #150

Closed james-cnz closed 3 months ago

james-cnz commented 1 year ago

Moodle 4.2 adds a duplicate section option, which is currently buggy, and, as the Onetopic section control menu merging code currently works, overwrites Onetopic's working duplicate section option. I guess it would be better to use Onetopic's duplicate section option. Rather than just change the section control menu merging code to support this one new case, I've rewritten it to make it more extensible in the future. I'm not sure if this is overkill. There are a couple of other changes too:

james-cnz commented 1 year ago

I just noticed this alters the section menu order slightly (it swaps the hide/show and move controls). The new order more closely matches the order in a Topics/Weekly course in "all sections on one page" layout though, so I don't think this is a bad thing. Also, though, I think Moodle 4.2 adds a duplicate option to the General section, so this probably needs to be removed. This shouldn't be too difficult, but I'm at home at the moment, and don't have access to a Moodle 4.2 test server to check code against.

davidherney commented 3 months ago

Hi @james-cnz

Do you think this change still applies? I was barely able to dedicate the time to integrate it but I don't know how much the functionality of Moodle has changed, it may be better to remove the one from the format and leave the official one, what do you think?

Gracias

Saludos

james-cnz commented 3 months ago

This still serves a purpose, as the duplicate option still hasn't been fixed in Moodle. See: https://tracker.moodle.org/browse/MDL-78080 And since bug fix support has ended for 4.2, it will never be fixed in 4.2. I think it's probably low priority, though. If you're pressed for time, maybe ignore this one.

davidherney commented 3 months ago

Thx @james-cnz ... I manually integrated the change to use the default duplicate inheriting from the Topic format.