How to Bulk Suspend Users

Summary of steps

Below is a series of steps you can follow to suspend a user or users in bulk from your Moodle site

Step 1 - Getting a list of your users

  1. Login to your moodle platform with an administrator account.
  2. Go to the Settings Administration > Site administration > Users > Bulk user actions .
  3. In the Bulk user actions menu, scroll down to the section called users in list.
    1. Users on your site appear in the left column
    2. Selected users appear in the right column
  4. Select all the users you would like to suspend from the left column and select the button ‘Add to selection’

  1. Once your list is complete scroll down to the ‘With selected users…’ section. In the dropdown panel, select the option ‘Download’
  2. In the Download section, in the field called ‘Export users as’ select the option ‘Comma separated values (.csv)’
  3. Your new spreadsheet will be downloaded, ready for Step 2

Step 2 - Preparing the Suspend Users file

  1. Open google sheets, or a similar spreadsheet editing tool such as Excel.
  2. Upload the newly created spreadsheet from Step 1
    1. Your new spreadsheet will load with all the profile fields associated with each user, each field having its own column in the spreadsheet
    2. The name for each user will appear under the username column
    3. You can ignore the majority of these columns for the purpose of this helpsheet
  3. Find the column with the title, ‘Suspended’
    1. The title will show in the top row of the spreadsheet
    2. If there is no column titled suspended, add a new column to the spreadsheet named ‘suspended’
  4. In the suspended column, ensure that each users row has the number 1 in its field.

Your spreadsheet look like this, the additional profile fields have been hidden from this example

  1. Save your new spreadsheet
  2. Download a copy of the spreadsheet in the ‘Comma separated values (.csv)’ format, this will be used in the final step, Step 3.

Step 3 - Uploading the Suspend Users file

  1. Return to the Moodle platform and visit the upload users section by going to Settings Administration > Site administration > Users > Upload users
  2. Upload the newly created CSV file from Step 2 into the file section by selecting Choose a file.. > Upload a file > Select your file from your file manager
  3. Select the button ‘Upload users’
  4. Under settings ensure the fields are filled in like so
    1. Upload type: Add new and update existing users
    2. Existing user details: Override with file
    3. Allow suspending and activating of accounts: Yes

  1. Select Upload users, afterward you will be directed to a summary page
  2. Congratulations, you have suspended these users

Reversing the suspension

To reverse the user's suspension, repeat Steps 1-3. 

By keeping the suspend users field as a 1 this will toggle the user from being suspended, back to being active.

You could use the same suspend users file produced in the first Step 2, but any changes to the users profile since suspending the user will be overwritten so this is not recommended unless you are certain there has been no changes.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us