ElearningWorld.org

For the online learning world

Moodle

Suspending users in Moodle

So far I didn’t need to make a massive suspension of users, but today, it was the day !

Here are two relevant articles I found in Moodle.docs, always, the first place to look for !

http://docs.moodle.org/en/Upload_users#Deleting_accounts

http://docs.moodle.org/en/Unenrolment#Suspended_or_Unenrolled

To be frank I was expecting to find a separate paragraph about “Suspending Users”, rather than a note and a tip in different paragraphs.

Also, although it’s mentioned that a user can be suspended through his/hers profile, I haven’t seen that option in practice. Instead I have to make a site level search

  • Site administration -> Users -> Accounts -> Browse list of users and "close the eye" of the user or

unenrol the user from course level

  • Course administration -> Users -> Enrolled users and click the x icon next to the user's name.

Anyway, until someone who knows better reviews the articles, the best option for suspending multiple accounts is the cvs file.

Don’t be surprised though that this can be done through the “Upload users” option

  • Site administration -> Users -> Upload users, using a cvs file like the following one:
username,firstname,lastname,email,suspended
kothar.alma,Kothar,Alma,alma@gmail.com,1
prent.sai,Prent,Sai,sai@gmail.com,1

Particularly cool though, is the Upload users results list that appears after the “Upload” (perhaps this button should be renamed to “upload/update”? or “Save changes”?)ย ย with the details of each account’s status.

blank
Latest posts by Anna Krassa (see all)
blank

Anna Krassa

I am an educator specialised in distance education, living and working from Greece. I have been working with HRDNZ for long time, since I completed my Moodle Teacher Certificate in 2007. My key role is to manage Moodle Educator Certificate program for HRDNZ.

6 thoughts on “Suspending users in Moodle

  • Hi
    Is there a way where we can reverse the suspension of bulk users?

    Reply
    • blank ElearningWorld Admin

      If you have used the Upload User method to change their status, you could use the same upload file again, but change their status from Suspended to something else.

  • I would say:
    1. Note this is for Moodle 3.3, so may be different for other version of Moodle
    You should ensure you are looking at the Moodle Docs for the correct version,
    2. Those fields for username, firstname, lastname, email, suspended are standard (haven’t changed and will be the same in all Moodle databases). As the value for suspended is only Yes or No (0 or 1) then it’s unlikely to be that Field that is causing your problem.
    3. The error message โ€œCan not find data record in database.โ€ is clearly referring to the data in the CSV file and Moodle database – e.g. the user you are attempting to update does not exist – or is simply a different value.
    4. Finally, as Anna mentions, you cannot use this method if your users are authenticated externally. e.g. if you are creating users via LDAP, Active Directory, OAuth, or some other system, then the values you try and upload would be overwritten anyway for the external source, and you can only adjust records created directly in Moodle.

    Reply
  • I’ve just tried using your csv upload file template and it doesn’t work ๐Ÿ™ it’s returning the following error message: “Can not find data record in database.” I reckon it’s the suspended column that’s the issue, but don’t know how to solve it

    Reply
  • Sometimes we suspend users because they are essential spam accounts. This would be unlikely to happen in a school Moodle site for example, but some of our sites are very public and international, and user self-registration.

    It’s often better to suspend a bad user, because at least the email address cannot be used again (although most advanced spammers just use multiple accounts). It’s useful to have these accounts in the system, but suspended, as it allows some analysis and looking for patterns ๐Ÿ˜‰

    I’m not sure I would ever use the suspend option via the CSV upload though? It seems this is only really going to be useful when there are many account to suspend ?

    Reply
    • Hi Stuart, I think it depends on the enrollment methods used on a site. The case in the article was from a site where only manual accounts were allowed, i.e. user accounts are controlled by administrators. In a site where multiple ways of enrolment are used, this option doesn’t seem to offer much. ๐Ÿ™‚

Add a reply or comment...