Hi everyone,
We are updating the recommended file structure for plugins adapted to the Moodle App to improve consistency across the ecosystem and prepare for better automated tooling.
What is changing? Previously, while files like db/mobile.php had strict locations, Javascript (JS) and template files could be placed almost anywhere. Moving forward, we are standardizing their locations:
-
JS Files: Should be placed in the
js/mobileappdirectory. -
Templates: Should be placed in the
templates/mobileappdirectory.
Why the change? Standardising these paths allows us to implement specific linting and validation in the future, ensuring higher code quality across all plugins.
Will this break my plugin? No. Placing files in other locations will not currently throw errors or break existing functionality. However, we strongly recommend migrating your files to these folders to stay aligned with future development standards.
Tooling Updates The next release of moodle-plugin-ci will automatically ignore templates inside the mobileapp folder. This means you will no longer need to manually ignore them to avoid CI errors. We plan to refine this further to provide proper linting for these files in the future.
For full details, please refer to the updated Plugins Development Guide.
Issue where this was discussed: MDL-72048.
Cheers,
Dani