<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.moodle.org/test/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mudrd8mz</id>
	<title>MoodleDocs - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://docs.moodle.org/test/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mudrd8mz"/>
	<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/Special:Contributions/Mudrd8mz"/>
	<updated>2026-04-18T14:04:44Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Development_talk:Tracking_Moodle_CVS_with_git&amp;diff=48346</id>
		<title>Development talk:Tracking Moodle CVS with git</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Development_talk:Tracking_Moodle_CVS_with_git&amp;diff=48346"/>
		<updated>2008-12-18T21:30:49Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: New section: Mass merge&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I am currently doing a bit of an overhaul of this page to remove obsolete coigto stuff - dont really see a reason why anyone would use it or want docs for it.--[[User:Dan Poltawski|Dan Poltawski]] 17:04, 1 October 2008 (CDT)&lt;br /&gt;
:Great! Thanks! --[[User:Eloy Lafuente (stronk7)|Eloy Lafuente (stronk7)]] 17:05, 1 October 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
== Mass merge ==&lt;br /&gt;
&lt;br /&gt;
&amp;quot;...If you are applying patches to CVS, you can then use git-cvsexportcommit or plain old patch -p1 filename...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
can anybody please elaborate a bit? Provide and example? TIA --[[User:David Mudrak|David Mudrak]] 15:30, 18 December 2008 (CST)&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Development:DML_exceptions&amp;diff=47374</id>
		<title>Development:DML exceptions</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Development:DML_exceptions&amp;diff=47374"/>
		<updated>2008-11-30T21:23:42Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: /* dml_read_exception */ fix read -&amp;gt; write&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Moodle_2.0}}In previous versions problems in database calls were ignored by default.&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
[[Image:Dml_exceptions.png]]&lt;br /&gt;
&lt;br /&gt;
Defined in lib/dmllib.php for now.&lt;br /&gt;
&lt;br /&gt;
===dml_connection_exception===&lt;br /&gt;
Thrown when can not connect to database for any reason.&lt;br /&gt;
&lt;br /&gt;
===dml_read_exception===&lt;br /&gt;
Problem occurred during reading from database. Originally indicated be returning &#039;&#039;false&#039;&#039; - this value was often confused with &#039;&#039;false&#039;&#039; return value meaning &#039;&#039;not found&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===dml_write_exception===&lt;br /&gt;
Problem occurred during writing to database. Originally indicated be returning &#039;&#039;false&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [[Development:Exceptions|Exceptions]]: General guidelines for using of exceptions in Moodle 2.0&lt;br /&gt;
* [[Development:DML functions|DML functions]]: Where all the functions used to handle DB data. ([[wikipedia:Data_Manipulation_Language|DML]]) are defined.&lt;br /&gt;
* [[Development:DDL functions|DDL functions]]: Where all the functions used to handle DB objects ([[wikipedia:Data_Definition_Language|DDL]]) are defined.&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Backup_and_restore_FAQ&amp;diff=47176</id>
		<title>Backup and restore FAQ</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Backup_and_restore_FAQ&amp;diff=47176"/>
		<updated>2008-11-25T13:27:47Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: /* Restoring a course results in broken HTML tags. What can I do? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==What are the pros and cons of course versus site backups?==&lt;br /&gt;
&lt;br /&gt;
[[Site backup|Site backups]] are recommended in order to have all data saved with the best confidence and the shortest recovery time.&lt;br /&gt;
&lt;br /&gt;
[[Automated course backup|Automated course backups]] are more expensive in terms of time and CPU usage. The recovery time to have your site running again is longer. Course backups are useful for obtaining &amp;quot;fresh&amp;quot; copies of courses to be re-used or distributed individually, however they should never be used as a primary backup system (unless your hosting doesn&#039;t allow the preferred site backups). &lt;br /&gt;
&lt;br /&gt;
==What data is not contained in course backups?==&lt;br /&gt;
&lt;br /&gt;
By selecting all the options when setting up the backup you can include almost all the data in the course. However you should be aware of the fact that some things are not backed up:&lt;br /&gt;
* Quiz questions are only backed up if at least one question from their category has been added to a quiz.&lt;br /&gt;
* Scales are only backed up if they are used by at least one activity.&lt;br /&gt;
&lt;br /&gt;
==The process ends with: &amp;quot;Error: An error occurred deleting old backup data&amp;quot;. What should I do?==&lt;br /&gt;
&lt;br /&gt;
This part of the backup (or restore) procedure tries to delete old info, used in previous executions, performing the following tasks:&lt;br /&gt;
&lt;br /&gt;
# Delete old records from &amp;quot;backup_ids&amp;quot; table: Check the table exists, repair it and try again.&lt;br /&gt;
# Delete old records from &amp;quot;backup_files&amp;quot; table: Check the table exists, repair it and try again.&lt;br /&gt;
# Delete old files from &amp;quot;moodledata/temp/backup&amp;quot;: Delete the dir completely and try again.&lt;br /&gt;
&lt;br /&gt;
[[Image:BackupProblem.gif|thumb|Backup error message]]For points 1 &amp;amp; 2, there are various ways of repairing tables, including using MySQL Admin.&lt;br /&gt;
For point 3 see below:&lt;br /&gt;
&lt;br /&gt;
The error message states that the &amp;quot;directory not empty&amp;quot; and gives the path to that directory. If you go there with an FTP program you can see what is there and clean up. It could be just some empty subfolders that were leftover. Deleting these has been able to help. One can also delete the dir &amp;quot;moodledata/temp/backup&amp;quot; completely. That can take a bit longer but may solve several problems at once.&lt;br /&gt;
&lt;br /&gt;
==The process ends with: &amp;quot;XML error: not well-formed (invalid token) at line YYYY&amp;quot;. What can I do?==&lt;br /&gt;
&lt;br /&gt;
This problem can appear at any point in the restore process. It&#039;s caused when the XML parser detects something incorrect in the backup file that prevent correct operation. Usually, it&#039;s caused by some &amp;quot;illegal&amp;quot; characters added in the original course due to some copy/paste of text containing them (control characters, or invalid sequences...).&lt;br /&gt;
&lt;br /&gt;
The best method to handle this issue is:&lt;br /&gt;
&lt;br /&gt;
* Unzip the problematic backup file under one empty folder.&lt;br /&gt;
&lt;br /&gt;
* Open the moodle.xml with Firefox. It will show you where (exact char) the problem is happening.&lt;br /&gt;
&lt;br /&gt;
* Edit the moodle.xml file with some UTF8-compatible editor and delete such characters. Save changes.&lt;br /&gt;
&lt;br /&gt;
* Test the moodle.xml file again with Firefox until no error was displayed.&lt;br /&gt;
&lt;br /&gt;
* Zip everything again (all the folder contents but not the folder itself!).&lt;br /&gt;
&lt;br /&gt;
* Restore the course. It should work now.&lt;br /&gt;
&lt;br /&gt;
* Restore still not working? See the next question.&lt;br /&gt;
&lt;br /&gt;
Also, if possible, it&#039;s highly recommended to solve those problems in the original course too from Moodle itself. Once &amp;quot;repaired&amp;quot; there, problems will be out if you create new backup files in the future.&lt;br /&gt;
&lt;br /&gt;
==I Still get an XML error. How can I clean the borked XML file?==&lt;br /&gt;
&lt;br /&gt;
In some cases XML backup files may contain characters causing the restore process to abort, even after the steps described in the previous question. In such cases you may want to try the following:&lt;br /&gt;
&lt;br /&gt;
* Download the [http://repository.atlassian.com/atlassian-xml-cleaner/jars/atlassian-xml-cleaner-0.1.jar Atlassian XML Cleaner Utility] from the [http://confluence.atlassian.com/display/JIRA/Removing+invalid+characters+from+XML+backups JIRA Atlassian site].&lt;br /&gt;
&lt;br /&gt;
* Unzip the problematic Moodle backup file under one empty folder. Moodle will create the course file folders as long as the unclean moodle.xml file. Please unzip using the Moodle unzip feature.&lt;br /&gt;
&lt;br /&gt;
* Rename the unclean moodle.xml file to moodle-unclean.xml. &lt;br /&gt;
&lt;br /&gt;
* If you don&#039;t have access to your Moodle server&#039;s command prompt, using the Moodle zip feature, zip the moodle-unclean.xml file only, download the zip file locally and unzip it. It is very important to download the xml file in zipped format to avoid unwanted character encoding when transferring from an operating system to another.&lt;br /&gt;
&lt;br /&gt;
* Move the downloaded Atlassian XML Cleaner Utility in the same folder where is your moodle-unclean.xml file.&lt;br /&gt;
&lt;br /&gt;
* Issue the following command from the command prompt: &lt;br /&gt;
&lt;br /&gt;
 java -jar atlassian-xml-cleaner-0.1.jar moodle-unclean.xml &amp;gt; moodle.xml&lt;br /&gt;
&lt;br /&gt;
* If you launched the utility on your local computer, zip the just created (and hopefully cleaned) moodle.xml file and upload it in the same place from where you downloaded the moodle-unclean.xml file. Once uploaded, unzip it using the Moodle unzip feature.&lt;br /&gt;
&lt;br /&gt;
* Zip everything again (all the folder contents but the folder itself!).&lt;br /&gt;
&lt;br /&gt;
* Restore the course. It should work now.&lt;br /&gt;
&lt;br /&gt;
==What does &amp;quot;Some of your courses weren&#039;t saved!!&amp;quot; mean?==&lt;br /&gt;
&lt;br /&gt;
There are three possible causes of this problem:&lt;br /&gt;
# Error - this happens when the backup procedure has found an error and so hasn&#039;t finished the backup of a particular course. These are &amp;quot;controlled&amp;quot; errors and the scheduled backup continues with the next course.&lt;br /&gt;
# Unfinished - this happens when the backup procedure dies without knowing why. When the cron is next executed it detects that the last execution went wrong, and continues skipping the problematic course. A possible solution would be to raise the PHP/Apache limit in your installation (memory, time of execution...). By taking a look to your log tables you should be able to see if the &amp;quot;crash&amp;quot; is happening at exact time intervals (usually a problem with the max_execution_time php&#039;s variable), or if there is some exact point were all the courses are breaking (generally internal zip libraries, try to switch to external executables instead).&lt;br /&gt;
# Skipped - this happens when a course is unavailable to students and has not been changed in the last month (31 days). This isn&#039;t an error situation - it&#039;s a feature, especially useful for sites with many unavailable old courses, saving process time.&lt;br /&gt;
&lt;br /&gt;
==How can I restore pre 1.6 non-ISO-8859-1 backups to Moodle 1.6 (Unicode)?==&lt;br /&gt;
&lt;br /&gt;
Any backup files with contents which are not 100% ISO-8859-1 will be a problem to restore to Moodle 1.6 (and upwards) running under Unicode. Instead, please try the following:&lt;br /&gt;
&lt;br /&gt;
# Make a clean install of Moodle 1.5.x (the latest version available)&lt;br /&gt;
# Restore all your courses there (they should work if they were working originally)&lt;br /&gt;
# Upgrade your site to Moodle 1.6 and run the UTF-8 migration script&lt;br /&gt;
# Backup your courses again&lt;br /&gt;
&lt;br /&gt;
This will produce a new set of backup files that will be 100% UTF-8 and you will be able to use them with Moodle 1.6 without any problems.&lt;br /&gt;
&lt;br /&gt;
==Restoring a course results in broken HTML tags. What can I do?==&lt;br /&gt;
&lt;br /&gt;
This problem is due to a [http://bugs.php.net/bug.php?id=45996 PHP bug in libxml2 2.7.1] (the same bug reported with version 2.7.2). All HTML entities, such as &amp;amp;gt;, &amp;amp;lt; and &amp;amp;quot; are removed when a course is restored.&lt;br /&gt;
&lt;br /&gt;
To resolve the problem, you should use a different version of libxml2 such as 2.7.0 or 2.6.32.&lt;br /&gt;
&lt;br /&gt;
At Gentoo servers, you can use&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;&amp;gt;dev-libs/libxml2-2.6.32&amp;quot; &amp;gt;&amp;gt; /etc/portage/package.mask&lt;br /&gt;
&lt;br /&gt;
==Why are some courses being skipped?==&lt;br /&gt;
&lt;br /&gt;
From 1.6 onwards, course backups automatically skip courses which are unavailable to students and have not been changed in the last month.&lt;br /&gt;
&lt;br /&gt;
==Why does restore stop, rather than completing?==&lt;br /&gt;
&lt;br /&gt;
Attempting to restore a course to an older version of Moodle than the one the course was backed up on can result in the restore process failing to complete. To ensure a successful restore, make sure that the version of Moodle you are restoring the course to is the same, or newer, than the one the course was backed up on.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
*Using Moodle [http://moodle.org/mod/forum/view.php?f=128 Backup and Restore forum]&lt;br /&gt;
*[http://www.databasejournal.com/features/mysql/article.php/10897_3300511_2 databasejournal.com article on repairing database corruption in MySQL]&lt;br /&gt;
&lt;br /&gt;
Using Moodle forum discussions:&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=66708 Scheduled backup fails] including possible solution to &amp;quot;An error occurred while copying files&amp;quot;.&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=99338 Restore stops]&lt;br /&gt;
&lt;br /&gt;
[[Category:FAQ]]&lt;br /&gt;
[[Category:Backup]]&lt;br /&gt;
&lt;br /&gt;
[[es:FAQ Backup]]&lt;br /&gt;
[[pl:Backup FAQ]]&lt;br /&gt;
[[fr:FAQ de sauvegarde]]&lt;br /&gt;
[[ja:バックアップFAQ]]&lt;br /&gt;
[[pt:FAQ sobre cópias de segurança]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Subcourse_module&amp;diff=47052</id>
		<title>Subcourse module</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Subcourse_module&amp;diff=47052"/>
		<updated>2008-11-21T21:11:48Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: /* See also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The module provides very simple yet useful functionality. When added into a course, it behaves as a graded activity. The grade for each student is taken from a final grade in another course. Combined with metacourses, this allows course designers to organize courses into separate units.&lt;br /&gt;
&lt;br /&gt;
The module was created and is currently maintained by [[User:David Mudrak|David Mudrak]].&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
&lt;br /&gt;
The module uses PHP exceptions - PHP5 is needed. Use this module at production servers on your own risk - it has not been tested very much yet. On the other hand - you are warmly welcome to install, test and report any problems.&lt;br /&gt;
&lt;br /&gt;
* Moodle 1.9 - checkout [[CVS for Administrators|CVS]] HEAD or download [http://download.moodle.org/plugins/mod/subcourse.zip latest development build]&lt;br /&gt;
* Earlier version are not supported&lt;br /&gt;
&lt;br /&gt;
The source codes live in [[CVS for Administrators|CVS]] [http://cvs.moodle.org/contrib/plugins/mod/subcourse/ contrib/plugins/mod/subcourse]. To checkout the module, go to the Moodle mod/ directory and use:&lt;br /&gt;
 cvs -z3 -d:ext:myusername@cvs.moodle.org:/cvsroot/moodle co -d subcourse contrib/plugins/mod/subcourse&lt;br /&gt;
&lt;br /&gt;
==How to report a bug==&lt;br /&gt;
&lt;br /&gt;
Please, use [[Tracker]]. Subcourse if one of the components in &amp;quot;Non-core contributed modules&amp;quot; project.&lt;br /&gt;
&lt;br /&gt;
==Capabilities==&lt;br /&gt;
&lt;br /&gt;
{{Moodle 1.9}}&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;3&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Capability&lt;br /&gt;
!Description&lt;br /&gt;
!Status&lt;br /&gt;
|-&lt;br /&gt;
|mod/subcourse:begraded&lt;br /&gt;
|a user can be graded with the remote final grade&lt;br /&gt;
|implemented&lt;br /&gt;
|-&lt;br /&gt;
|mod/subcourse:fetchgrades&lt;br /&gt;
|a user can manually fetch grades from a remote course&lt;br /&gt;
|implemented&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=1775  Subcourse] in Modules and plugins database page for downloads and more information.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributed code]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Subcourse_module&amp;diff=47051</id>
		<title>Subcourse module</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Subcourse_module&amp;diff=47051"/>
		<updated>2008-11-21T21:11:18Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The module provides very simple yet useful functionality. When added into a course, it behaves as a graded activity. The grade for each student is taken from a final grade in another course. Combined with metacourses, this allows course designers to organize courses into separate units.&lt;br /&gt;
&lt;br /&gt;
The module was created and is currently maintained by [[User:David Mudrak|David Mudrak]].&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
&lt;br /&gt;
The module uses PHP exceptions - PHP5 is needed. Use this module at production servers on your own risk - it has not been tested very much yet. On the other hand - you are warmly welcome to install, test and report any problems.&lt;br /&gt;
&lt;br /&gt;
* Moodle 1.9 - checkout [[CVS for Administrators|CVS]] HEAD or download [http://download.moodle.org/plugins/mod/subcourse.zip latest development build]&lt;br /&gt;
* Earlier version are not supported&lt;br /&gt;
&lt;br /&gt;
The source codes live in [[CVS for Administrators|CVS]] [http://cvs.moodle.org/contrib/plugins/mod/subcourse/ contrib/plugins/mod/subcourse]. To checkout the module, go to the Moodle mod/ directory and use:&lt;br /&gt;
 cvs -z3 -d:ext:myusername@cvs.moodle.org:/cvsroot/moodle co -d subcourse contrib/plugins/mod/subcourse&lt;br /&gt;
&lt;br /&gt;
==How to report a bug==&lt;br /&gt;
&lt;br /&gt;
Please, use [[Tracker]]. Subcourse if one of the components in &amp;quot;Non-core contributed modules&amp;quot; project.&lt;br /&gt;
&lt;br /&gt;
==Capabilities==&lt;br /&gt;
&lt;br /&gt;
{{Moodle 1.9}}&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;3&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Capability&lt;br /&gt;
!Description&lt;br /&gt;
!Status&lt;br /&gt;
|-&lt;br /&gt;
|mod/subcourse:begraded&lt;br /&gt;
|a user can be graded with the remote final grade&lt;br /&gt;
|implemented&lt;br /&gt;
|-&lt;br /&gt;
|mod/subcourse:fetchgrades&lt;br /&gt;
|a user can manually fetch grades from a remote course&lt;br /&gt;
|implemented&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=1775  Subcourse] is a Modules and plugins database page for downloads and more information.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributed code]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Development:Language_API&amp;diff=46988</id>
		<title>Development:Language API</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Development:Language_API&amp;diff=46988"/>
		<updated>2008-11-20T23:22:02Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: more intro info based on the talk page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;This is a draft of a document that should define data structures and API to manipulate Moodle lang files.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Motivation==&lt;br /&gt;
&lt;br /&gt;
Moodle uses its own mechanism of translated strings and files storage. Other ways of handling localization files are sometimes requested. Some translators want to use gettext library (which is using .po files), some might want to export Moodle strings into custom format (eg. XML) to translate them with an external tool and import them back to Moodle. The Moodle Language API should enable to write additional plugins of strings and help files storage.&lt;br /&gt;
&lt;br /&gt;
This Language API should provide common interface for all future &#039;&#039;translation tools&#039;&#039; - it does not change the Moodle core itself. Current get_text() implementation is pretty well tuned, caching is supported and it is hopefully debugged. The work on this API started during the developement of several Moodle language tools - langchecker (searches for no-longer used strings in the English pack), langstats (translation progress monitor) and the new version of admin/lang.php interface.&lt;br /&gt;
&lt;br /&gt;
==Language pack URL==&lt;br /&gt;
&lt;br /&gt;
The type of API implementation is selected automatically acording to URL scheme. Currently, only &amp;quot;internal&amp;quot; plugin is supported which represents the traditional way of lang packs handling. Such pack should be referenced as&lt;br /&gt;
 &lt;br /&gt;
 internal://localhost/full/path/to/the/pack&lt;br /&gt;
&lt;br /&gt;
Other language pack repositories might be references as e.g.:&lt;br /&gt;
&lt;br /&gt;
 cvs://username:password@cvs.moodle.org/lang/cs_utf8&lt;br /&gt;
 gettext://localhost/full/path/to/the/pack&lt;br /&gt;
 xml://localhost/full/path/to/the/pack&lt;br /&gt;
&lt;br /&gt;
==API usage examples==&lt;br /&gt;
&lt;br /&gt;
Basic usage scenario - get a translated string:&lt;br /&gt;
&lt;br /&gt;
 $lang_path = $CFG-&amp;gt;dataroot.&amp;quot;/lang/&amp;quot;.current_language();&lt;br /&gt;
 $lang_repo = lang_pack_factory(&amp;quot;internal://localhost/&amp;quot;.$lang_path);&lt;br /&gt;
 $string = $lang_repo-&amp;gt;get_raw_string(&#039;identifier&#039;, &#039;module&#039;);&lt;br /&gt;
&lt;br /&gt;
Save a customized string translation:&lt;br /&gt;
&lt;br /&gt;
 $lang_path = $CFG-&amp;gt;dataroot.&amp;quot;/lang/&amp;quot;.current_language().&amp;quot;_local&amp;quot;;&lt;br /&gt;
 $lang_repo = lang_pack_factory(&amp;quot;internal://localhost/&amp;quot;.$lang_path);&lt;br /&gt;
 $lang_repo-&amp;gt;save_string(&#039;identifier&#039;, &#039;module&#039;, $translation);&lt;br /&gt;
&lt;br /&gt;
Commit translation into moodle.org repository:&lt;br /&gt;
&lt;br /&gt;
 $lang_repo = lang_pack_factory(&amp;quot;cvs://${username}:${password}@cvs.moodle.org/lang/{$langcode}&amp;quot;);&lt;br /&gt;
 $lang_repo-&amp;gt;save_module($module, $comment);&lt;br /&gt;
&lt;br /&gt;
==Language API implementations==&lt;br /&gt;
&lt;br /&gt;
[[Image:lang_api_classes.png|thumb|UML diagram of Language API classes]]&lt;br /&gt;
The Language API is defined as interface. Every plugin must implement this interface. The internal plugin (representing traditional way) will be implemented first.&lt;br /&gt;
&lt;br /&gt;
===Internal===&lt;br /&gt;
&lt;br /&gt;
The internal plugin is defined as&lt;br /&gt;
&lt;br /&gt;
 class lang_pack_internal implements lang_pack_api {...}&lt;br /&gt;
&lt;br /&gt;
The internal plugin will use sevaral classes:&lt;br /&gt;
&lt;br /&gt;
; lang_pack_internal : This represents the whole pack. It is implemented as a directory - e.g. $CFG-&amp;gt;dirroot/lang/en_utf8 or $CFG-&amp;gt;dataroot/lang/cs_utf8 etc.&lt;br /&gt;
&lt;br /&gt;
; lang_pack_internal_module : represents a single module of a given pack, defines the sub-context of translated texts. It is implemented as a file - e.g. moodle.php or qtype_multichoice.php.&lt;br /&gt;
&lt;br /&gt;
; lang_pack_internal_text : represents a single unit of text (word, sentence or whole page) that can be translated and then used in the UI. It is either one $string[] definition or a help file content.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
*  [[Development:Places to search for lang strings]].&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Development_talk:Language_API&amp;diff=46910</id>
		<title>Development talk:Language API</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Development_talk:Language_API&amp;diff=46910"/>
		<updated>2008-11-18T12:54:00Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: New section: Re: Performance issue&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;David, before documenting your proposed solution, please could you add a few words about the problem you are trying to solve. What is it about the current language file system that is not good enough?&lt;br /&gt;
&lt;br /&gt;
Please remember that one of the things the current system does very well is performance. All it has to do is look in some directories then load some PHP files that just define some variables (which any good PHP accelerator will pre-compile for you). Also note that it takes care to only load the files needed by the current page, and only loads each file once, and remembers the results.&lt;br /&gt;
&lt;br /&gt;
So if you are proposing a change, you may be expected to do before and after performance testing before the new system goes into core.&lt;br /&gt;
&lt;br /&gt;
== Re: Performance issue ==&lt;br /&gt;
&lt;br /&gt;
: Tim, thanks for your comments. Yes, I&#039;ve got performance impact on my mind. What I want to do is to write a very thin wrapper around the current functionality. Therefore, current implementation of get_string() will stay untouched as it is very well tuned and tested. The basic application of the proposed Language API will be the new translation interface which I am currently working on (AJAX based with some additional feature like search, search &amp;amp; replace etc.). Also, some additional tools (e.g. to create a duplicate of a current string in all language packs) are planned.&lt;br /&gt;
: When I was writing first concepts of these tools, I had an idea it might be useful to have general language API that is not bind to the current implementation but might enable other developers to write their own implementation. This API should enable to write a simple plugins that deals with translation in other ways (as said - XMl, PO files, direct CVS access etc.).&lt;br /&gt;
: So, to summarize - the Language API provides common interface for all future &#039;&#039;translation tools&#039;&#039;, not for the Moodle core itself.&lt;br /&gt;
: --[[User:David Mudrak|David Mudrak]] 06:54, 18 November 2008 (CST)&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=File:lang_api_classes.png&amp;diff=46909</id>
		<title>File:lang api classes.png</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=File:lang_api_classes.png&amp;diff=46909"/>
		<updated>2008-11-18T11:46:38Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: uploaded a new version of &amp;quot;Image:lang api classes.png&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Development:Language_API&amp;diff=46908</id>
		<title>Development:Language API</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Development:Language_API&amp;diff=46908"/>
		<updated>2008-11-18T11:45:45Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;This is a draft of a document that should define data structures and API to manipulate Moodle lang files.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Motivation==&lt;br /&gt;
&lt;br /&gt;
Moodle uses its own mechanism of translated strings and files storage. Other ways of handling localization files are sometimes requested. Some translators want to use gettext library (which is using .po files), some might want to export Moodle strings into custom format (eg. XML) to translate them with an external tool and import them back to Moodle. The Moodle Language API should enable to write additional plugins of strings and help files storage.&lt;br /&gt;
&lt;br /&gt;
==Language pack URL==&lt;br /&gt;
&lt;br /&gt;
The type of API implementation is selected automatically acording to URL scheme. Currently, only &amp;quot;internal&amp;quot; plugin is supported which represents the traditional way of lang packs handling. Such pack should be referenced as&lt;br /&gt;
 &lt;br /&gt;
 internal://localhost/full/path/to/the/pack&lt;br /&gt;
&lt;br /&gt;
Other language pack repositories might be references as e.g.:&lt;br /&gt;
&lt;br /&gt;
 cvs://username:password@cvs.moodle.org/lang/cs_utf8&lt;br /&gt;
 gettext://localhost/full/path/to/the/pack&lt;br /&gt;
 xml://localhost/full/path/to/the/pack&lt;br /&gt;
&lt;br /&gt;
==API usage examples==&lt;br /&gt;
&lt;br /&gt;
Basic usage scenario - get a translated string:&lt;br /&gt;
&lt;br /&gt;
 $lang_path = $CFG-&amp;gt;dataroot.&amp;quot;/lang/&amp;quot;.current_language();&lt;br /&gt;
 $lang_repo = lang_pack_factory(&amp;quot;internal://localhost/&amp;quot;.$lang_path);&lt;br /&gt;
 $string = $lang_repo-&amp;gt;get_raw_string(&#039;identifier&#039;, &#039;module&#039;);&lt;br /&gt;
&lt;br /&gt;
Save a customized string translation:&lt;br /&gt;
&lt;br /&gt;
 $lang_path = $CFG-&amp;gt;dataroot.&amp;quot;/lang/&amp;quot;.current_language().&amp;quot;_local&amp;quot;;&lt;br /&gt;
 $lang_repo = lang_pack_factory(&amp;quot;internal://localhost/&amp;quot;.$lang_path);&lt;br /&gt;
 $lang_repo-&amp;gt;save_string(&#039;identifier&#039;, &#039;module&#039;, $translation);&lt;br /&gt;
&lt;br /&gt;
Commit translation into moodle.org repository:&lt;br /&gt;
&lt;br /&gt;
 $lang_repo = lang_pack_factory(&amp;quot;cvs://${username}:${password}@cvs.moodle.org/lang/{$langcode}&amp;quot;);&lt;br /&gt;
 $lang_repo-&amp;gt;save_module($module, $comment);&lt;br /&gt;
&lt;br /&gt;
==Language API implementations==&lt;br /&gt;
&lt;br /&gt;
[[Image:lang_api_classes.png|thumb|UML diagram of Language API classes]]&lt;br /&gt;
The Language API is defined as interface. Every plugin must implement this interface. The internal plugin (representing traditional way) will be implemented first.&lt;br /&gt;
&lt;br /&gt;
===Internal===&lt;br /&gt;
&lt;br /&gt;
The internal plugin is defined as&lt;br /&gt;
&lt;br /&gt;
 class lang_pack_internal implements lang_pack_api {...}&lt;br /&gt;
&lt;br /&gt;
The internal plugin will use sevaral classes:&lt;br /&gt;
&lt;br /&gt;
; lang_pack_internal : This represents the whole pack. It is implemented as a directory - e.g. $CFG-&amp;gt;dirroot/lang/en_utf8 or $CFG-&amp;gt;dataroot/lang/cs_utf8 etc.&lt;br /&gt;
&lt;br /&gt;
; lang_pack_internal_module : represents a single module of a given pack, defines the sub-context of translated texts. It is implemented as a file - e.g. moodle.php or qtype_multichoice.php.&lt;br /&gt;
&lt;br /&gt;
; lang_pack_internal_text : represents a single unit of text (word, sentence or whole page) that can be translated and then used in the UI. It is either one $string[] definition or a help file content.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
*  [[Development:Places to search for lang strings]].&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=How_permissions_are_calculated&amp;diff=46856</id>
		<title>How permissions are calculated</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=How_permissions_are_calculated&amp;diff=46856"/>
		<updated>2008-11-17T20:02:29Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Link to the Czech version&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Roles}}&lt;br /&gt;
One of the most frequently asked question is: &#039;&#039;What are my permissions in this context?&#039;&#039; This article will document the function that Moodle uses to answer this question.  The article is written for non-programmers as well as programmers, since it describes &#039;&#039;what&#039;&#039; the function does, not &#039;&#039;how&#039;&#039;. The &#039;&#039;how&#039;&#039; is complicated. The &#039;&#039;what&#039;&#039; turns out to be relatively simple!  If you are a programmer and you insist on reading the code, look for &#039;&#039;has_capability()&#039;&#039; in &#039;&#039;lib/accesslib.php&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Given a user, a capability, and a context, &#039;&#039;has_capability()&#039;&#039; returns &#039;&#039;true&#039;&#039; if the user is allowed to perform the action controlled by the capability in the given context, and &#039;&#039;false&#039;&#039; otherwise.  In calculating the permission, the function considers all of the relevant permission data, which include role definitions, assignments, and overrides.&lt;br /&gt;
&lt;br /&gt;
Moodle never calculates a user&#039;s complete set of permissions.  To do so would be very costly and also wasteful, since most permissions are never tested. Instead, Moodle calculates permissions only as needed. It does not store the permissions that it calculates, but recalculates them every time it needs to test them. This is why role assignments and overrides no longer have delayed effects, as they did in Moodle 1.7 and 1.8.&lt;br /&gt;
&lt;br /&gt;
Incidentally, you can generate permission tables like the ones in this article using [[The rolesdebug.php roles debugging script]].&lt;br /&gt;
&lt;br /&gt;
==The calculation==&lt;br /&gt;
&lt;br /&gt;
When a user attempts an action that is controlled by a capability, Moodle calls has_capability to see if the action should be permitted.  The function is called as follows:&lt;br /&gt;
&lt;br /&gt;
    has_capability(CAP,CONTEXT,USER);&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
*CAP is the capability that controls the action (e.g., mod/quiz:attempt)&lt;br /&gt;
*CONTEXT is the context in which the capability is being tested&lt;br /&gt;
*USER is the user attempting the action&lt;br /&gt;
&lt;br /&gt;
The function returns a true/false result&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;true&#039;&#039;  means the user should be allowed to perform the action&lt;br /&gt;
* &#039;&#039;false&#039;&#039; means the user should be prevented from perfoming the action&lt;br /&gt;
&lt;br /&gt;
===Data used by the function===&lt;br /&gt;
&lt;br /&gt;
Suppose USER is about to attempt a quiz (&#039;&#039;CAP = mod/quiz:attempt&#039;&#039;) in a Module context nested four levels deep within System.  &lt;br /&gt;
&lt;br /&gt;
      System&lt;br /&gt;
         |&lt;br /&gt;
     Category A&lt;br /&gt;
         |					      &lt;br /&gt;
    Subcategory B&lt;br /&gt;
         |&lt;br /&gt;
       Course&lt;br /&gt;
         |&lt;br /&gt;
       Quiz  &amp;lt;--- the user is here&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The quiz module will call &#039;&#039;has_capability()&#039;&#039; to see if the user should be allowed to perform this action.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;has_capability()&#039;&#039; considers the following permission data:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;Role definitions&#039;&#039; (these are in the System context) &lt;br /&gt;
* &#039;&#039;Role assignments&#039;&#039; which may occur in any of the five contexts &lt;br /&gt;
* &#039;&#039;Role overrides&#039;&#039; which may occur in any of the contexts except System (there is no concept of override in System).  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;has_capability()&#039;&#039; ignores capabilities other than CAP.  This simplification lets us view each role or override as if it contains a &#039;&#039;single permission&#039;&#039; having one of the following values&lt;br /&gt;
&lt;br /&gt;
    N - Not set&lt;br /&gt;
    A - Allow&lt;br /&gt;
    P - Prevent&lt;br /&gt;
    X - Prohibit&lt;br /&gt;
&lt;br /&gt;
We use the following notation: for a role &#039;&#039;R1&#039;&#039; with permission &#039;&#039;P&#039;&#039;, we write &#039;&#039;R1(P)&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===An example===&lt;br /&gt;
&lt;br /&gt;
In the quiz example, suppose that the user has four roles (&#039;&#039;R1&#039;&#039;, &#039;&#039;R2&#039;&#039;, &#039;&#039;R3&#039;&#039;, and &#039;&#039;R4&#039;&#039;) and each of the roles has been assigned and overridden as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    0     System      &amp;lt;---- define R1(A), R2(N), R3(N), R4(P)&lt;br /&gt;
            |               assign R1&lt;br /&gt;
            |&lt;br /&gt;
    1   Category A    &amp;lt;-------------- overide R1(N) and R4(N)&lt;br /&gt;
            |                          &lt;br /&gt;
            |                          &lt;br /&gt;
    2  Subcategory B  &amp;lt;---- assign R2 and R3&lt;br /&gt;
            |&lt;br /&gt;
            |&lt;br /&gt;
    3     Course      &amp;lt;-------------- override R2(X) and R3(A)&lt;br /&gt;
            |&lt;br /&gt;
            |&lt;br /&gt;
    4     Quiz        &amp;lt;---- assign R4 and R1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that &#039;&#039;R1&#039;&#039; has been assigned in two different contexts. This is an unusual practice (it is probably someone&#039;s error), but since it is legal, we have to consider the possibility that it can happen.  In fact this entire example has been contrived to explore the edge cases of the algorithm.  In practice, the calculation of permissions is trivial and the function calculates the result you would expect based on common sense and simple mental analysis (for further discussion of this, see [[#A note about the algorithm|A note about the algorithm]] near the end of this article.&lt;br /&gt;
&lt;br /&gt;
===Representing the data in tabular form===&lt;br /&gt;
&lt;br /&gt;
We will set up a table to hold the permission data.  The table has&lt;br /&gt;
*a column for each context, ordered from highest level (System) to lowest (the context where we want to calculate the permission).&lt;br /&gt;
*a row for each context, also listed from highest to lowest.&lt;br /&gt;
&lt;br /&gt;
[[Image:Calculation-3A.png|Empty table]]&lt;br /&gt;
&lt;br /&gt;
The role definitions go in the first row.  Put each definition in the column(s) coresponding to the context(s) in which the role is assigned: &lt;br /&gt;
&lt;br /&gt;
[[Image:Calculation-5A.png|Table with assignments added]]&lt;br /&gt;
&lt;br /&gt;
The overrides go in the remaining rows.  Each override goes&lt;br /&gt;
*in the same column as the role being overridden&lt;br /&gt;
*in the row corresponding the context in which the override is made.&lt;br /&gt;
&lt;br /&gt;
To illustrate, let&#039;s add just one of the overrides:&lt;br /&gt;
&lt;br /&gt;
[[Image:Calculation-6A.png|Table with just one override]]&lt;br /&gt;
&lt;br /&gt;
R2(X) represents the override to role R2 made in the course context.  Let&#039;s add the rest of the overrides:&lt;br /&gt;
&lt;br /&gt;
[[Image:Calculation-7A.png|Table with remaining overrides shown]]&lt;br /&gt;
&lt;br /&gt;
The table is now fully populated, and we are ready to calculate the permission.&lt;br /&gt;
&lt;br /&gt;
===The algorithm===&lt;br /&gt;
&lt;br /&gt;
The algorithm follows a path through the table indicated by nodes and arrows in the diagram below and stops as soon as it has a conclusive result.&lt;br /&gt;
&lt;br /&gt;
[[Image:Algorithm_path_through_permission_table_A.png|Algorithm path through permissions data]]&lt;br /&gt;
&lt;br /&gt;
# If there is an X anywhere in the table, STOP.  The calculated permission is &#039;&#039;X&#039;&#039;&lt;br /&gt;
# Go to the START node&lt;br /&gt;
# If there is no next node, STOP.  The calculated permission is &#039;&#039;P&#039;&#039;&lt;br /&gt;
# Otherwise, follow the arrow to the next node&lt;br /&gt;
#Add the permissions in the node using the numerical equivalents: N = 0, A = +1, P = -1&lt;br /&gt;
#* If the sum is positive, STOP. The calculated permission is &#039;&#039;A&#039;&#039;&lt;br /&gt;
#* If the sum is negative, STOP. The calculated permission is &#039;&#039;P&#039;&#039;&lt;br /&gt;
#* If the sum is zero, GO TO step 3 &lt;br /&gt;
&lt;br /&gt;
Notice that the algorithm stops when either (1) a conclusive result is obtained, or (2) the algorithm reaches the last node without a conclusive result.&lt;br /&gt;
&lt;br /&gt;
===Applying the algorithm to our example===&lt;br /&gt;
&lt;br /&gt;
If we execute the algorithm with the quiz data, we stop at step 1 with a calculated permission of X.  That&#039;s not very interesting, so let&#039;s change the X to a P and see what happens:&lt;br /&gt;
&lt;br /&gt;
[[Image:Calculation-8A.png|Change X to P in permission table]]&lt;br /&gt;
&lt;br /&gt;
Run the algorithm:&lt;br /&gt;
&lt;br /&gt;
*There is No X in the table&lt;br /&gt;
*Go to the START node&lt;br /&gt;
*Go to the next node&lt;br /&gt;
*N + N = 0 &lt;br /&gt;
*the sum is zero; go to the next node&lt;br /&gt;
*A + P = 0&lt;br /&gt;
*the sum is zero; go to the next node&lt;br /&gt;
*P + A = 0&lt;br /&gt;
*the sum is zero; go to the next node&lt;br /&gt;
*N + N = 0 &lt;br /&gt;
*the sum is zero; go to the next node&lt;br /&gt;
*N = 0&lt;br /&gt;
*the sum is zero; go to the next node&lt;br /&gt;
*A = +1&lt;br /&gt;
*the sum is positive; STOP.  The calculated permission is &#039;&#039;A&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If the calculated permission is &#039;&#039;A&#039;&#039;, &#039;&#039;has_capability()&#039;&#039; returns &#039;&#039;true&#039;&#039;, and the user is allowed to perform the action.&lt;br /&gt;
&lt;br /&gt;
Had the calculated permission been &#039;&#039;P&#039;&#039; or &#039;&#039;X&#039;&#039;, &#039;&#039;has_capability()&#039;&#039; would not immediately return &#039;&#039;false&#039;&#039;. Rather, it would test if the user has &#039;&#039;moodle/site:doanything = Allow&#039;&#039; (since this permission trumps all others). The function does this by calling itself: &lt;br /&gt;
&lt;br /&gt;
    final result = has_capability(moodle/site:doanything,CONTEXT, USER);&lt;br /&gt;
&lt;br /&gt;
==A note about the algorithm==&lt;br /&gt;
&lt;br /&gt;
Earlier, we said that the algorithm &amp;quot;calculates the result you would expect.&amp;quot; But what do we expect?  Intuition tells us that permissions closer to the user should carry more weight than more distant permissions.  That&#039;s why we set up the table the way we did and why the algorithm walks the table in the order that it does.  The last column of the table represents the role assignment(s) closest to the user.  The second-to-last column represents the role assignent(s) that are next in terms of distance from the user, and so-on.  That&#039;s why the algorithm considers the columns from right-to-left.  Within a column, the algorithm searches upward in order to give higher weight to overrides that are closer to the user.  Once again, this matches our intuition about overrides.  If there are no overrides in a column (or the overrides are all Not set), the permission in the role definition is used.&lt;br /&gt;
&lt;br /&gt;
==Getting the result you expect==&lt;br /&gt;
&lt;br /&gt;
The calculation is more likely to give &amp;quot;the result you would expect&amp;quot; if you keep your permissions as simple as possible.  Therefore, we recommend the following &#039;rules&#039; for defining and overriding roles. If you understand the description of the calculation above, you should understand why they make sense.&lt;br /&gt;
&lt;br /&gt;
===When defining roles===&lt;br /&gt;
&lt;br /&gt;
... use Allow (A) for things you want the role to be able to do, and use Not set (N) for things you don&#039;t care about (which should include most things).&lt;br /&gt;
&lt;br /&gt;
===When overriding permissions===&lt;br /&gt;
&lt;br /&gt;
... leave the permission for every capability as Inherit (N) apart from the few you want to change. For those, use Allow (A) for things you want to allow, and Prevent (P) for things you want to prevent.&lt;br /&gt;
&lt;br /&gt;
===Only use prohibit in special roles===&lt;br /&gt;
&lt;br /&gt;
Prohibit exists to cover extreme scenarios such as the following: Suppose you have a naughty student who is posting inappropriate content in your Moodle site. You need to be able to remove their ability to contribute to public discussions until they have promised not to do it again, but during that time, you cannot completely block them from the resources, quizzes, etc. because they must keep up with their studying. Therefore, you need a way to block their access to specific capabilities e.g.  mod/forum:replypost in a way that cannot be overridden. You can do this by creating a special &#039;Naughty student&#039; role defined with the required permission(s) set to prohibit. Then when you are having problems with a user, you can temporarily assign them this role, either at site level or at course level.&lt;br /&gt;
&lt;br /&gt;
==A practical example==&lt;br /&gt;
&lt;br /&gt;
Suppose that a user, who is assigned the role of Course creator in category B, creates a course (becoming Teacher in the course) and then creates a Lesson within the course.  The user is about to edit the lesson (editing lessons is controlled by capability &#039;&#039;mod/lesson:edit&#039;&#039;).  Here is the permission data:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    0     System      &amp;lt;---- define Auth user(N), Creator(N), Teacher(A)&lt;br /&gt;
            |               assign Auth user&lt;br /&gt;
            |&lt;br /&gt;
    1   Category A&lt;br /&gt;
            |                          &lt;br /&gt;
            |                          &lt;br /&gt;
    2  Subcategory B  &amp;lt;---- assign Creator&lt;br /&gt;
            |&lt;br /&gt;
            |&lt;br /&gt;
    3     Course      &amp;lt;---- assign Teacher&lt;br /&gt;
            |&lt;br /&gt;
            |&lt;br /&gt;
    4    Lesson       &amp;lt;---- user attempts to edit lesson&lt;br /&gt;
&lt;br /&gt;
We set up the table and populate it with permission data.&lt;br /&gt;
&lt;br /&gt;
[[Image:Calculation-10A.png|A practical example]]&lt;br /&gt;
&lt;br /&gt;
Since there are no overrides, the table only has data in the first row.  The algorithm quickly calculates a permission of &#039;&#039;A&#039;&#039; and returns true.  The user is allowed to edit the Lesson!&lt;br /&gt;
&lt;br /&gt;
Now suppose Teacher is overridden in the Lesson context with &#039;&#039;mod/lesson:edit = P&#039;&#039;.  Then the table changes&lt;br /&gt;
&lt;br /&gt;
[[Image:Calculation-11A.png|A practical example with first override]]&lt;br /&gt;
&lt;br /&gt;
and clearly the user is no longer allowed to edit the Lesson.&lt;br /&gt;
&lt;br /&gt;
But suppose the administrator (or whoever is making the overrides) decided instead to override the &#039;&#039;Creator role&#039;&#039;, setting &#039;&#039;mod/lesson:edit = Prevent&#039;&#039; in the Categoy B context:&lt;br /&gt;
&lt;br /&gt;
[[Image:Calculation-12A.png|A practical example with second override]]             &lt;br /&gt;
&lt;br /&gt;
Much to everyone&#039;s surprise, the user is still allowed to edit the Lesson!  If you understood this article, you shouldn&#039;t be surprised, and you should be able to explain what happened.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*Using Moodle [http://moodle.org/mod/forum/discuss.php?d=90140 Logged in: what role am I?] and [http://moodle.org/mod/forum/discuss.php?d=66782 What happens if a user has multiple roles in a course?] forum discussions.  &lt;br /&gt;
&lt;br /&gt;
There is a script that you can use to create tables like the ones in this article.  It is very useful for debugging roles-related problems.  See [[The rolesdebug.php roles debugging script]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Roles]]&lt;br /&gt;
&lt;br /&gt;
[[fr:Comment les permissions sont calculées ?]]&lt;br /&gt;
[[cs:Jak se vypočítávají oprávnění]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Development:Language_API&amp;diff=46852</id>
		<title>Development:Language API</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Development:Language_API&amp;diff=46852"/>
		<updated>2008-11-17T16:46:01Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: New page: &amp;#039;&amp;#039;This is a draft of Language API proposal that should define data structures and API to manipulate Moodle lang files.&amp;#039;&amp;#039;  [[Image:lang_api_classes.png|thumb|UML diagram of Language API cla...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;This is a draft of Language API proposal that should define data structures and API to manipulate Moodle lang files.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Image:lang_api_classes.png|thumb|UML diagram of Language API classes]]&lt;br /&gt;
From the conceptual point of view, the Language API consists of three hierarchical layers. These layers are abstracted as three object classes - see the attached UML diagram.&lt;br /&gt;
; language_pack : This represents the whole pack with its own repository, maintainer etc. At the moment, it is implemented as a directory - e.g. $CFG-&amp;gt;dirroot/lang/en_utf8 or $CFG-&amp;gt;dataroot/lang/cs_utf8 etc. Other implementations should be possible in the future.&lt;br /&gt;
* public &#039;&#039;&#039;$id&#039;&#039;&#039; - lang pack code, e.g. &#039;en_utf8&#039;&lt;br /&gt;
* public &#039;&#039;&#039;$name&#039;&#039;&#039; - human readable pack name, e.g. &#039;English with my customizations&#039;&lt;br /&gt;
* public &#039;&#039;&#039;$location&#039;&#039;&#039; - where the lang pack is saved. Currently this will be the full path to the root directory. Might be some general URI format in the future, e.g. filesystem://path/to/the/directory or dbstorage://database.server/user/password or git://git.repository/lang etc.&lt;br /&gt;
* public &#039;&#039;&#039;load_modules()&#039;&#039;&#039; - initializes all modules included in the language pack&lt;br /&gt;
&lt;br /&gt;
; language_module : represents a single module of a given pack, defines the sub-context of translated texts. At the moment, it is implemented as a file - e.g. moodle.php or qtype_multichoice.php. Other implementations should be possible in the future.&lt;br /&gt;
; language_string : represents a single unit of text (word, sentence or whole page) that can be translated and then used in the UI. At the moment, this is either one $string[] definition or a help file content.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
*  [[Development:Places to search for lang strings]].&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=File:lang_api_classes.png&amp;diff=46851</id>
		<title>File:lang api classes.png</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=File:lang_api_classes.png&amp;diff=46851"/>
		<updated>2008-11-17T16:20:31Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=User:David_Mudrak&amp;diff=46850</id>
		<title>User:David Mudrak</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=User:David_Mudrak&amp;diff=46850"/>
		<updated>2008-11-17T16:16:50Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:mudrd8mz.jpg|left]] Currently I&#039;m an ICT teacher at [http://www.gfxs.cz a high school in Liberec] and a researcher at [http://www.cuni.cz Charles University] in Prague, Czech republic - [http://www.pedf.cuni.cz Faculty of Education] - [http://it.pedf.cuni.cz Department of Information Technology and Education]. My Ph.D. research was focused on so called &amp;quot;invariant elements&amp;quot; of ICT education, i.e. those knowledge and skills which are independent on technology platform being used or/and the content of education - such as &amp;quot;structure decomposition&amp;quot;. That&#039;s why I&#039;m very interested in ConceptMaps (see [http://cmap.ihmc.us CMapTools]).&lt;br /&gt;
&lt;br /&gt;
I`m translating Moodle into Czech (as a hobby;-)) and keeping unofficial Czech Moodle site [http://moodle.cz moodle.cz]. &lt;br /&gt;
&lt;br /&gt;
My favourite software includes [http://www.vim.org/ ViM], [http://www.latex-project.org/ LaTeX], [http://mutt.org/ Mutt], [http://sim-icq.sourceforge.net/ SIM], [http://www.mozilla.org/products/firefox/ FireFox], [http://www.mplayerhq.hu/ MPlayer], [http://www.xmms.org/ XMMS], [http://skype.com/ Skype], and [http://www.jpilot.org/ jpilot].&lt;br /&gt;
&lt;br /&gt;
I`m using Moodle as a tool supporting my face2face lessons. Use it - it&#039;s really good...&lt;br /&gt;
&lt;br /&gt;
==My drafts==&lt;br /&gt;
&lt;br /&gt;
* [[Using GIT to backup moodledata]]&lt;br /&gt;
* [[Development:Language API]]&lt;br /&gt;
&lt;br /&gt;
==My bookmarks==&lt;br /&gt;
&lt;br /&gt;
* [[Development:Places to search for lang strings]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Capabilities/mod/forum:replypost&amp;diff=46023</id>
		<title>Capabilities/mod/forum:replypost</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Capabilities/mod/forum:replypost&amp;diff=46023"/>
		<updated>2008-11-01T00:34:54Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*This allows a user to reply to forum posts&lt;br /&gt;
*This does not apply to News forums - use [[Capabilities/mod/forum:replynews|mod/forum:replynews]] instead&lt;br /&gt;
&lt;br /&gt;
[[Category:Capabilities|Forum]]&lt;br /&gt;
[[Category:Forum]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Capabilities/mod/forum:replynews&amp;diff=46022</id>
		<title>Capabilities/mod/forum:replynews</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Capabilities/mod/forum:replynews&amp;diff=46022"/>
		<updated>2008-11-01T00:33:31Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Moodle 1.8}}&lt;br /&gt;
*This allows a user to reply to posts in a News forum&lt;br /&gt;
*This applies to News forums only - use [[Capabilities/mod/forum:replypost|mod/forum:replypost]] in other forum types &lt;br /&gt;
&lt;br /&gt;
[[Category:Capabilities|Forum]]&lt;br /&gt;
[[Category:Forum]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Capabilities/mod/forum:addnews&amp;diff=46021</id>
		<title>Capabilities/mod/forum:addnews</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Capabilities/mod/forum:addnews&amp;diff=46021"/>
		<updated>2008-11-01T00:32:08Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: relation with startdiscussion&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Moodle 1.8}}&lt;br /&gt;
*This allows a user to start discussions in a News forum&lt;br /&gt;
*This applies to News forums only - use [[Capabilities/mod/forum:startdiscussion|mod/forum:startdiscussion]] in other forum types&lt;br /&gt;
&lt;br /&gt;
[[Category:Capabilities|Forum]]&lt;br /&gt;
[[Category:Forum]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Capabilities/mod/forum:startdiscussion&amp;diff=46020</id>
		<title>Capabilities/mod/forum:startdiscussion</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Capabilities/mod/forum:startdiscussion&amp;diff=46020"/>
		<updated>2008-11-01T00:30:08Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: relation with addnews&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*This allows a user to start forum discussions&lt;br /&gt;
*This does not apply to News forum - use [[Capabilities/mod/forum:addnews|mod/forum:addnews]] instead&lt;br /&gt;
&lt;br /&gt;
[[Category:Capabilities|Forum]]&lt;br /&gt;
[[Category:Forum]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Translation&amp;diff=46019</id>
		<title>Translation</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Translation&amp;diff=46019"/>
		<updated>2008-10-31T21:28:35Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: /* Maintenance of a standard language pack */ MDL-17094&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Moodle has been designed for internationalisation. Each &#039;string&#039; or &#039;page&#039; of text that is displayed as part of the interface is drawn from a set of language files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Structure of a Moodle language pack ==&lt;br /&gt;
