Reputation: 73
I am creating a new Moodle plugin, and I have created more than 180 files. I think it would be better to reorder them in a directory structure. Is there any rule or best practice to do this?
Upvotes: 1
Views: 226
Reputation: 401
It depends on the type of plugin you are building. Moodle only enforces some folder structures for components like strings
, db
and templates
. The documentation is somehow incomplete on the subject : https://docs.moodle.org/dev/Tutorial#Let.27s_make_a_plugin
You should take a look at core plugins that have recently been modernized by the implementation of mustache templates. The mod_forum plugin should be a suitable example of how to structure a large plugin (classes, libs, templates, etc).
Upvotes: 1