Note: You are currently viewing documentation for Moodle 2.6. Up-to-date documentation for the latest stable version of Moodle may be available here: contrib.

Development:contrib

From MoodleDocs

contrib is an area in the Moodle CVS repository where developers can work on plugins and share them with other people. It is less tightly restricted that the core moodle CVS module, which just contains the official moodle release. The advantages of using contrib are that it is a standard place where people know to look, so it facilitates sharing your code. Also, download packages are automatically build for all plugins in contrib.

Browsing contrib

You can browse the contrib area of CVS here: http://cvs.moodle.org/contrib/

Most of the interesting code is in the plugins folder. It is organised like the main Moodle codebase, so, for example, if you are looking for an activity module called gallery, look in plugins/mod/gallery.

A more user-friendly list of the available plugins is available in the Modules and Plugins database on Moodle.org.

Getting write access to contrib

If you are a developer working on plugins for Moodle, you can request write access to contrib by asking Martin. Follow these instructions, making it clear that you want contrib access.

So that they know which areas of contrib to give you write access too. Make sure a version of your code is available somewhere (perhaps attached to a forum post) and include a link to it when you request access. Make sure it is clear what type of plugin it is.

Auto-packaging of contrib modules

In the Modules and plugins database, you will see that a lot of the plugins have download URLs like http://download.moodle.org/plugins/question/type/TEMPLATE.zip. This is because, every night, downloadable copies of every plugin in contrib are automatically build and made available. The download URL is based on the path in the contrib repository. The code for TEMPLATE.zip is in the plugins/question/type/TEMPLATE folder.

Branches in contrib

There are branches in contrib CVS for each stable branch in the core moodle module. The Auto-packaging system understands them. This lets you have different versions of your plugin, if necessary, to work with different versions of core Moodle.