<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.moodle.org/22/en/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Molmos</id>
	<title>MoodleDocs - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://docs.moodle.org/22/en/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Molmos"/>
	<link rel="alternate" type="text/html" href="https://docs.moodle.org/22/en/Special:Contributions/Molmos"/>
	<updated>2026-04-17T12:00:34Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://docs.moodle.org/22/en/index.php?title=Talk:Capabilities/mod/forum:initialsubscriptions&amp;diff=94548</id>
		<title>Talk:Capabilities/mod/forum:initialsubscriptions</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/22/en/index.php?title=Talk:Capabilities/mod/forum:initialsubscriptions&amp;diff=94548"/>
		<updated>2011-12-14T01:30:03Z</updated>

		<summary type="html">&lt;p&gt;Molmos: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page might need deleting, this setting has been removed in 2.2, see [http://tracker.moodle.org/browse/MDL-30151 MDL_30151].&lt;/div&gt;</summary>
		<author><name>Molmos</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/22/en/index.php?title=Talk:Capabilities/mod/forum:initialsubscriptions&amp;diff=94547</id>
		<title>Talk:Capabilities/mod/forum:initialsubscriptions</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/22/en/index.php?title=Talk:Capabilities/mod/forum:initialsubscriptions&amp;diff=94547"/>
		<updated>2011-12-14T01:28:02Z</updated>

		<summary type="html">&lt;p&gt;Molmos: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page might need deleting, this setting has been removed in 2.2 ([http://tracker.moodle.org/browse/MDL-30151 MDL-30151]).&lt;/div&gt;</summary>
		<author><name>Molmos</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/22/en/index.php?title=Talk:Capabilities/mod/forum:initialsubscriptions&amp;diff=94546</id>
		<title>Talk:Capabilities/mod/forum:initialsubscriptions</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/22/en/index.php?title=Talk:Capabilities/mod/forum:initialsubscriptions&amp;diff=94546"/>
		<updated>2011-12-14T01:26:35Z</updated>

		<summary type="html">&lt;p&gt;Molmos: Blanked the page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Molmos</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/22/en/index.php?title=Talk:Capabilities/mod/forum:initialsubscriptions&amp;diff=94545</id>
		<title>Talk:Capabilities/mod/forum:initialsubscriptions</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/22/en/index.php?title=Talk:Capabilities/mod/forum:initialsubscriptions&amp;diff=94545"/>
		<updated>2011-12-14T01:26:00Z</updated>

		<summary type="html">&lt;p&gt;Molmos: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This should probably be deleted, as this permission has been removed as I understand ([http://tracker.moodle.org/browse/MDL-30151 MDL_30151]).&lt;/div&gt;</summary>
		<author><name>Molmos</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/22/en/index.php?title=Talk:Capabilities/mod/forum:initialsubscriptions&amp;diff=94544</id>
		<title>Talk:Capabilities/mod/forum:initialsubscriptions</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/22/en/index.php?title=Talk:Capabilities/mod/forum:initialsubscriptions&amp;diff=94544"/>
		<updated>2011-12-14T01:24:41Z</updated>

		<summary type="html">&lt;p&gt;Molmos: Created page with &amp;quot;This should probably be deleted, as this permission has been removed as I understand ([http://tracker.moodle.org/browse/MDL-16665 MDL_16665]).&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This should probably be deleted, as this permission has been removed as I understand ([http://tracker.moodle.org/browse/MDL-16665 MDL_16665]).&lt;/div&gt;</summary>
		<author><name>Molmos</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/22/en/index.php?title=CentOS_Linux_installation&amp;diff=81325</id>
		<title>CentOS Linux installation</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/22/en/index.php?title=CentOS_Linux_installation&amp;diff=81325"/>
		<updated>2011-02-16T03:02:36Z</updated>

		<summary type="html">&lt;p&gt;Molmos: Typo: Than -&amp;gt; Then&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Moodle 2.0}}&lt;br /&gt;
&lt;br /&gt;
Installing Moodle 2.0 on stock version of CentOS 5.5 is not that straightforward due to a limitations imposed by the software available in the default repositories.&lt;br /&gt;
&lt;br /&gt;
So let us go step by step in configuring and installing Moodle 2.0 on CentOS 5.5. &lt;br /&gt;
&lt;br /&gt;
== Asumptions == &lt;br /&gt;
* We have just a minimal OS installation&lt;br /&gt;
* PHP is not installed&lt;br /&gt;
* No RDBMS is installed&lt;br /&gt;
* Apache is not installed&lt;br /&gt;
* We plan on using MySQL as Moodle RDBMS&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
As you may or may not know Moodle 2.0 requires following versions of software:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Element&lt;br /&gt;
! Version&lt;br /&gt;
|-&lt;br /&gt;
| PHP&lt;br /&gt;
| 5.2.8 (5.3.3 or more recent recommended)&lt;br /&gt;
|-&lt;br /&gt;
| MySQL&lt;br /&gt;
| 5.0.25 (5.5.x recommended)&lt;br /&gt;
|-&lt;br /&gt;
| Apache&lt;br /&gt;
| 2.2.x (CentOS ships with 2.2.3)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== PHP ===&lt;br /&gt;
&lt;br /&gt;
By default CentOS 5.5 ships with PHP 5.1.6. It is very old version and unsupported by Moodle 2. To avoid recompiling PHP I recommend use of certified PHP build -[http://www.zend.com/en/products/server-ce/downloads Zend Server 5.x Community Edition] .&lt;br /&gt;
&lt;br /&gt;
==== Installation ====&lt;br /&gt;
Before being able to download it you will need to register and login on the site which is free of charge. Site offers several options for installing the product and the one I recommend is the RPM installer.&lt;br /&gt;
&lt;br /&gt;
You can find detailed description of this process [http://files-source.zend.com/help/Zend-Server-Community-Edition/zend-server-community-edition.htm#rpm_installation.htm here]. Make sure to install PHP 5.3 for the best results.&lt;br /&gt;
&lt;br /&gt;
Execute this in command line&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
sh install_zs.sh 5.3 ce&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and after all the installation process add this package:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
yum -y install php-5.3-xmlrpc-zend-server&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally start the zend server:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
service zend-server start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
Zend Server can be configured using nice web frontend that can be accessed through &amp;lt;code&amp;gt;http://&amp;lt;server url&amp;gt;:10082/ZendServer/&amp;lt;/code&amp;gt; .&lt;br /&gt;
&lt;br /&gt;
We will not go into details of how to use it but instead I will just list the PHP options and their recommended values that you should set.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
date.timezone=&amp;lt;Your server timezone&amp;gt;&lt;br /&gt;
display_errors=Off&lt;br /&gt;
expose_php=Off&lt;br /&gt;
max_execution_time=80&lt;br /&gt;
memory_limit=256M&lt;br /&gt;
realpath_cache_size=200K&lt;br /&gt;
realpath_cache_ttl=200&lt;br /&gt;
zend_optimizerplus.memory_consumption=80&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also disable all extensions that Moodle does not use to speed things up.&lt;br /&gt;
&lt;br /&gt;
=== MySQL ===&lt;br /&gt;
&lt;br /&gt;
MySQL is a good choice for Moodle RDBMS but it requires a bit more tackling to get adequate power. CentOS repositories ship with older version of MySQL (5.0.77 at the time of writing). It is highly recommended to install and use MySQL 5.5 using Oracle&#039;s official rpm packages. &lt;br /&gt;
&lt;br /&gt;
==== Getting the packages ====&lt;br /&gt;
To do that go to [http://dev.mysql.com/downloads/mysql/5.5.html#downloads MySQL 5.5. GA download page].&lt;br /&gt;
Download the client utilities ( MySQL-client-5.5.x-x.rhel5.xxxx.rpm ) and MySQL Server (MySQL-server-5.5.x-x.rhel5.xxxx.rpm) package. &lt;br /&gt;
&lt;br /&gt;
==== Installation ====&lt;br /&gt;
After that install the downloaded packages by executing this from command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; rpm -ivh MySQL-* &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
MySQL 5.5 does not install any configuration file by default so we need to create one. You can use one of the existing configuration files as starting points for your personalized configuration. They are located here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
/usr/share/mysql/my-huge.cnf&lt;br /&gt;
/usr/share/mysql/my-innodb-heavy-4G.cnf&lt;br /&gt;
/usr/share/mysql/my-large.cnf&lt;br /&gt;
/usr/share/mysql/my-medium.cnf&lt;br /&gt;
/usr/share/mysql/my-small.cnf&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To use any of these just copy them to the /etc/my.cnf. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
cp /usr/share/mysql/my-medium.cnf /etc/my.cnf&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the purporse of installing Moodle 2.0 this is the configuration that I recommend as a starting point for a small Moodle instance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
[client]&lt;br /&gt;
port            = 3306&lt;br /&gt;
socket          = /var/lib/mysql/mysql.sock&lt;br /&gt;
&lt;br /&gt;
[mysqld]&lt;br /&gt;
port            = 3306&lt;br /&gt;
socket          = /var/lib/mysql/mysql.sock&lt;br /&gt;
&lt;br /&gt;
character-set-server=utf8&lt;br /&gt;
collation-server=utf8_bin&lt;br /&gt;
&lt;br /&gt;
innodb_buffer_pool_size=400M&lt;br /&gt;
innodb_additional_mem_pool_size=40M&lt;br /&gt;
innodb_log_file_size=100M&lt;br /&gt;
innodb_log_buffer_size=4M&lt;br /&gt;
innodb_flush_method=O_DIRECT&lt;br /&gt;
transaction_isolation=READ-COMMITTED&lt;br /&gt;
&lt;br /&gt;
#You can disable the TCP/IP protocol support &lt;br /&gt;
#and all of the communication will be done through UNIX sockets&lt;br /&gt;
skip-networking&lt;br /&gt;
&lt;br /&gt;
#If you use additional web applications or other programs &lt;br /&gt;
#that do not support connections through UNIX Sockets, &lt;br /&gt;
#do not disable TCP/IP. Just force the&lt;br /&gt;
#server to accept connections only from localhost&lt;br /&gt;
#bind-address=127.0.0.1&lt;br /&gt;
&lt;br /&gt;
#Disable symbolic links&lt;br /&gt;
symbolic-links=0&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you plan on having heavy duty Moodle instance with a lot of users you should increase &amp;lt;code&amp;gt;innodb_buffer_pool_size&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;innodb_log_file_size&amp;lt;/code&amp;gt;, and of course add more RAM.&lt;br /&gt;
&lt;br /&gt;
Do not forget to start the server. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;service mysql start&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Database ====&lt;br /&gt;
Now it is time to create database for the Moodle. This is the recommended command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
create database &amp;lt;dbname&amp;gt; character set=utf8 collate=utf8_bin;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The reason for specifying collation as utf8_bin is that it is the only collation that offers proper treatment of special and accented characters in sorting and comparison. For more details on this see this [http://moodle.org/mod/forum/discuss.php?d=163766 forum thread].&lt;br /&gt;
&lt;br /&gt;
=== Apache ===&lt;br /&gt;
Apache will be installed autoimaticly by the zend-server installation script. The only thing we should do is to slightly optimize the default configuration. To do that we should modify the &amp;lt;code&amp;gt;/etc/httpd/conf/httpd.conf&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
These are the recommended settings that should be added or modified:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
#Display only web server name without any additional info&lt;br /&gt;
ServerTokens Prod&lt;br /&gt;
&lt;br /&gt;
#....&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Directory &amp;quot;/var/www/html&amp;quot;&amp;gt;&lt;br /&gt;
# ....&lt;br /&gt;
    Options -Indexes FollowSymLinks&lt;br /&gt;
    AllowOverride None&lt;br /&gt;
#...&lt;br /&gt;
#add this to activate compressing and caching of the pages&lt;br /&gt;
        AddOutputFilterByType DEFLATE text/plain&lt;br /&gt;
        AddOutputFilterByType DEFLATE text/xml&lt;br /&gt;
        AddOutputFilterByType DEFLATE application/xhtml+xml&lt;br /&gt;
        AddOutputFilterByType DEFLATE text/css&lt;br /&gt;
        AddOutputFilterByType DEFLATE application/xml&lt;br /&gt;
        AddOutputFilterByType DEFLATE image/svg+xml&lt;br /&gt;
        AddOutputFilterByType DEFLATE application/rss+xml&lt;br /&gt;
        AddOutputFilterByType DEFLATE application/atom_xml&lt;br /&gt;
        AddOutputFilterByType DEFLATE application/x-javascript&lt;br /&gt;
        AddOutputFilterByType DEFLATE application/x-httpd-php&lt;br /&gt;
        AddOutputFilterByType DEFLATE application/x-httpd-fastphp&lt;br /&gt;
        AddOutputFilterByType DEFLATE application/x-httpd-eruby&lt;br /&gt;
        AddOutputFilterByType DEFLATE text/html&lt;br /&gt;
        AddOutputFilterByType DEFLATE application/x-javascript&lt;br /&gt;
        AddOutputFilterByType DEFLATE text/javascript&lt;br /&gt;
        AddOutputFilterByType DEFLATE text/ecmascript&lt;br /&gt;
        AddOutputFilterByType DEFLATE text/js&lt;br /&gt;
        BrowserMatch ^Mozilla/4 gzip-only-text/html&lt;br /&gt;
        BrowserMatch ^Mozilla/4\.0[678] no-gzip&lt;br /&gt;
        BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html&lt;br /&gt;
        Header append Vary User-Agent env=!dont-vary&lt;br /&gt;
        ExpiresActive On&lt;br /&gt;
        ExpiresByType image/gif A2592000&lt;br /&gt;
        ExpiresByType image/png A2592000&lt;br /&gt;
        ExpiresByType image/x-icon A2592000&lt;br /&gt;
        ExpiresByType image/jpeg A2592000&lt;br /&gt;
        ExpiresByType image/pjpeg A2592000&lt;br /&gt;
        ExpiresDefault &amp;quot;access plus 1 day&amp;quot;&lt;br /&gt;
        FileETag none&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#...&lt;br /&gt;
#Disable any additional server info on error pages&lt;br /&gt;
ServerSignature Off&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Moodle ===&lt;br /&gt;
We need now to obtain and deploy Moodle files. We will use the simplest deployment scenario that involves minimal ammount of work and offers at the same time appropriate level of security.&lt;br /&gt;
&lt;br /&gt;
==== Getting Moodle ====&lt;br /&gt;
Download from moodle.org latest stable release of Moodle 2 and unpack it into &amp;lt;code&amp;gt;/var/www/html&amp;lt;/code&amp;gt; .&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
cd /tmp/&lt;br /&gt;
wget http://download.moodle.org/download.php/direct/stable20/moodle-latest-20.tgz&lt;br /&gt;
tar xzpf moodle-latest-20.tgz -C /var/www/html/&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Configuring file structure ====&lt;br /&gt;
Now that we have moodle files deployed in &amp;lt;code&amp;gt;/var/www/html/moodle/&amp;lt;/code&amp;gt; we need to add a directory for moodledata.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
mkdir /var/www/moodledata&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And now to apply appropriate file permissions for both directgories.&lt;br /&gt;
&lt;br /&gt;
First moodle directory:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
chown -R root:apache /var/www/html/moodle/&lt;br /&gt;
chmod -R u=rwX,g=rX,o= /var/www/html/moodle/&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And than moodledata directory:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
chown -R root:apache /var/www/moodledata/&lt;br /&gt;
chmod -R ug=rwX,o= /var/www/moodledata/&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Installation ====&lt;br /&gt;
Start the installation in a usual manner. Make sure to enter the valid name of the database you just created, choose mysqlnd/mysqli as database driver and &#039;&#039;&#039;make sure to select &amp;quot;Unix socket&amp;quot; option for best performance&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:db_connection.png]]&lt;br /&gt;
&lt;br /&gt;
Because of the way we applied file permissions to the &amp;lt;code&amp;gt;/var/www/html/moodle/&amp;lt;/code&amp;gt; directory installation will not be able to save &amp;lt;code&amp;gt;config.php&amp;lt;/code&amp;gt;. Just copy the content of the file from the browser and manually add it to the directory.&lt;br /&gt;
&lt;br /&gt;
==== CRON ====&lt;br /&gt;
To reflect the changes in Moodle 2.0 and use of Zend Server procedure for activating cron is following:&lt;br /&gt;
&lt;br /&gt;
Copy the following content and save it into &amp;lt;code&amp;gt;/etc/cron.hourly/moodle2.cron&amp;lt;/code&amp;gt; .&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
/usr/bin/sudo -u apache /usr/local/zend/bin/php-cli /var/www/html/moodle/admin/cli/cron.php&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then mark the file as executable:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
chmod u=rwx,go= /etc/cron.hourly/moodle2.cron&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]] &lt;br /&gt;
[[Category:Moodle_2.0]]&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Molmos</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/22/en/index.php?title=Multimedia_plugins_filter&amp;diff=77468</id>
		<title>Multimedia plugins filter</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/22/en/index.php?title=Multimedia_plugins_filter&amp;diff=77468"/>
		<updated>2010-11-05T02:17:29Z</updated>

		<summary type="html">&lt;p&gt;Molmos: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Location: Multimedia Plugins settings link in &#039;&#039;Site administration &amp;gt; Modules &amp;gt; Filters &amp;gt; Manage filters&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Multimedia plugins filter finds URLs that point to multimedia resources in text and replaces them with an appropriate multimedia player.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Supported media formats ==&lt;br /&gt;
* .mp3 - MPEG Audio Stream, Layer III&lt;br /&gt;
* .swf - Macromedia Flash Format File (Adobe, Inc.)&lt;br /&gt;
* .mov - QuickTime Video Clip (Apple Computer, Inc.)&lt;br /&gt;
* .wmv - Windows Media File (Microsoft)&lt;br /&gt;
* .mpg - MPEG Animation&lt;br /&gt;
* .avi - Audio Video Interleave File&lt;br /&gt;
* .flv - Flash Video File (Macromedia, Inc.)&lt;br /&gt;
* .ram - RealMedia Metafile (RealNetworks, Inc.)&lt;br /&gt;
* .rpm - RealMedia Player Plug-in (RealNetworks)&lt;br /&gt;
* .rm - RealMedia Streaming Media (Real Networks, Inc.)&lt;br /&gt;
* .mp4 (in Moodle 1.9.6 onwards)&lt;br /&gt;
* .m4v (in Moodle 1.9.6 onwards)&lt;br /&gt;
&lt;br /&gt;
In Moodle 1.9.6 onwards, a YouTube link filter (disabled by default) is also available.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
Insert the URL of the multimedia resource into your text (which can be the URL of a file in the course files area). When displayed a suitable player will be provided. Moodle detects the media type using the filename extension, so you should ensure that the file contents match the extension correctly.&lt;br /&gt;
&lt;br /&gt;
For some file types, like Flash, you can size the plugin using an extended syntax:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;a href=&amp;quot;somepath.swf?d=640x480&amp;quot;&amp;gt;My link name&amp;lt;/a&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where the first number is the width in pixels, and the second is the height.&lt;br /&gt;
&lt;br /&gt;
== Required Software ==&lt;br /&gt;
&lt;br /&gt;
Although Moodle prepares the media files to be played in the browser, the actual playback is handled by various types of browser plug-in software, primarily Adobe Flash, Quicktime, Windows Media Player and Real Player. If users do not have these installed they may be prompted to go and install them by their browser. These pieces of software are generally free, easily installed and widely used so this will only be an issue for small numbers of users.&lt;br /&gt;
&lt;br /&gt;
== Settings page ==&lt;br /&gt;
The settings page is in the administration block.  Prior to version 1.7, this can be reached from &#039;&#039;Configuration &amp;gt; Filters &amp;gt; MultiMedia Plugins&#039;&#039;.   In 1.7 it can be found via &#039;&#039;Administration &amp;gt; Modules &amp;gt; Filters &amp;gt; MultiMedia Plugins&#039;&#039;. In 1.8 it can be found via:&lt;br /&gt;
&#039;&#039;Notifications &amp;gt; Modules &amp;gt; Filters &amp;gt; MultiMedia Plugins &amp;gt; Settings&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
There is an individual setting to turn on or off each supported media type.  Note that by default all but the Flash (.swf) filter are enabled. As Flash files present a theoretical security risk, it is strongly recommended not to allow users to add flash content.&lt;br /&gt;
&lt;br /&gt;
== YouTube Link Filter ==&lt;br /&gt;
&lt;br /&gt;
The youtube filter uses a custom delimiting tag inserted anywhere within the text of a resource to embed and display an embedded youtube player&lt;br /&gt;
without having to paste the embed code into the HTML of the page. It is also designed to ignore youtube links placed in standard &amp;lt;a href&amp;gt; tags.&lt;br /&gt;
&lt;br /&gt;
* Enable the filter from the administration menu in Moodle: Modules -&amp;gt; Filters -&amp;gt; Manage filters.&lt;br /&gt;
* To embed the youtube video, enclose the video URL in [youtube] tags. Note that there is no closing tab ([/youtube]) - simply us e the regular tag again.&lt;br /&gt;
* Videos that cannot be embedded will display with an error message and a standard html link to the video on youtube.&lt;br /&gt;
* Youtube links placed inside of &amp;lt;a href&amp;gt; tags are designed to display normally as HTML.&lt;br /&gt;
* The filter does its best to strip out additional php GET parameters. Example: anything after the video ID root in the URL, starting with the first &#039;&amp;amp;&#039;: http://www.youtube.com/watch?v=ahuduPpZJQA(--&amp;gt;)&amp;amp;feature=featured)&lt;br /&gt;
* Multiple links can be placed within a page.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
* RIGHT:&lt;br /&gt;
**This is some text of a page.[youtube]http://www.youtube.com/watch?v=zs2XiyLYJOo[youtube] This is some more text in a page.&lt;br /&gt;
** This is some text that has a non-embedable video. [youtube]http://www.youtube.com/watch?v=ahuduPpZJQA&amp;amp;feature=featured[youtube]&lt;br /&gt;
** This is some text of a page.&amp;lt;a href=&#039;http://www.youtube.com/watch?v=zs2XiyLYJOo&#039;&amp;gt;This video will show up as a standard html link.&amp;lt;/a&amp;gt; This is some more text in a page.&lt;br /&gt;
&lt;br /&gt;
* WRONG:&lt;br /&gt;
** This is some text of a page.[youtube]http://www.youtube.com/watch?v=zs2XiyLYJOo[/youtube] This is some more text in a page.&lt;br /&gt;
** This is some text of a page. http://www.youtube.com/watch?v=zs2XiyLYJOo This is some more text in a page.&lt;br /&gt;
&lt;br /&gt;
* Advanced Quirk:&lt;br /&gt;
** A youtube url that is place in a resource that is the only text on the page will display, but will not if any other text or HTML on the page exists.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Filters]]&lt;br /&gt;
* [[MP3 player]]&lt;br /&gt;
* [[Audio in Moodle]]&lt;br /&gt;
* [[Speech tools]]&lt;br /&gt;
&lt;br /&gt;
Using Moodle forum discussions:&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=37119 Multimedia plugin vs object embed]&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=29588 Size of embedded Flash]&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=89416&amp;amp;parent=394828 Linking to FLV video files]&lt;br /&gt;
* [http://moodle.org/mod/forum&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/discuss.php?d=90781 video streaming]&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=95174 Media filter does not work for rm files]&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=98698 swf filter security]&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=125619 How to upload a screen capture video to the Moodle?]&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=143478 Best video format]&lt;br /&gt;
&lt;br /&gt;
[[Category:Filter]]&lt;br /&gt;
&lt;br /&gt;
[[pl:Pluginy_Multimedia]]&lt;br /&gt;
[[ja:マルチメディアプラグイン]]&lt;br /&gt;
[[de:Multimedia Plugins]]&lt;br /&gt;
[[fr:Extensions multimédia]]&lt;br /&gt;
[[es:Multimedia plugins (filtro)|Multimedia plugins]]&lt;/div&gt;</summary>
		<author><name>Molmos</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/22/en/index.php?title=Development:Theme_changes_in_2.0&amp;diff=74024</id>
		<title>Development:Theme changes in 2.0</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/22/en/index.php?title=Development:Theme_changes_in_2.0&amp;diff=74024"/>
		<updated>2010-07-19T06:42:38Z</updated>

		<summary type="html">&lt;p&gt;Molmos: Typo: plugins-&amp;gt;exluded_sheetes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Work in progress}}&lt;br /&gt;
{{Infobox Project&lt;br /&gt;
|name = Theme changes&lt;br /&gt;
|state = Implementation&lt;br /&gt;
|tracker = MDL-20204&lt;br /&gt;
|discussion = [http://moodle.org/mod/forum/discuss.php?d=140089 HEADS UP: Major theme changes landing]&lt;br /&gt;
|assignee = [[User:Petr Škoda (škoďák)|Petr Škoda (škoďák)]] + feedback and ideas from other developers&lt;br /&gt;
}}&lt;br /&gt;
{{Moodle 2.0}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Goals=&lt;br /&gt;
The main goals are:&lt;br /&gt;
# easier theme customisations - both CSS and images&lt;br /&gt;
# simplify core and themes code&lt;br /&gt;
# significant performance improvements&lt;br /&gt;
# solve majority of browser caching problems&lt;br /&gt;
# use YUI CSS foundation&lt;br /&gt;
# allow themes to be stored in separate directory without www access (such as dataroot)&lt;br /&gt;
&lt;br /&gt;
It should be easy to upgrade simple older themes. I think it is better if old themes are completely disabled with reasonable fallback mechanism. Why should we display broken themes during upgrade? Imagine users or teachers can select &amp;quot;broken&amp;quot; themes in the course edit page or a profile, I think it is more professional to display only new and upgraded themes in selectors instead of pretending old themes will work 100%. We have to make sure old themes will not cause fatal white screen errors.&lt;br /&gt;
&lt;br /&gt;
=Design overview=&lt;br /&gt;
&lt;br /&gt;
All theme files are served through two files &#039;&#039;/theme/styles.php&#039;&#039; and &#039;&#039;/theme/image.php&#039;&#039;. More advanced themes may serve extra javascript files through the &#039;&#039;/theme/javascripts.php&#039;&#039; file and a new config option with list of JS files. This approach allows us to parse the resulting CSS and replace all image placeholders and theme settings with current values.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All CSS style sheets (including YUI, plugin CSS and parent themes) are merged into a single large CSS file served via the /theme/styles.php file. This script accepts following parameters:&lt;br /&gt;
* &#039;&#039;&#039;theme&#039;&#039;&#039; (string) - name of the theme&lt;br /&gt;
* &#039;&#039;&#039;rev&#039;&#039;&#039; (int) - theme revision number stored in $CFG-&amp;gt;themerevision&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All options and features are reviewed and optimised. Backwards compatibility is not a primary concern, future possibilities and easy maintenance are always favoured.&lt;br /&gt;
&lt;br /&gt;
==Theme directory structure==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;center&amp;gt;&#039;&#039;File/folder&#039;&#039;&#039;&amp;lt;/center&amp;gt;&lt;br /&gt;
! &amp;lt;center&amp;gt;&#039;&#039;&#039;Description&#039;&#039;&amp;lt;/center&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| db/ (optional)&lt;br /&gt;
| Installation and upgrade hooks - use of db tables is not recommended.&lt;br /&gt;
|-&lt;br /&gt;
| lang/&lt;br /&gt;
| Folder with standard language files - name of theme, usage information, settings. Standard themes store lang files in /lang/ for now.&lt;br /&gt;
|-&lt;br /&gt;
| layout/*.php&lt;br /&gt;
| Folder with page layout templates&lt;br /&gt;
|-&lt;br /&gt;
| pix/&lt;br /&gt;
| Folder with theme pictures - used from CSS or layout only, not used from other plugins.&lt;br /&gt;
|-&lt;br /&gt;
| pix_core/ (optional)&lt;br /&gt;
| Folder with overridden core images and icons from /pix/ folder&lt;br /&gt;
|-&lt;br /&gt;
| pix_plugins/ (optional)&lt;br /&gt;
| Folder with overridden plugin icons - structure is typeofplugin/pluginname/ which maps to pix folder in plugins&lt;br /&gt;
|-&lt;br /&gt;
| style/*.css&lt;br /&gt;
| Style sheet files referenced from the config.php.&lt;br /&gt;
|-&lt;br /&gt;
| config.php&lt;br /&gt;
| Theme configuration - see bellow.&lt;br /&gt;
|-&lt;br /&gt;
| lib.php (optional)&lt;br /&gt;
| Library functions - custom css post-processing, custom render factory, theme init function&lt;br /&gt;
|-&lt;br /&gt;
| renderers.php (optional)&lt;br /&gt;
| Custom renderers used from custom renderer factories.&lt;br /&gt;
|-&lt;br /&gt;
| settings.php (optional)&lt;br /&gt;
| Custom theme settings - colours, logos, etc. Settings are applied in custom css post-processing function.&lt;br /&gt;
|-&lt;br /&gt;
| version.php&lt;br /&gt;
| Needed for install and upgrade hooks, states compatibility with specific Moodle versions. Used for triggering of cache purging.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Theme config.php==&lt;br /&gt;
&lt;br /&gt;
The theme config.php structure is simplified and a bit more flexible. The goal is to make overriding of parent themes simple and easy to understand. Please note global $THEME variable is not available any more, use theme property in current page instance instead.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;$THEME-&amp;gt;parents = array(&#039;standard&#039;, &#039;purple&#039;);&amp;lt;/code&amp;gt;&lt;br /&gt;
Lists all parents top-down, each theme contains the full list of parents, this is non-recursive and more flexible specification without any limits. Originally the number of parent levels was restricted.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;$THEME-&amp;gt;sheets = array(&#039;styles_layout&#039;, &#039;styles_fonts&#039;, &#039;styles_color&#039;);&amp;lt;/code&amp;gt;&lt;br /&gt;
The same as before, lists files from current theme directory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;$THEME-&amp;gt;parents_exclude_sheets(&#039;standard&#039;=&amp;gt;array(&#039;styles_moz&#039;), &#039;purple&#039;=&amp;gt;array(&#039;styles_fonts&#039;));&amp;lt;/code&amp;gt;&lt;br /&gt;
It is also posssible to use &#039;&#039;true&#039;&#039; instead of array in order to specify &#039;&#039;all&#039;&#039; sheets or all sheets in all parents, if not specified the value from the parent theme is used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;$THEME-&amp;gt;editor_sheets = array(&#039;styles_tinymce&#039;);&amp;lt;/code&amp;gt;&lt;br /&gt;
We can not load the full CSS file into the HTML editor&#039;s content area, instead we load editor sheet from lib/editor/editorname/editor_sheets.css and also sheets specified in theme.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;$THEME-&amp;gt;plugins_exclude_sheets(&#039;mod_book&#039;, &#039;gradereport_grader&#039;);&amp;lt;/code&amp;gt;&lt;br /&gt;
Ideally all plugin specific CSS should be stored in styles.css file separately in each plugin. This option lists plugins that should be excluded from this theme, if not specified the value from the parent theme is used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;$THEME-&amp;gt;layouts = array(...);&amp;lt;/code&amp;gt;&lt;br /&gt;
The complete list of layouts is in theme/base/config.php. Page layouts are in fact high level templates that are using PHP syntax. The template files are stored in layout/ subdirectory. Each page layout has specification of block areas and link to template file. Themes may also reference layouts files from other themes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;$THEME-&amp;gt;resource_mp3player_colors, $THEME-&amp;gt;filter_mediaplugin_colors&amp;lt;/code&amp;gt;&lt;br /&gt;
Obsoleted. If not specified the value from the parent theme is used. All these should be moved to real theme settings.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;$THEME-&amp;gt;rendererfactory = &#039;standard_renderer_factory&#039;;&amp;lt;/code&amp;gt;&lt;br /&gt;
The same as before. It is the name of class that returns needed instances of core and plugin renderers. defined in core some library or theme/themename/lib.php or theme/themename/renderers.php&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;$THEME-&amp;gt;csspostprocess = &#039;csspostprocess&#039;;&amp;lt;/code&amp;gt;&lt;br /&gt;
Name of custom CSS post-processing function, this function is usually defined in theme/themename/lib.php.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$THEME-&amp;gt;javascripts = array(&#039;navigation&#039;);&lt;br /&gt;
$THEME-&amp;gt;javascripts_footer = array(&#039;someJSlibrary&#039;);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
List of extra javascript files that are included on each page. Themes can not include extra scripts from the theme folder because the folder may not be accessible via web.&lt;br /&gt;
&lt;br /&gt;
=Implementation=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==One huge CSS sheet==&lt;br /&gt;
&lt;br /&gt;
Each page includes only one huge style sheet. All theme sheets are served by a /theme/styles.php script. Page parameters specify the theme name and revision.&lt;br /&gt;
&lt;br /&gt;
The CSS concatenation is done from the YUI CSS, styles.css from all plugins and theme style sheets starting with top most parent and current theme last, please note the order is very important. The algorithm is following:&lt;br /&gt;
# YUI2 CSS&lt;br /&gt;
## merge all YUI2 CSS into one file, respect correct order of files&lt;br /&gt;
# plugins CSS&lt;br /&gt;
## go through all plugins and search for styles.css - put the list into array, use component names as keys, locations as values&lt;br /&gt;
## filter out excluded sheets specified in current $THEME-&amp;gt;plugins_exclude_sheets&lt;br /&gt;
# theme CSS&lt;br /&gt;
## go through all sheets defined in all parents and store all $THEME-&amp;gt;sheets in array&lt;br /&gt;
## filter out excluded sheets specified in current $THEME-&amp;gt;parent_exclude_sheets&lt;br /&gt;
# resolve real image locations&lt;br /&gt;
## regex search for &amp;lt;nowiki&amp;gt;[[pix:componentname|imagewithsibdirnoext]]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
## priority is: current theme, parent themes, then plugin or YUI fodlers&lt;br /&gt;
## images in web accessible areas are linked directly, images in dataroot would have to go through /theme/image.php?theme=xxx&amp;amp;file=/sub/img&amp;amp;component=moodle&amp;amp;rev=-1&lt;br /&gt;
# apply theme admin settings - values and image locations&lt;br /&gt;
&lt;br /&gt;
Please note that the current $PAGE-&amp;gt;requires-&amp;gt;css() is suitable mostly for user supplied CSS for data content such as the custom CSS used in mod/data/ module.&lt;br /&gt;
&lt;br /&gt;
The YUI3 reset CSS is loaded separated before this huge combined CSS stylesheet, YUI3 loader may load CSS on the fly from Javascript.&lt;br /&gt;
&lt;br /&gt;
==Theme caching==&lt;br /&gt;
&lt;br /&gt;
Potential problems are:&lt;br /&gt;
* server performance - the merging of all CSS, parent themes and image resolving is relatively expensive&lt;br /&gt;
* bandwidth - longer caching, fewer files and optional gzip compression&lt;br /&gt;
* stale data in browser caches - different file needs to be served when anything in CSS changes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The theme CSS content depends on:&lt;br /&gt;
* current theme&lt;br /&gt;
* theme revision&lt;br /&gt;
&lt;br /&gt;
The theme revision is stored in $CFG-&amp;gt;themerev, it is an integer counter incremented after installation/upgrade of any plugin or core. The revision value -1 is used in theme designer mode to prevent the caching completely.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All images used both from PHP and CSS have to be cached too. This is handled automatically in /theme/image.php which accepts similar parameters like the styles.php script.&lt;br /&gt;
&lt;br /&gt;
==The theme designer mode==&lt;br /&gt;
&lt;br /&gt;
Administrator, theme designers and developers often need to tweak CSS or images. In previous versions users had to purge the browser caches manually.&lt;br /&gt;
&lt;br /&gt;
In theme designer mode no CSS is cached on server or in browser, each changes are immediately visible. The switching on of this mode immediately invalidates old caches, the caching is turned on again after switching it off. This mode causes higher server load.&lt;br /&gt;
&lt;br /&gt;
This mode also disables all CSS cleanup and compression, all comments are kept and extra debug information can be included in CSS.&lt;br /&gt;
&lt;br /&gt;
This setting is available from the Appearance settings page.&lt;br /&gt;
&lt;br /&gt;
==Performance improvements==&lt;br /&gt;
&lt;br /&gt;
There are several possibilities for more performance improvements:&lt;br /&gt;
* storing of final CSS files in dataroot - caches need to be deleted after each theme revision change; this could significantly reduce server load&lt;br /&gt;
* longer lifetimes - revision parameter eliminates the stale CSS in browser cache completely , lower bandwidth consumption&lt;br /&gt;
* gzip compression - faster page loading on first page&lt;br /&gt;
* remove comments and useless white space&lt;br /&gt;
* etc.&lt;br /&gt;
&lt;br /&gt;
==Browser hacks==&lt;br /&gt;
&lt;br /&gt;
Old meta.php was used mostly for conditional loading of IE specific hacks. Open University developed alternative solution which adds browser specific classes to body html element. This can be implemented in the pagelib method returning standard body tags.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;body class=&amp;quot;ie ie7&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 #mypage .whatever {&lt;br /&gt;
  /** normal rules */&lt;br /&gt;
 }&lt;br /&gt;
 .ie6#mypage .whatever {&lt;br /&gt;
  /** broken rules */&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
OU used these hacks not only for IE ;-)&lt;br /&gt;
&lt;br /&gt;
==RTL support==&lt;br /&gt;
&lt;br /&gt;
Originally RTL tweaks were stored in separate files. Now we use the same body class tweaks as described above.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;body class=&amp;quot;dir-rtl&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 #mypage .whatever {&lt;br /&gt;
  /** normal rules */&lt;br /&gt;
 }&lt;br /&gt;
 .dir-rtl #mypage .whatever {&lt;br /&gt;
  /** RTL rules */&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==YUI==&lt;br /&gt;
