Behavior Analytics

Local plugins ::: local_behavioranalytics
Maintained by Christopher Reimann
Detects unusual or risky user behaviour in Moodle — such as failed logins, impossible travel, unusual login hours, or rapid activity bursts — and triggers automated mitigation actions (e.g. suspend account, kill sessions, notify admins).

Behavior Analytics 1.0.0

Moodle 5.0, 5.1
Released: Monday, 10 November 2025, 7:59 PM

📰 Release Notes (v1.0.0)

Initial stable release of Behaviour Analytics for Moodle.

This version includes:

  • Four behaviour detectors:

    • Failed logins – detects consecutive failed login attempts (possible brute-force).
    • Activity burst – flags excessive actions within short time windows.
    • Unusual login time – identifies users active during atypical hours.
    • IP velocity – detects impossible travel between login IPs.
  • ⚙️ Configurable scoring system Combine detectors using weighted mean, maximum risk, or cumulative capped sum.

  • 🚨 Automatic mitigation actions

    • Suspend user
    • Kill all active sessions
    • Inform administrators (with duplicate-notification prevention)
  • 📊 Administrator reports

    • Global overview of user risk scores
    • Detailed per-user breakdown of detector findings
  • 🔒 Privacy-compliant design

    • Uses Moodle’s privacy API
    • Excludes guest and webservice accounts
    • Stores only aggregated risk profiles (no raw logs)
  • 🧪 Comprehensive test suite Full PHPUnit coverage for detectors, scoring, registry, and actions.

Version information

Version build number
2025111000
Version release name
1.0.0
Maturity
Stable version
MD5 Sum
6adcbc4b8466c2f2def6f98c2aca6378
Supported software
Moodle 5.0, Moodle 5.1
  • Latest release for Moodle 5.0
  • Latest release for Moodle 5.1

Version control information

Version control system (VCS)
GIT
VCS repository URL
VCS branch
main

Default installation instructions for plugins of the type Local plugins

  1. Make sure you have all the required versions.
  2. Download and unpack the module.
  3. Place the folder in the "local" subdirectory.
  4. Visit http://yoursite.com/admin to finish the installation.