&lt;br /&gt;
All Moodle language packs may be found in the &#039;&#039;lang&#039;&#039; folder, with each language in a unique folder named the same as the language short name e.g. &#039;&#039;es&#039;&#039;, &#039;&#039;nl&#039;&#039;. You can find the &#039;&#039;lang&#039;&#039; folder in &#039;&#039;moodledata&#039;&#039;, with pack names indicating they are UTF-8 language packs e.g. &#039;&#039;es_utf8&#039;&#039;, &#039;&#039;nl_utf8&#039;&#039;. The default English language pack, &#039;&#039;en_utf8&#039;&#039;, is in &#039;&#039;moodle/lang&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
All the main files are in the &#039;&#039;lang/xx_utf8&#039;&#039; folder, with .php extensions (eg &#039;&#039;moodle.php&#039;&#039;, &#039;&#039;resource.php&#039;&#039; etc).  These files contains short phrases, often called &amp;quot;strings&amp;quot;. Each string supports variable substitution, to support variable ordering in different languages.&lt;br /&gt;
&lt;br /&gt;
:e.g. &amp;lt;code&amp;gt;$strdueby = get_string(&amp;quot;assignmentdueby&amp;quot;, &amp;quot;assignment&amp;quot;, userdate($date));&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:If a string doesn&#039;t exist in a particular language, then the equivalent in English will automatically be used instead.&lt;br /&gt;
&lt;br /&gt;
:There is also a &#039;&#039;help&#039;&#039; folder containing HTML pages for pop-up context-sensitive help.&lt;br /&gt;
&lt;br /&gt;
Installation language packs may be found in the &#039;&#039;install/lang&#039;&#039; folder. These language packs contain only the strings needed for the installation process. The files are generated automatically every night by the download.moodle.org server and &#039;&#039;&#039;must not be changed manually&#039;&#039;&#039;. For translators this is a unusual experience, since changes you add to the strings used in the installation script will not be visible until 24 hours later in a new download of your 1.6 and onwards installation.&lt;br /&gt;
&lt;br /&gt;
==Creating a new language pack==&lt;br /&gt;
&lt;br /&gt;
If your language is not yet supported by Moodle, you may want to start a new translation.  If you are starting a new language, please contact [[User:koen roggemans|Koen Roggemans]] our Translation Coordinator (&#039;&#039;translation@moodle.org&#039;&#039;). You may also like to post in the Using Moodle [http://moodle.org/mod/forum/view.php?id=43 Languages Forum].&lt;br /&gt;
&lt;br /&gt;
By default, an administrator can only edit a local language pack, not the master language pack. If you are not involved in translation work, you should only edit your local language pack to ensure that your changes are not overwritten by every update/upgrade of Moodle or the Moodle language packs. The documentation on how to edit languages as administrator, not translator are on the [[Language editing]] page.&lt;br /&gt;
&lt;br /&gt;
In Moodle 1.9 onwards, if you are a translator, you need to give yourself the right to maintain the master language pack. To do so, log in as an administrator, go to &#039;&#039;Site administration &amp;gt; Users &amp;gt; Define roles&#039;&#039;, then edit the Administrator role and set the capability &amp;quot;Edit master language packages&amp;quot; to allow.&lt;br /&gt;
&lt;br /&gt;
Now you are capable of editing master language packs, you need to create a new folder in the lang directory using the 2-letter code for your language. You can find these standard codes in &#039;&#039;lib/languages.php&#039;&#039;. If you are making a local variation of another language, use the code of that language with an underscore and a meaningful two letter extension (e.g. pt for Portuguese and pt_br for Brasilian variation of the Portuguese language pack). Add _utf8 at the end (eg sr_utf8). Only UTF-8 language packs are possible.&lt;br /&gt;
&lt;br /&gt;
Next, copy the &#039;&#039;langconfig.php&#039;&#039; from the &amp;quot;moodle/lang/en_utf8&amp;quot; folder to that newly created folder. Modify langconfig.php in a way that the settings match your language. Since Moodle 1.6, only UTF-8 is used as characterset. This setting is located in a string named &amp;quot;thischarset&amp;quot; in &#039;&#039;langconfig.php&#039;&#039; and should not be changed. All other settings for your language pack, as the notation of dates, the locale string, the direction etc. are in this file and can be changed there. Just be careful! ;-) Ask for help if necessary.&lt;br /&gt;
&lt;br /&gt;
You are now ready to start inserting new strings by editing your language... see below for details on this.&lt;br /&gt;
&lt;br /&gt;
Note that your new language pack may not show up immediately on the dropdown list if under your site configuration you have langcache set to &amp;quot;Yes.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Translating the Moodle interface language files (the &amp;quot;string&amp;quot; files)==&lt;br /&gt;
&lt;br /&gt;
# Log on to your Moodle server as an administrator.&lt;br /&gt;
# Go to Site Administration &amp;gt;&amp;gt; Language &amp;gt;&amp;gt; Language editing, which is the build in Moodle language editor page.&lt;br /&gt;
# On this page you can choose for &amp;quot;Local string customisation&amp;quot; or &amp;quot;Language pack maintaining&amp;quot;. Only choose &amp;quot;Language pack maintaining&amp;quot; if you are maintainer of a language pack. You need to change the setting in the administrator role as described above to get this screen.&lt;br /&gt;
# Choose your language from the menu, then choose &amp;quot;Edit words or phrases&amp;quot;.&lt;br /&gt;
# You should see forms you can edit for each file. If you do not, then you may have to make sure that the files are writable - you may have to change file permissions in your moodledata/lang folder.&lt;br /&gt;
# The forms consist of two columns, the first is that string in English and the name of each string, the second is the translation in the current language.&lt;br /&gt;
# Edit missing strings in each files (highlighted in colour), remembering to hit the &amp;quot;Save changes&amp;quot; button at the end of each form.&lt;br /&gt;
# You&#039;ll notice expressions in bold like &#039;&#039;&#039;$a-&amp;gt;something&#039;&#039;&#039;. These are variables, used by moodle and should NEVER be translated or changed! Note that there is nowhere in the expression a space allowed.&lt;br /&gt;
# It&#039;s OK to leave strings empty - Moodle will simply use the parent language for that string instead. You can define the parent language in langconfig.php, otherwise English is always used by default.&lt;br /&gt;
# A quick way to see all the missing strings is by using the link to &amp;quot;Check untranslated words or phrases&amp;quot;. Leave the untranslated strings completely empty or this handy tool won&#039;t work.&lt;br /&gt;
&lt;br /&gt;
==Translating the help files==&lt;br /&gt;
&lt;br /&gt;
There is a built-in editor in Moodle to translate the help files. It uses the en_utf8 language pack as a reference language. You are strongly advised to use this editor: it cleans out some possible problems, it marks (with stars in the drop down list) which files are out of date and takes care of Unicode.&lt;br /&gt;
If you want another language than English as a reference (which is not a good idea), you copy a help file from the reference language pack and paste it on the same location in your own language pack. Then use a plain text editor with Unicode support to translate the file, making sure not to modify any code in the file (there usually is no code, just HTML-tags). (DON&#039;T USE A WORDPROCESSOR to write the help-files because these programs add too much rubbish to the files).&lt;br /&gt;
Don&#039;t leave untranslated help files or empty files in your language pack.&lt;br /&gt;
&lt;br /&gt;
Take care to write the helpfiles XHTML-compliant. This means in short:&lt;br /&gt;
&lt;br /&gt;
* All tags should be closed: &amp;lt;pre&amp;gt;&amp;lt;p&amp;gt;lalala&amp;lt;/p&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
* All elements should be nested: &amp;lt;pre&amp;gt;&amp;lt;p&amp;gt; lalala &amp;lt;em&amp;gt;lalala&amp;lt;/em&amp;gt; &amp;lt;/p&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
* All elements and attributes must be lower case&lt;br /&gt;
* All atributes should be written in full and with quotes : &amp;lt;pre&amp;gt;&amp;lt;p align=&amp;quot;right&amp;quot;&amp;gt; lalala &amp;lt;/p&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Empty elements must end with /&amp;gt;: &amp;lt;pre&amp;gt;&amp;lt;br /&amp;gt; &amp;lt;hr /&amp;gt;&amp;lt;/pre&amp;gt;. You should add an extra space before the &amp;quot;/&amp;quot; symbol.&lt;br /&gt;
* An &amp;lt;img should have an alt=&amp;quot;&amp;quot; (it can be empty) en must be closed like other empty elements with a space and /&amp;gt; like &amp;lt;pre&amp;gt;&amp;lt;img alt=&amp;quot;&amp;quot; src=&amp;quot;picture.gif&amp;quot; /&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &amp;lt;?= and &amp;lt;? should be &amp;lt;pre&amp;gt;&amp;lt;?php&amp;lt;/pre&amp;gt;&lt;br /&gt;
* There should not be ANY font tags at all. &amp;lt;pre&amp;gt;&amp;lt;p&amp;gt;&amp;lt;em&amp;gt; &amp;lt;h1&amp;gt; &amp;lt;h2&amp;gt;&amp;lt;/pre&amp;gt; etc should be enough for the language files ...&lt;br /&gt;
&lt;br /&gt;
None of the files in the help folder need a doc type, html, body, head opening and closing tags - these files are included with &#039;&#039;help.php&#039;&#039;. The script will take care of welforming the pages. This means also there is not much room for HTML creativity! Please stick to the English example.&lt;br /&gt;
&lt;br /&gt;
Clicking on &amp;quot;Check for missing strings&amp;quot; in the language administration screen will also show you what files you are missing. If you have missing files then Moodle will use the parent language instead, so don&#039;t leave copies of untranslated help files in your language pack or this handy tool won&#039;t work.&lt;br /&gt;
&lt;br /&gt;
==Submitting your language pack to the Moodle project==&lt;br /&gt;
&lt;br /&gt;
Sharing your translation with Moodle will ensure that you help other people who speak your language. Your interface language will be available in future versions of Moodle. Note that a translation doesn&#039;t need to be complete before submitting - any improvement or start of a new translation is welcome.&lt;br /&gt;
&lt;br /&gt;
For a new language pack, you simply archive your whole new language directory as a zip file and email it to &#039;&#039;translation@moodle.org&#039;&#039;. For improvements to an existing language pack, please contact the language pack maintainer and ask how you can help. See [[Translation credits]] page for contact details of language pack maintainers.&lt;br /&gt;
&lt;br /&gt;
Check list you can use before committing:&lt;br /&gt;
&lt;br /&gt;
* No empty files?&lt;br /&gt;
* No untranslated files or strings (English) used in the submitted files?&lt;br /&gt;
* Help files not edited with a word processor?&lt;br /&gt;
* README file contains language, name and email address of the translator?&lt;br /&gt;
* Folder name is the right language code (check &#039;&#039;moodle\lib\languages.php&#039;&#039;)?&lt;br /&gt;
* Does the language pack run error free on a test site?&lt;br /&gt;
* Are the strings and files XHTML compliant?&lt;br /&gt;
* Does &#039;&#039;langconfig.php&#039;&#039; exists and is it correct?&lt;br /&gt;
* No Byte Order Marks in your files (is always OK if you used the build in Moodle language editor)&lt;br /&gt;
* Nowhere $a-&amp;gt;something translated? No spaces in those expressions?&lt;br /&gt;
&lt;br /&gt;
==Maintenance of a standard language pack==&lt;br /&gt;
&lt;br /&gt;
If you are committed to maintaining a language in Moodle, it&#039;s best to use [[CVS for Developers|Moodle CVS]] so that you have an up-to-date version of Moodle, and can easily &amp;quot;check in&amp;quot; your changes directly into the Moodle project. &lt;br /&gt;
&lt;br /&gt;
* Always check out the very latest Moodle code: You should always use HEAD to do translation.&lt;br /&gt;
* Upgrade your site. Of course you use a NON-PRODUCTION server for this.  &lt;br /&gt;
* Go to your dataroot directory and check out the new lang directory from CVS there like this on Unix/Linux&lt;br /&gt;
&lt;br /&gt;
   cd moodledata    (for example)&lt;br /&gt;
   cvs -z3 -d:ext:me@cvs.moodle.org:/cvsroot/moodle co lang&lt;br /&gt;
&lt;br /&gt;
or to checkout just a single language pack (Czech in the following example)&lt;br /&gt;
&lt;br /&gt;
   cd moodledata    (for example)&lt;br /&gt;
   cvs -z3 -d:ext:me@cvs.moodle.org:/cvsroot/moodle co lang/cs_utf8&lt;br /&gt;
&lt;br /&gt;
* Do not forget to set the correct file system permission so the process of your web server can modify checked-out files.&lt;br /&gt;
&lt;br /&gt;
To do a checkout with Tortoise on Windows, &lt;br /&gt;
&lt;br /&gt;
   right click on your dataroot folder, choose &amp;quot;CVS Checkout&amp;quot;, &lt;br /&gt;
   CVSROOT field:  :ext:me@cvs.moodle.org:/cvsroot/moodle&lt;br /&gt;
   Module: lang&lt;br /&gt;
&lt;br /&gt;
* Edit languages from within the Moodle GUI.&lt;br /&gt;
&lt;br /&gt;
* Check your files into CVS, by going into the dataroot/lang directory and commit your changes.&lt;br /&gt;
&lt;br /&gt;
If you really want to continue updating the language packs for 1.5.x or earlier, then you should zip the folder of your langpack and mail it to &#039;&#039;translation@moodle.org&#039;&#039;. CVS write access on moodle/lang/xx will be moved to lang/xx_utf8.&lt;br /&gt;
&lt;br /&gt;
Please contact &#039;&#039;translation@moodle.org&#039;&#039; if you need help setting this up.&lt;br /&gt;
&lt;br /&gt;
===CVS checkout is replaced during Moodle upgrade===&lt;br /&gt;
&lt;br /&gt;
During Moodle upgrade, the current language pack is automatically updated from download.moodle.org. For translators working with CVS, this replaces their CVS checkouts by the &amp;quot;static&amp;quot; non-CVS pack from moodle.org. To disable this, one just needs add&lt;br /&gt;
&lt;br /&gt;
 $CFG-&amp;gt;skiplangupgrade = true;&lt;br /&gt;
&lt;br /&gt;
to their config.php and keep their language pack up-to-date manually. This is intended for lang pack maintainers with CVS access only! Keep in mind that your language pack &#039;&#039;&#039;must&#039;&#039;&#039; be up-to-date before you run upgrade. See http://tracker.moodle.org/browse/MDL-17094 for more info.&lt;br /&gt;
&lt;br /&gt;
==Translation of contributed code==&lt;br /&gt;
&lt;br /&gt;
The language files of contributed [http://moodle.org/mod/data/view.php?id=6009 modules and plugins] (including blocks, filters, authentication plugins, assignment types, data fields, data presets, enrolment plugins, course formats, question types, course reports, quiz reports and resource types) reside in the lang folder within the module or plugin folder e.g. &#039;&#039;moodle/mod/modulename/lang/ln_utf8&#039;&#039;. When you wish to translate such a module, you can find the English language file in the lang/en_utf8 folder of the module or plugin. Translate this file, using a UTF-8 aware text editor, and save it in an appropriate new language folder &#039;&#039;/lang/XX_utf8/filname.php&#039;&#039; in the module or plugin folder. Please don&#039;t forget to send the translated file to the maintainer of the component, whose address may be found in the readme file in the module or plugin folder. This will ensure that your work doesn&#039;t get lost in an upgrade and is available for use by other Moodlers.&lt;br /&gt;
&lt;br /&gt;
These translations should never go in your main Moodle language pack.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*Using Moodle [http://moodle.org/mod/forum/view.php?id=43 Languages Forum] - news and discussion about issues that affect translations&lt;br /&gt;
*[[Translation credits]]&lt;br /&gt;
*To keep in touch with changes in the project on a day-to-day basis it is recommended that you subscribe to the [http://lists.moodle.org CVS (commits) mailing list]. This helps to keep your translation as close to the English text as possible.&lt;br /&gt;
*Using Moodle [http://moodle.org/mod/forum/discuss.php?d=75088 Automatic update of language package while updating in 1.9] forum discussion&lt;br /&gt;
*[[Using variables in localization strings]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
[[Category:Language]]&lt;br /&gt;
&lt;br /&gt;
[[es:Traducciones]]&lt;br /&gt;
[[fr:Traduction]]&lt;br /&gt;
[[ja:翻訳]]&lt;br /&gt;
[[nl:Vertalen]]&lt;br /&gt;
[[sk:Preklad]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Course_ordering_and_invoicing&amp;diff=45638</id>
		<title>Course ordering and invoicing</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Course_ordering_and_invoicing&amp;diff=45638"/>
		<updated>2008-10-21T14:42:24Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: VAT suppport&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The module allows authenticated users to fill course enrolment order form. Payment reminder is sent automatically. Administrator has to manually approve the order, eg. according to a bank account listings. After approving the order, the invoice is emailed to the users. Supports VAT calculation (since 1.9). The module uses its own enrolment plugin that has to be installed. It may be useful for sites where users must pay to be enrolled into a course but for some reasons, [[PayPal]] and other plugins can not be used.&lt;br /&gt;
&lt;br /&gt;
Both the module and the enrolment plugin were created and are currently maintained by [[User:David Mudrak|David Mudrak]].&lt;br /&gt;
&lt;br /&gt;
==Screenshots==&lt;br /&gt;
&lt;br /&gt;
[[Image:cord001-orderform.png|thumb|The ordering form|200px|left]]&lt;br /&gt;
[[Image:cord002-totalcostcalc.png|thumb|Order confirmation|200px|left]]&lt;br /&gt;
[[Image:cord003-myorders.png|thumb|List of user&#039;s orders|200px|left]]&lt;br /&gt;
[[Image:cord004-approvedorders.png|thumb|The list of all approved orders|200px|left]]&lt;br /&gt;
[[Image:cord005-invoice.png|thumb|Example of PDF invoice produced by the module|200px|left]]&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installation of the module==&lt;br /&gt;
&lt;br /&gt;
* Moodle 1.8 - checkout [[CVS]] MOODLE_18_STABLE branch or download [http://download.moodle.org/plugins18/mod/cord.zip the 1.8 build]&lt;br /&gt;
* Moodle 1.9 - checkout [[CVS]] MOODLE_19_STABLE branch or download [http://download.moodle.org/plugins19/mod/cord.zip the 1.9 build]&lt;br /&gt;
&lt;br /&gt;
The source codes of the module live in [[CVS]] [http://cvs.moodle.org/contrib/plugins/mod/cord/ contrib/plugins/mod/cord]. To checkout the MOODLE_19_STABLE branch of the module, go to the Moodle mod/ directory and use:&lt;br /&gt;
 cvs -z3 -d:ext:myusername@cvs.moodle.org:/cvsroot/moodle co -d cord -r MOODLE_19_STABLE contrib/plugins/mod/cord&lt;br /&gt;
&lt;br /&gt;
==Installation of the enrolment plugin==&lt;br /&gt;
&lt;br /&gt;
* Moodle 1.8 - you can use standard [[External database enrolment]] plugin to control enrolments&lt;br /&gt;
* Moodle 1.9 - checkout [[CVS]] MOODLE_19_STABLE branch or download [http://download.moodle.org/plugins19/enrol/cord.zip the 1.9 build] of the enrolment plugin&lt;br /&gt;
&lt;br /&gt;
The source codes of the enrolment plugin live in [[CVS]] [http://cvs.moodle.org/contrib/plugins/enrol/cord/ contrib/plugins/enrol/cord]. To checkout the MOODLE_19_STABLE branch of the plugin, go to the Moodle enrol/ directory and use:&lt;br /&gt;
 cvs -z3 -d:ext:myusername@cvs.moodle.org:/cvsroot/moodle co -d cord -r MOODLE_19_STABLE contrib/plugins/enrol/cord&lt;br /&gt;
&lt;br /&gt;
As usually, visit your /admin page to finish the installation.&lt;br /&gt;
&lt;br /&gt;
==Post-installation setup==&lt;br /&gt;
&lt;br /&gt;
===Moodle 1.9 specific===&lt;br /&gt;
* configure and enable the enrolment plugin&lt;br /&gt;
&lt;br /&gt;
===Moodle 1.8 specific===&lt;br /&gt;
&lt;br /&gt;
The module saves the information about confirmed course orders into its own table. This table can be used by [[External database enrolment]] plugin to control enrolments. You need to configure your Moodle site to use External database enrolment to use this module.&lt;br /&gt;
&lt;br /&gt;
# Go to the Administration &amp;gt; Courses &amp;gt; Enrolments&lt;br /&gt;
# Edit settings of External Database&lt;br /&gt;
#* enrol_dbtype, enrol_dbhost, enrol_dbuser, enrol_dbpass, enrol_dbname - set these fields point to the Moodle database itself, i.e. use the same values as are in your [[config.php]]&lt;br /&gt;
#* enrol_dbtable =  mdl_cord_enrolments (use your own prefix instead of mdl_ if you have such one)&lt;br /&gt;
#* enrol_localcoursefield = id&lt;br /&gt;
#* enrol_localuserfield = id&lt;br /&gt;
#* enrol_db_localrolefield = shortname&lt;br /&gt;
#* enrol_remotecoursefield = courseid&lt;br /&gt;
#* enrol_remoteuserfield = userid&lt;br /&gt;
#* enrol_db_defaultcourseroleid = default&lt;br /&gt;
#* enrol_db_autocreate = No&lt;br /&gt;
# Enable External Database plugin&lt;br /&gt;
&lt;br /&gt;
===Create an instance of the module===&lt;br /&gt;
# Usually, you will want just one instance of the module. The Front page is a good place for it.&lt;br /&gt;
# Override desired roles and allow them to order courses (mod/cord:ordercourse). You will probably want to allow [[Authenticated user role]] to order your courses.&lt;br /&gt;
&lt;br /&gt;
===Set up the courses===&lt;br /&gt;
# Only courses with not-zero cost can be orderd using Course ordering and invoicing module. Set the cost of all orders you want to offer your students&lt;br /&gt;
# Do not forget to change course setting &#039;Course enrollable&#039; to &#039;No&#039; to prevent users from direct enrolment&lt;br /&gt;
&lt;br /&gt;
==How to customize the invoice==&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
==How to report a bug==&lt;br /&gt;
&lt;br /&gt;
Please, use [[Tracker]]. Course ordering if one of the components in &amp;quot;Non-core contributed modules&amp;quot; project. See the list of tracked issues at http://tracker.moodle.org/browse/CONTRIB/component/10327.&lt;br /&gt;
&lt;br /&gt;
==Capabilities==&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;3&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Capability&lt;br /&gt;
!Description&lt;br /&gt;
!Status&lt;br /&gt;
|-&lt;br /&gt;
|mod/cord:ordercourse&lt;br /&gt;
|a user can submit course ordering form&lt;br /&gt;
|implemented&lt;br /&gt;
|-&lt;br /&gt;
|mod/cord:manageorders&lt;br /&gt;
|a user can approve or delete submitted orders&lt;br /&gt;
|implemented&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==UML diagrams==&lt;br /&gt;
&lt;br /&gt;
[[Image:corduml-uc-usersactions.png|thumb|Use case: User&#039;s actions|300px|left]]&lt;br /&gt;
[[Image:corduml-uc-adminsactions.png|thumb|Use case: Admin&#039;s actions|300px|left]]&lt;br /&gt;
[[Image:corduml-erd.png|thumb|ER diagram:Module tables and relationships|300px|left]]&lt;br /&gt;
[[Image:corduml-sq-orderproc.png|thumb|Sequence diagram:Order processing|300px|left]]&lt;br /&gt;
[[Image:corduml-st-orderproc.png|thumb|State diagram:Order processing|300px|left]]&lt;br /&gt;
[[Image:corduml-cl-courseorder.png|thumb|Class diagram:Course order classes|300px|left]]&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=1693 Modules and plugins database record]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Course_ordering_and_invoicing&amp;diff=45555</id>
		<title>Course ordering and invoicing</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Course_ordering_and_invoicing&amp;diff=45555"/>
		<updated>2008-10-20T22:45:10Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Added new enrolment plugin info&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The module allows authenticated users to fill course enrolment order form. Payment reminder is sent automatically. Administrator has to manually approve the order, eg. according to a bank account listings. After approving the order, the invoice is emailed to the users. The module uses its own enrolment plugin that has to be installed. It may be useful for sites where users must pay to be enrolled into a course but for some reasons, [[PayPal]] and other plugins can not be used.&lt;br /&gt;
&lt;br /&gt;
Both the module and the enrolment plugin were created and are currently maintained by [[User:David Mudrak|David Mudrak]].&lt;br /&gt;
&lt;br /&gt;
==Screenshots==&lt;br /&gt;
&lt;br /&gt;
[[Image:cord001-orderform.png|thumb|The ordering form|200px|left]]&lt;br /&gt;
[[Image:cord002-totalcostcalc.png|thumb|Order confirmation|200px|left]]&lt;br /&gt;
[[Image:cord003-myorders.png|thumb|List of user&#039;s orders|200px|left]]&lt;br /&gt;
[[Image:cord004-approvedorders.png|thumb|The list of all approved orders|200px|left]]&lt;br /&gt;
[[Image:cord005-invoice.png|thumb|Example of PDF invoice produced by the module|200px|left]]&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installation of the module==&lt;br /&gt;
&lt;br /&gt;
* Moodle 1.8 - checkout [[CVS]] MOODLE_18_STABLE branch or download [http://download.moodle.org/plugins18/mod/cord.zip the 1.8 build]&lt;br /&gt;
* Moodle 1.9 - checkout [[CVS]] MOODLE_19_STABLE branch or download [http://download.moodle.org/plugins19/mod/cord.zip the 1.9 build]&lt;br /&gt;
&lt;br /&gt;
The source codes of the module live in [[CVS]] [http://cvs.moodle.org/contrib/plugins/mod/cord/ contrib/plugins/mod/cord]. To checkout the MOODLE_19_STABLE branch of the module, go to the Moodle mod/ directory and use:&lt;br /&gt;
 cvs -z3 -d:ext:myusername@cvs.moodle.org:/cvsroot/moodle co -d cord -r MOODLE_19_STABLE contrib/plugins/mod/cord&lt;br /&gt;
&lt;br /&gt;
==Installation of the enrolment plugin==&lt;br /&gt;
&lt;br /&gt;
* Moodle 1.8 - you can use standard [[External database enrolment]] plugin to control enrolments&lt;br /&gt;
* Moodle 1.9 - checkout [[CVS]] MOODLE_19_STABLE branch or download [http://download.moodle.org/plugins19/enrol/cord.zip the 1.9 build] of the enrolment plugin&lt;br /&gt;
&lt;br /&gt;
The source codes of the enrolment plugin live in [[CVS]] [http://cvs.moodle.org/contrib/plugins/enrol/cord/ contrib/plugins/enrol/cord]. To checkout the MOODLE_19_STABLE branch of the plugin, go to the Moodle enrol/ directory and use:&lt;br /&gt;
 cvs -z3 -d:ext:myusername@cvs.moodle.org:/cvsroot/moodle co -d cord -r MOODLE_19_STABLE contrib/plugins/enrol/cord&lt;br /&gt;
&lt;br /&gt;
As usually, visit your /admin page to finish the installation.&lt;br /&gt;
&lt;br /&gt;
==Post-installation setup==&lt;br /&gt;
&lt;br /&gt;
===Moodle 1.9 specific===&lt;br /&gt;
* configure and enable the enrolment plugin&lt;br /&gt;
&lt;br /&gt;
===Moodle 1.8 specific===&lt;br /&gt;
&lt;br /&gt;
The module saves the information about confirmed course orders into its own table. This table can be used by [[External database enrolment]] plugin to control enrolments. You need to configure your Moodle site to use External database enrolment to use this module.&lt;br /&gt;
&lt;br /&gt;
# Go to the Administration &amp;gt; Courses &amp;gt; Enrolments&lt;br /&gt;
# Edit settings of External Database&lt;br /&gt;
#* enrol_dbtype, enrol_dbhost, enrol_dbuser, enrol_dbpass, enrol_dbname - set these fields point to the Moodle database itself, i.e. use the same values as are in your [[config.php]]&lt;br /&gt;
#* enrol_dbtable =  mdl_cord_enrolments (use your own prefix instead of mdl_ if you have such one)&lt;br /&gt;
#* enrol_localcoursefield = id&lt;br /&gt;
#* enrol_localuserfield = id&lt;br /&gt;
#* enrol_db_localrolefield = shortname&lt;br /&gt;
#* enrol_remotecoursefield = courseid&lt;br /&gt;
#* enrol_remoteuserfield = userid&lt;br /&gt;
#* enrol_db_defaultcourseroleid = default&lt;br /&gt;
#* enrol_db_autocreate = No&lt;br /&gt;
# Enable External Database plugin&lt;br /&gt;
&lt;br /&gt;
===Create an instance of the module===&lt;br /&gt;
# Usually, you will want just one instance of the module. The Front page is a good place for it.&lt;br /&gt;
# Override desired roles and allow them to order courses (mod/cord:ordercourse). You will probably want to allow [[Authenticated user role]] to order your courses.&lt;br /&gt;
&lt;br /&gt;
===Set up the courses===&lt;br /&gt;
# Only courses with not-zero cost can be orderd using Course ordering and invoicing module. Set the cost of all orders you want to offer your students&lt;br /&gt;
# Do not forget to change course setting &#039;Course enrollable&#039; to &#039;No&#039; to prevent users from direct enrolment&lt;br /&gt;
&lt;br /&gt;
==How to customize the invoice==&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
==How to report a bug==&lt;br /&gt;
&lt;br /&gt;
Please, use [[Tracker]]. Course ordering if one of the components in &amp;quot;Non-core contributed modules&amp;quot; project. See the list of tracked issues at http://tracker.moodle.org/browse/CONTRIB/component/10327.&lt;br /&gt;
&lt;br /&gt;
==Capabilities==&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;3&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Capability&lt;br /&gt;
!Description&lt;br /&gt;
!Status&lt;br /&gt;
|-&lt;br /&gt;
|mod/cord:ordercourse&lt;br /&gt;
|a user can submit course ordering form&lt;br /&gt;
|implemented&lt;br /&gt;
|-&lt;br /&gt;
|mod/cord:manageorders&lt;br /&gt;
|a user can approve or delete submitted orders&lt;br /&gt;
|implemented&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==UML diagrams==&lt;br /&gt;
&lt;br /&gt;
[[Image:corduml-uc-usersactions.png|thumb|Use case: User&#039;s actions|300px|left]]&lt;br /&gt;
[[Image:corduml-uc-adminsactions.png|thumb|Use case: Admin&#039;s actions|300px|left]]&lt;br /&gt;
[[Image:corduml-erd.png|thumb|ER diagram:Module tables and relationships|300px|left]]&lt;br /&gt;
[[Image:corduml-sq-orderproc.png|thumb|Sequence diagram:Order processing|300px|left]]&lt;br /&gt;
[[Image:corduml-st-orderproc.png|thumb|State diagram:Order processing|300px|left]]&lt;br /&gt;
[[Image:corduml-cl-courseorder.png|thumb|Class diagram:Course order classes|300px|left]]&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=1693 Modules and plugins database record]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Backup_and_restore_FAQ&amp;diff=45473</id>
		<title>Backup and restore FAQ</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Backup_and_restore_FAQ&amp;diff=45473"/>
		<updated>2008-10-18T13:01:32Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: /* Restoring a course results in broken HTML tags. What can I do? */ libxml2 2.7.2 still buggy&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==What are the pros and cons of course versus site backups?==&lt;br /&gt;
&lt;br /&gt;
[[Site backup|Site backups]] are recommended in order to have all data saved with the best confidence and the shortest recovery time.&lt;br /&gt;
&lt;br /&gt;
[[Automated course backup|Automated course backups]] are more expensive in terms of time and CPU usage. The recovery time to have your site running again is longer. Course backups are useful for obtaining &amp;quot;fresh&amp;quot; copies of courses to be re-used or distributed individually, however they should never be used as a primary backup system (unless your hosting doesn&#039;t allow the preferred site backups). &lt;br /&gt;
&lt;br /&gt;
==What data is not contained in course backups?==&lt;br /&gt;
&lt;br /&gt;
By selecting all the options when setting up the backup you can include almost all the data in the course. However you should be aware of the fact that some things are not backed up:&lt;br /&gt;
* Quiz questions are only backed up if at least one question from their category has been added to a quiz.&lt;br /&gt;
* Scales are only backed up if they are used by at least one activity.&lt;br /&gt;
&lt;br /&gt;
==The process ends with: &amp;quot;Error: An error occurred deleting old backup data&amp;quot;. What should I do?==&lt;br /&gt;
&lt;br /&gt;
This part of the backup (or restore) procedure tries to delete old info, used in previous executions, performing the following tasks:&lt;br /&gt;
&lt;br /&gt;
# Delete old records from &amp;quot;backup_ids&amp;quot; table: Check the table exists, repair it and try again.&lt;br /&gt;
# Delete old records from &amp;quot;backup_files&amp;quot; table: Check the table exists, repair it and try again.&lt;br /&gt;
# Delete old files from &amp;quot;moodledata/temp/backup&amp;quot;: Delete the dir completely and try again.&lt;br /&gt;
&lt;br /&gt;
[[Image:BackupProblem.gif|thumb|Backup error message]]For points 1 &amp;amp; 2, there are various ways of repairing tables, including using MySQL Admin.&lt;br /&gt;
For point 3 see below:&lt;br /&gt;
&lt;br /&gt;
The error message states that the &amp;quot;directory not empty&amp;quot; and gives the path to that directory. If you go there with an FTP program you can see what is there and clean up. It could be just some empty subfolders that were leftover. Deleting these has been able to help. One can also delete the dir &amp;quot;moodledata/temp/backup&amp;quot; completely. That can take a bit longer but may solve several problems at once.&lt;br /&gt;
&lt;br /&gt;
==The process ends with: &amp;quot;XML error: not well-formed (invalid token) at line YYYY&amp;quot;. What can I do?==&lt;br /&gt;
&lt;br /&gt;
This problem can appear at any point in the restore process. It&#039;s caused when the XML parser detects something incorrect in the backup file that prevent correct operation. Usually, it&#039;s caused by some &amp;quot;illegal&amp;quot; characters added in the original course due to some copy/paste of text containing them (control characters, or invalid sequences...).&lt;br /&gt;
&lt;br /&gt;
The best method to handle this issue is:&lt;br /&gt;
&lt;br /&gt;
* Unzip the problematic backup file under one empty folder.&lt;br /&gt;
&lt;br /&gt;
* Open the moodle.xml with Firefox. It will show you where (exact char) the problem is happening.&lt;br /&gt;
&lt;br /&gt;
* Edit the moodle.xml file with some UTF8-compatible editor and delete such characters. Save changes.&lt;br /&gt;
&lt;br /&gt;
* Test the moodle.xml file again with Firefox until no error was displayed.&lt;br /&gt;
&lt;br /&gt;
* Zip everything again (all the folder contents but not the folder itself!).&lt;br /&gt;
&lt;br /&gt;
* Restore the course. It should work now.&lt;br /&gt;
&lt;br /&gt;
* Restore still not working? See the next question.&lt;br /&gt;
&lt;br /&gt;
Also, if possible, it&#039;s highly recommended to solve those problems in the original course too from Moodle itself. Once &amp;quot;repaired&amp;quot; there, problems will be out if you create new backup files in the future.&lt;br /&gt;
&lt;br /&gt;
==I Still get an XML error. How can I clean the borked XML file?==&lt;br /&gt;
&lt;br /&gt;
In some cases XML backup files may contain characters causing the restore process to abort, even after the steps described in the previous question. In such cases you may want to try the following:&lt;br /&gt;
&lt;br /&gt;
* Download the [http://repository.atlassian.com/atlassian-xml-cleaner/jars/atlassian-xml-cleaner-0.1.jar Atlassian XML Cleaner Utility] from the [http://confluence.atlassian.com/display/JIRA/Removing+invalid+characters+from+XML+backups JIRA Atlassian site].&lt;br /&gt;
&lt;br /&gt;
* Unzip the problematic Moodle backup file under one empty folder. Moodle will create the course file folders as long as the unclean moodle.xml file. Please unzip using the Moodle unzip feature.&lt;br /&gt;
&lt;br /&gt;
* Rename the unclean moodle.xml file to moodle-unclean.xml. &lt;br /&gt;
&lt;br /&gt;
* If you don&#039;t have access to your Moodle server&#039;s command prompt, using the Moodle zip feature, zip the moodle-unclean.xml file only, download the zip file locally and unzip it. It is very important to download the xml file in zipped format to avoid unwanted character encoding when transferring from an operating system to another.&lt;br /&gt;
&lt;br /&gt;
* Move the downloaded Atlassian XML Cleaner Utility in the same folder where is your moodle-unclean.xml file.&lt;br /&gt;
&lt;br /&gt;
* Issue the following command from the command prompt: &lt;br /&gt;
&lt;br /&gt;
 java -jar atlassian-xml-cleaner-0.1.jar moodle-unclean.xml &amp;gt; moodle.xml&lt;br /&gt;
&lt;br /&gt;
* If you launched the utility on your local computer, zip the just created (and hopefully cleaned) moodle.xml file and upload it in the same place from where you downloaded the moodle-unclean.xml file. Once uploaded, unzip it using the Moodle unzip feature.&lt;br /&gt;
&lt;br /&gt;
* Zip everything again (all the folder contents but the folder itself!).&lt;br /&gt;
&lt;br /&gt;
* Restore the course. It should work now.&lt;br /&gt;
&lt;br /&gt;
==What does &amp;quot;Some of your courses weren&#039;t saved!!&amp;quot; mean?==&lt;br /&gt;
&lt;br /&gt;
There are three possible causes of this problem:&lt;br /&gt;
# Error - this happens when the backup procedure has found an error and so hasn&#039;t finished the backup of a particular course. These are &amp;quot;controlled&amp;quot; errors and the scheduled backup continues with the next course.&lt;br /&gt;
# Unfinished - this happens when the backup procedure dies without knowing why. When the cron is next executed it detects that the last execution went wrong, and continues skipping the problematic course. A possible solution would be to raise the PHP/Apache limit in your installation (memory, time of execution...). By taking a look to your log tables you should be able to see if the &amp;quot;crash&amp;quot; is happening at exact time intervals (usually a problem with the max_execution_time php&#039;s variable), or if there is some exact point were all the courses are breaking (generally internal zip libraries, try to switch to external executables instead).&lt;br /&gt;
# Skipped - this happens when a course is unavailable to students and has not been changed in the last month (31 days). This isn&#039;t an error situation - it&#039;s a feature, especially useful for sites with many unavailable old courses, saving process time.&lt;br /&gt;
&lt;br /&gt;
==How can I restore pre 1.6 non-ISO-8859-1 backups to Moodle 1.6 (Unicode)?==&lt;br /&gt;
&lt;br /&gt;
Any backup files with contents which are not 100% ISO-8859-1 will be a problem to restore to Moodle 1.6 (and upwards) running under Unicode. Instead, please try the following:&lt;br /&gt;
&lt;br /&gt;
# Make a clean install of Moodle 1.5.x (the latest version available)&lt;br /&gt;
# Restore all your courses there (they should work if they were working originally)&lt;br /&gt;
# Upgrade your site to Moodle 1.6 and run the UTF-8 migration script&lt;br /&gt;
# Backup your courses again&lt;br /&gt;
&lt;br /&gt;
This will produce a new set of backup files that will be 100% UTF-8 and you will be able to use them with Moodle 1.6 without any problems.&lt;br /&gt;
&lt;br /&gt;
==Restoring a course results in broken HTML tags. What can I do?==&lt;br /&gt;
&lt;br /&gt;
This problem is due to a [http://bugs.php.net/bug.php?id=45996 PHP bug in libxml2 2.7.1] (the same bug reported with version 2.7.2). All HTML entities, such as &amp;amp;gt;, &amp;amp;lt; and &amp;amp;quot; are removed when a course is restored.&lt;br /&gt;
&lt;br /&gt;
To resolve the problem, you should use a different version of libxml2 such as 2.7.0 or 2.6.32.&lt;br /&gt;
&lt;br /&gt;
==Why are some courses being skipped?==&lt;br /&gt;
&lt;br /&gt;
From 1.6 onwards, course backups automatically skip courses which are unavailable to students and have not been changed in the last month.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
*Using Moodle [http://moodle.org/mod/forum/view.php?f=128 Backup and Restore forum]&lt;br /&gt;
*[http://www.databasejournal.com/features/mysql/article.php/10897_3300511_2 databasejournal.com article on repairing database corruption in MySQL]&lt;br /&gt;
&lt;br /&gt;
Using Moodle forum discussions:&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=66708 Scheduled backup fails] including possible solution to &amp;quot;An error occurred while copying files&amp;quot;.&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=99338 Restore stops]&lt;br /&gt;
&lt;br /&gt;
[[Category:FAQ]]&lt;br /&gt;
[[Category:Backup]]&lt;br /&gt;
&lt;br /&gt;
[[es:FAQ Backup]]&lt;br /&gt;
[[pl:Backup FAQ]]&lt;br /&gt;
[[fr:FAQ de sauvegarde]]&lt;br /&gt;
[[ja:バックアップFAQ]]&lt;br /&gt;
[[pt:FAQ sobre cópias de segurança]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Course_ordering_and_invoicing&amp;diff=44371</id>
		<title>Course ordering and invoicing</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Course_ordering_and_invoicing&amp;diff=44371"/>
		<updated>2008-09-25T14:24:53Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: /* Post-installation setup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The module allows authenticated users to fill course enrolment order form. Payment reminder is sent automatically. Administrator has to manually approve the order, eg. according to a bank account listings. After approving the order, the invoice is emailed to the users.&lt;br /&gt;
&lt;br /&gt;
The module uses [[External database enrolment]] plugin. It may be useful for sites where users must pay to be enrolled into a course but for some reasons, [[PayPal]] and other plugins can not be used.&lt;br /&gt;
&lt;br /&gt;
The module was created and is currently maintained by [[User:David Mudrak|David Mudrak]].&lt;br /&gt;
&lt;br /&gt;
==Screenshots==&lt;br /&gt;
&lt;br /&gt;
[[Image:cord001-orderform.png|thumb|The ordering form|200px|left]]&lt;br /&gt;
[[Image:cord002-totalcostcalc.png|thumb|Order confirmation|200px|left]]&lt;br /&gt;
[[Image:cord003-myorders.png|thumb|List of user&#039;s orders|200px|left]]&lt;br /&gt;
[[Image:cord004-approvedorders.png|thumb|The list of all approved orders|200px|left]]&lt;br /&gt;
[[Image:cord005-invoice.png|thumb|Example of PDF invoice produced by the module|200px|left]]&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
&lt;br /&gt;
* Moodle 1.8 - checkout [[CVS]] MOODLE_18_STABLE branch or download [http://download.moodle.org/plugins18/mod/cord.zip the 1.8 build]&lt;br /&gt;
* Moodle 1.9 - checkout [[CVS]] MOODLE_19_STABLE branch or download [http://download.moodle.org/plugins19/mod/cord.zip the 1.9 build]&lt;br /&gt;
&lt;br /&gt;
The source codes live in [[CVS]] [http://cvs.moodle.org/contrib/plugins/mod/cord/ contrib/plugins/mod/cord]. To checkout the MOODLE_19_STABLE branch of the module, go to the Moodle mod/ directory and use:&lt;br /&gt;
 cvs -z3 -d:ext:myusername@cvs.moodle.org:/cvsroot/moodle co -d cord -r MOODLE_19_STABLE contrib/plugins/mod/cord&lt;br /&gt;
&lt;br /&gt;
As usually, visit your /admin page to finish the installation.&lt;br /&gt;
&lt;br /&gt;
==Post-installation setup==&lt;br /&gt;
&lt;br /&gt;
===Set up external DB enrolment===&lt;br /&gt;
&lt;br /&gt;
The module saves the information about confirmed course orders into its own table. This table can be used by [[External database enrolment]] plugin to control enrolments. You need to configure your Moodle site to use External database enrolment to use this module.&lt;br /&gt;
&lt;br /&gt;
# Go to the Administration &amp;gt; Courses &amp;gt; Enrolments&lt;br /&gt;
# Edit settings of External Database&lt;br /&gt;
#* enrol_dbtype, enrol_dbhost, enrol_dbuser, enrol_dbpass, enrol_dbname - set these fields point to the Moodle database itself, i.e. use the same values as are in your [[config.php]]&lt;br /&gt;
#* enrol_dbtable =  mdl_cord_enrolments (use your own prefix instead of mdl_ if you have such one)&lt;br /&gt;
#* enrol_localcoursefield = id&lt;br /&gt;
#* enrol_localuserfield = id&lt;br /&gt;
#* enrol_db_localrolefield = shortname&lt;br /&gt;
#* enrol_remotecoursefield = courseid&lt;br /&gt;
#* enrol_remoteuserfield = userid&lt;br /&gt;
#* enrol_db_defaultcourseroleid = default&lt;br /&gt;
#* enrol_db_autocreate = No&lt;br /&gt;
# Enable External Database plugin&lt;br /&gt;
&lt;br /&gt;
===Create an instance of the module===&lt;br /&gt;
# Usually, you will want just one instance of the module. The Front page is a good place for it.&lt;br /&gt;
# Override desired roles and allow them to order courses (mod/cord:ordercourse). You will probably want to allow [[Authenticated user role]] to order your courses.&lt;br /&gt;
&lt;br /&gt;
===Set up the courses===&lt;br /&gt;
# Only courses with not-zero cost can be orderd using Course ordering and invoicing module. Set the cost of all orders you want to offer your students&lt;br /&gt;
# Do not forget to change course setting &#039;Course enrollable&#039; to &#039;No&#039; to prevent users from direct enrolment&lt;br /&gt;
&lt;br /&gt;
==How to customize the invoice==&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
==How to report a bug==&lt;br /&gt;
&lt;br /&gt;
Please, use [[Tracker]]. Course ordering if one of the components in &amp;quot;Non-core contributed modules&amp;quot; project. See the list of tracked issues at http://tracker.moodle.org/browse/CONTRIB/component/10327.&lt;br /&gt;
&lt;br /&gt;
==Capabilities==&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;3&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Capability&lt;br /&gt;
!Description&lt;br /&gt;
!Status&lt;br /&gt;
|-&lt;br /&gt;
|mod/cord:ordercourse&lt;br /&gt;
|a user can submit course ordering form&lt;br /&gt;
|implemented&lt;br /&gt;
|-&lt;br /&gt;
|mod/cord:manageorders&lt;br /&gt;
|a user can approve or delete submitted orders&lt;br /&gt;
|implemented&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==UML diagrams==&lt;br /&gt;
&lt;br /&gt;
[[Image:corduml-uc-usersactions.png|thumb|Use case: User&#039;s actions|300px|left]]&lt;br /&gt;
[[Image:corduml-uc-adminsactions.png|thumb|Use case: Admin&#039;s actions|300px|left]]&lt;br /&gt;
[[Image:corduml-erd.png|thumb|ER diagram:Module tables and relationships|300px|left]]&lt;br /&gt;
[[Image:corduml-sq-orderproc.png|thumb|Sequence diagram:Order processing|300px|left]]&lt;br /&gt;
[[Image:corduml-st-orderproc.png|thumb|State diagram:Order processing|300px|left]]&lt;br /&gt;
[[Image:corduml-cl-courseorder.png|thumb|Class diagram:Course order classes|300px|left]]&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=1693 Modules and plugins database record]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Course_ordering_and_invoicing&amp;diff=44370</id>
		<title>Course ordering and invoicing</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Course_ordering_and_invoicing&amp;diff=44370"/>
		<updated>2008-09-25T14:01:00Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: /* Post-installation setup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The module allows authenticated users to fill course enrolment order form. Payment reminder is sent automatically. Administrator has to manually approve the order, eg. according to a bank account listings. After approving the order, the invoice is emailed to the users.&lt;br /&gt;
&lt;br /&gt;
The module uses [[External database enrolment]] plugin. It may be useful for sites where users must pay to be enrolled into a course but for some reasons, [[PayPal]] and other plugins can not be used.&lt;br /&gt;
&lt;br /&gt;
The module was created and is currently maintained by [[User:David Mudrak|David Mudrak]].&lt;br /&gt;
&lt;br /&gt;
==Screenshots==&lt;br /&gt;
&lt;br /&gt;
[[Image:cord001-orderform.png|thumb|The ordering form|200px|left]]&lt;br /&gt;
[[Image:cord002-totalcostcalc.png|thumb|Order confirmation|200px|left]]&lt;br /&gt;
[[Image:cord003-myorders.png|thumb|List of user&#039;s orders|200px|left]]&lt;br /&gt;
[[Image:cord004-approvedorders.png|thumb|The list of all approved orders|200px|left]]&lt;br /&gt;
[[Image:cord005-invoice.png|thumb|Example of PDF invoice produced by the module|200px|left]]&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
&lt;br /&gt;
* Moodle 1.8 - checkout [[CVS]] MOODLE_18_STABLE branch or download [http://download.moodle.org/plugins18/mod/cord.zip the 1.8 build]&lt;br /&gt;
* Moodle 1.9 - checkout [[CVS]] MOODLE_19_STABLE branch or download [http://download.moodle.org/plugins19/mod/cord.zip the 1.9 build]&lt;br /&gt;
&lt;br /&gt;
The source codes live in [[CVS]] [http://cvs.moodle.org/contrib/plugins/mod/cord/ contrib/plugins/mod/cord]. To checkout the MOODLE_19_STABLE branch of the module, go to the Moodle mod/ directory and use:&lt;br /&gt;
 cvs -z3 -d:ext:myusername@cvs.moodle.org:/cvsroot/moodle co -d cord -r MOODLE_19_STABLE contrib/plugins/mod/cord&lt;br /&gt;
&lt;br /&gt;
As usually, visit your /admin page to finish the installation.&lt;br /&gt;
&lt;br /&gt;
==Post-installation setup==&lt;br /&gt;
&lt;br /&gt;
===Set up external DB enrolment===&lt;br /&gt;
&lt;br /&gt;
The module saves the information about confirmed course orders into its own table. This table can be used by [[External database enrolment]] plugin to control enrolments. You need to configure your Moodle site to use External database enrolment to use this module.&lt;br /&gt;
&lt;br /&gt;
# Go to the Administration &amp;gt; Courses &amp;gt; Enrolments&lt;br /&gt;
# Edit settings of External Database&lt;br /&gt;
#* enrol_dbtype, enrol_dbhost, enrol_dbuser, enrol_dbpass, enrol_dbname - set these fields point to the Moodle database itself, i.e. use the same values as are in your [[config.php]]&lt;br /&gt;
#* enrol_dbtable =  mdl_cord_enrolments (use your own prefix instead of mdl_ if you have such one)&lt;br /&gt;
#* enrol_localcoursefield = id&lt;br /&gt;
#* enrol_localuserfield = id&lt;br /&gt;
#* enrol_db_localrolefield = shortname&lt;br /&gt;
#* enrol_remotecoursefield = courseid&lt;br /&gt;
#* enrol_remoteuserfield = userid&lt;br /&gt;
#* enrol_db_defaultcourseroleid = default&lt;br /&gt;
#* enrol_db_autocreate = No&lt;br /&gt;
# Enable External Database plugin&lt;br /&gt;
&lt;br /&gt;
===Create an instance of the module===&lt;br /&gt;
# Usually, you will want just one instance of the module. The Front page is a good place for it.&lt;br /&gt;
# Override desired roles and allow them to order courses (mod/cord:ordercourse). You will probably want to allow [[Authenticated user role]] to order your courses.&lt;br /&gt;
&lt;br /&gt;
===Set up the cost of the courses===&lt;br /&gt;
# Only courses with not-zero cost can be orderd using Course ordering and invoicing module&lt;br /&gt;
&lt;br /&gt;
==How to customize the invoice==&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
==How to report a bug==&lt;br /&gt;
&lt;br /&gt;
Please, use [[Tracker]]. Course ordering if one of the components in &amp;quot;Non-core contributed modules&amp;quot; project. See the list of tracked issues at http://tracker.moodle.org/browse/CONTRIB/component/10327.&lt;br /&gt;
&lt;br /&gt;
==Capabilities==&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;3&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Capability&lt;br /&gt;
!Description&lt;br /&gt;
!Status&lt;br /&gt;
|-&lt;br /&gt;
|mod/cord:ordercourse&lt;br /&gt;
|a user can submit course ordering form&lt;br /&gt;
|implemented&lt;br /&gt;
|-&lt;br /&gt;
|mod/cord:manageorders&lt;br /&gt;
|a user can approve or delete submitted orders&lt;br /&gt;
|implemented&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==UML diagrams==&lt;br /&gt;
&lt;br /&gt;
[[Image:corduml-uc-usersactions.png|thumb|Use case: User&#039;s actions|300px|left]]&lt;br /&gt;
[[Image:corduml-uc-adminsactions.png|thumb|Use case: Admin&#039;s actions|300px|left]]&lt;br /&gt;
[[Image:corduml-erd.png|thumb|ER diagram:Module tables and relationships|300px|left]]&lt;br /&gt;
[[Image:corduml-sq-orderproc.png|thumb|Sequence diagram:Order processing|300px|left]]&lt;br /&gt;
[[Image:corduml-st-orderproc.png|thumb|State diagram:Order processing|300px|left]]&lt;br /&gt;
[[Image:corduml-cl-courseorder.png|thumb|Class diagram:Course order classes|300px|left]]&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=1693 Modules and plugins database record]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Course_ordering_and_invoicing&amp;diff=44368</id>
		<title>Course ordering and invoicing</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Course_ordering_and_invoicing&amp;diff=44368"/>
		<updated>2008-09-25T13:25:53Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The module allows authenticated users to fill course enrolment order form. Payment reminder is sent automatically. Administrator has to manually approve the order, eg. according to a bank account listings. After approving the order, the invoice is emailed to the users.&lt;br /&gt;
&lt;br /&gt;
The module uses [[External database enrolment]] plugin. It may be useful for sites where users must pay to be enrolled into a course but for some reasons, [[PayPal]] and other plugins can not be used.&lt;br /&gt;
&lt;br /&gt;
The module was created and is currently maintained by [[User:David Mudrak|David Mudrak]].&lt;br /&gt;
&lt;br /&gt;
==Screenshots==&lt;br /&gt;
&lt;br /&gt;
[[Image:cord001-orderform.png|thumb|The ordering form|200px|left]]&lt;br /&gt;
[[Image:cord002-totalcostcalc.png|thumb|Order confirmation|200px|left]]&lt;br /&gt;
[[Image:cord003-myorders.png|thumb|List of user&#039;s orders|200px|left]]&lt;br /&gt;
[[Image:cord004-approvedorders.png|thumb|The list of all approved orders|200px|left]]&lt;br /&gt;
[[Image:cord005-invoice.png|thumb|Example of PDF invoice produced by the module|200px|left]]&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
&lt;br /&gt;
* Moodle 1.8 - checkout [[CVS]] MOODLE_18_STABLE branch or download [http://download.moodle.org/plugins18/mod/cord.zip the 1.8 build]&lt;br /&gt;
* Moodle 1.9 - checkout [[CVS]] MOODLE_19_STABLE branch or download [http://download.moodle.org/plugins19/mod/cord.zip the 1.9 build]&lt;br /&gt;
&lt;br /&gt;
The source codes live in [[CVS]] [http://cvs.moodle.org/contrib/plugins/mod/cord/ contrib/plugins/mod/cord]. To checkout the MOODLE_19_STABLE branch of the module, go to the Moodle mod/ directory and use:&lt;br /&gt;
 cvs -z3 -d:ext:myusername@cvs.moodle.org:/cvsroot/moodle co -d cord -r MOODLE_19_STABLE contrib/plugins/mod/cord&lt;br /&gt;
&lt;br /&gt;
As usually, visit your /admin page to finish the installation.&lt;br /&gt;
&lt;br /&gt;
==Post-installation setup==&lt;br /&gt;
&lt;br /&gt;
TODO: how to setup the module - the outline follows&lt;br /&gt;
&lt;br /&gt;
# set up external DB enrolment&lt;br /&gt;
# create an instance of the module&lt;br /&gt;
# override desired roles - allow them to order courses (mod/cord:ordercourse)&lt;br /&gt;
# set up the cost of the courses&lt;br /&gt;
&lt;br /&gt;
==How to customize the invoice==&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
==How to report a bug==&lt;br /&gt;
&lt;br /&gt;
Please, use [[Tracker]]. Course ordering if one of the components in &amp;quot;Non-core contributed modules&amp;quot; project. See the list of tracked issues at http://tracker.moodle.org/browse/CONTRIB/component/10327.&lt;br /&gt;
&lt;br /&gt;
==Capabilities==&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;3&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Capability&lt;br /&gt;
!Description&lt;br /&gt;
!Status&lt;br /&gt;
|-&lt;br /&gt;
|mod/cord:ordercourse&lt;br /&gt;
|a user can submit course ordering form&lt;br /&gt;
|implemented&lt;br /&gt;
|-&lt;br /&gt;
|mod/cord:manageorders&lt;br /&gt;
|a user can approve or delete submitted orders&lt;br /&gt;
|implemented&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==UML diagrams==&lt;br /&gt;
&lt;br /&gt;
[[Image:corduml-uc-usersactions.png|thumb|Use case: User&#039;s actions|300px|left]]&lt;br /&gt;
[[Image:corduml-uc-adminsactions.png|thumb|Use case: Admin&#039;s actions|300px|left]]&lt;br /&gt;
[[Image:corduml-erd.png|thumb|ER diagram:Module tables and relationships|300px|left]]&lt;br /&gt;
[[Image:corduml-sq-orderproc.png|thumb|Sequence diagram:Order processing|300px|left]]&lt;br /&gt;
[[Image:corduml-st-orderproc.png|thumb|State diagram:Order processing|300px|left]]&lt;br /&gt;
[[Image:corduml-cl-courseorder.png|thumb|Class diagram:Course order classes|300px|left]]&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=1693 Modules and plugins database record]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Course_ordering_and_invoicing&amp;diff=44367</id>
		<title>Course ordering and invoicing</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Course_ordering_and_invoicing&amp;diff=44367"/>
		<updated>2008-09-25T13:24:55Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: /* Installation */ updated installation info&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The module allows authenticated users to fill course enrolment order form. Payment reminder is sent automatically. Administrator has to manually approve the order, eg. according to a bank account listings. After approving the order, the invoice is emailed to the users.&lt;br /&gt;
&lt;br /&gt;
The module uses [[External database enrolment]] plugin. It may be useful for sites where users must pay to be enrolled into a course but for some reasons, [[PayPal]] and other plugins can not be used.&lt;br /&gt;
&lt;br /&gt;
The module was created and is currently maintained by [[User:David Mudrak|David Mudrak]].&lt;br /&gt;
&lt;br /&gt;
==Screenshots==&lt;br /&gt;
&lt;br /&gt;
[[Image:cord001-orderform.png|thumb|The ordering form|200px|left]]&lt;br /&gt;
[[Image:cord002-totalcostcalc.png|thumb|Order confirmation|200px|left]]&lt;br /&gt;
[[Image:cord003-myorders.png|thumb|List of user&#039;s orders|200px|left]]&lt;br /&gt;
[[Image:cord004-approvedorders.png|thumb|The list of all approved orders|200px|left]]&lt;br /&gt;
[[Image:cord005-invoice.png|thumb|Example of PDF invoice produced by the module|200px|left]]&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
&lt;br /&gt;
* Moodle 1.8 - checkout [[CVS]] MOODLE_18_STABLE branch or download [http://download.moodle.org/plugins18/mod/cord.zip the 1.8 build]&lt;br /&gt;
* Moodle 1.9 - checkout [[CVS]] MOODLE_19_STABLE branch or download [http://download.moodle.org/plugins19/mod/cord.zip the 1.9 build]&lt;br /&gt;
&lt;br /&gt;
The source codes live in [[CVS]] [http://cvs.moodle.org/contrib/plugins/mod/cord/ contrib/plugins/mod/cord]. To checkout the MOODLE_19_STABLE branch of the module, go to the Moodle mod/ directory and use:&lt;br /&gt;
 cvs -z3 -d:ext:myusername@cvs.moodle.org:/cvsroot/moodle co -d cord -r MOODLE_19_STABLE contrib/plugins/mod/cord&lt;br /&gt;
&lt;br /&gt;
==Post-installation setup==&lt;br /&gt;
&lt;br /&gt;
TODO: how to setup the module - the outline follows&lt;br /&gt;
&lt;br /&gt;
# set up external DB enrolment&lt;br /&gt;
# create an instance of the module&lt;br /&gt;
# override desired roles - allow them to order courses (mod/cord:ordercourse)&lt;br /&gt;
# set up the cost of the courses&lt;br /&gt;
&lt;br /&gt;
==How to customize the invoice==&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
==How to report a bug==&lt;br /&gt;
&lt;br /&gt;
Please, use [[Tracker]]. Course ordering if one of the components in &amp;quot;Non-core contributed modules&amp;quot; project. See the list of tracked issues at http://tracker.moodle.org/browse/CONTRIB/component/10327.&lt;br /&gt;
&lt;br /&gt;
==Capabilities==&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;3&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Capability&lt;br /&gt;
!Description&lt;br /&gt;
!Status&lt;br /&gt;
|-&lt;br /&gt;
|mod/cord:ordercourse&lt;br /&gt;
|a user can submit course ordering form&lt;br /&gt;
|implemented&lt;br /&gt;
|-&lt;br /&gt;
|mod/cord:manageorders&lt;br /&gt;
|a user can approve or delete submitted orders&lt;br /&gt;
|implemented&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==UML diagrams==&lt;br /&gt;
&lt;br /&gt;
[[Image:corduml-uc-usersactions.png|thumb|Use case: User&#039;s actions|300px|left]]&lt;br /&gt;
[[Image:corduml-uc-adminsactions.png|thumb|Use case: Admin&#039;s actions|300px|left]]&lt;br /&gt;
[[Image:corduml-erd.png|thumb|ER diagram:Module tables and relationships|300px|left]]&lt;br /&gt;
[[Image:corduml-sq-orderproc.png|thumb|Sequence diagram:Order processing|300px|left]]&lt;br /&gt;
[[Image:corduml-st-orderproc.png|thumb|State diagram:Order processing|300px|left]]&lt;br /&gt;
[[Image:corduml-cl-courseorder.png|thumb|Class diagram:Course order classes|300px|left]]&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=1693 Modules and plugins database record]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Administrator_do%27s_and_don%27ts&amp;diff=43353</id>
		<title>Administrator do&#039;s and don&#039;ts</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Administrator_do%27s_and_don%27ts&amp;diff=43353"/>
		<updated>2008-09-10T14:43:48Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Don&#039;t use the files area in the main Moodle site course to restore course archives.  You can destroy the front page very easily.  You will be much better off to set up a special course just for that purpose!&lt;br /&gt;
&lt;br /&gt;
: Why? How? --[[User:David Mudrak|David Mudrak]] 09:43, 10 September 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
&lt;br /&gt;
{{stub}}&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Subcourse_module&amp;diff=42942</id>
		<title>Subcourse module</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Subcourse_module&amp;diff=42942"/>
		<updated>2008-08-29T17:36:49Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Added installation info and the list of capabilities&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The module provides very simple yet useful functionality. When added into a course, it behaves as a graded activity. The grade for each student is taken from a final grade in another course. Combined with metacourses, this allows course designers to organize courses into separate units.&lt;br /&gt;
&lt;br /&gt;
The module was created and is currently maintained by [[User:David Mudrak|David Mudrak]].&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
&lt;br /&gt;
The module uses PHP exceptions - PHP5 is needed. Do not use this module at production servers - it has not been tested too much yet. On the other hand - you are warmly welcome to install, test and report any problems.&lt;br /&gt;
&lt;br /&gt;
* Moodle 1.9 - checkout [[CVS]] HEAD or download [http://download.moodle.org/plugins/mod/subcourse.zip latest development build]&lt;br /&gt;
* Earlier version are not supported&lt;br /&gt;
&lt;br /&gt;
The source codes live in [[CVS]] [http://cvs.moodle.org/contrib/plugins/mod/subcourse/ contrib/plugins/mod/subcourse]. To checkout the module, go to the Moodle mod/ directory and use:&lt;br /&gt;
 cvs -z3 -d:ext:myusername@cvs.moodle.org:/cvsroot/moodle co -d subcourse contrib/plugins/mod/subcourse&lt;br /&gt;
&lt;br /&gt;
==How to report a bug==&lt;br /&gt;
&lt;br /&gt;
Please, use [[Tracker]]. Subcourse if one of the components in &amp;quot;Non-core contributed modules&amp;quot; project.&lt;br /&gt;
&lt;br /&gt;
==Capabilities==&lt;br /&gt;
&lt;br /&gt;
{{Moodle 1.9}}&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;3&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Capability&lt;br /&gt;
!Description&lt;br /&gt;
!Status&lt;br /&gt;
|-&lt;br /&gt;
|mod/subcourse:begraded&lt;br /&gt;
|a user can be graded with the remote final grade&lt;br /&gt;
|implemented&lt;br /&gt;
|-&lt;br /&gt;
|mod/subcourse:fetchgrades&lt;br /&gt;
|a user can manually fetch grades from a remote course&lt;br /&gt;
|implemented&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributed code]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=error/subcourse/errinvalidrefcourse&amp;diff=42633</id>
		<title>error/subcourse/errinvalidrefcourse</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=error/subcourse/errinvalidrefcourse&amp;diff=42633"/>
		<updated>2008-08-25T11:59:19Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: /* Invalid ID of referenced course */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The [[Subcourse module]] is linked against a non-existing course. The referenced course, i.e. the course to take grades from, has been probably deleted after the Subcourse was created. Go to the [[Subcourse module]] edit form and choose an existing course.&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=error/subcourse/errinvalidrefcourse&amp;diff=42631</id>
		<title>error/subcourse/errinvalidrefcourse</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=error/subcourse/errinvalidrefcourse&amp;diff=42631"/>
		<updated>2008-08-25T11:56:56Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: New page: = Invalid ID of referenced course =  The referenced course (i.e. the course to take grades from) has been probably deleted. Edit the Subcourse module and choose an existing course.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Invalid ID of referenced course =&lt;br /&gt;
&lt;br /&gt;
The referenced course (i.e. the course to take grades from) has been probably deleted. Edit the [[Subcourse module]] and choose an existing course.&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Capabilities/moodle/course:viewcoursegrades&amp;diff=42420</id>
		<title>Capabilities/moodle/course:viewcoursegrades</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Capabilities/moodle/course:viewcoursegrades&amp;diff=42420"/>
		<updated>2008-08-21T13:22:33Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Replaced by moodle/grade:viewall in 1.9&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Moodle 1.8}}&lt;br /&gt;
&lt;br /&gt;
*This allows a user to view the course [[Grades|grade book]]&lt;br /&gt;
&lt;br /&gt;
The capability seems to be removed in 1.9. See [[Capabilities/moodle/grade:viewall]].&lt;br /&gt;
&lt;br /&gt;
====Legacy Role Default Settings====&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! Legacy Role !! Inherit !! Allow !! Prevent !! Prohibit&lt;br /&gt;
|-&lt;br /&gt;
| Administrator || - || X || - || -&lt;br /&gt;
|-&lt;br /&gt;
| Course Creator || X || - || - || -&lt;br /&gt;
|-&lt;br /&gt;
| Teacher || - || X || - || -&lt;br /&gt;
|-&lt;br /&gt;
| Non-editing Teacher || - || X || - || -&lt;br /&gt;
|-&lt;br /&gt;
| Student || X || - || - || -&lt;br /&gt;
|-&lt;br /&gt;
| Guest || X || - || - || -&lt;br /&gt;
|-&lt;br /&gt;
| Authenticated User || X || - || - || -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Capabilities|Course]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Subcourse_module&amp;diff=41768</id>
		<title>Subcourse module</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Subcourse_module&amp;diff=41768"/>
		<updated>2008-08-09T17:44:51Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Added bsic info from README.txt&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The module provides very simple yet useful functionality. When added into a course, it behaves as a graded activity. The grade for each student is took from a final grade in another course. Combined with metacourses, this allows course designers to organize courses into separate units.&lt;br /&gt;
&lt;br /&gt;
This module is under construction at the moment. Please come back later. Thanks.&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributed code]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Subcourse_module&amp;diff=41767</id>
		<title>Subcourse module</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Subcourse_module&amp;diff=41767"/>
		<updated>2008-08-09T17:43:34Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Created empty page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This module is under construction at the moment. Please come back later. Thanks.&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributed code]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Performance&amp;diff=41227</id>
		<title>Performance</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Performance&amp;diff=41227"/>
		<updated>2008-08-01T17:34:28Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: /* PostgreSQL performance */ copied the Andrew&amp;#039;s post&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Location: &#039;&#039;Administration &amp;gt; Server &amp;gt; Performance&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Moodle can be made to perform very well, at small usage levels or scaling up to many thousands of users. The factors involved in performance are basically the same as for any PHP-based database-driven system. When trying to optimize your server, try to focus on the factor which will make the most difference to the user. For example, if you have relatively more users browsing than accessing the database, look to improve the webserver performance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Obtain a baseline benchmark==&lt;br /&gt;
&lt;br /&gt;
Before attempting any optimization, you should obtain a baseline benchmark of the component of the system you are trying to improve. For Linux try [http://lbs.sourceforge.net/ LBS] and for Windows use the Performance Monitor. Once you have quantitative data about how your system is performing currently, you&#039;ll be able to determine if the change you have made as has any real impact.&lt;br /&gt;
&lt;br /&gt;
The overall aim of adjustments to improve performance is to use RAM (cacheing) and to reduce disk-based activity. It is especially important to try to eliminate swap file usage as much as you can. If your system starts swapping, this is a sign that you need more RAM. &lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;optimization order preference&#039;&#039;&#039; is usually: primary storage (more RAM), secondary storage (faster hard disks/improved hard disk configuration), processor (more and faster).&lt;br /&gt;
&lt;br /&gt;
==Scalability==&lt;br /&gt;
&lt;br /&gt;
Moodle&#039;s design (with clear separation of application layers) allows for strongly scalable setups. (Please check the list of [[Large installations|large Moodle installations]].)&lt;br /&gt;
&lt;br /&gt;
Large sites usually separate the web server and database onto separate servers, although for smaller installations this is typically not necessary.&lt;br /&gt;
&lt;br /&gt;
It is possible to load-balance a Moodle installation, for example by using more than one webserver. The separate webservers should query the same database and refer to the same filestore area, but otherwise the separation of the application layers is complete enough to make this kind of clustering feasible. Similarly, the database could be a cluster of servers (e.g. a MySQL cluster), but this is not an easy task and you should seek expert support, e.g. from a Moodle Partner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;See also&#039;&#039;&#039;: &lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=4801 Scalability] forum discussion.&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=57202 Moodle clustering] forum discussion.&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=44470 Software load balancing] forum discussion.&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=49986 TCP load balancing] forum dicsussion.&lt;br /&gt;
&lt;br /&gt;
==Hardware configuration==&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: The fastest and most effective change that you can make to improve performance is to &#039;&#039;&#039;increase the amount of RAM on your web server&#039;&#039;&#039; - get as much as possible (eg 4GB). Increasing primary memory will reduce the need for processes to swap to disk and will enable your server to handle more users.&lt;br /&gt;
* Better performance is gained by obtaining the best &#039;&#039;&#039;processor capability&#039;&#039;&#039; you can, i.e. dual or dual core processors. A modern BIOS should allow you to enable hyperthreading, but check if this makes a difference to the overall performance of the processors by using a [http://en.wikipedia.org/wiki/Super_PI CPU benchmarking tool].&lt;br /&gt;
* If you can afford them, use &#039;&#039;&#039;SCSI hard disks&#039;&#039;&#039; instead of SATA drives. SATA drives will increase your system&#039;s CPU utilization, whereas SCSI drives have their own integrated processors and come into their own when you have multiple drives. If you must have SATA drives, check that your motherboard and the drives themselves support NCQ (Native Command Queuing).&lt;br /&gt;
* Purchase hard disks with a &#039;&#039;&#039;low seek time&#039;&#039;&#039;. This will improve the overall speed of your system, especially when accessing Moodle&#039;s reports.&lt;br /&gt;
* Size your &#039;&#039;&#039;swap file&#039;&#039;&#039; correctly. The general advice is to set it to 4 x physical RAM.&lt;br /&gt;
* Use a &#039;&#039;&#039;RAID disk system&#039;&#039;&#039;. Although there are many different RAID configurations you can create, the following generally works best:&lt;br /&gt;
** install a hardware RAID controller (if you can)&lt;br /&gt;
** the operating system and swap drive on one set of disks configured as RAID-1.&lt;br /&gt;
** Moodle, Web server and Database server on another set of disks configured as RAID-5.&lt;br /&gt;
* Use &#039;&#039;&#039;gigabit ethernet&#039;&#039;&#039; for improved latency and throughput. This is especially important when you have your webserver and database server separated out on different hosts.&lt;br /&gt;
* Check the settings on your &#039;&#039;&#039;network card&#039;&#039;&#039;. You may get an improvement in performance by increasing the use of buffers and transmit/receive descriptors (balance this with processor and memory overheads) and off-loading TCP checksum calculation onto the card instead of the OS.&lt;br /&gt;
*  Read this [http://moodle.org/mod/forum/discuss.php?d=68579 Case Study] on a server stress test with 300 users.  &lt;br /&gt;
*  See this [http://elearning.sgu.ac.jp/doc/PT/ accompanying report] on network traffic and server loads.&lt;br /&gt;
&lt;br /&gt;
==Operating System==&lt;br /&gt;
* You can use [http://en.wikipedia.org/wiki/Linux Linux](recommended), Unix-based, Windows or Mac OS X for the server &#039;&#039;&#039;operating system&#039;&#039;&#039;. *nix operating systems generally require less memory than Mac OS X or Windows servers for doing the same task as the server is configured with just a shell interface. Additionally Linux does not have licensing fees attached, but can have a big learning curve if you&#039;re used to another operating system. If you have a large number of processors running SMP, you may also want to consider using a highly tuned OS such as [http://en.wikipedia.org/wiki/Solaris_Operating_Environment Solaris].&lt;br /&gt;
* Check your own OS and &#039;&#039;&#039;vendor specific instructions&#039;&#039;&#039; for optimization steps.&lt;br /&gt;
** For Linux look at the [http://linuxperf.sourceforge.net/ Linux Performance Team] site. &lt;br /&gt;
** For Linux investigate the hdparm command, e.g. hdparm -m16 -d1 can be used to enable read/write on multiple sectors and DMA. Mount disks with the async and noatime options.&lt;br /&gt;
** For Windows set the sever to be optimized for network applications (Control Panel, Network Connections, LAN connection, Properties, File &amp;amp; Printer Sharing for Microsoft Networks, Properties, Optimization). You can also search the [http://technet.microsoft.com/ Microsoft TechNet site] for optimization documents.&lt;br /&gt;
&lt;br /&gt;
==Web server performance==&lt;br /&gt;
&lt;br /&gt;
Installing [http://www.mozilla.com/en-US/ Firefox] and the [https://addons.mozilla.org/en-US/firefox/addon/1843 firebug] extension will allow you to watch the time it takes for each page component to load. Also, the [https://addons.mozilla.org/en-US/firefox/addon/5369 Yslow] extension will evaluate your page against Yahoo&#039;s [http://www.skrenta.com/2007/05/14_rules_for_fast_web_pages_by_1.html 14 rules] ([http://video.yahoo.com/video/play?vid=1040890 video]) for fast loading websites.&lt;br /&gt;
&lt;br /&gt;
===PHP performance===&lt;br /&gt;
* You are strongly recommended to use a &#039;&#039;&#039;PHP accelerator&#039;&#039;&#039; to ease CPU load, such as [http://pecl.php.net/apc APC], [http://www.php-accelerator.co.uk/ PHPA], [http://trac.lighttpd.net/xcache/ Xcache] or [http://eaccelerator.net/ eAccelerator]. (Take care to choose a PHP accelerator that is known to work well with your version of PHP and note that Turck MMCache is [http://turckmmcache.exeprod.com/TheManifestoEnglish no longer maintained] and can cause failures with PHP 5). &lt;br /&gt;
* Improvements in read/write performance can be improved by putting the cached PHP pages on a [[TMPFS]] filesystem - but remember that you&#039;ll lose the cache contents when there is a power failure or the server is rebooted.&lt;br /&gt;
* Performance of PHP is better when installed as an &#039;&#039;&#039;Apache/IIS ISAPI module&#039;&#039;&#039; (rather than a CGI).&lt;br /&gt;
* Also check the &#039;&#039;&#039;memory_limit&#039;&#039;&#039; in php.ini, reduce it to 16M for Moodle version earlier than 1.7 ([http://moodle.org/mod/forum/discuss.php?d=39656 See this forum discussion]). For Moodle 1.7 or later, it is recommended that the value of memory_limit should be 40M. As of [http://www.php.net/ChangeLog-5.php PHP 5.2.1] the default value for the memory_limit directive is 128M.&lt;br /&gt;
&lt;br /&gt;
===Apache performance===&lt;br /&gt;
* If you are using Apache on a Windows server, use the build from [http://www.apachelounge.com Apache Lounge] which is reported to have [http://moodle.org/mod/forum/discuss.php?d=93358 performance and stability improvements] compared to the official Apache download. Note that this is an unofficial build, so may not keep up with official releases.&lt;br /&gt;
* Set the &#039;&#039;&#039;MaxClients&#039;&#039;&#039; directive correctly. Use this formula to help (which uses 80% of available memory to leave room for spare):&lt;br /&gt;
 MaxClients = Total available memory * 80% / Max memory usage of apache process&lt;br /&gt;
:Memory usage of apache process is usually 10MB, so a general rule of thumb is to divide your available memory in megabytes by 10 to get the value of MaxClients. To find the max memory usage of apache processes read the value from the shell command:&lt;br /&gt;
 #ps -ylC httpd --sort:rss&lt;br /&gt;
&lt;br /&gt;
:If you need to increase the value of &#039;&#039;&#039;MaxClients&#039;&#039;&#039; beyond 256, you will also need to set the &#039;&#039;&#039;ServerLimit&#039;&#039;&#039; directive. &lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;Warning&#039;&#039;&#039;: Do not be tempted to set the value of MaxClients higher than your available memory as your server will consume more RAM than available and start to swap to disk. &lt;br /&gt;
* Consider reducing the &#039;&#039;&#039;number of modules&#039;&#039;&#039; that Apache loads in the httpd.conf file to the minumum necessary to reduce the memory needed. &lt;br /&gt;
* Use the &#039;&#039;&#039;latest version of Apache&#039;&#039;&#039; - Apache 2 has an improved memory model which reduces memory usage further.&lt;br /&gt;
* For Unix/Linux systems, consider lowering &#039;&#039;&#039;MaxRequestsPerChild&#039;&#039;&#039; in httpd.conf to as low as 20-30 (if you set it any lower the overhead of forking begins to outweigh the benefits). &lt;br /&gt;
* For a heavily loaded server, consider setting &#039;&#039;&#039;KeepAlive Off&#039;&#039;&#039; (do this only if your Moodle pages do not contain links to resources or uploaded images) or lowering the &#039;&#039;&#039;KeepAliveTimeout&#039;&#039;&#039; to between 2 and 5. The default is 15 (seconds) - the higher the value the more server processes will be kept waiting for possibly idle connections. A more accurate value for KeepAliveTimeout is obtained by observing how long it takes your users to download a page. After altering any of the KeepAlive variables, monitor your CPU utilization as there may be an additional overhead in initiating more worker processes/threads.&lt;br /&gt;
* As an alternative to using KeepAlive Off, consider setting-up a &#039;&#039;&#039;Reverse Proxy server&#039;&#039;&#039; infront of the Moodle server to cache HTML files with images. You can then return Apache to using keep-alives on the Moodle server.&lt;br /&gt;
* If you do not use a .htaccess file, set the &#039;&#039;&#039;AllowOverride&#039;&#039;&#039; variable to AllowOverride None to prevent .htaccess lookups.&lt;br /&gt;
* Set &#039;&#039;&#039;DirectoryIndex&#039;&#039;&#039; correctly so as to avoid content-negotiation. Here&#039;s an example from a production server:&lt;br /&gt;
 DirectoryIndex index.php index.html index.htm&lt;br /&gt;
* Unless you are doing development work on the server, set &#039;&#039;&#039;ExtendedStatus Off&#039;&#039;&#039; and disable mod_info as well as mod_status.&lt;br /&gt;
* Leave &#039;&#039;&#039;HostnamesLookups Off&#039;&#039;&#039; (as default) to reduce DNS latency.&lt;br /&gt;
* Consider reducing the value of &#039;&#039;&#039;TimeOut&#039;&#039;&#039; to between 30 to 60 (seconds). &lt;br /&gt;
* For the &#039;&#039;&#039;Options directive&#039;&#039;&#039;, avoid Options Multiviews as this performs a directory scan. To reduce disk I/O further use&lt;br /&gt;
 Options -Indexes FollowSymLinks&lt;br /&gt;
*&#039;&#039;&#039;Caching&#039;&#039;&#039; - Apache can be told to make pages load a lot faster by specifying that the browser should cache some various page elements such as images and reuse them from local memory rather than ask for them again every time a page is requested. How to do this varies slightly between OSes but there are two basic steps:&lt;br /&gt;
&lt;br /&gt;
# Install and enable mod_expires - refer to documentation or man pages&lt;br /&gt;
# Add this code to the virtual server config file within the &amp;lt;directory&amp;gt; section for the root directory (or within the .htaccess file if AllowOverrides is On):&lt;br /&gt;
 &amp;lt;IfModule mod_expires.c&amp;gt;&lt;br /&gt;
  ExpiresActive On&lt;br /&gt;
  ExpiresDefault &amp;quot;access plus 1 seconds&amp;quot;&lt;br /&gt;
  ExpiresByType text/html &amp;quot;access plus 1 seconds&amp;quot;&lt;br /&gt;
  ExpiresByType image/gif &amp;quot;access plus 1 week&amp;quot;&lt;br /&gt;
  ExpiresByType image/jpeg &amp;quot;access plus 1 week&amp;quot;&lt;br /&gt;
  ExpiresByType image/png &amp;quot;access plus 1 week&amp;quot;&lt;br /&gt;
  ExpiresByType text/css &amp;quot;access plus 1 week&amp;quot;&lt;br /&gt;
  ExpiresByType text/javascript &amp;quot;access plus 1 week&amp;quot;&lt;br /&gt;
  ExpiresByType application/x-javascript &amp;quot;access plus 1 week&amp;quot;&lt;br /&gt;
  ExpiresByType text/xml &amp;quot;access plus 1 seconds&amp;quot;&lt;br /&gt;
 &amp;lt;/IfModule&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The effect is to make everything stay in the cache except HTML and XML, which change dynamically. It&#039;s possible to gain a several hundred percent decrease in load times this way. Adjust the cache times according to how often your images etc change.&lt;br /&gt;
&lt;br /&gt;
More info: [http://www.metaskills.net/blog/heuristics/sysadmin/how-to-control-browser-caching-with-apache-2 www.metaskills.net]&lt;br /&gt;
&lt;br /&gt;
===IIS performance===&lt;br /&gt;
All alter this location in the registry:&lt;br /&gt;
 HKLM\SYSTEM\CurrentControlSet\Services\Inetinfo\Parameters\&lt;br /&gt;
* The equivalent to KeepAliveTimeout is &#039;&#039;&#039;ListenBackLog&#039;&#039;&#039; (IIS - registry location is HKLM\ SYSTEM\ CurrentControlSet\ Services\ Inetinfo\ Parameters). Set this to between 2 to 5.&lt;br /&gt;
*Change the &#039;&#039;&#039;MemCacheSize&#039;&#039;&#039; value to adjust the amount of memory (Mb) that IIS will use for its file cache (50% of available memory by default).&lt;br /&gt;
*Change the &#039;&#039;&#039;MaxCachedFileSize&#039;&#039;&#039; to adjust the maximum size of a file cached in the file cache in bytes. Default is 262,144 (256K).&lt;br /&gt;
*Create a new DWORD called &#039;&#039;&#039;ObjectCacheTTL&#039;&#039;&#039; to change the length of time (in milliseconds) that objects in the cache are held in memory. Default is 30,000 milliseconds (30 seconds).&lt;br /&gt;
&lt;br /&gt;
===Lighttpd performance===&lt;br /&gt;
You can increase web server performance by using the &#039;&#039;&#039;light-weight webserver&#039;&#039;&#039; [http://www.lighttpd.net/ lighttpd] in combination with PHP in fastCGI-mode. Lighttpd has a lower memory consumption than Apache - typically 10M for each process. See this [[lighttpd | MoodleDocs Lighttpd page]] for configuration and administration links.&lt;br /&gt;
&lt;br /&gt;
==Database performance==&lt;br /&gt;
&lt;br /&gt;
Moodle contains a script which will display some key database performance statistics from the [http://phplens.com/lens/adodb/docs-perf.htm ADOdb performance monitor]. Run the script in your browser as in the following example:&lt;br /&gt;
&lt;br /&gt;
 http://www.mymoodle.com/admin/dbperformance.php&lt;br /&gt;
&lt;br /&gt;
Use the data displayed as a guide to tune and improve the performance of your database server.&lt;br /&gt;
&lt;br /&gt;
===MySQL performance===&lt;br /&gt;
&lt;br /&gt;
The following are MySQL specific settings which can be adjusted for better performance in your my.cnf (my.ini in Windows). The file contains a list of settings and their values. To see the current values use these commands&lt;br /&gt;
 SHOW STATUS;&lt;br /&gt;
 SHOW VARIABLES; &lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: You must make backups of your database before attempting to change any MySQL server configuration. After any change to the my.cnf, restart mysqld.&lt;br /&gt;
* Enable the &#039;&#039;&#039;query cache&#039;&#039;&#039; with &lt;br /&gt;
 query_cache_type = 1. &lt;br /&gt;
For most Moodle installs, set the following:&lt;br /&gt;
 query_cache_size = 36M &lt;br /&gt;
 query_cache_min_res_unit = 2K. &lt;br /&gt;
The query cache will improve performance if you are doing few updates on the database. &lt;br /&gt;
* Set the &#039;&#039;&#039;table cache&#039;&#039;&#039; correctly. For Moodle 1.6 set &lt;br /&gt;
 table_cache = 256 &lt;br /&gt;
(min), and for Moodle 1.7 set &lt;br /&gt;
 table_cache = 512 &lt;br /&gt;
(min). The table cache is used by all threads (connections), so monitor the value of opened_tables to further adjust - if opened_tables &amp;gt; 3 * table_cache then increase table_cache upto your OS limit. Note also that the figure for table_cache will also change depending on the number of modules and plugins you have installed. Find the number for your server by executing the mysql statement below. Look at the number returned and set table_cache to this value.&lt;br /&gt;
 mysql&amp;gt;SELECT COUNT(table_name) FROM information_schema.tables WHERE table_schema=&#039;yourmoodledbname&#039;;&lt;br /&gt;
* Set the &#039;&#039;&#039;thread cache&#039;&#039;&#039; correctly. Adjust the value so that your thread cache utilization is as close to 100% as possible by this formula:&lt;br /&gt;
 thread cache utilization (%) = (threads_created / connections) * 100&lt;br /&gt;
* The &#039;&#039;&#039;key buffer&#039;&#039;&#039; can improve the access speed to Moodle&#039;s SELECT queries. The correct size depends on the size of the index files (.myi) and in Moodle 1.6 or later (without any additional modules and plugins), the recommendation for this value is key_buffer_size = 32M. Ideally you want the database to be reading once from the disk for every 100 requests so monitor that the value is suitable for your install by adjusting the value of key_buffer_size so that the following formulas are true:&lt;br /&gt;
 key_read / key_read_requests &amp;lt; 0.01&lt;br /&gt;
 key_write / key_write_requests &amp;lt;= 1.0&lt;br /&gt;
* Set the &#039;&#039;&#039;maximum number of connections&#039;&#039;&#039; so that your users will not see a &amp;quot;Too many connections&amp;quot; message. Be careful that this may have an impact on the total memory used. MySQL connections usually last for milliseconds, so it is unusual even for a heavily loaded server for this value to be over 200.&lt;br /&gt;
* Manage &#039;&#039;&#039;high burst activity&#039;&#039;&#039;. If your Moodle install uses a lot of quizzes and you are experiencing performance problems (check by monitoring the value of threads_connected - it should not be rising) consider increasing the value of back_log.&lt;br /&gt;
* &#039;&#039;&#039;Optimize your tables weekly and after upgrading Moodle&#039;&#039;&#039;. It is good practice to also optimize your tables after performing a large data deletion exercise, e.g. at the end of your semester or academic year. This will ensure that index files are up to date. Backup your database first and then use:&lt;br /&gt;
 mysql&amp;gt;CHECK TABLE mdl_tablename;&lt;br /&gt;
 mysql&amp;gt;OPTIMIZE TABLE mdl_tablename;&lt;br /&gt;
:The common tables in Moodle to check are mdl_course_sections, mdl_forum_posts, mdl_log and mdl_sessions (if using dbsessions). Any errors need to be corrected using REPAIR TABLE (see the [http://dev.mysql.com/doc/refman/5.0/en/repair-table.html MySQL manual] and this [http://moodle.org/mod/forum/discuss.php?d=58208#p279638 forum script]).&lt;br /&gt;
* &#039;&#039;&#039;Maintain the key distribution&#039;&#039;&#039;. Every month or so it is a good idea to stop the mysql server and run these myisamchk commands.&lt;br /&gt;
 #myisamchk -a -S /pathtomysql/data/moodledir/*.MYI&lt;br /&gt;
:&#039;&#039;&#039;Warning&#039;&#039;&#039;: You must stop the mysql database process (mysqld) before running any myisamchk command. If you do not, you risk data loss.&lt;br /&gt;
* Reduce the number of &#039;&#039;&#039;temporary tables saved to disk&#039;&#039;&#039;. Check this with the created_tmp_disk_tables value. If this is relatively large (&amp;gt;5%) increase tmp_table_size until you see a reduction. Note that this will have an impact on RAM usage.&lt;br /&gt;
* Moodle&#039;s tables are in the MyISAM format, so &#039;&#039;&#039;turn InnoDB off&#039;&#039;&#039; as there is no performance gain. Add &amp;lt;code&amp;gt;skip-innodb&amp;lt;/code&amp;gt; to your &amp;lt;code&amp;gt;my.cnf&amp;lt;/code&amp;gt; file. If you must use InnoDB, you&#039;ll have to convert all of Moodle&#039;s tables. To do this run the innodb script:&lt;br /&gt;
&lt;br /&gt;
 http://www.mymoodle.com/admin/innodb.php&lt;br /&gt;
&lt;br /&gt;
:See also [http://moodle.org/mod/forum/discuss.php?d=12961 this forum discussion] which looks at the MyISAM vs InnoDB options.&lt;br /&gt;
&lt;br /&gt;
===PostgreSQL performance===&lt;br /&gt;
&lt;br /&gt;
There are some good papers around on tuning PostgreSQL, and Moodle&#039;s case does not seem to be different to the general case.&lt;br /&gt;
&lt;br /&gt;
The first thing to recognise is that if you really need to worry about tuning you should be using a separate machine for the database server. If you are not using a separate machine then the answers to many performance questions are substantially muddied by the memory requirements of the rest of the application.&lt;br /&gt;
&lt;br /&gt;
You should probably &#039;&#039;&#039;enable autovacuum&#039;&#039;&#039;, unless you know what you are doing. Many e-learning sites have predictable periods of low use, so disabling autovacuum and running a specific vacuum at those times can be a good option. Or perhaps leave autovacuum running but do a full vacuum weekly in a quiet period.&lt;br /&gt;
&lt;br /&gt;
Set &#039;&#039;&#039;shared_buffers&#039;&#039;&#039; to something reasonable. For versions up to 8.1 my testing has shown that peak performance is almost always obtained with buffers &amp;lt; 10000, so if you are using such a version, and have more than 512M of RAM just set shared_buffers to 10,000 (8MB).&lt;br /&gt;
&lt;br /&gt;
The buffer management had a big overhaul in 8.2 and &amp;quot;reasonable&amp;quot; is now a much larger number. I have not conducted performance tests with 8.2, but the recommendations from others are generally that you should now scale shared_buffers much more with memory and may continue to reap benefits even up to values like 100,000 (80MB). Consider using 1-2% of system RAM.&lt;br /&gt;
&lt;br /&gt;
PostgreSQL will also assume that the operating system is caching its files, so setting &#039;&#039;&#039;effective_cache_size&#039;&#039;&#039; to a reasonable value is also a good idea. A reasonable value will usually be (total RAM - RAM in use by programs). If you are running Linux and leave the system running for a day or two you can look at &#039;free&#039; and under the &#039;cached&#039; column you will see what it currently is. Consider taking that number (which is kB) and dividing it by 10 (i.e. allow 20% for other programs cache needs and then divide by 8 to get pages). If you are not using a dedicated database server you will need to decrease that value to account for usage by other programs.&lt;br /&gt;
&lt;br /&gt;
Some other useful parameters that can have positive effects, and the values I would typically set them to on a machine with 4G RAM, are:&lt;br /&gt;
&lt;br /&gt;
 work_mem = 10240&lt;br /&gt;
&lt;br /&gt;
That&#039;s 10M of RAM to use instead of on-disk sorting and so forth. That can give a big speed increase, but it is per connection and 200 connections * 10M is 2G, so it can theoretically chew up a lot of RAM.&lt;br /&gt;
&lt;br /&gt;
 maintenance_work_mem = 163840&lt;br /&gt;
&lt;br /&gt;
That&#039;s 160M of RAM which will be used by (e.g.) VACUUM, index rebuild, cluster and so forth. This should only be used periodically and should be freed when those processes exit, so I believe it is well worth while.&lt;br /&gt;
&lt;br /&gt;
 max_fsm_pages = 100000&lt;br /&gt;
 max_fsm_relations = 5000&lt;br /&gt;
&lt;br /&gt;
These are used to hold the free-space map, and if they are too small you will see performance degradation after the database has been operating for some time. The exact numbers to set can be gleaned from the output of VACUUM VERBOSE, which prints the required FSM pages at the end of it&#039;s run. The 5x increase seems to be useful for a Moodle installation, from experience.&lt;br /&gt;
&lt;br /&gt;
 wal_buffers = 64&lt;br /&gt;
&lt;br /&gt;
These buffers are used for the write-ahead log, and there have been a number of reports on the PostgreSQL mailing lists of improvement from this level of increase.&lt;br /&gt;
&lt;br /&gt;
This is a little out of date now (version 8.0) but still worth a read: http://www.powerpostgresql.com/Docs&lt;br /&gt;
&lt;br /&gt;
And there is lots of good stuff here as well: http://www.varlena.com/varlena/GeneralBits/Tidbits/index.php&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Based on Andrew McMillan&#039;s post at [http://moodle.org/mod/forum/discuss.php?d=68558 Tuning PostgreSQL] forum thread.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Other database performance links===&lt;br /&gt;
* Consider using a &#039;&#039;&#039;distributed cacheing system&#039;&#039;&#039; like [http://en.wikipedia.org/wiki/Memcached memcached] but note that memcached does not have any security features so it should be used behind a firewall.&lt;br /&gt;
* Consider using PostgreSQL. See [[Arguments in favour of PostgreSQL]] and [http://moodle.org/mod/forum/discuss.php?d=49195 how to migrate from MySQL to PostgreSQL] (forum discussion).&lt;br /&gt;
* [[Increasing the database connection lifetime | Try increasing the database connection lifetime]]&lt;br /&gt;
* [http://dev.mysql.com/doc/refman/5.0/en/server-parameters.html General advice on tuning MySQL parameters] (advice from the MySQL manual)&lt;br /&gt;
* [http://www.mysqlperformanceblog.com/2007/11/01/innodb-performance-optimization-basics/ InnoDB performance optimization] taken from the [http://www.mysqlperformanceblog.com/ MySQL performance blog] site.&lt;br /&gt;
&lt;br /&gt;
==Moodle Admin settings==&lt;br /&gt;
* In Moodle 1.7 or later, set the &#039;&#039;&#039;Cache type&#039;&#039;&#039; for your server: Site Admin -&amp;gt; Server -&amp;gt; Performance -&amp;gt; Cache type. There are several options available. &lt;br /&gt;
:*If you do not have eaccelerator or mmemcached installed, choose &amp;quot;internal&amp;quot; (which makes use of the record/internal cache - see the next bullet point). &lt;br /&gt;
:* If you have a single server and have compiled &#039;&#039;&#039;eaccelerator with shared memory support&#039;&#039;&#039;, set the cache type to the eaccelerator option. &lt;br /&gt;
:* If you have a &#039;&#039;&#039;separate memcached server&#039;&#039;&#039;, set the cache type to memcached and enter a csv list of server IP addresses.&lt;br /&gt;
* Enable the &#039;&#039;&#039;record/internal cache&#039;&#039;&#039;: Site Admin -&amp;gt; Server -&amp;gt; Performance -&amp;gt; Record cache = True. Set the maximum amount of memory allocated to the cache in the Int Cache Max box. This will enable a primary cache for database records, without using any database engine cache, e.g. MySQL/PostgreSQL cache. See [http://tracker.moodle.org/browse/MDL-7196 this Tracker entry] for a full discussion.&lt;br /&gt;
* Enable the &#039;&#039;&#039;language cache&#039;&#039;&#039;.&lt;br /&gt;
* Large log files can cause overall performance to degrade over time. If you observe that the site has gradually got slower loading pages in the browser, &#039;&#039;&#039;reduce your Log life time&#039;&#039;&#039; setting (Admin/Server/Cleanup).&lt;br /&gt;
* Performance can be greatly improved by allowing Moodle to use the system &#039;&#039;&#039;zip/unzip&#039;&#039;&#039; commands (rather than PHP-based zip libraries) - visit Admin/Server/System Paths and enter the path to the relevant executables. (Similarly, filling in the path to &#039;&#039;&#039;du&#039;&#039;&#039; will improve Moodle&#039;s speed at listing directory contents.)&lt;br /&gt;
* Note that using &#039;&#039;&#039;secure web connections&#039;&#039;&#039; (&#039;&#039;&#039;https&#039;&#039;&#039; rather than &#039;&#039;&#039;http&#039;&#039;&#039;) carries a higher processing burden, both for the webserver and the client - particularly because cacheing cannot be used as effectively, so the number of file requests is likely to increase dramatically. For this reason using https for all Moodle pages is not recommended. You can enable https just for the login screen, simply from Moodle&#039;s config page.&lt;br /&gt;
* Check your &#039;&#039;&#039;filters&#039;&#039;&#039;. Having too many filters active can have serious effects on server load, especially on lower-end systems. The number of active filters has a direct effect on the perceived latency of your site; that is the time taken for each page impression. &lt;br /&gt;
* Enable the &#039;&#039;&#039;text cache&#039;&#039;&#039; but do not &amp;quot;Filter all strings&amp;quot; unless you have a specific need. If in doubt profile the performance, and see how your changes affect the processing time.&lt;br /&gt;
* Check your &#039;&#039;&#039;anti-virus&#039;&#039;&#039; measures on the server.  Although they are useful for preventing security holes being exploited, some &amp;quot;On-Demand&amp;quot; scanners can affect performance by scanning page content (word, ppt files etc).&lt;br /&gt;
* If there are performance problems loading course pages, check the &#039;&#039;&#039;Resource module settings&#039;&#039;&#039;. The setting resource_filterexternalpages is known to slow-down course pages and should be set to &#039;No&#039; for better performance.&lt;br /&gt;
* Check your &#039;&#039;&#039;forum settings&#039;&#039;&#039;. To improve performance set forum_trackreadposts = No and forum_usermarksread = Yes (this will impact on the convenience of your users&#039; forum experience). Also consider setting the time of the day when old posts are cleared from the read table (forum_cleanreadtime) to when your site is less busy.&lt;br /&gt;
&lt;br /&gt;
==Performance of different Moodle modules==&lt;br /&gt;
&lt;br /&gt;
Moodle&#039;s activity modules, filters, and other plugins can be activated/deactivated. If necessary, you may wish to deactivate some features (such as chat) if not required - but this isn&#039;t necessary. Some notes on the performance of certain modules:&lt;br /&gt;
&lt;br /&gt;
* The &#039;&#039;&#039;Chat&#039;&#039;&#039; module is [http://moodle.org/mod/forum/discuss.php?d=37979&amp;amp;parent=175079 said] to be a hog in terms of frequent HTTP requests to the main server. This can be reduced by setting the module to use &#039;&#039;Streamed&#039;&#039; updates, or, if you&#039;re using a Unix-based webserver, by running the chat in daemon mode. When using the Chat module use the configuration settings to tune for your expected load. Pay particular attention to the &#039;&#039;chat_old_ping&#039;&#039; and &#039;&#039;chat_refresh&#039;&#039; parameters as these can have greatest impact on server load.&lt;br /&gt;
* The &#039;&#039;&#039;Quiz&#039;&#039;&#039; module is known to stretch database performance. Try to optimise your database server by tuning. See [http://moodle.org/mod/forum/discuss.php?d=25616&amp;amp;parent=120770 for a brief report on performance for 55 students simultaneously using quizzes]&lt;br /&gt;
** See this Case Study for an extensive server stress test with 300 quiz users.[http://moodle.org/mod/forum/discuss.php?d=68579]  And this accompanying report on network traffic and server loads. [http://elearning.sgu.ac.jp/doc/PT/]&lt;br /&gt;
* The Moodle &#039;&#039;&#039;Cron&#039;&#039;&#039; task is triggered by calling the script &#039;&#039;cron.php&#039;&#039;. If this is called over HTTP (e.g. using wget or curl) it can take a large amount of memory on large installations. If it is called by directly invoking the php command (e.g. &#039;&#039;php -f /path/to/moodle/directory/admin/cron.php&#039;&#039;) efficiency can be much improved.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*[[Performance FAQ]]&lt;br /&gt;
*Using Moodle [http://moodle.org/mod/forum/view.php?f=94 Hardware and Performance forum]&lt;br /&gt;
&lt;br /&gt;
There have been a lot of discussions on moodle.org about performance, here are some of the more interesting and (potentially) useful ones:&lt;br /&gt;
&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=83057 Performance woes!]&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=57028 Performance perspectives - a little script]&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=88927 Comments on planned server hardware]&lt;br /&gt;
&lt;br /&gt;
[[Category:Performance]]&lt;br /&gt;
&lt;br /&gt;
[[fr:Performance]]&lt;br /&gt;
[[ja:パフォーマンス]]&lt;br /&gt;
[[pl:Wydajność]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Performance&amp;diff=41226</id>
		<title>Performance</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Performance&amp;diff=41226"/>
		<updated>2008-08-01T17:26:58Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: /* PostgreSQL performance */ fixed link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Location: &#039;&#039;Administration &amp;gt; Server &amp;gt; Performance&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Moodle can be made to perform very well, at small usage levels or scaling up to many thousands of users. The factors involved in performance are basically the same as for any PHP-based database-driven system. When trying to optimize your server, try to focus on the factor which will make the most difference to the user. For example, if you have relatively more users browsing than accessing the database, look to improve the webserver performance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Obtain a baseline benchmark==&lt;br /&gt;
&lt;br /&gt;
Before attempting any optimization, you should obtain a baseline benchmark of the component of the system you are trying to improve. For Linux try [http://lbs.sourceforge.net/ LBS] and for Windows use the Performance Monitor. Once you have quantitative data about how your system is performing currently, you&#039;ll be able to determine if the change you have made as has any real impact.&lt;br /&gt;
&lt;br /&gt;
The overall aim of adjustments to improve performance is to use RAM (cacheing) and to reduce disk-based activity. It is especially important to try to eliminate swap file usage as much as you can. If your system starts swapping, this is a sign that you need more RAM. &lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;optimization order preference&#039;&#039;&#039; is usually: primary storage (more RAM), secondary storage (faster hard disks/improved hard disk configuration), processor (more and faster).&lt;br /&gt;
&lt;br /&gt;
==Scalability==&lt;br /&gt;
&lt;br /&gt;
Moodle&#039;s design (with clear separation of application layers) allows for strongly scalable setups. (Please check the list of [[Large installations|large Moodle installations]].)&lt;br /&gt;
&lt;br /&gt;
Large sites usually separate the web server and database onto separate servers, although for smaller installations this is typically not necessary.&lt;br /&gt;
&lt;br /&gt;
It is possible to load-balance a Moodle installation, for example by using more than one webserver. The separate webservers should query the same database and refer to the same filestore area, but otherwise the separation of the application layers is complete enough to make this kind of clustering feasible. Similarly, the database could be a cluster of servers (e.g. a MySQL cluster), but this is not an easy task and you should seek expert support, e.g. from a Moodle Partner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;See also&#039;&#039;&#039;: &lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=4801 Scalability] forum discussion.&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=57202 Moodle clustering] forum discussion.&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=44470 Software load balancing] forum discussion.&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=49986 TCP load balancing] forum dicsussion.&lt;br /&gt;
&lt;br /&gt;
==Hardware configuration==&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: The fastest and most effective change that you can make to improve performance is to &#039;&#039;&#039;increase the amount of RAM on your web server&#039;&#039;&#039; - get as much as possible (eg 4GB). Increasing primary memory will reduce the need for processes to swap to disk and will enable your server to handle more users.&lt;br /&gt;
* Better performance is gained by obtaining the best &#039;&#039;&#039;processor capability&#039;&#039;&#039; you can, i.e. dual or dual core processors. A modern BIOS should allow you to enable hyperthreading, but check if this makes a difference to the overall performance of the processors by using a [http://en.wikipedia.org/wiki/Super_PI CPU benchmarking tool].&lt;br /&gt;
* If you can afford them, use &#039;&#039;&#039;SCSI hard disks&#039;&#039;&#039; instead of SATA drives. SATA drives will increase your system&#039;s CPU utilization, whereas SCSI drives have their own integrated processors and come into their own when you have multiple drives. If you must have SATA drives, check that your motherboard and the drives themselves support NCQ (Native Command Queuing).&lt;br /&gt;
* Purchase hard disks with a &#039;&#039;&#039;low seek time&#039;&#039;&#039;. This will improve the overall speed of your system, especially when accessing Moodle&#039;s reports.&lt;br /&gt;
* Size your &#039;&#039;&#039;swap file&#039;&#039;&#039; correctly. The general advice is to set it to 4 x physical RAM.&lt;br /&gt;
* Use a &#039;&#039;&#039;RAID disk system&#039;&#039;&#039;. Although there are many different RAID configurations you can create, the following generally works best:&lt;br /&gt;
** install a hardware RAID controller (if you can)&lt;br /&gt;
** the operating system and swap drive on one set of disks configured as RAID-1.&lt;br /&gt;
** Moodle, Web server and Database server on another set of disks configured as RAID-5.&lt;br /&gt;
* Use &#039;&#039;&#039;gigabit ethernet&#039;&#039;&#039; for improved latency and throughput. This is especially important when you have your webserver and database server separated out on different hosts.&lt;br /&gt;
* Check the settings on your &#039;&#039;&#039;network card&#039;&#039;&#039;. You may get an improvement in performance by increasing the use of buffers and transmit/receive descriptors (balance this with processor and memory overheads) and off-loading TCP checksum calculation onto the card instead of the OS.&lt;br /&gt;
*  Read this [http://moodle.org/mod/forum/discuss.php?d=68579 Case Study] on a server stress test with 300 users.  &lt;br /&gt;
*  See this [http://elearning.sgu.ac.jp/doc/PT/ accompanying report] on network traffic and server loads.&lt;br /&gt;
&lt;br /&gt;
==Operating System==&lt;br /&gt;
* You can use [http://en.wikipedia.org/wiki/Linux Linux](recommended), Unix-based, Windows or Mac OS X for the server &#039;&#039;&#039;operating system&#039;&#039;&#039;. *nix operating systems generally require less memory than Mac OS X or Windows servers for doing the same task as the server is configured with just a shell interface. Additionally Linux does not have licensing fees attached, but can have a big learning curve if you&#039;re used to another operating system. If you have a large number of processors running SMP, you may also want to consider using a highly tuned OS such as [http://en.wikipedia.org/wiki/Solaris_Operating_Environment Solaris].&lt;br /&gt;
* Check your own OS and &#039;&#039;&#039;vendor specific instructions&#039;&#039;&#039; for optimization steps.&lt;br /&gt;
** For Linux look at the [http://linuxperf.sourceforge.net/ Linux Performance Team] site. &lt;br /&gt;
** For Linux investigate the hdparm command, e.g. hdparm -m16 -d1 can be used to enable read/write on multiple sectors and DMA. Mount disks with the async and noatime options.&lt;br /&gt;
** For Windows set the sever to be optimized for network applications (Control Panel, Network Connections, LAN connection, Properties, File &amp;amp; Printer Sharing for Microsoft Networks, Properties, Optimization). You can also search the [http://technet.microsoft.com/ Microsoft TechNet site] for optimization documents.&lt;br /&gt;
&lt;br /&gt;
==Web server performance==&lt;br /&gt;
&lt;br /&gt;
Installing [http://www.mozilla.com/en-US/ Firefox] and the [https://addons.mozilla.org/en-US/firefox/addon/1843 firebug] extension will allow you to watch the time it takes for each page component to load. Also, the [https://addons.mozilla.org/en-US/firefox/addon/5369 Yslow] extension will evaluate your page against Yahoo&#039;s [http://www.skrenta.com/2007/05/14_rules_for_fast_web_pages_by_1.html 14 rules] ([http://video.yahoo.com/video/play?vid=1040890 video]) for fast loading websites.&lt;br /&gt;
&lt;br /&gt;
===PHP performance===&lt;br /&gt;
* You are strongly recommended to use a &#039;&#039;&#039;PHP accelerator&#039;&#039;&#039; to ease CPU load, such as [http://pecl.php.net/apc APC], [http://www.php-accelerator.co.uk/ PHPA], [http://trac.lighttpd.net/xcache/ Xcache] or [http://eaccelerator.net/ eAccelerator]. (Take care to choose a PHP accelerator that is known to work well with your version of PHP and note that Turck MMCache is [http://turckmmcache.exeprod.com/TheManifestoEnglish no longer maintained] and can cause failures with PHP 5). &lt;br /&gt;
* Improvements in read/write performance can be improved by putting the cached PHP pages on a [[TMPFS]] filesystem - but remember that you&#039;ll lose the cache contents when there is a power failure or the server is rebooted.&lt;br /&gt;
* Performance of PHP is better when installed as an &#039;&#039;&#039;Apache/IIS ISAPI module&#039;&#039;&#039; (rather than a CGI).&lt;br /&gt;
* Also check the &#039;&#039;&#039;memory_limit&#039;&#039;&#039; in php.ini, reduce it to 16M for Moodle version earlier than 1.7 ([http://moodle.org/mod/forum/discuss.php?d=39656 See this forum discussion]). For Moodle 1.7 or later, it is recommended that the value of memory_limit should be 40M. As of [http://www.php.net/ChangeLog-5.php PHP 5.2.1] the default value for the memory_limit directive is 128M.&lt;br /&gt;
&lt;br /&gt;
===Apache performance===&lt;br /&gt;
* If you are using Apache on a Windows server, use the build from [http://www.apachelounge.com Apache Lounge] which is reported to have [http://moodle.org/mod/forum/discuss.php?d=93358 performance and stability improvements] compared to the official Apache download. Note that this is an unofficial build, so may not keep up with official releases.&lt;br /&gt;
* Set the &#039;&#039;&#039;MaxClients&#039;&#039;&#039; directive correctly. Use this formula to help (which uses 80% of available memory to leave room for spare):&lt;br /&gt;
 MaxClients = Total available memory * 80% / Max memory usage of apache process&lt;br /&gt;
:Memory usage of apache process is usually 10MB, so a general rule of thumb is to divide your available memory in megabytes by 10 to get the value of MaxClients. To find the max memory usage of apache processes read the value from the shell command:&lt;br /&gt;
 #ps -ylC httpd --sort:rss&lt;br /&gt;
&lt;br /&gt;
:If you need to increase the value of &#039;&#039;&#039;MaxClients&#039;&#039;&#039; beyond 256, you will also need to set the &#039;&#039;&#039;ServerLimit&#039;&#039;&#039; directive. &lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;Warning&#039;&#039;&#039;: Do not be tempted to set the value of MaxClients higher than your available memory as your server will consume more RAM than available and start to swap to disk. &lt;br /&gt;
* Consider reducing the &#039;&#039;&#039;number of modules&#039;&#039;&#039; that Apache loads in the httpd.conf file to the minumum necessary to reduce the memory needed. &lt;br /&gt;
* Use the &#039;&#039;&#039;latest version of Apache&#039;&#039;&#039; - Apache 2 has an improved memory model which reduces memory usage further.&lt;br /&gt;
* For Unix/Linux systems, consider lowering &#039;&#039;&#039;MaxRequestsPerChild&#039;&#039;&#039; in httpd.conf to as low as 20-30 (if you set it any lower the overhead of forking begins to outweigh the benefits). &lt;br /&gt;
* For a heavily loaded server, consider setting &#039;&#039;&#039;KeepAlive Off&#039;&#039;&#039; (do this only if your Moodle pages do not contain links to resources or uploaded images) or lowering the &#039;&#039;&#039;KeepAliveTimeout&#039;&#039;&#039; to between 2 and 5. The default is 15 (seconds) - the higher the value the more server processes will be kept waiting for possibly idle connections. A more accurate value for KeepAliveTimeout is obtained by observing how long it takes your users to download a page. After altering any of the KeepAlive variables, monitor your CPU utilization as there may be an additional overhead in initiating more worker processes/threads.&lt;br /&gt;
* As an alternative to using KeepAlive Off, consider setting-up a &#039;&#039;&#039;Reverse Proxy server&#039;&#039;&#039; infront of the Moodle server to cache HTML files with images. You can then return Apache to using keep-alives on the Moodle server.&lt;br /&gt;
* If you do not use a .htaccess file, set the &#039;&#039;&#039;AllowOverride&#039;&#039;&#039; variable to AllowOverride None to prevent .htaccess lookups.&lt;br /&gt;
* Set &#039;&#039;&#039;DirectoryIndex&#039;&#039;&#039; correctly so as to avoid content-negotiation. Here&#039;s an example from a production server:&lt;br /&gt;
 DirectoryIndex index.php index.html index.htm&lt;br /&gt;
* Unless you are doing development work on the server, set &#039;&#039;&#039;ExtendedStatus Off&#039;&#039;&#039; and disable mod_info as well as mod_status.&lt;br /&gt;
* Leave &#039;&#039;&#039;HostnamesLookups Off&#039;&#039;&#039; (as default) to reduce DNS latency.&lt;br /&gt;
* Consider reducing the value of &#039;&#039;&#039;TimeOut&#039;&#039;&#039; to between 30 to 60 (seconds). &lt;br /&gt;
* For the &#039;&#039;&#039;Options directive&#039;&#039;&#039;, avoid Options Multiviews as this performs a directory scan. To reduce disk I/O further use&lt;br /&gt;
 Options -Indexes FollowSymLinks&lt;br /&gt;
*&#039;&#039;&#039;Caching&#039;&#039;&#039; - Apache can be told to make pages load a lot faster by specifying that the browser should cache some various page elements such as images and reuse them from local memory rather than ask for them again every time a page is requested. How to do this varies slightly between OSes but there are two basic steps:&lt;br /&gt;
&lt;br /&gt;
# Install and enable mod_expires - refer to documentation or man pages&lt;br /&gt;
# Add this code to the virtual server config file within the &amp;lt;directory&amp;gt; section for the root directory (or within the .htaccess file if AllowOverrides is On):&lt;br /&gt;
 &amp;lt;IfModule mod_expires.c&amp;gt;&lt;br /&gt;
  ExpiresActive On&lt;br /&gt;
  ExpiresDefault &amp;quot;access plus 1 seconds&amp;quot;&lt;br /&gt;
  ExpiresByType text/html &amp;quot;access plus 1 seconds&amp;quot;&lt;br /&gt;
  ExpiresByType image/gif &amp;quot;access plus 1 week&amp;quot;&lt;br /&gt;
  ExpiresByType image/jpeg &amp;quot;access plus 1 week&amp;quot;&lt;br /&gt;
  ExpiresByType image/png &amp;quot;access plus 1 week&amp;quot;&lt;br /&gt;
  ExpiresByType text/css &amp;quot;access plus 1 week&amp;quot;&lt;br /&gt;
  ExpiresByType text/javascript &amp;quot;access plus 1 week&amp;quot;&lt;br /&gt;
  ExpiresByType application/x-javascript &amp;quot;access plus 1 week&amp;quot;&lt;br /&gt;
  ExpiresByType text/xml &amp;quot;access plus 1 seconds&amp;quot;&lt;br /&gt;
 &amp;lt;/IfModule&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The effect is to make everything stay in the cache except HTML and XML, which change dynamically. It&#039;s possible to gain a several hundred percent decrease in load times this way. Adjust the cache times according to how often your images etc change.&lt;br /&gt;
&lt;br /&gt;
More info: [http://www.metaskills.net/blog/heuristics/sysadmin/how-to-control-browser-caching-with-apache-2 www.metaskills.net]&lt;br /&gt;
&lt;br /&gt;
===IIS performance===&lt;br /&gt;
All alter this location in the registry:&lt;br /&gt;
 HKLM\SYSTEM\CurrentControlSet\Services\Inetinfo\Parameters\&lt;br /&gt;
* The equivalent to KeepAliveTimeout is &#039;&#039;&#039;ListenBackLog&#039;&#039;&#039; (IIS - registry location is HKLM\ SYSTEM\ CurrentControlSet\ Services\ Inetinfo\ Parameters). Set this to between 2 to 5.&lt;br /&gt;
*Change the &#039;&#039;&#039;MemCacheSize&#039;&#039;&#039; value to adjust the amount of memory (Mb) that IIS will use for its file cache (50% of available memory by default).&lt;br /&gt;
*Change the &#039;&#039;&#039;MaxCachedFileSize&#039;&#039;&#039; to adjust the maximum size of a file cached in the file cache in bytes. Default is 262,144 (256K).&lt;br /&gt;
*Create a new DWORD called &#039;&#039;&#039;ObjectCacheTTL&#039;&#039;&#039; to change the length of time (in milliseconds) that objects in the cache are held in memory. Default is 30,000 milliseconds (30 seconds).&lt;br /&gt;
&lt;br /&gt;
===Lighttpd performance===&lt;br /&gt;
You can increase web server performance by using the &#039;&#039;&#039;light-weight webserver&#039;&#039;&#039; [http://www.lighttpd.net/ lighttpd] in combination with PHP in fastCGI-mode. Lighttpd has a lower memory consumption than Apache - typically 10M for each process. See this [[lighttpd | MoodleDocs Lighttpd page]] for configuration and administration links.&lt;br /&gt;
&lt;br /&gt;
==Database performance==&lt;br /&gt;
&lt;br /&gt;
Moodle contains a script which will display some key database performance statistics from the [http://phplens.com/lens/adodb/docs-perf.htm ADOdb performance monitor]. Run the script in your browser as in the following example:&lt;br /&gt;
&lt;br /&gt;
 http://www.mymoodle.com/admin/dbperformance.php&lt;br /&gt;
&lt;br /&gt;
Use the data displayed as a guide to tune and improve the performance of your database server.&lt;br /&gt;
&lt;br /&gt;
===MySQL performance===&lt;br /&gt;
&lt;br /&gt;
The following are MySQL specific settings which can be adjusted for better performance in your my.cnf (my.ini in Windows). The file contains a list of settings and their values. To see the current values use these commands&lt;br /&gt;
 SHOW STATUS;&lt;br /&gt;
 SHOW VARIABLES; &lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: You must make backups of your database before attempting to change any MySQL server configuration. After any change to the my.cnf, restart mysqld.&lt;br /&gt;
* Enable the &#039;&#039;&#039;query cache&#039;&#039;&#039; with &lt;br /&gt;
 query_cache_type = 1. &lt;br /&gt;
For most Moodle installs, set the following:&lt;br /&gt;
 query_cache_size = 36M &lt;br /&gt;
 query_cache_min_res_unit = 2K. &lt;br /&gt;
The query cache will improve performance if you are doing few updates on the database. &lt;br /&gt;
* Set the &#039;&#039;&#039;table cache&#039;&#039;&#039; correctly. For Moodle 1.6 set &lt;br /&gt;
 table_cache = 256 &lt;br /&gt;
(min), and for Moodle 1.7 set &lt;br /&gt;
 table_cache = 512 &lt;br /&gt;
(min). The table cache is used by all threads (connections), so monitor the value of opened_tables to further adjust - if opened_tables &amp;gt; 3 * table_cache then increase table_cache upto your OS limit. Note also that the figure for table_cache will also change depending on the number of modules and plugins you have installed. Find the number for your server by executing the mysql statement below. Look at the number returned and set table_cache to this value.&lt;br /&gt;
 mysql&amp;gt;SELECT COUNT(table_name) FROM information_schema.tables WHERE table_schema=&#039;yourmoodledbname&#039;;&lt;br /&gt;
* Set the &#039;&#039;&#039;thread cache&#039;&#039;&#039; correctly. Adjust the value so that your thread cache utilization is as close to 100% as possible by this formula:&lt;br /&gt;
 thread cache utilization (%) = (threads_created / connections) * 100&lt;br /&gt;
* The &#039;&#039;&#039;key buffer&#039;&#039;&#039; can improve the access speed to Moodle&#039;s SELECT queries. The correct size depends on the size of the index files (.myi) and in Moodle 1.6 or later (without any additional modules and plugins), the recommendation for this value is key_buffer_size = 32M. Ideally you want the database to be reading once from the disk for every 100 requests so monitor that the value is suitable for your install by adjusting the value of key_buffer_size so that the following formulas are true:&lt;br /&gt;
 key_read / key_read_requests &amp;lt; 0.01&lt;br /&gt;
 key_write / key_write_requests &amp;lt;= 1.0&lt;br /&gt;
* Set the &#039;&#039;&#039;maximum number of connections&#039;&#039;&#039; so that your users will not see a &amp;quot;Too many connections&amp;quot; message. Be careful that this may have an impact on the total memory used. MySQL connections usually last for milliseconds, so it is unusual even for a heavily loaded server for this value to be over 200.&lt;br /&gt;
* Manage &#039;&#039;&#039;high burst activity&#039;&#039;&#039;. If your Moodle install uses a lot of quizzes and you are experiencing performance problems (check by monitoring the value of threads_connected - it should not be rising) consider increasing the value of back_log.&lt;br /&gt;
* &#039;&#039;&#039;Optimize your tables weekly and after upgrading Moodle&#039;&#039;&#039;. It is good practice to also optimize your tables after performing a large data deletion exercise, e.g. at the end of your semester or academic year. This will ensure that index files are up to date. Backup your database first and then use:&lt;br /&gt;
 mysql&amp;gt;CHECK TABLE mdl_tablename;&lt;br /&gt;
 mysql&amp;gt;OPTIMIZE TABLE mdl_tablename;&lt;br /&gt;
:The common tables in Moodle to check are mdl_course_sections, mdl_forum_posts, mdl_log and mdl_sessions (if using dbsessions). Any errors need to be corrected using REPAIR TABLE (see the [http://dev.mysql.com/doc/refman/5.0/en/repair-table.html MySQL manual] and this [http://moodle.org/mod/forum/discuss.php?d=58208#p279638 forum script]).&lt;br /&gt;
* &#039;&#039;&#039;Maintain the key distribution&#039;&#039;&#039;. Every month or so it is a good idea to stop the mysql server and run these myisamchk commands.&lt;br /&gt;
 #myisamchk -a -S /pathtomysql/data/moodledir/*.MYI&lt;br /&gt;
:&#039;&#039;&#039;Warning&#039;&#039;&#039;: You must stop the mysql database process (mysqld) before running any myisamchk command. If you do not, you risk data loss.&lt;br /&gt;
* Reduce the number of &#039;&#039;&#039;temporary tables saved to disk&#039;&#039;&#039;. Check this with the created_tmp_disk_tables value. If this is relatively large (&amp;gt;5%) increase tmp_table_size until you see a reduction. Note that this will have an impact on RAM usage.&lt;br /&gt;
* Moodle&#039;s tables are in the MyISAM format, so &#039;&#039;&#039;turn InnoDB off&#039;&#039;&#039; as there is no performance gain. Add &amp;lt;code&amp;gt;skip-innodb&amp;lt;/code&amp;gt; to your &amp;lt;code&amp;gt;my.cnf&amp;lt;/code&amp;gt; file. If you must use InnoDB, you&#039;ll have to convert all of Moodle&#039;s tables. To do this run the innodb script:&lt;br /&gt;
&lt;br /&gt;
 http://www.mymoodle.com/admin/innodb.php&lt;br /&gt;
&lt;br /&gt;
:See also [http://moodle.org/mod/forum/discuss.php?d=12961 this forum discussion] which looks at the MyISAM vs InnoDB options.&lt;br /&gt;
&lt;br /&gt;
===PostgreSQL performance===&lt;br /&gt;
&lt;br /&gt;
See [http://moodle.org/mod/forum/discuss.php?d=68558 Tuning PostgreSQL] thread&lt;br /&gt;
&lt;br /&gt;
===Other database performance links===&lt;br /&gt;
* Consider using a &#039;&#039;&#039;distributed cacheing system&#039;&#039;&#039; like [http://en.wikipedia.org/wiki/Memcached memcached] but note that memcached does not have any security features so it should be used behind a firewall.&lt;br /&gt;
* Consider using PostgreSQL. See [[Arguments in favour of PostgreSQL]] and [http://moodle.org/mod/forum/discuss.php?d=49195 how to migrate from MySQL to PostgreSQL] (forum discussion).&lt;br /&gt;
* [[Increasing the database connection lifetime | Try increasing the database connection lifetime]]&lt;br /&gt;
* [http://dev.mysql.com/doc/refman/5.0/en/server-parameters.html General advice on tuning MySQL parameters] (advice from the MySQL manual)&lt;br /&gt;
* [http://www.mysqlperformanceblog.com/2007/11/01/innodb-performance-optimization-basics/ InnoDB performance optimization] taken from the [http://www.mysqlperformanceblog.com/ MySQL performance blog] site.&lt;br /&gt;
&lt;br /&gt;
==Moodle Admin settings==&lt;br /&gt;
* In Moodle 1.7 or later, set the &#039;&#039;&#039;Cache type&#039;&#039;&#039; for your server: Site Admin -&amp;gt; Server -&amp;gt; Performance -&amp;gt; Cache type. There are several options available. &lt;br /&gt;
:*If you do not have eaccelerator or mmemcached installed, choose &amp;quot;internal&amp;quot; (which makes use of the record/internal cache - see the next bullet point). &lt;br /&gt;
:* If you have a single server and have compiled &#039;&#039;&#039;eaccelerator with shared memory support&#039;&#039;&#039;, set the cache type to the eaccelerator option. &lt;br /&gt;
:* If you have a &#039;&#039;&#039;separate memcached server&#039;&#039;&#039;, set the cache type to memcached and enter a csv list of server IP addresses.&lt;br /&gt;
* Enable the &#039;&#039;&#039;record/internal cache&#039;&#039;&#039;: Site Admin -&amp;gt; Server -&amp;gt; Performance -&amp;gt; Record cache = True. Set the maximum amount of memory allocated to the cache in the Int Cache Max box. This will enable a primary cache for database records, without using any database engine cache, e.g. MySQL/PostgreSQL cache. See [http://tracker.moodle.org/browse/MDL-7196 this Tracker entry] for a full discussion.&lt;br /&gt;
* Enable the &#039;&#039;&#039;language cache&#039;&#039;&#039;.&lt;br /&gt;
* Large log files can cause overall performance to degrade over time. If you observe that the site has gradually got slower loading pages in the browser, &#039;&#039;&#039;reduce your Log life time&#039;&#039;&#039; setting (Admin/Server/Cleanup).&lt;br /&gt;
* Performance can be greatly improved by allowing Moodle to use the system &#039;&#039;&#039;zip/unzip&#039;&#039;&#039; commands (rather than PHP-based zip libraries) - visit Admin/Server/System Paths and enter the path to the relevant executables. (Similarly, filling in the path to &#039;&#039;&#039;du&#039;&#039;&#039; will improve Moodle&#039;s speed at listing directory contents.)&lt;br /&gt;
* Note that using &#039;&#039;&#039;secure web connections&#039;&#039;&#039; (&#039;&#039;&#039;https&#039;&#039;&#039; rather than &#039;&#039;&#039;http&#039;&#039;&#039;) carries a higher processing burden, both for the webserver and the client - particularly because cacheing cannot be used as effectively, so the number of file requests is likely to increase dramatically. For this reason using https for all Moodle pages is not recommended. You can enable https just for the login screen, simply from Moodle&#039;s config page.&lt;br /&gt;
* Check your &#039;&#039;&#039;filters&#039;&#039;&#039;. Having too many filters active can have serious effects on server load, especially on lower-end systems. The number of active filters has a direct effect on the perceived latency of your site; that is the time taken for each page impression. &lt;br /&gt;
* Enable the &#039;&#039;&#039;text cache&#039;&#039;&#039; but do not &amp;quot;Filter all strings&amp;quot; unless you have a specific need. If in doubt profile the performance, and see how your changes affect the processing time.&lt;br /&gt;
* Check your &#039;&#039;&#039;anti-virus&#039;&#039;&#039; measures on the server.  Although they are useful for preventing security holes being exploited, some &amp;quot;On-Demand&amp;quot; scanners can affect performance by scanning page content (word, ppt files etc).&lt;br /&gt;
* If there are performance problems loading course pages, check the &#039;&#039;&#039;Resource module settings&#039;&#039;&#039;. The setting resource_filterexternalpages is known to slow-down course pages and should be set to &#039;No&#039; for better performance.&lt;br /&gt;
* Check your &#039;&#039;&#039;forum settings&#039;&#039;&#039;. To improve performance set forum_trackreadposts = No and forum_usermarksread = Yes (this will impact on the convenience of your users&#039; forum experience). Also consider setting the time of the day when old posts are cleared from the read table (forum_cleanreadtime) to when your site is less busy.&lt;br /&gt;
&lt;br /&gt;
==Performance of different Moodle modules==&lt;br /&gt;
&lt;br /&gt;
Moodle&#039;s activity modules, filters, and other plugins can be activated/deactivated. If necessary, you may wish to deactivate some features (such as chat) if not required - but this isn&#039;t necessary. Some notes on the performance of certain modules:&lt;br /&gt;
&lt;br /&gt;
* The &#039;&#039;&#039;Chat&#039;&#039;&#039; module is [http://moodle.org/mod/forum/discuss.php?d=37979&amp;amp;parent=175079 said] to be a hog in terms of frequent HTTP requests to the main server. This can be reduced by setting the module to use &#039;&#039;Streamed&#039;&#039; updates, or, if you&#039;re using a Unix-based webserver, by running the chat in daemon mode. When using the Chat module use the configuration settings to tune for your expected load. Pay particular attention to the &#039;&#039;chat_old_ping&#039;&#039; and &#039;&#039;chat_refresh&#039;&#039; parameters as these can have greatest impact on server load.&lt;br /&gt;
* The &#039;&#039;&#039;Quiz&#039;&#039;&#039; module is known to stretch database performance. Try to optimise your database server by tuning. See [http://moodle.org/mod/forum/discuss.php?d=25616&amp;amp;parent=120770 for a brief report on performance for 55 students simultaneously using quizzes]&lt;br /&gt;
** See this Case Study for an extensive server stress test with 300 quiz users.[http://moodle.org/mod/forum/discuss.php?d=68579]  And this accompanying report on network traffic and server loads. [http://elearning.sgu.ac.jp/doc/PT/]&lt;br /&gt;
* The Moodle &#039;&#039;&#039;Cron&#039;&#039;&#039; task is triggered by calling the script &#039;&#039;cron.php&#039;&#039;. If this is called over HTTP (e.g. using wget or curl) it can take a large amount of memory on large installations. If it is called by directly invoking the php command (e.g. &#039;&#039;php -f /path/to/moodle/directory/admin/cron.php&#039;&#039;) efficiency can be much improved.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*[[Performance FAQ]]&lt;br /&gt;
*Using Moodle [http://moodle.org/mod/forum/view.php?f=94 Hardware and Performance forum]&lt;br /&gt;
&lt;br /&gt;
There have been a lot of discussions on moodle.org about performance, here are some of the more interesting and (potentially) useful ones:&lt;br /&gt;
&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=83057 Performance woes!]&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=57028 Performance perspectives - a little script]&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=88927 Comments on planned server hardware]&lt;br /&gt;
&lt;br /&gt;
[[Category:Performance]]&lt;br /&gt;
&lt;br /&gt;
[[fr:Performance]]&lt;br /&gt;
[[ja:パフォーマンス]]&lt;br /&gt;
[[pl:Wydajność]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Performance&amp;diff=41225</id>
		<title>Performance</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Performance&amp;diff=41225"/>
		<updated>2008-08-01T17:26:10Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Added PostgreSQL performance&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Location: &#039;&#039;Administration &amp;gt; Server &amp;gt; Performance&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Moodle can be made to perform very well, at small usage levels or scaling up to many thousands of users. The factors involved in performance are basically the same as for any PHP-based database-driven system. When trying to optimize your server, try to focus on the factor which will make the most difference to the user. For example, if you have relatively more users browsing than accessing the database, look to improve the webserver performance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Obtain a baseline benchmark==&lt;br /&gt;
&lt;br /&gt;
Before attempting any optimization, you should obtain a baseline benchmark of the component of the system you are trying to improve. For Linux try [http://lbs.sourceforge.net/ LBS] and for Windows use the Performance Monitor. Once you have quantitative data about how your system is performing currently, you&#039;ll be able to determine if the change you have made as has any real impact.&lt;br /&gt;
&lt;br /&gt;
The overall aim of adjustments to improve performance is to use RAM (cacheing) and to reduce disk-based activity. It is especially important to try to eliminate swap file usage as much as you can. If your system starts swapping, this is a sign that you need more RAM. &lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;optimization order preference&#039;&#039;&#039; is usually: primary storage (more RAM), secondary storage (faster hard disks/improved hard disk configuration), processor (more and faster).&lt;br /&gt;
&lt;br /&gt;
==Scalability==&lt;br /&gt;
&lt;br /&gt;
Moodle&#039;s design (with clear separation of application layers) allows for strongly scalable setups. (Please check the list of [[Large installations|large Moodle installations]].)&lt;br /&gt;
&lt;br /&gt;
Large sites usually separate the web server and database onto separate servers, although for smaller installations this is typically not necessary.&lt;br /&gt;
&lt;br /&gt;
It is possible to load-balance a Moodle installation, for example by using more than one webserver. The separate webservers should query the same database and refer to the same filestore area, but otherwise the separation of the application layers is complete enough to make this kind of clustering feasible. Similarly, the database could be a cluster of servers (e.g. a MySQL cluster), but this is not an easy task and you should seek expert support, e.g. from a Moodle Partner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;See also&#039;&#039;&#039;: &lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=4801 Scalability] forum discussion.&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=57202 Moodle clustering] forum discussion.&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=44470 Software load balancing] forum discussion.&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=49986 TCP load balancing] forum dicsussion.&lt;br /&gt;
&lt;br /&gt;
==Hardware configuration==&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: The fastest and most effective change that you can make to improve performance is to &#039;&#039;&#039;increase the amount of RAM on your web server&#039;&#039;&#039; - get as much as possible (eg 4GB). Increasing primary memory will reduce the need for processes to swap to disk and will enable your server to handle more users.&lt;br /&gt;
* Better performance is gained by obtaining the best &#039;&#039;&#039;processor capability&#039;&#039;&#039; you can, i.e. dual or dual core processors. A modern BIOS should allow you to enable hyperthreading, but check if this makes a difference to the overall performance of the processors by using a [http://en.wikipedia.org/wiki/Super_PI CPU benchmarking tool].&lt;br /&gt;
* If you can afford them, use &#039;&#039;&#039;SCSI hard disks&#039;&#039;&#039; instead of SATA drives. SATA drives will increase your system&#039;s CPU utilization, whereas SCSI drives have their own integrated processors and come into their own when you have multiple drives. If you must have SATA drives, check that your motherboard and the drives themselves support NCQ (Native Command Queuing).&lt;br /&gt;
* Purchase hard disks with a &#039;&#039;&#039;low seek time&#039;&#039;&#039;. This will improve the overall speed of your system, especially when accessing Moodle&#039;s reports.&lt;br /&gt;
* Size your &#039;&#039;&#039;swap file&#039;&#039;&#039; correctly. The general advice is to set it to 4 x physical RAM.&lt;br /&gt;
* Use a &#039;&#039;&#039;RAID disk system&#039;&#039;&#039;. Although there are many different RAID configurations you can create, the following generally works best:&lt;br /&gt;
** install a hardware RAID controller (if you can)&lt;br /&gt;
** the operating system and swap drive on one set of disks configured as RAID-1.&lt;br /&gt;
** Moodle, Web server and Database server on another set of disks configured as RAID-5.&lt;br /&gt;
* Use &#039;&#039;&#039;gigabit ethernet&#039;&#039;&#039; for improved latency and throughput. This is especially important when you have your webserver and database server separated out on different hosts.&lt;br /&gt;
* Check the settings on your &#039;&#039;&#039;network card&#039;&#039;&#039;. You may get an improvement in performance by increasing the use of buffers and transmit/receive descriptors (balance this with processor and memory overheads) and off-loading TCP checksum calculation onto the card instead of the OS.&lt;br /&gt;
*  Read this [http://moodle.org/mod/forum/discuss.php?d=68579 Case Study] on a server stress test with 300 users.  &lt;br /&gt;
*  See this [http://elearning.sgu.ac.jp/doc/PT/ accompanying report] on network traffic and server loads.&lt;br /&gt;
&lt;br /&gt;
==Operating System==&lt;br /&gt;
* You can use [http://en.wikipedia.org/wiki/Linux Linux](recommended), Unix-based, Windows or Mac OS X for the server &#039;&#039;&#039;operating system&#039;&#039;&#039;. *nix operating systems generally require less memory than Mac OS X or Windows servers for doing the same task as the server is configured with just a shell interface. Additionally Linux does not have licensing fees attached, but can have a big learning curve if you&#039;re used to another operating system. If you have a large number of processors running SMP, you may also want to consider using a highly tuned OS such as [http://en.wikipedia.org/wiki/Solaris_Operating_Environment Solaris].&lt;br /&gt;
* Check your own OS and &#039;&#039;&#039;vendor specific instructions&#039;&#039;&#039; for optimization steps.&lt;br /&gt;
** For Linux look at the [http://linuxperf.sourceforge.net/ Linux Performance Team] site. &lt;br /&gt;
** For Linux investigate the hdparm command, e.g. hdparm -m16 -d1 can be used to enable read/write on multiple sectors and DMA. Mount disks with the async and noatime options.&lt;br /&gt;
** For Windows set the sever to be optimized for network applications (Control Panel, Network Connections, LAN connection, Properties, File &amp;amp; Printer Sharing for Microsoft Networks, Properties, Optimization). You can also search the [http://technet.microsoft.com/ Microsoft TechNet site] for optimization documents.&lt;br /&gt;
&lt;br /&gt;
==Web server performance==&lt;br /&gt;
&lt;br /&gt;
Installing [http://www.mozilla.com/en-US/ Firefox] and the [https://addons.mozilla.org/en-US/firefox/addon/1843 firebug] extension will allow you to watch the time it takes for each page component to load. Also, the [https://addons.mozilla.org/en-US/firefox/addon/5369 Yslow] extension will evaluate your page against Yahoo&#039;s [http://www.skrenta.com/2007/05/14_rules_for_fast_web_pages_by_1.html 14 rules] ([http://video.yahoo.com/video/play?vid=1040890 video]) for fast loading websites.&lt;br /&gt;
&lt;br /&gt;
===PHP performance===&lt;br /&gt;
* You are strongly recommended to use a &#039;&#039;&#039;PHP accelerator&#039;&#039;&#039; to ease CPU load, such as [http://pecl.php.net/apc APC], [http://www.php-accelerator.co.uk/ PHPA], [http://trac.lighttpd.net/xcache/ Xcache] or [http://eaccelerator.net/ eAccelerator]. (Take care to choose a PHP accelerator that is known to work well with your version of PHP and note that Turck MMCache is [http://turckmmcache.exeprod.com/TheManifestoEnglish no longer maintained] and can cause failures with PHP 5). &lt;br /&gt;
* Improvements in read/write performance can be improved by putting the cached PHP pages on a [[TMPFS]] filesystem - but remember that you&#039;ll lose the cache contents when there is a power failure or the server is rebooted.&lt;br /&gt;
* Performance of PHP is better when installed as an &#039;&#039;&#039;Apache/IIS ISAPI module&#039;&#039;&#039; (rather than a CGI).&lt;br /&gt;
* Also check the &#039;&#039;&#039;memory_limit&#039;&#039;&#039; in php.ini, reduce it to 16M for Moodle version earlier than 1.7 ([http://moodle.org/mod/forum/discuss.php?d=39656 See this forum discussion]). For Moodle 1.7 or later, it is recommended that the value of memory_limit should be 40M. As of [http://www.php.net/ChangeLog-5.php PHP 5.2.1] the default value for the memory_limit directive is 128M.&lt;br /&gt;
&lt;br /&gt;
===Apache performance===&lt;br /&gt;
* If you are using Apache on a Windows server, use the build from [http://www.apachelounge.com Apache Lounge] which is reported to have [http://moodle.org/mod/forum/discuss.php?d=93358 performance and stability improvements] compared to the official Apache download. Note that this is an unofficial build, so may not keep up with official releases.&lt;br /&gt;
* Set the &#039;&#039;&#039;MaxClients&#039;&#039;&#039; directive correctly. Use this formula to help (which uses 80% of available memory to leave room for spare):&lt;br /&gt;
 MaxClients = Total available memory * 80% / Max memory usage of apache process&lt;br /&gt;
:Memory usage of apache process is usually 10MB, so a general rule of thumb is to divide your available memory in megabytes by 10 to get the value of MaxClients. To find the max memory usage of apache processes read the value from the shell command:&lt;br /&gt;
 #ps -ylC httpd --sort:rss&lt;br /&gt;
&lt;br /&gt;
:If you need to increase the value of &#039;&#039;&#039;MaxClients&#039;&#039;&#039; beyond 256, you will also need to set the &#039;&#039;&#039;ServerLimit&#039;&#039;&#039; directive. &lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;Warning&#039;&#039;&#039;: Do not be tempted to set the value of MaxClients higher than your available memory as your server will consume more RAM than available and start to swap to disk. &lt;br /&gt;
* Consider reducing the &#039;&#039;&#039;number of modules&#039;&#039;&#039; that Apache loads in the httpd.conf file to the minumum necessary to reduce the memory needed. &lt;br /&gt;
* Use the &#039;&#039;&#039;latest version of Apache&#039;&#039;&#039; - Apache 2 has an improved memory model which reduces memory usage further.&lt;br /&gt;
* For Unix/Linux systems, consider lowering &#039;&#039;&#039;MaxRequestsPerChild&#039;&#039;&#039; in httpd.conf to as low as 20-30 (if you set it any lower the overhead of forking begins to outweigh the benefits). &lt;br /&gt;
* For a heavily loaded server, consider setting &#039;&#039;&#039;KeepAlive Off&#039;&#039;&#039; (do this only if your Moodle pages do not contain links to resources or uploaded images) or lowering the &#039;&#039;&#039;KeepAliveTimeout&#039;&#039;&#039; to between 2 and 5. The default is 15 (seconds) - the higher the value the more server processes will be kept waiting for possibly idle connections. A more accurate value for KeepAliveTimeout is obtained by observing how long it takes your users to download a page. After altering any of the KeepAlive variables, monitor your CPU utilization as there may be an additional overhead in initiating more worker processes/threads.&lt;br /&gt;
* As an alternative to using KeepAlive Off, consider setting-up a &#039;&#039;&#039;Reverse Proxy server&#039;&#039;&#039; infront of the Moodle server to cache HTML files with images. You can then return Apache to using keep-alives on the Moodle server.&lt;br /&gt;
* If you do not use a .htaccess file, set the &#039;&#039;&#039;AllowOverride&#039;&#039;&#039; variable to AllowOverride None to prevent .htaccess lookups.&lt;br /&gt;
* Set &#039;&#039;&#039;DirectoryIndex&#039;&#039;&#039; correctly so as to avoid content-negotiation. Here&#039;s an example from a production server:&lt;br /&gt;
 DirectoryIndex index.php index.html index.htm&lt;br /&gt;
* Unless you are doing development work on the server, set &#039;&#039;&#039;ExtendedStatus Off&#039;&#039;&#039; and disable mod_info as well as mod_status.&lt;br /&gt;
* Leave &#039;&#039;&#039;HostnamesLookups Off&#039;&#039;&#039; (as default) to reduce DNS latency.&lt;br /&gt;
* Consider reducing the value of &#039;&#039;&#039;TimeOut&#039;&#039;&#039; to between 30 to 60 (seconds). &lt;br /&gt;
* For the &#039;&#039;&#039;Options directive&#039;&#039;&#039;, avoid Options Multiviews as this performs a directory scan. To reduce disk I/O further use&lt;br /&gt;
 Options -Indexes FollowSymLinks&lt;br /&gt;
*&#039;&#039;&#039;Caching&#039;&#039;&#039; - Apache can be told to make pages load a lot faster by specifying that the browser should cache some various page elements such as images and reuse them from local memory rather than ask for them again every time a page is requested. How to do this varies slightly between OSes but there are two basic steps:&lt;br /&gt;
&lt;br /&gt;
# Install and enable mod_expires - refer to documentation or man pages&lt;br /&gt;
# Add this code to the virtual server config file within the &amp;lt;directory&amp;gt; section for the root directory (or within the .htaccess file if AllowOverrides is On):&lt;br /&gt;
 &amp;lt;IfModule mod_expires.c&amp;gt;&lt;br /&gt;
  ExpiresActive On&lt;br /&gt;
  ExpiresDefault &amp;quot;access plus 1 seconds&amp;quot;&lt;br /&gt;
  ExpiresByType text/html &amp;quot;access plus 1 seconds&amp;quot;&lt;br /&gt;
  ExpiresByType image/gif &amp;quot;access plus 1 week&amp;quot;&lt;br /&gt;
  ExpiresByType image/jpeg &amp;quot;access plus 1 week&amp;quot;&lt;br /&gt;
  ExpiresByType image/png &amp;quot;access plus 1 week&amp;quot;&lt;br /&gt;
  ExpiresByType text/css &amp;quot;access plus 1 week&amp;quot;&lt;br /&gt;
  ExpiresByType text/javascript &amp;quot;access plus 1 week&amp;quot;&lt;br /&gt;
  ExpiresByType application/x-javascript &amp;quot;access plus 1 week&amp;quot;&lt;br /&gt;
  ExpiresByType text/xml &amp;quot;access plus 1 seconds&amp;quot;&lt;br /&gt;
 &amp;lt;/IfModule&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The effect is to make everything stay in the cache except HTML and XML, which change dynamically. It&#039;s possible to gain a several hundred percent decrease in load times this way. Adjust the cache times according to how often your images etc change.&lt;br /&gt;
&lt;br /&gt;
More info: [http://www.metaskills.net/blog/heuristics/sysadmin/how-to-control-browser-caching-with-apache-2 www.metaskills.net]&lt;br /&gt;
&lt;br /&gt;
===IIS performance===&lt;br /&gt;
All alter this location in the registry:&lt;br /&gt;
 HKLM\SYSTEM\CurrentControlSet\Services\Inetinfo\Parameters\&lt;br /&gt;
* The equivalent to KeepAliveTimeout is &#039;&#039;&#039;ListenBackLog&#039;&#039;&#039; (IIS - registry location is HKLM\ SYSTEM\ CurrentControlSet\ Services\ Inetinfo\ Parameters). Set this to between 2 to 5.&lt;br /&gt;
*Change the &#039;&#039;&#039;MemCacheSize&#039;&#039;&#039; value to adjust the amount of memory (Mb) that IIS will use for its file cache (50% of available memory by default).&lt;br /&gt;
*Change the &#039;&#039;&#039;MaxCachedFileSize&#039;&#039;&#039; to adjust the maximum size of a file cached in the file cache in bytes. Default is 262,144 (256K).&lt;br /&gt;
*Create a new DWORD called &#039;&#039;&#039;ObjectCacheTTL&#039;&#039;&#039; to change the length of time (in milliseconds) that objects in the cache are held in memory. Default is 30,000 milliseconds (30 seconds).&lt;br /&gt;
&lt;br /&gt;
===Lighttpd performance===&lt;br /&gt;
You can increase web server performance by using the &#039;&#039;&#039;light-weight webserver&#039;&#039;&#039; [http://www.lighttpd.net/ lighttpd] in combination with PHP in fastCGI-mode. Lighttpd has a lower memory consumption than Apache - typically 10M for each process. See this [[lighttpd | MoodleDocs Lighttpd page]] for configuration and administration links.&lt;br /&gt;
&lt;br /&gt;
==Database performance==&lt;br /&gt;
&lt;br /&gt;
Moodle contains a script which will display some key database performance statistics from the [http://phplens.com/lens/adodb/docs-perf.htm ADOdb performance monitor]. Run the script in your browser as in the following example:&lt;br /&gt;
&lt;br /&gt;
 http://www.mymoodle.com/admin/dbperformance.php&lt;br /&gt;
&lt;br /&gt;
Use the data displayed as a guide to tune and improve the performance of your database server.&lt;br /&gt;
&lt;br /&gt;
===MySQL performance===&lt;br /&gt;
&lt;br /&gt;
The following are MySQL specific settings which can be adjusted for better performance in your my.cnf (my.ini in Windows). The file contains a list of settings and their values. To see the current values use these commands&lt;br /&gt;
 SHOW STATUS;&lt;br /&gt;
 SHOW VARIABLES; &lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: You must make backups of your database before attempting to change any MySQL server configuration. After any change to the my.cnf, restart mysqld.&lt;br /&gt;
* Enable the &#039;&#039;&#039;query cache&#039;&#039;&#039; with &lt;br /&gt;
 query_cache_type = 1. &lt;br /&gt;
For most Moodle installs, set the following:&lt;br /&gt;
 query_cache_size = 36M &lt;br /&gt;
 query_cache_min_res_unit = 2K. &lt;br /&gt;
The query cache will improve performance if you are doing few updates on the database. &lt;br /&gt;
* Set the &#039;&#039;&#039;table cache&#039;&#039;&#039; correctly. For Moodle 1.6 set &lt;br /&gt;
 table_cache = 256 &lt;br /&gt;
(min), and for Moodle 1.7 set &lt;br /&gt;
 table_cache = 512 &lt;br /&gt;
(min). The table cache is used by all threads (connections), so monitor the value of opened_tables to further adjust - if opened_tables &amp;gt; 3 * table_cache then increase table_cache upto your OS limit. Note also that the figure for table_cache will also change depending on the number of modules and plugins you have installed. Find the number for your server by executing the mysql statement below. Look at the number returned and set table_cache to this value.&lt;br /&gt;
 mysql&amp;gt;SELECT COUNT(table_name) FROM information_schema.tables WHERE table_schema=&#039;yourmoodledbname&#039;;&lt;br /&gt;
* Set the &#039;&#039;&#039;thread cache&#039;&#039;&#039; correctly. Adjust the value so that your thread cache utilization is as close to 100% as possible by this formula:&lt;br /&gt;
 thread cache utilization (%) = (threads_created / connections) * 100&lt;br /&gt;
* The &#039;&#039;&#039;key buffer&#039;&#039;&#039; can improve the access speed to Moodle&#039;s SELECT queries. The correct size depends on the size of the index files (.myi) and in Moodle 1.6 or later (without any additional modules and plugins), the recommendation for this value is key_buffer_size = 32M. Ideally you want the database to be reading once from the disk for every 100 requests so monitor that the value is suitable for your install by adjusting the value of key_buffer_size so that the following formulas are true:&lt;br /&gt;
 key_read / key_read_requests &amp;lt; 0.01&lt;br /&gt;
 key_write / key_write_requests &amp;lt;= 1.0&lt;br /&gt;
* Set the &#039;&#039;&#039;maximum number of connections&#039;&#039;&#039; so that your users will not see a &amp;quot;Too many connections&amp;quot; message. Be careful that this may have an impact on the total memory used. MySQL connections usually last for milliseconds, so it is unusual even for a heavily loaded server for this value to be over 200.&lt;br /&gt;
* Manage &#039;&#039;&#039;high burst activity&#039;&#039;&#039;. If your Moodle install uses a lot of quizzes and you are experiencing performance problems (check by monitoring the value of threads_connected - it should not be rising) consider increasing the value of back_log.&lt;br /&gt;
* &#039;&#039;&#039;Optimize your tables weekly and after upgrading Moodle&#039;&#039;&#039;. It is good practice to also optimize your tables after performing a large data deletion exercise, e.g. at the end of your semester or academic year. This will ensure that index files are up to date. Backup your database first and then use:&lt;br /&gt;
 mysql&amp;gt;CHECK TABLE mdl_tablename;&lt;br /&gt;
 mysql&amp;gt;OPTIMIZE TABLE mdl_tablename;&lt;br /&gt;
:The common tables in Moodle to check are mdl_course_sections, mdl_forum_posts, mdl_log and mdl_sessions (if using dbsessions). Any errors need to be corrected using REPAIR TABLE (see the [http://dev.mysql.com/doc/refman/5.0/en/repair-table.html MySQL manual] and this [http://moodle.org/mod/forum/discuss.php?d=58208#p279638 forum script]).&lt;br /&gt;
* &#039;&#039;&#039;Maintain the key distribution&#039;&#039;&#039;. Every month or so it is a good idea to stop the mysql server and run these myisamchk commands.&lt;br /&gt;
 #myisamchk -a -S /pathtomysql/data/moodledir/*.MYI&lt;br /&gt;
:&#039;&#039;&#039;Warning&#039;&#039;&#039;: You must stop the mysql database process (mysqld) before running any myisamchk command. If you do not, you risk data loss.&lt;br /&gt;
* Reduce the number of &#039;&#039;&#039;temporary tables saved to disk&#039;&#039;&#039;. Check this with the created_tmp_disk_tables value. If this is relatively large (&amp;gt;5%) increase tmp_table_size until you see a reduction. Note that this will have an impact on RAM usage.&lt;br /&gt;
* Moodle&#039;s tables are in the MyISAM format, so &#039;&#039;&#039;turn InnoDB off&#039;&#039;&#039; as there is no performance gain. Add &amp;lt;code&amp;gt;skip-innodb&amp;lt;/code&amp;gt; to your &amp;lt;code&amp;gt;my.cnf&amp;lt;/code&amp;gt; file. If you must use InnoDB, you&#039;ll have to convert all of Moodle&#039;s tables. To do this run the innodb script:&lt;br /&gt;
&lt;br /&gt;
 http://www.mymoodle.com/admin/innodb.php&lt;br /&gt;
&lt;br /&gt;
:See also [http://moodle.org/mod/forum/discuss.php?d=12961 this forum discussion] which looks at the MyISAM vs InnoDB options.&lt;br /&gt;
&lt;br /&gt;
===PostgreSQL performance===&lt;br /&gt;
&lt;br /&gt;
See [Tuning PostgreSQL http://moodle.org/mod/forum/discuss.php?d=68558] thread&lt;br /&gt;
&lt;br /&gt;
===Other database performance links===&lt;br /&gt;
* Consider using a &#039;&#039;&#039;distributed cacheing system&#039;&#039;&#039; like [http://en.wikipedia.org/wiki/Memcached memcached] but note that memcached does not have any security features so it should be used behind a firewall.&lt;br /&gt;
* Consider using PostgreSQL. See [[Arguments in favour of PostgreSQL]] and [http://moodle.org/mod/forum/discuss.php?d=49195 how to migrate from MySQL to PostgreSQL] (forum discussion).&lt;br /&gt;
* [[Increasing the database connection lifetime | Try increasing the database connection lifetime]]&lt;br /&gt;
* [http://dev.mysql.com/doc/refman/5.0/en/server-parameters.html General advice on tuning MySQL parameters] (advice from the MySQL manual)&lt;br /&gt;
* [http://www.mysqlperformanceblog.com/2007/11/01/innodb-performance-optimization-basics/ InnoDB performance optimization] taken from the [http://www.mysqlperformanceblog.com/ MySQL performance blog] site.&lt;br /&gt;
&lt;br /&gt;
==Moodle Admin settings==&lt;br /&gt;
* In Moodle 1.7 or later, set the &#039;&#039;&#039;Cache type&#039;&#039;&#039; for your server: Site Admin -&amp;gt; Server -&amp;gt; Performance -&amp;gt; Cache type. There are several options available. &lt;br /&gt;
:*If you do not have eaccelerator or mmemcached installed, choose &amp;quot;internal&amp;quot; (which makes use of the record/internal cache - see the next bullet point). &lt;br /&gt;
:* If you have a single server and have compiled &#039;&#039;&#039;eaccelerator with shared memory support&#039;&#039;&#039;, set the cache type to the eaccelerator option. &lt;br /&gt;
:* If you have a &#039;&#039;&#039;separate memcached server&#039;&#039;&#039;, set the cache type to memcached and enter a csv list of server IP addresses.&lt;br /&gt;
* Enable the &#039;&#039;&#039;record/internal cache&#039;&#039;&#039;: Site Admin -&amp;gt; Server -&amp;gt; Performance -&amp;gt; Record cache = True. Set the maximum amount of memory allocated to the cache in the Int Cache Max box. This will enable a primary cache for database records, without using any database engine cache, e.g. MySQL/PostgreSQL cache. See [http://tracker.moodle.org/browse/MDL-7196 this Tracker entry] for a full discussion.&lt;br /&gt;
* Enable the &#039;&#039;&#039;language cache&#039;&#039;&#039;.&lt;br /&gt;
* Large log files can cause overall performance to degrade over time. If you observe that the site has gradually got slower loading pages in the browser, &#039;&#039;&#039;reduce your Log life time&#039;&#039;&#039; setting (Admin/Server/Cleanup).&lt;br /&gt;
* Performance can be greatly improved by allowing Moodle to use the system &#039;&#039;&#039;zip/unzip&#039;&#039;&#039; commands (rather than PHP-based zip libraries) - visit Admin/Server/System Paths and enter the path to the relevant executables. (Similarly, filling in the path to &#039;&#039;&#039;du&#039;&#039;&#039; will improve Moodle&#039;s speed at listing directory contents.)&lt;br /&gt;
* Note that using &#039;&#039;&#039;secure web connections&#039;&#039;&#039; (&#039;&#039;&#039;https&#039;&#039;&#039; rather than &#039;&#039;&#039;http&#039;&#039;&#039;) carries a higher processing burden, both for the webserver and the client - particularly because cacheing cannot be used as effectively, so the number of file requests is likely to increase dramatically. For this reason using https for all Moodle pages is not recommended. You can enable https just for the login screen, simply from Moodle&#039;s config page.&lt;br /&gt;
* Check your &#039;&#039;&#039;filters&#039;&#039;&#039;. Having too many filters active can have serious effects on server load, especially on lower-end systems. The number of active filters has a direct effect on the perceived latency of your site; that is the time taken for each page impression. &lt;br /&gt;
* Enable the &#039;&#039;&#039;text cache&#039;&#039;&#039; but do not &amp;quot;Filter all strings&amp;quot; unless you have a specific need. If in doubt profile the performance, and see how your changes affect the processing time.&lt;br /&gt;
* Check your &#039;&#039;&#039;anti-virus&#039;&#039;&#039; measures on the server.  Although they are useful for preventing security holes being exploited, some &amp;quot;On-Demand&amp;quot; scanners can affect performance by scanning page content (word, ppt files etc).&lt;br /&gt;
* If there are performance problems loading course pages, check the &#039;&#039;&#039;Resource module settings&#039;&#039;&#039;. The setting resource_filterexternalpages is known to slow-down course pages and should be set to &#039;No&#039; for better performance.&lt;br /&gt;
* Check your &#039;&#039;&#039;forum settings&#039;&#039;&#039;. To improve performance set forum_trackreadposts = No and forum_usermarksread = Yes (this will impact on the convenience of your users&#039; forum experience). Also consider setting the time of the day when old posts are cleared from the read table (forum_cleanreadtime) to when your site is less busy.&lt;br /&gt;
&lt;br /&gt;
==Performance of different Moodle modules==&lt;br /&gt;
&lt;br /&gt;
Moodle&#039;s activity modules, filters, and other plugins can be activated/deactivated. If necessary, you may wish to deactivate some features (such as chat) if not required - but this isn&#039;t necessary. Some notes on the performance of certain modules:&lt;br /&gt;
&lt;br /&gt;
* The &#039;&#039;&#039;Chat&#039;&#039;&#039; module is [http://moodle.org/mod/forum/discuss.php?d=37979&amp;amp;parent=175079 said] to be a hog in terms of frequent HTTP requests to the main server. This can be reduced by setting the module to use &#039;&#039;Streamed&#039;&#039; updates, or, if you&#039;re using a Unix-based webserver, by running the chat in daemon mode. When using the Chat module use the configuration settings to tune for your expected load. Pay particular attention to the &#039;&#039;chat_old_ping&#039;&#039; and &#039;&#039;chat_refresh&#039;&#039; parameters as these can have greatest impact on server load.&lt;br /&gt;
* The &#039;&#039;&#039;Quiz&#039;&#039;&#039; module is known to stretch database performance. Try to optimise your database server by tuning. See [http://moodle.org/mod/forum/discuss.php?d=25616&amp;amp;parent=120770 for a brief report on performance for 55 students simultaneously using quizzes]&lt;br /&gt;
** See this Case Study for an extensive server stress test with 300 quiz users.[http://moodle.org/mod/forum/discuss.php?d=68579]  And this accompanying report on network traffic and server loads. [http://elearning.sgu.ac.jp/doc/PT/]&lt;br /&gt;
* The Moodle &#039;&#039;&#039;Cron&#039;&#039;&#039; task is triggered by calling the script &#039;&#039;cron.php&#039;&#039;. If this is called over HTTP (e.g. using wget or curl) it can take a large amount of memory on large installations. If it is called by directly invoking the php command (e.g. &#039;&#039;php -f /path/to/moodle/directory/admin/cron.php&#039;&#039;) efficiency can be much improved.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*[[Performance FAQ]]&lt;br /&gt;
*Using Moodle [http://moodle.org/mod/forum/view.php?f=94 Hardware and Performance forum]&lt;br /&gt;
&lt;br /&gt;
There have been a lot of discussions on moodle.org about performance, here are some of the more interesting and (potentially) useful ones:&lt;br /&gt;
&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=83057 Performance woes!]&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=57028 Performance perspectives - a little script]&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=88927 Comments on planned server hardware]&lt;br /&gt;
&lt;br /&gt;
[[Category:Performance]]&lt;br /&gt;
&lt;br /&gt;
[[fr:Performance]]&lt;br /&gt;
[[ja:パフォーマンス]]&lt;br /&gt;
[[pl:Wydajność]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=File:corduml-erd.png&amp;diff=40877</id>
		<title>File:corduml-erd.png</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=File:corduml-erd.png&amp;diff=40877"/>
		<updated>2008-07-29T13:16:24Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Course_ordering_and_invoicing&amp;diff=40876</id>
		<title>Course ordering and invoicing</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Course_ordering_and_invoicing&amp;diff=40876"/>
		<updated>2008-07-29T13:16:06Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: /* UML diagrams */ added ERD&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The module allows authenticated users to fill course enrolment order form. Payment reminder is sent automatically. Administrator has to manually approve the order, eg. according to a bank account listings. After approving the order, the invoice is emailed to the users.&lt;br /&gt;
&lt;br /&gt;
The module uses [[External database enrolment]] plugin. It may be useful for sites where users must pay to be enrolled into a course but for some reasons, [[PayPal]] and other plugins can not be used.&lt;br /&gt;
&lt;br /&gt;
The module was created and is currently maintained by [[User:David Mudrak|David Mudrak]].&lt;br /&gt;
&lt;br /&gt;
==Screenshots==&lt;br /&gt;
&lt;br /&gt;
[[Image:cord001-orderform.png|thumb|The ordering form|200px|left]]&lt;br /&gt;
[[Image:cord002-totalcostcalc.png|thumb|Order confirmation|200px|left]]&lt;br /&gt;
[[Image:cord003-myorders.png|thumb|List of user&#039;s orders|200px|left]]&lt;br /&gt;
[[Image:cord004-approvedorders.png|thumb|The list of all approved orders|200px|left]]&lt;br /&gt;
[[Image:cord005-invoice.png|thumb|Example of PDF invoice produced by the module|200px|left]]&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
&lt;br /&gt;
* Moodle 1.8 - checkout [[CVS]] HEAD branch or download [http://download.moodle.org/plugins/mod/cord.zip the build]&lt;br /&gt;
* newer versions have not been tested yet&lt;br /&gt;
&lt;br /&gt;
The source codes live in [[CVS]] [http://cvs.moodle.org/contrib/plugins/mod/cord/ contrib/plugins/mod/cord]. To checkout the module, go to the Moodle mod/ directory and use:&lt;br /&gt;
 cvs -z3 -d:ext:myusername@cvs.moodle.org:/cvsroot/moodle co -d cord contrib/plugins/mod/cord&lt;br /&gt;
&lt;br /&gt;
TODO: how to setup the module - the outline follows&lt;br /&gt;
&lt;br /&gt;
# set up external DB enrolment&lt;br /&gt;
# create an instance of the module&lt;br /&gt;
# override desired roles - allow them to order courses (mod/cord:ordercourse)&lt;br /&gt;
# set up the cost of the courses&lt;br /&gt;
&lt;br /&gt;
==How to customize the invoice==&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
==How to report a bug==&lt;br /&gt;
&lt;br /&gt;
Please, use [[Tracker]]. Course ordering if one of the components in &amp;quot;Non-core contributed modules&amp;quot; project. See the list of tracked issues at http://tracker.moodle.org/browse/CONTRIB/component/10327.&lt;br /&gt;
&lt;br /&gt;
==Capabilities==&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;3&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Capability&lt;br /&gt;
!Description&lt;br /&gt;
!Status&lt;br /&gt;
|-&lt;br /&gt;
|mod/cord:ordercourse&lt;br /&gt;
|a user can submit course ordering form&lt;br /&gt;
|implemented&lt;br /&gt;
|-&lt;br /&gt;
|mod/cord:manageorders&lt;br /&gt;
|a user can approve or delete submitted orders&lt;br /&gt;
|implemented&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==UML diagrams==&lt;br /&gt;
&lt;br /&gt;
[[Image:corduml-uc-usersactions.png|thumb|Use case: User&#039;s actions|300px|left]]&lt;br /&gt;
[[Image:corduml-uc-adminsactions.png|thumb|Use case: Admin&#039;s actions|300px|left]]&lt;br /&gt;
[[Image:corduml-erd.png|thumb|ER diagram:Module tables and relationships|300px|left]]&lt;br /&gt;
[[Image:corduml-sq-orderproc.png|thumb|Sequence diagram:Order processing|300px|left]]&lt;br /&gt;
[[Image:corduml-st-orderproc.png|thumb|State diagram:Order processing|300px|left]]&lt;br /&gt;
[[Image:corduml-cl-courseorder.png|thumb|Class diagram:Course order classes|300px|left]]&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=1693 Modules and plugins database record]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=File:corduml-uc-adminsactions.png&amp;diff=40870</id>
		<title>File:corduml-uc-adminsactions.png</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=File:corduml-uc-adminsactions.png&amp;diff=40870"/>
		<updated>2008-07-29T12:05:37Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: uploaded a new version of &amp;quot;Image:corduml-uc-adminsactions.png&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=File:corduml-cl-courseorder.png&amp;diff=40869</id>
		<title>File:corduml-cl-courseorder.png</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=File:corduml-cl-courseorder.png&amp;diff=40869"/>
		<updated>2008-07-29T12:03:18Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=File:corduml-st-orderproc.png&amp;diff=40868</id>
		<title>File:corduml-st-orderproc.png</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=File:corduml-st-orderproc.png&amp;diff=40868"/>
		<updated>2008-07-29T12:02:46Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=File:corduml-sq-orderproc.png&amp;diff=40867</id>
		<title>File:corduml-sq-orderproc.png</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=File:corduml-sq-orderproc.png&amp;diff=40867"/>
		<updated>2008-07-29T12:02:02Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=File:corduml-uc-adminsactions.png&amp;diff=40866</id>
		<title>File:corduml-uc-adminsactions.png</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=File:corduml-uc-adminsactions.png&amp;diff=40866"/>
		<updated>2008-07-29T12:01:28Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=File:corduml-uc-usersactions.png&amp;diff=40865</id>
		<title>File:corduml-uc-usersactions.png</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=File:corduml-uc-usersactions.png&amp;diff=40865"/>
		<updated>2008-07-29T12:00:46Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Course_ordering_and_invoicing&amp;diff=40864</id>
		<title>Course ordering and invoicing</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Course_ordering_and_invoicing&amp;diff=40864"/>
		<updated>2008-07-29T12:00:08Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Added UML diagrams section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The module allows authenticated users to fill course enrolment order form. Payment reminder is sent automatically. Administrator has to manually approve the order, eg. according to a bank account listings. After approving the order, the invoice is emailed to the users.&lt;br /&gt;
&lt;br /&gt;
The module uses [[External database enrolment]] plugin. It may be useful for sites where users must pay to be enrolled into a course but for some reasons, [[PayPal]] and other plugins can not be used.&lt;br /&gt;
&lt;br /&gt;
The module was created and is currently maintained by [[User:David Mudrak|David Mudrak]].&lt;br /&gt;
&lt;br /&gt;
==Screenshots==&lt;br /&gt;
&lt;br /&gt;
[[Image:cord001-orderform.png|thumb|The ordering form|200px|left]]&lt;br /&gt;
[[Image:cord002-totalcostcalc.png|thumb|Order confirmation|200px|left]]&lt;br /&gt;
[[Image:cord003-myorders.png|thumb|List of user&#039;s orders|200px|left]]&lt;br /&gt;
[[Image:cord004-approvedorders.png|thumb|The list of all approved orders|200px|left]]&lt;br /&gt;
[[Image:cord005-invoice.png|thumb|Example of PDF invoice produced by the module|200px|left]]&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
&lt;br /&gt;
* Moodle 1.8 - checkout [[CVS]] HEAD branch or download [http://download.moodle.org/plugins/mod/cord.zip the build]&lt;br /&gt;
* newer versions have not been tested yet&lt;br /&gt;
&lt;br /&gt;
The source codes live in [[CVS]] [http://cvs.moodle.org/contrib/plugins/mod/cord/ contrib/plugins/mod/cord]. To checkout the module, go to the Moodle mod/ directory and use:&lt;br /&gt;
 cvs -z3 -d:ext:myusername@cvs.moodle.org:/cvsroot/moodle co -d cord contrib/plugins/mod/cord&lt;br /&gt;
&lt;br /&gt;
TODO: how to setup the module - the outline follows&lt;br /&gt;
&lt;br /&gt;
# set up external DB enrolment&lt;br /&gt;
# create an instance of the module&lt;br /&gt;
# override desired roles - allow them to order courses (mod/cord:ordercourse)&lt;br /&gt;
# set up the cost of the courses&lt;br /&gt;
&lt;br /&gt;
==How to customize the invoice==&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
==How to report a bug==&lt;br /&gt;
&lt;br /&gt;
Please, use [[Tracker]]. Course ordering if one of the components in &amp;quot;Non-core contributed modules&amp;quot; project. See the list of tracked issues at http://tracker.moodle.org/browse/CONTRIB/component/10327.&lt;br /&gt;
&lt;br /&gt;
==Capabilities==&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;3&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Capability&lt;br /&gt;
!Description&lt;br /&gt;
!Status&lt;br /&gt;
|-&lt;br /&gt;
|mod/cord:ordercourse&lt;br /&gt;
|a user can submit course ordering form&lt;br /&gt;
|implemented&lt;br /&gt;
|-&lt;br /&gt;
|mod/cord:manageorders&lt;br /&gt;
|a user can approve or delete submitted orders&lt;br /&gt;
|implemented&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==UML diagrams==&lt;br /&gt;
&lt;br /&gt;
[[Image:corduml-uc-usersactions.png|thumb|Use case: User&#039;s actions|300px|left]]&lt;br /&gt;
[[Image:corduml-uc-adminsactions.png|thumb|Use case: Admin&#039;s actions|300px|left]]&lt;br /&gt;
[[Image:corduml-sq-orderproc.png|thumb|Sequence diagram:Order processing|300px|left]]&lt;br /&gt;
[[Image:corduml-st-orderproc.png|thumb|State diagram:Order processing|300px|left]]&lt;br /&gt;
[[Image:corduml-cl-courseorder.png|thumb|Class diagram:Course order classes|300px|left]]&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=1693 Modules and plugins database record]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Course_ordering_and_invoicing&amp;diff=40829</id>
		<title>Course ordering and invoicing</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Course_ordering_and_invoicing&amp;diff=40829"/>
		<updated>2008-07-28T23:20:04Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The module allows authenticated users to fill course enrolment order form. Payment reminder is sent automatically. Administrator has to manually approve the order, eg. according to a bank account listings. After approving the order, the invoice is emailed to the users.&lt;br /&gt;
&lt;br /&gt;
The module uses [[External database enrolment]] plugin. It may be useful for sites where users must pay to be enrolled into a course but for some reasons, [[PayPal]] and other plugins can not be used.&lt;br /&gt;
&lt;br /&gt;
The module was created and is currently maintained by [[User:David Mudrak|David Mudrak]].&lt;br /&gt;
&lt;br /&gt;
==Screenshots==&lt;br /&gt;
&lt;br /&gt;
[[Image:cord001-orderform.png|thumb|The ordering form|200px|left]]&lt;br /&gt;
[[Image:cord002-totalcostcalc.png|thumb|Order confirmation|200px|left]]&lt;br /&gt;
[[Image:cord003-myorders.png|thumb|List of user&#039;s orders|200px|left]]&lt;br /&gt;
[[Image:cord004-approvedorders.png|thumb|The list of all approved orders|200px|left]]&lt;br /&gt;
[[Image:cord005-invoice.png|thumb|Example of PDF invoice produced by the module|200px|left]]&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
&lt;br /&gt;
* Moodle 1.8 - checkout [[CVS]] HEAD branch or download [http://download.moodle.org/plugins/mod/cord.zip the build]&lt;br /&gt;
* newer versions have not been tested yet&lt;br /&gt;
&lt;br /&gt;
The source codes live in [[CVS]] [http://cvs.moodle.org/contrib/plugins/mod/cord/ contrib/plugins/mod/cord]. To checkout the module, go to the Moodle mod/ directory and use:&lt;br /&gt;
 cvs -z3 -d:ext:myusername@cvs.moodle.org:/cvsroot/moodle co -d cord contrib/plugins/mod/cord&lt;br /&gt;
&lt;br /&gt;
TODO: how to setup the module - the outline follows&lt;br /&gt;
&lt;br /&gt;
# set up external DB enrolment&lt;br /&gt;
# create an instance of the module&lt;br /&gt;
# override desired roles - allow them to order courses (mod/cord:ordercourse)&lt;br /&gt;
# set up the cost of the courses&lt;br /&gt;
&lt;br /&gt;
==How to customize the invoice==&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
==How to report a bug==&lt;br /&gt;
&lt;br /&gt;
Please, use [[Tracker]]. Course ordering if one of the components in &amp;quot;Non-core contributed modules&amp;quot; project. See the list of tracked issues at http://tracker.moodle.org/browse/CONTRIB/component/10327.&lt;br /&gt;
&lt;br /&gt;
==Capabilities==&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;3&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Capability&lt;br /&gt;
!Description&lt;br /&gt;
!Status&lt;br /&gt;
|-&lt;br /&gt;
|mod/cord:ordercourse&lt;br /&gt;
|a user can submit course ordering form&lt;br /&gt;
|implemented&lt;br /&gt;
|-&lt;br /&gt;
|mod/cord:manageorders&lt;br /&gt;
|a user can approve or delete submitted orders&lt;br /&gt;
|implemented&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=1693 Modules and plugins database record]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Course_ordering_and_invoicing&amp;diff=40822</id>
		<title>Course ordering and invoicing</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Course_ordering_and_invoicing&amp;diff=40822"/>
		<updated>2008-07-28T22:58:22Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Added invoice customization section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The module allows authenticated users to fill course enrolment order form. Payment reminder is sent automatically. Administrator has to manually approve the order, eg. according to a bank account listings. After approving the order, the invoice is emailed to the users.&lt;br /&gt;
&lt;br /&gt;
The module uses [[External database enrolment]] plugin. It may be useful for sites where users must pay to be enrolled into a course but for some reasons, [[PayPal]] and other plugins can not be used.&lt;br /&gt;
&lt;br /&gt;
The module was created and is currently maintained by [[User:David Mudrak|David Mudrak]].&lt;br /&gt;
&lt;br /&gt;
==Screenshots==&lt;br /&gt;
&lt;br /&gt;
[[Image:cord001-orderform.png|thumb|The ordering form|200px|left]]&lt;br /&gt;
[[Image:cord002-totalcostcalc.png|thumb|Order confirmation|200px|left]]&lt;br /&gt;
[[Image:cord003-myorders.png|thumb|List of user&#039;s orders|200px|left]]&lt;br /&gt;
[[Image:cord004-approvedorders.png|thumb|The list of all approved orders|200px|left]]&lt;br /&gt;
[[Image:cord005-invoice.png|thumb|Example of PDF invoice produced by the module|200px|left]]&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
&lt;br /&gt;
* Moodle 1.8 - checkout [[CVS]] HEAD branch or download [http://download.moodle.org/plugins/mod/cord.zip the build]&lt;br /&gt;
* other versions are not supported at the moment&lt;br /&gt;
&lt;br /&gt;
The source codes live in [[CVS]] [http://cvs.moodle.org/contrib/plugins/mod/cord/ contrib/plugins/mod/cord]. To checkout the module, go to the Moodle mod/ directory and use:&lt;br /&gt;
 cvs -z3 -d:ext:myusername@cvs.moodle.org:/cvsroot/moodle co -d cord contrib/plugins/mod/cord&lt;br /&gt;
&lt;br /&gt;
TODO: how to setup the module - the outline follows&lt;br /&gt;
&lt;br /&gt;
# set up external DB enrolment&lt;br /&gt;
# create an instance of the module&lt;br /&gt;
# override desired roles - allow them to order courses (mod/cord:ordercourse)&lt;br /&gt;
# set up the cost of the courses&lt;br /&gt;
&lt;br /&gt;
==How to customize the invoice==&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
==How to report a bug==&lt;br /&gt;
&lt;br /&gt;
Please, use [[Tracker]]. Course ordering if one of the components in &amp;quot;Non-core contributed modules&amp;quot; project. See the list of tracked issues at http://tracker.moodle.org/browse/CONTRIB/component/10327.&lt;br /&gt;
&lt;br /&gt;
==Capabilities==&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;3&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Capability&lt;br /&gt;
!Description&lt;br /&gt;
!Status&lt;br /&gt;
|-&lt;br /&gt;
|mod/cord:ordercourse&lt;br /&gt;
|a user can submit course ordering form&lt;br /&gt;
|implemented&lt;br /&gt;
|-&lt;br /&gt;
|mod/cord:manageorders&lt;br /&gt;
|a user can approve or delete submitted orders&lt;br /&gt;
|implemented&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=1693 Modules and plugins database record]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=File:cord005-invoice.png&amp;diff=40821</id>
		<title>File:cord005-invoice.png</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=File:cord005-invoice.png&amp;diff=40821"/>
		<updated>2008-07-28T22:56:50Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=File:cord004-approvedorders.png&amp;diff=40820</id>
		<title>File:cord004-approvedorders.png</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=File:cord004-approvedorders.png&amp;diff=40820"/>
		<updated>2008-07-28T22:56:36Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=File:cord003-myorders.png&amp;diff=40819</id>
		<title>File:cord003-myorders.png</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=File:cord003-myorders.png&amp;diff=40819"/>
		<updated>2008-07-28T22:56:15Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=File:cord002-totalcostcalc.png&amp;diff=40818</id>
		<title>File:cord002-totalcostcalc.png</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=File:cord002-totalcostcalc.png&amp;diff=40818"/>
		<updated>2008-07-28T22:55:55Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
</feed>