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

Development:contrib: Difference between revisions

From MoodleDocs
No edit summary
Line 1: Line 1:
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.
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==
==Browsing CONTRB==


You can browse the contrib area of CVS here: http://cvs.moodle.org/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 [http://moodle.cvs.sourceforge.net/moodle/contrib/plugins/mod/gallery/ plugins/mod/gallery].
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 [http://moodle.cvs.sourceforge.net/moodle/contrib/plugins/mod/gallery/ plugins/mod/gallery].


A more user-friendly list of the available plugins is available in the [http://moodle.org/mod/data/view.php?id=6009 Modules and Plugins database] on Moodle.org.
A more user-friendly list of the available plugins is available in the [http://moodle.org/mod/data/view.php?id=6009 Modules and Plugins database] on Moodle.org and documentation for contributed code is maintained via the [https://docs.moodle.org/en/Category:Contributed_code Contributed Code Category].


==Getting write access to contrib==
==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 [[Development:CVS_for_developers#Joining_the_project_as_a_developer|these instructions]], making it clear that you want contrib access.
If you are a developer working on Moodle patches or plugins, please read [https://docs.moodle.org/en/Development:Guidelines_for_contributed_code Guidelines for Contributed Code] to learn how you can share your code and request write access to CONTRIB.  


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.
For more information on how to use CVS once you have write access, read:
* [[Development:CVS_for_developers|CVS for developers]]


==Auto-packaging of contrib modules==
==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/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.
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 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==
==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.
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.
 
* [[Development:CVS_for_developers|CVS for developers]]


[[Category:Developer|CVS for developers]]
[[Category:Developer|CVS for developers]]
[[Category:Developer tools]]
[[Category:Developer tools]]

Revision as of 23:38, 24 March 2008

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 CONTRB

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/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.