Syxton / moodle-block_massaction

THE OFFICIAL Mass Actions block for Moodle 3.9 and beyond
9 stars 14 forks source link

Refactoring for 4.2 and above: Use moodle checkboxes #80

Closed PhMemmel closed 1 year ago

PhMemmel commented 1 year ago

Hi @Syxton,

as follow-up to your comment in #71, here the PR :)

This PR reworks block_massaction to use the newly introduced bulk editing feature of moodle 4.2 and above.

CARE: This PR is not downwards compatible to moodle versions before 4.2. It would have caused a lot of overhead to make it backwards compatible, so I decided it's not worth. Especially with the new bulk editing feature we probably want to change the features of block_massaction anyway, so I think it's a good idea to handle it like that:

Suggestion:

Additional information:

Syxton commented 1 year ago

@PhMemmel I promise this is on my todo list, but we have had a very busy fall. Our institute moved from 3.11 to 4.2 and the faculty aren't taking it great.

PhMemmel commented 1 year ago

The assignment was not meant to be a ping or a reminder, just realized I did not set it, all fine 👍😀

Syxton commented 1 year ago

@PhMemmel Is there any danger you see in using the Moodle checkboxes by just enabling and showing them if the Mass Actions block is loaded? Instead of having to click the Bulk Edit link? The checkboxes already exist on the page. Just seems like an extra step that is unnecessary, and the Moodle bulk editing should still work once the Bulk Edit link is clicked. It also wouldn't show the bottom menu at all which I think could be confusing.

PhMemmel commented 1 year ago

Yes, unfortunately the enabling of the mass action checkboxes removes all the standard edit elements of the activities and sections in the course and also the sticky footer is there which you do not want to have. So I decided to go for this extra step. If we want to use the Moodle checkboxes, this will be necessary IMO

Syxton commented 1 year ago

@PhMemmel When you get time, take a look at my modifications of your changes. #96 which triggers editing mode and unhides course module tools and removes the sticky-footer.

PhMemmel commented 1 year ago

Thanks! Will have a look on Monday and give feedback!

PhMemmel commented 1 year ago

Hi @Syxton,

I fixed the failing behat tests. Do you have any more comments on the PR?

If we get this merged and be able to declare compatibility with 4.3 I'm happy to have a look at the other PRs. But I think this one should go first, especially because we need to split branches as I mentioned before.