Note: You are currently viewing documentation for Moodle 3.3. Up-to-date documentation for the latest stable version of Moodle is probably available here: contrib.

Development:contrib

From MoodleDocs
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

CONTRIB is an area in the Moodle CVS repository where developers can work on custom patches and plugins (modules, blocks, themes, etc.) and share them with other people. It is less tightly restricted that the code for Moodle Core in CVS which contains the official Moodle releases. The advantages of using CONTRIB are that it is a standard place where people know to look, so it facilitates sharing your code and allows developers to evaluate and make suggestions. In addition, download packages are automatically build for all plugins in CONTRIB allowing easy access to the latest versions of the contributed code.


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 and documentation for contributed code is maintained via the Contributed Code Category.

Getting write access to CONTRIB

If you are a developer working on Moodle patches or plugins, please read Guidelines for Contributed Code to learn how you can share your code and request write access to CONTRIB.

For more information on how to use CVS once you have write access, read:

Auto-packaging of CONTRIB plugins and patches

In the Modules and plugins database, you will see that a lot of the plugins have download URLs like http://download.moodle.org/download.php/plugins/question/type/TEMPLATE.zip. This is because, every night, downloadable copies of every plugin in CONTRIB are automatically built 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 allows for different versions of the patch or plugin, if necessary, to work with different versions of Moodle.

See also