Closed TomoTsuyuki closed 6 months ago
@TomoTsuyuki So if I understand there are some possible restrictions we need to test for:
So it seems to me that a block level permission wouldn't be enough. So option 2 is out. I would say that option 3 is the fastest way around it, assuming the course format that is being used is custom (like #86) and can be altered to use the new callback. However, it also seems like in the long run option 1 would be better.
I like option 1 for a long term fix for #86 as well. So I would be ok to have option 3 implemented for the short-term with option 3 attempted to lay a core groundwork to remove both this callback and the callback from #86.
I have also created a tracker for can_add_section
Fixed by #118
We have a requirement to control 'Add a new section' for mass action plugin. Currently it's just check 'moodle/course:update'. https://github.com/Syxton/moodle-block_massaction/blob/729896c0675e09df59787408a393a974ef1c592e/classes/form/section_select_form.php#L103
We discuessed and there are 3 options to implement for this.
Have a
can_add_section()
in the\core_courseformat\base
and extended classes, same ascan_delete_section()
. This option needs to update the core, so need to raise a Moodle tracker ticket.Add a new capability,
block/massaction:addnewsection
or something in the plugin.Add a callback function in the plugin, similar as https://github.com/Syxton/moodle-block_massaction/issues/86
Which option do you prefer? @Syxton