Blocks: Mass Actions block

Maintained by Picture of Clem Smith Clem Smith
This block allows instructors to perform actions upon multiple resources or activities, rather than having to perform repeated actions on individual items.
1067 sites
46 fans

This block allows instructors to perform actions upon multiple resources or activities, rather than having to perform repeated actions on individual items.

To use this block, Javascript must be enabled in your browse and you must be in editing mode in the course home page. The user must have capability "block/massaction:use". The block may now be used with a course in any course format. However, the OneTopic format is not properly supported at this time. The work-around is to change course formats to another format (Weekly or Topics are well-tested), move the course content around, then change the course format back to OneTopic. I will try to fix the interaction between OneTopic and Mass Actions in the future.

Supported actions include mass selection, indentation, deletion, hiding, showing, and moving. To select items to perform actions on, simply click the checkbox to the right of it in the course home page or use select functionality, then click the action you would like to perform in the block.

Note: the original block for Moodle 1.9 is on; this is the version for Moodle 2.

If you encounter bugs or have suggestions for improvement, please use the bug tracker URL and I will work on those as quickly as possible.


Screenshot #0


Picture of Clem Smith
Clem Smith (Lead maintainer)
Picture of Huy Hoang
Huy Hoang: Original maintainer
Picture of Jon Marthaler
Jon Marthaler: Former developer
Picture of Dominic Hanzely
Dominic Hanzely: Former developer
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of Clem Smith
    Fri, 17 Nov 2017, 3:08 AM
    I will get the 3.4 version up next week!
  • Picture of Debbie Unterseher
    Mon, 18 Dec 2017, 5:23 AM
    I get the error/warning message below on a course that the block is installed on. Do I need to worry? Moodle 3.2.6
    Too many params passed to js_call_amd("block_massaction/block_massaction", "init")
    line 1014 of /lib/outputrequirementslib.php: call to debugging()
    line 100 of /blocks/massaction/block_massaction.php: call to page_requirements_manager->js_call_amd()
    line 288 of /blocks/moodleblock.class.php: call to block_massaction->get_content()
    line 230 of /blocks/moodleblock.class.php: call to block_base->formatted_contents()
    line 1187 of /lib/blocklib.php: call to block_base->get_content_for_output()
    line 1239 of /lib/blocklib.php: call to block_manager->create_block_contents()
    line 356 of /lib/blocklib.php: call to block_manager->ensure_content_created()
    line 3942 of /lib/outputrenderers.php: call to block_manager->region_has_content()
    line 3990 of /lib/outputrenderers.php: call to core_renderer->body_css_classes()
    line 32 of /theme/lambda/layout/columns3.php: call to core_renderer->body_attributes()
    line 1110 of /lib/outputrenderers.php: call to include()
    line 1040 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
    line 246 of /course/view.php: call to core_renderer->header()
  • Picture of Clem Smith
    Mon, 18 Dec 2017, 11:27 PM
    I'm not sure what's causing this error to be thrown. PM sent for instructions on how to reproduce the error. js_call_amd accepts either two or three parameters, and I am passing it three. I think there is something else going on that is causing this problem. If I can track it down, I'll see what I can do to get it fixed. Any information you can provide on how to reproduce the problem will be appreciated.
  • Picture of Debbie Unterseher
    Fri, 29 Dec 2017, 1:38 AM
    It doesn't work on the test server now. I updated from Moodle 3.2.4 to Moodle 3.2.6 and updated the plugin to 2017111700 and now it doesn't work. I'm going to update the production server next week, so I guess I need to stick with the old plugin for block_massaction.
  • Picture of Debbie Unterseher
    Mon, 8 Jan 2018, 3:57 AM
    Seems to work now. Not sure what was going on. Sorry about that!
  • Picture of Jean-Roch Meurisse
    Tue, 20 Feb 2018, 8:20 PM
    I think the problem comes for courses with many activities. The array is imploded into a string and when this string reaches over 1024 characters, it throws a debugging error message (line 1025 in lib/outputrequirementslib.php). Since it's a debugging message, it won't show on a production platform
  • Picture of Clem Smith
    Tue, 20 Feb 2018, 9:28 PM
    I will investigate this issue, Jean-Roch Meurisse. I won't have time to look at this until the weekend, at the earliest. It'll probably be some time in March before this is fixed. I'll get it done as soon as I can, though.
  • John Provasnik at Moodle Moot US
    Fri, 6 Apr 2018, 2:29 AM
    Hi. I'm having an off and on issue in Moodle 3.4.6 that when I'm mass deleting a few times (i.e. 4 quizzes), I get an error. These quizzes are using questions from a Course-Level shared question bank. Instead of deleting I get an error that says Invalid Moodle ID: {$a} - Any thoughts on what could cause that? Normally people ask for any Debugging Mode information but I'm on a Hosted Moodle.
  • Picture of Harold Yung
    Tue, 24 Apr 2018, 3:28 PM
    I have a small question. I installed v5.1.3 on my Moodle 3.3 and now I want to upgrade my Moodle to 3.4. However, I download v5.1.2 which is for Moodle 3.4 but Moodle doesn't let me to upgrade version with message "Default exception handler: Cannot downgrade block_massaction from 2018013000 to 2017122700. Debug:". I would like to ask if can I use v5.1.3 on Moodle 3.4? Thanks!
  • Picture of Clem Smith
    Tue, 24 Apr 2018, 9:19 PM

    I apologize. That was an oversight on my part and has now been corrected.
  • Picture of Harold Yung
    Wed, 25 Apr 2018, 10:19 AM
    Thank you very much for your quick response and update. It works very well on the upgrade from 3.3 to 3.4 now! smile
  • Picture of Nelson Bartley
    Thu, 10 May 2018, 12:09 PM
    Is there any chance this could be made compatible with when they are collapsed? When everything is opened it works fine, but when a section containing an item is closed it no longer works at all.
  • Picture of Clem Smith
    Thu, 10 May 2018, 9:10 PM
    Mr. Bartley,

    Currently, the plugin relies upon using the HTML DOM to discover the modules that are in the course. When your flex sections are collapsed, there are no modules in them for the plugin to discover. This is why it currently does not work with collapsed flex sections. That said, I am expecting to be able to spend time either later this month or in June working on refactoring the plugin to work much better and to be less reliant on the DOM. I'm going to private message you to discuss this further.

  • Picture of Nelson Bartley
    Tue, 15 May 2018, 6:49 PM
    I get that it wouldn't be able to find the things in the collapsed sections, but is there a reason it won't work with the items that are there though?
  • Picture of Clem Smith
    Tue, 15 May 2018, 8:08 PM
    The only reason it wouldn't work is if there is a javascript error on the page. I've tested it with that course format in our Moodle installations and it works. So the only thing I can think of is that there is something on the page throwing a javascript error, which would prevent anything else relying on javascript from executing.
1 2 3 4 5
Please login to post comments