Documentation Index
Fetch the complete documentation index at: https://mintlify.com/exelearning/mod_exelearning/llms.txt
Use this file to discover all available pages before exploring further.
mod_exelearning is tested the same way core activity modules like mod_scorm and mod_h5pactivity are: PHPUnit for unit and integration tests, Behat for browser-level scenarios, and moodle-plugin-ci for the full linter + test pipeline that runs in CI. The plugin must live at mod/exelearning inside a Moodle checkout — a moodle-plugin-ci install does this automatically, and the bundled Docker stack mounts it there for you.
Quick start with Docker (recommended)
The easiest path requires no local PHP or database setup:Run the full plugin suite
scripts/phpunit-docker.sh inside the moodle container. The first run installs Moodle’s dev dependencies and initialises the PHPUnit test database (idempotent); later runs just execute the suite.Manual PHPUnit setup
To run tests inside an existing Moodle checkout:Initialise the PHPUnit environment
db/install.xml, version.php, or capabilities change.Tests rely on the data generator in
tests/generator/lib.php, which builds each
instance from the real ELPX fixture
research/fixtures/elpx/actividad-evaluable.elpx — a package with two gradable
iDevices: trueorfalse and guess.Code coverage
Coverage scope is declared intests/coverage.php (the plugin’s classes/ folder plus lib.php), keeping reports focused on testable logic. A coverage driver (xdebug or pcov) must be enabled in the CLI PHP.
CI runs PHPUnit with
coverage: none for speed. Generate coverage locally with
a driver enabled.Behat
Make sure a Selenium server with Chrome is running and reachable from the test
runner, or pass
--profile chrome and configure the profile in behat.yml.moodle-plugin-ci (full CI suite)
CI runs the exact pipeline defined in.github/workflows/ci.yml. To reproduce it locally, install moodle-plugin-ci and run each step against the plugin:
Packaging a release
scripts/package.sh script uses only git — no zip, rsync, python, or php — so it works in Git Bash on Windows too. It stages the working tree (including the built editor under dist/static/, which is .gitignored) into a throwaway index, stamps version.php there (version = YYYYMMDD00, release = <RELEASE>), and emits the ZIP via git archive --format=zip. Your real .git is left untouched.
The committed
version.php carries the sentinel values 9999999999 / dev
(DEC-0030). Real version values are injected into the ZIP only — the working tree
is never modified. Releases are also built automatically by
.github/workflows/release.yml on a published GitHub release.Linter exclusions
| File | What it configures |
|---|---|
.moodle-plugin-ci.yml | filter.notPaths / notNames for phpcs, phpmd, phplint, phpdoc, phpcpd |
.phpcs.xml.dist | moodle ruleset with dist/, research/, node_modules/, vendor/, amd/build/, and *.min.* excluded |
.eslintignore / .stylelintignore | Used by the grunt step |
thirdpartylibs.xml | Declares dist/static (embedded editor) and the pipwerks SCORM wrappers in assets/scorm/ as third-party code so the validate step does not flag them |