Admin tools: User Suspension

tool_usersuspension
Maintained by Picture of Sebsoft PluginsSebsoft Plugins, Picture of Rogier van DongenRogier van Dongen
The Sebsoft User Suspension Plugin offers you the possibility to automate the process of suspending users and/or removing user accounts (using moodle's default methods to delete users).
269 sites
163 downloads
32 fans
Current versions available: 4

The Sebsoft User Suspension Plugin offers you the possibility to automate the process of suspending users and/or removing user accounts (using moodle's default methods to delete users).

Suspending users is provided in three different ways:

  • Using a folder
  • Using a file upload
  • Manually through a status table

Deleting users is, if configured to be enabled, provided by comparing the date of suspending to the configured period before removal. Once the configured interval has past and the user is deemed suspended for the configured period, the useraccount will be removed using moodle's standard methods.

Furthermore, there's extensive settings that can be configured to turn every feature on or off, as well as disabling the whole tool's features.

This tool also provides a way of excluding users to be suspended or processed in case of automated processing. There are two methods provided at the moment: single user exclusion and cohort exclusion. During all three different ways of automated suspending / deleting users, only users that have NOT been configured to be excluded, either by cohort or by single user, will be processed.

Important note

Site administrators and the default guest account are completely left out of this tool. For safety measures, it is not recommended to put any form of automation on suspending or deleting administrator accounts or the default guest account, hence the decision to exclude them in any processing.

Screenshots

Screenshot #0
Screenshot #1
Screenshot #2
Screenshot #3
Screenshot #4
Screenshot #5
Screenshot #6
Screenshot #7
Screenshot #8

Contributors

Picture of Sebsoft Plugins
Sebsoft Plugins (Lead maintainer)
Picture of Rogier van Dongen
Rogier van Dongen: Project leader
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of Jonathan G
    Thu, May 4, 2017, 11:31 PM
    The icons do not load on v3.2
    Is this something you are still maintaining?
    Thank you.
  • Picture of Rogier van Dongen
    Fri, May 5, 2017, 8:54 PM
    Hallo Jonathan,

    COuld you point me in the direction which icons you mean? I validated/verified a fresh installation on a Moodle 3.2 environment and can tell you at least the icons on the main tabs are in fact loaded.
    If this isn't that case for you, could you try clearing the caches and verify all icon files are present? There should be 20 items in the /admin/tool/usersuspension/pix folder in total.
    I know this may be a long shot, but otherwise I can't find anything to reproduce your problem.
    Cheers,
    Rogier
  • Picture of Rogier van Dongen
    Thu, May 11, 2017, 10:55 PM
    New version is here!

    No real changes, just a few modifications to comply to Moodle Coding Standards.
    Minimum required Moodle version: 3.0

    Cheers!
  • Picture of Travis Mitchell
    Fri, Aug 11, 2017, 1:45 AM
    FYI - In settings.php on lines 36 & 38 pix_url needs to be changed to image_url. pix_url is deprecated and now uses image_url for images and pix_icon for icons.
  • Picture of Rogier van Dongen
    Mon, Nov 6, 2017, 8:18 PM
    New version!
    deprecated pix_url is now replaced by image_url()
    Minimum required Moodle version: 3.3

    Cheers
  • Picture of António Correia
    Sat, Sep 15, 2018, 12:10 AM
    I need to change the text of the suspended e-mail message. Is there any way to do this?
  • Picture of Greg Rudl
    Fri, Jan 10, 2020, 4:31 AM
    How do you change the email wording?
  • Logo Sebsoft
    Mon, Jan 13, 2020, 4:26 AM
    Hi António & Greg,
    To make changes to the mail the plugin sends out, please edit the language translation.
    When you open up your language pack, locate the file tool_usersuspention.php in the correct language. The relevant translations starts with 'email:user:'.

    Kind regards,
    Sebastian
  • Picture of Asko Pesola
    Mon, Apr 27, 2020, 5:09 AM
    This plugin does what it promises, it suspends users.

    However there is couple places where it's not working. First, I don't see any logs. When I go to "Logs" tab it gives me error message
    Exception - Argument 4 passed to table_sql::set_sql() must be of the type array, null given, called in [dirroot]/admin/tool/usersuspension/classes/logtable.php on line 124
    Another thing where this plugin fails is to order users by timedetect or by suspendin in the "Users to suspend" tab. I wonder if this is happening because I have over 500 users in that list, so this plugin cannot order that many users. However list can be ordered by name or username without any problem.
    I am using Moodle 3.8 and latest release of the plugin.
  • Picture of Rogier van Dongen
    Mon, May 4, 2020, 6:12 PM
    Dear Asko,
    I've addressed the issues and changed the queries so that you should also be able to sort correctly.
    Please be aware another change was made so users "to be suspended/deleted" will also show for those that should have been suspended/deleted already (Many negative values would be an indication your cron might not run corrcetly).
    Cheers, R
  • Picture of Godfrey Joel Alvarado
    Sat, May 9, 2020, 5:25 AM
    Hi everyone, what a nice plugin. I have two questions:

    1. I set the dir where the plugin will search the .csv file so it automatically supend the users inside that file, but nothing is happening. I set an interval of 5 min but is not working. Am I doing someting wrong?
    2. Is there an option to do the same thing, but in a reverse way using this plugin? Upload a .csv file and then un-suspend or activate the users inside that file?
    I am using Moodle 3.8
  • Picture of Asko Pesola
    Tue, Jun 2, 2020, 5:39 AM
    Dear Rogier,
    Thank you for the update! Logs are now working as expected. However ordering users by "suspendin" is still not working. For some reason in this new update "suspendin" time is shown twice for every user, and when trying to order by that column, there is no change on the user order whatsoever. This must happen because I have 900 users on that section. If I try to order by similar "deletein" column where I have only 100 users, it works without any problems.
  • Picture of Rogier van Dongen
    Thu, Jun 4, 2020, 5:44 PM
    @Asko: will be resolved in the new version.

    @Godfrey: one first thing that comes to mind is what the delimiter of your CSV file is. It should be a semi-colon (;), although I might choose to make this configurable in a future release.
    UN-suspending users from CSV is actually not a bad idea at all. Might also implement this in a next version.
  • Picture of Martin Božič
    Tue, Sep 1, 2020, 7:17 PM
    Hi, the source repository and bug tracker is no longer active: "Bitbucket no longer supports Mercurial repositories".
  • Picture of Rogier van Dongen
    Tue, Sep 1, 2020, 7:35 PM
    Hi Martin,
    Thanks for the message and your correct (this is the case for all of our plugins at the moment). We've been in the process of migrating to gitlab/github, which was succesful.
    However, we don't have a decent pipeline to the public repositories on github yet.
    I'll have to ask about the status and will update to the correct repositories asap.
1 2
Please login to post comments