• Stick to the Moodle coding guidelines.

  • If the nature of the plugin requires it, include backup and restore procedures.

  • Create event triggers in all the relevant places.

  • Use capabilities. Never refer to roles directly (i.e. don’t use role shortnames).

  • Keep in mind all data dependencies.

    • For instance, if you store user ids in an association table, make sure to either delete the records if the user is deleted (using an event handler), or always retrieve the users through a join on mdl_user (where user.deleted = 0).

    • Also consider the status of courses: should invisible course show up in your plugin? Student users should probably never see invisible courses in your plugin.

  • Always include documentation.

  • List all customizations in the README.md file of the git repository

Solin builds and maintains Moodle and Totara plugins with production-grade architecture, events, and upgrade paths. Need help? Contact us.

Contact us