If you delete users, you will no longer have access to their course grades, logs etc. If you are happy with this, then you can use the following to do a bulk delete. eWorks would suggest that you try this with one or two users first, and test before doing all the users in one go.
Once they are deleted you won’t be able to get them back.
If you just want the users deleted so that they will not be included in your Plan, then you can suspend the users, or change their passwords. This means that the users won’t be able to log in.
To find the users who have not accessed the site for over a year:
1. Go to Administration> Site administration> Users> Accounts> Bulk user actions
2. Click on ‘Show more…’ (under the ‘add filter’ button)
3. Find the setting ‘Last access’, and click on the ‘enable’ setting for ‘is before’ (see screen capture)
4. Set the date to one year earlier
5. Click on the ‘Add filter’ button
6. Click on the ‘Add all’ button near the bottom of the page
7. At the bottom of the page, choose ‘Download’ (for ‘With selected users’)
8. Then ‘Go’
9. Click on ‘download in Excel format’ – note: DON’T click on ‘continue’ yet
10. When done, the file will be downloaded to your Downloads folder
If this list looks like the list you want to delete, then you can repeat the process, but at step 7, select ‘Delete’ – and the users will be deleted.
If you want to change their passwords, you can also do that using this method.
Complete steps 1-10 above. Then you can use the spreadsheet (remember to use it in .csv format) to bulk suspend (or delete or change the passwords of) these users.
Go to Administration> Site administration> Users> Accounts> Upload users, to change the status of the users to ‘suspended’. See https://docs.moodle.org/39/en/Upload_users#Deleting_accounts for more information on the column you will need to add.