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
mNo edit summary
mNo edit summary
Line 1: Line 1:
{{stub}}
{{Plugins development}}
{{Plugins development}}
{{stub}}


There are some files that work the same in all [[Plugin types|plugin types]] (if they are present).
There are some files that work the same in all [[Plugin types|plugin types]] (if they are present).

Revision as of 08:48, 30 April 2015


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

version.php

Meta-data about the plugin (like the version number, dependencies or the maturity level) are defined here.

  • version.php page provides detailed description of the file contents

lang/en/plugintype_pluginname.php

English strings for the plugin are defined here. At least $string['pluginname'] must be present. There is an exception for the Activity modules, their expected file name is just pluginname.php (without the mod_ prefix).

  • String API provides information about the string files

lib.php

db/install.xml

The plugin's database scheme (tables, fields, indexes and keys) are defined here. You should always use the in-built XMLDB editor to generate this file.

db/upgrade.php

Upgrade steps (such as database scheme changes and other things that must happen when the plugin is being upgraded) are defined here. The in-built XMLDB editor can be used to generate the code to change the database scheme.

db/access.php

Plugin capabilities are defined here.

classes