&lt;br /&gt;
Moodle started using YUI framework around 1.7, until 2.0dev we did not use any UI widgets that required CSS. The problem is that the YUI needs to be loaded before theme and plugin CSS, second problem is that standard YUI CSS requires reset CSS which greatly improves A-grade browser compatibility and helps theme designers.&lt;br /&gt;
&lt;br /&gt;
YUI3 implements new loaders both for CSS and JS, there is a complementing PHP dependency loader for YUI.&lt;br /&gt;
&lt;br /&gt;
===YUI CSS foundation===&lt;br /&gt;
&lt;br /&gt;
Moodle styles are based on YUI foundation? Why not? The benefits are:&lt;br /&gt;
* eliminates some different HTML defaults (margins, paddings, font sizes, etc.) [http://developer.yahoo.com/yui/reset/ (YUI CSS Reset)]&lt;br /&gt;
* consistent font sizing and better font-family degradation [http://developer.yahoo.com/yui/fonts/ (YUI CSS Fonts)]&lt;br /&gt;
* the standard YUI CSS is already built on top of this foundation &lt;br /&gt;
* incredibly simple table-less page layouts that include nesting [http://developer.yahoo.com/yui/fonts/ (YUI CSS Grids)] (optional, themes do not have to use it for layout)&lt;br /&gt;
&lt;br /&gt;
===YUI widgets customisation===&lt;br /&gt;
&lt;br /&gt;
The standard YUI CSS has to be loaded after YUI CSS Base (Reset+Fonts+Grids), but before our own CSS. Overriding of YUI stylesheets should not depend on the order of loading, we only guarantee that the YUI CSS foundation sheets are loaded before any other CSS, customisations of YUI skins has to use moodle class selectors.&lt;br /&gt;
&lt;br /&gt;
===YUI versioning===&lt;br /&gt;
&lt;br /&gt;
In 1.9 we store all YUI files in /lib/yui/ folder, this was a problem when upgrading to YUI version from upstream because the old files could be still cached in browsers.&lt;br /&gt;
&lt;br /&gt;
In 2.0 we are finally replicating the YAHOO directory structures, each new version is stored in separate directory.&lt;br /&gt;
&lt;br /&gt;
===Combination of YUI 2 and 3===&lt;br /&gt;
&lt;br /&gt;
YUI 3 uses JS autoloading which is a great step forward and simplification. Unfortunately we still need the YUI2 libraries around for some time, luckily YUI2 libraries may coexist with YUI3 code.&lt;br /&gt;
&lt;br /&gt;
==The image resolver==&lt;br /&gt;
&lt;br /&gt;
Images are used in html code and in CSS style sheets. The problem is easy to solve in PHP code, partial solution was already present in Moodle 1.9 - see $CFG-&amp;gt;pixpath&lt;br /&gt;
&lt;br /&gt;
In 2.0dev there was implemented a new icon_finder class, it can be replaced by much simpler rules, we could also add pix support into all plugins.&lt;br /&gt;
&lt;br /&gt;
Image locations:&lt;br /&gt;
* /mod/modulename/pix/, blocks/blockname/pix/ - in all plugins&lt;br /&gt;
* /theme/themename/pix/ - theme images&lt;br /&gt;
* /theme/themename/pix_core/ - overridden images from core /pix/ folder&lt;br /&gt;
* /theme/themename/pix_plugins/plugin/plugintype/ - overriding of plugin images in themes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The standard API is &amp;lt;code&amp;gt;$OUTPUT-&amp;gt;pix_url($componentname, $imagename, encoded)&amp;lt;/code&amp;gt; when used from PHP and &amp;lt;nowiki&amp;gt;[[pix:componentname|imagename]]&amp;lt;/nowiki&amp;gt; if used in CSS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Image resolved allows us to serve images from dataroot via /theme/image.php script and also solves all browser caching issues.&lt;br /&gt;
&lt;br /&gt;
==Themes in extra directory==&lt;br /&gt;
&lt;br /&gt;
Themes in dataroot is a frequently requested feature. Some admins might not like this, it should be optional. Some really advanced themes with lots of custom files might not be compatible at first. In fact it does not have to be dataroot, this location is configurable via $CFG-&amp;gt;themedir.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the stable branch we have a strange mix of standard themes. Moodle 2.0 is expected to include following themes:&lt;br /&gt;
* base - bare bones minimal theming that most other themes build on&lt;br /&gt;
* standard - basic theme that can be used as base for really simple themes (the exact look of new standard theme is not decided yet)&lt;br /&gt;
* customcolor - standard with admin specified colour palette and custom logos (not confirmed)&lt;br /&gt;
* and many other fancy modern themes like anomaly ( optionally with multiple configuration settings)&lt;br /&gt;
&lt;br /&gt;
Other contrib themes could be available via web interface from Moodle configuration in some future Moodle version.&lt;br /&gt;
&lt;br /&gt;
==Admin theme settings==&lt;br /&gt;
&lt;br /&gt;
Very often users need to make small tweaks to standard themes such as different colour or logos. There should be a way to keep this settings in config_plugin and files separately in dataroot. Settings are placed in /theme/themename/settings.php. This new feature could significantly reduce known theme upgrade problems in the future.&lt;br /&gt;
&lt;br /&gt;
This feature replaces the original CSS constants and will probably use the same syntax. The original CSS constants required modifications in dirroot which was in some cases unacceptable. CSS constants would not be compatible with automatic updates vie web interface anyway.&lt;br /&gt;
&lt;br /&gt;
This feature requires advanced caching of CSS. These settings and files should be available in layouts and renderers too.&lt;br /&gt;
&lt;br /&gt;
The actual replacing of setting placeholders by setting values is performed in custom css post-processing function specified in config.php. Logos and other custom images would be specified as external URLs, later we could also add basic support for storage of these custom theme files in standard Moodle filesystem.&lt;br /&gt;
&lt;br /&gt;
==Page layout==&lt;br /&gt;
Each page may specify one of standard page layouts that are defined in theme/base/config.php. It is not possible to add custom layouts.&lt;br /&gt;
&lt;br /&gt;
Layout definition consists of:&lt;br /&gt;
* template file specification - template name + file name without extension&lt;br /&gt;
* definition of regions&lt;br /&gt;
* default region&lt;br /&gt;
&lt;br /&gt;
New layouts will not be added in the STABLE CVS branches.&lt;br /&gt;
&lt;br /&gt;
==Renderers==&lt;br /&gt;
&lt;br /&gt;
Renderers are small methods that render visual elements using functional programming - our old style PHP style.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Module may define own renderer class and use own renderer methods. Themes may override both core and plugin renderers however you need to have some more advanced understanding of PHP and Moodle design in general.&lt;br /&gt;
&lt;br /&gt;
==Templates (maybe in future)==&lt;br /&gt;
&lt;br /&gt;
Similar to page layouts but much smaller parts of UI that are embedded into pages. This is a new feature that is not used in Moodle core yet.&lt;br /&gt;
&lt;br /&gt;
Code developers may choose to use templates instead of renderers for some larger parts of UI, they may also use renderers from templates. The major difference is that templates accept just one $DATA object with all parameters, templates might be also much easier to use&amp;amp;understand for typical theme designers.&lt;br /&gt;
&lt;br /&gt;
The original emulated templates approach was replaced because it was designed for code developers, not designers. I think it is much easier to just copy templates from core or plugins into themes and tweak them, instead of the reverse engineering of the renderers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please note this does not mean that Moodle is switching to templates now, but technically we could, plugin developers would decide to do so independently. This topic should be revisited in Moodle 2.1dev.&lt;br /&gt;
&lt;br /&gt;
==Other API changes==&lt;br /&gt;
&lt;br /&gt;
* added &#039;&#039;course&#039;&#039; layout&lt;br /&gt;
* $PAGE-&amp;gt;set_generaltype() replaced by $PAGE-&amp;gt;set_pagelayout() because it really switches to one of the layouts from  the standard theme; also the complete list of layouts is given in theme/standard/config.php - there is no way to add plugin layouts, the $PAGE-&amp;gt;set_pagelayout() is used from core and plugin code, not from themes, so it is not possible to add new layouts at all (and never was)&lt;br /&gt;
* name things &#039;&#039;moodle_*&#039;&#039; only if potential conflicts exist, everything plugin related should be named &#039;&#039;componentname_&#039;&#039; (mod_ is usually an exception)- this was discussed several times before; renamed &#039;&#039;moodle_core_renderer&#039; class to &#039;&#039;core_renderer&#039;&#039;, etc.&lt;br /&gt;
* themes are now real plugins with capabilities, lang packs, upgrade code, settings, upgrade code, etc. - it is not recommended to create new db table though&lt;br /&gt;
&lt;br /&gt;
=Backwards compatibility and upgrades=&lt;br /&gt;
&lt;br /&gt;
BC is very limited, all themes and modules need to be manually updated. Keeping old themes during the upgrade must not cause fatal PHP errors. Old themes can be detected by searching for /theme/oldtheme/styles.php, this file will not be present in the new themes any more. Moodle core would simply use the specified parent theme  or the standard theme.&lt;br /&gt;
&lt;br /&gt;
==Theme upgrade steps==&lt;br /&gt;
# delete styles.php&lt;br /&gt;
# redefine all config.php options - in majority of cases change parent value to parents array&lt;br /&gt;
# rename styles_ie6.css and styles_ie7.css to styles_layout_ie6.css and styles_layout_ie7.css - each normal sheet may have an extra sheet with _ieX suffix now, these are loaded automatically, excluding is applied based on $THEME-&amp;gt;parents_exclude_sheets() info from the current theme&lt;br /&gt;
# rename rtl.css to styles_layout_rtl.css - again each normal style sheet may have extra sheet with _rtl suffix similar to IE hacks sheets&lt;br /&gt;
# delete header.html, footer.html and meta.php - obsoleted by $THEME-&amp;gt;layouts option and new layout files&lt;br /&gt;
# add custom layouts and rendereds&lt;br /&gt;
&lt;br /&gt;
In order to minimize confusion during the upgrade, the old themes will be ignored and will be listed os &amp;quot;Incompatible&amp;quot; on the theme selection page - this page is probably the first place admins go in order to diagnose theme problems.&lt;br /&gt;
&lt;br /&gt;
==Module upgrade steps==&lt;br /&gt;
* rename mod/modname/styles.php to styles.css&lt;br /&gt;
* put all images into mod/modname/pix/&lt;br /&gt;
* replace $CFG-&amp;gt;pixpath with $OUTPUT-&amp;gt;pix_url(&#039;imagename&#039;, &#039;mod_modname&#039;)&lt;br /&gt;
&lt;br /&gt;
==Removed features==&lt;br /&gt;
# &#039;&#039;&#039;sometheme/meta.php&#039;&#039;&#039; - used mostly for IE6/7 hacks, custom layouts may be used instead&lt;br /&gt;
# &#039;&#039;&#039;smartpix&#039;&#039;&#039; - completely obsoleted by the new image location resolution algorithm&lt;br /&gt;
# &#039;&#039;&#039;styles.php&#039;&#039;&#039; replaced by styles.css, supported in all plugin types - the PHP syntax is not needed anymore because images are specified using &amp;lt;nowiki&amp;gt;[[pix:component|dir/image]]&amp;lt;/nowiki&amp;gt; syntax and we can also use custom css post-processors&lt;br /&gt;
# &#039;&#039;&#039;$CFG-&amp;gt;pixpath&#039;&#039;&#039; replaced by $OUTPUT-&amp;gt;pix_url()&lt;br /&gt;
# &#039;&#039;&#039;CSS constants&#039;&#039;&#039; replaced by the admin theme settings&lt;br /&gt;
# separate IE6 and IE7 sheets - replaced by body class attributes&lt;br /&gt;
# separate RTL sheets - replaced by body class attribute&lt;br /&gt;
&lt;br /&gt;
=Expected reactions=&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;center&amp;gt;&#039;&#039;&#039;User type&#039;&#039;&#039;&amp;lt;/center&amp;gt;&lt;br /&gt;
! &amp;lt;center&amp;gt;&#039;&#039;&#039;Negative&#039;&#039;&#039;&amp;lt;/center&amp;gt;&lt;br /&gt;
! &amp;lt;center&amp;gt;&#039;&#039;&#039;Positive&#039;&#039;&#039;&amp;lt;/center&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Core developer&lt;br /&gt;
| none&lt;br /&gt;
| No backwards compatibility headaches. Powerful new features. More flexible API.&lt;br /&gt;
|-&lt;br /&gt;
| Contrib developer&lt;br /&gt;
| Has to learn new API and upgrade current code.&lt;br /&gt;
| New useful pix folder and standard styles.css in all plugins. $OUTPUT-&amp;gt;pix_url() more flexible then old pixpath.&lt;br /&gt;
|-&lt;br /&gt;
| Theme designer&lt;br /&gt;
| Has to learn new theme API. Old advanced themes has to be completely redesigned. Has to understand YUI CSS foundation.&lt;br /&gt;
| They can finally override core and plugin images. Easier distribution of custom themes. New income opportunity. Basic theme structure is simplified. No browser caching issues when designing themes.&lt;br /&gt;
|-&lt;br /&gt;
| Administrator&lt;br /&gt;
| All themes need to be updated. Old themes are ignored.&lt;br /&gt;
| Much easier installation (optionally in dataroot) and easy customisation without code modification (images and colours for example). Much safer upgrades. Possibility to upgrade theme via web interface. No browser caching issues when upgrading themes. Better performance and lower server load.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
Using Moodle forum discussions:&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=131219 Yet more theme changes proposal]&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=140089 HEADS UP: Major theme changes landing]&lt;br /&gt;
* [[Development:Output_renderers]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Themes]]&lt;/div&gt;</summary>
		<author><name>Molmos</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/22/en/index.php?title=Performance_recommendations&amp;diff=70492</id>
		<title>Performance recommendations</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/22/en/index.php?title=Performance_recommendations&amp;diff=70492"/>
		<updated>2010-04-01T01:27:31Z</updated>

		<summary type="html">&lt;p&gt;Molmos: /* Obtain a baseline benchmark */&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 has had 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;
*[[Server cluster]]&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;
* See the [[Moodle.org configuration]]&lt;br /&gt;
* Also see this SFSU presentation at Educause (using VMWare): [http://www.educause.edu/Resources/AnOpenSourceLMSforaMissionCrit/162843]&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;
===Install HowTo===&lt;br /&gt;
* [http://2bits.com/articles/installing-php-apc-gnulinux-centos-5.html APC on CentOS 5.x (linux)]&lt;br /&gt;
* [http://fplanque.com/dev/linux/install-apc-php-cache-debian-lenny APC on Debian (linux)]&lt;br /&gt;
* [http://www.linuxtuts.net/211-installing-memcached-php5-memcache-module-debian-apache2.html MemCache module on Debian (Apache2 and PHP5) ]&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;
* A warning about the previous performance tip.  Microsoft Internet Explorer has a (little) known bug that causes seriously problems with SSL-enabled Apache websites.   The issue is that if a web server&#039;s KeepAlive timeout is set to less than 60 seconds (say to the default of 15 seconds), MSIE can get confused about whether a keep-alive connection is available or not.  As a result, any browser POST requests (which always use a keep-alive if available) will fail to reach the server.  This is easily reproduced with postings to the Moodle forums.   Using MSIE, connect to an ssl-enabled Moodle site.  Write a quick forum post, and submit it when the form has been displayed for between 15 seconds and 60 seconds.   You will see a browser error message, and your post content will be lost.  In some cases, doing this will even crash the Windows TCP stack on the client machine. &#039;&#039;&#039; So, if your site is SSL-enabled, and you use Apache, you should set the KeepAliveTimeout to at least 60 seconds&#039;&#039;&#039;.&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;HostnameLookups 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 server performance by using a &#039;&#039;&#039;light-weight&#039;&#039;&#039; webserver like [http://www.lighttpd.net/ lighttpd] (or [http://nginx.net/ nginx])in combination with PHP in FastCGI-mode. Lighttpd was originally created as a proof-of-concept[http://www.lighttpd.net/story] to address the [http://www.kegel.com/c10k.html C10k problem] and while primarily recommended for memory-limited servers, its design origins and asynchronous-IO model make it a suitable and proven[http://blog.lighttpd.net/articles/2006/12/28/lighttpd-powers-5-alexa-top-250-sites] alternative HTTP server for high-load websites and web apps, including Moodle. See the [[lighttpd | MoodleDocs Lighttpd page]] for additional information, configuration example and links.&lt;br /&gt;
&lt;br /&gt;
Alternatively, both [http://www.lighttpd.net/ lighttpd] and [http://nginx.net/ nginx] are capable of performing as a load-balancer and/or reverse-proxy to alleviate load on back-end servers[http://www.linuxjournal.com/article/10108], providing benefit without requiring an actual software change on existing servers.&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;
&lt;br /&gt;
If you are able, the [http://mysqltuner.com/ MySQLTuner] tool can be run against your MySQL server and will calculate appropriate configuration values for most of the following settings based on your current load, status and variables automatically.&lt;br /&gt;
&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 #(table_open_cache in MySQL &amp;gt; 5.1.2)&lt;br /&gt;
(min), and for Moodle 1.7 set &lt;br /&gt;
 table_cache = 512 #(table_open_cache in MySQL &amp;gt; 5.1.2)&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(table_open_cache in MySQL &amp;gt; 5.1.2) 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; if you feel 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/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;
* Don&#039;t use database sessions unless you really need them. On-disc sessions tend to be much faster.&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;
* The &#039;&#039;&#039;Recent activities&#039;&#039;&#039; block is consuming to much resources if you have huge number of records &amp;lt;code&amp;gt;mdl_log&amp;lt;/code&amp;gt;. this is being tested to optimize the SQL query.&lt;br /&gt;
&lt;br /&gt;
==Moodle Image Optimization==&lt;br /&gt;
&lt;br /&gt;
The base images delivered in the original Moodle distribution package provide unoptimized graphics, most of which can benefit from lossless recompression utilizing [http://optipng.sourceforge.net/ optipng] for PNGs, [http://www.lcdf.org/gifsicle/ gifsicle] for GIFs and [http://www.kokkonen.net/tjko/projects.html jpegoptim] for JPGs.  Optimized graphics transfer faster and provide a faster perceived response for clients[http://www.websiteoptimization.com/speed/12/], especially distance learners.  The following example will recursively optimize (without any loss of quality) all the graphics and image files included in a base Moodle installation directory on a server with the above commands installed and available.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
find /example/directory/moodle-1.9 -iname *.png -exec optipng -o7 {} \;&lt;br /&gt;
find /example/directory/moodle-1.9 -iname *.gif -exec gifsicle -O2 -b {} \;&lt;br /&gt;
find /example/directory/moodle-1.9 -iname *.jpg -exec jpegoptim -p {} \;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Both [http://optipng.sourceforge.net/ optipng] and [http://www.lcdf.org/gifsicle/ gifsicle] are provided in the base repositories of most newer Linux distributions; [http://www.kokkonen.net/tjko/projects.html jpegoptim] must be downloaded and installed manually.&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;
* [http://moodle.org/mod/forum/discuss.php?d=102978#p461624 Moodle performance in a pil by Martin Langhoff]&lt;br /&gt;
[[Category:Performance]]&lt;br /&gt;
&lt;br /&gt;
[[es:Rendimiento]]&lt;br /&gt;
[[fr:Performance]]&lt;br /&gt;
[[ja:???????]]&lt;br /&gt;
[[pl:Wydajnosc]]&lt;/div&gt;</summary>
		<author><name>Molmos</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/22/en/index.php?title=LDAP_authentication&amp;diff=70147</id>
		<title>LDAP authentication</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/22/en/index.php?title=LDAP_authentication&amp;diff=70147"/>
		<updated>2010-03-26T11:26:23Z</updated>

		<summary type="html">&lt;p&gt;Molmos: typo: couuntry -&amp;gt; country&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Moodle 1.9}}&lt;br /&gt;
Location: Settings link in &#039;&#039;Administration &amp;gt; Users &amp;gt; [[Authentication]] &amp;gt; LDAP Server&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This document describes how to set up Lightweight Directory Access Protocol (LDAP) authentication in Moodle.  We cover the basic, advanced and some trouble shooting sections to assist the user in the installation and administrating LDAP in Moodle.  &lt;br /&gt;
==Table of Contents==&lt;br /&gt;
__TOC__&lt;br /&gt;
==Basic Scenario==&lt;br /&gt;
The simple and straightforward approach  for most installations.&lt;br /&gt;
&lt;br /&gt;
===Assumptions===&lt;br /&gt;
&lt;br /&gt;
# Your Moodle site is located at &#039;&#039;&#039;http://your.moodle.site/&#039;&#039;&#039;&lt;br /&gt;
# You have configured your PHP installation with the LDAP extension. It is loaded and activated, and it shows when you go to &#039;&#039;&#039;http://your.moodle.site/admin/phpinfo.php&#039;&#039;&#039; (logged in as user &#039;admin&#039;).&lt;br /&gt;
# Your LDAP server has &#039;&#039;&#039;192.168.1.100&#039;&#039;&#039; as its IP address.&lt;br /&gt;
# You are not using LDAP with SSL (also known as LDAPS) in your settings. This might prevent certain operations from working (e.g., you cannot update data if you are using MS Active Directory -- MS-AD from here on --), but should be OK if you just want to authenticate your users.&lt;br /&gt;
# You don&#039;t want your users to change their passwords the first time they log in into Moodle.&lt;br /&gt;
# You are using a single domain as the source of your authentication data in case you are using MS-AD (more on this in the Appendices).&lt;br /&gt;
# You are using a top level distinguished name (DN) of &#039;&#039;&#039;dc=my,dc=organization,dc=domain&#039;&#039;&#039; as the root of your LDAP tree. &lt;br /&gt;
# You have a non-privileged LDAP user account you will use to bind to the LDAP server. This is not necessary with certain LDAP servers, but MS-AD requires this and it won&#039;t hurt if you use it even if your LDAP server doesn&#039;t need it. Make sure &#039;&#039;&#039;this account and its password don&#039;t expire&#039;&#039;&#039;, and make this password as strong as possible. Remember you only need to type this password once, when configuring Moodle, so don&#039;t be afraid of making it as hard to guess as possible. Let&#039;s say this user account has a DN of &#039;&#039;&#039;cn=ldap-user,dc=my,dc=organization,dc=domain&#039;&#039;&#039;, and password &#039;&#039;&#039;hardtoguesspassword&#039;&#039;&#039;.&lt;br /&gt;
# All of your Moodle users are in an organizational unit (OU) called &#039;&#039;&#039;moodleusers&#039;&#039;&#039;, which is right under your LDAP root. That OU has a DN of &#039;&#039;&#039;ou=moodleusers,dc=my,dc=organization,dc=domain&#039;&#039;&#039;.&lt;br /&gt;
# You &#039;&#039;&#039;don&#039;t&#039;&#039;&#039; want your LDAP users&#039; passwords to be stored in Moodle at all.&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
===Configuring Moodle authentication===&lt;br /&gt;
&lt;br /&gt;
Log in as an admin user and go to Administration &amp;gt;&amp;gt; Users &amp;gt;&amp;gt; Authentication &amp;gt;&amp;gt; Manage authentication. In the table that appears, enable the &amp;quot;LDAP Server&amp;quot; authentication option (click on the closed eye to make it open) and then click on the associated &#039;Settings&#039; link. You will get a page similar to this one:&lt;br /&gt;
&lt;br /&gt;
[[Image:auth_ldap_config_screenshot.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
Now, you just have to fill in the values. Let&#039;s go step by step.&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
====LDAP Server Settings====&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
! Field name&lt;br /&gt;
! Value to fill in&lt;br /&gt;
|-&lt;br /&gt;
| Host URL&lt;br /&gt;
| As the IP of your LDAP server is 192.168.1.100, type &amp;quot;&#039;&#039;&#039;ldap://192.168.1.100&#039;&#039;&#039;&amp;quot; (without the quotes), or just &amp;quot;&#039;&#039;&#039;192.168.1.100&#039;&#039;&#039;&amp;quot; (some people have trouble connecting with the first syntax, specially on MS Windows servers).&lt;br /&gt;
|-&lt;br /&gt;
| Version&lt;br /&gt;
| Unless you are using a really old LDAP server, &#039;&#039;&#039;version 3&#039;&#039;&#039; is the one you should choose.&lt;br /&gt;
|-&lt;br /&gt;
| LDAP Encoding&lt;br /&gt;
| Specify encoding used by LDAP server. Most probably utf-8.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
====Bind settings====&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
! Field name&lt;br /&gt;
! Value to fill in&lt;br /&gt;
|-&lt;br /&gt;
| Hide passwords&lt;br /&gt;
| As you &#039;&#039;&#039;don&#039;t&#039;&#039;&#039; want to store the users&#039;s password in Moodle&#039;s database, choose &#039;&#039;&#039;Yes&#039;&#039;&#039; here.&lt;br /&gt;
|-&lt;br /&gt;
| Distinguished Name&lt;br /&gt;
| This is the distinguished name of the bind user defined above. Just type &amp;quot;&#039;&#039;&#039;cn=ldap-user,dc=my,dc=organization,dc=domain&#039;&#039;&#039;&amp;quot; (without the quotes).&lt;br /&gt;
|-&lt;br /&gt;
| Password&lt;br /&gt;
| This is the bind user password defined above. Type &amp;quot;&#039;&#039;&#039;hardtoguesspassword&#039;&#039;&#039;&amp;quot; (without the quotes).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
====User lookup settings====&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
! Field name&lt;br /&gt;
! Value to fill in&lt;br /&gt;
|-&lt;br /&gt;
| User type&lt;br /&gt;
| Choose: &lt;br /&gt;
* &#039;&#039;&#039;Novel Edirectory&#039;&#039;&#039; if your LDAP server is running Novell&#039;s eDdirectory.&lt;br /&gt;
* &#039;&#039;&#039;posixAccount (rfc2307)&#039;&#039;&#039; if your LDAP server is running a RFC-2307 compatible LDAP server (choose this is your server is running OpenLDAP).&lt;br /&gt;
* &#039;&#039;&#039;posixAccount (rfc2307bis)&#039;&#039;&#039; if your LDAP server is running a RFC-2307bis compatible LDAP server.&lt;br /&gt;
* &#039;&#039;&#039;sambaSamAccount (v.3.0.7)&#039;&#039;&#039; if your LDAP server is running with SAMBA&#039;s 3.x LDAP schema extension and you want to use it.&lt;br /&gt;
* &#039;&#039;&#039;MS ActiveDirectory&#039;&#039;&#039; if your LDAP server is running Microsoft&#039;s Active Directory (MS-AD)&lt;br /&gt;
|-&lt;br /&gt;
| Contexts&lt;br /&gt;
| The DN of the context (container) where all of your Moodle users are found. Type &#039;&#039;&#039;ou=moodleusers,dc=my,dc=organization,dc=domain&#039;&#039;&#039; here.&lt;br /&gt;
|-&lt;br /&gt;
| Search subcontexts&lt;br /&gt;
| If you have any sub organizational units (subcontexts) hanging from &#039;&#039;&#039;ou=moodleusers,dc=my,dc=organization,dc=domain&#039;&#039;&#039; and you want Moodle to search there too, set this to &#039;&#039;&#039;yes&#039;&#039;&#039;. Otherwise, set this to &#039;&#039;&#039;no&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| Dereference aliases&lt;br /&gt;
| Sometimes your LDAP server will tell you that the real value you are searching for is in fact in another part of the LDAP tree (this is called an alias). If you want Moodle to &#039;dereference&#039; the alias and fetch the real value from the original location, set this to &#039;&#039;&#039;yes&#039;&#039;&#039;. If you don&#039;t want Moodle to dereference it, set this to &#039;&#039;&#039;no&#039;&#039;&#039;. If you are using MS-AD, set this to &#039;&#039;&#039;no&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| User attribute&lt;br /&gt;
| The attribute used to name/search users in your LDAP tree. This option takes a default value based on the &#039;&#039;User type&#039;&#039; value you chose above. &amp;lt;u&amp;gt;So unless you need something special, you don&#039;t need to fill this in&amp;lt;/u&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
By the way, it&#039;s usually &#039;&#039;&#039;cn&#039;&#039;&#039; (Novell eDirectory and MS-AD) or &#039;&#039;&#039;uid&#039;&#039;&#039; (RFC-2037, RFC-2037bis and SAMBA 3.x LDAP extension), but if you are using MS-AD you could use &#039;&#039;&#039;sAMAccountName&#039;&#039;&#039; (the pre-Windows 2000 logon account name) if you need too.&lt;br /&gt;
|-&lt;br /&gt;
| Member attribute&lt;br /&gt;
| The attribute used to list the members of a given group. This option takes a default value based on the &#039;&#039;User type&#039;&#039; value you choosed above. &amp;lt;u&amp;gt;So unless you need something special, you don&#039;t need to fill this in.&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By the way, the usual values are &#039;&#039;&#039;member&#039;&#039;&#039; and &#039;&#039;&#039;memberUid&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| Member attribute uses dn&lt;br /&gt;
| Whether the member attribute contains distinguished names (1) or not (0).This option takes a default value based on the &#039;&#039;User type&#039;&#039; value you choosed above. &amp;lt;u&amp;gt;So unless you need something special, you don&#039;t need to fill this in.&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Object class&lt;br /&gt;
| The type of LDAP object used to search for users. This option takes a default value based on the &#039;&#039;User type&#039;&#039; value you choosed above. &amp;lt;u&amp;gt;So unless you need something special, you don&#039;t need to fill this in.&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here are the default values for each of the &#039;&#039;ldap_user_type&#039;&#039; values:&lt;br /&gt;
* &#039;&#039;&#039;User&#039;&#039;&#039; for Novel eDirectory&lt;br /&gt;
* &#039;&#039;&#039;posixAccount&#039;&#039;&#039; for RFC-2037 and RFC-2037bis&lt;br /&gt;
* &#039;&#039;&#039;sambaSamAccount&#039;&#039;&#039; for SAMBA 3.0.x LDAP extension&lt;br /&gt;
* &#039;&#039;&#039;user&#039;&#039;&#039; for MS-AD&lt;br /&gt;
If you get an error about a problem with updating the ldap server (even if you have specified not to write changes back to the ldap server) try setting the ldap object class to * - see http://moodle.org/mod/forum/discuss.php?d=70566 for a discussion on this problem&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
====Force change password====&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
! Field name&lt;br /&gt;
! Value to fill in&lt;br /&gt;
|-&lt;br /&gt;
| Force change password&lt;br /&gt;
| Set this to &#039;&#039;Yes&#039;&#039; if you want to force your users to change their password on the first login into Moodle. Otherwise, set this to &#039;&#039;no&#039;&#039;. Bear in mind the password they are forced to change is the one stored in your LDAP server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;As you don&#039;t want your users to change their passwords in their first login, leave this set to &#039;&#039;No&#039;&#039;&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Use standard Change Password Page&lt;br /&gt;
|&lt;br /&gt;
* Setting this to &#039;&#039;Yes&#039;&#039; makes Moodle use it&#039;s own standard password change page, everytime users want to change their passwords.&lt;br /&gt;
* Setting this to &#039;&#039;No&#039;&#039; makes Moodle use the the page specified in the field called &amp;quot;Password change URL&amp;quot; (see below).&lt;br /&gt;
&lt;br /&gt;
Bear in mind that changing your LDAP passwords from Moodle might require a LDAPS connection (this is actually a requirement for MS-AD). In addition to that, the bind user specified above must have the rights needed to change other users&#039; passwords.&lt;br /&gt;
&lt;br /&gt;
Also, code for changing passwords from Moodle for anything but Novell eDirectory and Active Directory is almost not tested, so this may or may not work for other LDAP servers.&lt;br /&gt;
|-&lt;br /&gt;
| Password Format&lt;br /&gt;
| Specify how the new password is encrypted before sending it to the LDAP server: Plain text, MD5 hash or SHA-1 hash. MS-AD uses plain text, for example.&lt;br /&gt;
|-&lt;br /&gt;
| Password change URL&lt;br /&gt;
| Here you can specify a location at which your users can recover or change their username/password if they&#039;ve forgotten it. This will be provided to users as a button on the login page and their user page. if you leave this blank the button will not be printed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
====LDAP password expiration settings====&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
! Field name&lt;br /&gt;
! Value to fill in&lt;br /&gt;
|-&lt;br /&gt;
| Expiration&lt;br /&gt;
| &lt;br /&gt;
* Setting this to &#039;&#039;No&#039;&#039; will make Moodle not to check if the password of the user has expired or not.&lt;br /&gt;
* Setting this to &#039;&#039;LDAP&#039;&#039; will make Moodle check if the LDAP password of the user has expired or not, and warn her a number of days before the password expires.&lt;br /&gt;
&lt;br /&gt;
Current code only deals with Novell eDirectory LDAP server and MS-AD.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;So unless you have Novell eDirectory server or MS-AD, choose &#039;&#039;No&#039;&#039; here.&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Expiration warning&lt;br /&gt;
| This value sets how many days in advance of password expiration the user is warned that her password is about to expire.&lt;br /&gt;
|-&lt;br /&gt;
| Expiration attribute.&lt;br /&gt;
| The LDAP user attribute used to check password expiration. This option takes a default value based on the &#039;&#039;User type&#039;&#039; value you choosed above. &amp;lt;u&amp;gt;So unless you need something special, you don&#039;t need to fill this in.&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Grace logins&lt;br /&gt;
| This setting is specific to Novell eDirectory. If set to &#039;&#039;Yes&#039;&#039;, enable LDAP gracelogin support. After password has expired the user can login until gracelogin count is 0.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;So unless you have Novell eDirectory server and want to allow gracelogin support, choose &#039;&#039;No&#039;&#039; here.&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Grace login attribute&lt;br /&gt;
| This setting is currently not used in the code (and is specific to Novell eDirectory). &lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;So you don&#039;t need to fill this in.&amp;lt;/u&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
====Enable user creation====&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
! Field name&lt;br /&gt;
! Value to fill in&lt;br /&gt;
|-&lt;br /&gt;
| Create users externally&lt;br /&gt;
| New (anonymous) users can self-create user accounts on the external LDAP server and confirm them via email. If you enable this, remember to also configure module-specific options for user creation and to fill in some instructions in &#039;&#039;auth_instructions&#039;&#039; field in Administration &amp;gt;&amp;gt; Users &amp;gt;&amp;gt; Authentication &amp;gt;&amp;gt; Manage authentication. Otherwise the new users won&#039;t be able to self-create new accounts.&lt;br /&gt;
&lt;br /&gt;
As of now, only Novell eDirectory and MS-AD can create users externally.&lt;br /&gt;
|-&lt;br /&gt;
| Context for new users&lt;br /&gt;
| Specify the context where users are created. This context should be different from other users&#039; contexts to prevent security issues. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
====Course creation====&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
! Field name&lt;br /&gt;
! Value to fill in&lt;br /&gt;
|-&lt;br /&gt;
| Creators&lt;br /&gt;
| The DN of the group that contains all of your Moodle creators. This is typically a posixGroup with a &amp;quot;memberUid&amp;quot; attribute for each user you want to be a creator.  If your group is called &#039;&#039;creators&#039;&#039;, type &#039;&#039;&#039;cn=creators,ou=moodleusers,dc=my,dc=organization,dc=domain&#039;&#039;&#039; here.  Each memberUid attribute contains the CN of a user who is authorized to be a creator.  Do not use the user&#039;s full DN (e.g.,  not &#039;&#039;&#039;memberUid: cn=JoeTeacher,ou=moodleusers,dc-my,dc=organizations,dc=domain&#039;&#039;&#039;, but rather &#039;&#039;&#039;memberUid: JoeTeacher&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
In eDirectory, the objectClass for a group is (by default) not &#039;&#039;&#039;posixGroup&#039;&#039;&#039; but &#039;&#039;&#039;groupOfNames,&#039;&#039;&#039; whose member attribute is &#039;&#039;&#039;member,&#039;&#039;&#039; not &#039;&#039;&#039;memberUid,&#039;&#039;&#039; and whose value is the full DN of the user in question.  Although you can probably modify Moodle&#039;s code to use this field, a better solution is just to add a new &#039;&#039;&#039;objectClass&#039;&#039;&#039; attribute of &#039;&#039;&#039;posixGroup&#039;&#039;&#039; to your creators group and put the CNs for each creator in a &#039;&#039;&#039;memberUid&#039;&#039;&#039; attribute.&lt;br /&gt;
&lt;br /&gt;
In MS Active Directory, you will need to create a security group for your creators to be part of and then add them all. If your ldap context above is &#039;ou=staff,dc=my,dc=org&#039; then your group should then be &#039;cn=creators,ou=staff,dc=my,dc=org&#039;. If some of the users are from other contexts and have been added to the same security group, you&#039;ll have to add these as separate contexts after the first one using the same format.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
====Cron synchronization script====&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
! Field name&lt;br /&gt;
! Value to fill in&lt;br /&gt;
|-&lt;br /&gt;
| Removed ext user&lt;br /&gt;
| Specify what to do with internal user account during mass synchronization when user was removed from external source. Only suspended users are automatically revived if they reappear in ext source.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
====NTLM SSO====&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
! Field name&lt;br /&gt;
! Value to fill in&lt;br /&gt;
|-&lt;br /&gt;
| Enable&lt;br /&gt;
| If you want to use NTLM SSO (see details at [[NTLM_authentication]]), choose &#039;&#039;Yes&#039;&#039; here. Otherwise, choose &#039;&#039;No&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| Subnet&lt;br /&gt;
| Specify the subnets of the clients that will use NTLM SSO (see details at [[NTLM_authentication]]).&lt;br /&gt;
|-&lt;br /&gt;
| MS IE Fast Path?&lt;br /&gt;
| If all of you clients (or most of them) are using MS Internet Explorer, you can set this option to bypasses certain steps of the SSO login and speed up login times. This only works with MS Internet Explorer, but deals with other browsers in a sensible way (they are automatically sent to the plain login page).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
====Data Mapping====&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
! Field name&lt;br /&gt;
! Value to fill in&lt;br /&gt;
|-&lt;br /&gt;
| First name&lt;br /&gt;
| The name of the attribute that holds the first name of your users in your LDAP server. This is usually &#039;&#039;&#039;givenName&#039;&#039;&#039; or &#039;&#039;&#039;displayName&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Surname&lt;br /&gt;
| The name of the attribute that holds the surname of your users in your LDAP server. This is usually &#039;&#039;&#039;sn&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Email address&lt;br /&gt;
| The name of the attribute that holds the email address of your users in your LDAP server. This is usually &#039;&#039;&#039;mail&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| City/town&lt;br /&gt;
| The name of the attribute that holds the city/town of your users in your LDAP server. This is usully &#039;&#039;&#039;l&#039;&#039;&#039; (lowercase L) or &#039;&#039;&#039;localityName&#039;&#039;&#039; (not valid in MS-AD).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| Country&lt;br /&gt;
| The name of the attribute that holds the country of your users in your LDAP server. This is usully &#039;&#039;&#039;c&#039;&#039;&#039; or &#039;&#039;&#039;countryName&#039;&#039;&#039; (not valid in MS-AD).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Language&lt;br /&gt;
| &#039;&#039;&#039;preferredLanguage&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Description&lt;br /&gt;
| &#039;&#039;&#039;description&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Webpage&lt;br /&gt;
| &amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ID Number&lt;br /&gt;
| &lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Institution&lt;br /&gt;
| &lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Department&lt;br /&gt;
| The name of the attribute that holds the department name of your users in your LDAP server. This is usully &#039;&#039;&#039;departmentNumber&#039;&#039;&#039; (for posixAccount and maybe eDirectory) or &#039;&#039;&#039;department&#039;&#039;&#039; (for MS-AD).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Phone 1&lt;br /&gt;
| The name of the attribute that holds the telephone number of your users in your LDAP server. This is usually &#039;&#039;&#039;telephoneNumber&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Phone 2&lt;br /&gt;
|  The name of the attribute that holds an additional telephone number of your users in your LDAP server. This can be &#039;&#039;&#039;homePhone&#039;&#039;&#039;, &#039;&#039;&#039;mobile&#039;&#039;&#039;, &#039;&#039;&#039;pager&#039;&#039;&#039;, &#039;&#039;&#039;facsimileTelephoneNumber&#039;&#039;&#039; or even others.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Address&lt;br /&gt;
| The name of the attribute that holds the street address of your users in your LDAP server. This is usully &#039;&#039;&#039;streetAddress&#039;&#039;&#039; or &#039;&#039;&#039;street&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
===Setting up regular automatic synchronisation using cron===&lt;br /&gt;
There is a script located at /auth/ldap/auth_ldap_sync_users.php which will create or suspend/delete (see the setting above) all LDAP accounts automatically. Ideally, this is called from the command line once a day during a quiet time using exactly the same procedure as the standard [[Cron|cron]] job (so you will end up with two cron entries). It is important, however, to make sure that all of the above LDAP settings are working properly before you try this, as well as backing up your database and moodledata folders. Poor LDAP configuration could lead to users being wrongly deleted.&lt;br /&gt;
&lt;br /&gt;
If you find that the script is not running through all of your users properly and you have MS Active Directory + over 1000 users, this is because by default, MS AD only sends back 1000 users at a time. Follow the instructions [http://support.microsoft.com/kb/315071 here] to set the MaxPageSize setting to a number higher than your total number of users (both now and in future) to fix it.&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
==Active Directory help==&lt;br /&gt;
[[Active Directory]] is Microsoft&#039;s directory service. It is included in Windows 2000 Server and later versions of their operating system. For more information about subjects below, &#039;&#039;&#039;[[Active Directory|please go here]]&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
*Warning: The PHP LDAP module does not seem to be present&lt;br /&gt;
*LDAP-module cannot connect any LDAP servers &lt;br /&gt;
*Getting correct CNs for Contexts and Creators&lt;br /&gt;
*Getting the right user_attribute&lt;br /&gt;
*Installing ldp.exe Server Tool&lt;br /&gt;
*Example Active Directory Configuration&lt;br /&gt;
*Child Domains and the Global Catalog in MS Active Directory&lt;br /&gt;
*Enabling the Global Catalog&lt;br /&gt;
*Active Directory with Moodle 1.8&lt;br /&gt;
*MS Active Directory + SSL&lt;br /&gt;
&lt;br /&gt;
==Advanced Scenarios - Multiple servers or locations==&lt;br /&gt;
For larger installations with  multiple LDAP servers, or multiple locations (contexts) in a LDAP tree.&lt;br /&gt;
&lt;br /&gt;
===Using multiple LDAP Servers===&lt;br /&gt;
Entering more than one name in the ldap_host_url field can provide some sort of resilience to your system. Simply use the syntax :&lt;br /&gt;
ldap://my.first.server ; ldap://my.second.server ; ...&lt;br /&gt;
&lt;br /&gt;
Of course, this will only work if all the servers share the same directory information, using a replication or synchronization mecanism once introduced in eDirectory and now generalized to the main LDAP-compatible directories.&lt;br /&gt;
&lt;br /&gt;
There is one drawback in Moodle 1.5 - 1.6 implementation of LDAP authentication : the auth_ldap_connect() function processes the servers sequentially, not in a round robin mode. Thus, if the primary server fails, you will have to wait for the connection to time out before switching to the following one.&lt;br /&gt;
&lt;br /&gt;
===Using multiple user locations (contexts) in your LDAP tree===&lt;br /&gt;
There is no need to use multiple user locations if your directory tree is flat, i.e. if all user accounts reside in a &#039;&#039;&#039;ou=people,dc=my,dc=organization,dc=domain&#039;&#039;&#039; or &#039;&#039;&#039;ou=people,o=myorg&#039;&#039;&#039; container. &lt;br /&gt;
&lt;br /&gt;
At the opposite, if you use the ACL mecanism to delegate user management, there are chances that your users will be stored in containers like &#039;&#039;&#039;ou=students,ou=dept1,o=myorg&#039;&#039;&#039; and &#039;&#039;&#039;ou=students,ou=dept2,o=myorg&#039;&#039;&#039; ...&lt;br /&gt;
&lt;br /&gt;
Then there is an alternative :&lt;br /&gt;
* Look at the &#039;&#039;&#039;o=myorg&#039;&#039;&#039; level with the ldap_search_sub attribute set to &#039;&#039;&#039;yes&#039;&#039;&#039;.&lt;br /&gt;
* Set the ldap_context to &#039;&#039;&#039;ou=students,ou=dept1,o=myorg ; ou=students,ou=dept2,o=myorg&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Choosing between these two solutions supposes some sort of benchmarking, as the result depends heavily on the structure of your directory tree &#039;&#039;&#039;and&#039;&#039;&#039; on your LDAP software indexing capabilities. Simply note that there is a probability in such deep trees that two users share the same &#039;&#039;common name&#039;&#039; (cn), while having different &#039;&#039;distinguished names&#039;&#039;. Then only the second solution will have a deterministic result (returning allways the same user).&lt;br /&gt;
&lt;br /&gt;
===Using LDAPS (LDAP + SSL)===&lt;br /&gt;
====Enabling LDAPS on the LDAP server side====&lt;br /&gt;
&lt;br /&gt;
* [[Active_Directory#MS_Active_Directory_.2B_SSL|Enabling LDAPS on MS Active Directory ]]&lt;br /&gt;
&lt;br /&gt;
====Enabling LDAPS on the client side (Moodle server)====&lt;br /&gt;
&lt;br /&gt;
* If you are running Moodle on MS Windows, you need to tell PHP&#039;s OpenLDAP extension to disable SSL server certificate checking. You must create a directory called &#039;&#039;C:\OpenLDAP\sysconf&#039;&#039;. In this directory, create a file called &#039;&#039;ldap.conf&#039;&#039; with the following content:&lt;br /&gt;
&lt;br /&gt;
 TLS_REQCERT never&lt;br /&gt;
&lt;br /&gt;
* If you are running Moodle on Linux or any other Unix-like operating system, and you want to disable SSL server certificate checking, you need to edit the OpenLDAP client configuration file (usually /etc/ldap.conf or /etc/ldap/ldap.conf or even /etc/openldap/ldap.conf) and make sure you have a line like the following one:&lt;br /&gt;
&lt;br /&gt;
 TLS_REQCERT never&lt;br /&gt;
&lt;br /&gt;
Now you should be able to use &#039;&#039;&#039;ldaps://&#039;&#039;&#039; when connecting to your LDAP server.&lt;br /&gt;
&lt;br /&gt;
If you have the certificate of the LDAPS server as a file and want to check the certificate for the connection, copy the certificate file to an arbitary directory (e.g. /etc/ldap/certificate.pem) on your client and change the content of the &#039;&#039;ldap.conf&#039;&#039; as follows:&lt;br /&gt;
&lt;br /&gt;
 TLS_REQCERT demand&lt;br /&gt;
 TLS_CACERT  /etc/ldap/certificate.pem&lt;br /&gt;
&lt;br /&gt;
When the requested server certificate is bad or not provided, the connection to the LDAPS server is immediately terminated.&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
==Appendices==&lt;br /&gt;
===ldap auth_user_create() only suports Novell===&lt;br /&gt;
&lt;br /&gt;
After configuring user authentication with ldap I realized ldap only support edir (Novell) when combining ldap an email user confirmation. For example in my case (I use openldap) I have the following error after filling the user form:&lt;br /&gt;
&lt;br /&gt;
auth: ldap auth_user_create() does not support selected usertype:&amp;quot;rfc2307&amp;quot; (..yet)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting Resource Limits RedHat Directory Server ===&lt;br /&gt;
&lt;br /&gt;
Operational attributes can be set for the bind user DN using the command-line. &lt;br /&gt;
One can simply use ldapmodify to add the following attributes:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
! Attribute Name &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| nsLookThroughLimit&lt;br /&gt;
| Specifies how many entries are examined for a search operation. Giving this attribute a value of -1 indicates that there is no limit.&lt;br /&gt;
|-&lt;br /&gt;
| nsSizeLimit &lt;br /&gt;
| Specifies the maximum number of entries the server returns to a client application in response to a search operation. Giving this attribute a value of -1 indicates that there is no limit.&lt;br /&gt;
|-&lt;br /&gt;
| nsTimeLimit &lt;br /&gt;
| Specifies the maximum time the server spends processing a search operation. Giving this attribute a value of -1 indicates that there is no time limit.&lt;br /&gt;
|-&lt;br /&gt;
| nsIdleTimeout 	        &lt;br /&gt;
| Specifies the time a connection to the server can be idle before the connection is dropped. The value is given in seconds. Giving this attribute a value of -1 indicates that there is no limit.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt; LDAP Console Command-Line&lt;br /&gt;
&lt;br /&gt;
 ldapmodify -h redhat_dir_server -p 389 -D &amp;quot;cn=directory manager&amp;quot; -w secretpwd&lt;br /&gt;
&lt;br /&gt;
 dn: uid=MoodleAdmin,ou=system,dc=myschool,dc=edu&lt;br /&gt;
 changetype: modify&lt;br /&gt;
 add:nsSizeLimit&lt;br /&gt;
 nsSizeLimit: 1000&lt;br /&gt;
 &amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [[NTLM_authentication]]&lt;br /&gt;
* [[Active_Directory]]&lt;br /&gt;
* [[LDAP enrolment]]&lt;br /&gt;
* [http://download.moodle.org/download.php/docs/en/how-to_guides/ldap_auth_and_enrolment_set-up.pdf LDAP auth and enrolment set-up guide] (PDF 227KB)&lt;br /&gt;
&lt;br /&gt;
Using Moodle:&lt;br /&gt;
*[http://moodle.org/mod/forum/view.php?id=42 User authentication forum]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=32168 PHP LDAP module does not seem to be present] forum discussion&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=140901 Syncronisation with AUTH_LDAP_SYNC_USERS.PHP produces fewer accounts than it should] forum discussion&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Authentication]]&lt;br /&gt;
&lt;br /&gt;
[[es:LDAP_authentication]]&lt;br /&gt;
[[fr:Utiliser un serveur LDAP]]&lt;br /&gt;
[[ja:LDAP認証]]&lt;br /&gt;
[[zh:LDAP认证]]&lt;br /&gt;
[[de:Authentifizierung über LDAP]]&lt;/div&gt;</summary>
		<author><name>Molmos</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/22/en/index.php?title=LDAP_authentication&amp;diff=70146</id>
		<title>LDAP authentication</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/22/en/index.php?title=LDAP_authentication&amp;diff=70146"/>
		<updated>2010-03-26T11:11:47Z</updated>

		<summary type="html">&lt;p&gt;Molmos: typo - choosed -&amp;gt; chose&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Moodle 1.9}}&lt;br /&gt;
Location: Settings link in &#039;&#039;Administration &amp;gt; Users &amp;gt; [[Authentication]] &amp;gt; LDAP Server&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This document describes how to set up Lightweight Directory Access Protocol (LDAP) authentication in Moodle.  We cover the basic, advanced and some trouble shooting sections to assist the user in the installation and administrating LDAP in Moodle.  &lt;br /&gt;
==Table of Contents==&lt;br /&gt;
__TOC__&lt;br /&gt;
==Basic Scenario==&lt;br /&gt;
The simple and straightforward approach  for most installations.&lt;br /&gt;
&lt;br /&gt;
===Assumptions===&lt;br /&gt;
&lt;br /&gt;
# Your Moodle site is located at &#039;&#039;&#039;http://your.moodle.site/&#039;&#039;&#039;&lt;br /&gt;
# You have configured your PHP installation with the LDAP extension. It is loaded and activated, and it shows when you go to &#039;&#039;&#039;http://your.moodle.site/admin/phpinfo.php&#039;&#039;&#039; (logged in as user &#039;admin&#039;).&lt;br /&gt;
# Your LDAP server has &#039;&#039;&#039;192.168.1.100&#039;&#039;&#039; as its IP address.&lt;br /&gt;
# You are not using LDAP with SSL (also known as LDAPS) in your settings. This might prevent certain operations from working (e.g., you cannot update data if you are using MS Active Directory -- MS-AD from here on --), but should be OK if you just want to authenticate your users.&lt;br /&gt;
# You don&#039;t want your users to change their passwords the first time they log in into Moodle.&lt;br /&gt;
# You are using a single domain as the source of your authentication data in case you are using MS-AD (more on this in the Appendices).&lt;br /&gt;
# You are using a top level distinguished name (DN) of &#039;&#039;&#039;dc=my,dc=organization,dc=domain&#039;&#039;&#039; as the root of your LDAP tree. &lt;br /&gt;
# You have a non-privileged LDAP user account you will use to bind to the LDAP server. This is not necessary with certain LDAP servers, but MS-AD requires this and it won&#039;t hurt if you use it even if your LDAP server doesn&#039;t need it. Make sure &#039;&#039;&#039;this account and its password don&#039;t expire&#039;&#039;&#039;, and make this password as strong as possible. Remember you only need to type this password once, when configuring Moodle, so don&#039;t be afraid of making it as hard to guess as possible. Let&#039;s say this user account has a DN of &#039;&#039;&#039;cn=ldap-user,dc=my,dc=organization,dc=domain&#039;&#039;&#039;, and password &#039;&#039;&#039;hardtoguesspassword&#039;&#039;&#039;.&lt;br /&gt;
# All of your Moodle users are in an organizational unit (OU) called &#039;&#039;&#039;moodleusers&#039;&#039;&#039;, which is right under your LDAP root. That OU has a DN of &#039;&#039;&#039;ou=moodleusers,dc=my,dc=organization,dc=domain&#039;&#039;&#039;.&lt;br /&gt;
# You &#039;&#039;&#039;don&#039;t&#039;&#039;&#039; want your LDAP users&#039; passwords to be stored in Moodle at all.&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
===Configuring Moodle authentication===&lt;br /&gt;
&lt;br /&gt;
Log in as an admin user and go to Administration &amp;gt;&amp;gt; Users &amp;gt;&amp;gt; Authentication &amp;gt;&amp;gt; Manage authentication. In the table that appears, enable the &amp;quot;LDAP Server&amp;quot; authentication option (click on the closed eye to make it open) and then click on the associated &#039;Settings&#039; link. You will get a page similar to this one:&lt;br /&gt;
&lt;br /&gt;
[[Image:auth_ldap_config_screenshot.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
Now, you just have to fill in the values. Let&#039;s go step by step.&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
====LDAP Server Settings====&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
! Field name&lt;br /&gt;
! Value to fill in&lt;br /&gt;
|-&lt;br /&gt;
| Host URL&lt;br /&gt;
| As the IP of your LDAP server is 192.168.1.100, type &amp;quot;&#039;&#039;&#039;ldap://192.168.1.100&#039;&#039;&#039;&amp;quot; (without the quotes), or just &amp;quot;&#039;&#039;&#039;192.168.1.100&#039;&#039;&#039;&amp;quot; (some people have trouble connecting with the first syntax, specially on MS Windows servers).&lt;br /&gt;
|-&lt;br /&gt;
| Version&lt;br /&gt;
| Unless you are using a really old LDAP server, &#039;&#039;&#039;version 3&#039;&#039;&#039; is the one you should choose.&lt;br /&gt;
|-&lt;br /&gt;
| LDAP Encoding&lt;br /&gt;
| Specify encoding used by LDAP server. Most probably utf-8.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
====Bind settings====&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
! Field name&lt;br /&gt;
! Value to fill in&lt;br /&gt;
|-&lt;br /&gt;
| Hide passwords&lt;br /&gt;
| As you &#039;&#039;&#039;don&#039;t&#039;&#039;&#039; want to store the users&#039;s password in Moodle&#039;s database, choose &#039;&#039;&#039;Yes&#039;&#039;&#039; here.&lt;br /&gt;
|-&lt;br /&gt;
| Distinguished Name&lt;br /&gt;
| This is the distinguished name of the bind user defined above. Just type &amp;quot;&#039;&#039;&#039;cn=ldap-user,dc=my,dc=organization,dc=domain&#039;&#039;&#039;&amp;quot; (without the quotes).&lt;br /&gt;
|-&lt;br /&gt;
| Password&lt;br /&gt;
| This is the bind user password defined above. Type &amp;quot;&#039;&#039;&#039;hardtoguesspassword&#039;&#039;&#039;&amp;quot; (without the quotes).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
====User lookup settings====&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
! Field name&lt;br /&gt;
! Value to fill in&lt;br /&gt;
|-&lt;br /&gt;
| User type&lt;br /&gt;
| Choose: &lt;br /&gt;
* &#039;&#039;&#039;Novel Edirectory&#039;&#039;&#039; if your LDAP server is running Novell&#039;s eDdirectory.&lt;br /&gt;
* &#039;&#039;&#039;posixAccount (rfc2307)&#039;&#039;&#039; if your LDAP server is running a RFC-2307 compatible LDAP server (choose this is your server is running OpenLDAP).&lt;br /&gt;
* &#039;&#039;&#039;posixAccount (rfc2307bis)&#039;&#039;&#039; if your LDAP server is running a RFC-2307bis compatible LDAP server.&lt;br /&gt;
* &#039;&#039;&#039;sambaSamAccount (v.3.0.7)&#039;&#039;&#039; if your LDAP server is running with SAMBA&#039;s 3.x LDAP schema extension and you want to use it.&lt;br /&gt;
* &#039;&#039;&#039;MS ActiveDirectory&#039;&#039;&#039; if your LDAP server is running Microsoft&#039;s Active Directory (MS-AD)&lt;br /&gt;
|-&lt;br /&gt;
| Contexts&lt;br /&gt;
| The DN of the context (container) where all of your Moodle users are found. Type &#039;&#039;&#039;ou=moodleusers,dc=my,dc=organization,dc=domain&#039;&#039;&#039; here.&lt;br /&gt;
|-&lt;br /&gt;
| Search subcontexts&lt;br /&gt;
| If you have any sub organizational units (subcontexts) hanging from &#039;&#039;&#039;ou=moodleusers,dc=my,dc=organization,dc=domain&#039;&#039;&#039; and you want Moodle to search there too, set this to &#039;&#039;&#039;yes&#039;&#039;&#039;. Otherwise, set this to &#039;&#039;&#039;no&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| Dereference aliases&lt;br /&gt;
| Sometimes your LDAP server will tell you that the real value you are searching for is in fact in another part of the LDAP tree (this is called an alias). If you want Moodle to &#039;dereference&#039; the alias and fetch the real value from the original location, set this to &#039;&#039;&#039;yes&#039;&#039;&#039;. If you don&#039;t want Moodle to dereference it, set this to &#039;&#039;&#039;no&#039;&#039;&#039;. If you are using MS-AD, set this to &#039;&#039;&#039;no&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| User attribute&lt;br /&gt;
| The attribute used to name/search users in your LDAP tree. This option takes a default value based on the &#039;&#039;User type&#039;&#039; value you chose above. &amp;lt;u&amp;gt;So unless you need something special, you don&#039;t need to fill this in&amp;lt;/u&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
By the way, it&#039;s usually &#039;&#039;&#039;cn&#039;&#039;&#039; (Novell eDirectory and MS-AD) or &#039;&#039;&#039;uid&#039;&#039;&#039; (RFC-2037, RFC-2037bis and SAMBA 3.x LDAP extension), but if you are using MS-AD you could use &#039;&#039;&#039;sAMAccountName&#039;&#039;&#039; (the pre-Windows 2000 logon account name) if you need too.&lt;br /&gt;
|-&lt;br /&gt;
| Member attribute&lt;br /&gt;
| The attribute used to list the members of a given group. This option takes a default value based on the &#039;&#039;User type&#039;&#039; value you choosed above. &amp;lt;u&amp;gt;So unless you need something special, you don&#039;t need to fill this in.&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By the way, the usual values are &#039;&#039;&#039;member&#039;&#039;&#039; and &#039;&#039;&#039;memberUid&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| Member attribute uses dn&lt;br /&gt;
| Whether the member attribute contains distinguished names (1) or not (0).This option takes a default value based on the &#039;&#039;User type&#039;&#039; value you choosed above. &amp;lt;u&amp;gt;So unless you need something special, you don&#039;t need to fill this in.&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Object class&lt;br /&gt;
| The type of LDAP object used to search for users. This option takes a default value based on the &#039;&#039;User type&#039;&#039; value you choosed above. &amp;lt;u&amp;gt;So unless you need something special, you don&#039;t need to fill this in.&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here are the default values for each of the &#039;&#039;ldap_user_type&#039;&#039; values:&lt;br /&gt;
* &#039;&#039;&#039;User&#039;&#039;&#039; for Novel eDirectory&lt;br /&gt;
* &#039;&#039;&#039;posixAccount&#039;&#039;&#039; for RFC-2037 and RFC-2037bis&lt;br /&gt;
* &#039;&#039;&#039;sambaSamAccount&#039;&#039;&#039; for SAMBA 3.0.x LDAP extension&lt;br /&gt;
* &#039;&#039;&#039;user&#039;&#039;&#039; for MS-AD&lt;br /&gt;
If you get an error about a problem with updating the ldap server (even if you have specified not to write changes back to the ldap server) try setting the ldap object class to * - see http://moodle.org/mod/forum/discuss.php?d=70566 for a discussion on this problem&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
====Force change password====&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
! Field name&lt;br /&gt;
! Value to fill in&lt;br /&gt;
|-&lt;br /&gt;
| Force change password&lt;br /&gt;
| Set this to &#039;&#039;Yes&#039;&#039; if you want to force your users to change their password on the first login into Moodle. Otherwise, set this to &#039;&#039;no&#039;&#039;. Bear in mind the password they are forced to change is the one stored in your LDAP server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;As you don&#039;t want your users to change their passwords in their first login, leave this set to &#039;&#039;No&#039;&#039;&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Use standard Change Password Page&lt;br /&gt;
|&lt;br /&gt;
* Setting this to &#039;&#039;Yes&#039;&#039; makes Moodle use it&#039;s own standard password change page, everytime users want to change their passwords.&lt;br /&gt;
* Setting this to &#039;&#039;No&#039;&#039; makes Moodle use the the page specified in the field called &amp;quot;Password change URL&amp;quot; (see below).&lt;br /&gt;
&lt;br /&gt;
Bear in mind that changing your LDAP passwords from Moodle might require a LDAPS connection (this is actually a requirement for MS-AD). In addition to that, the bind user specified above must have the rights needed to change other users&#039; passwords.&lt;br /&gt;
&lt;br /&gt;
Also, code for changing passwords from Moodle for anything but Novell eDirectory and Active Directory is almost not tested, so this may or may not work for other LDAP servers.&lt;br /&gt;
|-&lt;br /&gt;
| Password Format&lt;br /&gt;
| Specify how the new password is encrypted before sending it to the LDAP server: Plain text, MD5 hash or SHA-1 hash. MS-AD uses plain text, for example.&lt;br /&gt;
|-&lt;br /&gt;
| Password change URL&lt;br /&gt;
| Here you can specify a location at which your users can recover or change their username/password if they&#039;ve forgotten it. This will be provided to users as a button on the login page and their user page. if you leave this blank the button will not be printed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
====LDAP password expiration settings====&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
! Field name&lt;br /&gt;
! Value to fill in&lt;br /&gt;
|-&lt;br /&gt;
| Expiration&lt;br /&gt;
| &lt;br /&gt;
* Setting this to &#039;&#039;No&#039;&#039; will make Moodle not to check if the password of the user has expired or not.&lt;br /&gt;
* Setting this to &#039;&#039;LDAP&#039;&#039; will make Moodle check if the LDAP password of the user has expired or not, and warn her a number of days before the password expires.&lt;br /&gt;
&lt;br /&gt;
Current code only deals with Novell eDirectory LDAP server and MS-AD.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;So unless you have Novell eDirectory server or MS-AD, choose &#039;&#039;No&#039;&#039; here.&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Expiration warning&lt;br /&gt;
| This value sets how many days in advance of password expiration the user is warned that her password is about to expire.&lt;br /&gt;
|-&lt;br /&gt;
| Expiration attribute.&lt;br /&gt;
| The LDAP user attribute used to check password expiration. This option takes a default value based on the &#039;&#039;User type&#039;&#039; value you choosed above. &amp;lt;u&amp;gt;So unless you need something special, you don&#039;t need to fill this in.&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Grace logins&lt;br /&gt;
| This setting is specific to Novell eDirectory. If set to &#039;&#039;Yes&#039;&#039;, enable LDAP gracelogin support. After password has expired the user can login until gracelogin count is 0.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;So unless you have Novell eDirectory server and want to allow gracelogin support, choose &#039;&#039;No&#039;&#039; here.&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Grace login attribute&lt;br /&gt;
| This setting is currently not used in the code (and is specific to Novell eDirectory). &lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;So you don&#039;t need to fill this in.&amp;lt;/u&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
====Enable user creation====&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
! Field name&lt;br /&gt;
! Value to fill in&lt;br /&gt;
|-&lt;br /&gt;
| Create users externally&lt;br /&gt;
| New (anonymous) users can self-create user accounts on the external LDAP server and confirm them via email. If you enable this, remember to also configure module-specific options for user creation and to fill in some instructions in &#039;&#039;auth_instructions&#039;&#039; field in Administration &amp;gt;&amp;gt; Users &amp;gt;&amp;gt; Authentication &amp;gt;&amp;gt; Manage authentication. Otherwise the new users won&#039;t be able to self-create new accounts.&lt;br /&gt;
&lt;br /&gt;
As of now, only Novell eDirectory and MS-AD can create users externally.&lt;br /&gt;
|-&lt;br /&gt;
| Context for new users&lt;br /&gt;
| Specify the context where users are created. This context should be different from other users&#039; contexts to prevent security issues. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
====Course creation====&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
! Field name&lt;br /&gt;
! Value to fill in&lt;br /&gt;
|-&lt;br /&gt;
| Creators&lt;br /&gt;
| The DN of the group that contains all of your Moodle creators. This is typically a posixGroup with a &amp;quot;memberUid&amp;quot; attribute for each user you want to be a creator.  If your group is called &#039;&#039;creators&#039;&#039;, type &#039;&#039;&#039;cn=creators,ou=moodleusers,dc=my,dc=organization,dc=domain&#039;&#039;&#039; here.  Each memberUid attribute contains the CN of a user who is authorized to be a creator.  Do not use the user&#039;s full DN (e.g.,  not &#039;&#039;&#039;memberUid: cn=JoeTeacher,ou=moodleusers,dc-my,dc=organizations,dc=domain&#039;&#039;&#039;, but rather &#039;&#039;&#039;memberUid: JoeTeacher&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
In eDirectory, the objectClass for a group is (by default) not &#039;&#039;&#039;posixGroup&#039;&#039;&#039; but &#039;&#039;&#039;groupOfNames,&#039;&#039;&#039; whose member attribute is &#039;&#039;&#039;member,&#039;&#039;&#039; not &#039;&#039;&#039;memberUid,&#039;&#039;&#039; and whose value is the full DN of the user in question.  Although you can probably modify Moodle&#039;s code to use this field, a better solution is just to add a new &#039;&#039;&#039;objectClass&#039;&#039;&#039; attribute of &#039;&#039;&#039;posixGroup&#039;&#039;&#039; to your creators group and put the CNs for each creator in a &#039;&#039;&#039;memberUid&#039;&#039;&#039; attribute.&lt;br /&gt;
&lt;br /&gt;
In MS Active Directory, you will need to create a security group for your creators to be part of and then add them all. If your ldap context above is &#039;ou=staff,dc=my,dc=org&#039; then your group should then be &#039;cn=creators,ou=staff,dc=my,dc=org&#039;. If some of the users are from other contexts and have been added to the same security group, you&#039;ll have to add these as separate contexts after the first one using the same format.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
====Cron synchronization script====&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
! Field name&lt;br /&gt;
! Value to fill in&lt;br /&gt;
|-&lt;br /&gt;
| Removed ext user&lt;br /&gt;
| Specify what to do with internal user account during mass synchronization when user was removed from external source. Only suspended users are automatically revived if they reappear in ext source.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
====NTLM SSO====&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
! Field name&lt;br /&gt;
! Value to fill in&lt;br /&gt;
|-&lt;br /&gt;
| Enable&lt;br /&gt;
| If you want to use NTLM SSO (see details at [[NTLM_authentication]]), choose &#039;&#039;Yes&#039;&#039; here. Otherwise, choose &#039;&#039;No&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| Subnet&lt;br /&gt;
| Specify the subnets of the clients that will use NTLM SSO (see details at [[NTLM_authentication]]).&lt;br /&gt;
|-&lt;br /&gt;
| MS IE Fast Path?&lt;br /&gt;
| If all of you clients (or most of them) are using MS Internet Explorer, you can set this option to bypasses certain steps of the SSO login and speed up login times. This only works with MS Internet Explorer, but deals with other browsers in a sensible way (they are automatically sent to the plain login page).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
====Data Mapping====&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
! Field name&lt;br /&gt;
! Value to fill in&lt;br /&gt;
|-&lt;br /&gt;
| First name&lt;br /&gt;
| The name of the attribute that holds the first name of your users in your LDAP server. This is usually &#039;&#039;&#039;givenName&#039;&#039;&#039; or &#039;&#039;&#039;displayName&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Surname&lt;br /&gt;
| The name of the attribute that holds the surname of your users in your LDAP server. This is usually &#039;&#039;&#039;sn&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Email address&lt;br /&gt;
| The name of the attribute that holds the email address of your users in your LDAP server. This is usually &#039;&#039;&#039;mail&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| City/town&lt;br /&gt;
| The name of the attribute that holds the city/town of your users in your LDAP server. This is usully &#039;&#039;&#039;l&#039;&#039;&#039; (lowercase L) or &#039;&#039;&#039;localityName&#039;&#039;&#039; (not valid in MS-AD).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| Country&lt;br /&gt;
| The name of the attribute that holds the couuntry of your users in your LDAP server. This is usully &#039;&#039;&#039;c&#039;&#039;&#039; or &#039;&#039;&#039;countryName&#039;&#039;&#039; (not valid in MS-AD).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Language&lt;br /&gt;
| &#039;&#039;&#039;preferredLanguage&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Description&lt;br /&gt;
| &#039;&#039;&#039;description&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Webpage&lt;br /&gt;
| &amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ID Number&lt;br /&gt;
| &lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Institution&lt;br /&gt;
| &lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Department&lt;br /&gt;
| The name of the attribute that holds the department name of your users in your LDAP server. This is usully &#039;&#039;&#039;departmentNumber&#039;&#039;&#039; (for posixAccount and maybe eDirectory) or &#039;&#039;&#039;department&#039;&#039;&#039; (for MS-AD).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Phone 1&lt;br /&gt;
| The name of the attribute that holds the telephone number of your users in your LDAP server. This is usually &#039;&#039;&#039;telephoneNumber&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Phone 2&lt;br /&gt;
|  The name of the attribute that holds an additional telephone number of your users in your LDAP server. This can be &#039;&#039;&#039;homePhone&#039;&#039;&#039;, &#039;&#039;&#039;mobile&#039;&#039;&#039;, &#039;&#039;&#039;pager&#039;&#039;&#039;, &#039;&#039;&#039;facsimileTelephoneNumber&#039;&#039;&#039; or even others.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Address&lt;br /&gt;
| The name of the attribute that holds the street address of your users in your LDAP server. This is usully &#039;&#039;&#039;streetAddress&#039;&#039;&#039; or &#039;&#039;&#039;street&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
===Setting up regular automatic synchronisation using cron===&lt;br /&gt;
There is a script located at /auth/ldap/auth_ldap_sync_users.php which will create or suspend/delete (see the setting above) all LDAP accounts automatically. Ideally, this is called from the command line once a day during a quiet time using exactly the same procedure as the standard [[Cron|cron]] job (so you will end up with two cron entries). It is important, however, to make sure that all of the above LDAP settings are working properly before you try this, as well as backing up your database and moodledata folders. Poor LDAP configuration could lead to users being wrongly deleted.&lt;br /&gt;
&lt;br /&gt;
If you find that the script is not running through all of your users properly and you have MS Active Directory + over 1000 users, this is because by default, MS AD only sends back 1000 users at a time. Follow the instructions [http://support.microsoft.com/kb/315071 here] to set the MaxPageSize setting to a number higher than your total number of users (both now and in future) to fix it.&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
==Active Directory help==&lt;br /&gt;
[[Active Directory]] is Microsoft&#039;s directory service. It is included in Windows 2000 Server and later versions of their operating system. For more information about subjects below, &#039;&#039;&#039;[[Active Directory|please go here]]&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
*Warning: The PHP LDAP module does not seem to be present&lt;br /&gt;
*LDAP-module cannot connect any LDAP servers &lt;br /&gt;
*Getting correct CNs for Contexts and Creators&lt;br /&gt;
*Getting the right user_attribute&lt;br /&gt;
*Installing ldp.exe Server Tool&lt;br /&gt;
*Example Active Directory Configuration&lt;br /&gt;
*Child Domains and the Global Catalog in MS Active Directory&lt;br /&gt;
*Enabling the Global Catalog&lt;br /&gt;
*Active Directory with Moodle 1.8&lt;br /&gt;
*MS Active Directory + SSL&lt;br /&gt;
&lt;br /&gt;
==Advanced Scenarios - Multiple servers or locations==&lt;br /&gt;
For larger installations with  multiple LDAP servers, or multiple locations (contexts) in a LDAP tree.&lt;br /&gt;
&lt;br /&gt;
===Using multiple LDAP Servers===&lt;br /&gt;
Entering more than one name in the ldap_host_url field can provide some sort of resilience to your system. Simply use the syntax :&lt;br /&gt;
ldap://my.first.server ; ldap://my.second.server ; ...&lt;br /&gt;
&lt;br /&gt;
Of course, this will only work if all the servers share the same directory information, using a replication or synchronization mecanism once introduced in eDirectory and now generalized to the main LDAP-compatible directories.&lt;br /&gt;
&lt;br /&gt;
There is one drawback in Moodle 1.5 - 1.6 implementation of LDAP authentication : the auth_ldap_connect() function processes the servers sequentially, not in a round robin mode. Thus, if the primary server fails, you will have to wait for the connection to time out before switching to the following one.&lt;br /&gt;
&lt;br /&gt;
===Using multiple user locations (contexts) in your LDAP tree===&lt;br /&gt;
There is no need to use multiple user locations if your directory tree is flat, i.e. if all user accounts reside in a &#039;&#039;&#039;ou=people,dc=my,dc=organization,dc=domain&#039;&#039;&#039; or &#039;&#039;&#039;ou=people,o=myorg&#039;&#039;&#039; container. &lt;br /&gt;
&lt;br /&gt;
At the opposite, if you use the ACL mecanism to delegate user management, there are chances that your users will be stored in containers like &#039;&#039;&#039;ou=students,ou=dept1,o=myorg&#039;&#039;&#039; and &#039;&#039;&#039;ou=students,ou=dept2,o=myorg&#039;&#039;&#039; ...&lt;br /&gt;
&lt;br /&gt;
Then there is an alternative :&lt;br /&gt;
* Look at the &#039;&#039;&#039;o=myorg&#039;&#039;&#039; level with the ldap_search_sub attribute set to &#039;&#039;&#039;yes&#039;&#039;&#039;.&lt;br /&gt;
* Set the ldap_context to &#039;&#039;&#039;ou=students,ou=dept1,o=myorg ; ou=students,ou=dept2,o=myorg&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Choosing between these two solutions supposes some sort of benchmarking, as the result depends heavily on the structure of your directory tree &#039;&#039;&#039;and&#039;&#039;&#039; on your LDAP software indexing capabilities. Simply note that there is a probability in such deep trees that two users share the same &#039;&#039;common name&#039;&#039; (cn), while having different &#039;&#039;distinguished names&#039;&#039;. Then only the second solution will have a deterministic result (returning allways the same user).&lt;br /&gt;
&lt;br /&gt;
===Using LDAPS (LDAP + SSL)===&lt;br /&gt;
====Enabling LDAPS on the LDAP server side====&lt;br /&gt;
&lt;br /&gt;
* [[Active_Directory#MS_Active_Directory_.2B_SSL|Enabling LDAPS on MS Active Directory ]]&lt;br /&gt;
&lt;br /&gt;
====Enabling LDAPS on the client side (Moodle server)====&lt;br /&gt;
&lt;br /&gt;
* If you are running Moodle on MS Windows, you need to tell PHP&#039;s OpenLDAP extension to disable SSL server certificate checking. You must create a directory called &#039;&#039;C:\OpenLDAP\sysconf&#039;&#039;. In this directory, create a file called &#039;&#039;ldap.conf&#039;&#039; with the following content:&lt;br /&gt;
&lt;br /&gt;
 TLS_REQCERT never&lt;br /&gt;
&lt;br /&gt;
* If you are running Moodle on Linux or any other Unix-like operating system, and you want to disable SSL server certificate checking, you need to edit the OpenLDAP client configuration file (usually /etc/ldap.conf or /etc/ldap/ldap.conf or even /etc/openldap/ldap.conf) and make sure you have a line like the following one:&lt;br /&gt;
&lt;br /&gt;
 TLS_REQCERT never&lt;br /&gt;
&lt;br /&gt;
Now you should be able to use &#039;&#039;&#039;ldaps://&#039;&#039;&#039; when connecting to your LDAP server.&lt;br /&gt;
&lt;br /&gt;
If you have the certificate of the LDAPS server as a file and want to check the certificate for the connection, copy the certificate file to an arbitary directory (e.g. /etc/ldap/certificate.pem) on your client and change the content of the &#039;&#039;ldap.conf&#039;&#039; as follows:&lt;br /&gt;
&lt;br /&gt;
 TLS_REQCERT demand&lt;br /&gt;
 TLS_CACERT  /etc/ldap/certificate.pem&lt;br /&gt;
&lt;br /&gt;
When the requested server certificate is bad or not provided, the connection to the LDAPS server is immediately terminated.&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
==Appendices==&lt;br /&gt;
===ldap auth_user_create() only suports Novell===&lt;br /&gt;
&lt;br /&gt;
After configuring user authentication with ldap I realized ldap only support edir (Novell) when combining ldap an email user confirmation. For example in my case (I use openldap) I have the following error after filling the user form:&lt;br /&gt;
&lt;br /&gt;
auth: ldap auth_user_create() does not support selected usertype:&amp;quot;rfc2307&amp;quot; (..yet)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting Resource Limits RedHat Directory Server ===&lt;br /&gt;
&lt;br /&gt;
Operational attributes can be set for the bind user DN using the command-line. &lt;br /&gt;
One can simply use ldapmodify to add the following attributes:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
! Attribute Name &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| nsLookThroughLimit&lt;br /&gt;
| Specifies how many entries are examined for a search operation. Giving this attribute a value of -1 indicates that there is no limit.&lt;br /&gt;
|-&lt;br /&gt;
| nsSizeLimit &lt;br /&gt;
| Specifies the maximum number of entries the server returns to a client application in response to a search operation. Giving this attribute a value of -1 indicates that there is no limit.&lt;br /&gt;
|-&lt;br /&gt;
| nsTimeLimit &lt;br /&gt;
| Specifies the maximum time the server spends processing a search operation. Giving this attribute a value of -1 indicates that there is no time limit.&lt;br /&gt;
|-&lt;br /&gt;
| nsIdleTimeout 	        &lt;br /&gt;
| Specifies the time a connection to the server can be idle before the connection is dropped. The value is given in seconds. Giving this attribute a value of -1 indicates that there is no limit.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt; LDAP Console Command-Line&lt;br /&gt;
&lt;br /&gt;
 ldapmodify -h redhat_dir_server -p 389 -D &amp;quot;cn=directory manager&amp;quot; -w secretpwd&lt;br /&gt;
&lt;br /&gt;
 dn: uid=MoodleAdmin,ou=system,dc=myschool,dc=edu&lt;br /&gt;
 changetype: modify&lt;br /&gt;
 add:nsSizeLimit&lt;br /&gt;
 nsSizeLimit: 1000&lt;br /&gt;
 &amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [[NTLM_authentication]]&lt;br /&gt;
* [[Active_Directory]]&lt;br /&gt;
* [[LDAP enrolment]]&lt;br /&gt;
* [http://download.moodle.org/download.php/docs/en/how-to_guides/ldap_auth_and_enrolment_set-up.pdf LDAP auth and enrolment set-up guide] (PDF 227KB)&lt;br /&gt;
&lt;br /&gt;
Using Moodle:&lt;br /&gt;
*[http://moodle.org/mod/forum/view.php?id=42 User authentication forum]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=32168 PHP LDAP module does not seem to be present] forum discussion&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=140901 Syncronisation with AUTH_LDAP_SYNC_USERS.PHP produces fewer accounts than it should] forum discussion&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Authentication]]&lt;br /&gt;
&lt;br /&gt;
[[es:LDAP_authentication]]&lt;br /&gt;
[[fr:Utiliser un serveur LDAP]]&lt;br /&gt;
[[ja:LDAP認証]]&lt;br /&gt;
[[zh:LDAP认证]]&lt;br /&gt;
[[de:Authentifizierung über LDAP]]&lt;/div&gt;</summary>
		<author><name>Molmos</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/22/en/index.php?title=Conditional_activities&amp;diff=66508</id>
		<title>Conditional activities</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/22/en/index.php?title=Conditional_activities&amp;diff=66508"/>
		<updated>2009-12-14T23:32:53Z</updated>

		<summary type="html">&lt;p&gt;Molmos: /* Enabling the use of conditional activities */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Moodle 2.0}}&lt;br /&gt;
Conditional activities is a new standard feature in Moodle 2.0 onwards, which enables teachers to restrict the availability of any activity according to certain conditions such as dates, grade obtained, or activity completion.  Each activity can also have conditions which need to be met before it is considered complete. &lt;br /&gt;
&lt;br /&gt;
Please see the following demonstration videos:&lt;br /&gt;
*[http://cvs.moodle.org/contrib/docs/en/conditional_activities/conditional-students.swf?view=co Conditional activities student view video]&lt;br /&gt;
*[http://cvs.moodle.org/contrib/docs/en/conditional_activities/conditional-editing.swf?view=co Conditional activities editing view video]&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;TIP:&#039;&#039; Previous users of activity locking or conditional activities should note there are some new terms in 2.0.  The activity setting menu uses &amp;quot;Restrict availability&amp;quot;, which is more robust than the previous activity locking conditions. The activity setting menu also has a new functionality called &amp;quot;Activity completion&amp;quot;. Both these menu settings must be enabled by the administrator.&lt;br /&gt;
&lt;br /&gt;
==Enabling the use of conditional activities==&lt;br /&gt;
[[Image:Conditional activities settings.png|thumb|Teacher view of an activity setting for: Restrict availability and activity completion]]&lt;br /&gt;
To use conditional activities, the feature must be enabled by an administrator by checking the enable availability box in &#039;&#039;Administration &amp;gt; Advanced features&#039;&#039;. A Restrict availability section will appear for teachers on the edit activity page.&lt;br /&gt;
&lt;br /&gt;
The basic conditional setting is in the &#039;&#039;&#039;Restrict availability&#039;&#039;&#039; area of an activity setting.  It is asking for the conditions when the activity should be visible. This can be based upon dates, and/or score ranges of other activities and/or if other activities are considered completed (see completion tracking below).&lt;br /&gt;
&lt;br /&gt;
==Enabling the use of activity completion tracking==&lt;br /&gt;
&lt;br /&gt;
To use completion tracking, the feature must be enabled by an administrator by checking the enable completion box in &#039;&#039;Administration &amp;gt; Advanced features&#039;&#039;. An Activity completion section will appear for teachers on the edit activity page.&lt;br /&gt;
&lt;br /&gt;
Essentially this asks the teacher what is necessary for this activity to be considered complete. It is found in the activity setting&#039;s &amp;quot;&#039;&#039;&#039;Activity completion&#039;&#039;&#039;&amp;quot; This condition can then be checked in the restrict condition area in another activity setting (see restrict availability condition above).&lt;br /&gt;
&lt;br /&gt;
==Tricks and techniques==&lt;br /&gt;
&lt;br /&gt;
With a bit of lateral thinking, you can achieve some interesting results beyond the most obvious uses of the system.  Here are some examples.&lt;br /&gt;
&lt;br /&gt;
===Project allocation===&lt;br /&gt;
&lt;br /&gt;
Imagine that you let students choose one of two projects. Each project has its own activities (a forum for all the people doing that project, resources with information about the project, etc). You want it to hide all the activities that a student isn&#039;t doing.&lt;br /&gt;
&lt;br /&gt;
This can already be achieved in Moodle using the [[Groupings]] system. However, conditional activities gives another way to set this up which might be preferable in some cases. Here&#039;s how:&lt;br /&gt;
&lt;br /&gt;
# Create two forums called &#039;Frog project sign-up forum&#039; and &#039;Zombie project sign-up forum&#039;.&lt;br /&gt;
# Set both forums to be automatically marked complete once the user makes 1 post.&lt;br /&gt;
# Set each forum to be conditionally available only if the other forum is NOT complete.&lt;br /&gt;
# Create other activities for the frog and zombie projects. For each Frog activity, set it to be conditionally available only if the Frog sign-up forum is marked complete. For each Zombie activity, set it to be conditionally available only if the Zombie sign-up forum is marked complete.&lt;br /&gt;
&lt;br /&gt;
When a student first visits the site, they see the frog and zombie sign-up forums and none of the project activities. As soon as they post in one of the forums, the other forum will disappear, and all the activities for their preferred project will appear. (If they want to change their mind, they can delete their forum post so that it isn&#039;t marked complete any more, and it&#039;ll be back to square one.)&lt;br /&gt;
&lt;br /&gt;
==Discussion: Should you really use conditional activities?==&lt;br /&gt;
&lt;br /&gt;
Conditional activities are a way for you to force your students to do things in a certain order. Is that really what you want? The answer will depend on your particular circumstances, but it is worth taking a moment to reflect upon the degree to which conditional activities are appropriate for your course.&lt;br /&gt;
&lt;br /&gt;
===Cautions===&lt;br /&gt;
It is certainly good course design to make it clear to your students what they are expected to do next, to give good guidance. But do you need to use force? Might it not be better to leave students in control of their own learning and just use labels and layout, rather than locks and keys to suggest the best path?&lt;br /&gt;
&lt;br /&gt;
===New adaptive learning paths===&lt;br /&gt;
This may allow the teacher to separate students by a range of performance they have achieved. For example, after a quiz any one of three different lessons might appear to a student, depending upon their score.   The teacher can have one for low scores, one for high scores and one for average score ranges.  The teacher could have a short quiz like survey, with 7 questions asking the student to give their feelings on a 1 to 5 scale. A range of scores would reveal different activities.  Students who liked dark colors might get the black and gray activities revealed, those who liked light colors might get the white and gray activities.     &lt;br /&gt;
&lt;br /&gt;
On the other hand, you may have to design a certified training course that requires approval from unenlightened government regulators.  Conditional activities will assure them that the trainees have been exposed to everything in the course, in a fixed order, and that the trainees must meet certain quantifiable standards from time to time before being allowed to proceed in the course. Correct use and explanation of conditional activities may ensure validation of your course.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*[[Development:Conditional activities]]&lt;br /&gt;
*[[Development:Conditional activities Adding module support]]&lt;br /&gt;
*[[Conditional activities FAQ]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Conditional activities]]&lt;/div&gt;</summary>
		<author><name>Molmos</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/22/en/index.php?title=Conditional_activities&amp;diff=66507</id>
		<title>Conditional activities</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/22/en/index.php?title=Conditional_activities&amp;diff=66507"/>
		<updated>2009-12-14T23:29:40Z</updated>

		<summary type="html">&lt;p&gt;Molmos: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Moodle 2.0}}&lt;br /&gt;
Conditional activities is a new standard feature in Moodle 2.0 onwards, which enables teachers to restrict the availability of any activity according to certain conditions such as dates, grade obtained, or activity completion.  Each activity can also have conditions which need to be met before it is considered complete. &lt;br /&gt;
&lt;br /&gt;
Please see the following demonstration videos:&lt;br /&gt;
*[http://cvs.moodle.org/contrib/docs/en/conditional_activities/conditional-students.swf?view=co Conditional activities student view video]&lt;br /&gt;
*[http://cvs.moodle.org/contrib/docs/en/conditional_activities/conditional-editing.swf?view=co Conditional activities editing view video]&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;TIP:&#039;&#039; Previous users of activity locking or conditional activities should note there are some new terms in 2.0.  The activity setting menu uses &amp;quot;Restrict availability&amp;quot;, which is more robust than the previous activity locking conditions. The activity setting menu also has a new functionality called &amp;quot;Activity completion&amp;quot;. Both these menu settings must be enabled by the administrator.&lt;br /&gt;
&lt;br /&gt;
==Enabling the use of conditional activities==&lt;br /&gt;
[[Image:Conditional activities settings.png|thumb|Teacher view of an activity setting for: Restrict availability and activity completion]]&lt;br /&gt;
To use conditional activities, the feature must be enabled by an administrator by checking the enable availability box in &#039;&#039;Administration &amp;gt; Advanced features&#039;&#039;. A Restrict availability section will appear for teachers on the edit activity page.&lt;br /&gt;
&lt;br /&gt;
The basic conditional setting is in the &#039;&#039;&#039;Restrict availability&#039;&#039;&#039; area of an activity setting.  It is asking for the conditions when the activity should be visible. This can be based upon dates,and/or score ranges of other activities and/or if other activities are considered completed (see completion tracking below).&lt;br /&gt;
&lt;br /&gt;
==Enabling the use of activity completion tracking==&lt;br /&gt;
&lt;br /&gt;
To use completion tracking, the feature must be enabled by an administrator by checking the enable completion box in &#039;&#039;Administration &amp;gt; Advanced features&#039;&#039;. An Activity completion section will appear for teachers on the edit activity page.&lt;br /&gt;
&lt;br /&gt;
Essentially this asks the teacher what is necessary for this activity to be considered complete. It is found in the activity setting&#039;s &amp;quot;&#039;&#039;&#039;Activity completion&#039;&#039;&#039;&amp;quot; This condition can then be checked in the restrict condition area in another activity setting (see restrict availability condition above).&lt;br /&gt;
&lt;br /&gt;
==Tricks and techniques==&lt;br /&gt;
&lt;br /&gt;
With a bit of lateral thinking, you can achieve some interesting results beyond the most obvious uses of the system.  Here are some examples.&lt;br /&gt;
&lt;br /&gt;
===Project allocation===&lt;br /&gt;
&lt;br /&gt;
Imagine that you let students choose one of two projects. Each project has its own activities (a forum for all the people doing that project, resources with information about the project, etc). You want it to hide all the activities that a student isn&#039;t doing.&lt;br /&gt;
&lt;br /&gt;
This can already be achieved in Moodle using the [[Groupings]] system. However, conditional activities gives another way to set this up which might be preferable in some cases. Here&#039;s how:&lt;br /&gt;
&lt;br /&gt;
# Create two forums called &#039;Frog project sign-up forum&#039; and &#039;Zombie project sign-up forum&#039;.&lt;br /&gt;
# Set both forums to be automatically marked complete once the user makes 1 post.&lt;br /&gt;
# Set each forum to be conditionally available only if the other forum is NOT complete.&lt;br /&gt;
# Create other activities for the frog and zombie projects. For each Frog activity, set it to be conditionally available only if the Frog sign-up forum is marked complete. For each Zombie activity, set it to be conditionally available only if the Zombie sign-up forum is marked complete.&lt;br /&gt;
&lt;br /&gt;
When a student first visits the site, they see the frog and zombie sign-up forums and none of the project activities. As soon as they post in one of the forums, the other forum will disappear, and all the activities for their preferred project will appear. (If they want to change their mind, they can delete their forum post so that it isn&#039;t marked complete any more, and it&#039;ll be back to square one.)&lt;br /&gt;
&lt;br /&gt;
==Discussion: Should you really use conditional activities?==&lt;br /&gt;
&lt;br /&gt;
Conditional activities are a way for you to force your students to do things in a certain order. Is that really what you want? The answer will depend on your particular circumstances, but it is worth taking a moment to reflect upon the degree to which conditional activities are appropriate for your course.&lt;br /&gt;
&lt;br /&gt;
===Cautions===&lt;br /&gt;
It is certainly good course design to make it clear to your students what they are expected to do next, to give good guidance. But do you need to use force? Might it not be better to leave students in control of their own learning and just use labels and layout, rather than locks and keys to suggest the best path?&lt;br /&gt;
&lt;br /&gt;
===New adaptive learning paths===&lt;br /&gt;
This may allow the teacher to separate students by a range of performance they have achieved. For example, after a quiz any one of three different lessons might appear to a student, depending upon their score.   The teacher can have one for low scores, one for high scores and one for average score ranges.  The teacher could have a short quiz like survey, with 7 questions asking the student to give their feelings on a 1 to 5 scale. A range of scores would reveal different activities.  Students who liked dark colors might get the black and gray activities revealed, those who liked light colors might get the white and gray activities.     &lt;br /&gt;
&lt;br /&gt;
On the other hand, you may have to design a certified training course that requires approval from unenlightened government regulators.  Conditional activities will assure them that the trainees have been exposed to everything in the course, in a fixed order, and that the trainees must meet certain quantifiable standards from time to time before being allowed to proceed in the course. Correct use and explanation of conditional activities may ensure validation of your course.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*[[Development:Conditional activities]]&lt;br /&gt;
*[[Development:Conditional activities Adding module support]]&lt;br /&gt;
*[[Conditional activities FAQ]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Conditional activities]]&lt;/div&gt;</summary>
		<author><name>Molmos</name></author>
	</entry>
</feed>