A Moodle local plugin that provides a task-based admin dashboard for LMS Light sites, replacing the native Site Administration tree as the primary entry point for Org Admins.
Plugin type: Local
Component: local_lmslight_admin
Requires: Moodle 5.1+
PHP: 8.1+
Databases: PostgreSQL, MariaDB, MySQL
License: GPL v3+
The Admin Hub organises site administration into domain cards — logical groupings of admin pages that map to how nonprofit, association, and trade group administrators actually think about their LMS.
Each card contains deep-links to the relevant Moodle and MuTMS admin pages. Cards are filtered by user role and subscription level so Org Admins only see what they can access.
| # | Domain | Description |
|---|---|---|
| 1 | Organization setup | Branding, identity, tenants |
| 2 | People & structure | Users, teams, roles, authentication |
| 3 | Catalog & content | Courses, programs, content bank |
| 4 | Credentials & compliance | Certifications, training credits, badges |
| 5 | Enrollment & access | Enrolment methods, cohort sync, self-enrol |
| 6 | Reports & insights | Completion, program, certification, and activity reports |
| 7 | System & security | Notifications, privacy, plugins, platform config |
local_lmslightmust be installed. The hub delegates all access control decisions (platform user detection, subscription level, admin tree pruning) to shared helper functions inlocal_lmslight/lib.php.
- Copy or clone this plugin into
local/lmslight_adminwithin your Moodle installation. - Log in as a site administrator and visit Site Administration > Notifications to run the database upgrade.
- Assign the
local/lmslight_admin:viewcapability to roles that should see the hub (themanagerarchetype has it by default). - Assign
local/lmslight_admin:manageto roles that should manage the hub layout (Platform staff only — enforced by email domain check).
| Capability | Purpose | Default |
|---|---|---|
local/lmslight_admin:view |
View the hub dashboard | Manager archetype |
local/lmslight_admin:viewplatform |
View platform-only cards | None |
local/lmslight_admin:manage |
Manage hub layout (CRUD) | None |
The manage capability additionally requires the user to be an @lmslight.io
platform staff member (enforced by local_lmslight_is_platform_user()).
The hub filters cards and items based on three factors, all provided by
local_lmslight:
- Platform vs Org Admin — determined by
@lmslight.ioemail domain. Platform staff see all items. Org Admins do not seescope: Platformitems. - Admin tree pruning — items whose
pruned_keymatches a key inlocal_lmslight_get_pruned_keys()are hidden from Org Admins. - Subscription level —
local_lmslight_get_subscription_level()determines which pruned keys are active (e.g., SSO auth pages are pruned at level < 1).
A 9-dot grid icon is injected into the primary navigation bar (after the
"Site administration" link) for all users with the view capability. It links
directly to the hub dashboard.
Platform staff with the manage capability see a Manage layout button on
the hub dashboard. The manage page supports:
- Reorder domain cards and items within cards (drag and drop)
- Rename domain titles and item labels (inline editing)
- Edit paths — change the URL an item links to
- Hide/show individual items (eye toggle)
- Add new domains and items
- Delete domains and items
Changes are saved via AJAX and take effect immediately.
The manage page includes Export and Import buttons for maintaining the hub layout across environments:
- Export downloads the current layout as a JSON file. This file is compatible
with the seed format (
docs/nav_inventory.json) and can be committed to the plugin repository as the default layout for new installs. - Import uploads a JSON file and replaces all existing domains and items. Useful for loading a layout configured on a pristine reference site.
Workflow for updating the seed file:
- Configure the hub on a clean reference site using the manage page.
- Click Export to download the JSON.
- Replace
docs/nav_inventory.jsonwith the exported file. - Commit and deploy — new installs will use the updated layout.
Existing installs are not affected by seed file changes. Use Import to update a running site.
| Table | Purpose |
|---|---|
local_llad_domains |
Domain cards — key, label, description, icon, sort order |
local_llad_items |
Items within domains — label, path, scope, plugin, pruned_key, sort order, hidden |
On fresh install, both tables are seeded from docs/nav_inventory.json.
local/lmslight_admin/
├── index.php # Hub dashboard
├── manage.php # Layout management (Platform only)
├── export.php # Export layout as JSON
├── import.php # Import layout from JSON
├── version.php
├── styles.css
├── classes/
│ ├── external/ # AJAX web service endpoints
│ │ ├── save_layout.php # Bulk save (labels, order, paths, hidden)
│ │ ├── add_domain.php
│ │ ├── delete_domain.php
│ │ ├── add_item.php
│ │ └── delete_item.php
│ ├── form/
│ │ └── import_form.php # Moodle form for JSON file upload
│ ├── hook/output/
│ │ └── before_standard_head_html_generation.php # Navbar icon
│ ├── navigation/
│ │ ├── inventory.php # Loads and filters domains/items from DB
│ │ └── seeder.php # Seeds DB from nav_inventory.json
│ └── output/
│ ├── hub_page.php # Hub dashboard renderable
│ ├── domain_card.php # Domain card renderable
│ └── manage_page.php # Manage page renderable
├── db/
│ ├── access.php # Capability definitions
│ ├── hooks.php # Hook callback registrations
│ ├── install.xml # Table schemas
│ ├── services.php # External service definitions
│ └── upgrade.php # Database migration steps
├── lang/en/
│ └── local_lmslight_admin.php
├── templates/
│ ├── hub_page.mustache
│ ├── domain_card.mustache
│ └── manage_page.mustache
├── amd/
│ ├── src/
│ │ ├── manage.js # Drag-and-drop, CRUD, save logic
│ │ └── nav_icon.js # Navbar icon injection
│ └── build/
│ ├── manage.min.js
│ └── nav_icon.min.js
└── docs/
└── nav_inventory.json # Seed data for fresh installs
Several hub items link to MuTMS plugin admin pages. These items are included in the default seed data but will only function when the corresponding plugin is installed:
tool_mutenancy— Tenant managementtool_muprog/enrol_muprog— Programstool_mucertify— Certificationstool_mutrain— Training creditstool_murelation— Supervisors & teamstool_musudo— Privileged sessionstool_muhome— Custom home pagestool_mupwned— Compromised password checks
Items linking to uninstalled plugins will display but return 404s. Remove or hide them via the manage page if the plugin is not deployed.
From the Moodle root directory:
npx grunt amd --root=local/lmslight_admin- Moodle coding style: https://moodledev.io/general/development/policies/codingstyle
- All markup in Mustache templates — no HTML in PHP
- All JS in AMD modules — no inline
<script>blocks - All strings in
lang/en/local_lmslight_admin.php - Valid Moodle risk constants:
RISK_SPAM,RISK_PERSONAL,RISK_XSS,RISK_CONFIG,RISK_DATALOSS,RISK_MANAGETRUST(never prefix withCAP_)
This plugin is licensed under the GNU General Public License v3 or later. See LICENSE for details.
Copyright 2026 LMS Light