moodle-format_onetopic icon indicating copy to clipboard operation
moodle-format_onetopic copied to clipboard

Update section control menu for Moodle 4.2

Open james-cnz opened this issue 2 years ago • 1 comments

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:

  • Change Onetopic's duplicate icon to match Moodle 4.2's.
  • Change Moodle 4.2's permalink to something that works for Onetopic.

james-cnz avatar May 22 '23 01:05 james-cnz

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.

james-cnz avatar May 22 '23 10:05 james-cnz

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

davidherney avatar May 03 '24 23:05 davidherney

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.

james-cnz avatar May 04 '24 00:05 james-cnz

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

davidherney avatar May 09 '24 01:05 davidherney