</HEAD>\r
\r
<BODY BGCOLOR="#FFFFFF">\r
-\r
<H2>Developers Manual</H2>\r
-<H3>Moodle architecture</H3>\r
-<P>This section will describe the overall architecture for Moodle and some of \r
- the major design decisions that were made during development.</P>\r
-<P> </P>\r
-<H3>Plug-in modules</H3>\r
-<P>Moodle has been designed to be modular, so that new learning activities can \r
- be easily written and "plugged-in" to a Moodle installation by the \r
- system administrator.</P>\r
-<P>This section will describe the Plug-in API and provide a simple example of \r
- a Moodle plug-in.</P>\r
+<P>This document describes some of Moodle's design and how you can contribute.</P>\r
+<P>Sections in this document:</P>\r
+<OL>\r
+ <LI><A HREF="#architecture">Moodle architecture</A></LI>\r
+ <LI><A HREF="#contribute">How you can contribute</A> \r
+ <ol>\r
+ <li><A HREF="#activities">Learning activities</A></li>\r
+ <li><A HREF="#themes">Themes</A></li>\r
+ <li><A HREF="#languages">Languages</A></li>\r
+ <li><A HREF="#database">Database Schemas</A></li>\r
+ <li><a href="#courseformats">Course formats</a></li>\r
+ <li><a href="#doc">Documentation and articles</a></li>\r
+ <li><a href="#bugs">Participating in the bug tracker</a></li>\r
+ </ol>\r
+ </LI>\r
+</OL>\r
<P> </P>\r
+<H3><a name="architecture"></a>Moodle architecture</H3>\r
+<P>From a system administrator's perspective, Moodle has been designed according \r
+ to the following criteria:</P>\r
+<ol>\r
+ <li><strong>Moodle should run on the widest variety of platforms</strong><br>\r
+ <br>\r
+ The web application platform that runs on most platforms is PHP combined with \r
+ MySQL, and this is the environment that Moodle has been developed in (on Linux, \r
+ Windows, and Mac OS X). Moodle also uses the ADOdb library for database abstraction, \r
+ which means Moodle can use <a href="http://php.weblogs.com/ADOdb_manual#drivers">more \r
+ than ten different brands of database</a> (unfortunately, though, it can not \r
+ yet <em><strong>set up tables</strong></em> in all these databases - more \r
+ on this later). <br>\r
+ </li>\r
+ <li><strong>Moodle should be easy to install, learn and modify</strong><br>\r
+ <br>\r
+ Early prototypes of Moodle (1999) were built using <a href="http://www.zope.org/">Zope</a> \r
+ - an advanced object-oriented web application server. Unfortunately I found \r
+ that although the technology was pretty cool, it had a very steep learning \r
+ curve and was not very flexible in terms of system administration. The PHP \r
+ scripting language, on the other hand, is very easy to get into (especially \r
+ if you've done any programming using any other scripting language). Early \r
+ on I made the decision to avoid using a class-oriented design - again, to \r
+ keep it simple to understand for novices. Code reuse is instead achieved by \r
+ libraries of clearly-named functions and consistent layout of script files. \r
+ PHP is also easy to install (binaries are available for every platform) and \r
+ is widely available to the point that most web hosting services provide it \r
+ as standard.<br>\r
+ </li>\r
+ <li><strong>It should be easy to upgrade from one version to the next</strong><br>\r
+ <br>\r
+ Moodle knows what version it is (as well as the versions of all plug-in modules) \r
+ and a mechanism has been built-in so that Moodle can properly upgrade itself \r
+ to new versions (for example it can rename database tables or add new fields). \r
+ If using CVS in Unix for example, one can just do a "cvs update -d" \r
+ and then visit the site home page to complete an upgrade.<br>\r
+ </li>\r
+ <li><strong>It should be modular to allow for growth</strong><br>\r
+ <br>\r
+ Moodle has a number of features that are modular, including themes, activities, \r
+ interface languages, database schemas and course formats. This allows anyone \r
+ to add features to the main codebase or to even distribute them separately. \r
+ More on this below in the next section.<br>\r
+ </li>\r
+ <li><strong>It should be able to be used in conjunction with other systems</strong><br>\r
+ <br>\r
+ One thing Moodle does is keep all files for one course within a single, normal \r
+ directory on the server. This would allow a system administrator to provide \r
+ seamless forms of file-level access for each teacher, such as Appletalk, SMB, \r
+ NFS, FTP, WebDAV and so on. Otherwise, there is work yet to do. Features planned \r
+ for Moodle in future versions include: flexible connection to existing databases \r
+ of user details and grades; import and export of Moodle data using XML-based \r
+ formats; and increased use of style sheets for interface formatting (so that \r
+ it can be integrated visually into other web sites).</li>\r
+</ol>\r
+<p> </p>\r
+<H3><a name="contribute" id="contribute"></a>How you can contribute</H3>\r
+<P>As mentioned above, Moodle has a number of features that are modular. Even \r
+ if you are not a programmer there are things you can change or help with.</P>\r
+<P><strong><a name="activities" id="activities"></a>Learning Activities</strong></P>\r
+<blockquote> \r
+ <p>These are by far the most important modules, and reside in the 'mod' directory. \r
+ There are six default modules: assignment, choice, forum, journal, reading, \r
+ and survey. Each module is in a separate subdirectory and consists of the \r
+ following mandatory elements (plus extra scripts unique to each module):</p>\r
+ <ul>\r
+ <li>mod.html: a form to set up or update an instance of this module</li>\r
+ <li>version.php: defines some meta-info and provides upgrading code</li>\r
+ <li>icon.gif: a 16x16 icon for the module</li>\r
+ <li>db/: SQL dumps of all the required db tables and data (for each database \r
+ type) </li>\r
+ <li>index.php: a page to list all instances in a course</li>\r
+ <li>view.php: a page to view a particular instance</li>\r
+ <li>lib.php: any/all functions defined by the module should be in here. If \r
+ the modulename if called widget, then the required functions include: \r
+ <ul>\r
+ <li>widget_add_instance() - code to add a new instance of widget</li>\r
+ <li>widget_update_instance() - code to update an existing instance</li>\r
+ <li>widget_delete_instance() - code to delete an instance</li>\r
+ <li>widget_user_outline() - given an instance, return a summary of a user's \r
+ contribution</li>\r
+ <li>widget_user_complete() - given an instance, print details of a user's \r
+ contribution<br>\r
+ </li>\r
+ <li>To avoid possible conflict, any module functions should be named starting \r
+ with widget_ and any constants you define should start with WIDGET_ \r
+ </li>\r
+ </ul>\r
+ </li>\r
+ <li>Lastly, each module will have some language files that contain strings \r
+ for that module. See below.<br>\r
+ </li>\r
+ </ul>\r
+</blockquote>\r
+<p> <strong><a name="themes" id="themes"></a>Themes</strong></p>\r
+<blockquote> \r
+ <p>Themes (or skins) define the look of a site. A number of simple themes are \r
+ provided in the main distribution, but you may want to copy one of these and \r
+ customise it to suit your own needs (eg local logo, colours, styles, graphics \r
+ etc)</p>\r
+ <p>Each theme is in a subdirectory of the "theme" directory. You can \r
+ copy the "standard" theme as a template.<br>\r
+ </p>\r
+</blockquote>\r
+<p><strong><a name="languages" id="languages"></a>Languages</strong></p>\r
+<blockquote> \r
+ <p>Moodle has been designed for internationalisation. Each 'string' or 'page' \r
+ of text that is displayed as part of the interface is drawn from a set of \r
+ language files. Each language is a subdirectory of the directory 'lang'. The \r
+ structure of the lang directory is as follows:</p>\r
+ <p><strong>lang/en</strong> - directory containing all files for one language \r
+ (eg English)</p>\r
+ <ul>\r
+ <li>moodle.php - strings for main interface</li>\r
+ <li>assignment.php - strings for assignment module</li>\r
+ <li>choice.php - strings for choice module</li>\r
+ <li>forum.php - strings for forum module</li>\r
+ <li>journal.php - strings for journal module </li>\r
+ <li>reading.php - strings for reading module</li>\r
+ <li>survey.php - strings for reading module</li>\r
+ <li>.... plus other modules if any.<br>\r
+ <br>\r
+ A string is called from these files using the <strong><em>get_string()</em></strong><em> \r
+ </em>or<em> <strong>print_string()</strong> </em>functions. Each string \r
+ supports variable substitution, to support variable ordering in different \r
+ languages.<em><br>\r
+ <br>\r
+ </em>eg $strdueby = get_string("assignmentdueby", "assignment", \r
+ userdate($date)); <br>\r
+ <br>\r
+ If a string doesn't exist in a particular language, then the equivalent \r
+ in English will automatically be used instead.</li>\r
+ </ul>\r
+ <p><strong>lang/en/help</strong> - contains whole help pages (for popup context-sensitive \r
+ help)</p>\r
+ <blockquote> \r
+ <p>Main help pages are situated here, while help pages specific to each module \r
+ are located in subdirectories with the module's name.</p>\r
+ <p>You can insert a helpbutton in a page with the helpbutton function.</p>\r
+ <p>eg helpbutton("text", "Click here for help about text");</p>\r
+ <p>and for modules:</p>\r
+ <p>helpbutton("forumtypes", "Forum types", "forum");</p>\r
+ </blockquote>\r
+</blockquote>\r
+<p><br>\r
+ <strong><a name="database" id="database"></a>Database Schemas</strong></p>\r
+<blockquote> \r
+ <p>Given a working database with defined tables, the intentionally simple SQL \r
+ used in Moodle should work fine with a wide variety of database brands.</p>\r
+ <p>A problem exists with <strong>automatically creating</strong> new tables \r
+ in a database, which is what Moodle tries to do upon initial installation. \r
+ Because every database is very different, there doesn't yet exist any way \r
+ to do this in a platform-independent way. To support this automation in each \r
+ database, schemas can be created that list the required SQL to create Moodle \r
+ tables in a particular database. These are files in <strong>lib/db</strong> \r
+ and inside the <strong>db</strong> subdirectory of each module.</p>\r
+ <p>Currently, only MySQL is supported because that's what I know. If you are \r
+ familiar with another database (especially open source databases) and are \r
+ willing to help port the MySQL schema, please get in contact with me (<a href="mailto:martin@moodle.com">martin@moodle.com</a>).</p>\r
+</blockquote>\r
+<p> </p>\r
+<p><strong><a name="courseformats" id="courseformats"></a>Course Formats</strong></p>\r
+<blockquote> \r
+ <p>Moodle 1.0 supports three different course formats: weekly, topics and social. \r
+ </p>\r
+ <p>These are a little more connected to the rest of the code (and hence, less \r
+ "pluggable") but it is still quite easy to add new ones.</p>\r
+ <p>If you have any ideas for different formats that you need or would like to \r
+ see, get in touch with me and I'll do my absolute best to have them available \r
+ in future releases.</p>\r
+</blockquote>\r
+<p> </p>\r
+<p><strong><a name="doc" id="doc"></a>Documentation and articles</strong></p>\r
+<blockquote> \r
+ <p>If you feel like writing a tutorial, an article, an academic paper or anything \r
+ else about Moodle, please do! Put it on the web and make sure you include \r
+ links to <a href="http://moodle.com/">http://moodle.com/</a></p>\r
+ </blockquote>\r
+<p> </p>\r
+<p><strong><a name="bugs" id="bugs"></a>Participating in the bug tracker</strong></p>\r
+<blockquote> \r
+ <p>Finally, I would like to invite you to register on the "bug tracker" \r
+ at <a href="http://bugs.moodle.org">bugs.moodle.org</a> so you can file any \r
+ bugs that you find and perhaps participate in discussing and fixing them. \r
+ </p>\r
+ <p>"Bugs" not only includes software bugs with current versions of \r
+ Moodle, but also new ideas, feature requests and even constructive criticism \r
+ of existing features. The beauty of open source is that anyone can participate \r
+ in some way and help to create a better product for all of us to enjoy. In \r
+ this project, your input is very welcome!</p>\r
+</blockquote>\r
+<p> </p>\r
+<blockquote> \r
+ <blockquote> \r
+ <blockquote> \r
+ <p align="center">Thanks for using Moodle!</p>\r
+ <p align="center">Cheers,<br>\r
+ <a href="http://dougiamas.com/" target="_top">Martin Dougiamas</a></p>\r
+ </blockquote>\r
+ </blockquote>\r
+</blockquote>\r
+<p> </p>\r
+<p> </p>\r
+<blockquote> \r
+ <p> </p>\r
+</blockquote>\r
<P ALIGN="CENTER"><FONT SIZE="1"><A HREF="index.html" TARGET="_top">Moodle Documentation</A></FONT></P>\r
-<P ALIGN="CENTER"><FONT SIZE="1">Version: $Id$</FONT></P>\r
+<P ALIGN="CENTER"><FONT SIZE="1">Version: $Id: developer.html,v 1.2 2001/12/09 \r
+ 10:34:19 martin Exp $</FONT></P>\r
\r
</BODY>\r