Real time events icon

Real time events

Maintained by Marina Glancy
Add real-time server-to-browser communication to your plugins via WebSockets or polling. Send notifications from PHP, receive events in JavaScript — no page reloads needed.
Price option: Free

Supports Moodle 4.5-5.2 See all versions
Latest release: 4 months ago
Installations: 159
Downloads (last 90 days): 180

Frankenstyle name: tool_realtime
Administration tools

Description

MDL Shield

Real time events provides a framework for real-time communication between the server and the browser in Moodle plugins. It supports both server-to-client notifications and client-to-server messaging.

For example, when a teacher updates course content or starts a live quiz, all connected students instantly see the changes without refreshing the page, making the learning experience more interactive and engaging.

Features

  • Secure channel-based communication with hash authentication
  • Bidirectional messaging (server'client and client'server)
  • Guest user support (configurable)
  • Built-in test page for diagnostics and latency measurement
  • Pluggable backend architecture - ship your own or use the included PHP polling and Centrifugo backends

Backend plugins

Communication is handled by pluggable backends:

  • PHP polling (included) - works out of the box with no external dependencies. Events are stored in the database and delivered via long polling (configurable). No setup required.
  • Centrifugo (included) - uses the Centrifugo WebSocket server for low-latency, scalable real-time delivery. Includes an easy-to-deploy template.

For plugin developers

Adding real-time features to your plugin requires just a few lines of code. See the README for full documentation and code examples.

Tracker

This plugin was suggested and discussed in https://moodle.atlassian.net/browse/MDL-65795

Contributors

Awards

Privacy friendly
Automated testing support
Early bird 5.2