General plugins (Local): LiveUsers - Local Plugin

local_bbliveusers
Maintained by Picture of BlackBean Technologies Ltd. BlackBean Technologies Ltd.
LiveUsers is a local plugin for the Moodle Platform that monitors the exact number of online users per course in realtime, even if they spend hours watching a single video, for example, without ever refreshing a single page.
13 sites
74 downloads
2 fans

LiveUsers (https://github.com/blackbean/moodle-block_bbliveusers) is a local plugin for the Moodle LMS Platform (https://www.moodle.org) that monitors the exact number of online users per course in realtime, even if they spend hours watching a single video, for example, without ever refreshing a single page.

This plugin was conceived because many of our corporate clients had the exactly same problem with Online Users Block: when a user stays longer than 5 minutes whatching a video, they are not considered as an online user anymore. Course, we could adjust the block's minutes threshold but it gets more and more inacurate as higher we go. This is a very big problem when we have all day live events such as video streams. This plugins helped us to have a very precise idea and also allowed our clients to generate accurated reports.

The LiveUsers plugin is splitted into two distinct but interdependent parts the local_bbliveusers (https://github.com/blackbean/moodle-local_bbliveusers) and block_bbliveusers (https://github.com/blackbean/moodle-block_bbliveusers):

The first one, local_bbliveusers, is the core library and API responsible for processing, storing, reading and exporting the users live data. By default, the core library only stores user data three times per minute (or in twenty seconds increments) this helps us to keep the data consumption under control.

The second, block_bbliveusers, is the user block were you can watch in realtime live users count in a chart and it's context aware so, if you place it within the course context it will only show that course live users, but if you place it within the control painel it will show all live users within all courses. This it's also smart enough to detect the width where it's placed and adjust the number of bars to display.

IT'S ALSO VERY IMPORTANT TO NOTE THAT THIS PLUGIN WILL ONLY TRACK USERS INSIDE COURSES (ITS ACTIVITIES) AND NOT WITHIN OTHER MOODLE PAGES SUCH AS SITE ADMINISTRATION PAGES.

THIS PLUGIN IMPLEMENTS A SEPARATED TIMEOUT PARAMETER THAT CONTROLS HOW LONG THE PLUGIN SHOULD MAKE REGULAR CHECKS TO THE SERVER TO TRACK THE USER, WHAT IN PRACTICE ALSO KEEPS THE USER SESSION ALIVE/ACTIVE. THE USER WILL NOT BE LOGGED OUT AFTER THIS TIME, BUT WILL BE LOGGED OUT AFTER THIS TIME HAS EXPIRED AND ALSO THE SESSIONTIMEOUT VALUE HAS EXPIRED. FOR EXAMPLE, IF YOU HAVE THIS SET TO TWO HOURS, AND THE SESSIONTIMEOUT VALUE SET TO TWO HOURS, THE USER WILL TRACKED DURING THE FIRST TWO HOURS AND BE LOGGED OUT AFTER FOUR HOURS OF INACTIVITY.

Screenshots

Screenshot #0

Contributors

Picture of BlackBean Technologies Ltd.
BlackBean Technologies Ltd. (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of Plugins bot
    Fri, 13 Apr 2018, 3:00 AM
    Approval issue created: CONTRIB-7259
  • Picture of Dan Marsden
    Mon, 23 Apr 2018, 3:14 PM
    Thanks for submitting your plugin for review, the queue is quite long at the moment and it may take some time before a proper review is completed, but a couple of initial comments FYI:
    * It would be better to name your plugin "Live users" rather than "Black bean Live users"
    * More importantly, this plugin appears to keep the users session alive indefinitely which is very bad security practice. OWASP has some comments about this here:
    https://www.owasp.org/index.php/Session_Management_Cheat_Sheet#Session_Expiration

    As a plugin reviewer I would personally reject this plugin on security grounds in it's current form, but you may want to consider improving the way you perform the ping check so that it doesn't result in the session remaining open forever and updating the description of your plugin to describe how your plugin impacts on the security of a site.
  • Picture of Dan Marsden
    Wed, 23 May 2018, 5:06 PM
    Please see CONTRIB-7259 for further feedback on this plugin review - for now we will flag this as requiring more work prior to approval.
  • Picture of BlackBean Technologies Ltd.
    Thu, 26 Jul 2018, 10:49 PM
    Hi Dan, can you have a look at this new version?
    We fixed all the pointed shortcomings.

    Thanks,
    Bruno
  • Picture of BlackBean Technologies Ltd.
    Wed, 12 Sep 2018, 3:49 AM
    Hi Dan,

    Any news regarding this plugin release?

    Best,
    Bruno
  • Picture of Dan Marsden
    Sun, 16 Sep 2018, 3:34 PM
    Hi Bruno,
    I finally got a chance to take another look at this and have posted some feedback on CONTRIB-7259 - thanks!
Please login to post comments