Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Plugin files: Difference between revisions

From MoodleDocs
(Created page with "{{stub}} There are some files that work the same in all plugin types (if they are present). We document them here. ; '''version.php''' : give metadata about the plugin, ...")
 
No edit summary
Line 15: Line 15:
:; ...
:; ...
:: There are lots of other things that can go in the db folder, but I don't have time to describe them now.
:: There are lots of other things that can go in the db folder, but I don't have time to describe them now.
; classes/
; '''classes/'''
: This folder contains the definition of any classes for your plugin that you want the auto-loader to be able to find. You can define any classes you like at the top level.
: This folder contains the definition of any classes for your plugin that you want the auto-loader to be able to find. You can define any classes you like at the top level.
:; ''[core  API name]''
:; ''[core  API name]''

Revision as of 14:14, 19 March 2014


There are some files that work the same in all plugin types (if they are present). We document them here.

version.php
give metadata about the plugin, like the version number.
db/
this folder contains information that is used to install the plugin.
install.xml
upgrade.php
install.php
These three files are to do with creating the and updating the database tables required by your plugin.
access.php
This is where you define any capabilities that your plugin uses.
...
There are lots of other things that can go in the db folder, but I don't have time to describe them now.
classes/
This folder contains the definition of any classes for your plugin that you want the auto-loader to be able to find. You can define any classes you like at the top level.
[core API name]
within classes/, the top level folders are reserved for the names of Core APIs except for
local/
You can put whatever you like within the local namespace, including as many nested namespaces as you like.
question/bank/
This is where you define new question bank column types. See mod_quiz as an example.