How to create moodle local plugin
To create local plugin you can follow following folder structure according to Moodle documentation (https://docs.moodle.org/dev/Local_plugins)-
local/
yourplugin/
db/
access.php
install.php
install.xml
lang/
en/
yourplugin.php
index.php
settings.php
version.php
Custom /local/ plugins
Local plugins are used in cases when no standard plugin fits, examples are:
- event consumers communicating with external systems
- custom definitions of web services and external functions
- applications that extend moodle at the system level (hub server, amos server, etc.)
- new database tables used in core hacks (discouraged)
- new capability definitions used in core hacks
- custom admin settings
- extending the navigation block with custom menus