Repository navigation
Releases
v2.7.0
Two additions to the dashboard. Both are on by default.
- Developer debugging switch. Next to "Purge ALL site caches" there is now a button that switches developer debugging on (
debug= DEBUG_DEVELOPER, messages shown on screen) or off again. Like the full cache purge, it requiresmoodle/site:config. Every change is recorded in the config change log. Ifconfig.phpfixes the debugging settings, the dashboard shows that instead of the button. Switching off sets debugging to "none", which also replaces a lower level such as DEBUG_NORMAL. - New health signal: "Courses without students or teachers". It lists visible courses in which nobody holds a student role, or nobody holds a teacher role, through an active enrolment. The detail page shows which group is missing and links to each course's participants page. Which roles count follows two existing site settings: "Graded roles" for students and "Course contacts" for teachers. Hide the signal with
-local_admincockpit:courseswithoutparticipantsin the plugin's health signal setting if you don't need it.
Also included: Behat acceptance tests for the dashboard, a weekly CI run against the Moodle 5.2/5.3 branch heads, and corrected test commands in the README. Release packages no longer contain repository tooling (.github/, .camp/, .gitattributes, .gitignore).
v2.6.0
The minimum supported Moodle version is now 5.2. Moodle 5.1 is no longer developed or tested against.
requiresraised to the Moodle 5.2.0 branching version (2026042000);supportedis now 5.2–5.3.- CI covers Moodle 5.2 and 5.3 on PHP 8.3/8.4 with both MariaDB and PostgreSQL.
- Sites still on Moodle 5.1 can keep using v2.5.1; Moodle will not offer them this or later versions.
No functional changes since v2.5.1.
The attached local_admincockpit-v2.6.0.zip is the installable package (top-level folder admincockpit/, development-only files excluded).
v2.5.1
Moodle 5.3 is released, and support for it is now verified against the stable release rather than the beta.
- Re-verified against Moodle 5.3 stable (v5.3.0, Build 20261005): full PHPUnit suite green, Moodle code checker clean, every plugin page renders without a single notice under full developer debug, and the one-click impersonate action behaves unchanged (site-admin targets still refused).
- CI now covers MOODLE_503_STABLE on both MariaDB and PostgreSQL, using 5.3's higher database floors (MariaDB 11.4 / PostgreSQL 17) for the 5.3 jobs only, while 5.1/5.2 stay tested against 10.11 / 16.
No functional changes since v2.5.0.
The attached local_admincockpit-v2.5.1.zip is the installable package (top-level folder admincockpit/, development-only files excluded).
v2.5.0
Closes the remaining gaps found when auditing SPEC-admincockpit.md against the shipped code.
New: one-click impersonate (SPEC section 5)
Search for a user on the dashboard and switch straight into their session, without going through a course participants list first.
Built as a thin wrapper around core rather than a reimplementation:
- User search is core's own
core_user/form_user_selectorautocomplete, backed by the existingcore_user_search_identityweb service — no bespoke search endpoint, no new web service. - Authorisation delegates to
\core\session\loginas_helper::get_context_user_can_login_as(), the same helper core's owncourse/loginas.phpuses.
Verified in core first: \core\session\manager::loginas() performs no capability check of its own, so every guard is the caller's responsibility. On top of core's rules, one stricter rule is added per SPEC section 5: a site admin is never a valid target, because core deliberately permits admin-to-admin impersonation and a one-click dashboard shortcut is a different risk profile from core's deliberate multi-step flow. The decision lives in classes/loginas_guard.php — page-free and unit-tested. The control is hidden entirely from anyone without moodle/user:loginas, and while already impersonating someone.
New: two health signals (from the SPEC section 11 backlog)
- Expired enrolments — still-active enrolments whose end date has passed. Drill-down links into each course's participants page.
- Self-enrolment without key or end date — enabled self-enrolment methods missing an enrolment key, an end date, or both. Per-row flags show which weakness applies; drill-down links into the course's enrolment methods.
Both field conventions were verified against lib/enrollib.php and enrol/self/lib.php rather than assumed.
Fixed
Plugins overviewwas listed under System in SPEC section 6 but had never been added to the default navigation links. Existing installs keep their customised setting untouched.
Verification
61 PHPUnit tests green (10 new), and the whole plugin is clean under the official Moodle code checker (moodlehq/moodle-cs, 0 errors / 0 warnings). All new UI was additionally exercised end to end against a live Moodle 5.3dev instance with real fixture data — including confirming that impersonating an ordinary user really switches the session, and that targeting the site admin is refused with the session left untouched.
v2.3.1
CI-only fix: v2.3.0's real CI run (Moodle Plugin CI, PHP 8.3/8.4 x Moodle 5.1/5.2 x MariaDB/PostgreSQL) failed consistently across the whole matrix at the Moodle Code Checker (phpcs) step - the new inline comment in navitems_parser_test.php started with a lowercase function name, tripping moodle.Commenting.InlineComment.NotCapital. Fixed by capitalizing the comment; no functional change.
5.3 support (declared in v2.3.0, verified against a live 5.3dev/beta instance) is unchanged.
v2.3.0
Moodle 5.3 support
Verified against a live Moodle 5.3dev/beta instance (docker-compose, erseco/alpine-moodle:beta - no MOODLE_503_STABLE branch exists upstream yet, core is still MATURITY_BETA) rather than guessed:
- plugin installs cleanly, default settings apply as expected
- dashboard and settings pages render fully with no errors or stray debugging() notices, even under full developer debug
- the full PHPUnit suite (51 tests) passes
$plugin->supported now includes branch 503.
Fix
navitems_parser_test::test_default_value_parses_cleanly_and_matches_installed_plugins() called get_string('pluginname', 'tool_mergeusers') unconditionally, triggering a debugging() notice on any vanilla instance where that optional admin tool isn't installed (not 5.3-specific - just not previously surfaced with debug/notices displayed). Now guarded the same way the production code in navitems_parser.php already does.
Not changed
The GitHub Actions CI matrix still targets only MOODLE_501_STABLE/MOODLE_502_STABLE - MOODLE_503_STABLE doesn't exist yet for moodle-plugin-ci to check out.
v2.2.6
CI-only fix (second retry): v2.2.5's camp-release run failed on a different camp-tools issue than v2.2.4 - v0.2.39's bundled schema doesn't yet allow the metrics.ci field that the live camp-index entry for this plugin already carries (added by camp-index's own newer enrichment automation), so camp release failed re-validating the whole entry with "Additional properties are not allowed ('ci' was unexpected)". Pin bumped to v0.2.61, verified locally against a real camp-index checkout.
No plugin behavior changed since v2.2.4.
v2.2.5
CI-only fix: the release-to-camp workflow was pinned to camp-tools v0.2.35, which shipped a stale committed build/lib/ directory (fixed upstream in v0.2.39). Depending on git-checkout file-mtime timing, setuptools' build_py sometimes reused that stale copy instead of the real source, so pip install git+...@v0.2.35 could install an old camp/moodleversions.py missing branch_names() and crash camp scaffold plugin --check with an ImportError - which is what happened on the v2.2.4 tag.
No plugin behavior changed since v2.2.4; this release exists to retrigger a clean camp-registry publish with the corrected pin (v0.2.39).
v2.2.4
Fixes two marketplace-validation findings reported by @volodymyrdovhan:
2.2.3 - Fix remaining lang-file ordering
Fix
Follow-up to 2.2.2: the previous ordering fix moved allcachespurged only
one position, not far enough - activeusers/activeusers_help/admincockpit:view
were still displaced after it. This time verified by programmatically
sorting every string key in both lang/en and lang/de instead of eyeballing
it.
🤖 Generated with Claude Code