Julitillo
Julitillo

Reputation: 73

Can I structure my Moodle plugin in directories?

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

Answers (1)

Hipjea
Hipjea

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

Related Questions