Developers Manual

This document describes some of Moodle's design and how you can contribute.

Sections in this document:

  1. Moodle architecture
  2. How you can contribute

 

1. Moodle architecture

From a system administrator's perspective, Moodle has been designed according to the following criteria:

  1. Moodle should run on the widest variety of platforms

    The web application platform that runs on most platforms is PHP combined with MySQL, and this is the environment that Moodle has been developed in (on Linux, Windows, and Mac OS X). Moodle also uses the ADOdb library for database abstraction, which means Moodle can use more than ten different brands of database (unfortunately, though, it can not yet set up tables in all these databases - more on this later).

  2. Moodle should be easy to install, learn and modify

    Early prototypes of Moodle (1999) were built using Zope - an advanced object-oriented web application server. Unfortunately I found that although the technology was pretty cool, it had a very steep learning curve and was not very flexible in terms of system administration. The PHP scripting language, on the other hand, is very easy to get into (especially if you've done any programming using any other scripting language). Early on I made the decision to avoid using a class-oriented design - again, to keep it simple to understand for novices. Code reuse is instead achieved by libraries of clearly-named functions and consistent layout of script files. PHP is also easy to install (binaries are available for every platform) and is widely available to the point that most web hosting services provide it as standard.

  3. It should be easy to upgrade from one version to the next

    Moodle knows what version it is (as well as the versions of all plug-in modules) and a mechanism has been built-in so that Moodle can properly upgrade itself to new versions (for example it can rename database tables or add new fields). If using CVS in Unix for example, one can just do a "cvs update -d" and then visit the site home page to complete an upgrade.

  4. It should be modular to allow for growth

    Moodle has a number of features that are modular, including themes, activities, interface languages, database schemas and course formats. This allows anyone to add features to the main codebase or to even distribute them separately. More on this below in the next section.

  5. It should be able to be used in conjunction with other systems

    One thing Moodle does is keep all files for one course within a single, normal directory on the server. This would allow a system administrator to provide seamless forms of file-level access for each teacher, such as Appletalk, SMB, NFS, FTP, WebDAV and so on. Otherwise, there is work yet to do. Features planned for Moodle in future versions include: flexible connection to existing databases of user details and grades; import and export of Moodle data using XML-based formats; and increased use of style sheets for interface formatting (so that it can be integrated visually into other web sites).

 

2. How you can contribute

As mentioned above, Moodle has a number of features that are modular. Even if you are not a programmer there are things you can change or help with.

Learning Activities

These are by far the most important modules, and reside in the 'mod' directory. There are six default modules: assignment, choice, forum, journal, reading, and survey. Each module is in a separate subdirectory and consists of the following mandatory elements (plus extra scripts unique to each module):

Themes

Themes (or skins) define the look of a site. A number of simple themes are provided in the main distribution, but you may want to copy one of these and customise it to suit your own needs (eg local logo, colours, styles, graphics etc)

Each theme is in a subdirectory of the "theme" directory. You can copy the "standard" theme as a template.

Languages

Moodle has been designed for internationalisation. Each 'string' or 'page' of text that is displayed as part of the interface is drawn from a set of language files. Each language is a subdirectory of the directory 'lang'. The structure of the lang directory is as follows:

lang/en - directory containing all files for one language (eg English)

lang/en/help - contains whole help pages (for popup context-sensitive help)

Main help pages are situated here, while help pages specific to each module are located in subdirectories with the module's name.

You can insert a helpbutton in a page with the helpbutton function.

eg helpbutton("text", "Click here for help about text");

and for modules:

helpbutton("forumtypes", "Forum types", "forum");


Database Schemas

Given a working database with defined tables, the intentionally simple SQL used in Moodle should work fine with a wide variety of database brands.

A problem exists with automatically creating new tables in a database, which is what Moodle tries to do upon initial installation. Because every database is very different, there doesn't yet exist any way to do this in a platform-independent way. To support this automation in each database, schemas can be created that list the required SQL to create Moodle tables in a particular database. These are files in lib/db and inside the db subdirectory of each module.

Currently, only MySQL is supported because that's what I know. If you are familiar with another database (especially open source databases) and are willing to help port the MySQL schema, please get in contact with me (martin@moodle.com).

 

Course Formats

Moodle 1.0 supports three different course formats: weekly, topics and social.

These are a little more connected to the rest of the code (and hence, less "pluggable") but it is still quite easy to add new ones.

If you have any ideas for different formats that you need or would like to see, get in touch with me and I'll do my absolute best to have them available in future releases.

 

Documentation and articles

If you feel like writing a tutorial, an article, an academic paper or anything else about Moodle, please do! Put it on the web and make sure you include links to http://moodle.com/

 

Participating in the bug tracker

Finally, I would like to invite you to register on the "bug tracker" at bugs.moodle.org so you can file any bugs that you find and perhaps participate in discussing and fixing them.

"Bugs" not only includes software bugs with current versions of Moodle, but also new ideas, feature requests and even constructive criticism of existing features. The beauty of open source is that anyone can participate in some way and help to create a better product for all of us to enjoy. In this project, your input is very welcome!

 

Thanks for using Moodle!

Cheers,
Martin Dougiamas

 

 

 

Moodle Documentation

Version: $Id: developer.html,v 1.2 2001/12/09 10:34:19 martin Exp $