Releases: dravek/local_devtools
Release v1.0.1
local_devtools
local_devtools is a Moodle local plugin that adds a Developer Tools dropdown to the top navigation bar for authorized users.
The dropdown provides quick admin/developer actions without leaving the current page:
- Purge all caches
- Run cron
- Run a specific scheduled task
What it does
When a user with the local/devtools:use capability is logged in:
- A wrench icon appears in the navbar.
- Clicking it opens a dropdown with quick actions.
- Actions are executed via Moodle external functions (AJAX).
- Success/error feedback is shown in-page.
For scheduled tasks, the plugin loads available task classes and lets you pick one.
Permission model
Capability:
local/devtools:use
By default, this is allowed for the manager archetype in db/access.php.
Technical notes
- AJAX services are declared in
db/services.php:local_devtools_purge_cacheslocal_devtools_run_cronlocal_devtools_run_scheduled_task
- Cron and scheduled tasks are executed through CLI scripts using the configured PHP binary (
$CFG->pathtophp, fallbackphp). - CLI script resolution supports both standard and mixed
public/webroot layouts. - Scheduled task selector is enhanced using Moodle form autocomplete.
Installation
-
Place the plugin in:
local/devtools -
Visit:
Site administration -> Notifications -
Complete the Moodle upgrade/install flow.
Usage
- Log in as a user with
local/devtools:use. - Click the wrench icon in the top navbar.
- Choose one of the actions:
- Purge All Caches
- Run Cron
- Run Scheduled Task (select task, then click Run Task)
- Enable/Disable debug messages
Troubleshooting
-
Wrench icon does not appear
- Verify the plugin is installed and upgraded.
- Verify user capability
local/devtools:use.
-
Cron/task execution fails
- Verify CLI scripts are available/readable under
admin/cli/. - Verify PHP CLI is available (
$CFG->pathtophporphpon PATH).
- Verify CLI scripts are available/readable under
-
Task autocomplete/search not showing
- Purge caches and rebuild frontend assets if needed.
- Ensure JavaScript is enabled and not blocked by browser policy.
Initial release
local_devtools
local_devtools is a Moodle local plugin that adds a Developer Tools dropdown to the top navigation bar for authorized users.
The dropdown provides quick admin/developer actions without leaving the current page:
- Purge all caches
- Run cron
- Run a specific scheduled task
What it does
When a user with the local/devtools:use capability is logged in:
- A wrench icon appears in the navbar.
- Clicking it opens a dropdown with quick actions.
- Actions are executed via Moodle external functions (AJAX).
- Success/error feedback is shown in-page.
For scheduled tasks, the plugin loads available task classes and lets you pick one.
Permission model
Capability:
local/devtools:use
By default, this is allowed for the manager archetype in db/access.php.
Technical notes
- AJAX services are declared in
db/services.php:local_devtools_purge_cacheslocal_devtools_run_cronlocal_devtools_run_scheduled_task
- Cron and scheduled tasks are executed through CLI scripts using the configured PHP binary (
$CFG->pathtophp, fallbackphp). - CLI script resolution supports both standard and mixed
public/webroot layouts. - Scheduled task selector is enhanced using Moodle form autocomplete.
Installation
-
Place the plugin in:
local/devtools -
Visit:
Site administration -> Notifications -
Complete the Moodle upgrade/install flow.
Usage
- Log in as a user with
local/devtools:use. - Click the wrench icon in the top navbar.
- Choose one of the actions:
- Purge All Caches
- Run Cron
- Run Scheduled Task (select task, then click Run Task)
Troubleshooting
-
Wrench icon does not appear
- Verify the plugin is installed and upgraded.
- Verify user capability
local/devtools:use.
-
Cron/task execution fails
- Verify CLI scripts are available/readable under
admin/cli/. - Verify PHP CLI is available (
$CFG->pathtophporphpon PATH).
- Verify CLI scripts are available/readable under
-
Task autocomplete/search not showing
- Purge caches and rebuild frontend assets if needed.
- Ensure JavaScript is enabled and not blocked by browser policy.