<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.moodle.org/test/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mattgibson</id>
	<title>MoodleDocs - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://docs.moodle.org/test/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mattgibson"/>
	<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/Special:Contributions/Mattgibson"/>
	<updated>2026-10-01T18:31:16Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=LDAP_authentication&amp;diff=48149</id>
		<title>LDAP authentication</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=LDAP_authentication&amp;diff=48149"/>
		<updated>2008-12-13T19:25:02Z</updated>

		<summary type="html">&lt;p&gt;Mattgibson: Added cron syncronisation instructions&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;
&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;
===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;
&amp;lt;br&amp;gt;&lt;br /&gt;
::: [[Image:auth_ldap_config_screenshot.jpg]]&lt;br /&gt;
&amp;lt;br&amp;gt;&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;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&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;
====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;
| Distinguisned 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;
====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 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, 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;
====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 true at least for MS-AD).&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 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;
====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;
====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;
====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;
====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;
&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;.&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;
===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;
==Active Directory Troubleshooting Help==&lt;br /&gt;
&lt;br /&gt;
===Warning: The PHP LDAP module does not seem to be present. Please ensure it is installed and enabled.===&lt;br /&gt;
This usually means that the main ldap dll or one of the supporting dlls are missing.&lt;br /&gt;
Let&#039;s start with the main one itself. &lt;br /&gt;
Browse to http://(moodleserver)/admin/phpinfo.php and examine the &amp;quot;Configuration File (php.ini) Path&amp;quot; field to determine which php.ini is being used and open it with an editor. Find the line &#039;extension=php_ldap.dll&#039; and take out the semi-colon if it is there. That semi-colon will stop it loading the module all together! &lt;br /&gt;
While you have that file open, search for &#039;extension_dir&#039; and note which folder it is set to. Open that folder and ensure the php_ldap.dll file is in there. If it isn&#039;t then put it in there.&lt;br /&gt;
If that still hasn&#039;t fixed it you are missing a supporting dll, but you don&#039;t get told that. To see what dlls are missing open the Command Prompt and navigate to the php directory and execute the following line &#039;php -m&#039;. You should get some error messages now. Ugly, but at least they give you information! Find the dlls listed and copy them to the php directory. You may now need to restart the apache/httpd service. Run &#039;php -m&#039; again and you should be error free and the message in Moodle should be gone now.&lt;br /&gt;
&lt;br /&gt;
===LDAP-module cannot connect any LDAP servers : Server: &#039;ldap://my.ldap.server/&#039; Connection: &#039;Resource id #26&#039; Bind result: &#039;&#039;===&lt;br /&gt;
Getting this message when you are trying to log in is a result of incorrect details for the Bind user, or the user account having insufficient permissions in Active Directory. The best way to test and resolve this is use ldp.exe to test binding until it suceeds. There are instructions on installing ldp.exe below.&lt;br /&gt;
Open the program and Connect to AD, giving the server name, then from the Connection menu choose Bind. Enter the details you think are correct and you will probably find that an error is returned. Try adjusting the accounts priveleges or another account until you are returned an &amp;quot;Authenticated as&amp;quot; message.&lt;br /&gt;
Once you are sure your account can be used to bind to AD, check that the DN of that users name is correct. Expand the tree on the left until you find the user you used to bind. Right click on that item and choose Copy DN. Go to the User Authentication page in Moodle and paste the value into the ldap_bind_dn field. Add the password and you can now feel safe your user is binding sucessfully.&lt;br /&gt;
&lt;br /&gt;
===Getting correct CNs for Contexts and Creators===&lt;br /&gt;
For those not familiar with AD this could be very confusing, and not that easy for some who are familiar with it. Again, ldp.exe is your friend. There are instructions on installing ldp.exe below.&lt;br /&gt;
Open it up and expand the tree on the left until you find the group or user you want to use and right click on it and select Copy DN. Go back to the Moodle User Authentication page and paste that value into either ldap_contexts or ldap_creators.&lt;br /&gt;
&lt;br /&gt;
===Getting the right user_attribute===&lt;br /&gt;
By default, Moodle uses an accounts cn (full name) to verify against, but most networks don&#039;t use a full given name for logon as it&#039;s too easy to guess and you can easily have two people with the same name. If this is the case for you too you need to tell Moodle to look at another field for the logon id.&lt;br /&gt;
In ldp.exe navigate the tree on the left to find a user account, preferably your own. Double-click the item in the tree and full-details will be loaded into the screen on the right. Look down the details until you find your logon id and note the item listed against it. For me, and a lot of people, it is sAMAccountName. Copy this name and paste it into the ldap_user_attribute on the Moodle User Authentication page.&lt;br /&gt;
There are instructions on installing ldp.exe below.&lt;br /&gt;
&lt;br /&gt;
===Installing ldp.exe Server Tool===&lt;br /&gt;
ldp.exe comes as part of the Server Tools on most versions of Windows Server. Find your Windows Server installation disc and find a folder on it called Support\Tools. In there will be a SupTools.msi which will install the server tools if run. You should now have a folder under Program Files called Support Tools, in which will be ldp.exe. ldp.exe is also available in the Windows XP Support Tools, which you can download from Microsoft [http://www.microsoft.com/downloads/details.aspx?FamilyId=49AE8576-9BB9-4126-9761-BA8011FABF38&amp;amp;displaylang=en here]. Alternatively, a single download of ldp.exe is available [http://www.computerperformance.co.uk/w2k3/utilities/ldp.htm here].&lt;br /&gt;
&lt;br /&gt;
===Example Active Directory Configuration===&lt;br /&gt;
Below is an example configuration for Active Directory. As detailed above, the values may vary based on your local Active Directory configuration, but should provide a good starting point for most cases.&lt;br /&gt;
&lt;br /&gt;
 ldap_host_url = ldap://ads.example.com&lt;br /&gt;
 ldap_version = 3&lt;br /&gt;
 ldap_preventpassindb = yes&lt;br /&gt;
 ldap_bind_dn = bind-user@example.com&lt;br /&gt;
 ldap_bind_pw = bind-password&lt;br /&gt;
 ldap_user_type = MS ActiveDirectory&lt;br /&gt;
 ldap_contexts = ou=moodleusers,dc=example,dc=com&lt;br /&gt;
 ldap_user_attribute = sAMAccountName&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that the ldap_bind_dn value should work in either the CN=bin-user,CN=Users,DC=example,DC=com format as shown in the main instructions or the bind-user@example.com format shown in this example.&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;
====MS Active Directory + SSL ====&lt;br /&gt;
&lt;br /&gt;
If the Certificate Authority is not installed you&#039;ll have to install it first as follows:&lt;br /&gt;
# Click &#039;&#039;&#039;Start&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;Control Panel&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;Add or Remove programs.&#039;&#039;&#039;&lt;br /&gt;
# Click &#039;&#039;&#039;Add/Remove Windows Components&#039;&#039;&#039; and select &#039;&#039;&#039;Certificate Services.&#039;&#039;&#039;&lt;br /&gt;
# Follow the procedure provided to install the &#039;&#039;&#039;Certificate Authority&#039;&#039;&#039;. Enterprise level is a good choice.&lt;br /&gt;
&lt;br /&gt;
Verify that SSL has been enabled on the server by installing suptools.msi from Windows installation cd&#039;s \Support\tools directory. After support tools installation:&lt;br /&gt;
# Select &#039;&#039;&#039;Start&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;Run&#039;&#039;&#039;, write &#039;&#039;&#039;ldp&#039;&#039;&#039; in the Open field.&lt;br /&gt;
# From the ldp window select &#039;&#039;&#039;Connection&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;Connect&#039;&#039;&#039; and supply valid hostname and port number &#039;&#039;&#039;636&#039;&#039;&#039;. Also select the SSL check box.&lt;br /&gt;
&lt;br /&gt;
If successful, you should get information about the connection.&lt;br /&gt;
&lt;br /&gt;
Next step is to tell PHP&#039;s OpenLDAP extension to disable SSL certificate checking. On Windows servers you&#039;re most likely using pre-compiled PHP version, where you must create a path &#039;&#039;C:\OpenLDAP\sysconf&#039;&#039;. In this path create a file called &amp;quot;ldap.conf&amp;quot; with content:&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 MS-AD.&lt;br /&gt;
&lt;br /&gt;
==Appendices==&lt;br /&gt;
&lt;br /&gt;
===Child Domains and the Global Catalog in MS Active Directory===&lt;br /&gt;
&lt;br /&gt;
Moodle currently only has limited support for multiple domain controllers; specifically it expects each of the LDAP servers listed to contain identical sets of information. If you have users in multiple domains this presents an issue. One solution when working with MS-AD is to use the Global Catalog. The Global Catalog is designed to be a read-only, partial representation of an entire MS-AD forest, designed for searching the entire directory when the domain of the required object is not known.&lt;br /&gt;
&lt;br /&gt;
For example your organisation has a main domain example.org, staff and students are contained in two child domains staff.example.org and students.example.org. The 3 domains (example.org, staff.example.org and students.example.org) each have a domain controller (dc01, dc02 and dc03 respectively.) Each domain controller contains a full, writable, representation of only the objects that belong to its domain. However, assuming that the Global Catalog has been enabled (see below) on one of the domain controllers (for example dc01) a query to the Global Catalog would reveal matching objects from all three domains. The Global Catalog is automatically maintained through replication across the active directory forest, it can also be enabled on multiple servers (if, for example, you need redundancy / load balancing.)&lt;br /&gt;
&lt;br /&gt;
To make use of this in Moodle to allow logins from multiple domains is simple. The Global Catalog runs on port 3268 as opposed to 389 for standard LDAP queries. As a result, still assuming the Global Catalog is running on dc01, the &#039;&#039;&#039;&#039;ldap_host_url&#039;&#039;&#039;&#039; would be &#039;&#039;ldap://dc01.example.org:3268&#039;&#039;. The rest of the settings are the same as for other MS-AS Auth setups.&lt;br /&gt;
&lt;br /&gt;
You should use the &#039;&#039;&#039;&#039;ldap_contexts&#039;&#039;&#039;&#039; setting to indicate the locations of individuals you wish to grant access. To extend the example above a little: In the example.org domain users are all in the&#039;&#039; &#039;Users&#039; &#039;&#039;OU, in the staff.example.org domain users are in two OUs at the root of the domain,&#039;&#039; &#039;Support Staff&#039; &#039;&#039;and&#039;&#039; &#039;Teaching Staff&#039; &#039;&#039;, and in the students.example.org domain students are in an OU indicating the year that they enrolled, all of which are under the&#039;&#039; &#039;Students&#039; &#039;&#039;OU. As a result our &#039;&#039;&#039;&#039;ldap_contexts&#039;&#039;&#039;&#039; setting may look a little like this:&#039;&#039; &#039;OU=Users,DC=example,DC=org; OU=Support Staff,DC=staff,DC=example,DC=org; OU=Teaching Staff,DC=staff,DC=example,DC=org; OU=Students,DC=students,DC=example,DC=org&#039;&#039;.&#039; The &#039;&#039;&#039;&#039;ldap_search_sub&#039;&#039;&#039;&#039; option should be set to&#039;&#039; &#039;Yes&#039; &#039;&#039;to allow moodle to search within the child OUs.&lt;br /&gt;
&lt;br /&gt;
Its worth noting that the Global Catalog only contains a partial representation of the attributes of each object, as defined in the Partial Attribute Set supplied by Microsoft. However common information likely to be of use to a general Moodle installation (Forename, Surname, Email Address, sAMAccountName etc) is included in the set. For specific needs the schema can be altered to remove or add various attributes.&lt;br /&gt;
&lt;br /&gt;
In most cases the Global Catalog is read-only, update queries must be made over the standard LDAP ports to the domain controller that holds the object in question (in our example, updating a student&#039;s details would require an LDAP query to the students.example.org domain controller - dc03, it would not be possible to update details by querying the Global Catalog.) The exception to this would be in an environment where there is only a single domain in the active directory forest; in this case the Global Catalog holds a writable full set of attributes for each object in the domain. However, for the purposes of Moodle authorisation, there would be no need to use the Global Catalog in this case.&lt;br /&gt;
&lt;br /&gt;
===Enabling the Global Catalog===&lt;br /&gt;
&lt;br /&gt;
The Global Catalog is available on Windows 2000 and Windows 2003 Active Directory servers. To enable, open the ‘Active Directory Sites and Services’ MMC (Microsoft Management Console) snap-in. Extend ‘Sites’ and then the name of the Site containing the active directory forest you wish to use. Expand the server you wish to enable the Global Catalog on, right click ‘NTDS settings’ and select the ‘Properties’ tab. To enable, simply click the ‘Global Catalog’ checkbox. Under a Windows 2000 server it is necessary to restart the server (although it won’t prompt you to); under Windows 2003 server it is not necessary to restart the server. In either case you will generally have to wait for the AD forest to replicate before the Global Catalog offers a representation of the entire AD forest. Changes made in Active Directory will also be subject to a short delay due to the latency involved with replication. If your AD servers are firewalled port 3268 will need to be opened for Global Catalog servers.&lt;br /&gt;
If your organisation uses Microsoft Exchange then it its highly likely that at least one Domain Controller will already have Global Catalog enabled – Exchange 2000 and 2003 rely on the Global Catalog for address information, users also access the Global Catalog when using the GAL (Global Address List)&lt;br /&gt;
&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;
{{Moodle 1.9}}&lt;br /&gt;
The previous comment only applies to Moodle 1.8 and below. Moodle 1.9 adds support for MS Active Directory too.&lt;br /&gt;
&lt;br /&gt;
=== Active Directory with Moodle 1.8===&lt;br /&gt;
&lt;br /&gt;
There is an issue with the PHP ldap options that are required for Active Directory access in version 1.8 of Moodle. &lt;br /&gt;
&lt;br /&gt;
Using moodle on a LAMP platform with authentication to Active Directory may give some errors. &lt;br /&gt;
&lt;br /&gt;
Check this bug [http://tracker.moodle.org/browse/MDL-10921 MDL-10921] or this post http://moodle.org/mod/forum/discuss.php?d=78316 for further information.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*[http://moodle.org/mod/forum/view.php?id=42 Using Moodle: User authentication] forum&lt;br /&gt;
*Using Moodle [http://moodle.org/mod/forum/discuss.php?d=32168 PHP LDAP module does not seem to be present] forum discussion&lt;br /&gt;
* [[NTLM_authentication]]&lt;br /&gt;
* [[LDAP enrolment]]&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;/div&gt;</summary>
		<author><name>Mattgibson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=2.1:Ajax_marking_block&amp;diff=49066</id>
		<title>2.1:Ajax marking block</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=2.1:Ajax_marking_block&amp;diff=49066"/>
		<updated>2008-12-09T21:02:55Z</updated>

		<summary type="html">&lt;p&gt;Mattgibson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The AJAX marking block allows you to view and complete all of your marking without leaving the page you are on. It displays all the ungraded work you need to mark in a tree structure of all of the courses you teach in, along with a count of how many items there are for each course &amp;amp; assessment item. &lt;br /&gt;
[[Image:Ajax_marking.png|right]]&lt;br /&gt;
====Keep track of what you have graded so far====&lt;br /&gt;
When the tree nodes are expanded and a student&#039;s name is clicked, a pop-up opens with the work to be graded. Once &#039;Submit&#039; has been clicked in that window, the pop-up closes and tree updates itself by removing the student&#039;s node and altering its total count.&lt;br /&gt;
&lt;br /&gt;
====Instantly update without leaving the page====&lt;br /&gt;
The [[AJAX]] bit means that every time you click on the nodes to expand them, the data for the child nodes is fetched in the background without refreshing the whole page. This saves on loading the whole lot at the start, which could be time consuming. Clicking &#039;Collapse and refresh&#039; will re-load the whole tree, with an updated count of your marking including anything that was submitted a second or two ago, and excluding any that were marked by someone else and now don&#039;t need your attention.  &lt;br /&gt;
&lt;br /&gt;
====Only show grading for your own teaching groups====&lt;br /&gt;
Some sites run training courses that don&#039;t need grading, or a single course with many teachers and teaching groups following the same programme of study. You can easily choose to hide the work that is not your using the &#039;&#039;&#039;configure&#039;&#039;&#039; link, which will open a pop up allowing you to show or hide each item individually, or choose to show only the work of some groups, so you only ever see the work that you actually need to mark.&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
Download the zip file [http://download.moodle.org/download.php/plugins/blocks/ajax_marking.zip here]. Copy it to your /blocks/ folder and unzip it there. Then, go to the notifications screen (Front page -&amp;gt; administration block -&amp;gt; notifications) where you should see a message about the tables having been set up correctly.&lt;br /&gt;
&lt;br /&gt;
===Configuring the display of each individual assessment item===&lt;br /&gt;
The block can be set to show or hide each individual assessment item, or show only the assessments by students in certain groups. Clicking on &#039;&#039;&#039;configure&#039;&#039;&#039; will bring up an additional tree, which shows all of your courses and names of all the assessment items. When you click on one of the assessments, you will be faced with a number of options on the right:&lt;br /&gt;
* Show - the default state, where you will see all students&#039; work&lt;br /&gt;
* Show by group - a set of checkboxes will appear with the names of the current groups for that course. You choose which you want to see and group nodes will then be shown between the assessment and student nodes in the main block. The nodes for that assessment will then look like this:  &#039;&#039;&#039;Course -&amp;gt; Assessment -&amp;gt; Group -&amp;gt; Submission&#039;&#039;&#039;&lt;br /&gt;
* Hide - do not display any submissions for this assessment item.&lt;br /&gt;
&lt;br /&gt;
The counting of unmarked submissions respects these choices and they are specific to the user who created them. If you are an admin and wish to set the preferences for others, use the &#039;login as&#039; function to do so.&lt;br /&gt;
&lt;br /&gt;
==Supported types==&lt;br /&gt;
* Assignment&lt;br /&gt;
* Forum (only if ratings are on)&lt;br /&gt;
* Workshop&lt;br /&gt;
* Journal&lt;br /&gt;
* Quiz (essay questions only)&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributed code]]&lt;br /&gt;
[[Category:Teacher]]&lt;br /&gt;
[[Category:Administrator]]&lt;/div&gt;</summary>
		<author><name>Mattgibson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Ajax_marking_block&amp;diff=47917</id>
		<title>Ajax marking block</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Ajax_marking_block&amp;diff=47917"/>
		<updated>2008-12-09T21:02:55Z</updated>

		<summary type="html">&lt;p&gt;Mattgibson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The AJAX marking block allows you to view and complete all of your marking without leaving the page you are on. It displays all the ungraded work you need to mark in a tree structure of all of the courses you teach in, along with a count of how many items there are for each course &amp;amp; assessment item. &lt;br /&gt;
[[Image:Ajax_marking.png|right]]&lt;br /&gt;
====Keep track of what you have graded so far====&lt;br /&gt;
When the tree nodes are expanded and a student&#039;s name is clicked, a pop-up opens with the work to be graded. Once &#039;Submit&#039; has been clicked in that window, the pop-up closes and tree updates itself by removing the student&#039;s node and altering its total count.&lt;br /&gt;
&lt;br /&gt;
====Instantly update without leaving the page====&lt;br /&gt;
The [[AJAX]] bit means that every time you click on the nodes to expand them, the data for the child nodes is fetched in the background without refreshing the whole page. This saves on loading the whole lot at the start, which could be time consuming. Clicking &#039;Collapse and refresh&#039; will re-load the whole tree, with an updated count of your marking including anything that was submitted a second or two ago, and excluding any that were marked by someone else and now don&#039;t need your attention.  &lt;br /&gt;
&lt;br /&gt;
====Only show grading for your own teaching groups====&lt;br /&gt;
Some sites run training courses that don&#039;t need grading, or a single course with many teachers and teaching groups following the same programme of study. You can easily choose to hide the work that is not your using the &#039;&#039;&#039;configure&#039;&#039;&#039; link, which will open a pop up allowing you to show or hide each item individually, or choose to show only the work of some groups, so you only ever see the work that you actually need to mark.&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
Download the zip file [http://download.moodle.org/download.php/plugins/blocks/ajax_marking.zip here]. Copy it to your /blocks/ folder and unzip it there. Then, go to the notifications screen (Front page -&amp;gt; administration block -&amp;gt; notifications) where you should see a message about the tables having been set up correctly.&lt;br /&gt;
&lt;br /&gt;
===Configuring the display of each individual assessment item===&lt;br /&gt;
The block can be set to show or hide each individual assessment item, or show only the assessments by students in certain groups. Clicking on &#039;&#039;&#039;configure&#039;&#039;&#039; will bring up an additional tree, which shows all of your courses and names of all the assessment items. When you click on one of the assessments, you will be faced with a number of options on the right:&lt;br /&gt;
* Show - the default state, where you will see all students&#039; work&lt;br /&gt;
* Show by group - a set of checkboxes will appear with the names of the current groups for that course. You choose which you want to see and group nodes will then be shown between the assessment and student nodes in the main block. The nodes for that assessment will then look like this:  &#039;&#039;&#039;Course -&amp;gt; Assessment -&amp;gt; Group -&amp;gt; Submission&#039;&#039;&#039;&lt;br /&gt;
* Hide - do not display any submissions for this assessment item.&lt;br /&gt;
&lt;br /&gt;
The counting of unmarked submissions respects these choices and they are specific to the user who created them. If you are an admin and wish to set the preferences for others, use the &#039;login as&#039; function to do so.&lt;br /&gt;
&lt;br /&gt;
==Supported types==&lt;br /&gt;
* Assignment&lt;br /&gt;
* Forum (only if ratings are on)&lt;br /&gt;
* Workshop&lt;br /&gt;
* Journal&lt;br /&gt;
* Quiz (essay questions only)&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributed code]]&lt;br /&gt;
[[Category:Teacher]]&lt;br /&gt;
[[Category:Administrator]]&lt;/div&gt;</summary>
		<author><name>Mattgibson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Ajax_marking_block&amp;diff=47916</id>
		<title>Ajax marking block</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Ajax_marking_block&amp;diff=47916"/>
		<updated>2008-12-09T21:01:50Z</updated>

		<summary type="html">&lt;p&gt;Mattgibson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The AJAX marking block allows you to view and complete all of your marking without leaving the page you are on. It displays all the ungraded work you need to mark in a tree structure of all of the courses you teach in, along with a count of how many items there are for each course &amp;amp; assessment item. &lt;br /&gt;
[[Image:Ajax_marking.png|right]]&lt;br /&gt;
====Keep track of what you have graded so far====&lt;br /&gt;
When the tree nodes are expanded and a student&#039;s name is clicked, a pop-up opens with the work to be graded. Once &#039;Submit&#039; has been clicked in that window, the pop-up closes and tree updates itself by removing the student&#039;s node and altering its total count.&lt;br /&gt;
&lt;br /&gt;
====Instantly update without leaving the page====&lt;br /&gt;
The [[AJAX]] bit means that every time you click on the nodes to expand them, the data for the child nodes is fetched in the background without refreshing the whole page. This saves on loading the whole lot at the start, which could be time consuming. Clicking &#039;Collapse and refresh&#039; will re-load the whole tree, with an updated count of your marking including anything that was submitted a second or two ago, and excluding any that were marked by someone else and now don&#039;t need your attention.  &lt;br /&gt;
&lt;br /&gt;
====Only show grading for your own teaching groups====&lt;br /&gt;
Some sites run training courses that don&#039;t need grading, or a single course with many teachers and teaching groups following the same programme of study. You can easily choose to hide the work that is not your using the &#039;&#039;&#039;configure&#039;&#039;&#039; link, which will open a pop up allowing you to show or hide each item individually, or choose to show only the work of some groups, so you only ever see the work that you actually need to mark.&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
Download the zip file [http://download.moodle.org/download.php/plugins/blocks/ajax_marking.zip here]. Copy it to your /blocks/ folder and unzip it there. Then, go to the notifications screen (Front page -&amp;gt; administration block -&amp;gt; notifications) where you should see a message about the tables having been set up correctly.&lt;br /&gt;
&lt;br /&gt;
===Configuring the display of each individual assessment item===&lt;br /&gt;
The block can be set to show or hide each individual assessment item, or show only the assessments by students in certain groups. Clicking on &#039;&#039;&#039;configure&#039;&#039;&#039; will bring up an additional tree, which shows all of your courses and names of all the assessment items. When you click on one of the assessments, you will be faced with a number of options on the right:&lt;br /&gt;
* Show - the default state, where you will see all students&#039; work&lt;br /&gt;
* Show by group - a set of checkboxes will appear with the names of the current groups for that course. You choose which you want to see and group nodes will then be shown between the assessment and student nodes in the main block. The nodes for that assessment will then look like this:  &#039;&#039;&#039;Course -&amp;gt; Assessment -&amp;gt; Group -&amp;gt; Submission&#039;&#039;&#039;&lt;br /&gt;
* Hide - do not display any submissions for this assessment item.&lt;br /&gt;
&lt;br /&gt;
The counting of unmarked submissions respects these choices and they are specific to the user who created them. If you are an admin and wish to set the preferences for others, use the &#039;login as&#039; function to do so.&lt;br /&gt;
&lt;br /&gt;
==Supported types==&lt;br /&gt;
* Assignment&lt;br /&gt;
* Forum (only if ratings are on)&lt;br /&gt;
* Workshop&lt;br /&gt;
* Journal&lt;br /&gt;
* Quiz (essay questions only)&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributed code]]&lt;/div&gt;</summary>
		<author><name>Mattgibson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Accessibility&amp;diff=46696</id>
		<title>Accessibility</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Accessibility&amp;diff=46696"/>
		<updated>2008-11-13T12:36:06Z</updated>

		<summary type="html">&lt;p&gt;Mattgibson: /* See also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Websites built with &#039;&#039;&#039;accessibility&#039;&#039;&#039; in mind are flexible in meeting different user needs, preferences and situations. Though these methods can increase [[usability]] for everyone who uses the web they are often legally required to be implemented in a specific effort to prevent discrimination against people with disabilities.&lt;br /&gt;
&lt;br /&gt;
See the tracker under [http://tracker.moodle.org/browse/MDL-7396 Accessibility Compliance in Moodle 1.8] and [http://tracker.moodle.org/browse/MDL-7860 Compliance with Italian Legislation on Accessibility] for more information on what we are doing for Moodle 1.8.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Starting points ==&lt;br /&gt;
&lt;br /&gt;
These are some readable introductions to accessibility that cover; what accessibility is, why it is important, as well as practical advice.&lt;br /&gt;
* [http://www.w3.org/WAI/intro/accessibility.php Web Accessibility Initiative&#039;s &#039;&#039;Introduction to Web Accessibility&#039;&#039;]&lt;br /&gt;
* [http://diveintoaccessibility.org/ Mark Pilgrim&#039;s &#039;&#039;Dive into Accessibility&#039;&#039;]&lt;br /&gt;
* [http://joeclark.org/book/ Joe Clark&#039;s &#039;&#039;Building Accessible Websites&#039;&#039; book]&lt;br /&gt;
&lt;br /&gt;
== Standards, guidelines and legislation ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.parliament.the-stationery-office.co.uk/pa/ld200001/ldbills/003/2001003.htm SENDA - Special Educational Needs and Disability Act/Bill]&lt;br /&gt;
* [http://www.opsi.gov.uk/acts/acts1995/1995050.htm Disability Discrimination Act 1995] &lt;br /&gt;
* [http://www.section508.gov/ Section 508]&lt;br /&gt;
* [http://www.w3.org/WAI/ Web Accessibility Initiative]&lt;br /&gt;
** [http://www.w3.org/WAI/intro/wcag.php Web Content Accessibility Guidelines (WCAG)]&lt;br /&gt;
** [http://www.w3.org/WAI/intro/wcag20 Web Content Accessibility Guidelines 2.0 (draft)]&lt;br /&gt;
*** [http://www.alistapart.com/articles/tohellwithwcag2 an article on the problems with WCAG2]&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
* [[Web developer extension]] for [[Firefox]]&lt;br /&gt;
* [[Accessibility extension]] for Firefox&lt;br /&gt;
* [[W3C validation]] (for [[HTML in Moodle]], [[CSS]] and [[RSS]]) &lt;br /&gt;
* [http://cynthiasays.com/ Cynthia Says accessibility checker]&lt;br /&gt;
&lt;br /&gt;
see also this [http://www.w3.org/WAI/ER/tools/complete long list of accessibility tools].&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
&lt;br /&gt;
* [http://webstandards.org/action/atf/manifesto/ Web Standards.org&#039;s &#039;&#039;Accessibility Task Force Manifesto&#039;&#039;]&lt;br /&gt;
* [http://alistapart.com/topics/userscience/accessibility/ Accessibility articles from &#039;&#039;A List Apart&#039;&#039;]&lt;br /&gt;
* [http://diveintomark.org/archives/2003/08/29/semantics Mark Pilgrim&#039;s &#039;&#039;Won’t somebody please think of the gerbils?&#039;&#039;]&lt;br /&gt;
* [http://joeclark.org/access/webaccess/ Joe Clark&#039;s writings on accessibility]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Web_accessibility Wikipedia article on &#039;&#039;Web Accessibility&#039;&#039;]&lt;br /&gt;
* [http://juicystudio.com/article/validity-accessibility.php &#039;&#039;Validity and Accessibility&#039;&#039;]&lt;br /&gt;
* [http://www.edtec.unsw.edu.au/inter/support/accessibility/access_vids.cfm Videos showing as student accessing another Learning Management System via Screen Reader software]&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Moodle Accessibility Specification]]&lt;br /&gt;
* [[Semantic HTML]]&lt;br /&gt;
* [http://moodle.org/mod/forum/view.php?f=820 Accessibility forum on Moodle.org]&lt;br /&gt;
* Using Moodle [http://moodle.org/mod/forum/discuss.php?d=85119 New Accessibility Themes] forum discussion &lt;br /&gt;
* [http://www.easy.pro.br/ EASY: Interface Between The Virtual Environment Moodle Learning and People with Visual Impairments]&lt;br /&gt;
* [http://www.bbc.co.uk/blogs/bbcinternet/2008/03/homepage_accessibilty.html BBC blog post on how their Web 2.0 homepage was made accessible]&lt;br /&gt;
&lt;br /&gt;
[[Category:Accessibility]]&lt;/div&gt;</summary>
		<author><name>Mattgibson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=About_Moodle&amp;diff=46092</id>
		<title>About Moodle</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=About_Moodle&amp;diff=46092"/>
		<updated>2008-11-03T15:37:09Z</updated>

		<summary type="html">&lt;p&gt;Mattgibson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{About Moodle}}&lt;br /&gt;
&#039;&#039;&#039;[[Moodle]]&#039;&#039;&#039; is a [http://download.moodle.org/ software package] for producing internet-based courses and web sites. It is a world-wide, ongoing development project designed to support a [[Philosophy|social constructionist]] framework of education.&lt;br /&gt;
&lt;br /&gt;
Moodle is provided freely as [http://opensource.org/docs/osd Open Source] software (under the [http://www.gnu.org/copyleft/gpl.html GNU Public License]). Basically this means Moodle is copyrighted, but that you have additional freedoms. You are allowed to copy, use and modify Moodle provided that you agree to: &#039;&#039;&#039;provide the source to others; not modify or remove the original license and copyrights&#039;&#039;&#039;, and &#039;&#039;&#039;apply this same license to any derivative work&#039;&#039;&#039;. Read the [[License|license]] for full details and please contact the [http://moodle.org/user/view.php?id=1&amp;amp;course=1 copyright holder] directly if you have any questions.&lt;br /&gt;
&lt;br /&gt;
Moodle can be [[Installing Moodle|installed]] on any computer that can run [http://www.php.net/ PHP], and can support an SQL type database (for example [http://www.mysql.com/ MySQL]). It can be run on [[Complete_install_packages|Windows and  Mac]] operating systems and many flavors of linux (for example [[RedHat Linux installation| Red Hat]] or [[Debian GNU/Linux installation|Debian GNU]]). There are many knowledgable [http://moodle.com/partners/ Moodle Partners] to assist you, even [http://moodle.com/hosting/ host your Moodle site].&lt;br /&gt;
&lt;br /&gt;
The word Moodle was originally an acronym for Modular Object-Oriented Dynamic Learning Environment, which is mostly useful to programmers and education theorists.  It&#039;s also a verb that describes the process of lazily meandering through something, doing things as it occurs to you to do them, an enjoyable tinkering that often leads to insight and creativity. As such it applies both to the way Moodle was developed, and to the way a student or teacher might approach studying or teaching an online course. Anyone who uses Moodle is a Moodler.&lt;br /&gt;
&lt;br /&gt;
Come [http://moodle.org/community/ moodle with us]!&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[Teacher documentation |What does a teacher need to know?]] A good starting place to learn about the robust features in a Moodle course.&lt;br /&gt;
*[http://moodle.org/course/view.php?id=34 The Moodle &amp;quot;Features&amp;quot; Course] is a place to see how these things work.&lt;br /&gt;
*Later you might be ready for [http://demo.moodle.org/ Demo.moodle]. Here you can play on a Moodle site as a teacher, administrator or student.  Or [[Complete_install_packages#Install_complete_package| create a Moodle ]] on your own computer&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Moodle The Moodle page at Wikipedia]. MoodleDocs and Wikipedia both use [[MediaWiki]].&lt;br /&gt;
*[http://en.wikiversity.org/wiki/Moodle Moodle] (Wikiversity)&lt;br /&gt;
*[[Moodle_manuals]] has many links or there is the [[Using Moodle book]] for those who must have an Adobe document to read or print.&lt;br /&gt;
*[[Moodle presentations| Here is where Moodlers]] share their &amp;quot;This is Moodle&amp;quot; presentations.&lt;br /&gt;
*[http://www.google.com/search?hl=en&amp;amp;q=moodlemoot Moodlemoots] are exciting Moodle conferences all over the world, with both face to face and virtual components.&lt;br /&gt;
*[[Documents useful for decision makers|Which course management software ?]] - Documents useful for decision makers&lt;br /&gt;
*Each of the links below will take you to a different alphabetical index of topics, such as the Administrator index or Teacher index.   &lt;br /&gt;
&lt;br /&gt;
[[ca:Quant al Moodle]]&lt;br /&gt;
[[es:Acerca de Moodle]]&lt;br /&gt;
[[eu:Moodle-ri buruz]]&lt;br /&gt;
[[fr:À propos de Moodle]]&lt;br /&gt;
[[nl:Over Moodle]]&lt;br /&gt;
[[de:Was ist Moodle?]]&lt;br /&gt;
[[hr:O_Moodle_rješenju]]&lt;br /&gt;
[[ja:Moodleとは]]&lt;br /&gt;
[[pt:Sobre o Moodle]]&lt;br /&gt;
[[zh:关于Moodle]]&lt;br /&gt;
[[ru:О Moodle]]&lt;br /&gt;
[[ko:무들에 대하여]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Learning management system]]&lt;/div&gt;</summary>
		<author><name>Mattgibson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Ajax_marking_block&amp;diff=45820</id>
		<title>Ajax marking block</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Ajax_marking_block&amp;diff=45820"/>
		<updated>2008-10-27T14:11:35Z</updated>

		<summary type="html">&lt;p&gt;Mattgibson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The AJAX marking block allows you to view and complete all of your marking without leaving the page you are on. It displays all the ungraded work you need to mark in a tree structure of all of the courses you teach in, along with a count of how many items there are for each course &amp;amp; assessment item. &lt;br /&gt;
[[Image:Ajax_marking.png|right]]&lt;br /&gt;
====Keep track of what you have graded so far====&lt;br /&gt;
When the tree nodes are expanded and a student&#039;s name is clicked, a pop-up opens with the work to be graded. Once &#039;Submit&#039; has been clicked in that window, the pop-up closes and tree updates itself by removing the student&#039;s node and altering its total count.&lt;br /&gt;
&lt;br /&gt;
====Instantly update without leaving the page====&lt;br /&gt;
The [[AJAX]] bit means that every time you click on the nodes to expand them, the data for the child nodes is fetched in the background without refreshing the whole page. This saves on loading the whole lot at the start, which could be time consuming. Clicking &#039;Collapse and refresh&#039; will re-load the whole tree, with an updated count of your marking including anything that was submitted a second or two ago, and excluding any that were marked by someone else and now don&#039;t need your attention.  &lt;br /&gt;
&lt;br /&gt;
====Only show grading for your own teaching groups====&lt;br /&gt;
Some sites run training courses that don&#039;t need grading, or a single course with many teachers and teaching groups following the same programme of study. You can easily choose to hide the work that is not your using the &#039;&#039;&#039;configure&#039;&#039;&#039; link, which will open a pop up allowing you to show or hide each item individually, or choose to show only the work of some groups, so you only ever see the work that you actually need to mark.&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
Download the zip file [http://download.moodle.org/download.php/plugins/blocks/ajax_marking.zip here]. Copy it to your /blocks/ folder and unzip it there. Then, go to the notifications screen (Front page -&amp;gt; administration block -&amp;gt; notifications) where you should see a message about the tables having been set up correctly.&lt;br /&gt;
&lt;br /&gt;
===Configuring the display of each individual assessment item===&lt;br /&gt;
The block can be set to show or hide each individual assessment item, or show only the assessments by students in certain groups. Clicking on &#039;&#039;&#039;configure&#039;&#039;&#039; will bring up an additional tree, which shows all of your courses and names of all the assessment items. When you click on one of the assessments, you will be faced with a number of options on the right:&lt;br /&gt;
* Show - the default state, where you will see all students&#039; work&lt;br /&gt;
* Show by group - a set of checkboxes will appear with the names of the current groups for that course. You choose which you want to see and group nodes will then be shown between the assessment and student nodes in the main block. The nodes for that assessment will then look like this:  &#039;&#039;&#039;Course -&amp;gt; Assessment -&amp;gt; Group -&amp;gt; Submission&#039;&#039;&#039;&lt;br /&gt;
* Hide - do not display any submissions for this assessment item.&lt;br /&gt;
&lt;br /&gt;
The counting of unmarked submissions respects these choices and they are specific to the user who created them. If you are an admin and wish to set the preferences for others, use the &#039;login as&#039; function to do so.&lt;br /&gt;
&lt;br /&gt;
==Supported types==&lt;br /&gt;
* Assignment&lt;br /&gt;
* Forum (only if ratings are on)&lt;br /&gt;
* Workshop&lt;br /&gt;
* Journal&lt;br /&gt;
* Quiz (essay questions only)&lt;/div&gt;</summary>
		<author><name>Mattgibson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=File:Ajax_marking.png&amp;diff=45819</id>
		<title>File:Ajax marking.png</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=File:Ajax_marking.png&amp;diff=45819"/>
		<updated>2008-10-27T14:10:25Z</updated>

		<summary type="html">&lt;p&gt;Mattgibson: Screenshot of the AJAX marking block&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Screenshot of the AJAX marking block&lt;/div&gt;</summary>
		<author><name>Mattgibson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Ajax_marking_block&amp;diff=45818</id>
		<title>Ajax marking block</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Ajax_marking_block&amp;diff=45818"/>
		<updated>2008-10-27T14:09:34Z</updated>

		<summary type="html">&lt;p&gt;Mattgibson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The AJAX marking block allows you to view and complete all of your marking without leaving the page you are on. It displays all the ungraded work you need to mark in a tree structure of all of the courses you teach in, along with a count of how many items there are for each course &amp;amp; assessment item. &lt;br /&gt;
&lt;br /&gt;
====Keep track of what you have graded so far====&lt;br /&gt;
When the tree nodes are expanded and a student&#039;s name is clicked, a pop-up opens with the work to be graded. Once &#039;Submit&#039; has been clicked in that window, the pop-up closes and tree updates itself by removing the student&#039;s node and altering its total count.&lt;br /&gt;
&lt;br /&gt;
====Instantly update without leaving the page====&lt;br /&gt;
The [[AJAX]] bit means that every time you click on the nodes to expand them, the data for the child nodes is fetched in the background without refreshing the whole page. This saves on loading the whole lot at the start, which could be time consuming. Clicking &#039;Collapse and refresh&#039; will re-load the whole tree, with an updated count of your marking including anything that was submitted a second or two ago, and excluding any that were marked by someone else and now don&#039;t need your attention.  &lt;br /&gt;
&lt;br /&gt;
====Only show grading for your own teaching groups====&lt;br /&gt;
Some sites run training courses that don&#039;t need grading, or a single course with many teachers and teaching groups following the same programme of study. You can easily choose to hide the work that is not your using the &#039;&#039;&#039;configure&#039;&#039;&#039; link, which will open a pop up allowing you to show or hide each item individually, or choose to show only the work of some groups, so you only ever see the work that you actually need to mark.&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
Download the zip file [http://download.moodle.org/download.php/plugins/blocks/ajax_marking.zip here]. Copy it to your /blocks/ folder and unzip it there. Then, go to the notifications screen (Front page -&amp;gt; administration block -&amp;gt; notifications) where you should see a message about the tables having been set up correctly.&lt;br /&gt;
&lt;br /&gt;
===Configuring the display of each individual assessment item===&lt;br /&gt;
The block can be set to show or hide each individual assessment item, or show only the assessments by students in certain groups. Clicking on &#039;&#039;&#039;configure&#039;&#039;&#039; will bring up an additional tree, which shows all of your courses and names of all the assessment items. When you click on one of the assessments, you will be faced with a number of options on the right:&lt;br /&gt;
* Show - the default state, where you will see all students&#039; work&lt;br /&gt;
* Show by group - a set of checkboxes will appear with the names of the current groups for that course. You choose which you want to see and group nodes will then be shown between the assessment and student nodes in the main block. The nodes for that assessment will then look like this:  &#039;&#039;&#039;Course -&amp;gt; Assessment -&amp;gt; Group -&amp;gt; Submission&#039;&#039;&#039;&lt;br /&gt;
* Hide - do not display any submissions for this assessment item.&lt;br /&gt;
&lt;br /&gt;
The counting of unmarked submissions respects these choices and they are specific to the user who created them. If you are an admin and wish to set the preferences for others, use the &#039;login as&#039; function to do so.&lt;br /&gt;
&lt;br /&gt;
==Supported types==&lt;br /&gt;
* Assignment&lt;br /&gt;
* Forum (only if ratings are on)&lt;br /&gt;
* Workshop&lt;br /&gt;
* Journal&lt;br /&gt;
* Quiz (essay questions only)&lt;/div&gt;</summary>
		<author><name>Mattgibson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Development:YUI_TreeView&amp;diff=45817</id>
		<title>Development:YUI TreeView</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Development:YUI_TreeView&amp;diff=45817"/>
		<updated>2008-10-27T12:15:52Z</updated>

		<summary type="html">&lt;p&gt;Mattgibson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The main documentation page for this component is [http://developer.yahoo.com/yui/treeview/ here]. Its pretty good, but doesn&#039;t cover dynamic loading using PHP particularly well.&lt;br /&gt;
&lt;br /&gt;
For a good breakdown of how to add static nodes, see the page on the [[DicoTrad block]]. For dynamically loaded nodes, see the [[Ajax marking block]].&lt;br /&gt;
&lt;br /&gt;
==Dynamically loading content==&lt;br /&gt;
&lt;br /&gt;
If you intend to AJAX the tree items in dynamically, you need to use the [[Yahoo Connection Manager]]. It is easy to follow the examples, but the o.responseText string that comes back is not well documented. To get more than one bit of data at a time, e.g. many tree nodes, create a file on the server that will run a database query and return  something (e.g. an array of objects) in [http://www.json.org JSON] format, e.g.&lt;br /&gt;
&lt;br /&gt;
 $output = &#039;&lt;br /&gt;
  [&lt;br /&gt;
    {&lt;br /&gt;
     &amp;quot;name&amp;quot;:&amp;quot;item 1&amp;quot;,&lt;br /&gt;
     &amp;quot;id&amp;quot;:&amp;quot;3&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
     &amp;quot;name&amp;quot;:&amp;quot;item 2&amp;quot;,&lt;br /&gt;
     &amp;quot;id&amp;quot;:&amp;quot;45&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
  ]&#039;;&lt;br /&gt;
 print_r($output);&lt;br /&gt;
&lt;br /&gt;
Note that you need to use print_r() rather than return() in the php file, then eval() in your client-side javascript to make the data available to the rest of the tree functions. XML can also be used, if you prefer, but I have lost the example link :(&lt;br /&gt;
 &lt;br /&gt;
In the browser code, use something like this &lt;br /&gt;
&lt;br /&gt;
 var stuff = eval(o.responseText);&lt;br /&gt;
&lt;br /&gt;
which would need to go somewhere in the success portion of the callback function (see the example from the link above), so that you can then reference the variable as a normal array or object. Then, you can make the node(s) (maybe using a loop, getting the data from the array of objects) with e.g.&lt;br /&gt;
&lt;br /&gt;
 tmpNode = new YAHOO.widget.TextNode(stuff[0].name, node, false);  &lt;br /&gt;
&lt;br /&gt;
remembering to alter the variable name each time the loop iterates.&lt;/div&gt;</summary>
		<author><name>Mattgibson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=lighttpd&amp;diff=45260</id>
		<title>lighttpd</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=lighttpd&amp;diff=45260"/>
		<updated>2008-10-13T11:41:37Z</updated>

		<summary type="html">&lt;p&gt;Mattgibson: added WLMP link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://www.lighttpd.net/ Lighttpd] (aka Lighty) is a lightweight webserver program with a small memory footprint. It is an alternative to Apache and IIS, which is particularly suited to systems which are low on resources, especially RAM. Lighttpd is ideal for people using VPS hosting. Even on hosts with plenty of resources, Lighty is apparently just as fast as Apache and sometimes faster, so is well worth considering.&lt;br /&gt;
&lt;br /&gt;
Installation varies according to your platform, so check the instructions [http://trac.lighttpd.net/trac/wiki/TutorialInstallation here].&lt;br /&gt;
&lt;br /&gt;
You will also need to install php (maybe with an accelerator) as fast-cgi according to [http://trac.lighttpd.net/trac/wiki/TutorialLighttpdAndPHP these] instructions.&lt;br /&gt;
&lt;br /&gt;
It has been found to work well with PHP accelerators, for example [http://eaccelerator.net/ eAccelerator]&lt;br /&gt;
&lt;br /&gt;
One notable difference between Lighttpd and Apache is the expires directive that controls the caching of content. Apache allows you to set the expiry by file type e.g. making a jpg images stay in the browser cache for a week. Lighttpd will only let you specify folders to be cached.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
* [http://tracker.moodle.org/browse/MDL-14638 Networking problem related to lighttpd]&lt;br /&gt;
* [http://en.wlmp-project.net/downloads.php WLMP project downloads for Windows packages]&lt;/div&gt;</summary>
		<author><name>Mattgibson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Upgrading_XAMPP&amp;diff=44573</id>
		<title>Upgrading XAMPP</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Upgrading_XAMPP&amp;diff=44573"/>
		<updated>2008-09-30T15:10:45Z</updated>

		<summary type="html">&lt;p&gt;Mattgibson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Note: this is a work in progress - it may not be complete or accurate yet until fully tested. &lt;br /&gt;
&lt;br /&gt;
This page is intended to help you when you have:&lt;br /&gt;
* A Windows server that uses XAMPP or the XAMPP-based package from the Moodle downloads page&lt;br /&gt;
* A Moodle installation that has been running for a while and has accumulated data and users&lt;br /&gt;
* Some need to upgrade all or part of the webserver (Apache, PHP, MySQL) to a newer version e.g.&lt;br /&gt;
** You need a higher version of PHP for Moodle 2.0&lt;br /&gt;
** You are suffering from the dreaded Apache memory leak problem&lt;br /&gt;
** You are following best practice by keeping all components updated to include the latest security improvements and bugfixes&lt;br /&gt;
&lt;br /&gt;
Here&#039;s what to do:&lt;br /&gt;
&lt;br /&gt;
==Assemble the components==&lt;br /&gt;
You will need:&lt;br /&gt;
* To download the latest XAMPP or windows installer package e.g. from http://download.moodle.org/windows/&lt;br /&gt;
* The latest Moodle code if it wasn&#039;t included in the above&lt;br /&gt;
* To have sufficient hard-drive space to backup your existing install in its entirety (preferably to another machine).&lt;br /&gt;
* At least an hour of free time, possibly up to three - the backups can take forever depending on how big your install has become and troubleshooting can be a pain.&lt;br /&gt;
&lt;br /&gt;
==Backup everything==&lt;br /&gt;
You don&#039;t want to use Moodle&#039;s internal backups system as this will make things take an age. The idea is to backup the entire database into a text file, ready for the new webserver to rebuild it. You can then copy various component files from your old webserver directory across to the new one and all should be well.&lt;br /&gt;
&lt;br /&gt;
# Log into the server with administrator privileges&lt;br /&gt;
# It is vital to back up the entire XAMPP directory to another machine/hard-drive/USB-drive at this point.&lt;br /&gt;
# Backup your databse as follows:&lt;br /&gt;
## Open a command prompt using Start-&amp;gt;run and typing cmd&lt;br /&gt;
## type &amp;quot;cd path_to_your_webserver\mysql\bin\&amp;quot; without the quotes and substituting the actual path where your webserver is&lt;br /&gt;
## type &amp;quot;mysqldump.exe --user=your_MySQL_user --password=your_MySQL_password your_database_name &amp;gt; backup.sql&amp;quot; without the quotes and substituting the real values from your config.php file&lt;br /&gt;
&lt;br /&gt;
==Put the files in place==&lt;br /&gt;
Note: if you made the previous install yourself, this will be a lot easier. If you have inherited it, this part is a minefield. Use a diff application to compare httpd.conf and php.ini in the old and new packages. Also check apache\modules and php\ext carefully for extra files.&lt;br /&gt;
# Place the new XAMPP or windows package where you want it to be, but leave the existing (working) install where it is, so you can go back to it if everything fails.&lt;br /&gt;
# disable the existing install by shutting down Apache and MySQL&lt;br /&gt;
# run the XAMPP install script on the new install. This will give you a blank Moodle that should work. Run the stop Moodle script afterwards. (if plain XAMPP, run the setup_xampp script)&lt;br /&gt;
# (optional) copy across any extra files and settings that you added to the old one e.g. extra php modules to make authentication work. e.g. if you need the apache SSPI module, copy the file across from apache\modules\ on the old install to the same place on the new install and add the &amp;quot;LoadModule auth_sspi_mod.so&amp;quot; line to apache\conf\httpd.conf. This will be more of an issue if you are just using XAMPP (not the windows package from Moodle), which may need extra tweaking to get all of the needed extensions working.&lt;br /&gt;
# check the original apache\conf\httpd.conf for information relating to your domain. You may need to copy over a line like &amp;quot;ServerName www.yourmoodle.com&amp;quot; in order to make it respond to requests.&lt;br /&gt;
# If https is in use, you will need to &lt;br /&gt;
## copy over the certificate files - server.crt &amp;amp; server.key from apache\conf\ as well as apache\conf\extras\httpd-ssl.conf. &lt;br /&gt;
## Make sure the &amp;quot;Include conf\extra\httpd-ssl.conf&amp;quot; line in httpd.conf has no leading # symbol&lt;br /&gt;
## go through httpd-ssl.conf, changing all occurences of the old webserver location to the new one&lt;br /&gt;
# If virtual hosts are in use, you will need to:&lt;br /&gt;
## copy over the apache/extra/httpd-vhosts.conf file&lt;br /&gt;
## go through it changing all occurences of the old webserver location to the new one&lt;br /&gt;
# copy backup.sql from mysql\bin\ to the equivalent place in the new install&lt;br /&gt;
# copy across the entire Moodle folder from the old to the new install. Its best to make sure everything works before attempting to upgrade the Moodle install itself.&lt;br /&gt;
&lt;br /&gt;
==Restore the database==&lt;br /&gt;
# Open the command prompt again, as above and navigate to mysql/bin in the new webserver folder.&lt;br /&gt;
# type &amp;quot;mysql --user=your_new_MySQL_user --password=your_new_mysql_pasword your_new_database &amp;lt; backup.sql&amp;quot; (no quotes), substituting the username, password and database that you created when you ran the new install script.&lt;br /&gt;
# start the new webserver&#039;s apache and mysql&lt;br /&gt;
# test!&lt;/div&gt;</summary>
		<author><name>Mattgibson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Upgrading_XAMPP&amp;diff=44572</id>
		<title>Upgrading XAMPP</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Upgrading_XAMPP&amp;diff=44572"/>
		<updated>2008-09-30T15:04:41Z</updated>

		<summary type="html">&lt;p&gt;Mattgibson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Note: this is a work in progress - it may not be complete or accurate yet until fully tested. &lt;br /&gt;
&lt;br /&gt;
This page is intended to help you when you have:&lt;br /&gt;
* A Windows server that uses XAMPP or the XAMPP-based package from the Moodle downloads page&lt;br /&gt;
* A Moodle installation that has been running for a while and has accumulated data and users&lt;br /&gt;
* Some need to upgrade all or part of the webserver (Apache, PHP, MySQL) to a newer version e.g.&lt;br /&gt;
** You need a higher version of PHP for Moodle 2.0&lt;br /&gt;
** You are suffering from the dreaded Apache memory leak problem&lt;br /&gt;
** You are following best practice by keeping all components updated to include the latest security improvements and bugfixes&lt;br /&gt;
&lt;br /&gt;
Here&#039;s what to do:&lt;br /&gt;
&lt;br /&gt;
==Assemble the components==&lt;br /&gt;
You will need:&lt;br /&gt;
* To download the latest XAMPP or windows installer package e.g. from http://download.moodle.org/windows/&lt;br /&gt;
* The latest Moodle code if it wasn&#039;t included in the above&lt;br /&gt;
* To have sufficient hard-drive space to backup your existing install in its entirety (preferably to another machine).&lt;br /&gt;
* At least an hour of free time, possibly up to three - the backups can take forever depending on how big your install has become and troubleshooting can be a pain.&lt;br /&gt;
&lt;br /&gt;
==Backup everything==&lt;br /&gt;
You don&#039;t want to use Moodle&#039;s internal backups system as this will make things take an age. The idea is to backup the entire database into a text file, ready for the new webserver to rebuild it. You can then copy various component files from your old webserver directory across to the new one and all should be well.&lt;br /&gt;
&lt;br /&gt;
# Log into the server with administrator privileges&lt;br /&gt;
# It is vital to back up the entire XAMPP directory to another machine/hard-drive/USB-drive at this point.&lt;br /&gt;
# Backup your databse as follows:&lt;br /&gt;
## Open a command prompt using Start-&amp;gt;run and typing cmd&lt;br /&gt;
## type &amp;quot;cd path_to_your_webserver\mysql\bin\&amp;quot; without the quotes and substituting the actual path where your webserver is&lt;br /&gt;
## type &amp;quot;mysqldump.exe --user=your_MySQL_user --password=your_MySQL_password your_database_name &amp;gt; backup.sql&amp;quot; without the quotes and substituting the real values from your config.php file&lt;br /&gt;
&lt;br /&gt;
==Put the files in place==&lt;br /&gt;
Note: if you made the previous install yourself, this will be a lot easier. If you have inherited it, this part is a minefield. Use a diff application to compare httpd.conf and php.ini in the old and new packages. Also check apache\modules and php\ext carefully for extra files.&lt;br /&gt;
# Place the new XAMPP or windows package where you want it to be, but leave the existing (working) install where it is, so you can go back to it if everything fails.&lt;br /&gt;
# disable the existing install by shutting down Apache and MySQL&lt;br /&gt;
# run the XAMPP install script on the new install. This will give you a blank Moodle that should work. Run the stop Moodle script afterwards. (if plain XAMPP, run the setup_xampp script)&lt;br /&gt;
# (optional) copy across any extra files and settings that you added to the old one e.g. extra php modules to make authentication work. e.g. if you need the apache SSPI module, copy the file across from apache\modules\ on the old install to the same place on the new install and add the &amp;quot;LoadModule auth_sspi_mod.so&amp;quot; line to apache\conf\httpd.conf. This will be more of an issue if you are just using XAMPP (not the windows package from Moodle), which may need extra tweaking to get all of the needed extensions working.&lt;br /&gt;
# check the original apache\conf\httpd.conf for information relating to your domain. You may need to copy over a line like &amp;quot;ServerName www.yourmoodle.com&amp;quot; in order to make it respond to requests.&lt;br /&gt;
# If https is in use, you will need to &lt;br /&gt;
## copy over the certificate files - server.crt &amp;amp; server.key from apache\conf\ as well as apache\conf\extras\httpd-ssl.conf. &lt;br /&gt;
## Make sure the &amp;quot;Include conf\extra\httpd-ssl.conf&amp;quot; line in httpd.conf has no leading # symbol&lt;br /&gt;
# copy backup.sql from mysql\bin\ to the equivalent place in the new install&lt;br /&gt;
# copy across the entire Moodle folder from the old to the new install. Its best to make sure everything works before attempting to upgrade the Moodle install itself.&lt;br /&gt;
&lt;br /&gt;
==Restore the database==&lt;br /&gt;
# Open the command prompt again, as above and navigate to mysql/bin in the new webserver folder.&lt;br /&gt;
# type &amp;quot;mysql --user=your_new_MySQL_user --password=your_new_mysql_pasword your_new_database &amp;lt; backup.sql&amp;quot; (no quotes), substituting the username, password and database that you created when you ran the new install script.&lt;br /&gt;
# start the new webserver&#039;s apache and mysql&lt;br /&gt;
# test!&lt;/div&gt;</summary>
		<author><name>Mattgibson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Upgrading_XAMPP&amp;diff=44571</id>
		<title>Upgrading XAMPP</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Upgrading_XAMPP&amp;diff=44571"/>
		<updated>2008-09-30T14:38:38Z</updated>

		<summary type="html">&lt;p&gt;Mattgibson: created page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Note: this is a work in progress - it may not be complete or accurate yet until fully tested. &lt;br /&gt;
&lt;br /&gt;
This page is intended to help you when you have:&lt;br /&gt;
* A Windows server that uses XAMPP or the XAMPP-based package from the Moodle downloads page&lt;br /&gt;
* A Moodle installation that has been running for a while and has accumulated data and users&lt;br /&gt;
* Some need to upgrade all or part of the webserver (Apache, PHP, MySQL) to a newer version e.g.&lt;br /&gt;
** You need a higher version of PHP for Moodle 2.0&lt;br /&gt;
** You are suffering from the dreaded Apache memory leak problem&lt;br /&gt;
** You are following best practice by keeping all components updated to include the latest security improvements and bugfixes&lt;br /&gt;
&lt;br /&gt;
Here&#039;s what to do:&lt;br /&gt;
&lt;br /&gt;
==Assemble the components==&lt;br /&gt;
You will need:&lt;br /&gt;
* To download the latest XAMPP or windows installer package e.g. from http://download.moodle.org/windows/&lt;br /&gt;
* The latest Moodle code if it wasn&#039;t included in the above&lt;br /&gt;
* To have sufficient hard-drive space to backup your existing install in its entirety (preferably to another machine).&lt;br /&gt;
* At least an hour of free time, possibly up to three - the backups can take forever depending on how big your install has become and troubleshooting can be a pain.&lt;br /&gt;
&lt;br /&gt;
==Backup everything==&lt;br /&gt;
You don&#039;t want to use Moodle&#039;s internal backups system as this will make things take an age. The idea is to backup the entire database into a text file, ready for the new webserver to rebuild it. You can then copy various component files from your old webserver directory across to the new one and all should be well.&lt;br /&gt;
&lt;br /&gt;
# Log into the server with administrator privileges&lt;br /&gt;
# It is vital to back up the entire XAMPP directory to another machine/hard-drive/USB-drive at this point.&lt;br /&gt;
# Backup your databse as follows:&lt;br /&gt;
## Open a command prompt using Start-&amp;gt;run and typing cmd&lt;br /&gt;
## type &amp;quot;cd path_to_your_webserver\mysql\bin\&amp;quot; without the quotes and substituting the actual path where your webserver is&lt;br /&gt;
## type &amp;quot;mysqldump.exe --user=your_MySQL_user --password=your_MySQL_password your_database_name &amp;gt; backup.sql&amp;quot; without the quotes and substituting the real values from your config.php file&lt;br /&gt;
&lt;br /&gt;
==Put the files in place==&lt;br /&gt;
Note: if you made the previous install yourself, this will be a lot easier. If you have inherited it, this part is a minefield. Use a diff application to compare httpd.conf and php.ini in the old and new packages. Also check apache\modules and php\ext carefully for extra files.&lt;br /&gt;
# Place the new XAMPP or windows package where you want it to be, but leave the existing (working) install where it is, so you can go back to it if everything fails.&lt;br /&gt;
# disable the existing install by shutting down Apache and MySQL&lt;br /&gt;
# run the XAMPP install script on the new install. This will give you a blank Moodle that should work.&lt;br /&gt;
# (optional) copy across any extra files and settings that you added to the old one e.g. extra php modules to make authentication work. e.g. if you need the apache SSPI module, copy the file across from apache\modules\ on the old install to the same place on the new install and add the &amp;quot;LoadModule auth_sspi_mod.so&amp;quot; line to apache\conf\httpd.conf. This will be more of an issue if you are just using XAMPP (not the windows package from Moodle), which may need extra tweaking to get all of the needed extensions working.&lt;br /&gt;
# check the original apache\conf\httpd.conf for information relating to your domain. You may need to copy over a line like &amp;quot;ServerName www.yourmoodle.com&amp;quot; in order to make it respond to requests.&lt;br /&gt;
# If https is in use, you will need to &lt;br /&gt;
## copy over the certificate files - server.crt &amp;amp; server.key from apache\conf\ as well as apache\conf\extras\httpd-ssl.conf. &lt;br /&gt;
## Make sure the &amp;quot;Include conf\extra\httpd-ssl.conf&amp;quot; line in httpd.conf has no leading # symbol&lt;br /&gt;
# copy backup.sql from mysql\bin\ to the equivalent place in the new install&lt;br /&gt;
# copy across the entire Moodle folder from the old to the new install. Its best to make sure everything works before attempting to upgrade the Moodle install itself.&lt;br /&gt;
&lt;br /&gt;
==Restore the database==&lt;br /&gt;
# Open the command prompt again, as above and navigate to mysql/bin in the new webserver folder.&lt;br /&gt;
# type &amp;quot;mysql --user=your_new_MySQL_user --password=your_new_mysql_pasword your_new_database &amp;lt; backup.sql&amp;quot; (no quotes), substituting the username, password and database that you created when you ran the new install script.&lt;br /&gt;
# start the new webserver&#039;s apache and mysql&lt;br /&gt;
# test!&lt;/div&gt;</summary>
		<author><name>Mattgibson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Patch&amp;diff=43416</id>
		<title>Patch</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Patch&amp;diff=43416"/>
		<updated>2008-09-11T18:52:35Z</updated>

		<summary type="html">&lt;p&gt;Mattgibson: Didn&amp;#039;t realise there was already a good page on this. Changing the page to a redirect.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Development:How_to_apply_a_patch]]&lt;/div&gt;</summary>
		<author><name>Mattgibson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Patch&amp;diff=43415</id>
		<title>Patch</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Patch&amp;diff=43415"/>
		<updated>2008-09-11T18:04:10Z</updated>

		<summary type="html">&lt;p&gt;Mattgibson: Added wikipedia link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://en.wikipedia.org/wiki/Patch_(Unix) Patch] is the unix program which alters one or more text files by following the instructions in a patch file. Diff is the unix program used to create the patches by comparing two similar files e.g. a file from a standard copy of Moodle and a copy of that file that a programmer has added some code to.&lt;br /&gt;
&lt;br /&gt;
The reason for using it is that some files in Moodle are very large, so it may be that two programmers are working on separate improvements which you wish to apply to your copy of Moodle, but this can&#039;t be done by just downloading two modified versions of the file as each one will only contain one set of changes. Patches insert new code at specific points and leave the rest of the file untouched, so you can apply many of them to the same file with no interference between them.&lt;br /&gt;
&lt;br /&gt;
Most linux distributions come with Patch already installed, but you may need to install it using whatever method your distribution requires. Patch for windows can be downloaded from [http://gnuwin32.sourceforge.net/packages/patch.htm sourceforge].&lt;br /&gt;
&lt;br /&gt;
How to patch a file&lt;br /&gt;
&lt;br /&gt;
# download the patch&lt;br /&gt;
# open it in a text editor and look for the line at the top which references a filename. If it says e.g. --- a/admin/roles/assign.php then put it in the main moodle directory, where the path starts from (ignoring the a). If it just says --- a/assign.php then it will need to go into /admin/roles/ or wherever.&lt;br /&gt;
# if you are using Windows, click Start-&amp;gt;run then type cmd and press enter. If Liunx, open a terminal&lt;br /&gt;
# navigate to the directory that you put the file into&lt;br /&gt;
# type the following: patch -p0 &amp;lt; filename.patch&lt;/div&gt;</summary>
		<author><name>Mattgibson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Patch&amp;diff=43414</id>
		<title>Patch</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Patch&amp;diff=43414"/>
		<updated>2008-09-11T18:03:48Z</updated>

		<summary type="html">&lt;p&gt;Mattgibson: created page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Patch is the unix program which alters one or more text files by following the instructions in a patch file. Diff is the unix program used to create the patches by comparing two similar files e.g. a file from a standard copy of Moodle and a copy of that file that a programmer has added some code to.&lt;br /&gt;
&lt;br /&gt;
The reason for using it is that some files in Moodle are very large, so it may be that two programmers are working on separate improvements which you wish to apply to your copy of Moodle, but this can&#039;t be done by just downloading two modified versions of the file as each one will only contain one set of changes. Patches insert new code at specific points and leave the rest of the file untouched, so you can apply many of them to the same file with no interference between them.&lt;br /&gt;
&lt;br /&gt;
Most linux distributions come with Patch already installed, but you may need to install it using whatever method your distribution requires. Patch for windows can be downloaded from [http://gnuwin32.sourceforge.net/packages/patch.htm sourceforge].&lt;br /&gt;
&lt;br /&gt;
How to patch a file&lt;br /&gt;
&lt;br /&gt;
# download the patch&lt;br /&gt;
# open it in a text editor and look for the line at the top which references a filename. If it says e.g. --- a/admin/roles/assign.php then put it in the main moodle directory, where the path starts from (ignoring the a). If it just says --- a/assign.php then it will need to go into /admin/roles/ or wherever.&lt;br /&gt;
# if you are using Windows, click Start-&amp;gt;run then type cmd and press enter. If Liunx, open a terminal&lt;br /&gt;
# navigate to the directory that you put the file into&lt;br /&gt;
# type the following: patch -p0 &amp;lt; filename.patch&lt;/div&gt;</summary>
		<author><name>Mattgibson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Development:CVS_for_developers&amp;diff=42321</id>
		<title>Development:CVS for developers</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Development:CVS_for_developers&amp;diff=42321"/>
		<updated>2008-08-18T17:52:33Z</updated>

		<summary type="html">&lt;p&gt;Mattgibson: /* CVS on Windows */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;CVS&#039;&#039;&#039; is the Concurrent Versioning System, a commonly-used way of managing source code for large software projects. CVS keeps all versions of all files so that nothing is ever lost, and usage by different people is tracked. It also provides ways to merge code if two or more people are working on the same file. All code and all versions are stored on a central server (in the case of Moodle, at cvs.moodle.org). The [http://cvsbook.red-bean.com/cvsbook.html CVS book] holds more information about CVS than you need.&lt;br /&gt;
&lt;br /&gt;
If you just want to download Moodle using CVS to run a site, then you probably don&#039;t need this page - please see [[CVS for Administrators]] instead.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Joining the project as a developer==&lt;br /&gt;
&lt;br /&gt;
So, you&#039;ve been offered CVS write access to help us develop and maintain Moodle!  Welcome aboard!&lt;br /&gt;
&lt;br /&gt;
To be able to write changes into [http://cvs.moodle.org/ Moodle&#039;s CVS archive], you first need to have an account on the server.  Only trusted developers get these accounts.  To request access, go to the &amp;quot;Apply for CVS Access&amp;quot; tab on the CVS page on Moodle.org (http://moodle.org/cvs).  Tell us what modules you&#039;d like to access (e.g. a language module), and why.  You&#039;ll receive notification in a day or so.&lt;br /&gt;
&lt;br /&gt;
With that done, you should have all the permissions you need, so you just need to set up your machine and download the current source code so you can start working on it. &lt;br /&gt;
&lt;br /&gt;
For the examples on this page, let&#039;s assume your username is &#039;&#039;&#039;myusername&#039;&#039;&#039; and your password is &#039;&#039;&#039;mypassword&#039;&#039;&#039;. Things are a lot easier if you use an SSH key to access the server, as you won&#039;t have to keep typing these in. Check [[Development:SSH_key | here]] for instructions on how to make one.&lt;br /&gt;
&lt;br /&gt;
==CVS modules==&lt;br /&gt;
&lt;br /&gt;
Within CVS, the word &amp;quot;modules&amp;quot; refers to separate collections of code. In Moodle we have the following modules within our repository:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;moodle&#039;&#039;&#039; - the main Moodle source code&lt;br /&gt;
* &#039;&#039;&#039;lang&#039;&#039;&#039; - all the language packs&lt;br /&gt;
* &#039;&#039;&#039;[[Development:contrib|contrib]]&#039;&#039;&#039; - user contributions and other assorted code in development&lt;br /&gt;
* &#039;&#039;&#039;mysql&#039;&#039;&#039; - a customised phpMyAdmin to plug into Moodle for database admin&lt;br /&gt;
* &#039;&#039;&#039;windows-cron&#039;&#039;&#039; - a small package that makes cron possible on Windows systems&lt;br /&gt;
* &#039;&#039;&#039;docs&#039;&#039;&#039; - various extra user-contributed documentation&lt;br /&gt;
&lt;br /&gt;
Most people are working on the existing features in the moodle module, but many are also contributing new ideas in the contrib modules. Once code reaches a certain level of maturity in the contrib area, it can be migrated over into the main moodle tree.&lt;br /&gt;
&lt;br /&gt;
==Basic CVS commands==&lt;br /&gt;
&lt;br /&gt;
===CVS on Unix===&lt;br /&gt;
&lt;br /&gt;
Moodle CVS uses ssh as a transport layer for security, so you will have to set a CVS_RSH environment variable in your Unix shell. It&#039;s best to put these commands in your .bashrc or .cshrc so you don&#039;t have to type it all the time:&lt;br /&gt;
        setenv CVS_RSH ssh (for csh, tcsh etc)&lt;br /&gt;
        export CVS_RSH=ssh (for sh, bash etc)&lt;br /&gt;
&lt;br /&gt;
Next, you can check out the latest development version of Moodle using this (all one line). NOTE: Don&#039;t try to do run this first CVS command over an existing moodle installation: start fresh with a new directory!:&lt;br /&gt;
        cvs -z3 -d:ext:myusername@cvs.moodle.org:/cvsroot/moodle co moodle&lt;br /&gt;
&lt;br /&gt;
The command is similar for other CVS modules:&lt;br /&gt;
        cvs -z3 -d:ext:myusername@cvs.moodle.org:/cvsroot/moodle co contrib&lt;br /&gt;
&lt;br /&gt;
If you want to checkout a single plugin (attendance block as an example here) from contrib into the current directory, you can use:&lt;br /&gt;
        cvs -z3 -d:ext:myusername@cvs.moodle.org:/cvsroot/moodle co -d attendance contrib/plugins/blocks/attendance&lt;br /&gt;
&lt;br /&gt;
Note that you will be prompted for mypassword for each command unless you set up authorized keys.  Read [[Development:SSH_key|SSH Keys]] for more details on how to set those up.&lt;br /&gt;
&lt;br /&gt;
Now, you should have a new &#039;moodle&#039; directory. You can rename it and move it around if you like. Go into it:&lt;br /&gt;
        cd moodle&lt;br /&gt;
&lt;br /&gt;
All the latest Moodle files should be in there. You can now change files in your copy. To compare your files and directories against the main CVS copy on the server use cvs diff, e.g.:&lt;br /&gt;
        cvs diff -c config-dist.php&lt;br /&gt;
        cvs diff -c lang&lt;br /&gt;
&lt;br /&gt;
To fetch the latest updates from the server use:&lt;br /&gt;
        cvs update -dP&lt;br /&gt;
&lt;br /&gt;
To copy your new files back to the server you would do something like:&lt;br /&gt;
        cd lang/ca&lt;br /&gt;
        cvs commit&lt;br /&gt;
&lt;br /&gt;
You will be prompted to add some comments (depends on your default text editor).   Please write a meaningful, descriptive comment and &#039;&#039;&#039;always include the name of any tracker issues that talk about the issue you are fixing&#039;&#039;&#039; (eg &#039;&#039;&#039;MDL-XXXX&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
After that your changes will be sent to the CVS server and stored in the repository. Done!&lt;br /&gt;
&lt;br /&gt;
To save more time you can put default arguments into a file called .cvsrc in your home directory. For example, mine contains:&lt;br /&gt;
        diff -c&lt;br /&gt;
        update -dP&lt;br /&gt;
&lt;br /&gt;
Try &#039;cvs help&#039; for more details ...&lt;br /&gt;
&lt;br /&gt;
===CVS on Mac OSX===&lt;br /&gt;
&lt;br /&gt;
You can follow the same instructions as for Unix (above) in a terminal window. However, the cvs command is not installed by default in an OSX. You first need to install the XCode Tools. You should find this on your original installation disk. Failing that it can be downloaded (a fairly hefty download) from the Apple developer web site ([http://developer.apple.com]).&lt;br /&gt;
&lt;br /&gt;
===CVS on Windows===&lt;br /&gt;
&lt;br /&gt;
First, you need to download a completely fresh copy of Moodle using your developer account.&lt;br /&gt;
&lt;br /&gt;
1. Get TortoiseCVS from tortoisecvs.org and install it, then reboot. (Tortoise is not currently supported on vista but [http://www.syntevo.com/smartcvs/index.html SmartCVS] works well).&lt;br /&gt;
&lt;br /&gt;
2. Find or create a new folder somewhere where you want Moodle to be downloaded to.&lt;br /&gt;
&lt;br /&gt;
3. Right-mouse-click that folder and choose &amp;quot;CVS Checkout&amp;quot; from the menu. You should see a dialog box.&lt;br /&gt;
&lt;br /&gt;
4. Copy this text into the CVSROOT field (using your own username!):&lt;br /&gt;
&lt;br /&gt;
           :ext:myusername@cvs.moodle.org:/cvsroot/moodle&lt;br /&gt;
&lt;br /&gt;
5. Under the &amp;quot;Module&amp;quot; field, type &amp;quot;moodle&amp;quot; to get the latest development version of Moodle, &amp;quot;contrib&amp;quot; to get the contributions directory, or &amp;quot;mysql&amp;quot; to get the MySQL Admin module.&lt;br /&gt;
&lt;br /&gt;
6. Press the button: &amp;quot;OK&amp;quot; and everything should be downloaded.&lt;br /&gt;
&lt;br /&gt;
A dialog box should show all the files being downloaded, and after a while you should have a complete copy of Moodle. After this first checkout, you can fetch the latest updated files from the CVS server:&lt;br /&gt;
&lt;br /&gt;
# Right-mouse-click on your Moodle folder (or any file) and select &amp;quot;CVS Update&amp;quot;.&lt;br /&gt;
# Sit back and watch the logs scroll by. Take note of conflicts that may occur if your local code has changes that conflict with the incoming versions - you will need to edit these files and resolve the conflicts manually.&lt;br /&gt;
&lt;br /&gt;
After modifying files (you will notice their icons change from green to red!), you can commit them back to the CVS server like this:&lt;br /&gt;
&lt;br /&gt;
# Right-mouse-click on your Moodle folder (or any file) and select &amp;quot;CVS Commit...&amp;quot;.&lt;br /&gt;
# In the dialog box, type a clear description of the changes you are committing.  &#039;&#039;&#039;Always include the name of any tracker issues related to what you are fixing&#039;&#039;&#039; (eg &#039;&#039;&#039;MDL-XXXX&#039;&#039;&#039;).&lt;br /&gt;
# Click &amp;quot;OK&amp;quot;. Your changes will be sent to the server.&lt;br /&gt;
# If you create a folder, BE CAREFUL about using the &amp;quot;CVS Add&amp;quot; option as it will add the folder to CVS without requiring a commit. Once added, the folder cannot be removed from CVS even though it will be pruned so long as it is empty.&lt;br /&gt;
&lt;br /&gt;
Please note that as of April 15 2008, TortoiseCVS 1.10.6 might not work really well with Windows Vista. You could report bugs to TortoiseCVS site (hosted by SourceForge) or google &amp;quot;TortoiseCVS vista&amp;quot; for more details.&lt;br /&gt;
&lt;br /&gt;
N.B. I had enormous headaches with the above settings until I changed from ext to ssh. This was using an ssh certificate on windows 2003 to both check out and commit code. Your mileage may vary, of course. [[User:Matt Gibson|Matt Gibson]] 12:52, 18 August 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
==CVS commit messages==&lt;br /&gt;
&lt;br /&gt;
Every commit you make to CVS should have a commit message containing&lt;br /&gt;
* a tracker issue id like MDL-12345 (if necessary, create an issue before committing, the only exception is for very minor typos.)&lt;br /&gt;
* A brief description of the problem you are fixing. (If you are feeling lazy, you may be able to get away with copying and pasting the issue summary from the tracker.)&lt;br /&gt;
* If it is not immediately obvious, a brief summary of why this change fixes the problem. If a longer description is necessary,  you may also want to add more information to the tracker issue, or Moodle Docs, but the code changes + commit message should provide enough clues to how the fix works on their own.&lt;br /&gt;
&lt;br /&gt;
==Working with branches==&lt;br /&gt;
&lt;br /&gt;
This diagram shows how the main moodle module branches into different versions over time.&lt;br /&gt;
&lt;br /&gt;
[[Image:Cvstree.png|CVS tree]]&lt;br /&gt;
&lt;br /&gt;
To see all the current tags and branches that are available, use this command on any old file (such as index.php in the top moodle directory):&lt;br /&gt;
    cvs status -v index.php&lt;br /&gt;
&lt;br /&gt;
Some tagging guidelines:&lt;br /&gt;
* Tag and branch names should always be all upper-case.&lt;br /&gt;
* Tags and branches should ALWAYS be applied to the entire module (all of Moodle). Don&#039;t tag individual files or directories.&lt;br /&gt;
* We don&#039;t allow renaming of tags because people may be relying on them, so get them right the first time!&lt;br /&gt;
&lt;br /&gt;
===Trunk development===&lt;br /&gt;
&lt;br /&gt;
The Trunk of CVS is the main development version of Moodle. In CVS it is also known as the HEAD, or default branch.&lt;br /&gt;
&lt;br /&gt;
Moodle developers try to keep this stable as possible, but as it usually contains new code it probably has bugs and small instabilities.&lt;br /&gt;
&lt;br /&gt;
Every now and then we decide the product has enough features to make a release. At this time, the trunk is tagged with a MOODLE_XX_BETA tag (in case we ever want to roll back to that point) and a new branch is formed for the release, called MOODLE_XX_STABLE.&lt;br /&gt;
&lt;br /&gt;
A Beta package is also released at this point - it&#039;s for testers who don&#039;t use CVS but want to test the latest features and report bugs.&lt;br /&gt;
&lt;br /&gt;
===Stable branches for each release===&lt;br /&gt;
&lt;br /&gt;
As soon as the stable branch MOODLE_XX_STABLE is created, development efforts will fork into two streams for a while. Some people may continue working on new features in the trunk for the next release, but most developers should be concentrating on using the current STABLE branch and fixing bugs that are found in it.&lt;br /&gt;
&lt;br /&gt;
You can switch your local copy of Moodle to the STABLE version using the following command in Unix from the root directory:&lt;br /&gt;
    cvs update -dP -r MOODLE_XX_STABLE&lt;br /&gt;
&lt;br /&gt;
After that, all the commands described above will apply to that stable version. To return to the trunk version just issue:&lt;br /&gt;
    cvs update -dPA&lt;br /&gt;
&lt;br /&gt;
On Windows clients you should have a menu from which you can choose the branch.&lt;br /&gt;
&lt;br /&gt;
Once the new STABLE branch really stabilises, a release can be declared. Packages are created for distribution and the branch will be tagged (by Martin Dougiamas) with a tag named: MOODLE_XXX&lt;br /&gt;
&lt;br /&gt;
===Merging fixes===&lt;br /&gt;
&lt;br /&gt;
All bug fixes in any STABLE branch should be merged back into the trunk so that they become available in future versions of Moodle. A floating tag called MOODLE_XX_MERGED needs to be maintained to keep track of the last merge. The procedure for such a merge is as follows (I&#039;m using CVS on the Unix command line but the steps are the same for any CVS client):&lt;br /&gt;
&lt;br /&gt;
[[Image:Merging.png|thumb|right|300px|This diagram summarises the process]]&lt;br /&gt;
1. I highly recommend keeping one checked out copy of each stable branch and the trunk/head version locally to make it easier to jump between them.  Set them all up as virtual web sites on your development machine.  I use directories like /moodle/18, /moodle/19 /moodle/dev etc.&lt;br /&gt;
&lt;br /&gt;
2. Update to the latest stable version (I&#039;ll use XX in the example but it could be 18, 19 etc) for the relevant files, and do a cvs diff just to double-check exactly what you are checking in.  Note you only need to update the files/directories you are working in, but sometimes it help to update everything anyway just to do a final check on the functionality using the web.&lt;br /&gt;
&lt;br /&gt;
          cd /moodle/XX/user&lt;br /&gt;
          cvs update -dPA&lt;br /&gt;
          cvs diff -c file1.php file2.php&lt;br /&gt;
&lt;br /&gt;
3. If all looks OK, check in the fix to the stable branch.  Make sure that the commit message contains the bug tracker ID (eg MDL-1111) and a decent description of your thoughts on the fix.  If you don&#039;t specify a message in the command line, you&#039;ll be put into an editor to type one.&lt;br /&gt;
&lt;br /&gt;
          cvs commit -m &amp;quot;MDL-1234 Corrected a small typo in the user name field&amp;quot; file1.php file2.php&lt;br /&gt;
&lt;br /&gt;
4. Go to the very latest trunk version and make sure it&#039;s up-to-date.&lt;br /&gt;
          &lt;br /&gt;
          cd /moodle/dev/user&lt;br /&gt;
          cvs update -dPA&lt;br /&gt;
&lt;br /&gt;
5. Merge everything into your local copy of the trunk from your stable branch since the last merge.  You can use the same sequence of (4) and (5) to merge the changes into other stable branches too (to backport the fix to the previous stable versions).&lt;br /&gt;
&lt;br /&gt;
          cvs update -kk -j MOODLE_XX_MERGED -j MOODLE_XX_STABLE file1.php file2.php&lt;br /&gt;
&lt;br /&gt;
6. Carefully watch the update logs for conflicts, and fix every file that you see with a conflict.  Afterwards, it may help to just run a diff to make sure the result is what you expected:&lt;br /&gt;
&lt;br /&gt;
          cvs diff -c file1.php file2.php&lt;br /&gt;
&lt;br /&gt;
7. Check your merged local copy back into CVS trunk version&lt;br /&gt;
&lt;br /&gt;
          cvs commit -m &amp;quot;MDL-1234 Corrected a small typo in the user name field, merged from XX&amp;quot; file1.php file2.php&lt;br /&gt;
&lt;br /&gt;
8. Go back to your branch version&lt;br /&gt;
&lt;br /&gt;
          cd /moodle/XX/user&lt;br /&gt;
&lt;br /&gt;
9. Update the floating merge tag for the affected files (so that it matches MOODLE_XX_STABLE) so that this process can be repeated next time&lt;br /&gt;
&lt;br /&gt;
          cvs tag -RF MOODLE_XX_MERGED file1.php file2.php&lt;br /&gt;
&lt;br /&gt;
Finally, the values for $version in all the Moodle version.php files within the stable branch should not be updated at all if possible (except the last digit if absolutely necessary). The reason is that someone updating from a very stable version to the next very stable version could miss database upgrades that happened on the trunk.&lt;br /&gt;
&lt;br /&gt;
In other words, if you have changes to the database schema to commit to a stable branch, please check with Martin Dougiamas, or one of the other core Moodle developers.&lt;br /&gt;
&lt;br /&gt;
===Merging fixes with TortoiseCVS===&lt;br /&gt;
Situation: we did a fix on MOODLE_19_STABLE. We modified one file for this fix. This fix needs to be done on Moodle 1.8 and trunk(HEAD). All following CVS instructions will be applied on the file that we changed.&lt;br /&gt;
 &lt;br /&gt;
1. Update to the latest stable versions (HEAD included)&lt;br /&gt;
&lt;br /&gt;
          Right click on the moodle folder&lt;br /&gt;
          CVS update&lt;br /&gt;
          OK&lt;br /&gt;
&lt;br /&gt;
2. On your MOODLE19 branch: commit your fix &lt;br /&gt;
&lt;br /&gt;
          Right Click on the file&lt;br /&gt;
          CVS commit&lt;br /&gt;
          Enter a description: &amp;quot;MDL-XXXX bug fix description&amp;quot;&lt;br /&gt;
          OK&lt;br /&gt;
&lt;br /&gt;
3. On your HEAD repository: merge the changes&lt;br /&gt;
&lt;br /&gt;
          Right Click on the file&lt;br /&gt;
          CVS&amp;gt;&lt;br /&gt;
          Merge...&lt;br /&gt;
          Start: MOODLE_19_MERGED&lt;br /&gt;
          End  : MOODLE_19_STABLE&lt;br /&gt;
          OK&lt;br /&gt;
&lt;br /&gt;
4. If the resulting file have some conflicts, TortoiseCVS displays a red square on the file icon. Edit the file with your text editor and resolve the conflicts.&lt;br /&gt;
&lt;br /&gt;
5. Run a diff to make sure the result is what you expected&lt;br /&gt;
&lt;br /&gt;
          Right Click on the file&lt;br /&gt;
          CVS Diff&lt;br /&gt;
          OK&lt;br /&gt;
&lt;br /&gt;
6. Commit the fix&lt;br /&gt;
&lt;br /&gt;
          Right Click on the file&lt;br /&gt;
          CVS commit&lt;br /&gt;
          Enter a description: &amp;quot;MDL-XXXX bug fix description, merged from 19&amp;quot;&lt;br /&gt;
          OK&lt;br /&gt;
&lt;br /&gt;
We&#039;ve commit MOODLE_19_STABLE and trunk. It&#039;s now time to backport the change on MOODLE_18_STABLE.&lt;br /&gt;
On your MOODLE18 branch: reproduce step 3 to 6.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. On your MOODLE19 branch: update the floating merge tag for the affected file&lt;br /&gt;
&lt;br /&gt;
          Right Click on the file&lt;br /&gt;
          CVS&amp;gt;&lt;br /&gt;
          Tag...&lt;br /&gt;
          Tag: MOODLE_19_MERGED&lt;br /&gt;
          Select &#039;Move existing tag&#039;&lt;br /&gt;
          OK&lt;br /&gt;
&lt;br /&gt;
On your MOODLE18 branch: reproduce step 7 (with Tag: MOODLE_18_MERGED).&lt;br /&gt;
&lt;br /&gt;
===Feature branches for large changes===&lt;br /&gt;
&lt;br /&gt;
Occasionally, there may be a very large feature that needs to be checked in so several people can work on it, but it is too unstable to be included in the main development trunk.&lt;br /&gt;
&lt;br /&gt;
In these cases a short-term branch can be created to work on the feature, and then merged back into the main trunk as soon as possible. An example called MOODLE_19_WIDGET branch can be seen in the above diagram.&lt;br /&gt;
&lt;br /&gt;
If you need to do this for your new WIDGET feature, follow these steps:&lt;br /&gt;
&lt;br /&gt;
1. Discuss with other developers to make sure it&#039;s necessary!&lt;br /&gt;
&lt;br /&gt;
2. Make a new tag on the trunk (for all of moodle) called MOODLE_XX_WIDGET_PRE&lt;br /&gt;
&lt;br /&gt;
          cvs tag -R MOODLE_XX_WIDGET_PRE&lt;br /&gt;
&lt;br /&gt;
3. Create your branch called MOODLE_XX_WIDGET&lt;br /&gt;
&lt;br /&gt;
          cvs tag -Rb MOODLE_XX_WIDGET&lt;br /&gt;
&lt;br /&gt;
4. Work in that branch until the feature is reasonably stable. Commit as necessary.&lt;br /&gt;
&lt;br /&gt;
          cvs commit&lt;br /&gt;
&lt;br /&gt;
5. When ready, merge the whole branch into the trunk, fix conflicts, commit it to the trunk and then abandon the branch.&lt;br /&gt;
&lt;br /&gt;
          cvs update -dPA&lt;br /&gt;
          cvs update -kk -j MOODLE_XX_WIDGET&lt;br /&gt;
          cvs commit&lt;br /&gt;
&lt;br /&gt;
Good luck, be careful and have fun!&lt;br /&gt;
&lt;br /&gt;
==Who on earth is ...==&lt;br /&gt;
&lt;br /&gt;
Some of the people committing to the Moodle codebase have non-boring account names on the CVS server. If you are ever looking at a CVS commit, and wondering &amp;quot;who on earth is this purpleblob person?&amp;quot; This information is now available at: [http://moodle.org/mod/cvsadmin/view.php?cid=1 Moodle developers with write access].&lt;br /&gt;
&lt;br /&gt;
==Tips and Hints==&lt;br /&gt;
* [http://moodle.org/mod/cvsadmin/ Change your password or SSH key] (click on &amp;quot;Update my developer information&amp;quot;)&lt;br /&gt;
* [[Tracking Moodle CVS with git]]&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=34472 Merging Custom Moodle Code With Stable Releases]&lt;br /&gt;
* [[Unmerged files]]: To see if you&#039;ve forgotten to merge any file.&lt;br /&gt;
* [http://ximbiot.com/cvs/manual/ CVS Manual]&lt;br /&gt;
* [[Development:contrib|Introduction to the &#039;&#039;&#039;contrib&#039;&#039;&#039; area of CVS]]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [http://tracker.moodle.org/browse/MDLSITE-193 &amp;quot;All developers should switch to using the cvs.moodle.org alias&amp;quot;]&lt;br /&gt;
* [[CVS for Administrators]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer|CVS for developers]]&lt;br /&gt;
[[Category:Developer tools]]&lt;br /&gt;
&lt;br /&gt;
[[es:CVS para desarrolladores]]&lt;br /&gt;
[[fr:CVS pour développeurs]]&lt;br /&gt;
[[pt:CVS_para_programadores]]&lt;/div&gt;</summary>
		<author><name>Mattgibson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Development:CVS_for_developers&amp;diff=42320</id>
		<title>Development:CVS for developers</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Development:CVS_for_developers&amp;diff=42320"/>
		<updated>2008-08-18T17:52:12Z</updated>

		<summary type="html">&lt;p&gt;Mattgibson: /* CVS on Windows */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;CVS&#039;&#039;&#039; is the Concurrent Versioning System, a commonly-used way of managing source code for large software projects. CVS keeps all versions of all files so that nothing is ever lost, and usage by different people is tracked. It also provides ways to merge code if two or more people are working on the same file. All code and all versions are stored on a central server (in the case of Moodle, at cvs.moodle.org). The [http://cvsbook.red-bean.com/cvsbook.html CVS book] holds more information about CVS than you need.&lt;br /&gt;
&lt;br /&gt;
If you just want to download Moodle using CVS to run a site, then you probably don&#039;t need this page - please see [[CVS for Administrators]] instead.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Joining the project as a developer==&lt;br /&gt;
&lt;br /&gt;
So, you&#039;ve been offered CVS write access to help us develop and maintain Moodle!  Welcome aboard!&lt;br /&gt;
&lt;br /&gt;
To be able to write changes into [http://cvs.moodle.org/ Moodle&#039;s CVS archive], you first need to have an account on the server.  Only trusted developers get these accounts.  To request access, go to the &amp;quot;Apply for CVS Access&amp;quot; tab on the CVS page on Moodle.org (http://moodle.org/cvs).  Tell us what modules you&#039;d like to access (e.g. a language module), and why.  You&#039;ll receive notification in a day or so.&lt;br /&gt;
&lt;br /&gt;
With that done, you should have all the permissions you need, so you just need to set up your machine and download the current source code so you can start working on it. &lt;br /&gt;
&lt;br /&gt;
For the examples on this page, let&#039;s assume your username is &#039;&#039;&#039;myusername&#039;&#039;&#039; and your password is &#039;&#039;&#039;mypassword&#039;&#039;&#039;. Things are a lot easier if you use an SSH key to access the server, as you won&#039;t have to keep typing these in. Check [[Development:SSH_key | here]] for instructions on how to make one.&lt;br /&gt;
&lt;br /&gt;
==CVS modules==&lt;br /&gt;
&lt;br /&gt;
Within CVS, the word &amp;quot;modules&amp;quot; refers to separate collections of code. In Moodle we have the following modules within our repository:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;moodle&#039;&#039;&#039; - the main Moodle source code&lt;br /&gt;
* &#039;&#039;&#039;lang&#039;&#039;&#039; - all the language packs&lt;br /&gt;
* &#039;&#039;&#039;[[Development:contrib|contrib]]&#039;&#039;&#039; - user contributions and other assorted code in development&lt;br /&gt;
* &#039;&#039;&#039;mysql&#039;&#039;&#039; - a customised phpMyAdmin to plug into Moodle for database admin&lt;br /&gt;
* &#039;&#039;&#039;windows-cron&#039;&#039;&#039; - a small package that makes cron possible on Windows systems&lt;br /&gt;
* &#039;&#039;&#039;docs&#039;&#039;&#039; - various extra user-contributed documentation&lt;br /&gt;
&lt;br /&gt;
Most people are working on the existing features in the moodle module, but many are also contributing new ideas in the contrib modules. Once code reaches a certain level of maturity in the contrib area, it can be migrated over into the main moodle tree.&lt;br /&gt;
&lt;br /&gt;
==Basic CVS commands==&lt;br /&gt;
&lt;br /&gt;
===CVS on Unix===&lt;br /&gt;
&lt;br /&gt;
Moodle CVS uses ssh as a transport layer for security, so you will have to set a CVS_RSH environment variable in your Unix shell. It&#039;s best to put these commands in your .bashrc or .cshrc so you don&#039;t have to type it all the time:&lt;br /&gt;
        setenv CVS_RSH ssh (for csh, tcsh etc)&lt;br /&gt;
        export CVS_RSH=ssh (for sh, bash etc)&lt;br /&gt;
&lt;br /&gt;
Next, you can check out the latest development version of Moodle using this (all one line). NOTE: Don&#039;t try to do run this first CVS command over an existing moodle installation: start fresh with a new directory!:&lt;br /&gt;
        cvs -z3 -d:ext:myusername@cvs.moodle.org:/cvsroot/moodle co moodle&lt;br /&gt;
&lt;br /&gt;
The command is similar for other CVS modules:&lt;br /&gt;
        cvs -z3 -d:ext:myusername@cvs.moodle.org:/cvsroot/moodle co contrib&lt;br /&gt;
&lt;br /&gt;
If you want to checkout a single plugin (attendance block as an example here) from contrib into the current directory, you can use:&lt;br /&gt;
        cvs -z3 -d:ext:myusername@cvs.moodle.org:/cvsroot/moodle co -d attendance contrib/plugins/blocks/attendance&lt;br /&gt;
&lt;br /&gt;
Note that you will be prompted for mypassword for each command unless you set up authorized keys.  Read [[Development:SSH_key|SSH Keys]] for more details on how to set those up.&lt;br /&gt;
&lt;br /&gt;
Now, you should have a new &#039;moodle&#039; directory. You can rename it and move it around if you like. Go into it:&lt;br /&gt;
        cd moodle&lt;br /&gt;
&lt;br /&gt;
All the latest Moodle files should be in there. You can now change files in your copy. To compare your files and directories against the main CVS copy on the server use cvs diff, e.g.:&lt;br /&gt;
        cvs diff -c config-dist.php&lt;br /&gt;
        cvs diff -c lang&lt;br /&gt;
&lt;br /&gt;
To fetch the latest updates from the server use:&lt;br /&gt;
        cvs update -dP&lt;br /&gt;
&lt;br /&gt;
To copy your new files back to the server you would do something like:&lt;br /&gt;
        cd lang/ca&lt;br /&gt;
        cvs commit&lt;br /&gt;
&lt;br /&gt;
You will be prompted to add some comments (depends on your default text editor).   Please write a meaningful, descriptive comment and &#039;&#039;&#039;always include the name of any tracker issues that talk about the issue you are fixing&#039;&#039;&#039; (eg &#039;&#039;&#039;MDL-XXXX&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
After that your changes will be sent to the CVS server and stored in the repository. Done!&lt;br /&gt;
&lt;br /&gt;
To save more time you can put default arguments into a file called .cvsrc in your home directory. For example, mine contains:&lt;br /&gt;
        diff -c&lt;br /&gt;
        update -dP&lt;br /&gt;
&lt;br /&gt;
Try &#039;cvs help&#039; for more details ...&lt;br /&gt;
&lt;br /&gt;
===CVS on Mac OSX===&lt;br /&gt;
&lt;br /&gt;
You can follow the same instructions as for Unix (above) in a terminal window. However, the cvs command is not installed by default in an OSX. You first need to install the XCode Tools. You should find this on your original installation disk. Failing that it can be downloaded (a fairly hefty download) from the Apple developer web site ([http://developer.apple.com]).&lt;br /&gt;
&lt;br /&gt;
===CVS on Windows===&lt;br /&gt;
&lt;br /&gt;
First, you need to download a completely fresh copy of Moodle using your developer account.&lt;br /&gt;
&lt;br /&gt;
1. Get TortoiseCVS from tortoisecvs.org and install it, then reboot. (Tortoise is not currently supported on vista but [http://www.syntevo.com/smartcvs/index.html SmartCVS] works well).&lt;br /&gt;
&lt;br /&gt;
2. Find or create a new folder somewhere where you want Moodle to be downloaded to.&lt;br /&gt;
&lt;br /&gt;
3. Right-mouse-click that folder and choose &amp;quot;CVS Checkout&amp;quot; from the menu. You should see a dialog box.&lt;br /&gt;
&lt;br /&gt;
4. Copy this text into the CVSROOT field (using your own username!):&lt;br /&gt;
&lt;br /&gt;
           :ext:myusername@cvs.moodle.org:/cvsroot/moodle&lt;br /&gt;
&lt;br /&gt;
5. Under the &amp;quot;Module&amp;quot; field, type &amp;quot;moodle&amp;quot; to get the latest development version of Moodle, &amp;quot;contrib&amp;quot; to get the contributions directory, or &amp;quot;mysql&amp;quot; to get the MySQL Admin module.&lt;br /&gt;
&lt;br /&gt;
6. Press the button: &amp;quot;OK&amp;quot; and everything should be downloaded.&lt;br /&gt;
&lt;br /&gt;
A dialog box should show all the files being downloaded, and after a while you should have a complete copy of Moodle. After this first checkout, you can fetch the latest updated files from the CVS server:&lt;br /&gt;
&lt;br /&gt;
# Right-mouse-click on your Moodle folder (or any file) and select &amp;quot;CVS Update&amp;quot;.&lt;br /&gt;
# Sit back and watch the logs scroll by. Take note of conflicts that may occur if your local code has changes that conflict with the incoming versions - you will need to edit these files and resolve the conflicts manually.&lt;br /&gt;
&lt;br /&gt;
After modifying files (you will notice their icons change from green to red!), you can commit them back to the CVS server like this:&lt;br /&gt;
&lt;br /&gt;
# Right-mouse-click on your Moodle folder (or any file) and select &amp;quot;CVS Commit...&amp;quot;.&lt;br /&gt;
# In the dialog box, type a clear description of the changes you are committing.  &#039;&#039;&#039;Always include the name of any tracker issues related to what you are fixing&#039;&#039;&#039; (eg &#039;&#039;&#039;MDL-XXXX&#039;&#039;&#039;).&lt;br /&gt;
# Click &amp;quot;OK&amp;quot;. Your changes will be sent to the server.&lt;br /&gt;
# If you create a folder, BE CAREFUL about using the &amp;quot;CVS Add&amp;quot; option as it will add the folder to CVS without requiring a commit. Once added, the folder cannot be removed from CVS even though it will be pruned so long as it is empty.&lt;br /&gt;
&lt;br /&gt;
Please note that as of April 15 2008, TortoiseCVS 1.10.6 might not work really well with Windows Vista. You could report bugs to TortoiseCVS site (hosted by SourceForge) or google &amp;quot;TortoiseCVS vista&amp;quot; for more details.&lt;br /&gt;
&lt;br /&gt;
N.B. I had enormous headaches with the above settings until I changed from ext to ssh. This was using an ssh certificate on windows 2003 to both check out and commit code. You mileage may vary, of course. [[User:Matt Gibson|Matt Gibson]] 12:52, 18 August 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
==CVS commit messages==&lt;br /&gt;
&lt;br /&gt;
Every commit you make to CVS should have a commit message containing&lt;br /&gt;
* a tracker issue id like MDL-12345 (if necessary, create an issue before committing, the only exception is for very minor typos.)&lt;br /&gt;
* A brief description of the problem you are fixing. (If you are feeling lazy, you may be able to get away with copying and pasting the issue summary from the tracker.)&lt;br /&gt;
* If it is not immediately obvious, a brief summary of why this change fixes the problem. If a longer description is necessary,  you may also want to add more information to the tracker issue, or Moodle Docs, but the code changes + commit message should provide enough clues to how the fix works on their own.&lt;br /&gt;
&lt;br /&gt;
==Working with branches==&lt;br /&gt;
&lt;br /&gt;
This diagram shows how the main moodle module branches into different versions over time.&lt;br /&gt;
&lt;br /&gt;
[[Image:Cvstree.png|CVS tree]]&lt;br /&gt;
&lt;br /&gt;
To see all the current tags and branches that are available, use this command on any old file (such as index.php in the top moodle directory):&lt;br /&gt;
    cvs status -v index.php&lt;br /&gt;
&lt;br /&gt;
Some tagging guidelines:&lt;br /&gt;
* Tag and branch names should always be all upper-case.&lt;br /&gt;
* Tags and branches should ALWAYS be applied to the entire module (all of Moodle). Don&#039;t tag individual files or directories.&lt;br /&gt;
* We don&#039;t allow renaming of tags because people may be relying on them, so get them right the first time!&lt;br /&gt;
&lt;br /&gt;
===Trunk development===&lt;br /&gt;
&lt;br /&gt;
The Trunk of CVS is the main development version of Moodle. In CVS it is also known as the HEAD, or default branch.&lt;br /&gt;
&lt;br /&gt;
Moodle developers try to keep this stable as possible, but as it usually contains new code it probably has bugs and small instabilities.&lt;br /&gt;
&lt;br /&gt;
Every now and then we decide the product has enough features to make a release. At this time, the trunk is tagged with a MOODLE_XX_BETA tag (in case we ever want to roll back to that point) and a new branch is formed for the release, called MOODLE_XX_STABLE.&lt;br /&gt;
&lt;br /&gt;
A Beta package is also released at this point - it&#039;s for testers who don&#039;t use CVS but want to test the latest features and report bugs.&lt;br /&gt;
&lt;br /&gt;
===Stable branches for each release===&lt;br /&gt;
&lt;br /&gt;
As soon as the stable branch MOODLE_XX_STABLE is created, development efforts will fork into two streams for a while. Some people may continue working on new features in the trunk for the next release, but most developers should be concentrating on using the current STABLE branch and fixing bugs that are found in it.&lt;br /&gt;
&lt;br /&gt;
You can switch your local copy of Moodle to the STABLE version using the following command in Unix from the root directory:&lt;br /&gt;
    cvs update -dP -r MOODLE_XX_STABLE&lt;br /&gt;
&lt;br /&gt;
After that, all the commands described above will apply to that stable version. To return to the trunk version just issue:&lt;br /&gt;
    cvs update -dPA&lt;br /&gt;
&lt;br /&gt;
On Windows clients you should have a menu from which you can choose the branch.&lt;br /&gt;
&lt;br /&gt;
Once the new STABLE branch really stabilises, a release can be declared. Packages are created for distribution and the branch will be tagged (by Martin Dougiamas) with a tag named: MOODLE_XXX&lt;br /&gt;
&lt;br /&gt;
===Merging fixes===&lt;br /&gt;
&lt;br /&gt;
All bug fixes in any STABLE branch should be merged back into the trunk so that they become available in future versions of Moodle. A floating tag called MOODLE_XX_MERGED needs to be maintained to keep track of the last merge. The procedure for such a merge is as follows (I&#039;m using CVS on the Unix command line but the steps are the same for any CVS client):&lt;br /&gt;
&lt;br /&gt;
[[Image:Merging.png|thumb|right|300px|This diagram summarises the process]]&lt;br /&gt;
1. I highly recommend keeping one checked out copy of each stable branch and the trunk/head version locally to make it easier to jump between them.  Set them all up as virtual web sites on your development machine.  I use directories like /moodle/18, /moodle/19 /moodle/dev etc.&lt;br /&gt;
&lt;br /&gt;
2. Update to the latest stable version (I&#039;ll use XX in the example but it could be 18, 19 etc) for the relevant files, and do a cvs diff just to double-check exactly what you are checking in.  Note you only need to update the files/directories you are working in, but sometimes it help to update everything anyway just to do a final check on the functionality using the web.&lt;br /&gt;
&lt;br /&gt;
          cd /moodle/XX/user&lt;br /&gt;
          cvs update -dPA&lt;br /&gt;
          cvs diff -c file1.php file2.php&lt;br /&gt;
&lt;br /&gt;
3. If all looks OK, check in the fix to the stable branch.  Make sure that the commit message contains the bug tracker ID (eg MDL-1111) and a decent description of your thoughts on the fix.  If you don&#039;t specify a message in the command line, you&#039;ll be put into an editor to type one.&lt;br /&gt;
&lt;br /&gt;
          cvs commit -m &amp;quot;MDL-1234 Corrected a small typo in the user name field&amp;quot; file1.php file2.php&lt;br /&gt;
&lt;br /&gt;
4. Go to the very latest trunk version and make sure it&#039;s up-to-date.&lt;br /&gt;
          &lt;br /&gt;
          cd /moodle/dev/user&lt;br /&gt;
          cvs update -dPA&lt;br /&gt;
&lt;br /&gt;
5. Merge everything into your local copy of the trunk from your stable branch since the last merge.  You can use the same sequence of (4) and (5) to merge the changes into other stable branches too (to backport the fix to the previous stable versions).&lt;br /&gt;
&lt;br /&gt;
          cvs update -kk -j MOODLE_XX_MERGED -j MOODLE_XX_STABLE file1.php file2.php&lt;br /&gt;
&lt;br /&gt;
6. Carefully watch the update logs for conflicts, and fix every file that you see with a conflict.  Afterwards, it may help to just run a diff to make sure the result is what you expected:&lt;br /&gt;
&lt;br /&gt;
          cvs diff -c file1.php file2.php&lt;br /&gt;
&lt;br /&gt;
7. Check your merged local copy back into CVS trunk version&lt;br /&gt;
&lt;br /&gt;
          cvs commit -m &amp;quot;MDL-1234 Corrected a small typo in the user name field, merged from XX&amp;quot; file1.php file2.php&lt;br /&gt;
&lt;br /&gt;
8. Go back to your branch version&lt;br /&gt;
&lt;br /&gt;
          cd /moodle/XX/user&lt;br /&gt;
&lt;br /&gt;
9. Update the floating merge tag for the affected files (so that it matches MOODLE_XX_STABLE) so that this process can be repeated next time&lt;br /&gt;
&lt;br /&gt;
          cvs tag -RF MOODLE_XX_MERGED file1.php file2.php&lt;br /&gt;
&lt;br /&gt;
Finally, the values for $version in all the Moodle version.php files within the stable branch should not be updated at all if possible (except the last digit if absolutely necessary). The reason is that someone updating from a very stable version to the next very stable version could miss database upgrades that happened on the trunk.&lt;br /&gt;
&lt;br /&gt;
In other words, if you have changes to the database schema to commit to a stable branch, please check with Martin Dougiamas, or one of the other core Moodle developers.&lt;br /&gt;
&lt;br /&gt;
===Merging fixes with TortoiseCVS===&lt;br /&gt;
Situation: we did a fix on MOODLE_19_STABLE. We modified one file for this fix. This fix needs to be done on Moodle 1.8 and trunk(HEAD). All following CVS instructions will be applied on the file that we changed.&lt;br /&gt;
 &lt;br /&gt;
1. Update to the latest stable versions (HEAD included)&lt;br /&gt;
&lt;br /&gt;
          Right click on the moodle folder&lt;br /&gt;
          CVS update&lt;br /&gt;
          OK&lt;br /&gt;
&lt;br /&gt;
2. On your MOODLE19 branch: commit your fix &lt;br /&gt;
&lt;br /&gt;
          Right Click on the file&lt;br /&gt;
          CVS commit&lt;br /&gt;
          Enter a description: &amp;quot;MDL-XXXX bug fix description&amp;quot;&lt;br /&gt;
          OK&lt;br /&gt;
&lt;br /&gt;
3. On your HEAD repository: merge the changes&lt;br /&gt;
&lt;br /&gt;
          Right Click on the file&lt;br /&gt;
          CVS&amp;gt;&lt;br /&gt;
          Merge...&lt;br /&gt;
          Start: MOODLE_19_MERGED&lt;br /&gt;
          End  : MOODLE_19_STABLE&lt;br /&gt;
          OK&lt;br /&gt;
&lt;br /&gt;
4. If the resulting file have some conflicts, TortoiseCVS displays a red square on the file icon. Edit the file with your text editor and resolve the conflicts.&lt;br /&gt;
&lt;br /&gt;
5. Run a diff to make sure the result is what you expected&lt;br /&gt;
&lt;br /&gt;
          Right Click on the file&lt;br /&gt;
          CVS Diff&lt;br /&gt;
          OK&lt;br /&gt;
&lt;br /&gt;
6. Commit the fix&lt;br /&gt;
&lt;br /&gt;
          Right Click on the file&lt;br /&gt;
          CVS commit&lt;br /&gt;
          Enter a description: &amp;quot;MDL-XXXX bug fix description, merged from 19&amp;quot;&lt;br /&gt;
          OK&lt;br /&gt;
&lt;br /&gt;
We&#039;ve commit MOODLE_19_STABLE and trunk. It&#039;s now time to backport the change on MOODLE_18_STABLE.&lt;br /&gt;
On your MOODLE18 branch: reproduce step 3 to 6.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. On your MOODLE19 branch: update the floating merge tag for the affected file&lt;br /&gt;
&lt;br /&gt;
          Right Click on the file&lt;br /&gt;
          CVS&amp;gt;&lt;br /&gt;
          Tag...&lt;br /&gt;
          Tag: MOODLE_19_MERGED&lt;br /&gt;
          Select &#039;Move existing tag&#039;&lt;br /&gt;
          OK&lt;br /&gt;
&lt;br /&gt;
On your MOODLE18 branch: reproduce step 7 (with Tag: MOODLE_18_MERGED).&lt;br /&gt;
&lt;br /&gt;
===Feature branches for large changes===&lt;br /&gt;
&lt;br /&gt;
Occasionally, there may be a very large feature that needs to be checked in so several people can work on it, but it is too unstable to be included in the main development trunk.&lt;br /&gt;
&lt;br /&gt;
In these cases a short-term branch can be created to work on the feature, and then merged back into the main trunk as soon as possible. An example called MOODLE_19_WIDGET branch can be seen in the above diagram.&lt;br /&gt;
&lt;br /&gt;
If you need to do this for your new WIDGET feature, follow these steps:&lt;br /&gt;
&lt;br /&gt;
1. Discuss with other developers to make sure it&#039;s necessary!&lt;br /&gt;
&lt;br /&gt;
2. Make a new tag on the trunk (for all of moodle) called MOODLE_XX_WIDGET_PRE&lt;br /&gt;
&lt;br /&gt;
          cvs tag -R MOODLE_XX_WIDGET_PRE&lt;br /&gt;
&lt;br /&gt;
3. Create your branch called MOODLE_XX_WIDGET&lt;br /&gt;
&lt;br /&gt;
          cvs tag -Rb MOODLE_XX_WIDGET&lt;br /&gt;
&lt;br /&gt;
4. Work in that branch until the feature is reasonably stable. Commit as necessary.&lt;br /&gt;
&lt;br /&gt;
          cvs commit&lt;br /&gt;
&lt;br /&gt;
5. When ready, merge the whole branch into the trunk, fix conflicts, commit it to the trunk and then abandon the branch.&lt;br /&gt;
&lt;br /&gt;
          cvs update -dPA&lt;br /&gt;
          cvs update -kk -j MOODLE_XX_WIDGET&lt;br /&gt;
          cvs commit&lt;br /&gt;
&lt;br /&gt;
Good luck, be careful and have fun!&lt;br /&gt;
&lt;br /&gt;
==Who on earth is ...==&lt;br /&gt;
&lt;br /&gt;
Some of the people committing to the Moodle codebase have non-boring account names on the CVS server. If you are ever looking at a CVS commit, and wondering &amp;quot;who on earth is this purpleblob person?&amp;quot; This information is now available at: [http://moodle.org/mod/cvsadmin/view.php?cid=1 Moodle developers with write access].&lt;br /&gt;
&lt;br /&gt;
==Tips and Hints==&lt;br /&gt;
* [http://moodle.org/mod/cvsadmin/ Change your password or SSH key] (click on &amp;quot;Update my developer information&amp;quot;)&lt;br /&gt;
* [[Tracking Moodle CVS with git]]&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=34472 Merging Custom Moodle Code With Stable Releases]&lt;br /&gt;
* [[Unmerged files]]: To see if you&#039;ve forgotten to merge any file.&lt;br /&gt;
* [http://ximbiot.com/cvs/manual/ CVS Manual]&lt;br /&gt;
* [[Development:contrib|Introduction to the &#039;&#039;&#039;contrib&#039;&#039;&#039; area of CVS]]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [http://tracker.moodle.org/browse/MDLSITE-193 &amp;quot;All developers should switch to using the cvs.moodle.org alias&amp;quot;]&lt;br /&gt;
* [[CVS for Administrators]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer|CVS for developers]]&lt;br /&gt;
[[Category:Developer tools]]&lt;br /&gt;
&lt;br /&gt;
[[es:CVS para desarrolladores]]&lt;br /&gt;
[[fr:CVS pour développeurs]]&lt;br /&gt;
[[pt:CVS_para_programadores]]&lt;/div&gt;</summary>
		<author><name>Mattgibson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Development:Usability_issues_-_Tabs&amp;diff=42211</id>
		<title>Development:Usability issues - Tabs</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Development:Usability_issues_-_Tabs&amp;diff=42211"/>
		<updated>2008-08-16T17:39:22Z</updated>

		<summary type="html">&lt;p&gt;Mattgibson: /* Possibility of moving tabs using javascript mentioned in the Fluid project (Javascript vs. AJAX) */  added YUI pointer&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Identification of the tabs ==&lt;br /&gt;
&lt;br /&gt;
In the followint table the tab line of each activity is described.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+&#039;&#039;&#039;Tab line of the different activities&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;background:#ffdead;&amp;quot; | ID&lt;br /&gt;
! style=&amp;quot;background:#ffdead;&amp;quot; | Activity&lt;br /&gt;
! style=&amp;quot;background:#efefef;&amp;quot; | Tab line (default tab in bold)&lt;br /&gt;
! style=&amp;quot;background:#efefef;&amp;quot; | Justification&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | 1&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | Quiz&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | Info, Results, Preview, &#039;&#039;&#039;Edit&#039;&#039;&#039;(with subtabs &#039;&#039;&#039;Quiz&#039;&#039;&#039;, Questions, Categories, Import, Export), Settings, Assign roles, Override permissions &lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; |&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | 2&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | Forum &lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | &#039;&#039;&#039;Edit&#039;&#039;&#039;, Settings, Assign roles, Override permissions &lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | Edit would contain the information of &amp;quot;add a discussion topic&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | 3&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | Glossary&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | &#039;&#039;&#039;Edit&#039;&#039;&#039; (with subtabs &#039;&#039;&#039;Add entry&#039;&#039;&#039;, Import, Export), Search, Browse (with subtabs Browse by alphabet, Browse by category,  Browse by date, Browse by Author), View, Settings, Assign roles, Override permissions &lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | Edit would contain the information of &amp;quot;add a new entry&amp;quot; in Add entry. The print option will be accessible from View. &lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | 4&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | Chat&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | &#039;&#039;&#039;Enter to the chat&#039;&#039;&#039; (with subtabs &#039;&#039;&#039;Normal mode&#039;&#039;&#039; and without frames and Javascript), chat history, Settings, Assign roles, Override permissions &lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | I would replace &amp;quot;View past chat sessions&amp;quot; by chat history (it must be taken into account that it has been used the concept &amp;quot;message history&amp;quot; previously at Moodle).&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | 5&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | Choice&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | &#039;&#039;&#039;Edit&#039;&#039;&#039;, View responses, Settings, Assign roles, Override permissions &lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; |&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | 6&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | Assignments&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | &#039;&#039;&#039;Edit&#039;&#039;&#039;, View attempts, Settings, Assign roles, Override permissions &lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; |&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | 7&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | Database&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | View list, view single, search, add entry, export, templates, &#039;&#039;&#039;fields&#039;&#039;&#039;, presets, Settings, Assign roles, Override permissions &lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; |&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | 8&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | Lesson&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | Preview, &#039;&#039;&#039;Edit&#039;&#039;&#039; (with subtabs &#039;&#039;&#039;collapsed&#039;&#039;&#039;, expanded), Reports, Grade essays, Settings, Assign roles, Override permissions &lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; |&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | 9&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | Survey&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | &#039;&#039;&#039;Edit&#039;&#039;&#039;, View responses (with subtabs &#039;&#039;&#039;Questions&#039;&#039;&#039;, students, download), Settings, Assign roles, Override permissions &lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; |&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | 10&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | Wiki&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | &#039;&#039;&#039;View&#039;&#039;&#039;, Edit, Links, History, Search wiki, Choose wiki links, Administration, Settings, Assign roles, Override permissions &lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | The &amp;quot;reload this page&amp;quot; button must be maintained in all pages.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | 11&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | Journal&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | &#039;&#039;&#039;View Journals&#039;&#039;&#039;, Edit, Settings, Assign roles, Override permissions &lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | &lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | 12&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | Hotpotatoe&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | &#039;&#039;&#039;View Reports&#039;&#039;&#039; (with subtabs &#039;&#039;&#039;Reports&#039;&#039;&#039;, See all course Grades), Settings, Assign roles, Override permissions &lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | The page hot potatoes quiz should not be changed nor the quiz. However, the description of the subtabs above corresponds when selecting a specific potatoes quiz (http://localhost/mod/hotpot/report.php or screenshot 3 of the hotpotatoes captures) &lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | 13&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | Exercise&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | Info, &#039;&#039;&#039;Setup Exercise&#039;&#039;&#039; (with subtabs &#039;&#039;&#039;Amend Assessment Elements&#039;&#039;&#039;, Submit Exercise Description, Administration),  Allow Student Assessments and Submissions (with subtabs Submissions for Assessment, Administration), Show Overall Grades and League Table (with subtabs Display of Final Grades, Administration), Settings, Assign roles, Override permissions &lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | &lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | 14&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | Workshop&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | &#039;&#039;&#039;Info&#039;&#039;&#039;, Description, Grading grade analysis, Administration, Settings, Assign roles, Override permissions &lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Next of this classification, an analysis of the name of the tabs and their order have been done:&lt;br /&gt;
* The world &amp;quot;history&amp;quot; will be used both for the chat and the wiki history. So the tab will be only called &amp;quot;History&amp;quot;&lt;br /&gt;
* The order of the tabs will be followed by this logic: info, preview, edit/enter, view, search, add entry, export, templates, fields, presets, results, Reports, Grade essays, history, links, Choose wiki links, Administration, settings, Assign roles, Override permissions. Depending on if an activity has or not this tabs will be ordered in a determined way.&lt;br /&gt;
* Another option will be to group in Update tabs Settings, Assign roles, Override permissions, so the order of tabs will be less (because this three tabs previously mentioned would be subtabs). This would be a good idea to reduce the number of tabs and because this actions won&#039;t be done with frequency.&lt;br /&gt;
* It must be taken into account that by default it would be displayed the tab and subtab that is used more frequently in the activity and the one that describes more its content.&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+&#039;&#039;&#039;Final Tab line after the study&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;background:#ffdead;&amp;quot; | ID&lt;br /&gt;
! style=&amp;quot;background:#ffdead;&amp;quot; | Activity&lt;br /&gt;
! style=&amp;quot;background:#efefef;&amp;quot; | Tab line (default tab in bold)&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | 1&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | Quiz&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | Info, Preview, &#039;&#039;&#039;Edit&#039;&#039;&#039;(with subtabs &#039;&#039;&#039;Quiz&#039;&#039;&#039;, Questions, Categories, Import, Export), Results, Update quiz (with subtabs Settings, Assign roles, Override permissions)&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | 2&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | Forum &lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | &#039;&#039;&#039;Edit&#039;&#039;&#039;, Update Forum (with subtabs Settings, Assign roles, Override permissions)&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | 3&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | Glossary&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | &#039;&#039;&#039;Edit&#039;&#039;&#039; (with subtabs &#039;&#039;&#039;Add entry&#039;&#039;&#039;, Import, Export), View, Search, Browse (with subtabs Browse by alphabet, Browse by category,  Browse by date, Browse by Author), Update Glossary (with subtabs Settings, Assign roles, Override permissions)&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | 4&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | Chat&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | &#039;&#039;&#039;Enter to the chat&#039;&#039;&#039; (with subtabs &#039;&#039;&#039;Normal mode&#039;&#039;&#039; and without frames and Javascript), history, Update chat (with subtabs Settings, Assign roles, Override permissions)&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | 5&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | Choice&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | &#039;&#039;&#039;Edit&#039;&#039;&#039;, View responses, Update Choice (with subtabs Settings, Assign roles, Override permissions)&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | 6&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | Assignments&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | &#039;&#039;&#039;Edit&#039;&#039;&#039;, View attempts, Update assignments (with subtabs Settings, Assign roles, Override permissions)&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | 7&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | Database&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | View list, view single, search, add entry, export, templates, &#039;&#039;&#039;fields&#039;&#039;&#039;, presets, Update database (with subtabs Settings, Assign roles, Override permissions)&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | 8&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | Lesson&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | Preview, &#039;&#039;&#039;Edit&#039;&#039;&#039; (with subtabs &#039;&#039;&#039;Collapsed&#039;&#039;&#039;, Expanded), Reports, Grade essays, Update lesson (with subtabs Settings, Assign roles, Override permissions)&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | 9&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | Survey&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | &#039;&#039;&#039;Edit&#039;&#039;&#039;, View responses (with subtabs &#039;&#039;&#039;Questions&#039;&#039;&#039;, Students, Download), Update survey (with subtabs Settings, Assign roles, Override permissions)&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | 10&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | Wiki&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | Edit, &#039;&#039;&#039;View&#039;&#039;&#039;, Search wiki, History, Links, Choose wiki links, Administration, Update wiki (with subtabs Settings, Assign roles, Override permissions)&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | 11&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | Journal&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | Edit, &#039;&#039;&#039;View&#039;&#039;&#039;, Update journal (with subtabs Settings, Assign roles, Override permissions)&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | 12&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | Hotpotatoes&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; |  &#039;&#039;&#039;View Reports&#039;&#039;&#039; (with subtabs &#039;&#039;&#039;Reports&#039;&#039;&#039;, See all course Grades), Update hotpotatoe (with subtabs Settings, Assign roles, Override permissions)&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | 13&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | Exercise&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | Info, &#039;&#039;&#039;Setup Exercise&#039;&#039;&#039; (with subtabs &#039;&#039;&#039;Amend Assessment Elements&#039;&#039;&#039;, Submit Exercise Description, Administration),  Allow Student Assessments and Submissions (with subtabs Submissions for Assessment, Administration), Show Overall Grades and League Table (with subtabs Display of Final Grades, Administration), Update exercise (with subtabs Settings, Assign roles, Override permissions)&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | 14&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | Workshop&lt;br /&gt;
| style=&amp;quot;border-bottom:3px solid grey;&amp;quot; | &#039;&#039;&#039;Info&#039;&#039;&#039;, Description, Grading grade analysis, Administration, Update workshop (with subtabs Settings, Assign roles, Override permissions)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
=== Quiz ===&lt;br /&gt;
[[Image:Quiz.JPG]]&lt;br /&gt;
=== Glossary ===&lt;br /&gt;
[[Image:Glossary.JPG]]&lt;br /&gt;
=== Chat ===&lt;br /&gt;
[[Image:Chat.JPG]]&lt;br /&gt;
=== Choice ===&lt;br /&gt;
[[Image:Choice.JPG]]&lt;br /&gt;
=== Forum ===&lt;br /&gt;
[[Image:Forum.JPG]]&lt;br /&gt;
=== Assignments ===&lt;br /&gt;
[[Image:Assignments2.JPG]]&lt;br /&gt;
=== Database ===&lt;br /&gt;
[[Image:Database2.JPG]]&lt;br /&gt;
=== Lesson ===&lt;br /&gt;
[[Image:Lesson.JPG]]&lt;br /&gt;
=== Survey ===&lt;br /&gt;
[[Image:Survey.JPG]]&lt;br /&gt;
=== Wiki ===&lt;br /&gt;
[[Image:Wiki.JPG]]&lt;br /&gt;
=== Journal ===&lt;br /&gt;
[[Image:Journal.JPG]]&lt;br /&gt;
&lt;br /&gt;
=== HotPotatoe ===&lt;br /&gt;
Screenshot 1: &#039;&#039;&#039;Taking the hotpotatoe&#039;&#039;&#039;&lt;br /&gt;
[[Image:Hotpotatoe.JPG]]&lt;br /&gt;
Screenshot 2:&#039;&#039;&#039;Listing hotpotatoes quizes&#039;&#039;&#039;&lt;br /&gt;
[[Image:Hotpotatoe2.JPG]]&lt;br /&gt;
Screenshot 3:&#039;&#039;&#039;Viewing the results of a hotpotatoe quiz&#039;&#039;&#039;&lt;br /&gt;
[[Image:Hotpotatoe3.JPG]]&lt;br /&gt;
&lt;br /&gt;
=== Exercise ===&lt;br /&gt;
Screenshot 1: &#039;&#039;&#039;Exercise main page&#039;&#039;&#039;&lt;br /&gt;
[[Image:Exercise.JPG]]&lt;br /&gt;
Screenshot 2:&#039;&#039;&#039;Managing the exercise&#039;&#039;&#039;&lt;br /&gt;
[[Image:Exercise2.JPG]]&lt;br /&gt;
&lt;br /&gt;
=== Workshop ===&lt;br /&gt;
[[Image:Workshop.JPG]]&lt;br /&gt;
&lt;br /&gt;
== Possibility of moving tabs using javascript mentioned in the Fluid project (Javascript vs. AJAX) ==&lt;br /&gt;
&lt;br /&gt;
AJAX just uses javascript to communicate with the server in the form of XML. There&#039;s no difference between javascript and AJAX, AJAX is an implementation of javascript.&lt;br /&gt;
&lt;br /&gt;
JAVAX it is great for making sites a bit more responsive. Common examples include filling in drop down sub menus based on the users choice. For example, &amp;quot;please select which country you live in&amp;quot; -&amp;gt; &amp;quot;and the city&amp;quot;. The non ajax-y way would be to either load all possible citys for all countries (large and slow), and swap between them with something like an onSelect. Using ajax you can wait for the user to select the country, and bounce back to the server to get the city list, and then swap it in. Should send less data to the user, and be a bit more responsive.&lt;br /&gt;
&lt;br /&gt;
AJAX would perhaps be the best option. It must be noticed, that AJAX is mentioned as an implementation at the tabs analysis of [http://www.useit.com/alertbox/tabs.html Jakob Nielsen&#039;s Website].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There is a nice YUI tool that will make this AJAX behaviour easy - [http://developer.yahoo.com/yui/tabview/ tabview] [[User:Matt Gibson|Matt Gibson]] 12:39, 16 August 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
== Circumstances would tabs cause more confusion or not be recommended ==&lt;br /&gt;
&lt;br /&gt;
It would be recommended to add tabs and delete buttons like the update activity button because the information of the activity is displayed in the same page and accessing with that button increments too much the number of clicks to update.&lt;br /&gt;
&lt;br /&gt;
Furthermore, the tabs is an apropriately use here as it comprises the points mentioned in [http://www.useit.com/alertbox/tabs.html Jakob Nielsen&#039;s Website]([https://docs.moodle.org/en/Student_projects/Usability_issues/T1 Reference 14])&lt;br /&gt;
&lt;br /&gt;
# Alternate between views within the same context. &lt;br /&gt;
# It logically chunks the content behind the tabs so users can easily predict what they&#039;ll find when they select a given tab. (Card sorting is one option for researching this &amp;quot;mini-IA&amp;quot; problem. If you don&#039;t find clearly distinct groupings, then tabs are likely the wrong interface control for managing your content.) &lt;br /&gt;
# Users don&#039;t need to simultaneously see content from multiple tabs.&lt;br /&gt;
# The tabs are roughly parallel in nature. &lt;br /&gt;
# &#039;&#039;&#039;The currently selected tab is highlighted&#039;&#039;&#039;. This is a really important feature that has not been implemented in Moodle tabs.&lt;br /&gt;
# The unselected tabs are clearly visible and readable. &lt;br /&gt;
# The current tab is connected to the content area, just as it would be if we were shuffling several physical index cards that had tabs stuck to them. &lt;br /&gt;
# The labels are short and use plain language, rather than made-up terms. &lt;br /&gt;
# The labels in the rightmost example above use Title-Style Capitalization: each word&#039;s first letter is uppercased. &lt;br /&gt;
# There&#039;s only one row of tabs.&lt;br /&gt;
# The row of tabs is on top of the panel — not on the sides or the bottom where users would often overlook them. &lt;br /&gt;
# The scope controlled by the tabs should be obvious from the visual design.&lt;br /&gt;
# Fast response time ensures that clicking a new tab immediately brings the corresponding panel to the front. This is probably achieved through AJAX, but the programming technique is not important. What is important is to make the action fast enough (ideally &amp;lt;0.1 s) that people feel there&#039;s a physical connection between their mouse click and the appearance of the chosen panel.&lt;br /&gt;
&lt;br /&gt;
[[Category:Usability]]&lt;/div&gt;</summary>
		<author><name>Mattgibson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Ajax_marking_block&amp;diff=42172</id>
		<title>Ajax marking block</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Ajax_marking_block&amp;diff=42172"/>
		<updated>2008-08-15T22:15:45Z</updated>

		<summary type="html">&lt;p&gt;Mattgibson: /* Configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The AJAX marking block displays all the ungraded work you need to mark in a tree structure of all of the courses you are part of, along with a count of how many there are for each course &amp;amp; assessment item. The main idea is to be able to view and complete all of your marking without leaving the front page. &lt;br /&gt;
&lt;br /&gt;
At its simplest level, e.g. assignments, it shows &#039;&#039;&#039;Course name &amp;gt; Assignment name &amp;gt; Student name&#039;&#039;&#039;, each as expandable nodes in the tree. When the student&#039;s name is clicked, a pop-up opens with the work to be graded. Once &#039;Submit&#039; has been clicked in that window, the pop-up closes and tree updates itself by removing the student&#039;s node and altering its total count.&lt;br /&gt;
&lt;br /&gt;
The [[AJAX]] bit means that every time you click on the nodes to expand them, the data for the child nodes is fetched in the background without refreshing the whole page. Clicking &#039;Collapse and refresh&#039; will re-load the whole tree, with an updated count of your marking including anything that was submitted a second or two ago.  &lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
Download the zip file [http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=1459 here]. Copy it to your /blocks/ folder and unzip it there. Then, go to the notifications screen (Front page -&amp;gt; administration block -&amp;gt; notifications) where you should see a message about the tables having been set up correctly.&lt;br /&gt;
&lt;br /&gt;
==Configuring the display of each individual assessment item==&lt;br /&gt;
The block can be set to show or hide each individual assessment item, or show only the assessments by students in certain groups. Clicking on &#039;configure&#039; will bring up an additional tree, which shows only the courses and names of the assessment items. When you click on one of the assessments, you will be faced with a number of options on the right:&lt;br /&gt;
* Show - the default state, where you will see all students&#039; work&lt;br /&gt;
* Show by group - a set of checkboxes will appear with the names of the current groups for that course. You choose which you want to see and group nodes will then be shown between the assessment and student nodes in the main block. The nodes for that assessment will then look like this:  &#039;&#039;&#039;Course -&amp;gt; Assessment -&amp;gt; Group -&amp;gt; Submission&#039;&#039;&#039;&lt;br /&gt;
* Hide - do not display any submissions for this assessment item.&lt;br /&gt;
&lt;br /&gt;
The counting of unmarked submissions respects these choices and they are specific to the user who created them. If you are an admin and wish to set the preferences for others, use the &#039;login as&#039; function to do so.&lt;br /&gt;
&lt;br /&gt;
==Supported types==&lt;br /&gt;
* Assignment&lt;br /&gt;
* Forum (only if ratings are on)&lt;br /&gt;
* Workshop&lt;br /&gt;
* Journal&lt;br /&gt;
* Quiz (essay questions only)&lt;/div&gt;</summary>
		<author><name>Mattgibson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Ajax_marking_block&amp;diff=42171</id>
		<title>Ajax marking block</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Ajax_marking_block&amp;diff=42171"/>
		<updated>2008-08-15T22:14:20Z</updated>

		<summary type="html">&lt;p&gt;Mattgibson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The AJAX marking block displays all the ungraded work you need to mark in a tree structure of all of the courses you are part of, along with a count of how many there are for each course &amp;amp; assessment item. The main idea is to be able to view and complete all of your marking without leaving the front page. &lt;br /&gt;
&lt;br /&gt;
At its simplest level, e.g. assignments, it shows &#039;&#039;&#039;Course name &amp;gt; Assignment name &amp;gt; Student name&#039;&#039;&#039;, each as expandable nodes in the tree. When the student&#039;s name is clicked, a pop-up opens with the work to be graded. Once &#039;Submit&#039; has been clicked in that window, the pop-up closes and tree updates itself by removing the student&#039;s node and altering its total count.&lt;br /&gt;
&lt;br /&gt;
The [[AJAX]] bit means that every time you click on the nodes to expand them, the data for the child nodes is fetched in the background without refreshing the whole page. Clicking &#039;Collapse and refresh&#039; will re-load the whole tree, with an updated count of your marking including anything that was submitted a second or two ago.  &lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
Download the zip file [http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=1459 here]. Copy it to your /blocks/ folder and unzip it there. Then, go to the notifications screen (Front page -&amp;gt; administration block -&amp;gt; notifications) where you should see a message about the tables having been set up correctly.&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
The block can be set to show or hide each individual assessment item, or show only the assessments by students in certain groups. Clicking on &#039;configure&#039; will bring up an additional tree, which shows only the courses and names of the assessment items. When you click on one of the assessments, you will be faced with a number of options on the right:&lt;br /&gt;
* Show - the default state, where you will see all students&#039; work&lt;br /&gt;
* Show by group - a set of checkboxes will appear with the names of the current groups for that course. You choose which you want to see and group nodes will then be shown between the assessment and student nodes in the main block. The nodes for that assessment will then look like this:  &#039;&#039;&#039;Course -&amp;gt; Assessment -&amp;gt; Group -&amp;gt; Submission&#039;&#039;&#039;&lt;br /&gt;
* Hide - do not display any submissions for this assessment item.&lt;br /&gt;
&lt;br /&gt;
The counting of unmarked submissions respects these choices and they are specific to the user who created them. If you are an admin and wish to set the preferences for others, use the &#039;login as&#039; function to do so.&lt;br /&gt;
&lt;br /&gt;
==Supported types==&lt;br /&gt;
* Assignment&lt;br /&gt;
* Forum (only if ratings are on)&lt;br /&gt;
* Workshop&lt;br /&gt;
* Journal&lt;br /&gt;
* Quiz (essay questions only)&lt;/div&gt;</summary>
		<author><name>Mattgibson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Development:CVS_for_developers&amp;diff=42153</id>
		<title>Development:CVS for developers</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Development:CVS_for_developers&amp;diff=42153"/>
		<updated>2008-08-15T11:27:53Z</updated>

		<summary type="html">&lt;p&gt;Mattgibson: /* Joining the project as a developer */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;CVS&#039;&#039;&#039; is the Concurrent Versioning System, a commonly-used way of managing source code for large software projects. CVS keeps all versions of all files so that nothing is ever lost, and usage by different people is tracked. It also provides ways to merge code if two or more people are working on the same file. All code and all versions are stored on a central server (in the case of Moodle, at cvs.moodle.org). The [http://cvsbook.red-bean.com/cvsbook.html CVS book] holds more information about CVS than you need.&lt;br /&gt;
&lt;br /&gt;
If you just want to download Moodle using CVS to run a site, then you probably don&#039;t need this page - please see [[CVS for Administrators]] instead.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Joining the project as a developer==&lt;br /&gt;
&lt;br /&gt;
So, you&#039;ve been offered CVS write access to help us develop and maintain Moodle!  Welcome aboard!&lt;br /&gt;
&lt;br /&gt;
To be able to write changes into [http://cvs.moodle.org/ Moodle&#039;s CVS archive], you first need to have an account on the server.  Only trusted developers get these accounts.  To request access, go to the &amp;quot;Apply for CVS Access&amp;quot; tab on the CVS page on Moodle.org (http://moodle.org/cvs).  Tell us what modules you&#039;d like to access (e.g. a language module), and why.  You&#039;ll receive notification in a day or so.&lt;br /&gt;
&lt;br /&gt;
With that done, you should have all the permissions you need, so you just need to set up your machine and download the current source code so you can start working on it. &lt;br /&gt;
&lt;br /&gt;
For the examples on this page, let&#039;s assume your username is &#039;&#039;&#039;myusername&#039;&#039;&#039; and your password is &#039;&#039;&#039;mypassword&#039;&#039;&#039;. Things are a lot easier if you use an SSH key to access the server, as you won&#039;t have to keep typing these in. Check [[Development:SSH_key | here]] for instructions on how to make one.&lt;br /&gt;
&lt;br /&gt;
==CVS modules==&lt;br /&gt;
&lt;br /&gt;
Within CVS, the word &amp;quot;modules&amp;quot; refers to separate collections of code. In Moodle we have the following modules within our repository:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;moodle&#039;&#039;&#039; - the main Moodle source code&lt;br /&gt;
* &#039;&#039;&#039;lang&#039;&#039;&#039; - all the language packs&lt;br /&gt;
* &#039;&#039;&#039;[[Development:contrib|contrib]]&#039;&#039;&#039; - user contributions and other assorted code in development&lt;br /&gt;
* &#039;&#039;&#039;mysql&#039;&#039;&#039; - a customised phpMyAdmin to plug into Moodle for database admin&lt;br /&gt;
* &#039;&#039;&#039;windows-cron&#039;&#039;&#039; - a small package that makes cron possible on Windows systems&lt;br /&gt;
* &#039;&#039;&#039;docs&#039;&#039;&#039; - various extra user-contributed documentation&lt;br /&gt;
&lt;br /&gt;
Most people are working on the existing features in the moodle module, but many are also contributing new ideas in the contrib modules. Once code reaches a certain level of maturity in the contrib area, it can be migrated over into the main moodle tree.&lt;br /&gt;
&lt;br /&gt;
==Basic CVS commands==&lt;br /&gt;
&lt;br /&gt;
===CVS on Unix===&lt;br /&gt;
&lt;br /&gt;
Moodle CVS uses ssh as a transport layer for security, so you will have to set a CVS_RSH environment variable in your Unix shell. It&#039;s best to put these commands in your .bashrc or .cshrc so you don&#039;t have to type it all the time:&lt;br /&gt;
        setenv CVS_RSH ssh (for csh, tcsh etc)&lt;br /&gt;
        export CVS_RSH=ssh (for sh, bash etc)&lt;br /&gt;
&lt;br /&gt;
Next, you can check out the latest development version of Moodle using this (all one line). NOTE: Don&#039;t try to do run this first CVS command over an existing moodle installation: start fresh with a new directory!:&lt;br /&gt;
        cvs -z3 -d:ext:myusername@cvs.moodle.org:/cvsroot/moodle co moodle&lt;br /&gt;
&lt;br /&gt;
The command is similar for other CVS modules:&lt;br /&gt;
        cvs -z3 -d:ext:myusername@cvs.moodle.org:/cvsroot/moodle co contrib&lt;br /&gt;
&lt;br /&gt;
If you want to checkout a single plugin (attendance block as an example here) from contrib into the current directory, you can use:&lt;br /&gt;
        cvs -z3 -d:ext:myusername@cvs.moodle.org:/cvsroot/moodle co -d attendance contrib/plugins/blocks/attendance&lt;br /&gt;
&lt;br /&gt;
Note that you will be prompted for mypassword for each command unless you set up authorized keys.  Read [[Development:SSH_key|SSH Keys]] for more details on how to set those up.&lt;br /&gt;
&lt;br /&gt;
Now, you should have a new &#039;moodle&#039; directory. You can rename it and move it around if you like. Go into it:&lt;br /&gt;
        cd moodle&lt;br /&gt;
&lt;br /&gt;
All the latest Moodle files should be in there. You can now change files in your copy. To compare your files and directories against the main CVS copy on the server use cvs diff, e.g.:&lt;br /&gt;
        cvs diff -c config-dist.php&lt;br /&gt;
        cvs diff -c lang&lt;br /&gt;
&lt;br /&gt;
To fetch the latest updates from the server use:&lt;br /&gt;
        cvs update -dP&lt;br /&gt;
&lt;br /&gt;
To copy your new files back to the server you would do something like:&lt;br /&gt;
        cd lang/ca&lt;br /&gt;
        cvs commit&lt;br /&gt;
&lt;br /&gt;
You will be prompted to add some comments (depends on your default text editor).   Please write a meaningful, descriptive comment and &#039;&#039;&#039;always include the name of any tracker issues that talk about the issue you are fixing&#039;&#039;&#039; (eg &#039;&#039;&#039;MDL-XXXX&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
After that your changes will be sent to the CVS server and stored in the repository. Done!&lt;br /&gt;
&lt;br /&gt;
To save more time you can put default arguments into a file called .cvsrc in your home directory. For example, mine contains:&lt;br /&gt;
        diff -c&lt;br /&gt;
        update -dP&lt;br /&gt;
&lt;br /&gt;
Try &#039;cvs help&#039; for more details ...&lt;br /&gt;
&lt;br /&gt;
===CVS on Mac OSX===&lt;br /&gt;
&lt;br /&gt;
You can follow the same instructions as for Unix (above) in a terminal window. However, the cvs command is not installed by default in an OSX. You first need to install the XCode Tools. You should find this on your original installation disk. Failing that it can be downloaded (a fairly hefty download) from the Apple developer web site ([http://developer.apple.com]).&lt;br /&gt;
&lt;br /&gt;
===CVS on Windows===&lt;br /&gt;
&lt;br /&gt;
First, you need to download a completely fresh copy of Moodle using your developer account.&lt;br /&gt;
&lt;br /&gt;
1. Get TortoiseCVS from tortoisecvs.org and install it, then reboot. (Tortoise is not currently supported on vista but [http://www.syntevo.com/smartcvs/index.html SmartCVS] works well).&lt;br /&gt;
&lt;br /&gt;
2. Find or create a new folder somewhere where you want Moodle to be downloaded to.&lt;br /&gt;
&lt;br /&gt;
3. Right-mouse-click that folder and choose &amp;quot;CVS Checkout&amp;quot; from the menu. You should see a dialog box.&lt;br /&gt;
&lt;br /&gt;
4. Copy this text into the CVSROOT field (using your own username!):&lt;br /&gt;
&lt;br /&gt;
           :ext:myusername@cvs.moodle.org:/cvsroot/moodle&lt;br /&gt;
&lt;br /&gt;
5. Under the &amp;quot;Module&amp;quot; field, type &amp;quot;moodle&amp;quot; to get the latest development version of Moodle, &amp;quot;contrib&amp;quot; to get the contributions directory, or &amp;quot;mysql&amp;quot; to get the MySQL Admin module.&lt;br /&gt;
&lt;br /&gt;
6. Press the button: &amp;quot;OK&amp;quot; and everything should be downloaded.&lt;br /&gt;
&lt;br /&gt;
A dialog box should show all the files being downloaded, and after a while you should have a complete copy of Moodle. After this first checkout, you can fetch the latest updated files from the CVS server:&lt;br /&gt;
&lt;br /&gt;
# Right-mouse-click on your Moodle folder (or any file) and select &amp;quot;CVS Update&amp;quot;.&lt;br /&gt;
# Sit back and watch the logs scroll by. Take note of conflicts that may occur if your local code has changes that conflict with the incoming versions - you will need to edit these files and resolve the conflicts manually.&lt;br /&gt;
&lt;br /&gt;
After modifying files (you will notice their icons change from green to red!), you can commit them back to the CVS server like this:&lt;br /&gt;
&lt;br /&gt;
# Right-mouse-click on your Moodle folder (or any file) and select &amp;quot;CVS Commit...&amp;quot;.&lt;br /&gt;
# In the dialog box, type a clear description of the changes you are committing.  &#039;&#039;&#039;Always include the name of any tracker issues related to what you are fixing&#039;&#039;&#039; (eg &#039;&#039;&#039;MDL-XXXX&#039;&#039;&#039;).&lt;br /&gt;
# Click &amp;quot;OK&amp;quot;. Your changes will be sent to the server.&lt;br /&gt;
# If you create a folder, BE CAREFUL about using the &amp;quot;CVS Add&amp;quot; option as it will add the folder to CVS without requiring a commit. Once added, the folder cannot be removed from CVS even though it will be pruned so long as it is empty.&lt;br /&gt;
&lt;br /&gt;
Please note that as of April 15 2008, TortoiseCVS 1.10.6 might not work really well with Windows Vista. You could report bugs to TortoiseCVS site (hosted by SourceForge) or google &amp;quot;TortoiseCVS vista&amp;quot; for more details.&lt;br /&gt;
&lt;br /&gt;
==CVS commit messages==&lt;br /&gt;
&lt;br /&gt;
Every commit you make to CVS should have a commit message containing&lt;br /&gt;
* a tracker issue id like MDL-12345 (if necessary, create an issue before committing, the only exception is for very minor typos.)&lt;br /&gt;
* A brief description of the problem you are fixing. (If you are feeling lazy, you may be able to get away with copying and pasting the issue summary from the tracker.)&lt;br /&gt;
* If it is not immediately obvious, a brief summary of why this change fixes the problem. If a longer description is necessary,  you may also want to add more information to the tracker issue, or Moodle Docs, but the code changes + commit message should provide enough clues to how the fix works on their own.&lt;br /&gt;
&lt;br /&gt;
==Working with branches==&lt;br /&gt;
&lt;br /&gt;
This diagram shows how the main moodle module branches into different versions over time.&lt;br /&gt;
&lt;br /&gt;
[[Image:Cvstree.png|CVS tree]]&lt;br /&gt;
&lt;br /&gt;
To see all the current tags and branches that are available, use this command on any old file (such as index.php in the top moodle directory):&lt;br /&gt;
    cvs status -v index.php&lt;br /&gt;
&lt;br /&gt;
Some tagging guidelines:&lt;br /&gt;
* Tag and branch names should always be all upper-case.&lt;br /&gt;
* Tags and branches should ALWAYS be applied to the entire module (all of Moodle). Don&#039;t tag individual files or directories.&lt;br /&gt;
* We don&#039;t allow renaming of tags because people may be relying on them, so get them right the first time!&lt;br /&gt;
&lt;br /&gt;
===Trunk development===&lt;br /&gt;
&lt;br /&gt;
The Trunk of CVS is the main development version of Moodle. In CVS it is also known as the HEAD, or default branch.&lt;br /&gt;
&lt;br /&gt;
Moodle developers try to keep this stable as possible, but as it usually contains new code it probably has bugs and small instabilities.&lt;br /&gt;
&lt;br /&gt;
Every now and then we decide the product has enough features to make a release. At this time, the trunk is tagged with a MOODLE_XX_BETA tag (in case we ever want to roll back to that point) and a new branch is formed for the release, called MOODLE_XX_STABLE.&lt;br /&gt;
&lt;br /&gt;
A Beta package is also released at this point - it&#039;s for testers who don&#039;t use CVS but want to test the latest features and report bugs.&lt;br /&gt;
&lt;br /&gt;
===Stable branches for each release===&lt;br /&gt;
&lt;br /&gt;
As soon as the stable branch MOODLE_XX_STABLE is created, development efforts will fork into two streams for a while. Some people may continue working on new features in the trunk for the next release, but most developers should be concentrating on using the current STABLE branch and fixing bugs that are found in it.&lt;br /&gt;
&lt;br /&gt;
You can switch your local copy of Moodle to the STABLE version using the following command in Unix from the root directory:&lt;br /&gt;
    cvs update -dP -r MOODLE_XX_STABLE&lt;br /&gt;
&lt;br /&gt;
After that, all the commands described above will apply to that stable version. To return to the trunk version just issue:&lt;br /&gt;
    cvs update -dPA&lt;br /&gt;
&lt;br /&gt;
On Windows clients you should have a menu from which you can choose the branch.&lt;br /&gt;
&lt;br /&gt;
Once the new STABLE branch really stabilises, a release can be declared. Packages are created for distribution and the branch will be tagged (by Martin Dougiamas) with a tag named: MOODLE_XXX&lt;br /&gt;
&lt;br /&gt;
===Merging fixes===&lt;br /&gt;
&lt;br /&gt;
All bug fixes in any STABLE branch should be merged back into the trunk so that they become available in future versions of Moodle. A floating tag called MOODLE_XX_MERGED needs to be maintained to keep track of the last merge. The procedure for such a merge is as follows (I&#039;m using CVS on the Unix command line but the steps are the same for any CVS client):&lt;br /&gt;
&lt;br /&gt;
[[Image:Merging.png|thumb|right|300px|This diagram summarises the process]]&lt;br /&gt;
1. I highly recommend keeping one checked out copy of each stable branch and the trunk/head version locally to make it easier to jump between them.  Set them all up as virtual web sites on your development machine.  I use directories like /moodle/18, /moodle/19 /moodle/dev etc.&lt;br /&gt;
&lt;br /&gt;
2. Update to the latest stable version (I&#039;ll use XX in the example but it could be 18, 19 etc) for the relevant files, and do a cvs diff just to double-check exactly what you are checking in.  Note you only need to update the files/directories you are working in, but sometimes it help to update everything anyway just to do a final check on the functionality using the web.&lt;br /&gt;
&lt;br /&gt;
          cd /moodle/XX/user&lt;br /&gt;
          cvs update -dPA&lt;br /&gt;
          cvs diff -c file1.php file2.php&lt;br /&gt;
&lt;br /&gt;
3. If all looks OK, check in the fix to the stable branch.  Make sure that the commit message contains the bug tracker ID (eg MDL-1111) and a decent description of your thoughts on the fix.  If you don&#039;t specify a message in the command line, you&#039;ll be put into an editor to type one.&lt;br /&gt;
&lt;br /&gt;
          cvs commit -m &amp;quot;MDL-1234 Corrected a small typo in the user name field&amp;quot; file1.php file2.php&lt;br /&gt;
&lt;br /&gt;
4. Go to the very latest trunk version and make sure it&#039;s up-to-date.&lt;br /&gt;
          &lt;br /&gt;
          cd /moodle/dev/user&lt;br /&gt;
          cvs update -dPA&lt;br /&gt;
&lt;br /&gt;
5. Merge everything into your local copy of the trunk from your stable branch since the last merge.  You can use the same sequence of (4) and (5) to merge the changes into other stable branches too (to backport the fix to the previous stable versions).&lt;br /&gt;
&lt;br /&gt;
          cvs update -kk -j MOODLE_XX_MERGED -j MOODLE_XX_STABLE file1.php file2.php&lt;br /&gt;
&lt;br /&gt;
6. Carefully watch the update logs for conflicts, and fix every file that you see with a conflict.  Afterwards, it may help to just run a diff to make sure the result is what you expected:&lt;br /&gt;
&lt;br /&gt;
          cvs diff -c file1.php file2.php&lt;br /&gt;
&lt;br /&gt;
7. Check your merged local copy back into CVS trunk version&lt;br /&gt;
&lt;br /&gt;
          cvs commit -m &amp;quot;MDL-1234 Corrected a small typo in the user name field, merged from XX&amp;quot; file1.php file2.php&lt;br /&gt;
&lt;br /&gt;
8. Go back to your branch version&lt;br /&gt;
&lt;br /&gt;
          cd /moodle/XX/user&lt;br /&gt;
&lt;br /&gt;
9. Update the floating merge tag for the affected files (so that it matches MOODLE_XX_STABLE) so that this process can be repeated next time&lt;br /&gt;
&lt;br /&gt;
          cvs tag -RF MOODLE_XX_MERGED file1.php file2.php&lt;br /&gt;
&lt;br /&gt;
Finally, the values for $version in all the Moodle version.php files within the stable branch should not be updated at all if possible (except the last digit if absolutely necessary). The reason is that someone updating from a very stable version to the next very stable version could miss database upgrades that happened on the trunk.&lt;br /&gt;
&lt;br /&gt;
In other words, if you have changes to the database schema to commit to a stable branch, please check with Martin Dougiamas, or one of the other core Moodle developers.&lt;br /&gt;
&lt;br /&gt;
===Merging fixes with TortoiseCVS===&lt;br /&gt;
Situation: we did a fix on MOODLE_19_STABLE. We modified one file for this fix. This fix needs to be done on Moodle 1.8 and trunk(HEAD). All following CVS instructions will be applied on the file that we changed.&lt;br /&gt;
 &lt;br /&gt;
1. Update to the latest stable versions (HEAD included)&lt;br /&gt;
&lt;br /&gt;
          Right click on the moodle folder&lt;br /&gt;
          CVS update&lt;br /&gt;
          OK&lt;br /&gt;
&lt;br /&gt;
2. On your MOODLE19 branch: commit your fix &lt;br /&gt;
&lt;br /&gt;
          Right Click on the file&lt;br /&gt;
          CVS commit&lt;br /&gt;
          Enter a description: &amp;quot;MDL-XXXX bug fix description&amp;quot;&lt;br /&gt;
          OK&lt;br /&gt;
&lt;br /&gt;
3. On your HEAD repository: merge the changes&lt;br /&gt;
&lt;br /&gt;
          Right Click on the file&lt;br /&gt;
          CVS&amp;gt;&lt;br /&gt;
          Merge...&lt;br /&gt;
          Start: MOODLE_19_MERGED&lt;br /&gt;
          End  : MOODLE_19_STABLE&lt;br /&gt;
          OK&lt;br /&gt;
&lt;br /&gt;
4. If the resulting file have some conflicts, TortoiseCVS displays a red square on the file icon. Edit the file with your text editor and resolve the conflicts.&lt;br /&gt;
&lt;br /&gt;
5. Run a diff to make sure the result is what you expected&lt;br /&gt;
&lt;br /&gt;
          Right Click on the file&lt;br /&gt;
          CVS Diff&lt;br /&gt;
          OK&lt;br /&gt;
&lt;br /&gt;
6. Commit the fix&lt;br /&gt;
&lt;br /&gt;
          Right Click on the file&lt;br /&gt;
          CVS commit&lt;br /&gt;
          Enter a description: &amp;quot;MDL-XXXX bug fix description, merged from 19&amp;quot;&lt;br /&gt;
          OK&lt;br /&gt;
&lt;br /&gt;
We&#039;ve commit MOODLE_19_STABLE and trunk. It&#039;s now time to backport the change on MOODLE_18_STABLE.&lt;br /&gt;
On your MOODLE18 branch: reproduce step 3 to 6.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. On your MOODLE19 branch: update the floating merge tag for the affected file&lt;br /&gt;
&lt;br /&gt;
          Right Click on the file&lt;br /&gt;
          CVS&amp;gt;&lt;br /&gt;
          Tag...&lt;br /&gt;
          Tag: MOODLE_19_MERGED&lt;br /&gt;
          Select &#039;Move existing tag&#039;&lt;br /&gt;
          OK&lt;br /&gt;
&lt;br /&gt;
On your MOODLE18 branch: reproduce step 7 (with Tag: MOODLE_18_MERGED).&lt;br /&gt;
&lt;br /&gt;
===Feature branches for large changes===&lt;br /&gt;
&lt;br /&gt;
Occasionally, there may be a very large feature that needs to be checked in so several people can work on it, but it is too unstable to be included in the main development trunk.&lt;br /&gt;
&lt;br /&gt;
In these cases a short-term branch can be created to work on the feature, and then merged back into the main trunk as soon as possible. An example called MOODLE_19_WIDGET branch can be seen in the above diagram.&lt;br /&gt;
&lt;br /&gt;
If you need to do this for your new WIDGET feature, follow these steps:&lt;br /&gt;
&lt;br /&gt;
1. Discuss with other developers to make sure it&#039;s necessary!&lt;br /&gt;
&lt;br /&gt;
2. Make a new tag on the trunk (for all of moodle) called MOODLE_XX_WIDGET_PRE&lt;br /&gt;
&lt;br /&gt;
          cvs tag -R MOODLE_XX_WIDGET_PRE&lt;br /&gt;
&lt;br /&gt;
3. Create your branch called MOODLE_XX_WIDGET&lt;br /&gt;
&lt;br /&gt;
          cvs tag -Rb MOODLE_XX_WIDGET&lt;br /&gt;
&lt;br /&gt;
4. Work in that branch until the feature is reasonably stable. Commit as necessary.&lt;br /&gt;
&lt;br /&gt;
          cvs commit&lt;br /&gt;
&lt;br /&gt;
5. When ready, merge the whole branch into the trunk, fix conflicts, commit it to the trunk and then abandon the branch.&lt;br /&gt;
&lt;br /&gt;
          cvs update -dPA&lt;br /&gt;
          cvs update -kk -j MOODLE_XX_WIDGET&lt;br /&gt;
          cvs commit&lt;br /&gt;
&lt;br /&gt;
Good luck, be careful and have fun!&lt;br /&gt;
&lt;br /&gt;
==Who on earth is ...==&lt;br /&gt;
&lt;br /&gt;
Some of the people committing to the Moodle codebase have non-boring account names on the CVS server. If you are ever looking at a CVS commit, and wondering &amp;quot;who on earth is this purpleblob person?&amp;quot; This information is now available at: [http://moodle.org/mod/cvsadmin/view.php?cid=1 Moodle developers with write access].&lt;br /&gt;
&lt;br /&gt;
==Tips and Hints==&lt;br /&gt;
* [http://moodle.org/mod/cvsadmin/ Change your password or SSH key] (click on &amp;quot;Update my developer information&amp;quot;)&lt;br /&gt;
* [[Tracking Moodle CVS with git]]&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=34472 Merging Custom Moodle Code With Stable Releases]&lt;br /&gt;
* [[Unmerged files]]: To see if you&#039;ve forgotten to merge any file.&lt;br /&gt;
* [http://ximbiot.com/cvs/manual/ CVS Manual]&lt;br /&gt;
* [[Development:contrib|Introduction to the &#039;&#039;&#039;contrib&#039;&#039;&#039; area of CVS]]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [http://tracker.moodle.org/browse/MDLSITE-193 &amp;quot;All developers should switch to using the cvs.moodle.org alias&amp;quot;]&lt;br /&gt;
* [[CVS for Administrators]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer|CVS for developers]]&lt;br /&gt;
[[Category:Developer tools]]&lt;br /&gt;
&lt;br /&gt;
[[es:CVS para desarrolladores]]&lt;br /&gt;
[[fr:CVS pour développeurs]]&lt;br /&gt;
[[pt:CVS_para_programadores]]&lt;/div&gt;</summary>
		<author><name>Mattgibson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Development:SSH_key&amp;diff=42152</id>
		<title>Development:SSH key</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Development:SSH_key&amp;diff=42152"/>
		<updated>2008-08-15T10:53:13Z</updated>

		<summary type="html">&lt;p&gt;Mattgibson: /* Windows */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==What is a SSH key?==&lt;br /&gt;
&lt;br /&gt;
SSH keys are used for secure connections across a network.  They come in pairs, so you have a public key and a private key.&lt;br /&gt;
&lt;br /&gt;
The standard ssh2 file format (see&lt;br /&gt;
http://www.openssh.org/txt/draft-ietf-secsh-publickeyfile-02.txt)&lt;br /&gt;
looks like this:&lt;br /&gt;
&lt;br /&gt;
 ---- BEGIN SSH2 PUBLIC KEY ----&lt;br /&gt;
 Comment: &amp;quot;jtbell@Jon-Bells-Computer&amp;quot;&lt;br /&gt;
 AAAAB3NzaC1kc3MAAACBAPNgmidbM2rhYjUXunpnlXjHWfV+vc8/5YKrn8Y5P0Y6KwmG2G&lt;br /&gt;
 GMgNBon3LX3iJlBhtuU3FCBj3G1Kdt5vUhQHhUmHVrOasi47vawTrv7ZJCfiaSGwRsiBHt&lt;br /&gt;
 Jta5CAp7t0EnzX2q6BvPbFBBHNLyy6uNVpL2jOR06Pkx/vaqyScvAAAAFQDHvwmjWYwK9g&lt;br /&gt;
 K6Sp+pSvI7bwEUtwAAAIANMJDotMpfj89N+7+FJylSS+uFEQSS61PxENl/Mcj1jUREjJg2&lt;br /&gt;
 eNsJdAB9Ev99hWYS+7lFRtTJ2eh4Y9gpGe7BX3e2YGHOqp8cWCVCIKaMzwk9To+xnfThWq&lt;br /&gt;
 IfHT8I6CJxp/5ez02m6F2k/5iukvOwbGms6EAZK1DTBhDOHjEQwQAAAIAlz2/qBWkaMP+s&lt;br /&gt;
 W8FLmGKM+cCw5+asOaJGTwrFVuwJkDMvdEWxmG92A2dxuUske0d/AkN6zJp7HD0wlfesRM&lt;br /&gt;
 3+c+Res5qun9lFcdM4i03VoV5mXd+T7laS8yku6vZgvZZFnPvr2LOUnc7XThGFwMaQpFEW&lt;br /&gt;
 U8cvQbttO6QrT2CD2w==&lt;br /&gt;
 ---- END SSH2 PUBLIC KEY ----&lt;br /&gt;
&lt;br /&gt;
However, Moodle uses OpenSSH on its server and this key will not work with the OpenSSH server in this format; OpenSSH requires the key to be in OpenSSH format. Here is an example of a DSA public key in OpenSSH format (usually they are all in one line):&lt;br /&gt;
&lt;br /&gt;
 ssh-dss AAAAB3NzaC1kc3MAAACBAJ3hB5SAF6mBXPlZlRoJEZi0KSIN+NU2iGiaXZXi9CDrgVxTp6/&lt;br /&gt;
 sc56UcYCp4qjfrZ2G3+6PWbxYso4P4YyUC+61RU5KPy4EcTJske3O+aNvec/20cW7PT3TvH1+sxwGry&lt;br /&gt;
 mD50kTiXDgo5nXdqFvibgM61WW2DGTKlEUsZys0njRAAAAFQDs7ukaTGJlZdeznwFUAttTH9LrwwAAA&lt;br /&gt;
 IAMm4sLCdvvBx9WPkvWDX0OIXSteCYckiQxesOfPvz26FfYxuTG/2dljDlalC+kYG05C1NEcmZWSNES&lt;br /&gt;
 GBGfccSYSfI3Y5ahSVUhOC2LMO3JNjVyYUnOM/iyhzrnRfQoWO9GFMaugq0jBMlhZA4UO26yJqJ+BtX&lt;br /&gt;
 IyItaEEJdc/ghIwAAAIBFeCZynstlbBjP648+mDKIvzNSS+JYr5klGxS3q8A56NPcYhDMxGn7h1DKbb&lt;br /&gt;
 2AV4pO6y+6hDrWo3UT4dLVuzK01trwp PYp6JXTSZZ12ZaXNPz7sX9/z6pzMqhX4UEfjVsLcuF+ZS6a&lt;br /&gt;
 QCPO0ZZEa1z+EEIZSD/ykLQsDwPxGjPBqw== someone@somewhere.com&lt;br /&gt;
&lt;br /&gt;
In addition to OpenSSH and Standard SSH formats there are a variety of proprietary formats as well as SSH1 and SSH2 differences to account for, which can make this confusing. &lt;br /&gt;
&lt;br /&gt;
In the example above you will note that the key starts with &amp;quot;ssh-dss&amp;quot;. This is because this key was generated using DSA as opposed to RSA. A number of vendors in the SSH arena have argued, as per the PuTTY documentation that can be found at http://the.earth.li/~sgtatham/putty/0.55/htmldoc/Chapter8.html#S8.2.10 that users should employ RSA encryption because&lt;br /&gt;
&lt;br /&gt;
 DSA has an intrinsic weakness which makes it very easy to create a signature&lt;br /&gt;
 which contains enough information to give away the private key! This would &lt;br /&gt;
 allow an attacker to pretend to be you for any number of future sessions. &lt;br /&gt;
&lt;br /&gt;
An SSH2 public key in OpenSSH format will start with &amp;quot;ssh-rsa&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The idea behind all of this is that once you have keys on the remote server and your local host,  access will be simpler since the server will only grant access to someone who has the matching private key.&lt;br /&gt;
&lt;br /&gt;
==Why do I need a SSH key?==&lt;br /&gt;
&lt;br /&gt;
Our CVS server uses OpenSSH, so if are a Moodle developer and you want to make your logins easier (by avoiding typing in your password all the time) then you will need to submit public key in Openssh format via the &amp;quot;Update my developer information&amp;quot; tab at http://moodle.org/cvs.&lt;br /&gt;
&lt;br /&gt;
==How do I create a SSH key pair?==&lt;br /&gt;
&lt;br /&gt;
===Platform Independent===&lt;br /&gt;
&lt;br /&gt;
Visit http://www.sshkeygen.com and simply follow the directions there.&lt;br /&gt;
&lt;br /&gt;
===Eclipse===&lt;br /&gt;
&lt;br /&gt;
If you plan to use Eclipse for development, please refer to the Eclipse document https://docs.moodle.org/en/Eclipse as Eclipse now has a plugin that allows you to manage all ssh key matters from within Eclipse.&lt;br /&gt;
&lt;br /&gt;
===Unix/Linux===&lt;br /&gt;
&lt;br /&gt;
You can use ssh-keygen at your system prompt.  Please consult the man page on your system for the options available to you.&lt;br /&gt;
&lt;br /&gt;
# Run:  &#039;&#039;&#039;ssh-keygen -t (rsa or dsa)&#039;&#039;&#039;. This will not include a passphrase. *&lt;br /&gt;
# Use of rsa or dsa above will result in rsa or dsa replacing each XXX below.&lt;br /&gt;
# Look in your ~/.ssh directory (or wherever you saved the output).  You&#039;ll find &#039;&#039;&#039;id_XXX&#039;&#039;&#039; (private) and &#039;&#039;&#039;id_XXX.pub&#039;&#039;&#039; (public).&lt;br /&gt;
# Cut and paste the contents of &#039;&#039;&#039;id_XXX.pub&#039;&#039;&#039; into your developer profile on http://moodle.org/cvs&lt;br /&gt;
# Put the private key wherever you will be calling CVS from (in your .ssh directory, for example).  Make sure it&#039;s secure!&lt;br /&gt;
&lt;br /&gt;
* This section initially recommended using &#039;&#039;ssh-keygen -d&#039;&#039; but it is unclear what the source of this -d option might be.&lt;br /&gt;
&lt;br /&gt;
===Windows===&lt;br /&gt;
Use puttygen and follow the instructions [http://the.earth.li/~sgtatham/putty/0.58/htmldoc/Chapter8.html here]&lt;br /&gt;
&lt;br /&gt;
===Mac OS X===&lt;/div&gt;</summary>
		<author><name>Mattgibson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Ajax_marking_block&amp;diff=40224</id>
		<title>Ajax marking block</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Ajax_marking_block&amp;diff=40224"/>
		<updated>2008-07-22T14:13:51Z</updated>

		<summary type="html">&lt;p&gt;Mattgibson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The AJAX marking block displays a tree structure of all of the courses you are part of where there are unmarked assessments waiting to be graded, along with a count of the totals. At its simplest level, e.g. assignments, it shows Course name &amp;gt; Assignment name &amp;gt; Student name. When the student;s name is clicked, a pop-up opens with the work to be graded. Once &#039;Submit&#039; has been clicked in that window, the pop-up closes and tree updates itself by removing the student&#039;s node and altering its total count.&lt;br /&gt;
&lt;br /&gt;
The [[AJAX]] bit means that every time you click on the nodes to expand them, the data for the child nodes is fetched in the background without refreshing the whole page. Clicking &#039;Collapse and refresh&#039; will re-load the whole tree, with an updated count of your marking including anything that was submitted a second or two ago.  &lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
The block can be set to show or hide each individual assessment item, or show only the assessments by students in certain groups. Clicking on &#039;configure&#039; will bring up an additional tree, which shows only the courses and names of the assessment items. When you click on one of the assessments, you will be faced with a number of options on the right:&lt;br /&gt;
* Show - the default state, where you will see all students&#039; work&lt;br /&gt;
* Show by group - a set of checkboxes will appear with the names of the current groups for that course. You choose which you want to see and group nodes will then be shown between the assessment and student nodes in the main block.&lt;br /&gt;
* Hide - do not display any submissions for this assessment item.&lt;br /&gt;
&lt;br /&gt;
The counting of unmarked submissions respects these choices and they are specific to the user who created them. If you are an admin and wish to set the preferences for others, use the &#039;login as&#039; function to do so.&lt;/div&gt;</summary>
		<author><name>Mattgibson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Ajax_marking_block&amp;diff=40223</id>
		<title>Ajax marking block</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Ajax_marking_block&amp;diff=40223"/>
		<updated>2008-07-22T14:13:18Z</updated>

		<summary type="html">&lt;p&gt;Mattgibson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The AJAX marking block displays a tree structure of all of the courses you are part of where there are unmarked assessments waiting to be graded, along with a count of the totals. At its simplest level, e.g. assignments, it shows Course name &amp;gt; Assignment name &amp;gt; Student name. When the student;s name is clicked, a pop-up opens with the work to be graded. Once &#039;Submit&#039; has been clicked in that window, the pop-up closes and tree updates itself by removing the student&#039;s node and altering its total count.&lt;br /&gt;
&lt;br /&gt;
The [[AJAX]] bit means that every time you click on the nodes to expand them, the data for the child nodes is fetched in the background without refreshing the whole page. Clicking &#039;Collapse and refresh&#039; will re-load the whole tree, with an updated count of your marking including anything that was submitted a second or two ago.  &lt;br /&gt;
&lt;br /&gt;
=Configuration=&lt;br /&gt;
The block can be set to show or hide each individual assessment item, or show only the assessments by students in certain groups. Clicking on &#039;configure&#039; will bring up an additional tree, which shows only the courses and names of the assessment items. When you click on one of the assessments, you will be faced with a number of options on the right:&lt;br /&gt;
* Show - the default state, where you will see all students&#039; work&lt;br /&gt;
* Show by group - a set of checkboxes will appear with the names of the current groups for that course. You choose which you want to see and group nodes will then be shown between the assessment and student nodes in the main block.&lt;br /&gt;
* Hide - do not display any submissions for this assessment item.&lt;br /&gt;
&lt;br /&gt;
The counting of unmarked submissions respects these choices and they are specific to the user who created them. If you are an admin and wish to set the preferences for others, use the &#039;login as&#039; function to do so.&lt;/div&gt;</summary>
		<author><name>Mattgibson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Ajax_marking_block&amp;diff=40222</id>
		<title>Ajax marking block</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Ajax_marking_block&amp;diff=40222"/>
		<updated>2008-07-22T14:13:05Z</updated>

		<summary type="html">&lt;p&gt;Mattgibson: created page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The AJAX marking block displays a tree structure of all of the courses you are part of where there are unmarked assessments waiting to be graded, along with a count of the totals. At its simplest level, e.g. assignments, it shows Course name &amp;gt; Assignment name &amp;gt; Student name. When the student;s name is clicked, a pop-up opens with the work to be graded. Once &#039;Submit&#039; has been clicked in that window, the pop-up closes and tree updates itself by removing the student&#039;s node and altering its total count.&lt;br /&gt;
&lt;br /&gt;
The [[AJAX]] bit means that every time you click on the nodes to expand them, the data for the child nodes is fetched in the background without refreshing the whole page. Clicking &#039;Collapse and refresh&#039; will re-load the whole tree, with an updated count of your marking including anything that was submitted a second or two ago.  &lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
The block can be set to show or hide each individual assessment item, or show only the assessments by students in certain groups. Clicking on &#039;configure&#039; will bring up an additional tree, which shows only the courses and names of the assessment items. When you click on one of the assessments, you will be faced with a number of options on the right:&lt;br /&gt;
* Show - the default state, where you will see all students&#039; work&lt;br /&gt;
* Show by group - a set of checkboxes will appear with the names of the current groups for that course. You choose which you want to see and group nodes will then be shown between the assessment and student nodes in the main block.&lt;br /&gt;
* Hide - do not display any submissions for this assessment item.&lt;br /&gt;
&lt;br /&gt;
The counting of unmarked submissions respects these choices and they are specific to the user who created them. If you are an admin and wish to set the preferences for others, use the &#039;login as&#039; function to do so.&lt;/div&gt;</summary>
		<author><name>Mattgibson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Meta_course&amp;diff=38916</id>
		<title>Meta course</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Meta_course&amp;diff=38916"/>
		<updated>2008-06-30T09:28:32Z</updated>

		<summary type="html">&lt;p&gt;Mattgibson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A &#039;&#039;&#039;metacourse&#039;&#039;&#039; is just like any other course except that it automatically enrolls participants from other &amp;quot;child&amp;quot; courses.  Metacourses inherit their enrollments from these other course(s) instead of having students added manually. This feature can populate many metacourses from one course with normal enrollments or one metacourse from many courses with normal enrollments. &lt;br /&gt;
&lt;br /&gt;
For example (Scenario 2, below), a normal course can be used as the central enrolment point for a programme of study composed of several metacourses.  Each time a student enrols in (or unenrols from) this course, they are automatically enrolled/unenrolled from any metacourse(s) associated with it, which would contain the programme&#039;s teaching activities.&lt;br /&gt;
&lt;br /&gt;
Please note that metacourse enrolments do not preserve groups and enrolment does not happen immediately, but occurs next time the [[Cron|cronjob]] runs.&lt;br /&gt;
&lt;br /&gt;
==Metacourse setup==&lt;br /&gt;
Teachers are able to choose whether a course is a metacourse via the &amp;quot;Is this a metacourse?&amp;quot; (yes/no) menu option in the [[Course settings|course settings]]. In Moodle 1.5 and 1.6, if a meta course is chosen, the [[Students|students]] page changes from listing/searching for students to listing/searching for courses.  In Moodle 1.7 onwards, &amp;quot;Child courses&amp;quot; appears in the teacher&#039;s administration block.&lt;br /&gt;
&lt;br /&gt;
If you choose &#039;metacourse&#039; when you set up a new course, then instead of seeing the assign roles page after saving the settings, you will see a list of courses to shoose from. The students from any that you choose will be added to the metacourse automatically.&lt;br /&gt;
&lt;br /&gt;
==Metacourse examples==&lt;br /&gt;
Metacourses may be used in a variety of ways:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Scenario 1:&#039;&#039;&#039; X is a metacourse with Course 1 through 4 as normal courses with standard student enrollments. Students enrolling on these courses are automatically enrolled onto Metacourse X. &lt;br /&gt;
&lt;br /&gt;
[[Image:Metacourses1_en.jpg|Standard Metacourse Usage|center]]&lt;br /&gt;
&lt;br /&gt;
For example, a math teacher or department has 2 algebra and 2 geometry courses. The teacher or department wants course for each of these subjects. But they also want a generic space where they can post things for all of the students in all of their courses, perhaps including compulsory work for all students.  By making algebra 1 &amp;amp; 2 and geometry 1 &amp;amp; 2 as each as part of a Math metacourse, they achieve this goal. &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Scenario 2:&#039;&#039;&#039; Metacourses 1-4 are linked to Y which is a normal course. Students enrolling on Course Y are automatically enrolled on Metacourses  1-4. This would be used, for example, when all five courses are intended to have exactly the same students. &lt;br /&gt;
&lt;br /&gt;
[[Image:Metacourses2_en.jpg|Upsidedown Metacourse Usage|center]]&lt;br /&gt;
&lt;br /&gt;
In both diagrams you can see students being enrolled normally into standard courses and then the entire student list of a course being added to the Metacourse.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Scenario 3:&#039;&#039;&#039; One or more meta courses are used as a library of resources and activities.  For example, the English department has collected material useful in writing papers. Teachers can direct or embed a link to a specific reference about citations, or how to select a topic for a paper or suggested reading compiled by students.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Scenario 4:&#039;&#039;&#039; The metacourse feature can also be used &amp;quot;in reverse.&amp;quot;  Say you have a Diploma program that involves courses D1, D2, D3, and D4.  In this case, you would create a &amp;quot;Diploma&amp;quot; course as a normal course (non-metacourse).  You would then designate programs D1 through D4 as metacourses (plus completing the student enrollment task under Course Administration).  When a student enrolls in &amp;quot;Diploma&amp;quot;, he or she will be automatically enrolled in courses D1 through D4.&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=48901 Metacourses?]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=54389 Metacourses and Roles in 1.7]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=39438 Best reference for describing a metacourse]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=89741 Assign student in course]&lt;br /&gt;
&lt;br /&gt;
[[Category:Teacher]]&lt;br /&gt;
[[Category:Enrolment]]&lt;br /&gt;
&lt;br /&gt;
[[es:Metacourses]]&lt;br /&gt;
[[fr:Méta-cours]]&lt;br /&gt;
[[ja:メタコース]]&lt;br /&gt;
[[ru:Метакурсы]]&lt;br /&gt;
[[de:Metakurse]]&lt;/div&gt;</summary>
		<author><name>Mattgibson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Talk:Meta_course&amp;diff=38915</id>
		<title>Talk:Meta course</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Talk:Meta_course&amp;diff=38915"/>
		<updated>2008-06-30T09:27:53Z</updated>

		<summary type="html">&lt;p&gt;Mattgibson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Intro and Examples==&lt;br /&gt;
Really like the graphics which helped me (the auto enrolment box).  Read the forum thread link and decided to update the intro, with Darren Smith&#039;s mantra and include Randy Orwin&#039;s example. I like the combination of a generic graphic with a simple example that uses different labels to add additional learning hooks.  &lt;br /&gt;
&lt;br /&gt;
I tend to agree with Darren that metacourses may not be the best name (is it hard to change MoodleSpeak such Branch Table) but my goal is about not what it is called but how to explain it. (big grin) I saw that somebody used &amp;quot;program&amp;quot; which might help describe this feature in some but not all examples.  &lt;br /&gt;
&lt;br /&gt;
My site administrator wants me to gather information on the direction of groups and groupings and how they interact with metacourses in 1.8 and onward.  Especially when they deal with enrolments.  My secondary goal is how to simply explain it.  Best to all --[[User:chris collman|chris collman]] 06:38, 6 April 2007 (CDT)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
*Using Moodle [http://moodle.org/mod/forum/discuss.php?d=17269 Meta courses experimental feature] forum discussion&lt;br /&gt;
[[User:Wild girl|Wild girl]] 23 November 2005 17:44 (WST)&lt;br /&gt;
&lt;br /&gt;
==Diagrams==&lt;br /&gt;
I&#039;m wondering whether adding some color (and/or total student numbers) to these diagrams would help to show that in the first example C contains the sum of all students of the other courses i.e. ten students in each of C1-C4 would mean 40 students in C. While in the second example X students in C means the exact same X students are in C1-C4. --[[User:David Scotson|David Scotson]] 23:20, 14 July 2006 (WST)&lt;br /&gt;
&lt;br /&gt;
Does anyone know why the language in the diagram appears to have changed to chinese? I&#039;m fairly certain it was english at the time I made the above comment, but I can&#039;t find any log of changes relating to it --[[User:David Scotson|David Scotson]] 17:30, 31 July 2006 (WST)&lt;br /&gt;
&lt;br /&gt;
:The language change is a mystery to me too, anyway the new diagrams are really great! :-) --[[User:Helen Foster|Helen Foster]] 19:40, 1 August 2006 (WST)&lt;br /&gt;
&lt;br /&gt;
==Page spelling==&lt;br /&gt;
Metacourses, Meta courses, Meta course?  Put a redirect on [[Meta course]] which is how they are called in help.--[[User:chris collman|chris collman]] 06:26, 15 October 2006 (CDT)&lt;br /&gt;
&lt;br /&gt;
Chris - I altered the change you made as it was this sort of minor semantic detail that had me confused before. The main course from which enrolments are inherited in the example is not a metacourse, but the ones that inherit from it are. Hope you agree :) [[User:Matt Gibson|Matt Gibson]] 04:27, 30 June 2008 (CDT)&lt;/div&gt;</summary>
		<author><name>Mattgibson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Meta_course&amp;diff=38913</id>
		<title>Meta course</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Meta_course&amp;diff=38913"/>
		<updated>2008-06-30T09:26:14Z</updated>

		<summary type="html">&lt;p&gt;Mattgibson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A &#039;&#039;&#039;metacourse&#039;&#039;&#039; is just like any other course except that it automatically enrolls participants from other &amp;quot;child&amp;quot; courses.  Metacourses inherit their enrollments from these other course(s) instead of having students added manually. This feature can populate many metacourses from one course with normal enrollments or one metacourse from many courses with normal enrollments. &lt;br /&gt;
&lt;br /&gt;
For example, a normal course can be used as the central enrolment point for a programme of study composed of several metacourses.  Each time a student enrols in (or unenrols from) this course, they are automatically enrolled/unenrolled from any metacourse(s) associated with it, which would contain the programme&#039;s teaching activities.&lt;br /&gt;
&lt;br /&gt;
Please note that metacourse enrolments do not preserve groups and enrolment does not happen immediately, but occurs next time the [[Cron|cronjob]] runs.&lt;br /&gt;
&lt;br /&gt;
==Metacourse setup==&lt;br /&gt;
Teachers are able to choose whether a course is a metacourse via the &amp;quot;Is this a metacourse?&amp;quot; (yes/no) menu option in the [[Course settings|course settings]]. In Moodle 1.5 and 1.6, if a meta course is chosen, the [[Students|students]] page changes from listing/searching for students to listing/searching for courses.  In Moodle 1.7 onwards, &amp;quot;Child courses&amp;quot; appears in the teacher&#039;s administration block.&lt;br /&gt;
&lt;br /&gt;
If you choose &#039;metacourse&#039; when you set up a new course, then instead of seeing the assign roles page after saving the settings, you will see a list of courses to shoose from. The students from any that you choose will be added to the metacourse automatically.&lt;br /&gt;
&lt;br /&gt;
==Metacourse examples==&lt;br /&gt;
Metacourses may be used in a variety of ways:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Scenario 1:&#039;&#039;&#039; X is a metacourse with Course 1 through 4 as normal courses with standard student enrollments. Students enrolling on these courses are automatically enrolled onto Metacourse X. &lt;br /&gt;
&lt;br /&gt;
[[Image:Metacourses1_en.jpg|Standard Metacourse Usage|center]]&lt;br /&gt;
&lt;br /&gt;
For example, a math teacher or department has 2 algebra and 2 geometry courses. The teacher or department wants course for each of these subjects. But they also want a generic space where they can post things for all of the students in all of their courses, perhaps including compulsory work for all students.  By making algebra 1 &amp;amp; 2 and geometry 1 &amp;amp; 2 as each as part of a Math metacourse, they achieve this goal. &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Scenario 2:&#039;&#039;&#039; Metacourses 1-4 are linked to Y which is a normal course. Students enrolling on Course Y are automatically enrolled on Metacourses  1-4. This would be used, for example, when all five courses are intended to have exactly the same students. &lt;br /&gt;
&lt;br /&gt;
[[Image:Metacourses2_en.jpg|Upsidedown Metacourse Usage|center]]&lt;br /&gt;
&lt;br /&gt;
In both diagrams you can see students being enrolled normally into standard courses and then the entire student list of a course being added to the Metacourse.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Scenario 3:&#039;&#039;&#039; One or more meta courses are used as a library of resources and activities.  For example, the English department has collected material useful in writing papers. Teachers can direct or embed a link to a specific reference about citations, or how to select a topic for a paper or suggested reading compiled by students.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Scenario 4:&#039;&#039;&#039; The metacourse feature can also be used &amp;quot;in reverse.&amp;quot;  Say you have a Diploma program that involves courses D1, D2, D3, and D4.  In this case, you would create a &amp;quot;Diploma&amp;quot; course as a normal course (non-metacourse).  You would then designate programs D1 through D4 as metacourses (plus completing the student enrollment task under Course Administration).  When a student enrolls in &amp;quot;Diploma&amp;quot;, he or she will be automatically enrolled in courses D1 through D4.&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=48901 Metacourses?]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=54389 Metacourses and Roles in 1.7]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=39438 Best reference for describing a metacourse]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=89741 Assign student in course]&lt;br /&gt;
&lt;br /&gt;
[[Category:Teacher]]&lt;br /&gt;
[[Category:Enrolment]]&lt;br /&gt;
&lt;br /&gt;
[[es:Metacourses]]&lt;br /&gt;
[[fr:Méta-cours]]&lt;br /&gt;
[[ja:メタコース]]&lt;br /&gt;
[[ru:Метакурсы]]&lt;br /&gt;
[[de:Metakurse]]&lt;/div&gt;</summary>
		<author><name>Mattgibson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Development_talk:File_API&amp;diff=38514</id>
		<title>Development talk:File API</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Development_talk:File_API&amp;diff=38514"/>
		<updated>2008-06-26T21:56:07Z</updated>

		<summary type="html">&lt;p&gt;Mattgibson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Some quick questions to avoid forgetting them:&lt;br /&gt;
&lt;br /&gt;
1) Will them be under the control of FileAPI (or, as they are now, fixed local storage)?&lt;br /&gt;
&lt;br /&gt;
- dataroot/temp&lt;br /&gt;
- dataroot/lang&lt;br /&gt;
- dataroot/cache&lt;br /&gt;
- dataroot/environment&lt;br /&gt;
- dataroot/filter&lt;br /&gt;
- dataroot/rss&lt;br /&gt;
- dataroot/search&lt;br /&gt;
- dataroot/sessions&lt;br /&gt;
- dataroot/upgradelogs&lt;br /&gt;
&lt;br /&gt;
[[User:Martin Dougiamas|Martin Dougiamas]] 03:20, 28 April 2008 (CDT) : I don&#039;t see these as being in the API - I&#039;ve updated the spec.&lt;br /&gt;
&lt;br /&gt;
2) Assuming we&#039;ll have a cool OOP FileAPI... &lt;br /&gt;
&lt;br /&gt;
- a) Will it support different FileAPI classes (to be able to store in other systems) ?&lt;br /&gt;
- b) Will it support multiple FileAPI classes working together (like the Repo) ?&lt;br /&gt;
&lt;br /&gt;
[[User:Martin Dougiamas|Martin Dougiamas]] 03:20, 28 April 2008 (CDT) : Hmm, I suppose it makes sense to switch the backend from local file storage to specify something else (eg database storage) but multiple File storage places doesn&#039;t make sense to me, that is the Repository API and the Portfolio API.  &lt;br /&gt;
&lt;br /&gt;
3) I&#039;ve annotated in red some things that have sounded strange in my first look.&lt;br /&gt;
&lt;br /&gt;
[[User:Martin Dougiamas|Martin Dougiamas]] 03:20, 28 April 2008 (CDT) : Thanks, all fixed.  &lt;br /&gt;
&lt;br /&gt;
4) Are we going to have &amp;quot;directory records&amp;quot; in the implementation, or that is going to be handled exclusively by the &amp;quot;moodlepath&amp;quot; column?&lt;br /&gt;
&lt;br /&gt;
[[User:Martin Dougiamas|Martin Dougiamas]] 03:20, 28 April 2008 (CDT) : Good point.  I was thinking of moodlepath only but I wonder if directory records might be more efficient.  New table, I guess.&lt;br /&gt;
&lt;br /&gt;
5) One general question... are we going to &amp;quot;force&amp;quot; all modules to be &amp;quot;autocontained&amp;quot; ? How are we going to handle resources, for example (with all those css, links, images..). In general how are we going to handle multiple-file packages?&lt;br /&gt;
&lt;br /&gt;
[[User:Martin Dougiamas|Martin Dougiamas]] 03:20, 28 April 2008 (CDT) : they&#039;ll be a set of files, probably in a &amp;quot;directory&amp;quot; specified by moodlepath of directory record.  What problems do you see?  Should we retain better knowledge of the original group of files?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
That&#039;s all for now, ciao4niao :-) [[User:Eloy Lafuente (stronk7)|Eloy Lafuente (stronk7)]] 21:27, 5 April 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Making Storage &#039;content addressable&#039; ==&lt;br /&gt;
One opportunity  which this API opens up is the possibility of making the actual storage of files &#039;content addressable&#039; . That is, if two users upload the same image for example, only store this file once on disk. This  brings benefits in reducing the amount of storage and improving caching (especially in increasingly common situations the moodle data store served from a NFS directory or other remote storage similar). To do this we could use a hash like sha-1 on the file and store the file on disk named by its hash (rather than some arbitary id). Then when someone uploads the same file as has already been uploaded, the hash matches and we just point the database record to the same file on disk. This technique is increasingly being used by enterprise-style repositories as well as things like git. I can see the major benefits in things like scorm packages other such things which have 100&#039;s of small duplicate files stored multiple times per package and course, so sometimes you can have the same image file stored 20 different times across 20 different packages in one course, which is then duplicated for multiple classes etcetc. --[[User:Dan Poltawski|Dan Poltawski]] 07:32, 1 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
 Excellent idea, Dan, it&#039;s in   [[User:Martin Dougiamas|Martin Dougiamas]] 01:43, 20 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
== Specific File Attachments? ==&lt;br /&gt;
&lt;br /&gt;
We have entries for &#039;moduleinstance&#039;, do we need entries to identify files per other attachments? Such as forum posts, wiki attachments, database attachments, assignment submissions?&lt;br /&gt;
[[User:Mike Churchward|Mike Churchward]] 16:27, 9 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
 I&#039;m not sure if we need to have such links back to the exact forum post &lt;br /&gt;
 or glossary entry.  The idea is that the forum posts (say) would reference &lt;br /&gt;
 the file-&amp;gt;id.  Would it be useful to have back links too ...?   &lt;br /&gt;
 [[User:Martin Dougiamas|Martin Dougiamas]] 22:30, 22  June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
==Squid==&lt;br /&gt;
&lt;br /&gt;
Consider proxy support. --[[User:Helen Foster|Helen Foster]] 16:53, 9 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
Expanding on this from the hackfest discussion - since we are hashing for storage anyway, we could&lt;br /&gt;
serve the sha1 hash as the Etag for every file quite easily. --[[User:Dan Poltawski|Dan Poltawski]] 04:16, 25 June 2008 (CDT)&lt;br /&gt;
:Agree, although I&#039;d rehash it, to avoid exposing info about internal &amp;quot;filenames&amp;quot; in new storage over the web. Bit paranoid but ... [[User:Eloy Lafuente (stronk7)|Eloy Lafuente (stronk7)]] 04:27, 25 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
== Batch uploads (zips) ==&lt;br /&gt;
&lt;br /&gt;
Should we require that file API (optionally) require some form of batch file upload or zip/unzip function?&lt;br /&gt;
[[User:Mike Churchward|Mike Churchward]] 17:14, 9 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
 Yeah, it definitely needs to handle zipped files nicely ... [[User:Martin Dougiamas|Martin Dougiamas]] 22:33, 22  June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
=Skodak&#039;s rants=&lt;br /&gt;
&lt;br /&gt;
The API should be split into several independent parts:&lt;br /&gt;
# File serving API&lt;br /&gt;
## file.php&lt;br /&gt;
## pluginfile.php&lt;br /&gt;
## userfile.php&lt;br /&gt;
## rssfile.php&lt;br /&gt;
# File storage API&lt;br /&gt;
## optional access control&lt;br /&gt;
## optional repo sync&lt;br /&gt;
# File management API&lt;br /&gt;
## File browsing&lt;br /&gt;
## File linking (editor integration)&lt;br /&gt;
## Upload from repository&lt;br /&gt;
&lt;br /&gt;
==File serving API==&lt;br /&gt;
Deals with serving of files - browser requests file, Moodle sends it back. We have three main files. It is important to setup slasharguments on server (file.php/some/thing/xxx.jpg), any content that relies on relative links can not work without it (scorm, uploaded html pages, etc.).&lt;br /&gt;
&lt;br /&gt;
===file.php===&lt;br /&gt;
Serves course files. &lt;br /&gt;
It would be nice to have some special hardcoded protection of backup files - preventing of backup file downloads/uploads; backups contain a lot of personal info, we could block restoring of backups from other sites too.&lt;br /&gt;
&lt;br /&gt;
Implements basic file access. Ideally only images and files linked from course sections should be there, no XSS protection required - we expect javascript, sw, etc. there, no way to make it &amp;quot;secure&amp;quot;. The access control is not critical any more if we move most most of the files into modules&lt;br /&gt;
&lt;br /&gt;
The file name and parameter structure is critical for backwards compatibility.&lt;br /&gt;
&lt;br /&gt;
 /file.php/courseid/dir/dir/filename.ext&lt;br /&gt;
&lt;br /&gt;
===pluginfile.php===&lt;br /&gt;
(aka modfile.php)&lt;br /&gt;
Sends module, block, question files.&lt;br /&gt;
* modules decide about access control&lt;br /&gt;
* optional XSS protection - student submitted files must not be served with normal headers, we have to force download instead; ideally there should be second wwwroot for serving of untrusted files&lt;br /&gt;
* only internal links to selected areas are supported - you can link images in summary area, but not the assignment submissions&lt;br /&gt;
&lt;br /&gt;
Absolute file links need to be rewritten if html editing allowed in module. The links are stored internally as relative links. Before editing or display the internal link representation is converted to absolute links using simple str_replace() @@thipluginlink/summary@@/image.jpg --&amp;gt; /pluginfile.php/assignmentcontextid/summary/image.jpg, it is converted back to internal links before saving.&lt;br /&gt;
&lt;br /&gt;
 /pluginfile.php/contextid/areaname/arbitrary/params/or/dirs/filename.ext&lt;br /&gt;
&lt;br /&gt;
pluginfile.php detects the type of plugin from context table, fetches basic info (like $course or $cm if appropriate) and calls plugin function (or later method) which does the access control and finally sends the file to user. &#039;&#039;areaname&#039;&#039; separates files by type and divides the context into several subtrees - for example &#039;&#039;summary&#039;&#039; files (images used in module intros), post attachments, etc.&lt;br /&gt;
&lt;br /&gt;
====assignment example====&lt;br /&gt;
&lt;br /&gt;
 /pluginfile.php/assignmentcontextid/summary/someimage.jpg&lt;br /&gt;
 /pluginfile.php/assignmentcontextid/submission/userid/attachmentname.ext&lt;br /&gt;
 /pluginfile.php/assignmentcontextid/extra/allsubmissionfiles.zip&lt;br /&gt;
&lt;br /&gt;
====scorm example====&lt;br /&gt;
&lt;br /&gt;
 /pluginfile.php/scormcontextid/summary/someimage.jpg&lt;br /&gt;
 /pluginfile.php/scormcontextid/content/revisionnumber/dir/somescormfile.js&lt;br /&gt;
&lt;br /&gt;
The revision counter is incremented when any file changes in order to prevent caching problems. The lifetime should be adjustable in module settings.&lt;br /&gt;
&lt;br /&gt;
====quiz example====&lt;br /&gt;
&lt;br /&gt;
 pluginfile.php/quizcontextid/summary/niceimage.jpg&lt;br /&gt;
 pluginfile.php/quizcontextid/report/type/export.ods&lt;br /&gt;
&lt;br /&gt;
====questions example====&lt;br /&gt;
&lt;br /&gt;
 pluginfile.php/SYSCONTEXTID/question/questionid/file.jpg&lt;br /&gt;
&lt;br /&gt;
====blog example====&lt;br /&gt;
Blog entries or notes in general do not have context id (because they live in system context, SYSCONTEXTID bellow is the id of system context).&lt;br /&gt;
The note attachments are always served with XSS protection on, ideally we should use separate wwwroot for this. Access control can be hardcoded.&lt;br /&gt;
&lt;br /&gt;
 /pluginfile.php/SYSCONTEXTID/blog/blogenryid/attachmentname.ext&lt;br /&gt;
&lt;br /&gt;
===userfile.php===&lt;br /&gt;
Personal file storage, intended as an online storage of work in progress like assignments before the submission.&lt;br /&gt;
* read/write own files only for now&lt;br /&gt;
* option to share with others later&lt;br /&gt;
* personal &amp;quot;websites&amp;quot; will not be supported (security)&lt;br /&gt;
&lt;br /&gt;
 /userfile.php/userid/dir/dir/filename.ext&lt;br /&gt;
&lt;br /&gt;
===rssfile.php===&lt;br /&gt;
Replaces rss/file.php wchi is kept only for backwards compatibility.&lt;br /&gt;
RSS files should not require sessions/cookies, urls should contain some sort of security token/key&lt;br /&gt;
Internally the files may be stored in database or together with other files.&lt;br /&gt;
Etag support should be implemented to improve performance.&lt;br /&gt;
&lt;br /&gt;
 /rssfile.php/contextid/any/parameters/module/wants/rss.xml&lt;br /&gt;
 /rssfile.php/SYSCONTEXTID/blog/userid/rss.xml&lt;br /&gt;
&lt;br /&gt;
Again modules and plugins decide what gets sent to user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Temporary files===&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
===Legacy file storage and serving===&lt;br /&gt;
Going to use good-old separate directories in $CFG-&amp;gt;dataroot.&lt;br /&gt;
&lt;br /&gt;
file serving and storage:&lt;br /&gt;
# user avatars - user/pix.php&lt;br /&gt;
# group avatars - user/pixgroup.php&lt;br /&gt;
# tex, algebra - filter/tex/* and filter/algebra/*&lt;br /&gt;
# rss cache (?full rss rewrite soon?) - backwards compatibility only rss/file.php&lt;br /&gt;
&lt;br /&gt;
only storage:&lt;br /&gt;
#sessions&lt;br /&gt;
&lt;br /&gt;
==File storage API==&lt;br /&gt;
Modules in general work only with local Moodle files. One of the major reason is performance when accessing external repository files. It will be possible to use repositories instead of file uploading and also to keep local files synced with external repository.&lt;br /&gt;
&lt;br /&gt;
File contents are stored in moodledata/filepool indexed using SHA1 hashes instead of file names; file names, relative paths and other metadata will be stored in file(_xxx) database tables. This should be fully abstracted so that modules do not actually know where the files are located. When storing files the content is sent as string or file handle, when reading content it is returned as file handle.&lt;br /&gt;
&lt;br /&gt;
===file table===&lt;br /&gt;
&lt;br /&gt;
This table contains one entry for every file.  Enough information is kept here so that the file can be fully identified and retrieved again if necessary.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Type&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Default&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Info&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;id&#039;&#039;&#039; &lt;br /&gt;
|int(10)  &lt;br /&gt;
|&lt;br /&gt;
|autoincrementing &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;sha1hash&#039;&#039;&#039;&lt;br /&gt;
|varchar(40)&lt;br /&gt;
|&lt;br /&gt;
|The sha1 hash of content.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;contextid&#039;&#039;&#039; &lt;br /&gt;
|int(10)&lt;br /&gt;
| &lt;br /&gt;
|The context id defined in context table - identifies the instance of plugin owning the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|instanceid&lt;br /&gt;
|int(10)&lt;br /&gt;
| &lt;br /&gt;
|Optional - some plugin specific instance id (eg. forum post, blog entry or assignment submission, user id for user files)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|plugin&lt;br /&gt;
|varchar(255)&lt;br /&gt;
|&lt;br /&gt;
|The module that is the &amp;quot;owner&amp;quot; of this file (eg &amp;quot;moodle&amp;quot;, &amp;quot;blog&amp;quot;, &amp;quot;mod/assignment&amp;quot; or &amp;quot;blocks/html&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|filetype&lt;br /&gt;
|varchar(255)&lt;br /&gt;
|&lt;br /&gt;
|Like submissions, filemanager files (images and swf linked from summaries), etc.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|filename&lt;br /&gt;
|varchar(255)&lt;br /&gt;
|&lt;br /&gt;
|The full Unicode name of this file (case sensitive)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|filepath&lt;br /&gt;
|text&lt;br /&gt;
|NULL&lt;br /&gt;
|Optional - relative path to file from module content root, useful in Scorm and Resource mod - most of the mods do not need this&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|timecreated&lt;br /&gt;
|int(10)&lt;br /&gt;
|&lt;br /&gt;
|The time this file was created (if known), otherwise same as time imported&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|timemodified&lt;br /&gt;
|int(10)&lt;br /&gt;
|&lt;br /&gt;
|The last time the file was modified&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|filesize&lt;br /&gt;
|int(10)&lt;br /&gt;
|&lt;br /&gt;
|size of file - bytes&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|userid&lt;br /&gt;
|int(10)  &lt;br /&gt;
|NULL&lt;br /&gt;
|Optional - general id field - meaning depending on plugin&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
index on &amp;quot;contextid, instanceid&amp;quot; and &amp;quot;sha1hash&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== file_metadata table ===&lt;br /&gt;
&lt;br /&gt;
This table contains extra metadata about files.  Repositories could provide this, or it could be manually edited in the local copy.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Type&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Default&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Info&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;id&#039;&#039;&#039; &lt;br /&gt;
|int(10)  &lt;br /&gt;
|&lt;br /&gt;
|autoincrementing &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;fileid&#039;&#039;&#039; &lt;br /&gt;
|int(10)&lt;br /&gt;
| &lt;br /&gt;
|Id of file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;name&#039;&#039;&#039;&lt;br /&gt;
|varchar(255)&lt;br /&gt;
|&lt;br /&gt;
|The name of extra metadata&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|value&lt;br /&gt;
|text&lt;br /&gt;
|&lt;br /&gt;
|Value&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===file_acl table===&lt;br /&gt;
&lt;br /&gt;
This table describes optional ACL for file. This is not required in majority of cases, modules usually hardcode the file access logic, course files should not be used much any more.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Type&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Default&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Info&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;id&#039;&#039;&#039; &lt;br /&gt;
|int(10)  &lt;br /&gt;
|&lt;br /&gt;
|autoincrementing &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;fileid&#039;&#039;&#039; &lt;br /&gt;
|int(10)  &lt;br /&gt;
| &lt;br /&gt;
|The file we are defining access for&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;contextid&#039;&#039;&#039;&lt;br /&gt;
|int(10)&lt;br /&gt;
|&lt;br /&gt;
|The context where this file is being published&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;capability&#039;&#039;&#039;&lt;br /&gt;
|text&lt;br /&gt;
|&lt;br /&gt;
|The capability that is required to see this file.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====acl notes====&lt;br /&gt;
* this is missing some concept similar to &#039;&#039;&#039;user/group/others&#039;&#039;&#039;, for example in case of user files typical user can not assign permissions or view them - this becomes useless there&lt;br /&gt;
* it is more important to synchronise the availability of file link and the file itself - having link pointing to inaccessible file or file which is accessible when not wanted are both problems&lt;br /&gt;
* browser/proxy caching works against us here - &amp;quot;secret&amp;quot; files should not be cached&lt;br /&gt;
&lt;br /&gt;
=== repository_sync table ===&lt;br /&gt;
&lt;br /&gt;
This table contains information how to synchronise data with repositories. Data would be synchronised from cron.php or on demand from file manager. The sync would be one way only (repository--&amp;gt;local file).&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Type&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Default&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Info&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;id&#039;&#039;&#039; &lt;br /&gt;
|int(10)  &lt;br /&gt;
|&lt;br /&gt;
|autoincrementing &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;fileid&#039;&#039;&#039; &lt;br /&gt;
|int(10)&lt;br /&gt;
| &lt;br /&gt;
|Id of file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;repositoryid&#039;&#039;&#039;&lt;br /&gt;
|int(10)&lt;br /&gt;
|&lt;br /&gt;
|The repository instance this is associated with, see [[Development:Repository_API]]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|updates&lt;br /&gt;
|int(10)&lt;br /&gt;
|&lt;br /&gt;
|Specifies the update schedule (0 = none, 1 = on demand, other = some period in seconds)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|repositorypath&lt;br /&gt;
|text&lt;br /&gt;
|&lt;br /&gt;
|The full path to the original file on the repository&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|timeimportfirst&lt;br /&gt;
|int(10)&lt;br /&gt;
|&lt;br /&gt;
|The first time this file was imported into Moodle&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|timeimportlast&lt;br /&gt;
|int(10)&lt;br /&gt;
|&lt;br /&gt;
|The most recent time that this file was imported into Moodle&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== file_delete table===&lt;br /&gt;
&lt;br /&gt;
This table list all pending file deletes.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Type&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Default&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Info&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;id&#039;&#039;&#039; &lt;br /&gt;
|int(10)  &lt;br /&gt;
|&lt;br /&gt;
|autoincrementing &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;sha1hash&#039;&#039;&#039; &lt;br /&gt;
|varchar(40)  &lt;br /&gt;
| &lt;br /&gt;
|sha1 hash of file content&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|deleted&lt;br /&gt;
|int(10)&lt;br /&gt;
|&lt;br /&gt;
|deleted timestamp&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===File content storage===&lt;br /&gt;
Originally the file storage hierarchy contained a lot of metadata including userids, entry ids, filenames, etc. The file content will now be stored separately from file metadata. It must supports utf8 on all platforms.&lt;br /&gt;
&lt;br /&gt;
File storing:&lt;br /&gt;
# calculate SHA1 hash of content&lt;br /&gt;
# check if file with SHA1 name exists, if not add the file to file pool&lt;br /&gt;
# remove SHA1 from list of deleted files if found there&lt;br /&gt;
# store file in &#039;&#039;file&#039;&#039; table, use SHA1 as file pool link&lt;br /&gt;
&lt;br /&gt;
File reading:&lt;br /&gt;
#fetch file record from &#039;file&#039; table - probably using file id or combination of contextid+instanceid&lt;br /&gt;
#fetch content of file &lt;br /&gt;
&lt;br /&gt;
File deleting:&lt;br /&gt;
#delete record from &#039;&#039;file&#039;&#039; table, remember file SHA1&lt;br /&gt;
#store the deleted SHA1 in deleted files table, do not remove the physical file yet&lt;br /&gt;
#wait for cron cleanup script to actually delete the file anmed SHA1 (proper table locking needed to prevent race conditions when adding/deleting files)&lt;br /&gt;
&lt;br /&gt;
====File pool details====&lt;br /&gt;
located in $CFG-&amp;gt;dataroot/filepool/, all files can not be stored in one directory due to OS limitations, it uses 3 levels based on first three characters of sha1 hash. It is unlikely that there will be thousands of files with the same first 3 chars in sha1 hash of their content.&lt;br /&gt;
&lt;br /&gt;
This type of storage saves a lot of disk space when storing multiple copies of the same large file. It can also help substantially when synchronising data with external repositories. Another benefit is we can detect inconsistencies in file content.&lt;br /&gt;
&lt;br /&gt;
File read performance is similar to previous code, file write performance will be slower - due to hashing and extra database access.&lt;br /&gt;
&lt;br /&gt;
 dataroot &lt;br /&gt;
    /filepool&lt;br /&gt;
       /0&lt;br /&gt;
       /1&lt;br /&gt;
       /2&lt;br /&gt;
         /0&lt;br /&gt;
         /1&lt;br /&gt;
         /2 &lt;br /&gt;
         /3&lt;br /&gt;
            /0&lt;br /&gt;
            /1&lt;br /&gt;
               /231e2dc421be4fcd0172e5afceea3970e2f3d940&lt;br /&gt;
       /3&lt;br /&gt;
       /4&lt;br /&gt;
       /5 &lt;br /&gt;
       /6&lt;br /&gt;
       /7&lt;br /&gt;
       ...&lt;br /&gt;
       /e&lt;br /&gt;
       /f&lt;br /&gt;
&lt;br /&gt;
==File management API==&lt;br /&gt;
&lt;br /&gt;
This section describes following:&lt;br /&gt;
#interactions with html editor&lt;br /&gt;
#file manager&lt;br /&gt;
#interactions with repositories&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;TODO&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Upgrade, migration and backwards compatibility==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;TODO&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Backup/restore changes==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;TODO&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Major problems==&lt;br /&gt;
#unicode chars in zip files uploaded by teachers - unfortunately tehre is no 100% solution that will work for anybody because zip programs do NOT support unicode, it is usually &#039;&#039;garbage in/garbage out&#039;&#039; which works in some cases only&lt;br /&gt;
&lt;br /&gt;
=== Some little comments to be considered (to avoid forgetting them) ===&lt;br /&gt;
&lt;br /&gt;
* each context will have its own &amp;quot;file manager&amp;quot;&lt;br /&gt;
* separate &amp;quot;file manager context&amp;quot; files (FMF) and &amp;quot;internal context&amp;quot; (ICF) files (current modedit files, submissions, attachements...)&lt;br /&gt;
* /pluginfile.php/SYSCONTEXTID/{blog|question} and so... will have own FMF too? Or only ICF ?&lt;br /&gt;
* rssfile.php: I&#039;d support both Etag (cool) and Last-Modified (more used), when we receive If-None-Match/If-Modified-Since =&amp;gt; 304&lt;br /&gt;
* Way to migrate&lt;br /&gt;
* Way to copy between contexts&lt;br /&gt;
* Links = -1 for them&lt;br /&gt;
* Deletion strategy (locks, quarantine status...)&lt;br /&gt;
&lt;br /&gt;
==Image preview==&lt;br /&gt;
Would be a great addition to the file manager if possible.&lt;/div&gt;</summary>
		<author><name>Mattgibson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=AJAX&amp;diff=38308</id>
		<title>AJAX</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=AJAX&amp;diff=38308"/>
		<updated>2008-06-25T13:30:53Z</updated>

		<summary type="html">&lt;p&gt;Mattgibson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;AJAX (Asynchronous Javascript and XML)&#039;&#039;&#039; is a modern web design technique that allows for more interactivity by making webpages that fetch data in the background and alter themselves without reloading. This makes the website feel much more like an application. AJAX is a new way of working with existing technologies (including [[HTML]], [[Javascript]], [[CSS]] and the &#039;&#039;XMLHttpRequest object&#039;&#039; amongst others) rather than a new piece of technology in itself.&lt;br /&gt;
&lt;br /&gt;
== Ajax in Moodle ==&lt;br /&gt;
&lt;br /&gt;
Moodle has recently (July 2006) adopted the [[Development:YUI|Yahoo! user interface library]] and most future work in this area will  build upon that foundation.&lt;br /&gt;
&lt;br /&gt;
There are several current projects that make use of these technologies e.g.:&lt;br /&gt;
&lt;br /&gt;
* [[Chameleon]] theme&lt;br /&gt;
* [[Student projects/AJAX course format]]&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Javascript]]&lt;br /&gt;
* [[Unobtrusive javascript]]&lt;br /&gt;
* [[Hijax]]&lt;br /&gt;
&lt;br /&gt;
* [http://www.adaptivepath.com/publications/essays/archives/000385.php &#039;&#039;Ajax: A New Approach to Web Applications&#039;&#039;, the original Ajax article by Adaptive Path]&lt;br /&gt;
* [http://developer.mozilla.org/en/docs/AJAX:Getting_Started &#039;&#039;AJAX: Getting Started&#039;&#039; article on developer.mozilla.org]&lt;br /&gt;
* [http://www.sourcelabs.com/blogs/ajb/2005/12/10_places_you_must_use_ajax.html &#039;&#039;10 places you must use AJAX&#039;&#039; by Adam Bosworth]&lt;br /&gt;
* [http://www-128.ibm.com/developerworks/web/library/wa-ajaxtop1/?ca=dgr-lnxw01AjaxHype &#039;&#039;Considering Ajax, Part 1: Cut through the hype&#039;&#039; from IBM developerworks]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ajax_%28programming%29 Wikipedia article on &#039;&#039;AJAX&#039;&#039;]&lt;br /&gt;
* [http://www.maxkiesler.com/index.php/weblog/comments/how_to_make_your_ajax_applications_accessible/ How to Make Your AJAX Applications Accessible: 40 Tutorials and Articles]&lt;br /&gt;
*[http://www.ajaxload.info/ AJAX loading icon generator]&lt;br /&gt;
&lt;br /&gt;
[[Category:Javascript]]&lt;br /&gt;
[[Category:AJAX]]&lt;/div&gt;</summary>
		<author><name>Mattgibson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Talk:Roadmap&amp;diff=38307</id>
		<title>Talk:Roadmap</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Talk:Roadmap&amp;diff=38307"/>
		<updated>2008-06-25T13:19:58Z</updated>

		<summary type="html">&lt;p&gt;Mattgibson: /* Site-wide groups */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Student Information API for version 2.0==&lt;br /&gt;
&lt;br /&gt;
Also on a related point the student API which is down for version 2.0. Is there any more detail to here on this yet? Will this be part of the IMS Enterprise data model and therefore enrolments plug in or will someone be working on a Moodle SIF agent? In the UK SIF is likely to take off as the DfES via Becta are currently consulting on a UK SIF model and piloting SIF in Birmingham and Northern Ireland. I believe that SIF is used quite widely in the US?&lt;br /&gt;
&lt;br /&gt;
== Wiki engine ==&lt;br /&gt;
&lt;br /&gt;
I noticed there was some talk about making new wiki module for 1.9... what do &amp;quot;nWiki&amp;quot; and &amp;quot;DF wiki&amp;quot; refer to?  I&#039;ve searched online and haven&#039;t found a clear description of what these mean.  I am curious if they are still based on MediaWiki.  I would hate to see some of the great features of MediaWiki (mainly the scalability) be lost.  When MediaWiki is configured with Memcached and Squid caching servers, they can serve thousands of requests per second: hard to beat!&amp;lt;br/&amp;gt;&lt;br /&gt;
Thanks,&amp;lt;br/&amp;gt;&lt;br /&gt;
-[[User:Sean Colombo|Sean Colombo]] 00:12, 13 January 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
None of the wikis are based on Mediawiki.  Mediawiki is very difficult to use as a basis for a Moodle wiki, because of all the special features we need.   [[User:Martin Dougiamas|Martin Dougiamas]] 22:10, 22 April 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
== about nwiki ==&lt;br /&gt;
&lt;br /&gt;
Seems that nwiki will be inside for 2.0. &lt;br /&gt;
Nwiki IMPLEMENTS the mediawiki markup, and the old features of the current wiki for backwards compatibility... and that is what makes it so difficult. Is really hard. &lt;br /&gt;
&lt;br /&gt;
You migth get by the Using moodle wiki forum and we can discuss about it.&lt;br /&gt;
Cheers. &lt;br /&gt;
--[[User:Ludo (Marc Alier)|Ludo (Marc Alier)]] 11:14, 13 January 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== About WS ?  ==&lt;br /&gt;
&lt;br /&gt;
Where fit the WS layer in the roadmap?&lt;br /&gt;
&lt;br /&gt;
== IMS LIT 2.0 compliance ? ==&lt;br /&gt;
&lt;br /&gt;
*Wimba is working with IMS to develop an activity module that acts as a consumer of the IMS LTI 2.0 standard...&lt;br /&gt;
*We in UPC (dfwikiteam) are working in a way to make the moodle course a IMS LTI 2.0 producer ... &lt;br /&gt;
shall this be included somewhere in the roadmap?--[[User:Ludo (Marc Alier)|Ludo (Marc Alier)]] 01:05, 9 April 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
== Site-wide groups ==&lt;br /&gt;
Site-wide (or, preferrable, context-wide) groups is much needed improvement (see votes for MDL-11826), especially in large institutions. Can it be targeted to 2.0?&lt;br /&gt;
&lt;br /&gt;
Yes, it would really help lot of people...&lt;br /&gt;
--[[User:Séverin Terrier|Séverin Terrier]] 16:57, 13 May 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
MDL-15416 seems to have been tagged for 2.0 by Petr :) [[User:Matt Gibson|Matt Gibson]] 10:46, 19 May 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
==Minted course profile plugin==&lt;br /&gt;
This was scheduled for 1.9, but didn&#039;t make it. Any plans to include it in 2.0? It seems to have vanished. [[User:Matt Gibson|Matt Gibson]] 10:47, 19 May 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
== Instructor-led Training Session Management ==&lt;br /&gt;
&lt;br /&gt;
In several of the projects we work on there is a very real need to manage instructor-led sessions by booking training rooms and assigning trainers. I&#039;ve always felt that Moodle is so advanced in many areas but this is something that is not really catered for. Developing this will mean that Moodle can comfortably handle blended-learning.&lt;br /&gt;
&lt;br /&gt;
There has been some fantastic work done on the Face-to-Face contrib module and the integration of the MRBS module. But in my experience, what&#039;s needed is actually a combination of the two systems that integrates to the Moodle calandar and other standard components.&lt;br /&gt;
&lt;br /&gt;
I&#039;d be happy to spec out the requirements and test in real environments.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Craig Meltzer &lt;br /&gt;
[http://moodle.org/user/view.php?id=34863&amp;amp;course=1&lt;br /&gt;
]&lt;/div&gt;</summary>
		<author><name>Mattgibson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Development_talk:Repository_API&amp;diff=38295</id>
		<title>Development talk:Repository API</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Development_talk:Repository_API&amp;diff=38295"/>
		<updated>2008-06-25T08:11:05Z</updated>

		<summary type="html">&lt;p&gt;Mattgibson: /* Windows network drives */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(Ideas will be deleted from the comments section as they are resolved or merged into the main spec)&lt;br /&gt;
&lt;br /&gt;
===Missing concept of trusted files===&lt;br /&gt;
Files are not created equal, some of them are to be trusted, some can not be trusted at all. Web browsers trust everything received from the server, files from server may access cookie information and thus scripting technologies may allow them to do anything user can do. We do have to trust our teachers because they are supposed to create the learning content, but we definitely can not trust all students.&lt;br /&gt;
&lt;br /&gt;
Imagine if students were allowed to upload arbitrary files to server, like html file loaded with javascript and the server would happily serve them to all Moodle users. Our solution is to use html cleaning filters for submitted texts and force downloads of student uploaded files. To do this we must know if we trust the files or not. Unfortunately the forced downloads of student uploaded files and cleaning of html texts does not solve all problems, because bugs in browsers and especially browser plug-ins may sometimes be used to work around our protections.&lt;br /&gt;
&lt;br /&gt;
The best solution would be to use separate web addresses for trusted and not trusted files (two wwwroots in config.php), not all sites may afford two different addresses but we should be imo prepared for this.  [[User:Skodak|Skodak]] 16:42, 28 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
 Great idea, yes.  In fact couldn&#039;t all the files be served via $CFG-&amp;gt;fileroot all the time?  &lt;br /&gt;
 [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
userid field could be used for this, but separate flag might be better in order to allow teachers to upload untrusted files (teacher uploads assignment submission for the student).&lt;br /&gt;
&lt;br /&gt;
===Relative file links===&lt;br /&gt;
Flash, Java and SCORM require relative links and directory hierarchy in general - we must support it. Some SCORM packages load hundreds of files per page which means the file serving must be very fast with minimum of db access.&lt;br /&gt;
&lt;br /&gt;
Reading the proposal above it seems the API is about serving of isolated files referenced by repository ids. HTML requires to use relative or absolute locators with file names, we can not use repository ids directly in relative links. In case of scorm we have absolute path to base of SCORM package of given activity and SCORM files use relative links inside the package.&lt;br /&gt;
Solution could be to store relative paths directly in filename field ex:directory1/directory2/filename.ext.&lt;br /&gt;
&lt;br /&gt;
 Yes I agree, we definitely need to support (virtual) directories and slasharguments.&lt;br /&gt;
 We could just match the file argument to a path in the db.  Perhaps add the fileid &lt;br /&gt;
 to the argument path as a primary key: fileid/directory1/directory2/filename.ext&lt;br /&gt;
 [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
===Virtual directories and files===&lt;br /&gt;
Sometimes the content of files is generated on the fly (csv exports, etc.), there are many special files spread through codebase doing nearly the same, it should be imho possible to use the same file API for these.&lt;br /&gt;
&lt;br /&gt;
Another virtual example is assignment submissions and webdav. I would like to see an option to browse the assignment submissions as directory structure, the top directory would be a list of names of users, inside html files with online assignment and uploaded files. This would allow us to implement simple zip&amp;amp;go or webdav based offline grading solutions. The problem here is that the content of this virtual submissions directly needs to be created on the fly based on user references, the proposed repository structure can not be used for this.&lt;br /&gt;
&lt;br /&gt;
 Very interesting idea! [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
===Backup/restore relinking===&lt;br /&gt;
We are supporting relinking inside courses only. Till now it was easy to guess if absolute link will work after restore on another server.&lt;br /&gt;
There are several types of files:&lt;br /&gt;
*course files - relinked during restore, works on any server if from the same course&lt;br /&gt;
*module files - not relinked, urls are not permanent, link can not be copypasted (assignments, forum attachments, rss files, etc.)&lt;br /&gt;
*user files - not relinked, links work only on original server (blog attachments, personal files, etc.)&lt;br /&gt;
&lt;br /&gt;
 I think all this will be simplified in the proposed system because everything is &lt;br /&gt;
 represented using the same system: a file with an ACL (backup can quickly &lt;br /&gt;
 determine all the files in one course, probably using one SQL query). &lt;br /&gt;
 [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
If we are backing up/restoring on the same server, will copies of a course restore without file duplication? I use this a lot so that I can archive one year&#039;s course whilst modifying it for next year. [[User:Matt Gibson|Matt Gibson]] 03:12, 29 April 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
===Access needed for both file and its instances===&lt;br /&gt;
We need two types of access control - first who can create instances (link files), second who can access the instance (download the file).&lt;br /&gt;
&lt;br /&gt;
 For the first don&#039;t we already have those capabilities? (like mod/forum:createattachment,&lt;br /&gt;
 moodle/course:managefiles) but they probably could use rationalising.   We&#039;ll need new &lt;br /&gt;
 ones per repository, too, of course.  &lt;br /&gt;
 [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
===Cache lifetime===&lt;br /&gt;
There should be a way to specify cache filetime for each instance of file. For example 0 for uploaded assignments, 1 day for resource file. It might be better to allow modules to decide about this, at present it is hardcoded in file.php.&lt;br /&gt;
&lt;br /&gt;
 Great idea.  [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
== Hierarchy in tables ? ==&lt;br /&gt;
&lt;br /&gt;
It&#039;s possible that I don&#039;t undertand a key piece of the concept, but I wonder why there is no reference to any &amp;quot;parent id&amp;quot; in the file or file_instance table ?&lt;br /&gt;
In other words, how the hierarchical structure is supposed to be &amp;quot;imported&amp;quot; from repository to Moodle ?&lt;br /&gt;
If the hierarchy is reserved to the course context, and not to the repository context, it seems difficult to allow students to access&lt;br /&gt;
to a complete directory, for example.&lt;br /&gt;
&lt;br /&gt;
On the other hand, maybe it&#039;s only a question for the &amp;quot;local&amp;quot; repository type, and not to the &amp;quot;generic&amp;quot; repository API ?&lt;br /&gt;
[[User:Allegre Guillaume|Allegre Guillaume]] 16:43, 5 March 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
[[User:Martin Dougiamas|Martin Dougiamas]] 12:58, 15 March 2008 (CDT): basically I was thinking we just store a full local path for each file instead of hierarchies.  It wasn&#039;t in the db schema though: I&#039;ve just added it.  Thanks!&lt;br /&gt;
&lt;br /&gt;
As for allowing access to a whole directory, that&#039;s something I&#039;ve not thought about - thanks!  I agree we need to support something like that in the interface.  Hmm ..&lt;br /&gt;
&lt;br /&gt;
== Editing Repository Files / Version Control ? ==&lt;br /&gt;
&lt;br /&gt;
How do you imagine to handle the &amp;quot;editing file&amp;quot; problem ? &lt;br /&gt;
I can see several solutions :&lt;br /&gt;
# the simplest way : write access to a file really allows to edit (re-upload) the file, each instance being modified&lt;br /&gt;
# the &amp;quot;cheap copy&amp;quot; way : optionally, the modification is applied only to new file_instances (or those for which the teacher forces to). Here you have to handle two (then maybe more) revisions of this file.&lt;br /&gt;
This triggers the file revisions (or version control) question.&lt;br /&gt;
&lt;br /&gt;
A related question is about versionned files : &lt;br /&gt;
should it depend only upon the repository layer (for example, a plugin could implement a SVN &amp;quot;repository&amp;quot;) ?&lt;br /&gt;
Or should Moodle be aware of the file &amp;quot;revision number&amp;quot; ? &lt;br /&gt;
[[User:Allegre Guillaume|Allegre Guillaume]] 17:00, 5 March 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:Martin Dougiamas|Martin Dougiamas]] 13:08, 15 March 2008 (CDT):  I don&#039;t think we should start getting into such things, version and editing is the job of the dedicated external repository system and people should use that interface.  &lt;br /&gt;
&lt;br /&gt;
What we do have in Moodle is the file-&amp;gt;updates field.  This specifies when to get a fresh copy.  It would be set when the user has specified they want Moodle to use the &amp;quot;latest version&amp;quot; of the file.  And if the user specified a particular version in the repository interface then that is what gets copied (once) and the file-&amp;gt;updates field is left as zero.&lt;br /&gt;
&lt;br /&gt;
One scenario would be if someone wants to use version 1 in one course and version 2 in another, but since the version is in the URL to the original file (and thus a different remote path) they would be treated as two separate files in Moodle anyway.&lt;br /&gt;
&lt;br /&gt;
Might be a small problem if they said &amp;quot;latest version, no update&amp;quot; in course 1 and then later on said &amp;quot;latest version, no update&amp;quot; in a second course.  I guess that would re-download the latest version (which might have changed) and thus course 1 would have an unexpected update.  We could solve this by alerting the user and giving them a choice, I suppose.&lt;br /&gt;
&lt;br /&gt;
== Replacing Moodle&#039;s File System ==&lt;br /&gt;
&lt;br /&gt;
The API as specified still uses the standard Moodle file system, which has its limitations while providing a simple file access method. But, shouldn&#039;t we also be considering completely (or partially) replacing the Moodle file system with the repository system? To that end, the file interface would be the same to users, but where the files are and how they are accessed would be up to which repository was being used. In this system, the standard Moodle file system would just be one of the available repositories. Then the API could support more robust access controls if available, or very few (as Moodle does now). This could allow for per-directory / per-file privilege granting, common file areas so that courses could access the same copy of a file (rather than copying it into the Moodle file area), etc.&lt;br /&gt;
&lt;br /&gt;
The API could also support multiple repositories and allow choosing a file as a link rather than copying it.&lt;br /&gt;
&lt;br /&gt;
Of course, this would also mean allowing write access to the repository area from Moodle, rather than leaving it as read-only. I know the plan was to do this through the [[Portfolio API]], but that really is limited to a user storage function and not a file management function. I think having an API defined to allow for full file management would be a better solution - even if not supported by all repositories.&lt;br /&gt;
[[User:Mike Churchward|Mike Churchward]] 12:54, 6 March 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
[[User:Martin Dougiamas|Martin Dougiamas]] 12:54, 15 March 2008 (CDT) :&lt;br /&gt;
Actually, Mike, the standard file system is NOT being retained at all.  I&#039;ve clarified this slightly in the docs.  The course-centered structure for files is gone.  All files ARE stored on disk but most of the info regarding their location and access is all governed by a table in the database (so the files could just as easily be in a remote database if you wished).  Files used in multiple areas within Moodle will never be stored more than once in Moodle.&lt;br /&gt;
&lt;br /&gt;
The idea of a read/write interface was how we started, but it&#039;s insanely complex once you try to handle backups (ie how do you make a complete backup suitable for giving to someone else?) and access control (how do you decide access depending on Moodle contexts), and we&#039;ll never do it as well as the original repository does it.  Why should we duplicate the Hive interface (to use an example) in Moodle when Hive has a perfectly good one already, one that handles all the extra stuff like Copyright controls, workflow and so on?   &lt;br /&gt;
&lt;br /&gt;
That said, the current Repository plugin idea is very simple, so that if anyone really wanted to embed management into the &amp;quot;file picker&amp;quot; interface they totally could do it in the plugin.&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
==Windows network drives==&lt;br /&gt;
I&#039;ve added this to the end of the list of repository types to be supported because its possibly the most useful one I can think of. Our school wants to make the transition to moodle, but getting the files on there is the biggest barrier and there is a lot of stuff sitting on our shared and personal folders which is time consuming to transfer. Integration is a big thing that management want to see, particularly the ability to bulk upload files. This may not be a repository as such because it may be that the best way is to copy the file from the shared folder into the repository rather than where it is so it can be moved/deleted accidentally, but easy access is vital in making the process of uploading a file possible. It would also make Moodle a killer app in that it could make our network drives available from home through a secure web interface. &lt;br /&gt;
&lt;br /&gt;
I&#039;ve linked to Guy Thomas&#039; [http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=991 Windows Share Web Client block] as it is a good start, but sadly only works on Linux. [[User:Matt Gibson|Matt Gibson]] 03:43, 29 April 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 Fantastic idea, let&#039;s call it the SMB plugin  - [[User:Martin Dougiamas|Martin Dougiamas]] 21:25, 8 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
Glad you like it :) Hope it works on Windows servers! [[User:Matt Gibson|Matt Gibson]] 03:11, 25 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
==Bulk operations==&lt;br /&gt;
On a similar note, Don Hinkelman&#039;s new course format provides a great bulk-upload feature whereby a whole folder can be uploaded and added to the course as resources with the names of the files as titles, with just a couple of clicks. I know this is extending the repository idea a little, but to be honest, I think that one of the biggest weaknesses of Moodle&#039;s file handling right now is not being able to add an entire folder of files without manually going through each one and laboriously specifying location and title. To make any repository useful, I think three operations should be possible with one or two clicks:&lt;br /&gt;
* Add a whole folder/group of files to the repository at once&lt;br /&gt;
* The above operation, but additionally, have all of the folder/group added to a course and named automatically, all in one go.&lt;br /&gt;
* Find a group of files which are already in the repository and add them to a course all at once, with automatic naming as above.&lt;br /&gt;
Not sure if this is best put here or in the Developemt: File_API bit, but here seemed slightly better. [[User:Matt Gibson|Matt Gibson]] 03:43, 29 April 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
  This is probably not related to the file API at all.  I&#039;d see it as being a new item on the resource menu (Add multiple resources ...) with some sort of shift-click scenario.  nice idea though.  Can you file it as a tracker item?    [[User:Martin Dougiamas|Martin Dougiamas]] 21:26, 8 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
MDL-15408 [[User:Matt Gibson|Matt Gibson]] 03:09, 25 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
== Bulk and a new resource type from repository ==&lt;br /&gt;
&lt;br /&gt;
Our school has several campuses and a distance learning unit with well organized and big course resource trees. The repository module could be enormously useful for us.&lt;br /&gt;
&lt;br /&gt;
I have looked at Moodle&#039;s IMS repository a bit, and like the way it is possible to put multiple resources into one access point. If the new repository could have some of the same possibilities, it would be marvellous. The drawback with the IMS is that it opens a new window with all the multiple resources. Instead, it would be OK to be able to share a whole lot of resources, or a whole &amp;quot;resource tree&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
I also like the bulk function, to be able to parse a folder of say, html-files, and add it to the resource tree.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &amp;quot;local repository name&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
I think users will find the word local to be confusing.  For the developer or administrator, local seems to refer to the Moodle server.  But for the teacher or student, they will think that local refers to their own local files system.  I would suggest just using the domain name for that server (like myMoodleSite.org) and list it as the first entry to avoid this confusion.  [[User:Gary Anderson|Gary Anderson]] 02:40, 10 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
 I&#039;ll add a setting so the admin can override this as they like  [[User:Martin Dougiamas|Martin Dougiamas]] 01:07, 23  June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
== Credentials to third party systems ==&lt;br /&gt;
&lt;br /&gt;
You might want to consider something like oauth - http://oauth.net - to manage credentials of third party sites, rather than asking the user for them. I know I sure wouldn&#039;t want to input my credentials for one system into another! [[User:Nigel McNie|Nigel McNie]] 07:08, 17 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
 It&#039;s up to the plugin, but generally we won&#039;t be storing anything permanently.  Oauth could be useful though, thanks  [[User:Martin Dougiamas|Martin Dougiamas]] 01:09, 23  June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
== function is_logged() ==&lt;br /&gt;
&lt;br /&gt;
I created a prototype of file picker, the repository I tested is box.net, in this cast, we need a function to check if users are authenticated by box.net, if this function return false, print_login function will be called, it print a link to redirect to box.net login page, after the user logged in, box.net will redirect to file picker page, the authenticated user obtain a auth_token_key to access resource.&lt;br /&gt;
&lt;br /&gt;
The other web service like google docs and facebook have similar authentication process. &lt;br /&gt;
&lt;br /&gt;
See: http://enabled.box.net/docs/rest#authentication&lt;br /&gt;
&lt;br /&gt;
-- [[User:Dongsheng Cai|Dongsheng Cai]] 01:34, 22 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
== ws.php ==&lt;br /&gt;
Another problem is users have to wait for page loading (file picker page) until moodle have got the response from remote web service (limited by cURL&#039;s synchronous requests), this may take a long time or the remote web service won&#039;t reply at all, users may consider something goes wrong, then they may refresh the file picker. &lt;br /&gt;
&lt;br /&gt;
Maybe we should have another page: repository/ws.php, which in charge of communicating with web services, it can be embedded in file picker page as iframe, or we can use Ajax to invoke this page, the main page -- repository/picker.php will display a loading picture or a progress bar during communicating, this is more user friendly.&lt;br /&gt;
&lt;br /&gt;
For example, when users try to obtain a file list in box.net, a iframe of ws.php?action=get_list will be inserted in picker, $repository_box-&amp;gt;get_listing(&#039;/&#039;) will be invoked in ws.php, a loading picture will be displayed in picker page, when remote web service returned, the picker page remove the loading picture, and display the result. Does this sound reasonable?&lt;br /&gt;
&lt;br /&gt;
-- [[User:Dongsheng Cai|Dongsheng Cai]] 01:34, 22 June 2008 (CDT)&lt;/div&gt;</summary>
		<author><name>Mattgibson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Development_talk:Repository_API&amp;diff=38294</id>
		<title>Development talk:Repository API</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Development_talk:Repository_API&amp;diff=38294"/>
		<updated>2008-06-25T08:10:55Z</updated>

		<summary type="html">&lt;p&gt;Mattgibson: /* Windows network drives */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(Ideas will be deleted from the comments section as they are resolved or merged into the main spec)&lt;br /&gt;
&lt;br /&gt;
===Missing concept of trusted files===&lt;br /&gt;
Files are not created equal, some of them are to be trusted, some can not be trusted at all. Web browsers trust everything received from the server, files from server may access cookie information and thus scripting technologies may allow them to do anything user can do. We do have to trust our teachers because they are supposed to create the learning content, but we definitely can not trust all students.&lt;br /&gt;
&lt;br /&gt;
Imagine if students were allowed to upload arbitrary files to server, like html file loaded with javascript and the server would happily serve them to all Moodle users. Our solution is to use html cleaning filters for submitted texts and force downloads of student uploaded files. To do this we must know if we trust the files or not. Unfortunately the forced downloads of student uploaded files and cleaning of html texts does not solve all problems, because bugs in browsers and especially browser plug-ins may sometimes be used to work around our protections.&lt;br /&gt;
&lt;br /&gt;
The best solution would be to use separate web addresses for trusted and not trusted files (two wwwroots in config.php), not all sites may afford two different addresses but we should be imo prepared for this.  [[User:Skodak|Skodak]] 16:42, 28 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
 Great idea, yes.  In fact couldn&#039;t all the files be served via $CFG-&amp;gt;fileroot all the time?  &lt;br /&gt;
 [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
userid field could be used for this, but separate flag might be better in order to allow teachers to upload untrusted files (teacher uploads assignment submission for the student).&lt;br /&gt;
&lt;br /&gt;
===Relative file links===&lt;br /&gt;
Flash, Java and SCORM require relative links and directory hierarchy in general - we must support it. Some SCORM packages load hundreds of files per page which means the file serving must be very fast with minimum of db access.&lt;br /&gt;
&lt;br /&gt;
Reading the proposal above it seems the API is about serving of isolated files referenced by repository ids. HTML requires to use relative or absolute locators with file names, we can not use repository ids directly in relative links. In case of scorm we have absolute path to base of SCORM package of given activity and SCORM files use relative links inside the package.&lt;br /&gt;
Solution could be to store relative paths directly in filename field ex:directory1/directory2/filename.ext.&lt;br /&gt;
&lt;br /&gt;
 Yes I agree, we definitely need to support (virtual) directories and slasharguments.&lt;br /&gt;
 We could just match the file argument to a path in the db.  Perhaps add the fileid &lt;br /&gt;
 to the argument path as a primary key: fileid/directory1/directory2/filename.ext&lt;br /&gt;
 [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
===Virtual directories and files===&lt;br /&gt;
Sometimes the content of files is generated on the fly (csv exports, etc.), there are many special files spread through codebase doing nearly the same, it should be imho possible to use the same file API for these.&lt;br /&gt;
&lt;br /&gt;
Another virtual example is assignment submissions and webdav. I would like to see an option to browse the assignment submissions as directory structure, the top directory would be a list of names of users, inside html files with online assignment and uploaded files. This would allow us to implement simple zip&amp;amp;go or webdav based offline grading solutions. The problem here is that the content of this virtual submissions directly needs to be created on the fly based on user references, the proposed repository structure can not be used for this.&lt;br /&gt;
&lt;br /&gt;
 Very interesting idea! [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
===Backup/restore relinking===&lt;br /&gt;
We are supporting relinking inside courses only. Till now it was easy to guess if absolute link will work after restore on another server.&lt;br /&gt;
There are several types of files:&lt;br /&gt;
*course files - relinked during restore, works on any server if from the same course&lt;br /&gt;
*module files - not relinked, urls are not permanent, link can not be copypasted (assignments, forum attachments, rss files, etc.)&lt;br /&gt;
*user files - not relinked, links work only on original server (blog attachments, personal files, etc.)&lt;br /&gt;
&lt;br /&gt;
 I think all this will be simplified in the proposed system because everything is &lt;br /&gt;
 represented using the same system: a file with an ACL (backup can quickly &lt;br /&gt;
 determine all the files in one course, probably using one SQL query). &lt;br /&gt;
 [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
If we are backing up/restoring on the same server, will copies of a course restore without file duplication? I use this a lot so that I can archive one year&#039;s course whilst modifying it for next year. [[User:Matt Gibson|Matt Gibson]] 03:12, 29 April 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
===Access needed for both file and its instances===&lt;br /&gt;
We need two types of access control - first who can create instances (link files), second who can access the instance (download the file).&lt;br /&gt;
&lt;br /&gt;
 For the first don&#039;t we already have those capabilities? (like mod/forum:createattachment,&lt;br /&gt;
 moodle/course:managefiles) but they probably could use rationalising.   We&#039;ll need new &lt;br /&gt;
 ones per repository, too, of course.  &lt;br /&gt;
 [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
===Cache lifetime===&lt;br /&gt;
There should be a way to specify cache filetime for each instance of file. For example 0 for uploaded assignments, 1 day for resource file. It might be better to allow modules to decide about this, at present it is hardcoded in file.php.&lt;br /&gt;
&lt;br /&gt;
 Great idea.  [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
== Hierarchy in tables ? ==&lt;br /&gt;
&lt;br /&gt;
It&#039;s possible that I don&#039;t undertand a key piece of the concept, but I wonder why there is no reference to any &amp;quot;parent id&amp;quot; in the file or file_instance table ?&lt;br /&gt;
In other words, how the hierarchical structure is supposed to be &amp;quot;imported&amp;quot; from repository to Moodle ?&lt;br /&gt;
If the hierarchy is reserved to the course context, and not to the repository context, it seems difficult to allow students to access&lt;br /&gt;
to a complete directory, for example.&lt;br /&gt;
&lt;br /&gt;
On the other hand, maybe it&#039;s only a question for the &amp;quot;local&amp;quot; repository type, and not to the &amp;quot;generic&amp;quot; repository API ?&lt;br /&gt;
[[User:Allegre Guillaume|Allegre Guillaume]] 16:43, 5 March 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
[[User:Martin Dougiamas|Martin Dougiamas]] 12:58, 15 March 2008 (CDT): basically I was thinking we just store a full local path for each file instead of hierarchies.  It wasn&#039;t in the db schema though: I&#039;ve just added it.  Thanks!&lt;br /&gt;
&lt;br /&gt;
As for allowing access to a whole directory, that&#039;s something I&#039;ve not thought about - thanks!  I agree we need to support something like that in the interface.  Hmm ..&lt;br /&gt;
&lt;br /&gt;
== Editing Repository Files / Version Control ? ==&lt;br /&gt;
&lt;br /&gt;
How do you imagine to handle the &amp;quot;editing file&amp;quot; problem ? &lt;br /&gt;
I can see several solutions :&lt;br /&gt;
# the simplest way : write access to a file really allows to edit (re-upload) the file, each instance being modified&lt;br /&gt;
# the &amp;quot;cheap copy&amp;quot; way : optionally, the modification is applied only to new file_instances (or those for which the teacher forces to). Here you have to handle two (then maybe more) revisions of this file.&lt;br /&gt;
This triggers the file revisions (or version control) question.&lt;br /&gt;
&lt;br /&gt;
A related question is about versionned files : &lt;br /&gt;
should it depend only upon the repository layer (for example, a plugin could implement a SVN &amp;quot;repository&amp;quot;) ?&lt;br /&gt;
Or should Moodle be aware of the file &amp;quot;revision number&amp;quot; ? &lt;br /&gt;
[[User:Allegre Guillaume|Allegre Guillaume]] 17:00, 5 March 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:Martin Dougiamas|Martin Dougiamas]] 13:08, 15 March 2008 (CDT):  I don&#039;t think we should start getting into such things, version and editing is the job of the dedicated external repository system and people should use that interface.  &lt;br /&gt;
&lt;br /&gt;
What we do have in Moodle is the file-&amp;gt;updates field.  This specifies when to get a fresh copy.  It would be set when the user has specified they want Moodle to use the &amp;quot;latest version&amp;quot; of the file.  And if the user specified a particular version in the repository interface then that is what gets copied (once) and the file-&amp;gt;updates field is left as zero.&lt;br /&gt;
&lt;br /&gt;
One scenario would be if someone wants to use version 1 in one course and version 2 in another, but since the version is in the URL to the original file (and thus a different remote path) they would be treated as two separate files in Moodle anyway.&lt;br /&gt;
&lt;br /&gt;
Might be a small problem if they said &amp;quot;latest version, no update&amp;quot; in course 1 and then later on said &amp;quot;latest version, no update&amp;quot; in a second course.  I guess that would re-download the latest version (which might have changed) and thus course 1 would have an unexpected update.  We could solve this by alerting the user and giving them a choice, I suppose.&lt;br /&gt;
&lt;br /&gt;
== Replacing Moodle&#039;s File System ==&lt;br /&gt;
&lt;br /&gt;
The API as specified still uses the standard Moodle file system, which has its limitations while providing a simple file access method. But, shouldn&#039;t we also be considering completely (or partially) replacing the Moodle file system with the repository system? To that end, the file interface would be the same to users, but where the files are and how they are accessed would be up to which repository was being used. In this system, the standard Moodle file system would just be one of the available repositories. Then the API could support more robust access controls if available, or very few (as Moodle does now). This could allow for per-directory / per-file privilege granting, common file areas so that courses could access the same copy of a file (rather than copying it into the Moodle file area), etc.&lt;br /&gt;
&lt;br /&gt;
The API could also support multiple repositories and allow choosing a file as a link rather than copying it.&lt;br /&gt;
&lt;br /&gt;
Of course, this would also mean allowing write access to the repository area from Moodle, rather than leaving it as read-only. I know the plan was to do this through the [[Portfolio API]], but that really is limited to a user storage function and not a file management function. I think having an API defined to allow for full file management would be a better solution - even if not supported by all repositories.&lt;br /&gt;
[[User:Mike Churchward|Mike Churchward]] 12:54, 6 March 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
[[User:Martin Dougiamas|Martin Dougiamas]] 12:54, 15 March 2008 (CDT) :&lt;br /&gt;
Actually, Mike, the standard file system is NOT being retained at all.  I&#039;ve clarified this slightly in the docs.  The course-centered structure for files is gone.  All files ARE stored on disk but most of the info regarding their location and access is all governed by a table in the database (so the files could just as easily be in a remote database if you wished).  Files used in multiple areas within Moodle will never be stored more than once in Moodle.&lt;br /&gt;
&lt;br /&gt;
The idea of a read/write interface was how we started, but it&#039;s insanely complex once you try to handle backups (ie how do you make a complete backup suitable for giving to someone else?) and access control (how do you decide access depending on Moodle contexts), and we&#039;ll never do it as well as the original repository does it.  Why should we duplicate the Hive interface (to use an example) in Moodle when Hive has a perfectly good one already, one that handles all the extra stuff like Copyright controls, workflow and so on?   &lt;br /&gt;
&lt;br /&gt;
That said, the current Repository plugin idea is very simple, so that if anyone really wanted to embed management into the &amp;quot;file picker&amp;quot; interface they totally could do it in the plugin.&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
==Windows network drives==&lt;br /&gt;
I&#039;ve added this to the end of the list of repository types to be supported because its possibly the most useful one I can think of. Our school wants to make the transition to moodle, but getting the files on there is the biggest barrier and there is a lot of stuff sitting on our shared and personal folders which is time consuming to transfer. Integration is a big thing that management want to see, particularly the ability to bulk upload files. This may not be a repository as such because it may be that the best way is to copy the file from the shared folder into the repository rather than where it is so it can be moved/deleted accidentally, but easy access is vital in making the process of uploading a file possible. It would also make Moodle a killer app in that it could make our network drives available from home through a secure web interface. &lt;br /&gt;
&lt;br /&gt;
I&#039;ve linked to Guy Thomas&#039; [http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=991 Windows Share Web Client block] as it is a good start, but sadly only works on Linux. [[User:Matt Gibson|Matt Gibson]] 03:43, 29 April 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 Fantastic idea, let&#039;s call it the SMB plugin  - [[User:Martin Dougiamas|Martin Dougiamas]] 21:25, 8 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
Glad you like it :) Hope it works on Windows servers!&lt;br /&gt;
&lt;br /&gt;
==Bulk operations==&lt;br /&gt;
On a similar note, Don Hinkelman&#039;s new course format provides a great bulk-upload feature whereby a whole folder can be uploaded and added to the course as resources with the names of the files as titles, with just a couple of clicks. I know this is extending the repository idea a little, but to be honest, I think that one of the biggest weaknesses of Moodle&#039;s file handling right now is not being able to add an entire folder of files without manually going through each one and laboriously specifying location and title. To make any repository useful, I think three operations should be possible with one or two clicks:&lt;br /&gt;
* Add a whole folder/group of files to the repository at once&lt;br /&gt;
* The above operation, but additionally, have all of the folder/group added to a course and named automatically, all in one go.&lt;br /&gt;
* Find a group of files which are already in the repository and add them to a course all at once, with automatic naming as above.&lt;br /&gt;
Not sure if this is best put here or in the Developemt: File_API bit, but here seemed slightly better. [[User:Matt Gibson|Matt Gibson]] 03:43, 29 April 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
  This is probably not related to the file API at all.  I&#039;d see it as being a new item on the resource menu (Add multiple resources ...) with some sort of shift-click scenario.  nice idea though.  Can you file it as a tracker item?    [[User:Martin Dougiamas|Martin Dougiamas]] 21:26, 8 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
MDL-15408 [[User:Matt Gibson|Matt Gibson]] 03:09, 25 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
== Bulk and a new resource type from repository ==&lt;br /&gt;
&lt;br /&gt;
Our school has several campuses and a distance learning unit with well organized and big course resource trees. The repository module could be enormously useful for us.&lt;br /&gt;
&lt;br /&gt;
I have looked at Moodle&#039;s IMS repository a bit, and like the way it is possible to put multiple resources into one access point. If the new repository could have some of the same possibilities, it would be marvellous. The drawback with the IMS is that it opens a new window with all the multiple resources. Instead, it would be OK to be able to share a whole lot of resources, or a whole &amp;quot;resource tree&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
I also like the bulk function, to be able to parse a folder of say, html-files, and add it to the resource tree.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &amp;quot;local repository name&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
I think users will find the word local to be confusing.  For the developer or administrator, local seems to refer to the Moodle server.  But for the teacher or student, they will think that local refers to their own local files system.  I would suggest just using the domain name for that server (like myMoodleSite.org) and list it as the first entry to avoid this confusion.  [[User:Gary Anderson|Gary Anderson]] 02:40, 10 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
 I&#039;ll add a setting so the admin can override this as they like  [[User:Martin Dougiamas|Martin Dougiamas]] 01:07, 23  June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
== Credentials to third party systems ==&lt;br /&gt;
&lt;br /&gt;
You might want to consider something like oauth - http://oauth.net - to manage credentials of third party sites, rather than asking the user for them. I know I sure wouldn&#039;t want to input my credentials for one system into another! [[User:Nigel McNie|Nigel McNie]] 07:08, 17 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
 It&#039;s up to the plugin, but generally we won&#039;t be storing anything permanently.  Oauth could be useful though, thanks  [[User:Martin Dougiamas|Martin Dougiamas]] 01:09, 23  June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
== function is_logged() ==&lt;br /&gt;
&lt;br /&gt;
I created a prototype of file picker, the repository I tested is box.net, in this cast, we need a function to check if users are authenticated by box.net, if this function return false, print_login function will be called, it print a link to redirect to box.net login page, after the user logged in, box.net will redirect to file picker page, the authenticated user obtain a auth_token_key to access resource.&lt;br /&gt;
&lt;br /&gt;
The other web service like google docs and facebook have similar authentication process. &lt;br /&gt;
&lt;br /&gt;
See: http://enabled.box.net/docs/rest#authentication&lt;br /&gt;
&lt;br /&gt;
-- [[User:Dongsheng Cai|Dongsheng Cai]] 01:34, 22 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
== ws.php ==&lt;br /&gt;
Another problem is users have to wait for page loading (file picker page) until moodle have got the response from remote web service (limited by cURL&#039;s synchronous requests), this may take a long time or the remote web service won&#039;t reply at all, users may consider something goes wrong, then they may refresh the file picker. &lt;br /&gt;
&lt;br /&gt;
Maybe we should have another page: repository/ws.php, which in charge of communicating with web services, it can be embedded in file picker page as iframe, or we can use Ajax to invoke this page, the main page -- repository/picker.php will display a loading picture or a progress bar during communicating, this is more user friendly.&lt;br /&gt;
&lt;br /&gt;
For example, when users try to obtain a file list in box.net, a iframe of ws.php?action=get_list will be inserted in picker, $repository_box-&amp;gt;get_listing(&#039;/&#039;) will be invoked in ws.php, a loading picture will be displayed in picker page, when remote web service returned, the picker page remove the loading picture, and display the result. Does this sound reasonable?&lt;br /&gt;
&lt;br /&gt;
-- [[User:Dongsheng Cai|Dongsheng Cai]] 01:34, 22 June 2008 (CDT)&lt;/div&gt;</summary>
		<author><name>Mattgibson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Development_talk:Repository_API&amp;diff=38293</id>
		<title>Development talk:Repository API</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Development_talk:Repository_API&amp;diff=38293"/>
		<updated>2008-06-25T08:09:48Z</updated>

		<summary type="html">&lt;p&gt;Mattgibson: /* Bulk operations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(Ideas will be deleted from the comments section as they are resolved or merged into the main spec)&lt;br /&gt;
&lt;br /&gt;
===Missing concept of trusted files===&lt;br /&gt;
Files are not created equal, some of them are to be trusted, some can not be trusted at all. Web browsers trust everything received from the server, files from server may access cookie information and thus scripting technologies may allow them to do anything user can do. We do have to trust our teachers because they are supposed to create the learning content, but we definitely can not trust all students.&lt;br /&gt;
&lt;br /&gt;
Imagine if students were allowed to upload arbitrary files to server, like html file loaded with javascript and the server would happily serve them to all Moodle users. Our solution is to use html cleaning filters for submitted texts and force downloads of student uploaded files. To do this we must know if we trust the files or not. Unfortunately the forced downloads of student uploaded files and cleaning of html texts does not solve all problems, because bugs in browsers and especially browser plug-ins may sometimes be used to work around our protections.&lt;br /&gt;
&lt;br /&gt;
The best solution would be to use separate web addresses for trusted and not trusted files (two wwwroots in config.php), not all sites may afford two different addresses but we should be imo prepared for this.  [[User:Skodak|Skodak]] 16:42, 28 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
 Great idea, yes.  In fact couldn&#039;t all the files be served via $CFG-&amp;gt;fileroot all the time?  &lt;br /&gt;
 [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
userid field could be used for this, but separate flag might be better in order to allow teachers to upload untrusted files (teacher uploads assignment submission for the student).&lt;br /&gt;
&lt;br /&gt;
===Relative file links===&lt;br /&gt;
Flash, Java and SCORM require relative links and directory hierarchy in general - we must support it. Some SCORM packages load hundreds of files per page which means the file serving must be very fast with minimum of db access.&lt;br /&gt;
&lt;br /&gt;
Reading the proposal above it seems the API is about serving of isolated files referenced by repository ids. HTML requires to use relative or absolute locators with file names, we can not use repository ids directly in relative links. In case of scorm we have absolute path to base of SCORM package of given activity and SCORM files use relative links inside the package.&lt;br /&gt;
Solution could be to store relative paths directly in filename field ex:directory1/directory2/filename.ext.&lt;br /&gt;
&lt;br /&gt;
 Yes I agree, we definitely need to support (virtual) directories and slasharguments.&lt;br /&gt;
 We could just match the file argument to a path in the db.  Perhaps add the fileid &lt;br /&gt;
 to the argument path as a primary key: fileid/directory1/directory2/filename.ext&lt;br /&gt;
 [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
===Virtual directories and files===&lt;br /&gt;
Sometimes the content of files is generated on the fly (csv exports, etc.), there are many special files spread through codebase doing nearly the same, it should be imho possible to use the same file API for these.&lt;br /&gt;
&lt;br /&gt;
Another virtual example is assignment submissions and webdav. I would like to see an option to browse the assignment submissions as directory structure, the top directory would be a list of names of users, inside html files with online assignment and uploaded files. This would allow us to implement simple zip&amp;amp;go or webdav based offline grading solutions. The problem here is that the content of this virtual submissions directly needs to be created on the fly based on user references, the proposed repository structure can not be used for this.&lt;br /&gt;
&lt;br /&gt;
 Very interesting idea! [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
===Backup/restore relinking===&lt;br /&gt;
We are supporting relinking inside courses only. Till now it was easy to guess if absolute link will work after restore on another server.&lt;br /&gt;
There are several types of files:&lt;br /&gt;
*course files - relinked during restore, works on any server if from the same course&lt;br /&gt;
*module files - not relinked, urls are not permanent, link can not be copypasted (assignments, forum attachments, rss files, etc.)&lt;br /&gt;
*user files - not relinked, links work only on original server (blog attachments, personal files, etc.)&lt;br /&gt;
&lt;br /&gt;
 I think all this will be simplified in the proposed system because everything is &lt;br /&gt;
 represented using the same system: a file with an ACL (backup can quickly &lt;br /&gt;
 determine all the files in one course, probably using one SQL query). &lt;br /&gt;
 [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
If we are backing up/restoring on the same server, will copies of a course restore without file duplication? I use this a lot so that I can archive one year&#039;s course whilst modifying it for next year. [[User:Matt Gibson|Matt Gibson]] 03:12, 29 April 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
===Access needed for both file and its instances===&lt;br /&gt;
We need two types of access control - first who can create instances (link files), second who can access the instance (download the file).&lt;br /&gt;
&lt;br /&gt;
 For the first don&#039;t we already have those capabilities? (like mod/forum:createattachment,&lt;br /&gt;
 moodle/course:managefiles) but they probably could use rationalising.   We&#039;ll need new &lt;br /&gt;
 ones per repository, too, of course.  &lt;br /&gt;
 [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
===Cache lifetime===&lt;br /&gt;
There should be a way to specify cache filetime for each instance of file. For example 0 for uploaded assignments, 1 day for resource file. It might be better to allow modules to decide about this, at present it is hardcoded in file.php.&lt;br /&gt;
&lt;br /&gt;
 Great idea.  [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
== Hierarchy in tables ? ==&lt;br /&gt;
&lt;br /&gt;
It&#039;s possible that I don&#039;t undertand a key piece of the concept, but I wonder why there is no reference to any &amp;quot;parent id&amp;quot; in the file or file_instance table ?&lt;br /&gt;
In other words, how the hierarchical structure is supposed to be &amp;quot;imported&amp;quot; from repository to Moodle ?&lt;br /&gt;
If the hierarchy is reserved to the course context, and not to the repository context, it seems difficult to allow students to access&lt;br /&gt;
to a complete directory, for example.&lt;br /&gt;
&lt;br /&gt;
On the other hand, maybe it&#039;s only a question for the &amp;quot;local&amp;quot; repository type, and not to the &amp;quot;generic&amp;quot; repository API ?&lt;br /&gt;
[[User:Allegre Guillaume|Allegre Guillaume]] 16:43, 5 March 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
[[User:Martin Dougiamas|Martin Dougiamas]] 12:58, 15 March 2008 (CDT): basically I was thinking we just store a full local path for each file instead of hierarchies.  It wasn&#039;t in the db schema though: I&#039;ve just added it.  Thanks!&lt;br /&gt;
&lt;br /&gt;
As for allowing access to a whole directory, that&#039;s something I&#039;ve not thought about - thanks!  I agree we need to support something like that in the interface.  Hmm ..&lt;br /&gt;
&lt;br /&gt;
== Editing Repository Files / Version Control ? ==&lt;br /&gt;
&lt;br /&gt;
How do you imagine to handle the &amp;quot;editing file&amp;quot; problem ? &lt;br /&gt;
I can see several solutions :&lt;br /&gt;
# the simplest way : write access to a file really allows to edit (re-upload) the file, each instance being modified&lt;br /&gt;
# the &amp;quot;cheap copy&amp;quot; way : optionally, the modification is applied only to new file_instances (or those for which the teacher forces to). Here you have to handle two (then maybe more) revisions of this file.&lt;br /&gt;
This triggers the file revisions (or version control) question.&lt;br /&gt;
&lt;br /&gt;
A related question is about versionned files : &lt;br /&gt;
should it depend only upon the repository layer (for example, a plugin could implement a SVN &amp;quot;repository&amp;quot;) ?&lt;br /&gt;
Or should Moodle be aware of the file &amp;quot;revision number&amp;quot; ? &lt;br /&gt;
[[User:Allegre Guillaume|Allegre Guillaume]] 17:00, 5 March 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:Martin Dougiamas|Martin Dougiamas]] 13:08, 15 March 2008 (CDT):  I don&#039;t think we should start getting into such things, version and editing is the job of the dedicated external repository system and people should use that interface.  &lt;br /&gt;
&lt;br /&gt;
What we do have in Moodle is the file-&amp;gt;updates field.  This specifies when to get a fresh copy.  It would be set when the user has specified they want Moodle to use the &amp;quot;latest version&amp;quot; of the file.  And if the user specified a particular version in the repository interface then that is what gets copied (once) and the file-&amp;gt;updates field is left as zero.&lt;br /&gt;
&lt;br /&gt;
One scenario would be if someone wants to use version 1 in one course and version 2 in another, but since the version is in the URL to the original file (and thus a different remote path) they would be treated as two separate files in Moodle anyway.&lt;br /&gt;
&lt;br /&gt;
Might be a small problem if they said &amp;quot;latest version, no update&amp;quot; in course 1 and then later on said &amp;quot;latest version, no update&amp;quot; in a second course.  I guess that would re-download the latest version (which might have changed) and thus course 1 would have an unexpected update.  We could solve this by alerting the user and giving them a choice, I suppose.&lt;br /&gt;
&lt;br /&gt;
== Replacing Moodle&#039;s File System ==&lt;br /&gt;
&lt;br /&gt;
The API as specified still uses the standard Moodle file system, which has its limitations while providing a simple file access method. But, shouldn&#039;t we also be considering completely (or partially) replacing the Moodle file system with the repository system? To that end, the file interface would be the same to users, but where the files are and how they are accessed would be up to which repository was being used. In this system, the standard Moodle file system would just be one of the available repositories. Then the API could support more robust access controls if available, or very few (as Moodle does now). This could allow for per-directory / per-file privilege granting, common file areas so that courses could access the same copy of a file (rather than copying it into the Moodle file area), etc.&lt;br /&gt;
&lt;br /&gt;
The API could also support multiple repositories and allow choosing a file as a link rather than copying it.&lt;br /&gt;
&lt;br /&gt;
Of course, this would also mean allowing write access to the repository area from Moodle, rather than leaving it as read-only. I know the plan was to do this through the [[Portfolio API]], but that really is limited to a user storage function and not a file management function. I think having an API defined to allow for full file management would be a better solution - even if not supported by all repositories.&lt;br /&gt;
[[User:Mike Churchward|Mike Churchward]] 12:54, 6 March 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
[[User:Martin Dougiamas|Martin Dougiamas]] 12:54, 15 March 2008 (CDT) :&lt;br /&gt;
Actually, Mike, the standard file system is NOT being retained at all.  I&#039;ve clarified this slightly in the docs.  The course-centered structure for files is gone.  All files ARE stored on disk but most of the info regarding their location and access is all governed by a table in the database (so the files could just as easily be in a remote database if you wished).  Files used in multiple areas within Moodle will never be stored more than once in Moodle.&lt;br /&gt;
&lt;br /&gt;
The idea of a read/write interface was how we started, but it&#039;s insanely complex once you try to handle backups (ie how do you make a complete backup suitable for giving to someone else?) and access control (how do you decide access depending on Moodle contexts), and we&#039;ll never do it as well as the original repository does it.  Why should we duplicate the Hive interface (to use an example) in Moodle when Hive has a perfectly good one already, one that handles all the extra stuff like Copyright controls, workflow and so on?   &lt;br /&gt;
&lt;br /&gt;
That said, the current Repository plugin idea is very simple, so that if anyone really wanted to embed management into the &amp;quot;file picker&amp;quot; interface they totally could do it in the plugin.&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
==Windows network drives==&lt;br /&gt;
I&#039;ve added this to the end of the list of repository types to be supported because its possibly the most useful one I can think of. Our school wants to make the transition to moodle, but getting the files on there is the biggest barrier and there is a lot of stuff sitting on our shared and personal folders which is time consuming to transfer. Integration is a big thing that management want to see, particularly the ability to bulk upload files. This may not be a repository as such because it may be that the best way is to copy the file from the shared folder into the repository rather than where it is so it can be moved/deleted accidentally, but easy access is vital in making the process of uploading a file possible. It would also make Moodle a killer app in that it could make our network drives available from home through a secure web interface. &lt;br /&gt;
&lt;br /&gt;
I&#039;ve linked to Guy Thomas&#039; [http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=991 Windows Share Web Client block] as it is a good start, but sadly only works on Linux. [[User:Matt Gibson|Matt Gibson]] 03:43, 29 April 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 Fantastic idea, let&#039;s call it the SMB plugin  - [[User:Martin Dougiamas|Martin Dougiamas]] 21:25, 8 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
==Bulk operations==&lt;br /&gt;
On a similar note, Don Hinkelman&#039;s new course format provides a great bulk-upload feature whereby a whole folder can be uploaded and added to the course as resources with the names of the files as titles, with just a couple of clicks. I know this is extending the repository idea a little, but to be honest, I think that one of the biggest weaknesses of Moodle&#039;s file handling right now is not being able to add an entire folder of files without manually going through each one and laboriously specifying location and title. To make any repository useful, I think three operations should be possible with one or two clicks:&lt;br /&gt;
* Add a whole folder/group of files to the repository at once&lt;br /&gt;
* The above operation, but additionally, have all of the folder/group added to a course and named automatically, all in one go.&lt;br /&gt;
* Find a group of files which are already in the repository and add them to a course all at once, with automatic naming as above.&lt;br /&gt;
Not sure if this is best put here or in the Developemt: File_API bit, but here seemed slightly better. [[User:Matt Gibson|Matt Gibson]] 03:43, 29 April 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
  This is probably not related to the file API at all.  I&#039;d see it as being a new item on the resource menu (Add multiple resources ...) with some sort of shift-click scenario.  nice idea though.  Can you file it as a tracker item?    [[User:Martin Dougiamas|Martin Dougiamas]] 21:26, 8 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
MDL-15408 [[User:Matt Gibson|Matt Gibson]] 03:09, 25 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
== Bulk and a new resource type from repository ==&lt;br /&gt;
&lt;br /&gt;
Our school has several campuses and a distance learning unit with well organized and big course resource trees. The repository module could be enormously useful for us.&lt;br /&gt;
&lt;br /&gt;
I have looked at Moodle&#039;s IMS repository a bit, and like the way it is possible to put multiple resources into one access point. If the new repository could have some of the same possibilities, it would be marvellous. The drawback with the IMS is that it opens a new window with all the multiple resources. Instead, it would be OK to be able to share a whole lot of resources, or a whole &amp;quot;resource tree&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
I also like the bulk function, to be able to parse a folder of say, html-files, and add it to the resource tree.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &amp;quot;local repository name&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
I think users will find the word local to be confusing.  For the developer or administrator, local seems to refer to the Moodle server.  But for the teacher or student, they will think that local refers to their own local files system.  I would suggest just using the domain name for that server (like myMoodleSite.org) and list it as the first entry to avoid this confusion.  [[User:Gary Anderson|Gary Anderson]] 02:40, 10 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
 I&#039;ll add a setting so the admin can override this as they like  [[User:Martin Dougiamas|Martin Dougiamas]] 01:07, 23  June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
== Credentials to third party systems ==&lt;br /&gt;
&lt;br /&gt;
You might want to consider something like oauth - http://oauth.net - to manage credentials of third party sites, rather than asking the user for them. I know I sure wouldn&#039;t want to input my credentials for one system into another! [[User:Nigel McNie|Nigel McNie]] 07:08, 17 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
 It&#039;s up to the plugin, but generally we won&#039;t be storing anything permanently.  Oauth could be useful though, thanks  [[User:Martin Dougiamas|Martin Dougiamas]] 01:09, 23  June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
== function is_logged() ==&lt;br /&gt;
&lt;br /&gt;
I created a prototype of file picker, the repository I tested is box.net, in this cast, we need a function to check if users are authenticated by box.net, if this function return false, print_login function will be called, it print a link to redirect to box.net login page, after the user logged in, box.net will redirect to file picker page, the authenticated user obtain a auth_token_key to access resource.&lt;br /&gt;
&lt;br /&gt;
The other web service like google docs and facebook have similar authentication process. &lt;br /&gt;
&lt;br /&gt;
See: http://enabled.box.net/docs/rest#authentication&lt;br /&gt;
&lt;br /&gt;
-- [[User:Dongsheng Cai|Dongsheng Cai]] 01:34, 22 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
== ws.php ==&lt;br /&gt;
Another problem is users have to wait for page loading (file picker page) until moodle have got the response from remote web service (limited by cURL&#039;s synchronous requests), this may take a long time or the remote web service won&#039;t reply at all, users may consider something goes wrong, then they may refresh the file picker. &lt;br /&gt;
&lt;br /&gt;
Maybe we should have another page: repository/ws.php, which in charge of communicating with web services, it can be embedded in file picker page as iframe, or we can use Ajax to invoke this page, the main page -- repository/picker.php will display a loading picture or a progress bar during communicating, this is more user friendly.&lt;br /&gt;
&lt;br /&gt;
For example, when users try to obtain a file list in box.net, a iframe of ws.php?action=get_list will be inserted in picker, $repository_box-&amp;gt;get_listing(&#039;/&#039;) will be invoked in ws.php, a loading picture will be displayed in picker page, when remote web service returned, the picker page remove the loading picture, and display the result. Does this sound reasonable?&lt;br /&gt;
&lt;br /&gt;
-- [[User:Dongsheng Cai|Dongsheng Cai]] 01:34, 22 June 2008 (CDT)&lt;/div&gt;</summary>
		<author><name>Mattgibson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Meta_course&amp;diff=37898</id>
		<title>Meta course</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Meta_course&amp;diff=37898"/>
		<updated>2008-06-19T14:16:17Z</updated>

		<summary type="html">&lt;p&gt;Mattgibson: clarified how inheritance and the child course definition&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A &#039;&#039;&#039;metacourse&#039;&#039;&#039; is just like any other course except that it automatically enrolls participants from other &amp;quot;child&amp;quot; courses.  Metacourses inherit their enrollments from these other course(s) instead of having students added manually. This feature can populate many metacourses from one course with normal enrollments or one metacourse from many courses with normal enrollments. &lt;br /&gt;
&lt;br /&gt;
For example, a course is used as the central enrolment point for a programme of study.  Each time a student enrols in (or unenrols from) this course, they are automatically enrolled/unenrolled from any metacourse(s) associated with it, which would contain the programme&#039;s sub-units.&lt;br /&gt;
&lt;br /&gt;
Please note that metacourse enrolments do not preserve groups and enrolment does not happen immediately, but occurs next time the [[Cron|cronjob]] runs.&lt;br /&gt;
&lt;br /&gt;
==Metacourse setup==&lt;br /&gt;
Teachers are able to choose whether a course is a metacourse via the &amp;quot;Is this a metacourse?&amp;quot; (yes/no) menu option in the [[Course settings|course settings]]. In Moodle 1.5 and 1.6, if a meta course is chosen, the [[Students|students]] page changes from listing/searching for students to listing/searching for courses.  In Moodle 1.7 &amp;quot;Child courses&amp;quot; appears in the teacher&#039;s administration block.&lt;br /&gt;
&lt;br /&gt;
If you choose &#039;metacourse&#039; when you set up a new course, then instead of seeing the assign roles page after saving the settings, you will see a list of courses to shoose from. The students from any that you choose will be added to the metacourse automatically.&lt;br /&gt;
&lt;br /&gt;
==Metacourse examples==&lt;br /&gt;
Metacourses may be used in a variety of ways:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Scenario 1:&#039;&#039;&#039; X is a metacourse with Course 1 through 4 as normal courses with standard student enrollments. Students enrolling on these courses are automatically enrolled onto Metacourse X. &lt;br /&gt;
&lt;br /&gt;
[[Image:Metacourses1_en.jpg|Standard Metacourse Usage|center]]&lt;br /&gt;
&lt;br /&gt;
For example, a math teacher or department has 2 algebra and 2 geometry courses. The teacher or department wants course for each of these subjects. But they also want a generic space where they can post things for all of the students in all of their courses, perhaps including compulsory work for all students.  By making algebra 1 &amp;amp; 2 and geometry 1 &amp;amp; 2 as each as part of a Math metacourse, they achieve this goal. &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Scenario 2:&#039;&#039;&#039; Metacourses 1-4 are linked to Y which is a normal course. Students enrolling on Course Y are automatically enrolled on Metacourses  1-4. This would be used, for example, when all five courses are intended to have exactly the same students. &lt;br /&gt;
&lt;br /&gt;
[[Image:Metacourses2_en.jpg|Upsidedown Metacourse Usage|center]]&lt;br /&gt;
&lt;br /&gt;
In both diagrams you can see students being enrolled normally into standard courses and then the entire student list of a course being added to the Metacourse.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Scenario 3:&#039;&#039;&#039; One or more meta courses are used as a library of resources and activities.  For example, the English department has collected material useful in writing papers. Teachers can direct or embed a link to a specific reference about citations, or how to select a topic for a paper or suggested reading compiled by students.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Scenario 4:&#039;&#039;&#039; The metacourse feature can also be used &amp;quot;in reverse.&amp;quot;  Say you have a Diploma program that involves courses D1, D2, D3, and D4.  In this case, you would create a &amp;quot;Diploma&amp;quot; course as a normal course (non-metacourse).  You would then designate programs D1 through D4 as metacourses (plus completing the student enrollment task under Course Administration).  When a student enrolls in &amp;quot;Diploma&amp;quot;, he or she will be automatically enrolled in courses D1 through D4.&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=48901 Metacourses?]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=54389 Metacourses and Roles in 1.7]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=39438 Best reference for describing a metacourse]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=89741 Assign student in course]&lt;br /&gt;
&lt;br /&gt;
[[Category:Teacher]]&lt;br /&gt;
[[Category:Enrolment]]&lt;br /&gt;
&lt;br /&gt;
[[es:Metacourses]]&lt;br /&gt;
[[fr:Méta-cours]]&lt;br /&gt;
[[ja:メタコース]]&lt;br /&gt;
[[ru:Метакурсы]]&lt;br /&gt;
[[de:Metakurse]]&lt;/div&gt;</summary>
		<author><name>Mattgibson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Grade_items&amp;diff=37741</id>
		<title>Grade items</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Grade_items&amp;diff=37741"/>
		<updated>2008-06-16T13:26:15Z</updated>

		<summary type="html">&lt;p&gt;Mattgibson: /* Activity-based grade items */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Grades}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
The three building blocks of the Gradebook in Moodle 1.9 are&lt;br /&gt;
&lt;br /&gt;
#The [[Grade_categories|grade category]]&lt;br /&gt;
#The grade item&lt;br /&gt;
#The [[Grades|grade]]&lt;br /&gt;
&lt;br /&gt;
A grade item is a unit of measurement by which participants in a course are graded (i.e. &#039;marked&#039;). As such, a grade item is a container for grades and a set of settings applied to these grades. The settings affect the calculation and display of the grades in the gradebook reports and [[Grade_export|exports]].&lt;br /&gt;
&lt;br /&gt;
Grade items are represented by columns in the [[Grader_report | grader report]].&lt;br /&gt;
&lt;br /&gt;
Grade items may refer to course activities (e.g. a quiz, an assignment etc.), [[Outcomes]] or even manual grades. Following is an overview of each type.&lt;br /&gt;
&lt;br /&gt;
== Activity-based grade items ==&lt;br /&gt;
[[Image:Edit grade item.png|right|thumb|Editing a grade item]]&lt;br /&gt;
Modules that include a form of grading use the [[Development:Grades#API_for_communication_with_modules.2Fblocks|Gradebook API]] to generate a matching grade item, and to communicate their grades to the gradebook. The generated grade item can later be edited from within the gradebook interface (Course -&amp;gt; Grades -&amp;gt; Edit Categories and items -&amp;gt; Edit (hand icon) grade item), as seen in the screenshot to the right, but several of its settings will be &#039;frozen&#039;, only changeable from the activity module&#039;s interface. These are listed and explained below in the manual grade items section.&lt;br /&gt;
&lt;br /&gt;
Here is a list of the settings that can be edited for an activity-based grade item:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Item info&#039;&#039;&#039;: General information about the grade item. Optional.&lt;br /&gt;
*&#039;&#039;&#039;Grade to pass&#039;&#039;&#039;: Specify the minimum grade a student must achieve to be considered to have passed this item. This must be in real grades, not a percentage. Once this is done, grades will be highlighted in red for fail and green for pass in the gradebook. It doesn&#039;t work for scales, as it is yet to be fully implemented in Moodle 1.9. It is planned for use in [[Development:Course completion|course completion]] in Moodle 2.0.&lt;br /&gt;
*&#039;&#039;&#039;Grade display type&#039;&#039;&#039;: See the [[Grade_item_settings#Grade_display_type | Grade display type doc]]&lt;br /&gt;
*&#039;&#039;&#039;Overall decimal points&#039;&#039;&#039;: This specifies the number of decimal points to display for each grade. It has no effect on grade calculations, which are made with an accuracy of 5 decimal places. &lt;br /&gt;
*&#039;&#039;&#039;Multiplicator&#039;&#039;&#039;: Factor by which all grades for this grade item will be multiplied.&lt;br /&gt;
*&#039;&#039;&#039;Offset&#039;&#039;&#039;: Number that will be added to every grade for this grade item, after the Multiplicator is applied. (can be a negative number)&lt;br /&gt;
*&#039;&#039;&#039;Hidden&#039;&#039;&#039;: Whether this grade item should be hidden from students&lt;br /&gt;
*&#039;&#039;&#039;Hidden until&#039;&#039;&#039;: An optional date after which the grade item will no longer be hidden (i.e. a grades release date)&lt;br /&gt;
*&#039;&#039;&#039;Locked&#039;&#039;&#039;: Whether or not to lock this grade item. A locked grade item doesn&#039;t accept changes to its settings or grades from its related module.&lt;br /&gt;
*&#039;&#039;&#039;Locked after&#039;&#039;&#039;: A date after which the locking will be effective, usually after the grades release date.&lt;br /&gt;
&lt;br /&gt;
== Grade outcome items ==&lt;br /&gt;
[[Image:grade_outcome_item.png|right|thumb|Editing a grade outcome item]]&lt;br /&gt;
These can either be generated by the creation of a new activity module (by selecting [[Outcomes]] in the module creation form), or manually created like manual grade items. A grade outcome item uses a course outcome as its grading type, so such an outcome must be made available at the course level before a grade outcome item can be manually created.&lt;br /&gt;
&lt;br /&gt;
Grade outcome items can optionally be linked with an activity module. This is done automatically when a grade outcome item is generated by the creation of an activity module in which outcomes were selected. In this scenario, a grade category is also created and named after the activity module, and the grade item and grade outcome items are created as children of that category.&lt;br /&gt;
&lt;br /&gt;
The settings of the grade outcome item edit form are identical to those of manual grade items, with the addition of two settings:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Outcome&#039;&#039;&#039;: The course outcome represented by this item&lt;br /&gt;
*&#039;&#039;&#039;Linked activity&#039;&#039;&#039;: The optional activity module to which this item will be linked&lt;br /&gt;
&lt;br /&gt;
== Manual grade items ==&lt;br /&gt;
[[Image:manual_item.png|right|thumb|Editing a manual grade item]]&lt;br /&gt;
These grade items are created manually through the &amp;quot;Edit Categories and Items&amp;quot; page. The &amp;quot;Add grade item&amp;quot; button is clicked, and the form appears. Several options are available here which are normally automatically filled out by the activity module creating an activity-based grade item:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Item name&#039;&#039;&#039;: The display name of your grade item&lt;br /&gt;
*&#039;&#039;&#039;ID Number&#039;&#039;&#039;: An arbitrary string of characters used to refer to this grade item in Formulas. If set, it must be unique.&lt;br /&gt;
*&#039;&#039;&#039;Grade type&#039;&#039;&#039;: The type of grade: None (no grading possible), Value (a numerical value), Scale (an item in a list) or Text (arbitrary text). &lt;br /&gt;
*&#039;&#039;&#039;Scale&#039;&#039;&#039;: Which scale to use for grading: available only when the Scale grade type is selected. &lt;br /&gt;
*&#039;&#039;&#039;Maximum grade&#039;&#039;&#039;: The maximum grade that can be given (for scales: the number of items in the scale - 1)&lt;br /&gt;
*&#039;&#039;&#039;Minimum grade&#039;&#039;&#039;: The minimum grade that can be given (for scales: 0)&lt;br /&gt;
&lt;br /&gt;
Conversely, two of the settings found in the form for activity-based grade items are absent from this form:&lt;br /&gt;
*Multiplicator&lt;br /&gt;
*Offset&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[Grade item settings]] - for administrators&lt;br /&gt;
&lt;br /&gt;
[[fr:Eléments d&#039;évaluation]]&lt;/div&gt;</summary>
		<author><name>Mattgibson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Talk:Roadmap&amp;diff=36427</id>
		<title>Talk:Roadmap</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Talk:Roadmap&amp;diff=36427"/>
		<updated>2008-05-19T15:47:28Z</updated>

		<summary type="html">&lt;p&gt;Mattgibson: /* Minted course profile plugin */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Student Information API for version 2.0==&lt;br /&gt;
&lt;br /&gt;
Also on a related point the student API which is down for version 2.0. Is there any more detail to here on this yet? Will this be part of the IMS Enterprise data model and therefore enrolments plug in or will someone be working on a Moodle SIF agent? In the UK SIF is likely to take off as the DfES via Becta are currently consulting on a UK SIF model and piloting SIF in Birmingham and Northern Ireland. I believe that SIF is used quite widely in the US?&lt;br /&gt;
&lt;br /&gt;
== Wiki engine ==&lt;br /&gt;
&lt;br /&gt;
I noticed there was some talk about making new wiki module for 1.9... what do &amp;quot;nWiki&amp;quot; and &amp;quot;DF wiki&amp;quot; refer to?  I&#039;ve searched online and haven&#039;t found a clear description of what these mean.  I am curious if they are still based on MediaWiki.  I would hate to see some of the great features of MediaWiki (mainly the scalability) be lost.  When MediaWiki is configured with Memcached and Squid caching servers, they can serve thousands of requests per second: hard to beat!&amp;lt;br/&amp;gt;&lt;br /&gt;
Thanks,&amp;lt;br/&amp;gt;&lt;br /&gt;
-[[User:Sean Colombo|Sean Colombo]] 00:12, 13 January 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
None of the wikis are based on Mediawiki.  Mediawiki is very difficult to use as a basis for a Moodle wiki, because of all the special features we need.   [[User:Martin Dougiamas|Martin Dougiamas]] 22:10, 22 April 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
== about nwiki ==&lt;br /&gt;
&lt;br /&gt;
Seems that nwiki will be inside for 2.0. &lt;br /&gt;
Nwiki IMPLEMENTS the mediawiki markup, and the old features of the current wiki for backwards compatibility... and that is what makes it so difficult. Is really hard. &lt;br /&gt;
&lt;br /&gt;
You migth get by the Using moodle wiki forum and we can discuss about it.&lt;br /&gt;
Cheers. &lt;br /&gt;
--[[User:Ludo (Marc Alier)|Ludo (Marc Alier)]] 11:14, 13 January 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== About WS ?  ==&lt;br /&gt;
&lt;br /&gt;
Where fit the WS layer in the roadmap?&lt;br /&gt;
&lt;br /&gt;
== IMS LIT 2.0 compliance ? ==&lt;br /&gt;
&lt;br /&gt;
*Wimba is working with IMS to develop an activity module that acts as a consumer of the IMS LTI 2.0 standard...&lt;br /&gt;
*We in UPC (dfwikiteam) are working in a way to make the moodle course a IMS LTI 2.0 producer ... &lt;br /&gt;
shall this be included somewhere in the roadmap?--[[User:Ludo (Marc Alier)|Ludo (Marc Alier)]] 01:05, 9 April 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
== Site-wide groups ==&lt;br /&gt;
Site-wide (or, preferrable, context-wide) groups is much needed improvement (see votes for MDL-11826), especially in large institutions. Can it be targeted to 2.0?&lt;br /&gt;
&lt;br /&gt;
Yes, it would really help lot of people...&lt;br /&gt;
--[[User:Séverin Terrier|Séverin Terrier]] 16:57, 13 May 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
Seems to have been tagged for 2.0 by Petr :) [[User:Matt Gibson|Matt Gibson]] 10:46, 19 May 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
==Minted course profile plugin==&lt;br /&gt;
This was scheduled for 1.9, but didn&#039;t make it. Any plans to include it in 2.0? It seems to have vanished. [[User:Matt Gibson|Matt Gibson]] 10:47, 19 May 2008 (CDT)&lt;/div&gt;</summary>
		<author><name>Mattgibson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Talk:Roadmap&amp;diff=36426</id>
		<title>Talk:Roadmap</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Talk:Roadmap&amp;diff=36426"/>
		<updated>2008-05-19T15:47:15Z</updated>

		<summary type="html">&lt;p&gt;Mattgibson: /* Site-wide groups */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Student Information API for version 2.0==&lt;br /&gt;
&lt;br /&gt;
Also on a related point the student API which is down for version 2.0. Is there any more detail to here on this yet? Will this be part of the IMS Enterprise data model and therefore enrolments plug in or will someone be working on a Moodle SIF agent? In the UK SIF is likely to take off as the DfES via Becta are currently consulting on a UK SIF model and piloting SIF in Birmingham and Northern Ireland. I believe that SIF is used quite widely in the US?&lt;br /&gt;
&lt;br /&gt;
== Wiki engine ==&lt;br /&gt;
&lt;br /&gt;
I noticed there was some talk about making new wiki module for 1.9... what do &amp;quot;nWiki&amp;quot; and &amp;quot;DF wiki&amp;quot; refer to?  I&#039;ve searched online and haven&#039;t found a clear description of what these mean.  I am curious if they are still based on MediaWiki.  I would hate to see some of the great features of MediaWiki (mainly the scalability) be lost.  When MediaWiki is configured with Memcached and Squid caching servers, they can serve thousands of requests per second: hard to beat!&amp;lt;br/&amp;gt;&lt;br /&gt;
Thanks,&amp;lt;br/&amp;gt;&lt;br /&gt;
-[[User:Sean Colombo|Sean Colombo]] 00:12, 13 January 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
None of the wikis are based on Mediawiki.  Mediawiki is very difficult to use as a basis for a Moodle wiki, because of all the special features we need.   [[User:Martin Dougiamas|Martin Dougiamas]] 22:10, 22 April 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
== about nwiki ==&lt;br /&gt;
&lt;br /&gt;
Seems that nwiki will be inside for 2.0. &lt;br /&gt;
Nwiki IMPLEMENTS the mediawiki markup, and the old features of the current wiki for backwards compatibility... and that is what makes it so difficult. Is really hard. &lt;br /&gt;
&lt;br /&gt;
You migth get by the Using moodle wiki forum and we can discuss about it.&lt;br /&gt;
Cheers. &lt;br /&gt;
--[[User:Ludo (Marc Alier)|Ludo (Marc Alier)]] 11:14, 13 January 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== About WS ?  ==&lt;br /&gt;
&lt;br /&gt;
Where fit the WS layer in the roadmap?&lt;br /&gt;
&lt;br /&gt;
== IMS LIT 2.0 compliance ? ==&lt;br /&gt;
&lt;br /&gt;
*Wimba is working with IMS to develop an activity module that acts as a consumer of the IMS LTI 2.0 standard...&lt;br /&gt;
*We in UPC (dfwikiteam) are working in a way to make the moodle course a IMS LTI 2.0 producer ... &lt;br /&gt;
shall this be included somewhere in the roadmap?--[[User:Ludo (Marc Alier)|Ludo (Marc Alier)]] 01:05, 9 April 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
== Site-wide groups ==&lt;br /&gt;
Site-wide (or, preferrable, context-wide) groups is much needed improvement (see votes for MDL-11826), especially in large institutions. Can it be targeted to 2.0?&lt;br /&gt;
&lt;br /&gt;
Yes, it would really help lot of people...&lt;br /&gt;
--[[User:Séverin Terrier|Séverin Terrier]] 16:57, 13 May 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
Seems to have been tagged for 2.0 by Petr :) [[User:Matt Gibson|Matt Gibson]] 10:46, 19 May 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
==Minted course profile plugin==&lt;br /&gt;
This was scheduled for 1.9, but didn&#039;t make it. Any plans to include it in 2.0? It seems to have vanished.&lt;/div&gt;</summary>
		<author><name>Mattgibson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Talk:Roadmap&amp;diff=36425</id>
		<title>Talk:Roadmap</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Talk:Roadmap&amp;diff=36425"/>
		<updated>2008-05-19T15:46:05Z</updated>

		<summary type="html">&lt;p&gt;Mattgibson: /* Site-wide groups */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Student Information API for version 2.0==&lt;br /&gt;
&lt;br /&gt;
Also on a related point the student API which is down for version 2.0. Is there any more detail to here on this yet? Will this be part of the IMS Enterprise data model and therefore enrolments plug in or will someone be working on a Moodle SIF agent? In the UK SIF is likely to take off as the DfES via Becta are currently consulting on a UK SIF model and piloting SIF in Birmingham and Northern Ireland. I believe that SIF is used quite widely in the US?&lt;br /&gt;
&lt;br /&gt;
== Wiki engine ==&lt;br /&gt;
&lt;br /&gt;
I noticed there was some talk about making new wiki module for 1.9... what do &amp;quot;nWiki&amp;quot; and &amp;quot;DF wiki&amp;quot; refer to?  I&#039;ve searched online and haven&#039;t found a clear description of what these mean.  I am curious if they are still based on MediaWiki.  I would hate to see some of the great features of MediaWiki (mainly the scalability) be lost.  When MediaWiki is configured with Memcached and Squid caching servers, they can serve thousands of requests per second: hard to beat!&amp;lt;br/&amp;gt;&lt;br /&gt;
Thanks,&amp;lt;br/&amp;gt;&lt;br /&gt;
-[[User:Sean Colombo|Sean Colombo]] 00:12, 13 January 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
None of the wikis are based on Mediawiki.  Mediawiki is very difficult to use as a basis for a Moodle wiki, because of all the special features we need.   [[User:Martin Dougiamas|Martin Dougiamas]] 22:10, 22 April 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
== about nwiki ==&lt;br /&gt;
&lt;br /&gt;
Seems that nwiki will be inside for 2.0. &lt;br /&gt;
Nwiki IMPLEMENTS the mediawiki markup, and the old features of the current wiki for backwards compatibility... and that is what makes it so difficult. Is really hard. &lt;br /&gt;
&lt;br /&gt;
You migth get by the Using moodle wiki forum and we can discuss about it.&lt;br /&gt;
Cheers. &lt;br /&gt;
--[[User:Ludo (Marc Alier)|Ludo (Marc Alier)]] 11:14, 13 January 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== About WS ?  ==&lt;br /&gt;
&lt;br /&gt;
Where fit the WS layer in the roadmap?&lt;br /&gt;
&lt;br /&gt;
== IMS LIT 2.0 compliance ? ==&lt;br /&gt;
&lt;br /&gt;
*Wimba is working with IMS to develop an activity module that acts as a consumer of the IMS LTI 2.0 standard...&lt;br /&gt;
*We in UPC (dfwikiteam) are working in a way to make the moodle course a IMS LTI 2.0 producer ... &lt;br /&gt;
shall this be included somewhere in the roadmap?--[[User:Ludo (Marc Alier)|Ludo (Marc Alier)]] 01:05, 9 April 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
== Site-wide groups ==&lt;br /&gt;
Site-wide (or, preferrable, context-wide) groups is much needed improvement (see votes for MDL-11826), especially in large institutions. Can it be targeted to 2.0?&lt;br /&gt;
&lt;br /&gt;
Yes, it would really help lot of people...&lt;br /&gt;
--[[User:Séverin Terrier|Séverin Terrier]] 16:57, 13 May 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
Seems to have been tagged for 2.0 by Petr :) [[User:Matt Gibson|Matt Gibson]] 10:46, 19 May 2008 (CDT)&lt;/div&gt;</summary>
		<author><name>Mattgibson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Grader_report&amp;diff=35722</id>
		<title>Grader report</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Grader_report&amp;diff=35722"/>
		<updated>2008-05-07T08:50:08Z</updated>

		<summary type="html">&lt;p&gt;Mattgibson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Grades}}The grader report page is the main teacher view of the new gradebook in Moodle 1.9. For versions prior to 1.9, look [[Grades_pre-1.9 | here]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Basics=&lt;br /&gt;
The gradebook collects [[Grade_items|items]] that have been graded from the various parts of Moodle that are assessed, and allows you to view and change them as well as sort them out into [[Grade_categories|categories]] and calculate totals in various ways. When you add an assessed item in a Moodle course, the gradebook automatically creates space for the grades it will produce and also adds the grades themselves as they are generated, either by the system or by you.&lt;br /&gt;
&lt;br /&gt;
The [[Grades|grades]] displayed are initially displayed as the raw marks from the assessments themselves, so will depend on how you set those up e.g. an essay out of 36 will appear as how ever many raw marks that student got, not a percentage (although this can be changed later, see below).&lt;br /&gt;
&lt;br /&gt;
Not that various default options for the gradebook are set at system level by the administrator and can be marked as being overridable by you, or fixed. This means that the options will not always be set up the same way for every user when they see the grader report for the first time.&lt;br /&gt;
&lt;br /&gt;
=Display=&lt;br /&gt;
==Layout==&lt;br /&gt;
[[Image:gradebook_normal_mode.png|right|thumb|Grader report in non-editing mode]]&lt;br /&gt;
Along the top are several rows: first the course, then the category, then the actual column (e.g. an essay or a category total). When you start off, every essay, quiz etc is in the &#039;&#039;&#039;uncategorised&#039;&#039;&#039; category, which is named after the course by default, but can be changed if needed.&lt;br /&gt;
&lt;br /&gt;
You can add a row showing the range of possible scores by going to [[Grade_preferences|My report preferences]] and selecting &#039;&#039;&#039;Show ranges&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
There are three ways that the categories can be displayed&lt;br /&gt;
&lt;br /&gt;
* Grades only - without the category totals column&lt;br /&gt;
* Collapsed - Category total column only&lt;br /&gt;
* Full view - grades and the aggregates (the totals column for the category) &lt;br /&gt;
&lt;br /&gt;
Each section has a small icon immediately to the right of its name. Clicking this will cycle through these display modes for that category. + goes to grades only view, o goes to full view and - goes to collapsed view.&lt;br /&gt;
&lt;br /&gt;
===Other layout options===&lt;br /&gt;
The defaults for these options can be set at site level by going to Administration-&amp;gt;Grades-&amp;gt;[[Gradebook_report_settings|Report settings]]-&amp;gt;Grader report.&lt;br /&gt;
&lt;br /&gt;
*You can add a row showing the range of possible scores by going to [[Grade_preferences|My report preferences]] and selecting &#039;&#039;&#039;Show ranges&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==Highlighting rows and columns==&lt;br /&gt;
When your gradebook starts to grow, it can be hard to keep track of which student and which assignment a cell refers to. Highlighting solves that.&lt;br /&gt;
* Clicking on empty space in the cell that contains the students name will toggle the highlighting of that entire row&lt;br /&gt;
* Clicking on empty space in the cell at the top of each column will toggle highlighting of the entire column&lt;br /&gt;
(Note: this requires Javascript to be enabled in your browser.)&lt;br /&gt;
&lt;br /&gt;
==Highlighting scores that are either adequate or unacceptable in red and green==&lt;br /&gt;
Turn editing on and click on the edit icon in the controls cell at the top of the column. You can then (maybe need to click &#039;show advanced&#039;) see the option to enter a &#039;grade to pass&#039;. Once set, any grades falling above this will be highlighted in green and any below will be highlighted in red.&lt;br /&gt;
&lt;br /&gt;
==Categorising the grades==&lt;br /&gt;
The &#039;Choose an action...&#039; drop down on the upper left will let you switch to other views&lt;br /&gt;
* &#039;&#039;&#039;Edit categories and items&#039;&#039;&#039; will allow you to set up your assessments in different categories e.g. &#039;classwork&#039;, &#039;homework&#039; etc. &lt;br /&gt;
&lt;br /&gt;
Each category will then have its own &#039;&#039;&#039;Category total&#039;&#039;&#039; column.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Editing=&lt;br /&gt;
[[Image:gradebook_edit_mode.png|right|thumb|Grader report in editing mode]]&lt;br /&gt;
Note: Editing anything in the gradebook refers to editing the grades &#039;&#039;&#039;only&#039;&#039;&#039; and none of the available operations bear any relationship to editing the main course page i.e. the appearance of your course page cannot be influenced by anything you do in the gradebook. The &amp;quot;Turn editing on&amp;quot; button functions separately to the main course one, so editing can be on in the gradebook, but simultaneously off when you switch back to course view. This is because editing grades and editing the course page are separate capabilities and a role e.g. &#039;non-editing teacher&#039; may only have one or the other.&lt;br /&gt;
&lt;br /&gt;
==Altering the grades==&lt;br /&gt;
You can click &amp;quot;Turn editing on&amp;quot;  at the top right to show an edit icon next to each grade. Clicking on the icon will bring up the editing screen for that grade which will allow you to set the grade, its written feedback and a number of other attributes.&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can click on &amp;quot;[[Grade_preferences|My report preferences]]&amp;quot;&#039; and choose &amp;quot;Quick grading&amp;quot; and &amp;quot;Quick feedback&amp;quot; to make the report appear with editable boxes containing each grade, so you can change many at once.&lt;br /&gt;
&lt;br /&gt;
Quick feedback is switched off by default, but you can easily switch it on or off using the &amp;quot;Show Quick Feedback&amp;quot; link above the grader report, when editing is on. Alternatively you can switch it on and off in the page &amp;quot;[[Grade_preferences|My report preferences]]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Calculating totals==&lt;br /&gt;
Rather than a simple average or sum, Moodle can perform very complex calculations to produce the totals for each category and for the whole course. e.g. you want to take an average of 3 items from one category, double it, then add it to the average of another category.&lt;br /&gt;
&lt;br /&gt;
You can do this using calculations. Either turn on editing, then click &#039;&#039;&#039;Show calculations&#039;&#039;&#039;, or go to &#039;&#039;&#039;[[Grade_preferences|My report preferences]]&#039;&#039;&#039;, choose &#039;&#039;&#039;show calculations&#039;&#039;&#039;, then save and turn editing on. You will then see a small calculator icon next to each total column which, when you click on it, will take you to the page [[Edit grade calculation]] where there are instructions.&lt;br /&gt;
&lt;br /&gt;
To choose how the grades are aggregated for the totals within categories, you can turn editing on and click on the little editing icon for the category. You can then choose to have means, medians, modes etc. leave out empty grades and other settings.&lt;br /&gt;
&lt;br /&gt;
==Hiding columns or individual grades==&lt;br /&gt;
Turning on editing then clicking the &amp;quot;Show show/hide icons&amp;quot; link will give you the familiar show/hide eye icon next to each grade and at the top of each column. For more information, read about [[Grade_hiding|grade hiding]].&lt;br /&gt;
&lt;br /&gt;
==Recalculating==&lt;br /&gt;
If you change any part of an assesment e.g. alter the maximum grade for one of the questions in a quiz, you may find that the columns do not yet reflect the change you have made. Click &#039;Turn editing on&#039; twice to force the gradebook to re-check.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[Edit grade calculation]]&lt;br /&gt;
*[[Grade preferences]]&lt;br /&gt;
*[http://www.youtube.com/watch?v=EB58W3KePBc Video showing the basic gradebook setup and use]&lt;br /&gt;
*[http://www.youtube.com/watch?v=jWPUEqdhI4A Video showing how to change the display of grades in the gradebook]&lt;br /&gt;
*[http://www.youtube.com/watch?v=5hrLNbifiGQ Video explaining the different gradebook reports]&lt;br /&gt;
*Using Moodle [http://moodle.org/mod/forum/discuss.php?d=87844 What happens in the 1.9 gradebook when students are unenrolled from a course] forum discussion&lt;br /&gt;
&lt;br /&gt;
[[fr:Rapport de l&#039;évaluateur]]&lt;/div&gt;</summary>
		<author><name>Mattgibson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Grader_report&amp;diff=35721</id>
		<title>Grader report</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Grader_report&amp;diff=35721"/>
		<updated>2008-05-07T08:41:31Z</updated>

		<summary type="html">&lt;p&gt;Mattgibson: /* Highlighting scores that are either adequate or unacceptable in red or green */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Grades}}The grader report page is the main teacher view of the new gradebook in Moodle 1.9. For versions prior to 1.9, look [[Grades_pre-1.9 | here]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Basics=&lt;br /&gt;
The gradebook collects [[Grade_items|items]] that have been graded from the various parts of Moodle that are assessed, and allows you to view and change them as well as sort them out into [[Grade_categories|categories]] and calculate totals in various ways. When you add an assessed item in a Moodle course, the gradebook automatically creates space for the grades it will produce and also adds the grades themselves as they are generated, either by the system or by you.&lt;br /&gt;
&lt;br /&gt;
The [[Grades|grades]] displayed are the raw marks from the assessments themselves, so will depend on how you set those up e.g. an essay out of 36 will appear as how ever many raw marks that student got, not a percentage.&lt;br /&gt;
&lt;br /&gt;
==Layout==&lt;br /&gt;
[[Image:gradebook_normal_mode.png|right|thumb|Grader report in non-editing mode]]&lt;br /&gt;
Along the top are several rows: first the course, then the category, then the actual column (e.g. an essay or a category total). When you start off, every essay, quiz etc is in the &#039;&#039;&#039;uncategorised&#039;&#039;&#039; category, which is named after the course by default, but can be changed if needed.&lt;br /&gt;
&lt;br /&gt;
You can add a row showing the range of possible scores by going to [[Grade_preferences|My report preferences]] and selecting &#039;&#039;&#039;Show ranges&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
There are three ways that the categories can be displayed&lt;br /&gt;
&lt;br /&gt;
* Grades only - without the category totals column&lt;br /&gt;
* Collapsed - Category total column only&lt;br /&gt;
* Full view - grades and the aggregates (the totals column for the category) &lt;br /&gt;
&lt;br /&gt;
Each section has a small icon immediately to the right of its name. Clicking this will cycle through these display modes for that category. + goes to grades only view, o goes to full view and - goes to collapsed view.&lt;br /&gt;
&lt;br /&gt;
===Other layout options===&lt;br /&gt;
The defaults for these options can be set at site level by going to Administration-&amp;gt;Grades-&amp;gt;[[Gradebook_report_settings|Report settings]]-&amp;gt;Grader report.&lt;br /&gt;
&lt;br /&gt;
*You can add a row showing the range of possible scores by going to [[Grade_preferences|My report preferences]] and selecting &#039;&#039;&#039;Show ranges&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==Highlighting rows and columns==&lt;br /&gt;
When your gradebook starts to grow, it can be hard to keep track of which student and which assignment a cell refers to. Highlighting solves that.&lt;br /&gt;
* Clicking on empty space in the cell that contains the students name will toggle the highlighting of that entire row&lt;br /&gt;
* Clicking on empty space in the cell at the top of each column will toggle highlighting of the entire column&lt;br /&gt;
(Note: this requires Javascript to be enabled in your browser.)&lt;br /&gt;
&lt;br /&gt;
==Highlighting scores that are either adequate or unacceptable in red and green==&lt;br /&gt;
Turn editing on and click on the edit icon in the controls cell at the top of the column. You can then (maybe need to click &#039;show advanced&#039;) see the option to enter a &#039;grade to pass&#039;. Once set, any grades falling above this will be highlighted in green and any below will be highlighted in red.&lt;br /&gt;
&lt;br /&gt;
==Categorising the grades==&lt;br /&gt;
The &#039;Choose an action...&#039; drop down on the upper left will let you switch to other views&lt;br /&gt;
* &#039;&#039;&#039;Edit categories and items&#039;&#039;&#039; will allow you to set up your assessments in different categories e.g. &#039;classwork&#039;, &#039;homework&#039; etc. &lt;br /&gt;
&lt;br /&gt;
Each category will then have its own &#039;&#039;&#039;Category total&#039;&#039;&#039; column.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Editing=&lt;br /&gt;
[[Image:gradebook_edit_mode.png|right|thumb|Grader report in editing mode]]&lt;br /&gt;
Note: Editing anything in the gradebook refers to editing the grades &#039;&#039;&#039;only&#039;&#039;&#039; and none of the available operations bear any relationship to editing the main course page i.e. the appearance of your course page cannot be influenced by anything you do in the gradebook. The &amp;quot;Turn editing on&amp;quot; button functions separately to the main course one, so editing can be on in the gradebook, but simultaneously off when you switch back to course view. This is because editing grades and editing the course page are separate capabilities and a role e.g. &#039;non-editing teacher&#039; may only have one or the other.&lt;br /&gt;
&lt;br /&gt;
==Altering the grades==&lt;br /&gt;
You can click &amp;quot;Turn editing on&amp;quot;  at the top right to show an edit icon next to each grade. Clicking on the icon will bring up the editing screen for that grade which will allow you to set the grade, its written feedback and a number of other attributes.&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can click on &amp;quot;[[Grade_preferences|My report preferences]]&amp;quot;&#039; and choose &amp;quot;Quick grading&amp;quot; and &amp;quot;Quick feedback&amp;quot; to make the report appear with editable boxes containing each grade, so you can change many at once.&lt;br /&gt;
&lt;br /&gt;
Quick feedback is switched off by default, but you can easily switch it on or off using the &amp;quot;Show Quick Feedback&amp;quot; link above the grader report, when editing is on. Alternatively you can switch it on and off in the page &amp;quot;[[Grade_preferences|My report preferences]]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Calculating totals==&lt;br /&gt;
Rather than a simple average or sum, Moodle can perform very complex calculations to produce the totals for each category and for the whole course. e.g. you want to take an average of 3 items from one category, double it, then add it to the average of another category.&lt;br /&gt;
&lt;br /&gt;
You can do this using calculations. Either turn on editing, then click &#039;&#039;&#039;Show calculations&#039;&#039;&#039;, or go to &#039;&#039;&#039;[[Grade_preferences|My report preferences]]&#039;&#039;&#039;, choose &#039;&#039;&#039;show calculations&#039;&#039;&#039;, then save and turn editing on. You will then see a small calculator icon next to each total column which, when you click on it, will take you to the page [[Edit grade calculation]] where there are instructions.&lt;br /&gt;
&lt;br /&gt;
To choose how the grades are aggregated for the totals within categories, you can turn editing on and click on the little editing icon for the category. You can then choose to have means, medians, modes etc. leave out empty grades and other settings.&lt;br /&gt;
&lt;br /&gt;
==Hiding columns or individual grades==&lt;br /&gt;
Turning on editing then clicking the &amp;quot;Show show/hide icons&amp;quot; link will give you the familiar show/hide eye icon next to each grade and at the top of each column. For more information, read about [[Grade_hiding|grade hiding]].&lt;br /&gt;
&lt;br /&gt;
==Recalculating==&lt;br /&gt;
If you change any part of an assesment e.g. alter the maximum grade for one of the questions in a quiz, you may find that the columns do not yet reflect the change you have made. Click &#039;Turn editing on&#039; twice to force the gradebook to re-check.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[Edit grade calculation]]&lt;br /&gt;
*[[Grade preferences]]&lt;br /&gt;
*[http://www.youtube.com/watch?v=EB58W3KePBc Video showing the basic gradebook setup and use]&lt;br /&gt;
*[http://www.youtube.com/watch?v=jWPUEqdhI4A Video showing how to change the display of grades in the gradebook]&lt;br /&gt;
*[http://www.youtube.com/watch?v=5hrLNbifiGQ Video explaining the different gradebook reports]&lt;br /&gt;
*Using Moodle [http://moodle.org/mod/forum/discuss.php?d=87844 What happens in the 1.9 gradebook when students are unenrolled from a course] forum discussion&lt;br /&gt;
&lt;br /&gt;
[[fr:Rapport de l&#039;évaluateur]]&lt;/div&gt;</summary>
		<author><name>Mattgibson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Development_talk:Repository_API&amp;diff=35382</id>
		<title>Development talk:Repository API</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Development_talk:Repository_API&amp;diff=35382"/>
		<updated>2008-04-29T08:43:22Z</updated>

		<summary type="html">&lt;p&gt;Mattgibson: /* Replacing Moodle&amp;#039;s File System */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(Ideas will be deleted from the comments section as they are resolved or merged into the main spec)&lt;br /&gt;
&lt;br /&gt;
===Missing concept of trusted files===&lt;br /&gt;
Files are not created equal, some of them are to be trusted, some can not be trusted at all. Web browsers trust everything received from the server, files from server may access cookie information and thus scripting technologies may allow them to do anything user can do. We do have to trust our teachers because they are supposed to create the learning content, but we definitely can not trust all students.&lt;br /&gt;
&lt;br /&gt;
Imagine if students were allowed to upload arbitrary files to server, like html file loaded with javascript and the server would happily serve them to all Moodle users. Our solution is to use html cleaning filters for submitted texts and force downloads of student uploaded files. To do this we must know if we trust the files or not. Unfortunately the forced downloads of student uploaded files and cleaning of html texts does not solve all problems, because bugs in browsers and especially browser plug-ins may sometimes be used to work around our protections.&lt;br /&gt;
&lt;br /&gt;
The best solution would be to use separate web addresses for trusted and not trusted files (two wwwroots in config.php), not all sites may afford two different addresses but we should be imo prepared for this.  [[User:Skodak|Skodak]] 16:42, 28 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
 Great idea, yes.  In fact couldn&#039;t all the files be served via $CFG-&amp;gt;fileroot all the time?  &lt;br /&gt;
 [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
userid field could be used for this, but separate flag might be better in order to allow teachers to upload untrusted files (teacher uploads assignment submission for the student).&lt;br /&gt;
&lt;br /&gt;
===Relative file links===&lt;br /&gt;
Flash, Java and SCORM require relative links and directory hierarchy in general - we must support it. Some SCORM packages load hundreds of files per page which means the file serving must be very fast with minimum of db access.&lt;br /&gt;
&lt;br /&gt;
Reading the proposal above it seems the API is about serving of isolated files referenced by repository ids. HTML requires to use relative or absolute locators with file names, we can not use repository ids directly in relative links. In case of scorm we have absolute path to base of SCORM package of given activity and SCORM files use relative links inside the package.&lt;br /&gt;
Solution could be to store relative paths directly in filename field ex:directory1/directory2/filename.ext.&lt;br /&gt;
&lt;br /&gt;
 Yes I agree, we definitely need to support (virtual) directories and slasharguments.&lt;br /&gt;
 We could just match the file argument to a path in the db.  Perhaps add the fileid &lt;br /&gt;
 to the argument path as a primary key: fileid/directory1/directory2/filename.ext&lt;br /&gt;
 [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
===Virtual directories and files===&lt;br /&gt;
Sometimes the content of files is generated on the fly (csv exports, etc.), there are many special files spread through codebase doing nearly the same, it should be imho possible to use the same file API for these.&lt;br /&gt;
&lt;br /&gt;
Another virtual example is assignment submissions and webdav. I would like to see an option to browse the assignment submissions as directory structure, the top directory would be a list of names of users, inside html files with online assignment and uploaded files. This would allow us to implement simple zip&amp;amp;go or webdav based offline grading solutions. The problem here is that the content of this virtual submissions directly needs to be created on the fly based on user references, the proposed repository structure can not be used for this.&lt;br /&gt;
&lt;br /&gt;
 Very interesting idea! [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
===Backup/restore relinking===&lt;br /&gt;
We are supporting relinking inside courses only. Till now it was easy to guess if absolute link will work after restore on another server.&lt;br /&gt;
There are several types of files:&lt;br /&gt;
*course files - relinked during restore, works on any server if from the same course&lt;br /&gt;
*module files - not relinked, urls are not permanent, link can not be copypasted (assignments, forum attachments, rss files, etc.)&lt;br /&gt;
*user files - not relinked, links work only on original server (blog attachments, personal files, etc.)&lt;br /&gt;
&lt;br /&gt;
 I think all this will be simplified in the proposed system because everything is &lt;br /&gt;
 represented using the same system: a file with an ACL (backup can quickly &lt;br /&gt;
 determine all the files in one course, probably using one SQL query). &lt;br /&gt;
 [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
If we are backing up/restoring on the same server, will copies of a course restore without file duplication? I use this a lot so that I can archive one year&#039;s course whilst modifying it for next year. [[User:Matt Gibson|Matt Gibson]] 03:12, 29 April 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
===Access needed for both file and its instances===&lt;br /&gt;
We need two types of access control - first who can create instances (link files), second who can access the instance (download the file).&lt;br /&gt;
&lt;br /&gt;
 For the first don&#039;t we already have those capabilities? (like mod/forum:createattachment,&lt;br /&gt;
 moodle/course:managefiles) but they probably could use rationalising.   We&#039;ll need new &lt;br /&gt;
 ones per repository, too, of course.  &lt;br /&gt;
 [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
===Cache lifetime===&lt;br /&gt;
There should be a way to specify cache filetime for each instance of file. For example 0 for uploaded assignments, 1 day for resource file. It might be better to allow modules to decide about this, at present it is hardcoded in file.php.&lt;br /&gt;
&lt;br /&gt;
 Great idea.  [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
== Hierarchy in tables ? ==&lt;br /&gt;
&lt;br /&gt;
It&#039;s possible that I don&#039;t undertand a key piece of the concept, but I wonder why there is no reference to any &amp;quot;parent id&amp;quot; in the file or file_instance table ?&lt;br /&gt;
In other words, how the hierarchical structure is supposed to be &amp;quot;imported&amp;quot; from repository to Moodle ?&lt;br /&gt;
If the hierarchy is reserved to the course context, and not to the repository context, it seems difficult to allow students to access&lt;br /&gt;
to a complete directory, for example.&lt;br /&gt;
&lt;br /&gt;
On the other hand, maybe it&#039;s only a question for the &amp;quot;local&amp;quot; repository type, and not to the &amp;quot;generic&amp;quot; repository API ?&lt;br /&gt;
[[User:Allegre Guillaume|Allegre Guillaume]] 16:43, 5 March 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
[[User:Martin Dougiamas|Martin Dougiamas]] 12:58, 15 March 2008 (CDT): basically I was thinking we just store a full local path for each file instead of hierarchies.  It wasn&#039;t in the db schema though: I&#039;ve just added it.  Thanks!&lt;br /&gt;
&lt;br /&gt;
As for allowing access to a whole directory, that&#039;s something I&#039;ve not thought about - thanks!  I agree we need to support something like that in the interface.  Hmm ..&lt;br /&gt;
&lt;br /&gt;
== Editing Repository Files / Version Control ? ==&lt;br /&gt;
&lt;br /&gt;
How do you imagine to handle the &amp;quot;editing file&amp;quot; problem ? &lt;br /&gt;
I can see several solutions :&lt;br /&gt;
# the simplest way : write access to a file really allows to edit (re-upload) the file, each instance being modified&lt;br /&gt;
# the &amp;quot;cheap copy&amp;quot; way : optionally, the modification is applied only to new file_instances (or those for which the teacher forces to). Here you have to handle two (then maybe more) revisions of this file.&lt;br /&gt;
This triggers the file revisions (or version control) question.&lt;br /&gt;
&lt;br /&gt;
A related question is about versionned files : &lt;br /&gt;
should it depend only upon the repository layer (for example, a plugin could implement a SVN &amp;quot;repository&amp;quot;) ?&lt;br /&gt;
Or should Moodle be aware of the file &amp;quot;revision number&amp;quot; ? &lt;br /&gt;
[[User:Allegre Guillaume|Allegre Guillaume]] 17:00, 5 March 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:Martin Dougiamas|Martin Dougiamas]] 13:08, 15 March 2008 (CDT):  I don&#039;t think we should start getting into such things, version and editing is the job of the dedicated external repository system and people should use that interface.  &lt;br /&gt;
&lt;br /&gt;
What we do have in Moodle is the file-&amp;gt;updates field.  This specifies when to get a fresh copy.  It would be set when the user has specified they want Moodle to use the &amp;quot;latest version&amp;quot; of the file.  And if the user specified a particular version in the repository interface then that is what gets copied (once) and the file-&amp;gt;updates field is left as zero.&lt;br /&gt;
&lt;br /&gt;
One scenario would be if someone wants to use version 1 in one course and version 2 in another, but since the version is in the URL to the original file (and thus a different remote path) they would be treated as two separate files in Moodle anyway.&lt;br /&gt;
&lt;br /&gt;
Might be a small problem if they said &amp;quot;latest version, no update&amp;quot; in course 1 and then later on said &amp;quot;latest version, no update&amp;quot; in a second course.  I guess that would re-download the latest version (which might have changed) and thus course 1 would have an unexpected update.  We could solve this by alerting the user and giving them a choice, I suppose.&lt;br /&gt;
&lt;br /&gt;
== Replacing Moodle&#039;s File System ==&lt;br /&gt;
&lt;br /&gt;
The API as specified still uses the standard Moodle file system, which has its limitations while providing a simple file access method. But, shouldn&#039;t we also be considering completely (or partially) replacing the Moodle file system with the repository system? To that end, the file interface would be the same to users, but where the files are and how they are accessed would be up to which repository was being used. In this system, the standard Moodle file system would just be one of the available repositories. Then the API could support more robust access controls if available, or very few (as Moodle does now). This could allow for per-directory / per-file privilege granting, common file areas so that courses could access the same copy of a file (rather than copying it into the Moodle file area), etc.&lt;br /&gt;
&lt;br /&gt;
The API could also support multiple repositories and allow choosing a file as a link rather than copying it.&lt;br /&gt;
&lt;br /&gt;
Of course, this would also mean allowing write access to the repository area from Moodle, rather than leaving it as read-only. I know the plan was to do this through the [[Portfolio API]], but that really is limited to a user storage function and not a file management function. I think having an API defined to allow for full file management would be a better solution - even if not supported by all repositories.&lt;br /&gt;
[[User:Mike Churchward|Mike Churchward]] 12:54, 6 March 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
[[User:Martin Dougiamas|Martin Dougiamas]] 12:54, 15 March 2008 (CDT) :&lt;br /&gt;
Actually, Mike, the standard file system is NOT being retained at all.  I&#039;ve clarified this slightly in the docs.  The course-centered structure for files is gone.  All files ARE stored on disk but most of the info regarding their location and access is all governed by a table in the database (so the files could just as easily be in a remote database if you wished).  Files used in multiple areas within Moodle will never be stored more than once in Moodle.&lt;br /&gt;
&lt;br /&gt;
The idea of a read/write interface was how we started, but it&#039;s insanely complex once you try to handle backups (ie how do you make a complete backup suitable for giving to someone else?) and access control (how do you decide access depending on Moodle contexts), and we&#039;ll never do it as well as the original repository does it.  Why should we duplicate the Hive interface (to use an example) in Moodle when Hive has a perfectly good one already, one that handles all the extra stuff like Copyright controls, workflow and so on?   &lt;br /&gt;
&lt;br /&gt;
That said, the current Repository plugin idea is very simple, so that if anyone really wanted to embed management into the &amp;quot;file picker&amp;quot; interface they totally could do it in the plugin.&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
==Windows network drives==&lt;br /&gt;
I&#039;ve added this to the end of the list of repository types to be supported because its possibly the most useful one I can think of. Our school wants to make the transition to moodle, but getting the files on there is the biggest barrier and there is a lot of stuff sitting on our shared and personal folders which is time consuming to transfer. Integration is a big thing that management want to see, particularly the ability to bulk upload files. This may not be a repository as such because it may be that the best way is to copy the file from the shared folder into the repository rather than where it is so it can be moved/deleted accidentally, but easy access is vital in making the process of uploading a file possible. It would also make Moodle a killer app in that it could make our network drives available from home through a secure web interface. &lt;br /&gt;
&lt;br /&gt;
I&#039;ve linked to Guy Thomas&#039; [http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=991 Windows Share Web Client block] as it is a good start, but sadly only works on Linux. [[User:Matt Gibson|Matt Gibson]] 03:43, 29 April 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
==Bulk operations==&lt;br /&gt;
On a similar note, Don Hinkelman&#039;s new course format provides a great bulk-upload feature whereby a whole folder can be uploaded and added to the course as resources with the names of the files as titles, with just a couple of clicks. I know this is extending the repository idea a little, but to be honest, I think that one of the biggest weaknesses of Moodle&#039;s file handling right now is not being able to add an entire folder of files without manually going through each one and laboriously specifying location and title. To make any repository useful, I think three operations should be possible with one or two clicks:&lt;br /&gt;
* Add a whole folder/group of files to the repository at once&lt;br /&gt;
* The above operation, but additionally, have all of the folder/group added to a course and named automatically, all in one go.&lt;br /&gt;
* Find a group of files which are already in the repository and add them to a course all at once, with automatic naming as above.&lt;br /&gt;
Not sure if this is best put here or in the Developemt: File_API bit, but here seemed slightly better. [[User:Matt Gibson|Matt Gibson]] 03:43, 29 April 2008 (CDT)&lt;/div&gt;</summary>
		<author><name>Mattgibson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=User:Matt_Gibson&amp;diff=35381</id>
		<title>User:Matt Gibson</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=User:Matt_Gibson&amp;diff=35381"/>
		<updated>2008-04-29T08:12:47Z</updated>

		<summary type="html">&lt;p&gt;Mattgibson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Teacher, tester and programmer (in that order).&lt;/div&gt;</summary>
		<author><name>Mattgibson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Development_talk:Repository_API&amp;diff=35380</id>
		<title>Development talk:Repository API</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Development_talk:Repository_API&amp;diff=35380"/>
		<updated>2008-04-29T08:12:00Z</updated>

		<summary type="html">&lt;p&gt;Mattgibson: /* Backup/restore relinking */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(Ideas will be deleted from the comments section as they are resolved or merged into the main spec)&lt;br /&gt;
&lt;br /&gt;
===Missing concept of trusted files===&lt;br /&gt;
Files are not created equal, some of them are to be trusted, some can not be trusted at all. Web browsers trust everything received from the server, files from server may access cookie information and thus scripting technologies may allow them to do anything user can do. We do have to trust our teachers because they are supposed to create the learning content, but we definitely can not trust all students.&lt;br /&gt;
&lt;br /&gt;
Imagine if students were allowed to upload arbitrary files to server, like html file loaded with javascript and the server would happily serve them to all Moodle users. Our solution is to use html cleaning filters for submitted texts and force downloads of student uploaded files. To do this we must know if we trust the files or not. Unfortunately the forced downloads of student uploaded files and cleaning of html texts does not solve all problems, because bugs in browsers and especially browser plug-ins may sometimes be used to work around our protections.&lt;br /&gt;
&lt;br /&gt;
The best solution would be to use separate web addresses for trusted and not trusted files (two wwwroots in config.php), not all sites may afford two different addresses but we should be imo prepared for this.  [[User:Skodak|Skodak]] 16:42, 28 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
 Great idea, yes.  In fact couldn&#039;t all the files be served via $CFG-&amp;gt;fileroot all the time?  &lt;br /&gt;
 [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
userid field could be used for this, but separate flag might be better in order to allow teachers to upload untrusted files (teacher uploads assignment submission for the student).&lt;br /&gt;
&lt;br /&gt;
===Relative file links===&lt;br /&gt;
Flash, Java and SCORM require relative links and directory hierarchy in general - we must support it. Some SCORM packages load hundreds of files per page which means the file serving must be very fast with minimum of db access.&lt;br /&gt;
&lt;br /&gt;
Reading the proposal above it seems the API is about serving of isolated files referenced by repository ids. HTML requires to use relative or absolute locators with file names, we can not use repository ids directly in relative links. In case of scorm we have absolute path to base of SCORM package of given activity and SCORM files use relative links inside the package.&lt;br /&gt;
Solution could be to store relative paths directly in filename field ex:directory1/directory2/filename.ext.&lt;br /&gt;
&lt;br /&gt;
 Yes I agree, we definitely need to support (virtual) directories and slasharguments.&lt;br /&gt;
 We could just match the file argument to a path in the db.  Perhaps add the fileid &lt;br /&gt;
 to the argument path as a primary key: fileid/directory1/directory2/filename.ext&lt;br /&gt;
 [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
===Virtual directories and files===&lt;br /&gt;
Sometimes the content of files is generated on the fly (csv exports, etc.), there are many special files spread through codebase doing nearly the same, it should be imho possible to use the same file API for these.&lt;br /&gt;
&lt;br /&gt;
Another virtual example is assignment submissions and webdav. I would like to see an option to browse the assignment submissions as directory structure, the top directory would be a list of names of users, inside html files with online assignment and uploaded files. This would allow us to implement simple zip&amp;amp;go or webdav based offline grading solutions. The problem here is that the content of this virtual submissions directly needs to be created on the fly based on user references, the proposed repository structure can not be used for this.&lt;br /&gt;
&lt;br /&gt;
 Very interesting idea! [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
===Backup/restore relinking===&lt;br /&gt;
We are supporting relinking inside courses only. Till now it was easy to guess if absolute link will work after restore on another server.&lt;br /&gt;
There are several types of files:&lt;br /&gt;
*course files - relinked during restore, works on any server if from the same course&lt;br /&gt;
*module files - not relinked, urls are not permanent, link can not be copypasted (assignments, forum attachments, rss files, etc.)&lt;br /&gt;
*user files - not relinked, links work only on original server (blog attachments, personal files, etc.)&lt;br /&gt;
&lt;br /&gt;
 I think all this will be simplified in the proposed system because everything is &lt;br /&gt;
 represented using the same system: a file with an ACL (backup can quickly &lt;br /&gt;
 determine all the files in one course, probably using one SQL query). &lt;br /&gt;
 [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
If we are backing up/restoring on the same server, will copies of a course restore without file duplication? I use this a lot so that I can archive one year&#039;s course whilst modifying it for next year. [[User:Matt Gibson|Matt Gibson]] 03:12, 29 April 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
===Access needed for both file and its instances===&lt;br /&gt;
We need two types of access control - first who can create instances (link files), second who can access the instance (download the file).&lt;br /&gt;
&lt;br /&gt;
 For the first don&#039;t we already have those capabilities? (like mod/forum:createattachment,&lt;br /&gt;
 moodle/course:managefiles) but they probably could use rationalising.   We&#039;ll need new &lt;br /&gt;
 ones per repository, too, of course.  &lt;br /&gt;
 [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
===Cache lifetime===&lt;br /&gt;
There should be a way to specify cache filetime for each instance of file. For example 0 for uploaded assignments, 1 day for resource file. It might be better to allow modules to decide about this, at present it is hardcoded in file.php.&lt;br /&gt;
&lt;br /&gt;
 Great idea.  [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
== Hierarchy in tables ? ==&lt;br /&gt;
&lt;br /&gt;
It&#039;s possible that I don&#039;t undertand a key piece of the concept, but I wonder why there is no reference to any &amp;quot;parent id&amp;quot; in the file or file_instance table ?&lt;br /&gt;
In other words, how the hierarchical structure is supposed to be &amp;quot;imported&amp;quot; from repository to Moodle ?&lt;br /&gt;
If the hierarchy is reserved to the course context, and not to the repository context, it seems difficult to allow students to access&lt;br /&gt;
to a complete directory, for example.&lt;br /&gt;
&lt;br /&gt;
On the other hand, maybe it&#039;s only a question for the &amp;quot;local&amp;quot; repository type, and not to the &amp;quot;generic&amp;quot; repository API ?&lt;br /&gt;
[[User:Allegre Guillaume|Allegre Guillaume]] 16:43, 5 March 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
[[User:Martin Dougiamas|Martin Dougiamas]] 12:58, 15 March 2008 (CDT): basically I was thinking we just store a full local path for each file instead of hierarchies.  It wasn&#039;t in the db schema though: I&#039;ve just added it.  Thanks!&lt;br /&gt;
&lt;br /&gt;
As for allowing access to a whole directory, that&#039;s something I&#039;ve not thought about - thanks!  I agree we need to support something like that in the interface.  Hmm ..&lt;br /&gt;
&lt;br /&gt;
== Editing Repository Files / Version Control ? ==&lt;br /&gt;
&lt;br /&gt;
How do you imagine to handle the &amp;quot;editing file&amp;quot; problem ? &lt;br /&gt;
I can see several solutions :&lt;br /&gt;
# the simplest way : write access to a file really allows to edit (re-upload) the file, each instance being modified&lt;br /&gt;
# the &amp;quot;cheap copy&amp;quot; way : optionally, the modification is applied only to new file_instances (or those for which the teacher forces to). Here you have to handle two (then maybe more) revisions of this file.&lt;br /&gt;
This triggers the file revisions (or version control) question.&lt;br /&gt;
&lt;br /&gt;
A related question is about versionned files : &lt;br /&gt;
should it depend only upon the repository layer (for example, a plugin could implement a SVN &amp;quot;repository&amp;quot;) ?&lt;br /&gt;
Or should Moodle be aware of the file &amp;quot;revision number&amp;quot; ? &lt;br /&gt;
[[User:Allegre Guillaume|Allegre Guillaume]] 17:00, 5 March 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:Martin Dougiamas|Martin Dougiamas]] 13:08, 15 March 2008 (CDT):  I don&#039;t think we should start getting into such things, version and editing is the job of the dedicated external repository system and people should use that interface.  &lt;br /&gt;
&lt;br /&gt;
What we do have in Moodle is the file-&amp;gt;updates field.  This specifies when to get a fresh copy.  It would be set when the user has specified they want Moodle to use the &amp;quot;latest version&amp;quot; of the file.  And if the user specified a particular version in the repository interface then that is what gets copied (once) and the file-&amp;gt;updates field is left as zero.&lt;br /&gt;
&lt;br /&gt;
One scenario would be if someone wants to use version 1 in one course and version 2 in another, but since the version is in the URL to the original file (and thus a different remote path) they would be treated as two separate files in Moodle anyway.&lt;br /&gt;
&lt;br /&gt;
Might be a small problem if they said &amp;quot;latest version, no update&amp;quot; in course 1 and then later on said &amp;quot;latest version, no update&amp;quot; in a second course.  I guess that would re-download the latest version (which might have changed) and thus course 1 would have an unexpected update.  We could solve this by alerting the user and giving them a choice, I suppose.&lt;br /&gt;
&lt;br /&gt;
== Replacing Moodle&#039;s File System ==&lt;br /&gt;
&lt;br /&gt;
The API as specified still uses the standard Moodle file system, which has its limitations while providing a simple file access method. But, shouldn&#039;t we also be considering completely (or partially) replacing the Moodle file system with the repository system? To that end, the file interface would be the same to users, but where the files are and how they are accessed would be up to which repository was being used. In this system, the standard Moodle file system would just be one of the available repositories. Then the API could support more robust access controls if available, or very few (as Moodle does now). This could allow for per-directory / per-file privilege granting, common file areas so that courses could access the same copy of a file (rather than copying it into the Moodle file area), etc.&lt;br /&gt;
&lt;br /&gt;
The API could also support multiple repositories and allow choosing a file as a link rather than copying it.&lt;br /&gt;
&lt;br /&gt;
Of course, this would also mean allowing write access to the repository area from Moodle, rather than leaving it as read-only. I know the plan was to do this through the [[Portfolio API]], but that really is limited to a user storage function and not a file management function. I think having an API defined to allow for full file management would be a better solution - even if not supported by all repositories.&lt;br /&gt;
[[User:Mike Churchward|Mike Churchward]] 12:54, 6 March 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
[[User:Martin Dougiamas|Martin Dougiamas]] 12:54, 15 March 2008 (CDT) :&lt;br /&gt;
Actually, Mike, the standard file system is NOT being retained at all.  I&#039;ve clarified this slightly in the docs.  The course-centered structure for files is gone.  All files ARE stored on disk but most of the info regarding their location and access is all governed by a table in the database (so the files could just as easily be in a remote database if you wished).  Files used in multiple areas within Moodle will never be stored more than once in Moodle.&lt;br /&gt;
&lt;br /&gt;
The idea of a read/write interface was how we started, but it&#039;s insanely complex once you try to handle backups (ie how do you make a complete backup suitable for giving to someone else?) and access control (how do you decide access depending on Moodle contexts), and we&#039;ll never do it as well as the original repository does it.  Why should we duplicate the Hive interface (to use an example) in Moodle when Hive has a perfectly good one already, one that handles all the extra stuff like Copyright controls, workflow and so on?   &lt;br /&gt;
&lt;br /&gt;
That said, the current Repository plugin idea is very simple, so that if anyone really wanted to embed management into the &amp;quot;file picker&amp;quot; interface they totally could do it in the plugin.&lt;br /&gt;
---&lt;/div&gt;</summary>
		<author><name>Mattgibson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Development:Repository_API&amp;diff=35379</id>
		<title>Development:Repository API</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Development:Repository_API&amp;diff=35379"/>
		<updated>2008-04-29T08:08:59Z</updated>

		<summary type="html">&lt;p&gt;Mattgibson: /* Repository plugins */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes the specification for a future feature, currently being worked on for Moodle 2.0.  This spec is STILL UNDER CONSTRUCTION.&lt;br /&gt;
&lt;br /&gt;
See MDL-13766 to track the status of the implementation.&lt;br /&gt;
&lt;br /&gt;
The page is open for everyone so everyone can help correct mistakes and help with the evolution of this document.  However, if you have questions to ask, problems to report or major changes to suggest, please add them to the [[Development_talk:Repository_API|page comments]], or start a discussion in the [http://moodle.org/mod/forum/view.php?id=1807 Repositories forum].  We&#039;ll endeavour to merge all such suggestions into the main spec before we start development.&lt;br /&gt;
&lt;br /&gt;
Note that parts of this document have been now split off into a separate [[Development:File_API]]&lt;br /&gt;
&lt;br /&gt;
==Objectives==&lt;br /&gt;
&lt;br /&gt;
# Allow all Moodle users to easily bring content into Moodle from external repositories&lt;br /&gt;
# Provide a consistent interface to any external repository, for any Moodle module&lt;br /&gt;
&lt;br /&gt;
==Use cases==&lt;br /&gt;
&lt;br /&gt;
===Teacher adding an external file as a new resource===&lt;br /&gt;
&lt;br /&gt;
# Teacher wants to add a new resource to a course &lt;br /&gt;
# Teacher clicks the &amp;quot;Choose a resource&amp;quot; button&lt;br /&gt;
# Teacher is presented with a simple file picker to choose a file (with a menu to switch between multiple configured repositories)&lt;br /&gt;
# Teacher chooses a file in an external repository&lt;br /&gt;
# File is COPIED into Moodle and stored by the resource module&lt;br /&gt;
# File is marked as owned by that user&lt;br /&gt;
# Whenever someone wants to view that file, the resource module controls access  (see [[Development:File API]] )&lt;br /&gt;
&lt;br /&gt;
===Student submitting an assignment===&lt;br /&gt;
# Student needs to submit an assignment and presses the &amp;quot;Choose files&amp;quot; button&lt;br /&gt;
# Student sees a &amp;quot;file picker&amp;quot; where they can see files listed on any of several configured repositories&lt;br /&gt;
# Student chooses MySpace from the list&lt;br /&gt;
# Student is prompted to enter MySpace username/password (if admin allows it, a checkbox could be there to &amp;quot;remember this for next time&amp;quot; but remember security)&lt;br /&gt;
# Student sees their files in MySpace and chooses one or more&lt;br /&gt;
# Files are copied from MySpace to Moodle &lt;br /&gt;
# Assignment module controls the permissions so that only the Student and assignment graders can see the file (other students would not have permission).&lt;br /&gt;
&lt;br /&gt;
===Student attaching an image to a forum===&lt;br /&gt;
# Student needs to attach an image and presses the &amp;quot;Choose files&amp;quot; button in the posting screen&lt;br /&gt;
# Student sees a &amp;quot;file picker&amp;quot; where they can see files listed on any of several configured repositories&lt;br /&gt;
# Student chooses Mahara from the list&lt;br /&gt;
# Student is prompted to enter Mahara username/password&lt;br /&gt;
# Student sees their files in Mahara and chooses one image&lt;br /&gt;
# Image is copied to Moodle &lt;br /&gt;
# Image file is attached to forum post by Forum module (by reference)&lt;br /&gt;
# Forum module controls permissions so that anyone who can read that forum can see that file&lt;br /&gt;
&lt;br /&gt;
===Student attaching the same image in another forum===&lt;br /&gt;
&lt;br /&gt;
# Student needs to submit an assignment and presses the &amp;quot;Choose files&amp;quot; button&lt;br /&gt;
# Student sees a &amp;quot;file picker&amp;quot; where they can see files listed on any of several configured repositories&lt;br /&gt;
# Student chooses &amp;quot;Local files&amp;quot; from the list and sees all the files they&#039;ve uploaded before&lt;br /&gt;
# A COPY of the image file is attached to forum post by Forum module&lt;br /&gt;
# Forum module controls access to this file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please add more use cases in this same format&lt;br /&gt;
&lt;br /&gt;
==General architecture==&lt;br /&gt;
&lt;br /&gt;
Each repository plugin (a standard Moodle plugin stored under /repository/xxx) will subclass the standard API and override methods specific to that repository.&lt;br /&gt;
&lt;br /&gt;
As is usual in Moodle, there will be admin settings to disable/enable certain repository plugins as standard, as well as user settings so that users can add their own personal repositories to the standard list (eg [http://briefcase.yahoo.com Yahoo Briefcase] or [http://docs.google.com Google Docs]) and to select their default repository.&lt;br /&gt;
&lt;br /&gt;
Once a repository has been used the file will usually be copied into Moodle there and then.  However there will also be options to:&lt;br /&gt;
* only return the URL to the file if it&#039;s desired to keep it external (but this does present security and integrity risks), or&lt;br /&gt;
* refresh the local file copy regularly and automatically&lt;br /&gt;
* refresh the file manually if desired&lt;br /&gt;
&lt;br /&gt;
Once in Moodle, it is subject to the [[Development:File API]] for access control like any other file.&lt;br /&gt;
&lt;br /&gt;
==Repository requirements==&lt;br /&gt;
&lt;br /&gt;
From the Moodle point of view, each repository is just a hierarchy of nodes.&lt;br /&gt;
&lt;br /&gt;
The repository MUST provide:&lt;br /&gt;
# A URL to download each node (eg file).&lt;br /&gt;
# A list of the nodes (eg files and directories) under a given node (eg directory).  This allows Moodle to construct a standard browse interface (much like a standard OS file picker).  However some repository plugins may choose to completely override the repository_browse() method and implement their own interface, that&#039;s OK, as long as they end up with a URL for the file.&lt;br /&gt;
&lt;br /&gt;
The repository can OPTIONALLY:&lt;br /&gt;
# Require some authentication credentials &lt;br /&gt;
# Provide more metadata about each node (mime type, size, dates, related files, dublin core stuff, etc)&lt;br /&gt;
# Describe a search facility (so that Moodle can construct a search form)&lt;br /&gt;
# Provide copyright and usage rules (or just information about the rules)&lt;br /&gt;
&lt;br /&gt;
==Repository plugins==&lt;br /&gt;
&lt;br /&gt;
Some plugins I&#039;d like to see developed for the first version are:&lt;br /&gt;
* local - very similar to the current course-based file manager, except user-based&lt;br /&gt;
* moodle - an interface to another Moodle site, accessed over a secure mnet connection&lt;br /&gt;
* jsr170 - an interface that can talk to anything that supports jsr170 (eg [http://www.alfresco.com/ Alfresco])&lt;br /&gt;
* oki - an OKI emulator allowing us to access things with OKI interfaces,like [http://www.fedora.info/ Fedora]&lt;br /&gt;
* briefcase - an interface to [http://briefcase.yahoo.com/ Yahoo Briefcase]&lt;br /&gt;
* myspace - an interface to MySpace files (perhaps via [http://www.programmableweb.com/api/myspace this MySpace API])&lt;br /&gt;
* googledocs - an interface to [http://docs.google.com Google Docs]&lt;br /&gt;
* skydrive - an interface to Microsoft&#039;s [http://skydrive.live.com/ SkyDrive] files&lt;br /&gt;
* facebook - an interface to Facebook files&lt;br /&gt;
* merlot - an interface to the learning materials in [http://www.merlot.org/merlot/materials.htm Merlot.org]&lt;br /&gt;
* flickr - an interface to [http://flickr.com flickr]&lt;br /&gt;
* youtube - an interface to [http://youtube.com YouTube]&lt;br /&gt;
* mahara - an interface to a Mahara installation&lt;br /&gt;
* Dspace - a repository from MIT&lt;br /&gt;
* DOOR - another popular open source repository&lt;br /&gt;
* An interface for windows shares e.g. personal folders on network drives. Would need to link with LDAP as usernames will often be wholly/partially the same as network folder names. This could be done using SAMBA, but would also need to work on windows machines natively. See [http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=991 this block] for a linux implementation.&lt;br /&gt;
&lt;br /&gt;
==Tables==&lt;br /&gt;
&lt;br /&gt;
=== repository ===&lt;br /&gt;
&lt;br /&gt;
This table contains one entry for every configured external repository instance.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Type&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Default&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Info&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;id&#039;&#039;&#039;&lt;br /&gt;
|int(10)&lt;br /&gt;
|&lt;br /&gt;
|autoincrementing &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|repositoryname&lt;br /&gt;
|varchar&lt;br /&gt;
|&lt;br /&gt;
|A custom name for this repository (non-unique)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;repositorytype&#039;&#039;&#039; &lt;br /&gt;
|varchar&lt;br /&gt;
| &lt;br /&gt;
|The name of the plugin being used  (1 special case:  &amp;quot;local&amp;quot; which covers all files uploaded from desktop)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;userid&#039;&#039;&#039; &lt;br /&gt;
|int(10)&lt;br /&gt;
| &lt;br /&gt;
|The person who created this repository instance&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;contextid&#039;&#039;&#039; &lt;br /&gt;
|int(10)&lt;br /&gt;
| &lt;br /&gt;
|The context that this repository is available to ( = system context for site-wide ones)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|username&lt;br /&gt;
|varchar&lt;br /&gt;
| &lt;br /&gt;
|username to log in with, if required&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|password&lt;br /&gt;
|varchar&lt;br /&gt;
| &lt;br /&gt;
|password to log in with, if required&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|option1&lt;br /&gt;
|varchar&lt;br /&gt;
| &lt;br /&gt;
|Other information useful to the plugin&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|option2&lt;br /&gt;
|varchar&lt;br /&gt;
| &lt;br /&gt;
|Other information useful to the plugin&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|option3&lt;br /&gt;
|varchar&lt;br /&gt;
| &lt;br /&gt;
|Other information useful to the plugin&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|option4&lt;br /&gt;
|varchar&lt;br /&gt;
| &lt;br /&gt;
|Other information useful to the plugin&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|option5&lt;br /&gt;
|varchar&lt;br /&gt;
| &lt;br /&gt;
|Other information useful to the plugin&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|timecreated&lt;br /&gt;
|int(10)&lt;br /&gt;
|&lt;br /&gt;
|The time this repository was created&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|timemodified&lt;br /&gt;
|int(10)&lt;br /&gt;
|&lt;br /&gt;
|The last time the repository was modified&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Class methods==&lt;br /&gt;
&lt;br /&gt;
===Repository class===&lt;br /&gt;
&lt;br /&gt;
This class implements the interface to a particular repository, for browsing, selecting and updating files.&lt;br /&gt;
&lt;br /&gt;
====get_file($path)====&lt;br /&gt;
&lt;br /&gt;
====get_listing($parent=&#039;/&#039;, $search=&#039;&#039;&#039;&#039;&#039;&#039;&#039;&#039;)====&lt;br /&gt;
&lt;br /&gt;
====cron()====&lt;br /&gt;
&lt;br /&gt;
====etc====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [[Development:File API]]&lt;br /&gt;
* [[Development:Portfolio API]]&lt;/div&gt;</summary>
		<author><name>Mattgibson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=TeX_notation_filter&amp;diff=34806</id>
		<title>TeX notation filter</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=TeX_notation_filter&amp;diff=34806"/>
		<updated>2008-04-14T14:23:14Z</updated>

		<summary type="html">&lt;p&gt;Mattgibson: /* Using MimeTeX */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The [[TeX Filter]] converts TeX code into GIF images. It uses a binary program(s) on the server to render the images (either the full LaTeX implementation, in Moodle 1.6 or later, or the [[MimeTeX]] binary that ships with Moodle for various platforms). Versions of MimeTex for Linux (glib2.3), Windows, Mac OS X and FreeBSD are included in the Moodle distribution. &lt;br /&gt;
&lt;br /&gt;
No additional software or plugins are required on the client computers to display the images.&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
&lt;br /&gt;
To use the filter the resource should include a TeX expression delimited by double-dollar signs. Example:&lt;br /&gt;
 &lt;br /&gt;
    $$ sqrt( x + y ) $$&lt;br /&gt;
&lt;br /&gt;
=== Using MimeTeX ===&lt;br /&gt;
&lt;br /&gt;
MimeTeX is a number of pre-built binaries that are included in the Moodle standard distribution and are located in the filters/tex directory. There are a number of different versions for different operating systems. The TeX filter picks the appropriate binary for the detected host operating system (you will need to hack the script if your operating system is not included). Note that your web server needs to be set up with appropriate permissions for running binaries in that location. This appears to be particularly problematic on the Windows platform. See the [http://moodle.org/mod/forum/view.php?id=752 Mathematical Tools Forum] for more information.&lt;br /&gt;
&lt;br /&gt;
If you are using the &#039;&#039;&#039;windows installer package&#039;&#039;&#039;, type something like this into the box called &#039;path of &#039;&#039;latex&#039;&#039; binary&#039;&lt;br /&gt;
 &amp;quot;C:\Moodle_webserver\moodle\filter\tex\mimetex.exe&amp;quot; &lt;br /&gt;
Where you replace &#039;Moodle_webserver&#039; with the real path to your moodle install. Note that on windows, the red x to the right of the input box will never go away, even when the details are correct.&lt;br /&gt;
&lt;br /&gt;
If you use TeX in a GIFT question import file you must escape  { } and = (even # and ~) with a \ before each symbol.&lt;br /&gt;
&lt;br /&gt;
=== Improvements in 1.6 ===&lt;br /&gt;
&lt;br /&gt;
{{Moodle 1.6}}&lt;br /&gt;
&lt;br /&gt;
Moodle 1.6 adds the ability to use the full TeX formatting facilities (MimeTex only provides a subset). Three external binaries are used to render the images which may need setting up for your system. The filter will first check for a LaTeX renderer (Ghostscript is also required for this method, ImageMagick in the case of Linux) and failing that will use the simpler [[MimeTeX]] binary included in the Moodle distribution. LaTex permits the whole range of syntax, whereas [[MimeTeX]] only supports a mathematical subset.&lt;br /&gt;
&lt;br /&gt;
=== Settings Page ===&lt;br /&gt;
&lt;br /&gt;
The TeX filter settings page are primarily intended to adjust the operation of the LaTeX renderer. The defaults for the three path settings are selected according to the detection of the operating system on which Moodle is running. These are simply suggested common values - Moodle does not check that the binaries actually exist at these locations. Later versions of Moodle show a green tick or a red cross next to the path setting - this shows that the binary exists at that location (only). The settings have no effect on the operation of the MimeTex binary (used if any of these binaries are not found).&lt;br /&gt;
&lt;br /&gt;
==== LaTeX preamble ====&lt;br /&gt;
&lt;br /&gt;
Enables the LaTeX preamble to be specified. The default should work for most users, but you may need to change it to support non-latin character sets etc. Please see the LaTeX documentation for further details.&lt;br /&gt;
&lt;br /&gt;
==== Transparent colour ====&lt;br /&gt;
&lt;br /&gt;
This should be set to your normal text background colour. The default setting is #FFFFFF (i.e., white). &lt;br /&gt;
&lt;br /&gt;
==== Density ====&lt;br /&gt;
&lt;br /&gt;
This setting effects the size of the resulting image.&lt;br /&gt;
&lt;br /&gt;
==== Path of &#039;&#039;latex&#039;&#039; binary ====&lt;br /&gt;
&lt;br /&gt;
Path to standard latex binary.&lt;br /&gt;
&lt;br /&gt;
On a MacOS X, the path is &amp;quot;/usr/texbin/&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Path of &#039;&#039;dvips&#039;&#039; binary ====&lt;br /&gt;
&lt;br /&gt;
Path to standard dvips binary - generally distributed as part of a LaTeX system.&lt;br /&gt;
&lt;br /&gt;
On a MacOS X, the path is &amp;quot;/usr/texbin/&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Path of &#039;&#039;convert&#039;&#039; binary ====&lt;br /&gt;
&lt;br /&gt;
Path to standard convert binary. This is distributed as part of the Ghostscript system, or ImageMagick in Linux.&lt;br /&gt;
&lt;br /&gt;
A simple check is made to establish if the binaries exist at the given paths. A tick or a cross is displayed alongside each as a result. Note that this does not check that the application actually works, just that it is there.&lt;br /&gt;
&lt;br /&gt;
On a MacOS X, the path is &amp;quot;/usr/local/bin/&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Debugging TeX filter ===&lt;br /&gt;
&lt;br /&gt;
The TeX filter has a debugging script included that should help if you are having problems. The URL will be as follows...&lt;br /&gt;
&lt;br /&gt;
   http://your.moodle.path/filter/tex/texdebug.php&lt;br /&gt;
&lt;br /&gt;
You can either enter this path explicitly or with appropriate role permissions the TeX images (or more likely incorrectly rendered text, if you need debugging) will link to this. There are a number of options and suggestions to facilitate debugging the filter. Note that options for the latex/ghostscript versions are only provided from Moodle version 1.8.3.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Filters (administrator)]]&lt;br /&gt;
* [http://moodle.org/mod/glossary/view.php?id=2739&amp;amp;mode=letter&amp;amp;hook=M&amp;amp;sortkey=CREATION&amp;amp;sortorder=asc  TeX Filter Glossary] - a [[Glossary|glossary]] you can add to your course which details usage of the supported [[TeX notation]].&lt;br /&gt;
* [http://www.latex-project.org/ LaTeX] - the LaTeX document preparation system.&lt;br /&gt;
* [http://www.ghostscript.com/ ghostscript] - required to render the image&lt;br /&gt;
* [http://www.forkosh.com/mimetex.html mimetex] - generates mathematical expressions&lt;br /&gt;
* [http://www.miktex.org/ MikTeX] - LaTeX for Windows systems&lt;br /&gt;
&lt;br /&gt;
[[Category:Filter]]&lt;br /&gt;
[[Category:Mathematics]]&lt;/div&gt;</summary>
		<author><name>Mattgibson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Adding_Feedback_questions&amp;diff=33790</id>
		<title>Adding Feedback questions</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Adding_Feedback_questions&amp;diff=33790"/>
		<updated>2008-03-19T10:55:51Z</updated>

		<summary type="html">&lt;p&gt;Mattgibson: /* Captcha */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Feedback}}&lt;br /&gt;
&lt;br /&gt;
After setting a new Feedback you design it by &#039;&#039;&#039;adding questions&#039;&#039;&#039;. Select the type of question from the drop down list in the top left corner then click the &#039;&#039;Add question to activity&#039;&#039; button.&lt;br /&gt;
&lt;br /&gt;
== Standard options ==&lt;br /&gt;
&lt;br /&gt;
The following apply to all or most question types.&lt;br /&gt;
&lt;br /&gt;
=== Position ===&lt;br /&gt;
 &lt;br /&gt;
This number controls the order of the questions. Position 1 is the question nearest the top of the page, so when you create or edit a question, you can choose from the dropdown of available positions (which will vary depending on how many other questions there are). You can also rearrange questions by clicking the position up and down arrows on the main add questions screen.&lt;br /&gt;
&lt;br /&gt;
=== Required ===&lt;br /&gt;
&lt;br /&gt;
These questions are required to be answered and will prompt the user if they are left unaswered. These questions are highlighted with a red star for users, and have a yellow exclamation point beside them when editing Feedback questions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Available question types ==&lt;br /&gt;
&lt;br /&gt;
===Captcha===&lt;br /&gt;
An test to make sure a real person is filling in the form and not an automatic spamming program of some sort. Asks a person to write out some distorted text which is displayed on screen. You normally won&#039;t need this unless you find you are getting spammed a lot.&lt;br /&gt;
&lt;br /&gt;
=== Multiple choice - multiple answers ===&lt;br /&gt;
&lt;br /&gt;
This will give you a series of options with a checkbox next to each one. The respondent can check as many as they want and there is currently no way to specify a limit to how many they can choose which is lower than the total.&lt;br /&gt;
&lt;br /&gt;
=== Multiple choice - single answer allowed (dropdownlist) ===&lt;br /&gt;
&lt;br /&gt;
This will give you a dropdown list from which only one answer can be selected&lt;br /&gt;
&lt;br /&gt;
=== Dropdownlist (rated) ===&lt;br /&gt;
&lt;br /&gt;
This is visually indistinguishable from the option above. Not sure what the difference is, so please fill it in here if you know. [[User:Matt Gibson|Matt Gibson]] 04:27, 19 March 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
=== Label ===&lt;br /&gt;
&lt;br /&gt;
Similarly to a standard Moodle label, this allows you to add abritrary text between questions allowing for extra explanation or to divide the Feedback into sections.&lt;br /&gt;
&lt;br /&gt;
=== Numeric answer (added in Moodle 1.7) ===&lt;br /&gt;
Here, you ask a question which must have a number as an answer and specify the acceptable range e.g. &amp;quot;How many arms would you like, if more than 2 were possible? (please specify 0-10)&amp;quot; with a range of 0-10 set in the options. It helps if you specify the acceptable range in the question text.&lt;br /&gt;
&lt;br /&gt;
=== Picture ===&lt;br /&gt;
&lt;br /&gt;
This question type allows you make a question where users must choose from a range of images as their answer. For example: &amp;quot;Which of these flags is known as the Union Jack?&amp;quot;. You write your question and CTRL-Click to choose the images you want. Currently, there seems to be only the option to use flags that are provided with the module. Can other images be used? [[User:Matt Gibson|Matt Gibson]] 04:32, 19 March 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
=== Multiple choice - single answer ===&lt;br /&gt;
&lt;br /&gt;
This will give you a series of radio buttons, which starts on &#039;Not selected&#039; and then has your options afterwards. Only one can be chosen and &#039;Not selected&#039; is a valid answer if the question is not set to &#039;required&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Radiobutton (rated) ===&lt;br /&gt;
&lt;br /&gt;
This is the same as the Multiple choice one above, but you can allocate a numerical value to each of the answers as well, which makes things a little more quantitative if you intend to analyse the results statistically.&lt;br /&gt;
&lt;br /&gt;
=== Longer Text Answer ===&lt;br /&gt;
&lt;br /&gt;
This option is for creating a text box (you specify how big it will appear in rows and columns) which people can write a long answer into.&lt;br /&gt;
&lt;br /&gt;
=== Short Text Answer ===&lt;br /&gt;
&lt;br /&gt;
This option lets you specify a single line answer, with an input box which is a set number of characters long (you choose). You also specify the maximum number of characters you will accept, so that the answer is not too long and/or does not run over the length of the box on screen.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Feedback]]&lt;br /&gt;
[[Category:Teacher]]&lt;/div&gt;</summary>
		<author><name>Mattgibson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Adding_Feedback_questions&amp;diff=33789</id>
		<title>Adding Feedback questions</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Adding_Feedback_questions&amp;diff=33789"/>
		<updated>2008-03-19T10:55:22Z</updated>

		<summary type="html">&lt;p&gt;Mattgibson: /* Numeric answer (added in Moodle 1.7) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Feedback}}&lt;br /&gt;
&lt;br /&gt;
After setting a new Feedback you design it by &#039;&#039;&#039;adding questions&#039;&#039;&#039;. Select the type of question from the drop down list in the top left corner then click the &#039;&#039;Add question to activity&#039;&#039; button.&lt;br /&gt;
&lt;br /&gt;
== Standard options ==&lt;br /&gt;
&lt;br /&gt;
The following apply to all or most question types.&lt;br /&gt;
&lt;br /&gt;
=== Position ===&lt;br /&gt;
 &lt;br /&gt;
This number controls the order of the questions. Position 1 is the question nearest the top of the page, so when you create or edit a question, you can choose from the dropdown of available positions (which will vary depending on how many other questions there are). You can also rearrange questions by clicking the position up and down arrows on the main add questions screen.&lt;br /&gt;
&lt;br /&gt;
=== Required ===&lt;br /&gt;
&lt;br /&gt;
These questions are required to be answered and will prompt the user if they are left unaswered. These questions are highlighted with a red star for users, and have a yellow exclamation point beside them when editing Feedback questions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Available question types ==&lt;br /&gt;
&lt;br /&gt;
===Captcha===&lt;br /&gt;
An test to make sure a real person is filling in the form and not an automatic spamming program of some sort. Asks a person to write out some distorted text which is displayed on screen.&lt;br /&gt;
&lt;br /&gt;
=== Multiple choice - multiple answers ===&lt;br /&gt;
&lt;br /&gt;
This will give you a series of options with a checkbox next to each one. The respondent can check as many as they want and there is currently no way to specify a limit to how many they can choose which is lower than the total.&lt;br /&gt;
&lt;br /&gt;
=== Multiple choice - single answer allowed (dropdownlist) ===&lt;br /&gt;
&lt;br /&gt;
This will give you a dropdown list from which only one answer can be selected&lt;br /&gt;
&lt;br /&gt;
=== Dropdownlist (rated) ===&lt;br /&gt;
&lt;br /&gt;
This is visually indistinguishable from the option above. Not sure what the difference is, so please fill it in here if you know. [[User:Matt Gibson|Matt Gibson]] 04:27, 19 March 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
=== Label ===&lt;br /&gt;
&lt;br /&gt;
Similarly to a standard Moodle label, this allows you to add abritrary text between questions allowing for extra explanation or to divide the Feedback into sections.&lt;br /&gt;
&lt;br /&gt;
=== Numeric answer (added in Moodle 1.7) ===&lt;br /&gt;
Here, you ask a question which must have a number as an answer and specify the acceptable range e.g. &amp;quot;How many arms would you like, if more than 2 were possible? (please specify 0-10)&amp;quot; with a range of 0-10 set in the options. It helps if you specify the acceptable range in the question text.&lt;br /&gt;
&lt;br /&gt;
=== Picture ===&lt;br /&gt;
&lt;br /&gt;
This question type allows you make a question where users must choose from a range of images as their answer. For example: &amp;quot;Which of these flags is known as the Union Jack?&amp;quot;. You write your question and CTRL-Click to choose the images you want. Currently, there seems to be only the option to use flags that are provided with the module. Can other images be used? [[User:Matt Gibson|Matt Gibson]] 04:32, 19 March 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
=== Multiple choice - single answer ===&lt;br /&gt;
&lt;br /&gt;
This will give you a series of radio buttons, which starts on &#039;Not selected&#039; and then has your options afterwards. Only one can be chosen and &#039;Not selected&#039; is a valid answer if the question is not set to &#039;required&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Radiobutton (rated) ===&lt;br /&gt;
&lt;br /&gt;
This is the same as the Multiple choice one above, but you can allocate a numerical value to each of the answers as well, which makes things a little more quantitative if you intend to analyse the results statistically.&lt;br /&gt;
&lt;br /&gt;
=== Longer Text Answer ===&lt;br /&gt;
&lt;br /&gt;
This option is for creating a text box (you specify how big it will appear in rows and columns) which people can write a long answer into.&lt;br /&gt;
&lt;br /&gt;
=== Short Text Answer ===&lt;br /&gt;
&lt;br /&gt;
This option lets you specify a single line answer, with an input box which is a set number of characters long (you choose). You also specify the maximum number of characters you will accept, so that the answer is not too long and/or does not run over the length of the box on screen.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Feedback]]&lt;br /&gt;
[[Category:Teacher]]&lt;/div&gt;</summary>
		<author><name>Mattgibson</name></author>
	</entry>
</feed>