← Back to archive

Real time events

tool_realtime
camp Tier 2 · VerifiedMDL Shield reviewed
Actively maintained · updated 11 d ago
Fully free

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.

verified and archived by the registry · newer than the source platform's last reported tag

Download and compatibility

2.1.2 Moodle 4.5 – 5.3
Verified against source
verification ledger

Source tagged by maintainer

github.com/marinaglancy/moodle-tool_realtime @ v2.1.2 · commit 63bc42ec67ce

Rebuilt deterministically from that tag

canonical ZIP, byte-identical on every rebuild

Artifact hash recorded in the public index

sha256 10edf4b7c7ec6c86728c09a6df3551545d2cb0e70f30eafa33e6834e3e21baa9

Release signed · trusted publishing

planned — TUF signing (RFC §4.3)

Recorded in public transparency log

planned — Sigstore/Rekor (RFC §4.3)

Every step is independently verifiable. CAMP never modifies plugin code; it proves the ZIP you install is exactly what the maintainer published. Verified 02 Oct 2026.
Code check ?: 135 errors · 1 warnings
phplintphpcs135 | 1files1amd buildrebuilt OpeningFunctionBraceKernighanRitchie×30ValidVariableName×24DisallowLongArraySyntax×23ValidFunctionName×16
MDL Shield A reviewed 2026-10-02
composer require marinaglancy/moodle-tool_realtime
First time? One-time Composer setup, or download the ZIP and install it through Moodle.

About

Real time events is a framework for real-time communication between the server and the browser in Moodle plugins. Other plugins build on it, for example Kahoodle, a real-time quiz game.

  • Server to browser: any PHP process, such as another user's request or a scheduled task, calls $channel->notify(). Every page subscribed to the channel receives the event in JavaScript through core/pubsub, without a page reload.
  • Browser to server: JavaScript sends data with sendToServer(), and the request is passed to the PLUGINNAME_realtime_event_received() callback of your plugin.
  • Secure channels: subscription is only possible from PHP. The page receives a channel hash that authenticates the polling or websocket requests, so users cannot guess the channels of other contexts.

Backends

The communication method is provided by backend subplugins:

  • PHP polling works on any Moodle site without additional software, with long or short polling.
  • Centrifugo delivers events over WebSockets through Centrifugo, an open-source real-time messaging server that you run yourself. Its settings can be imported from a Railway template deployment or from the Centrifugo server configuration.

A test page measures the event latency and round-trip time with the enabled backend. See the README for the full API.

Project

Maintainer
1 release in the archive
Plugin typeAdmin tools
LinksDocumentation · Changelog
declared by the maintainer
DevelopmentOn GitHub: 7 stars · 8 forks · 7 open issues & PRs · Tested with moodle-plugin-ci
Upstream tagv2.1.2 · 02 Oct 2026
verified and archived by the registry · newer than the source platform's last reported tag
Security advisoriesNone published
Security review
MDL Shield A 2.1.2 · 2026-10-02
MDL Shield A 2.1.1 · 2026-04-17 · not in the archive
published reviews of the moodle.org distribution · fetched by the registry from mdlshield.com · more at mdlshield.com