Difference between revisions of "Developer documentation"

Jump to: navigation, search
(Core components)
(Documentation for core components)
Line 26: Line 26:
 
*[[Fast portable SQL]] shows SQL techniques that are fast, efficient, and known to work on all supported DBs.
 
*[[Fast portable SQL]] shows SQL techniques that are fast, efficient, and known to work on all supported DBs.
 
*[[Development hints and tips]] a (developing) list of general wisdom to help with your Moodle projects.
 
*[[Development hints and tips]] a (developing) list of general wisdom to help with your Moodle projects.
 +
 +
===Core components ===
 +
 +
*[[XMLDB_Documentation|Database abstraction layer]]
 +
*[[Roles|Roles and Capabilities system]] for controlling who can do what
 +
*[[lib/formslib.php|Forms library]] for creating accessible and secure HTML forms that let users edit things
 +
*[[Using_the_file_API|File API]] for managing files stored by Moodle
 +
*[[Database schema introduction|The database schema]]
 +
*[[What happens when you require config.php|What happens when you require config.php]]
 +
*[[lib/moodlelib.php|lib/moodlelib.php]]
 +
*[[lib/weblib.php|lib/weblib.php]] for outputting stuff
  
 
==Documentation for core components==
 
==Documentation for core components==

Revision as of 11:34, 7 March 2012

Note: The Dev docs are currently being split from the User docs. During this time you will see quite a few red links.

moodle-development-logo.jpg

This Developer section of Moodle Docs is aimed at developers who contribute to the Moodle code, plugins, themes, and so on.

If you manage a Moodle site, or if you teach using Moodle, try the User docs.


How Moodle development works

The overview of the Moodle development process explains how Moodle development occurs and how people become Moodle developers. Current plans are listed on the Roadmap.

You can also enrol in one of the Moodle Developer Courses.

Guidelines

The following guidelines are crucial reading for anyone wanting to contribute to the Moodle code base:

  • Coding guidelines have to be followed by all Moodle developers
  • Moodle architecture gives an overview of how the Moodle code works
  • Process explains how changes are incorporated into Moodle
  • Tracker explains the Moodle Tracker for keeping track of bugs, issues, feature requests etc
  • Working with the Community explains how to engage with the dev community and discuss changes
  • Unit tests explains how to run the unit tests, and how to write new test cases.
  • Profiling PHP how to analyse your code to find out why it is slow.
  • Fast portable SQL shows SQL techniques that are fast, efficient, and known to work on all supported DBs.
  • Development hints and tips a (developing) list of general wisdom to help with your Moodle projects.

Core components

Documentation for core components

This section is for documentation of specific components of the existing core Moodle code. Discussion of components that are under discussion or in development can be found in the developer notes or on the roadmap.

The documents below give a general overview. For detailed function-by-function documentation, see the phpDocumentor documentation that is automatically generated from the comments in the code.

And don't forget that the most up-to-date and detailed description of how the code works is the code itself, and you can browse the code online using PHPXref.

Modules included in the standard distribution

How you can contribute

Make a new plugin

The M in Moodle stands for modular, and the easiest, most maintainable way to add new functionality to Moodle is by using one of the many plugin APIs. There are many types of plugin you can write:

General information that applies to all types of plugins

Please see the Guidelines for contributed code for an overview of how to contribute to the Moodle code.

Sometimes it is not possible to write a proper plugin for what you want to do, in which case you may have to resort to using the local customisations hook.

Change core code

Ways to contribute that do not involve PHP programming

Plans for the future

Ideas for and details of planned future features of Moodle are initially discussed on the forums in the Using Moodle course at moodle.org. That developer discussions are intermixed with user discussions in the same forums may seem strange at first but is one of the reasons for the success of Moodle. It is important that both end-users and developers discuss the future features together.

Once ideas begin to crystallize on the forums they can be summarized in this wiki, either as part of the roadmap or in the form of developer notes. These pages then form the basis for further discussion in the forums.

Resources

Tools

Some tools people use when working on Moodle code:

IDEs

Browser add-ons

Miscellaneous

See also: Useful Development Tools forumin the Introduction to Moodle Programming course

See also