Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-80548

Add bulk actions to the"Browse list of users" page

XMLWordPrintable

    • MOODLE_404_STABLE
    • MOODLE_404_STABLE
    • Hide

      Note that this issue does not change how existing bulk actions work (they still do not use JS for confirmations). This is outside of the scope here.

      Test 1. Checkboxes

      1. As admin or manager go to Site administration>Users>Browse list of users
      2. Make sure "With selected users..." is disabled
      3. Open inspector window and find the hidden field 'userids' in the form right above the bulk action selector, make sure it is empty
      4. Check some users, make sure the action select gets enabled and the user ids are populated in the form
      5. uncheck users, check all, etc, make sure the enabled/disabled state is updated and the userids hidden field is also updated
      6. When some users are checked change the page or the filters, make sure the "With selected users..." is now disabled and userids is empty since nobody is checked now.

      Test 2. Actions

      1. go to Site administration>Users>Browse list of users
      2. Check some users
      3. Select a bulk action
      4. Make sure the correct list of names appears in the confirmation page
      5. Make sure that clicking "No", "Yes", "Cancel", "Continue", etc. will take you back to the /admin/users.php page when the bulk action is complete.
      6. Repeat for all bulk actions

      Test 3. Regression testing for the old bulk actions

      1. Go to Site administration>Users>Bulk user actions
      2. Add some users to the selection
      3. Make sure the correct list of names appears in the confirmation page
      4. Make sure that clicking "No", "Yes", "Cancel", "Continue", etc. will take you back to the /admin/user/user_bulk.php page when the bulk action is complete.
      5. Repeat for all bulk actions

      P.S. I added some behat coverage but I did not cover all bulk actions and all buttons with the behat tests because there are a lot of options and also hopefully we will eventually replace all these screens with JS popups

      Show
      Note that this issue does not change how existing bulk actions work (they still do not use JS for confirmations). This is outside of the scope here. Test 1. Checkboxes As admin or manager go to Site administration>Users>Browse list of users Make sure "With selected users..." is disabled Open inspector window and find the hidden field 'userids' in the form right above the bulk action selector, make sure it is empty Check some users, make sure the action select gets enabled and the user ids are populated in the form uncheck users, check all, etc, make sure the enabled/disabled state is updated and the userids hidden field is also updated When some users are checked change the page or the filters, make sure the "With selected users..." is now disabled and userids is empty since nobody is checked now. Test 2. Actions go to Site administration>Users>Browse list of users Check some users Select a bulk action Make sure the correct list of names appears in the confirmation page Make sure that clicking "No", "Yes", "Cancel", "Continue", etc. will take you back to the /admin/users.php page when the bulk action is complete. Repeat for all bulk actions Test 3. Regression testing for the old bulk actions Go to Site administration>Users>Bulk user actions Add some users to the selection Make sure the correct list of names appears in the confirmation page Make sure that clicking "No", "Yes", "Cancel", "Continue", etc. will take you back to the /admin/user/user_bulk.php page when the bulk action is complete. Repeat for all bulk actions P.S. I added some behat coverage but I did not cover all bulk actions and all buttons with the behat tests because there are a lot of options and also hopefully we will eventually replace all these screens with JS popups
    • WP Sprint 2024-I1.2 (Clones)

      In MDL-79270 (Moodle 4.4) the "Browse list of uses" was converted to the system report. System reports already provide API for bulk actions (added in MDL-74145 in Moodle 4.2). It should be relatively easy to move all existing bulk actions to this report.

      There aren't many actions defined in core currently:

      • Confirm
      • Send a message
      • Delete
      • Display on page (not needed from the user list)
      • Download (see *)
      • Force password change
      • Add to cohort
      • Reset user authentication factors

      ( * ) the "Download" bulk action is a little strange. I don't think it is needed from the "Browse list of users" page but for some reason the downloading of the user list is not enabled. Created MDL-80560 about enabling download on the whole user list

      There is a callback 'bulk_user_actions' to add more actions that should be converted to hook. We might need to make some improvements to this callback/hook to allow the dynamic actions (modal forms/JS confirmation windows) instead of always redirecting to the new page. I created MDL-80566 for it

      It is time to make user management in Moodle more modern.

            marina Marina Glancy
            marina Marina Glancy
            Carlos Castillo Carlos Castillo
            Jun Pataleta Jun Pataleta
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            2 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 days, 3 hours, 45 minutes
                2d 3h 45m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.