Integration Hub
Versions
Current version
2.0.1 (2026030400)
2.0.1
Plugin type: Local plugins
Frankenstyle component name: local_integrationhub
Version build number: 2026030400
Version release name: 2.0.1
Maturity: Stable
Supported Moodle versions: 4.1, 4.2, 4.3, 4.4, 4.5, 5.0, 5.1
Repository URL (Git): https://github.com/x-name15/moodle-integration-hub/tree/main
Repository branch:
Repository tag: 2.0.1
Issue/bug tracker URL: https://github.com/x-name15/moodle-integration-hub/issues
Changelog
[2.0.1] - 2026-03-04
Fixed
- Dashboard charts not rendering (
index.php):$PAGE->requires->js()for Chart.js was called after$OUTPUT->header(), causing the<head>to be emitted before the script tag was registered. As a resultChartwas always undefined and both canvas elements rendered blank. Fixed by moving the require call to before$OUTPUT->header(). - Incorrect
avg_latencycalculation (index.php): TheAVG(latency_ms)query lacked aLIMIT, so it averaged all historical records instead of the last 50 as intended. Fixed by wrapping the selection in a subquery withORDER BY timecreated DESC LIMIT 50.
[2.0.0] The Post Revision Update - 2026-02-26
Repository
Original Repository Name Changed: Name changed to moodle-local_integrationhub for consistent developer experience
Security
- PARAM_RAW replaced (
index.php):base_urlnow usesPARAM_TEXT,auth_token/amqp_pass/amqp_vhostusePARAM_TEXT. Eliminates XSS/injection surface flagged in Moodle official plugin review (issue #3). - curl_init() removed (
classes/transport/http.php): Replaced direct PHP curl with Moodle's\curlwrapper class. Ensures proxy configuration and SSRF protections set by site admins are fully respected (issue #9).
Fixed
- Hard-coded strings (
webhook.php): All API error messages now useget_string()via the Moodle string API, enabling translation (issue #8). New lang strings added to all 5 locales (en, es, fr, it, pt_br). - N+1 DB queries (
classes/task/queue_manager.php):get_pending_tasks()andpurge_orphan_tasks()now preload rules and services in bulk before iterating, eliminating per-loop DB calls (issue #13). - Vendor validation (
thirdpartylibs.xml,db/environment.xml): Added required Moodle metadata files declaring the php-amqplib third-party dependency and its PHP/AMQP extension requirements (issue #5). - Third-Party Library Documentation (
thirdpartylibs.xml): Documented Chart.js and php-amqplib per Moodle licensing requirements (issue #11). - Missing lang string (
db/caches.php): Addedcachedef_event_dedupestring to all 5 locale files (en, es, fr, it, pt_br), satisfying the Moodle plugin checker requirement for cache definitions (issue #15). - Privacy Provider (
classes/privacy/provider.php): Migrated fromnull_providertometadata\provider, implementingadd_external_location_link()to declare that event payloads may be forwarded to administrator-configured external services. Newprivacy:metadata:external_servicesstrings added to all 5 locales (issue #6).
Added
- Mustache templates (
templates/dashboard_tabs.mustache,templates/dashboard_charts.mustache): New template directory with two Mustache templates for the dashboard navigation tabs and chart card containers (issue #7).
Changed
- External Services Migration: Migrated legacy
ajax.phppayload preview to Moodle's External Services API (classes/external/preview_payload.php) with proper capability checks and session validation. Deprecated the old endpoint (issue #12). - UI:
response_queuefield now correctly hidden when service type is AMQP (JavaScripttoggleUi()updated). - AMQP URL:
base_urlparam changed fromPARAM_URLtoPARAM_TEXTto supportamqp://andamqps://schemes. - Output API (
index.php): Navigation tabs and chart containers migrated from rawhtml_writercalls to$OUTPUT->render_from_template()(issue #7). - AMD modules (
amd/src/dashboard.js,queue.js,rules.js): Added mandatory Moodle GPL license header and@module/@copyright/@licenseJSDoc boilerplate to all AMD source files (issue #10). - Inline JavaScript removed (
index.php): Eliminated all rawecho '<script>'blocks. Chart.js loaded via$PAGE->requires->js(); type-toggle and AMQP UI logic consolidated in thelocal_integrationhub/dashboardAMD module (issue #14).
2.0.0 (2026022700)
2.0.0
Plugin type: Local plugins
Frankenstyle component name: local_integrationhub
Version build number: 2026022700
Version release name: 2.0.0
Maturity: Stable
Supported Moodle versions: 4.1, 4.2, 4.3, 4.4, 4.5, 5.0, 5.1
Repository URL (Git): https://github.com/x-name15/moodle-integration-hub/tree/main
Repository branch:
Repository tag: 2.0.0
Issue/bug tracker URL: https://github.com/x-name15/moodle-integration-hub/issues
Changelog
[2.0.0] The Post Revision Update - 2026-02-26
Repository
- Original Repository Name Changed: Name changed to moodle-local_integrationhub for consistent developer experience
- README.md: Added Disclaimer and fair use of the Moodle trademark
Security
- PARAM_RAW replaced (
index.php):base_urlnow usesPARAM_TEXT,auth_token/amqp_pass/amqp_vhostusePARAM_TEXT. Eliminates XSS/injection surface flagged in Moodle official plugin review (issue #3). - curl_init() removed (
classes/transport/http.php): Replaced direct PHP curl with Moodle's\curlwrapper class. Ensures proxy configuration and SSRF protections set by site admins are fully respected (issue #9).
Fixed
- Hard-coded strings (
webhook.php): All API error messages now useget_string()via the Moodle string API, enabling translation (issue #8). New lang strings added to all 5 locales (en, es, fr, it, pt_br). - N+1 DB queries (
classes/task/queue_manager.php):get_pending_tasks()andpurge_orphan_tasks()now preload rules and services in bulk before iterating, eliminating per-loop DB calls (issue #13). - Vendor validation (
thirdpartylibs.xml,db/environment.xml): Added required Moodle metadata files declaring the php-amqplib third-party dependency and its PHP/AMQP extension requirements (issue #5). - Third-Party Library Documentation (
thirdpartylibs.xml): Documented Chart.js and php-amqplib per Moodle licensing requirements (issue #11). - Missing lang string (
db/caches.php): Addedcachedef_event_dedupestring to all 5 locale files (en, es, fr, it, pt_br), satisfying the Moodle plugin checker requirement for cache definitions (issue #15). - Privacy Provider (
classes/privacy/provider.php): Migrated fromnull_providertometadata\provider, implementingadd_external_location_link()to declare that event payloads may be forwarded to administrator-configured external services. Newprivacy:metadata:external_servicesstrings added to all 5 locales (issue #6).
Added
- Mustache templates (
templates/dashboard_tabs.mustache,templates/dashboard_charts.mustache): New template directory with two Mustache templates for the dashboard navigation tabs and chart card containers (issue #7).
Changed
- External Services Migration: Migrated legacy
ajax.phppayload preview to Moodle's External Services API (classes/external/preview_payload.php) with proper capability checks and session validation. Deprecated the old endpoint (issue #12). - UI:
response_queuefield now correctly hidden when service type is AMQP (JavaScripttoggleUi()updated). - AMQP URL:
base_urlparam changed fromPARAM_URLtoPARAM_TEXTto supportamqp://andamqps://schemes. - Output API (
index.php): Navigation tabs and chart containers migrated from rawhtml_writercalls to$OUTPUT->render_from_template()(issue #7). - AMD modules (
amd/src/dashboard.js,queue.js,rules.js): Added mandatory Moodle GPL license header and@module/@copyright/@licenseJSDoc boilerplate to all AMD source files (issue #10). - Inline JavaScript removed (
index.php): Eliminated all rawecho '<script>'blocks. Chart.js loaded via$PAGE->requires->js(); type-toggle and AMQP UI logic consolidated in thelocal_integrationhub/dashboardAMD module (issue #14).
2.0.0 (2026022600)
2.0.0
Plugin type: Local plugins
Frankenstyle component name: local_integrationhub
Version build number: 2026022600
Version release name: 2.0.0
Maturity: Stable
Supported Moodle versions: 4.1, 4.2, 4.3, 4.4, 4.5, 5.0, 5.1
Repository URL (Git): https://github.com/x-name15/moodle-integration-hub/tree/main
Repository branch:
Repository tag: 2.0.0
Issue/bug tracker URL: https://github.com/x-name15/moodle-integration-hub/issues
Changelog
[2.0.0] The Post Revision Update - 2026-02-26
Repository
Original Repository Name Changed: Name changed to moodle-local_integrationhub for consistent developer experience
Security
- PARAM_RAW replaced (
index.php):base_urlnow usesPARAM_TEXT,auth_token/amqp_pass/amqp_vhostusePARAM_TEXT. Eliminates XSS/injection surface flagged in Moodle official plugin review (issue #3). - curl_init() removed (
classes/transport/http.php): Replaced direct PHP curl with Moodle's\curlwrapper class. Ensures proxy configuration and SSRF protections set by site admins are fully respected (issue #9).
Fixed
- Hard-coded strings (
webhook.php): All API error messages now useget_string()via the Moodle string API, enabling translation (issue #8). New lang strings added to all 5 locales (en, es, fr, it, pt_br). - N+1 DB queries (
classes/task/queue_manager.php):get_pending_tasks()andpurge_orphan_tasks()now preload rules and services in bulk before iterating, eliminating per-loop DB calls (issue #13). - Vendor validation (
thirdpartylibs.xml,db/environment.xml): Added required Moodle metadata files declaring the php-amqplib third-party dependency and its PHP/AMQP extension requirements (issue #5). - Third-Party Library Documentation (
thirdpartylibs.xml): Documented Chart.js and php-amqplib per Moodle licensing requirements (issue #11). - Missing lang string (
db/caches.php): Addedcachedef_event_dedupestring to all 5 locale files (en, es, fr, it, pt_br), satisfying the Moodle plugin checker requirement for cache definitions (issue #15). - Privacy Provider (
classes/privacy/provider.php): Migrated fromnull_providertometadata\provider, implementingadd_external_location_link()to declare that event payloads may be forwarded to administrator-configured external services. Newprivacy:metadata:external_servicesstrings added to all 5 locales (issue #6).
Added
- Mustache templates (
templates/dashboard_tabs.mustache,templates/dashboard_charts.mustache): New template directory with two Mustache templates for the dashboard navigation tabs and chart card containers (issue #7).
Changed
- External Services Migration: Migrated legacy
ajax.phppayload preview to Moodle's External Services API (classes/external/preview_payload.php) with proper capability checks and session validation. Deprecated the old endpoint (issue #12). - UI:
response_queuefield now correctly hidden when service type is AMQP (JavaScripttoggleUi()updated). - AMQP URL:
base_urlparam changed fromPARAM_URLtoPARAM_TEXTto supportamqp://andamqps://schemes. - Output API (
index.php): Navigation tabs and chart containers migrated from rawhtml_writercalls to$OUTPUT->render_from_template()(issue #7). - AMD modules (
amd/src/dashboard.js,queue.js,rules.js): Added mandatory Moodle GPL license header and@module/@copyright/@licenseJSDoc boilerplate to all AMD source files (issue #10). - Inline JavaScript removed (
index.php): Eliminated all rawecho '<script>'blocks. Chart.js loaded via$PAGE->requires->js(); type-toggle and AMQP UI logic consolidated in thelocal_integrationhub/dashboardAMD module (issue #14).
1.1.5 (2026022300)
1.1.5
Plugin type: Local plugins
Frankenstyle component name: local_integrationhub
Version build number: 2026022300
Version release name: 1.1.5
Maturity: Stable
Supported Moodle versions: 4.1, 4.2, 4.3, 4.4, 4.5, 5.0, 5.1
Repository URL (Git): https://github.com/x-name15/moodle-integration-hub/tree/main
Repository branch: https://github.com/x-name15/moodle-integration-hub/tree/main
Repository tag: 1.1.5
Issue/bug tracker URL: https://github.com/x-name15/moodle-integration-hub/issues
Changelog
[1.1.5] - 2026-02-23
Changed
- Total Code Refactor: Renamed internal variables to camelCase (e.g.,
$svc_idto$svcid) across the entire codebase to comply with Moodle's strict naming conventions. - Improved code legibility by breaking down complex HTML rendering logic into scannable blocks in
queue.phpandevents.php.
Fixed
- Zero-Warning Policy: Resolved all remaining 80+ PHP CodeSniffer (moodle-cs) style errors and warnings.
- Fixed line length violations (>132 characters) in all UI-facing scripts.
- Standardized inline comment punctuation and capitalization to meet Moodle's "Grammar Police" requirements.
- Cleaned up
db/upgrade.phpanddb/caches.phpby removing redundant checks and fixing formatting. - Verified that the logic remains 100% intact after the refactor using
cli/test_logic.php.
1.1.1 (2026022100)
1.1.1
Plugin type: Local plugins
Frankenstyle component name: local_integrationhub
Version build number: 2026022100
Version release name: 1.1.1
Maturity: Stable
Supported Moodle versions: 4.1, 4.2, 4.3, 4.4, 4.5, 5.0, 5.1
Repository URL (Git): https://github.com/x-name15/moodle-integration-hub/tree/main
Repository branch:
Repository tag:
Issue/bug tracker URL: https://github.com/x-name15/moodle-integration-hub/issues
Changelog
[1.1.1] - 2026-02-21
Added
- CLI diagnostic script
cli/test_logic.phpto verify core registry, HTTP transport, and routing logic without UI dependencies.
Changed
- JavaScript files in
amd/srcadjusted to use modern formatting and consistent arrow functions to meet Moodle ESLint standards. - CI pipeline workflow (
.github/workflows/ci.yml) updated to successfully handle PHPCS errors, preventing critical CI breakages over style issues.
Fixed
- Over 80 PHP CodeSniffer (moodle-cs) style errors across the plugin, including brace placement, indentation, line lengths, spacing, and PHPMD wrapper tags.
- Restored original plugin business logic safely after automated syntax fixing.
1.1.0 (2026022000)
1.1.0
Plugin type: Local plugins
Frankenstyle component name: local_integrationhub
Version build number: 2026022000
Version release name: 1.1.0
Maturity: Stable
Supported Moodle versions: 4.5, 5.0
Repository URL (Git): https://github.com/x-name15/moodle-integration-hub/tree/main
Repository branch: https://github.com/x-name15/moodle-integration-hub/tree/main
Repository tag: 1.1.0
Issue/bug tracker URL: https://github.com/x-name15/moodle-integration-hub/issues
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.
[1.1.0] - 2026-02-20
Added
- Implemented Moodle Privacy API (
\core_privacy\local\metadata\provider) to certify that the plugin acts as a gateway and only logs technical request metadata. - Italian (
it) translations. - French (
fr) translations. - Portuguese (Brazil) (
pt_br) translations.
1.0.0 (2026021815)
1.0.0
Plugin type: Local plugins
Frankenstyle component name: local_integrationhub
Version build number: 2026021815
Version release name: 1.0.0
Maturity: Alpha
Supported Moodle versions: 4.5
Repository URL (Git):
Repository branch:
Repository tag:
Issue/bug tracker URL: https://github.com/x-name15/moodle-integration-hub/issues
Moodle Integration Hub
A centralized integration layer for Moodle — connect any Moodle event to any external service without writing boilerplate code.
Overview
Moodle Integration Hub (MIH) is a local plugin that acts as a centralized gateway for integrations. It handles HTTP logic, authentication, retries, and error logging, allowing you to configured everything from a dashboard.
Key Features:
- Service Gateway: Reusable API for plugins.
- Event Bridge: Map Moodle events to external webhooks without code.
- Resilience: Circuit breakers, exponential backoff retries, and Dead Letter Queue (DLQ).
- Monitoring: Real-time dashboard for success rates and latency.
- Transports: REST, AMQP (RabbitMQ), SOAP.
📚 Documentation
[!IMPORTANT]
All project specifications, architecture diagrams, and API references are hosted at:
- mih.mrjacket.dev
| Language | Status | Link |
| :--- | :--- | :--- |
| English 🇬🇧 | | Read here |
| Español 🇪🇸 | | Leer aquí |
Quick Start
Installation
# 1. Install plugin
cp -r integrationhub /path/to/moodle/local/
# 2. Install dependencies (optional, for AMQP)
cd /path/to/moodle/local/integrationhub && composer install
# 3. Upgrade Moodle
php admin/cli/upgrade.php
License: GPL v3
Made with "️ by Mr Jacket