<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.moodle.org/404/en/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Harrysmith</id>
	<title>MoodleDocs - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://docs.moodle.org/404/en/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Harrysmith"/>
	<link rel="alternate" type="text/html" href="https://docs.moodle.org/404/en/Special:Contributions/Harrysmith"/>
	<updated>2026-04-16T21:53:17Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://docs.moodle.org/404/en/index.php?title=Using_web_services&amp;diff=127131</id>
		<title>Using web services</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/404/en/index.php?title=Using_web_services&amp;diff=127131"/>
		<updated>2017-03-16T10:24:46Z</updated>

		<summary type="html">&lt;p&gt;Harrysmith: /* Enabling protocols */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Web services}}&lt;br /&gt;
This document explains how an administrator can set up a web service for users to access a service. Each user will have a specific and unique security key (also known as a &amp;quot;token&amp;quot;) to access the service.&lt;br /&gt;
&lt;br /&gt;
== Enabling web services==&lt;br /&gt;
[[Image:Enable_web_service.jpg|thumb|Enabling web services]]&lt;br /&gt;
# Access &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Advanced features&#039;&#039;&lt;br /&gt;
# Check &#039;Enable web services&#039; then click &#039;Save Changes&#039;&lt;br /&gt;
&lt;br /&gt;
Note: For security reasons, web services should only be enabled if you intend to make use of it.&lt;br /&gt;
&lt;br /&gt;
== Enabling protocols ==&lt;br /&gt;
[[Image:Enable_protocol.jpg|thumb|left|Enabling protocols]]&lt;br /&gt;
Usually external applications that users wish to use dictate which protocols should be enabled. &lt;br /&gt;
&lt;br /&gt;
# Access &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Plugins &amp;gt; Web services &amp;gt; Manage protocols&#039;&#039;&lt;br /&gt;
# Enable the protocols (SOAP, REST, XMLRPC, AMF, ...) as required&lt;br /&gt;
&lt;br /&gt;
== Enabling web service function documentation ==&lt;br /&gt;
[[Image:Security keys and documentation.jpg|thumb|Security keys page with documentation link]]&lt;br /&gt;
Enabling web service function documentation (also on the Manage protocols page) results in user-specific web service documentation being available for each user on their [[Security keys]] page. This option is mainly useful to web service client developers. If nobody is creating a web service client, there is no need to enable this feature.&lt;br /&gt;
&lt;br /&gt;
== Creating a service ==&lt;br /&gt;
If none of the pre-build web services match your needs, you can create a custom service i.e. select which of the standard web service functions are available via that service.&lt;br /&gt;
&lt;br /&gt;
You can enable only the specific functions that you need to expose, so not compromising on security.&lt;br /&gt;
[[Image:Create a service.jpg|thumb|Creating a service|left]]&lt;br /&gt;
# Access &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Plugins &amp;gt; Web services &amp;gt; External services&#039;&#039;&lt;br /&gt;
# Click Add new custom service&lt;br /&gt;
#* &#039;Authorised users only&#039; - If enabled, you will need to select the authorised users manually. Otherwise all users with appropriate permissions are allowed&lt;br /&gt;
#* &#039;Required capability&#039; - If enabled, any user accessing the web service will be checked against this selected capability. (This is just an additional optional security layer.)&lt;br /&gt;
# Enter a name and check Enabled&lt;br /&gt;
# Click the button &#039;Add service&#039;&lt;br /&gt;
&lt;br /&gt;
==Adding functions to the service==&lt;br /&gt;
[[Image:Select a web service function.jpg|thumb|Adding functions to the service]]Your service is currently empty and doesn&#039;t do anything. Web service functions need to be added. Your choice will be dictated by what you allow the external application to do. For this example, select &#039;Create group&#039;.&lt;br /&gt;
&lt;br /&gt;
# Click &#039;Add functions&#039; link&lt;br /&gt;
# Select &#039;create group&#039; function and click the &#039;Add functions&#039; button&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note that deprecated functions can not be added to services although the ones that are already part of a service can remain there until they are removed from Moodle codebase.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You should be back to the service functions list. &#039;Required capabilities&#039; are indicated for each function. Users need the required capabilities to run a function. The function descriptions in the API Documentation can also give you more information about the required capabilities (&#039;&#039;Administration &amp;gt; Site administration &amp;gt; Plugins &amp;gt; Web services &amp;gt; API Documentation&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
==Enabling capabilities==&lt;br /&gt;
&lt;br /&gt;
The final step is to grant appropriate permissions. The following capabilities should be allowed:&lt;br /&gt;
&lt;br /&gt;
* [[Capabilities/moodle/webservice:createtoken|moodle/webservice:createtoken]] - for allowing users to generate a security key&lt;br /&gt;
* [[Capabilities/webservice/rest:use | webservice/rest:use]], [[Capabilities/webservice/soap:use | webservice/soap:use]], [[Capabilities/webservice/xmlrpc:use | webservice/xmlrpc:use]], [[Capabilities/webservice/amf:use | webservice/amf:use]] which match the enabled protocols.&lt;br /&gt;
* The service &#039;&#039;Required capability&#039;&#039; if set (&#039;&#039;Administration &amp;gt; Site administration &amp;gt; Plugins &amp;gt; Web services &amp;gt; Manage services &amp;gt;&#039;&#039;&#039;Edit&#039;&#039;&#039; link&#039;&#039;).&lt;br /&gt;
* The required capabilities for the web service functions. These required capabilities are listed when you add a function to the service. For more information about roles and capabilities, read the [[Manage roles]] documentation.&lt;br /&gt;
&lt;br /&gt;
Once done, the web service should be set up. Users should be able to [[Security keys|obtain a personal security key]].&lt;br /&gt;
&lt;br /&gt;
= Alternative settings = &lt;br /&gt;
&lt;br /&gt;
== Authorise only specific users==&lt;br /&gt;
[[Image:Authorised users link.jpg|thumb]] [[Image:Authorised user selection page.jpg|thumb]]&lt;br /&gt;
# &#039;&#039;Administration &amp;gt; Site Administration &amp;gt; Plugins &amp;gt; Web services &amp;gt; External Services&#039;&#039;&lt;br /&gt;
# Select &#039;&#039;&#039;Authorised users&#039;&#039;&#039; link (the service must have been set as &#039;&#039;&#039;Authorised users only&#039;&#039;&#039; in the &#039;&#039;&#039;Edit&#039;&#039;&#039; link)&lt;br /&gt;
# Select some users and click &#039;&#039;&#039;Add&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Moodle indicates if some capabilities need to be assigned to an authorised user. Moreover if you click on the authorised user fullname, you can set up some specific options: &#039;&#039;IP restriction&#039;&#039; and &#039;&#039;Valid until&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Create a token  ==&lt;br /&gt;
[[Image:Create_token.jpg|thumb]]&lt;br /&gt;
This feature allows you to create a token for specific user. It can be useful if a user doesn&#039;t have the moodle/create:token capability. This is also the only way to create a token for an administrator. For security reason, tokens are not automatically generated in the administrator security  keys page.&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;Administration &amp;gt; Site Administration &amp;gt; Plugins &amp;gt; Web services &amp;gt; Manage tokens&#039;&#039;&lt;br /&gt;
# Click on &#039;&#039;&#039;Add&#039;&#039;&#039;&lt;br /&gt;
# Select the created user and service&lt;br /&gt;
# Click on &#039;&#039;&#039;Saves changes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As you created a token for this user, you do not need to assign &amp;quot;&#039;&#039;moodle/webservice:createtoken&#039;&#039;&amp;quot; to him/her.&lt;br /&gt;
Finally, note that, as for authorised users, you can also set &#039;&#039;IP restriction&#039;&#039; and &#039;&#039;Valid until&#039;&#039; on a token.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
 		&lt;br /&gt;
*[http://www.joomdle.com/wiki/Preparing_Moodle_20#Setting_up_Moodle_Web_services Joomdle documentation about setting Moodle web services]&lt;/div&gt;</summary>
		<author><name>Harrysmith</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/404/en/index.php?title=Using_web_services&amp;diff=127130</id>
		<title>Using web services</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/404/en/index.php?title=Using_web_services&amp;diff=127130"/>
		<updated>2017-03-16T10:23:48Z</updated>

		<summary type="html">&lt;p&gt;Harrysmith: /* Enabling protocols */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Web services}}&lt;br /&gt;
This document explains how an administrator can set up a web service for users to access a service. Each user will have a specific and unique security key (also known as a &amp;quot;token&amp;quot;) to access the service.&lt;br /&gt;
&lt;br /&gt;
== Enabling web services==&lt;br /&gt;
[[Image:Enable_web_service.jpg|thumb|Enabling web services]]&lt;br /&gt;
# Access &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Advanced features&#039;&#039;&lt;br /&gt;
# Check &#039;Enable web services&#039; then click &#039;Save Changes&#039;&lt;br /&gt;
&lt;br /&gt;
Note: For security reasons, web services should only be enabled if you intend to make use of it.&lt;br /&gt;
&lt;br /&gt;
== Enabling protocols ==&lt;br /&gt;
[[Image:Enable_protocol.jpg|thumb|Enabling protocols]]&lt;br /&gt;
Usually external applications that users wish to use dictate which protocols should be enabled. &lt;br /&gt;
&lt;br /&gt;
# Access &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Plugins &amp;gt; Web services &amp;gt; Manage protocols&#039;&#039;&lt;br /&gt;
# Enable the protocols (SOAP, REST, XMLRPC, AMF, ...) as required&lt;br /&gt;
&lt;br /&gt;
== Enabling web service function documentation ==&lt;br /&gt;
[[Image:Security keys and documentation.jpg|thumb|Security keys page with documentation link]]&lt;br /&gt;
Enabling web service function documentation (also on the Manage protocols page) results in user-specific web service documentation being available for each user on their [[Security keys]] page. This option is mainly useful to web service client developers. If nobody is creating a web service client, there is no need to enable this feature.&lt;br /&gt;
&lt;br /&gt;
== Creating a service ==&lt;br /&gt;
If none of the pre-build web services match your needs, you can create a custom service i.e. select which of the standard web service functions are available via that service.&lt;br /&gt;
&lt;br /&gt;
You can enable only the specific functions that you need to expose, so not compromising on security.&lt;br /&gt;
[[Image:Create a service.jpg|thumb|Creating a service|left]]&lt;br /&gt;
# Access &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Plugins &amp;gt; Web services &amp;gt; External services&#039;&#039;&lt;br /&gt;
# Click Add new custom service&lt;br /&gt;
#* &#039;Authorised users only&#039; - If enabled, you will need to select the authorised users manually. Otherwise all users with appropriate permissions are allowed&lt;br /&gt;
#* &#039;Required capability&#039; - If enabled, any user accessing the web service will be checked against this selected capability. (This is just an additional optional security layer.)&lt;br /&gt;
# Enter a name and check Enabled&lt;br /&gt;
# Click the button &#039;Add service&#039;&lt;br /&gt;
&lt;br /&gt;
==Adding functions to the service==&lt;br /&gt;
[[Image:Select a web service function.jpg|thumb|Adding functions to the service]]Your service is currently empty and doesn&#039;t do anything. Web service functions need to be added. Your choice will be dictated by what you allow the external application to do. For this example, select &#039;Create group&#039;.&lt;br /&gt;
&lt;br /&gt;
# Click &#039;Add functions&#039; link&lt;br /&gt;
# Select &#039;create group&#039; function and click the &#039;Add functions&#039; button&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note that deprecated functions can not be added to services although the ones that are already part of a service can remain there until they are removed from Moodle codebase.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You should be back to the service functions list. &#039;Required capabilities&#039; are indicated for each function. Users need the required capabilities to run a function. The function descriptions in the API Documentation can also give you more information about the required capabilities (&#039;&#039;Administration &amp;gt; Site administration &amp;gt; Plugins &amp;gt; Web services &amp;gt; API Documentation&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
==Enabling capabilities==&lt;br /&gt;
&lt;br /&gt;
The final step is to grant appropriate permissions. The following capabilities should be allowed:&lt;br /&gt;
&lt;br /&gt;
* [[Capabilities/moodle/webservice:createtoken|moodle/webservice:createtoken]] - for allowing users to generate a security key&lt;br /&gt;
* [[Capabilities/webservice/rest:use | webservice/rest:use]], [[Capabilities/webservice/soap:use | webservice/soap:use]], [[Capabilities/webservice/xmlrpc:use | webservice/xmlrpc:use]], [[Capabilities/webservice/amf:use | webservice/amf:use]] which match the enabled protocols.&lt;br /&gt;
* The service &#039;&#039;Required capability&#039;&#039; if set (&#039;&#039;Administration &amp;gt; Site administration &amp;gt; Plugins &amp;gt; Web services &amp;gt; Manage services &amp;gt;&#039;&#039;&#039;Edit&#039;&#039;&#039; link&#039;&#039;).&lt;br /&gt;
* The required capabilities for the web service functions. These required capabilities are listed when you add a function to the service. For more information about roles and capabilities, read the [[Manage roles]] documentation.&lt;br /&gt;
&lt;br /&gt;
Once done, the web service should be set up. Users should be able to [[Security keys|obtain a personal security key]].&lt;br /&gt;
&lt;br /&gt;
= Alternative settings = &lt;br /&gt;
&lt;br /&gt;
== Authorise only specific users==&lt;br /&gt;
[[Image:Authorised users link.jpg|thumb]] [[Image:Authorised user selection page.jpg|thumb]]&lt;br /&gt;
# &#039;&#039;Administration &amp;gt; Site Administration &amp;gt; Plugins &amp;gt; Web services &amp;gt; External Services&#039;&#039;&lt;br /&gt;
# Select &#039;&#039;&#039;Authorised users&#039;&#039;&#039; link (the service must have been set as &#039;&#039;&#039;Authorised users only&#039;&#039;&#039; in the &#039;&#039;&#039;Edit&#039;&#039;&#039; link)&lt;br /&gt;
# Select some users and click &#039;&#039;&#039;Add&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Moodle indicates if some capabilities need to be assigned to an authorised user. Moreover if you click on the authorised user fullname, you can set up some specific options: &#039;&#039;IP restriction&#039;&#039; and &#039;&#039;Valid until&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Create a token  ==&lt;br /&gt;
[[Image:Create_token.jpg|thumb]]&lt;br /&gt;
This feature allows you to create a token for specific user. It can be useful if a user doesn&#039;t have the moodle/create:token capability. This is also the only way to create a token for an administrator. For security reason, tokens are not automatically generated in the administrator security  keys page.&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;Administration &amp;gt; Site Administration &amp;gt; Plugins &amp;gt; Web services &amp;gt; Manage tokens&#039;&#039;&lt;br /&gt;
# Click on &#039;&#039;&#039;Add&#039;&#039;&#039;&lt;br /&gt;
# Select the created user and service&lt;br /&gt;
# Click on &#039;&#039;&#039;Saves changes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As you created a token for this user, you do not need to assign &amp;quot;&#039;&#039;moodle/webservice:createtoken&#039;&#039;&amp;quot; to him/her.&lt;br /&gt;
Finally, note that, as for authorised users, you can also set &#039;&#039;IP restriction&#039;&#039; and &#039;&#039;Valid until&#039;&#039; on a token.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
 		&lt;br /&gt;
*[http://www.joomdle.com/wiki/Preparing_Moodle_20#Setting_up_Moodle_Web_services Joomdle documentation about setting Moodle web services]&lt;/div&gt;</summary>
		<author><name>Harrysmith</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/404/en/index.php?title=Competencies&amp;diff=125479</id>
		<title>Competencies</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/404/en/index.php?title=Competencies&amp;diff=125479"/>
		<updated>2016-10-03T04:03:07Z</updated>

		<summary type="html">&lt;p&gt;Harrysmith: /* How is it set up? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Tracking progress}}&lt;br /&gt;
{{New features}}&lt;br /&gt;
== What are competencies?==&lt;br /&gt;
&lt;br /&gt;
Competencies  describe the level of understanding or proficiency of a learner in certain subject-related skills. Competency-based education (CBE), also known as Competency-based learning or Skills-based learning, refers to systems of assessment and grading where students demonstrate these competencies.  In Moodle 3.1 it is possible to create and apply frameworks for evaluating students against competencies in Moodle.&lt;br /&gt;
*Video: [https://www.youtube.com/watch?v=6zzVgFcQToU| CBE for admins]&lt;br /&gt;
*Video: [https://www.youtube.com/watch?v=mxBaPnP0j1g| CBE for teachers]&lt;br /&gt;
*Video: [https://www.youtube.com/watch?v=QF7Bb3mN9tA| CBE for students]&lt;br /&gt;
&lt;br /&gt;
==How is it set up?==&lt;br /&gt;
&lt;br /&gt;
*Competencies may be enabled by an administrator in &#039;&#039;Site administration &amp;gt; Competencies&#039;&#039;.&lt;br /&gt;
*Administrators can then set up competency frameworks and add competencies to them. See [[Competency frameworks]] for more information.&lt;br /&gt;
*They can then create learning plan templates, add competencies to them and assign learning plans to individual selected students or to whole cohorts. See [[Learning plans]] for more information.&lt;br /&gt;
*Teachers can add competencies to courses and course activities. They can view a [[Competency breakdown report |competency breakdown report]] from the Administration block and rate competencies.&lt;br /&gt;
*Staff with the relevant capabilities can review student learning plans and view any evidence of prior learning students submit. For more details see [[Competencies FAQ]].&lt;br /&gt;
*Students can view their learning plans, upload evidence of prior learning and request reviews. For more details see [[Competencies FAQ]].&lt;br /&gt;
*For those with the relevant capabilities, a new [[Learning plans block]] is available to be added to the dashboard (for example).&lt;br /&gt;
&lt;br /&gt;
== Course competencies ==&lt;br /&gt;
&lt;br /&gt;
*A course teacher can list which of the competencies they will be teaching in their course from &#039;&#039;Course administration &amp;gt; Course competencies.&#039;&#039;  A teacher can add or remove competencies from a course here, and see which competencies have been linked to which activities. Clicking on the competency name will take the teacher to a grading page for that competency. &lt;br /&gt;
*A student can also see (but not change) the competencies linked to a course from &#039;&#039;Course administration &amp;gt; Course competencies&#039;&#039; and will also see their current rating for each competency.&lt;br /&gt;
&lt;br /&gt;
===Manually rating course competencies===&lt;br /&gt;
&lt;br /&gt;
A course teacher can rate the students against each of the course competencies from &#039;&#039;Course administration &amp;gt; Reports &amp;gt; Competency breakdown.&#039;&#039; Select a student from the menu &#039;&#039;(1)&#039;&#039; and then click on the desired competency &#039;&#039;(2)&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
[[File:compbreakdownreport2.png|thumb|600px|center]]&lt;br /&gt;
&lt;br /&gt;
The page for that student will display and you can then change their rating from the dropdown &#039;&#039;(3)&#039;&#039;:&lt;br /&gt;
[[File:cbrating.png|thumb|centre|600px]]&lt;br /&gt;
&lt;br /&gt;
For more information, see [[Competencies FAQ]].&lt;br /&gt;
&lt;br /&gt;
== Activity competencies ==&lt;br /&gt;
&lt;br /&gt;
Competencies can be linked to activities. This means you can make sure that you have activities or resources for every competency in the course, by looking at the course competencies page and finding un-mapped competencies.&lt;br /&gt;
&lt;br /&gt;
It is possible to map more than one competency to an activity,  by selecting more than once from the competency drop down when setting up the activity.&lt;br /&gt;
&lt;br /&gt;
It is possible to use activity completion to automatically complete - or add evidence to course competencies.&lt;br /&gt;
&lt;br /&gt;
To add a competency to an activity&lt;br /&gt;
&lt;br /&gt;
# Edit the settings for the activity&lt;br /&gt;
# In the competencies section, select one or more competencies from the list of course competencies&lt;br /&gt;
# If desired, set what to do upon activity completion - attach evidence, send for review or complete the competency&lt;br /&gt;
&lt;br /&gt;
[[File:activity competencies.png|frame|center|Adding competencies to an activity]]&lt;br /&gt;
&lt;br /&gt;
The activity will then be shown under the competency on the course competencies page&lt;br /&gt;
&lt;br /&gt;
[[File:course competencies.png|frame|center|Course competency with linked activity]]&lt;br /&gt;
&lt;br /&gt;
====Example of Activity completion with Activity competencies====&lt;br /&gt;
A student must demonstrate a skill four times before they achieve a competency:&lt;br /&gt;
&lt;br /&gt;
*Create four activities (such as four assignments) with activity completion set to receiving a grade.&lt;br /&gt;
* Set a pass grade from the assignment setting screen.&lt;br /&gt;
*For assignments 2, 3 and 4, restrict access until the previous assignments have been completed.&lt;br /&gt;
*In the assignment settings for the final assignment, expand &#039;Course competencies&#039;, select the required competency and set &#039;Upon activity completion&#039; to &#039;Complete the competency&#039;.&lt;br /&gt;
* The student submits work as normal. The teacher grades work as normal. If all four assignments obtain a pass grade, the competency is automatically achieved.&lt;br /&gt;
[[File:studentviewcomp.png|frame|center|Student view of competency achieved.]]&lt;br /&gt;
&lt;br /&gt;
==Backing up and restoring competencies==&lt;br /&gt;
Courses with competencies may be backed up to include the competencies. &#039;&#039;However, these will only be restored to a new site if the competencies already exist  with the same ID numbers on the new site.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Statistics ==&lt;br /&gt;
&lt;br /&gt;
Statistics are built into the various pages. &lt;br /&gt;
&lt;br /&gt;
Student - view competencies in a course:&lt;br /&gt;
&lt;br /&gt;
[[File:course-student.png|thumb|600px|center|Course competency progress for a student]]&lt;br /&gt;
&lt;br /&gt;
Student - view their own learning plan:&lt;br /&gt;
[[File:plan-student.png|thumb|600px|center|Learning plans progress for a student]]&lt;br /&gt;
&lt;br /&gt;
Teacher - view competencies in a course:&lt;br /&gt;
[[File:course-teacher.png|thumb|600px|center|Course competency statistics for a teacher]]&lt;br /&gt;
&lt;br /&gt;
Manager - view progress for all plans in a template:&lt;br /&gt;
[[File:template-manager.png|thumb|600px|center|Learning Plan Template statistics for a manager]]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [[Competencies FAQ]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Competencies]]&lt;br /&gt;
&lt;br /&gt;
[[es:Competencias]]&lt;br /&gt;
&lt;br /&gt;
[[fr:Compétences]]&lt;br /&gt;
[[de:Kompetenzen]]&lt;/div&gt;</summary>
		<author><name>Harrysmith</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/404/en/index.php?title=Transitioning_to_HTTPS&amp;diff=125160</id>
		<title>Transitioning to HTTPS</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/404/en/index.php?title=Transitioning_to_HTTPS&amp;diff=125160"/>
		<updated>2016-09-01T09:17:32Z</updated>

		<summary type="html">&lt;p&gt;Harrysmith: /* Setting up an SSL certificate */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Security}}&lt;br /&gt;
There are numerous benefits to running your moodle site using HTTPS. This increases the level of security especially involving sessions and passwords.&lt;br /&gt;
&lt;br /&gt;
== Steps ==&lt;br /&gt;
=== Before you start ===&lt;br /&gt;
Check all the content you use supports https. You will not be able to embed HTTP content over HTTPS. If some content is only available over HTTP, you can convert it from a direct embedding to a link.&lt;br /&gt;
&lt;br /&gt;
Make sure you have a staging environment. You will want to set up HTTPS the first time on a staging environment rather than updating your live site. It will take some time to convert to https and you will need to update content (see below).&lt;br /&gt;
&lt;br /&gt;
=== Setting up an SSL certificate ===&lt;br /&gt;
The first thing you will need to do is acquire an SSL certificate. You can create these yourself, but this is only helpful for development purposes. Instead you will want to get your SSL certificate from a certificate authority, so that the certificate will be publicly verified.&lt;br /&gt;
&lt;br /&gt;
The cost of certificates has been somewhat prohibitive, they come at various costs from a few dollars to hundreds of dollars per year. For the budget constrained, the &amp;quot;price is right&amp;quot; with a new initiative brought to us by the Internet Security Research Group (ISRG). Free domain-validated certificates can be acquired from [https://letsencrypt.org Let&#039;s Encrypt]. Let&#039;s Encrypt also tries to make the process of installing and managing certificates as painless as possible and there are numerous methods and clients available.&lt;br /&gt;
&lt;br /&gt;
=== Setting up your server ===&lt;br /&gt;
Then you will need enable SSL on your web server to add your certificate. This process will vary depending on your web server of choice.&lt;br /&gt;
&lt;br /&gt;
If you are using a proxy or load balancer, depending on your setup you will most likely want to set up the SSL certificate on your proxy server&lt;br /&gt;
&lt;br /&gt;
=== Setting up your moodle ===&lt;br /&gt;
&lt;br /&gt;
On a basic moodle site, it will be simple to set up https. Simply edit config.php and change http:// to https:// in $CFG-&amp;gt;wwwroot.&lt;br /&gt;
&lt;br /&gt;
However if you are using a proxy or load balancer, depending on your setup you may need to set $CFG-&amp;gt;sslproxy to 1, and not use SSL on the moodle server. Then the load balancer or proxy server can communicate directly to your moodle site, but serve to the clients over SSL.&lt;br /&gt;
&lt;br /&gt;
=== Updating content ===&lt;br /&gt;
You will need to change all embeded content from being requested over http. Links do not matter. But you will need to update images and iframes, scorm modules, and LTI external tools. You can modify external tools to open in a new window instead of in an iframe and they will work fine.&lt;br /&gt;
&lt;br /&gt;
There is plans to work on a new tool to aid in this process. See MDL-46269 on the tracker.&lt;/div&gt;</summary>
		<author><name>Harrysmith</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/404/en/index.php?title=Transitioning_to_HTTPS&amp;diff=125159</id>
		<title>Transitioning to HTTPS</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/404/en/index.php?title=Transitioning_to_HTTPS&amp;diff=125159"/>
		<updated>2016-09-01T09:14:41Z</updated>

		<summary type="html">&lt;p&gt;Harrysmith: /* Setting up an SSL certificate */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Security}}&lt;br /&gt;
There are numerous benefits to running your moodle site using HTTPS. This increases the level of security especially involving sessions and passwords.&lt;br /&gt;
&lt;br /&gt;
== Steps ==&lt;br /&gt;
=== Before you start ===&lt;br /&gt;
Check all the content you use supports https. You will not be able to embed HTTP content over HTTPS. If some content is only available over HTTP, you can convert it from a direct embedding to a link.&lt;br /&gt;
&lt;br /&gt;
Make sure you have a staging environment. You will want to set up HTTPS the first time on a staging environment rather than updating your live site. It will take some time to convert to https and you will need to update content (see below).&lt;br /&gt;
&lt;br /&gt;
=== Setting up an SSL certificate ===&lt;br /&gt;
The first thing you will need to do is acquire an SSL certificate. You can create these yourself, but this is only helpful for development purposes. Instead you will want to get your SSL certificate from a certificate authority, so that the certificate will be publicly verified.&lt;br /&gt;
&lt;br /&gt;
The cost of certificates has been somewhat prohibitive, they come at various costs from a few dollars to hundreds of dollars per year. For the budget constrained the &amp;quot;price is right&amp;quot; with a new initiative brought to us by the Internet Security Research Group (ISRG). Free domain-validated certificates can be acquired from [https://letsencrypt.org Let&#039;s Encrypt].&lt;br /&gt;
&lt;br /&gt;
=== Setting up your server ===&lt;br /&gt;
Then you will need enable SSL on your web server to add your certificate. This process will vary depending on your web server of choice.&lt;br /&gt;
&lt;br /&gt;
If you are using a proxy or load balancer, depending on your setup you will most likely want to set up the SSL certificate on your proxy server&lt;br /&gt;
&lt;br /&gt;
=== Setting up your moodle ===&lt;br /&gt;
&lt;br /&gt;
On a basic moodle site, it will be simple to set up https. Simply edit config.php and change http:// to https:// in $CFG-&amp;gt;wwwroot.&lt;br /&gt;
&lt;br /&gt;
However if you are using a proxy or load balancer, depending on your setup you may need to set $CFG-&amp;gt;sslproxy to 1, and not use SSL on the moodle server. Then the load balancer or proxy server can communicate directly to your moodle site, but serve to the clients over SSL.&lt;br /&gt;
&lt;br /&gt;
=== Updating content ===&lt;br /&gt;
You will need to change all embeded content from being requested over http. Links do not matter. But you will need to update images and iframes, scorm modules, and LTI external tools. You can modify external tools to open in a new window instead of in an iframe and they will work fine.&lt;br /&gt;
&lt;br /&gt;
There is plans to work on a new tool to aid in this process. See MDL-46269 on the tracker.&lt;/div&gt;</summary>
		<author><name>Harrysmith</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/404/en/index.php?title=filter_generico&amp;diff=124616</id>
		<title>filter generico</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/404/en/index.php?title=filter_generico&amp;diff=124616"/>
		<updated>2016-08-03T01:20:50Z</updated>

		<summary type="html">&lt;p&gt;Harrysmith: /* VideoEasy */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox plugin&lt;br /&gt;
|type =filter&lt;br /&gt;
|entry = https://moodle.org/plugins/filter_generico&lt;br /&gt;
|tracker = https://github.com/justinhunt/moodle-filter_generico/issues&lt;br /&gt;
|discussion = https://moodle.org/mod/forum/discuss.php?d=261896&lt;br /&gt;
|maintainer = [[User:Justin Hunt]]&lt;br /&gt;
|float = right&lt;br /&gt;
}}&lt;br /&gt;
Using Generico (and Video Easy)&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
In technical terms Generico and Video Easy are filters for Moodle. But that doesn&#039;t go very far towards describing how they can help you.  In user speak, they allow an administrator to define reusable snippets of html/css and javascript that can be popped into Moodle html areas. These snippets are called templates. Simple templates can be used to display a welcome message with the current logged in user&#039;s name, an attractive green button that returns users to the main course page, a video player or an FAQ style accordian. More advanced templates have been used to make QR codes, text to speech widgets and image slideshows. &lt;br /&gt;
&lt;br /&gt;
Whats so good about this? Well it gives you considerable ability to customize your Moodle site without having to resort to multiple plugins, or custom PHP coding.  It also allows you to centralise and reuse common bits of html, such as disclaimers and copyright notices. Finally it provides a way to allow your users to perform tasks such as the embedding of iframe content from a specific site, without needing to give them permission to embed iframes generally.&lt;br /&gt;
&lt;br /&gt;
Writing templates requires as much skill as the complexity of the template. But using templates that have already been made requires no particular skill at all. Both Generico and VideoEasy come with a collection of pre-made templates to help you get started.&lt;br /&gt;
&lt;br /&gt;
== Whats the difference between Generico and VideoEasy? ==&lt;br /&gt;
They are very similar and from a template makers point of view are almost the same thing. Where they differ mainly is how and when Moodle chooses to apply a template to an HTML page, and how variables are passed to the template.&lt;br /&gt;
&lt;br /&gt;
=== VideoEasy ===&lt;br /&gt;
VideoEasy works by looking for html links on the page. If the html link matches a file extension VideoEasy is registered for, it will replace the link with the processed template.&lt;br /&gt;
&lt;br /&gt;
So a link to a video file with an .mp4 extension, could be replaced by an mp4 video player. Despite its name, VideoEasy is not limited to video at all. it is possible to register other file extensions too. For example it is possible to register the .pdf extension and replace .pdf links with a pdf viewer.&lt;br /&gt;
&lt;br /&gt;
File extensions that VideoEasy should handle are registered at: &lt;br /&gt;
Site Administration -&amp;gt; Plugins -&amp;gt; Filters -&amp;gt; Video Easy -&amp;gt; General Settings&lt;br /&gt;
&lt;br /&gt;
The actual template that should be used for a file extension is registered on the same page. This can be overridden at the course or activity level via the “settings” button on the “filter” page accessed from the activity instance’s settings menu. This allows different courses or activities to use different video players if necessary.&lt;br /&gt;
&lt;br /&gt;
Variables can be passed to the template by appending parameters to the html link URL. So in the url http://mysite.com?favoritefruit=apple, the variable &#039;favoritefruit&#039; will be populated with the value &#039;apple&#039; and made available to the template as @@favoritefruit@@.&lt;br /&gt;
&lt;br /&gt;
== Generico ==&lt;br /&gt;
Generico works a little differently to VideoEasy. Rather than act on links in the text area, it acts on specially formatted text blocks that look like this:&lt;br /&gt;
{GENERICO:type=&amp;quot;greenbutton&amp;quot;,text=&amp;quot;Go Back&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
When it finds one of these, it replaces it with the processed template. A template author might be able to make these crafty little text blocks by hand, but it is not realistic for average users. So a special plugin is available for the Atto text editor which can prepare the Generico filter strings for the user. &lt;br /&gt;
&lt;br /&gt;
=== Using a Generico template ===&lt;br /&gt;
There are two ways you might add a Generico template to a page. &lt;br /&gt;
 i) Manually enter a Generico filter string on a page&lt;br /&gt;
 ii) Selecting a Generico template from the Generico popup dialog on the Atto text editor.&lt;br /&gt;
&lt;br /&gt;
In most cases you will use the latter, because it is simple and less prone to human error. Lets look at the example of a Generico template to display a pretty button with custom caption and link. In such a case the Generico filter if added by hand would look like this:&lt;br /&gt;
{GENERICO:type=prettybutton,caption=&amp;quot;Go to Google&amp;quot;,link=&amp;quot;http://google.com&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
If however you used the Atto popup dialog, it would look like this:&lt;br /&gt;
&lt;br /&gt;
But even after you have used the Atto Generico plugin to insert your Generico string on the page, it is still just a Generico string. It doesn&#039;t look anything like a button. This is because Generico processes the filter string only after the html area content is saved, and the page containing it is displayed.&lt;br /&gt;
&lt;br /&gt;
The reason we call Generico templates … “templates” is that they are combined with some data to produce the final html snippet that is displayed on the page. In the case of the pretty button, this data was the caption and the url. When the template is created, placeholders called variables are inserted into it. Then when you add the template to a page you pass in the data, e.g. caption and url, and they will be merged with the template to create the html snippet. The Generico Atto text editor plugin will generate a simple form with a field (i.e. text area or dropdown list) for each variable to make it easier for the user.&lt;br /&gt;
&lt;br /&gt;
=== Examining a simple Generico Template ===&lt;br /&gt;
So lets make a simple Generico template. Templates are defined in the site administration area. Each template will have an entry under:&lt;br /&gt;
site administration-&amp;gt;plugins-&amp;gt;filters-&amp;gt;generico&lt;br /&gt;
&lt;br /&gt;
By default there are 20 blank templates when Generico is installed, but it is possible to add more. Blank Generico templates do nothing, you have to fill them in before anything will happen. But its easy enough to make a new template that does something, because there are preset templates that can be used. Lets use the simplest one of all the “hello world” template. To do this:&lt;br /&gt;
i) open a blank template &lt;br /&gt;
ii) from the first control on the template settings page, choose “hello world” from the dropdown list of template presets.&lt;br /&gt;
iii) Scroll to the bottom and save the template.&lt;br /&gt;
Thats it, the template is created. Type the filter string “{GENERICO:type=helloworld}” into an html area (try a forum post or a page resource), Or choose/insert the filter string from the Generico atto editor plugin. When the page is displayed there should be a message saying “hello world [yourname].”&lt;br /&gt;
&lt;br /&gt;
So what actually happened there? Well it goes like this….&lt;br /&gt;
 a) Moodle is sending the page to the browser&lt;br /&gt;
 b) It looks through the page for any Generico filter strings, and when it finds one:&lt;br /&gt;
  i) it removes the filter string from the output&lt;br /&gt;
  ii) it processes the filter string and replaces it with the processed output.&lt;br /&gt;
 c) it sends the output to the page&lt;br /&gt;
&lt;br /&gt;
The processing involves looking for variable placeholders in the template, and matching those with data in the filter string. When they match, variable placeholders in the template are swapped out for the filter string data. Then the processed template is returned to to the browser. This behaviour is explained in more detail later. &lt;br /&gt;
&lt;br /&gt;
=== Importing and Exporting Templates ===&lt;br /&gt;
To allow you to share templates that you or others have created, it is possible to import and export them. On the top right of a template’s settings page, there is a green box titled “Bundle.” Clicking on the box will export the template to a text file of the same name as the template key. So for template “helloworld,” a hello world.txt file will be exported and the download begin immediately. To import such a file, you drag the text file onto the green bundle box. The border will turn blue. When the file is dragged and dropped there, the currently loaded template will be overwritten or filled in, with the imported content. The changes are not permanent however until the template is saved. So you will need to scroll to the bottom of the page and press the save button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The Template Fields ===&lt;br /&gt;
The settings page for each template has X fields for Video Easy and 14 for Generico. The order and naming are a little different also. We can think of each field as being  in one of 4 categories: General, HTML, Javascript and CSS. In the case of the hello world template there is no javascript or CSS. We just return some html. But we could add some CSS styles or even a javascript click event to the text if we wanted to. Lets look at each field in turn                                                                                                                                                                                                                                                                    &lt;br /&gt;
&lt;br /&gt;
 a) The Template Key&lt;br /&gt;
 b) The Template Name&lt;br /&gt;
 c) The Template Instructions &lt;br /&gt;
 d) The Template Body&lt;br /&gt;
 e) The Template Body End&lt;br /&gt;
 f) The Template AMD flag&lt;br /&gt;
 g) The Template JQuery flag&lt;br /&gt;
 h) The Template Require JS &lt;br /&gt;
 i) The Template Script &lt;br /&gt;
 j) The Template Upload JS&lt;br /&gt;
 k) The Template Require CSS&lt;br /&gt;
 l) The Template CSS&lt;br /&gt;
 m) The Template Upload CSS&lt;br /&gt;
 n) The Template Dataset&lt;br /&gt;
 o) The Template Dataset Datavars&lt;br /&gt;
     &lt;br /&gt;
==== The Template Key ====&lt;br /&gt;
The template key is a unique identifier that is used in internal processing and is the most important part of a Generico filter string. The key should not contain any spaces or non alphanumeric characters(underscores are ok). The key is the “type” part of the Generico filter string. e.g in the prettybutton example we used earlier, the template key would be “pretty button.”&lt;br /&gt;
{GENERICO:type=prettybutton,caption=&amp;quot;Go to Google&amp;quot;,link=&amp;quot;http://google.com&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
All other parts of the template you can change and the behaviour will change accordingly when the template is processed. But if the key is changed, all the filter strings that are live on the site for that template will no longer be processed. That is because the “type” will not be matched with any template’s key.&lt;br /&gt;
&lt;br /&gt;
==== The Template Name ====&lt;br /&gt;
The template name is simply what is displayed around the site when referring to the template. i.e. on the settings pages and in the Atto text editor. Unlike the “key” you can include spaces and non alpha numeric characters here.&lt;br /&gt;
&lt;br /&gt;
==== The Template Instructions ====&lt;br /&gt;
The template instructions will be displayed on the Atto text editor Generico insert form for the template. There is not much space there, so short instructions are best.&lt;br /&gt;
&lt;br /&gt;
==== The Template Body ====&lt;br /&gt;
The template body is where you put any html that should be put on the page in place of the Generico filter string that is being processed. In the case of the “helloworld” example the template body looks like this:&lt;br /&gt;
Hello World @@USER:firstname@@&lt;br /&gt;
&lt;br /&gt;
Note the use of a variable, in this case a preset variable that will return the current user’s first name. But the important thing here is that the actual replacement of the generic filter string takes place here. Whatever is in the body section will replace the string, albeit with any variables replaced by their actual value.&lt;br /&gt;
&lt;br /&gt;
==== The Template Ends Section ====&lt;br /&gt;
This is only present for Generico. This will be processed in place of the “Template Body” section if the filter string’s type attribute is of the format ’type=[key]_end’ e.g {GENERICO:type=helloworld_end}. This is designed for use in the case where a template requires opening and closing tags. Lets take an example of a lightbox template that shows an image in a lightbox when a button was pressed. Two generico filter strings would be placed on the page, one for the opening tags, and another for the closing tags. So it might look like this:&lt;br /&gt;
{GENERICO:type=lightbox}&lt;br /&gt;
{GENERICO:type=lightbox_end}&lt;br /&gt;
&lt;br /&gt;
The user could then insert an image between them using the standard Moodle “insert image” icon on the editor.  The Generico Atto plugin is aware of the Template end field, and if it is not blank will automatically insert the end filter string  on the page along with the main filter string.&lt;br /&gt;
&lt;br /&gt;
==== The Template AMD flag ====&lt;br /&gt;
AMD is a javascript loading system that was put in place in Moodle in version 2.9. AMD loads any javascript dependencies for your template safely, and prevents naming and version conflicts with the dependencies of other templates and javascript on the same page. If your template does not involve javascript or its older than Moodle 2.9, then you won’t need to worry about this. If you do use javascript in the “template script” area (described later) then setting AMD to “yes” will make jQuery available to your script. If you load 3rd party libraries in the “template require JS” or “template upload JS” area you might have to choose whatever the 3rd party library recommends. A library that supports AMD will generally fail if you do not select “yes.” A library which does not support AMD will usually fail if you select “yes.”&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== The Template JQuery flag ====&lt;br /&gt;
When a third party library you load, or your own script, relies on JQuery you can force it to be loaded by setting this to “yes.” But you really should never do this. If you can find another way, then that would be better. (Warning: techy explanation follows) The reason for this, is that jQuery has versions and plugins. If another template or something else on the page has loaded a jQuery plugin, or requires a different version of jQuery, when you force load jQuery you will overwrite any jQuery (and plugins) that something else has already loaded. That something else will then fail. These conflicts can be hard to track down and are the very thing that the AMD system was designed to avoid. If you really need jQuery, and you can’t use AMD, try to use a theme that loads jQuery. Most of the nice themes like Essential do. Failing that, in the additional HTML area of moodle in the “HEAD” section, add your jQuery call. (Note that even loading jQuery using the additional HTML section of Moodle, you risk causing problems with other plugins that require jQuery.) &lt;br /&gt;
&lt;br /&gt;
Devs here might wonder why Generico and VideoEasy don’t just use load jQuery using the $PAGE requirements manager in PHP. The problem is that the filter is often called after the page header has already been sent out to the browser. Trying to require jQuery via the $PAGE requirements manager at that point will cause an error.  &lt;br /&gt;
&lt;br /&gt;
==== The Template Require JS ====&lt;br /&gt;
If your template requires a 3rd party library, such as a library for making light boxes, then you can place the url for the library here. This is useful when the library makes itself available via a CDN (content distribution network). Because there is not requirement to supply the library itself with the template, just the URL, many presets and Generico/VideoEasy bundles load 3rd party libraries in this way. &lt;br /&gt;
&lt;br /&gt;
When specifying the library’s URL, start with // (i.e. not https: or http:).&lt;br /&gt;
&lt;br /&gt;
==== The Template Script ====&lt;br /&gt;
The template script if specified will be called once for each of your template’s filter strings on the page. It is common to use this to set up any event handlers or any DOM manipulation you need to do to init your template. For example if you are placing a button on the page that will open an image in a lightbox, you would add the html for the button in the “template body” and attach the event handler for the click event here. In this case you will generally need to give the button a class or an id attribute, and then select the element for that class or id in the script area. This is because the script is executed only after all the html has loaded on the page. To make it easy to use the same id or class in the “template script” and “template body” areas a special variable AUTOID is made available. This will provide a random and hopefully unique string that can be used as an element’s id or class, and that will be the same throughout the processing of a particular filter string.&lt;br /&gt;
&lt;br /&gt;
Now at this point we really need to talk about variables. In your template you can use variables of your own definition, or you can use preset variables. AUTOID and USER:firstname are two examples of preset variables. Generico/VideoEasy will ensure they contain the correct data. You can declare your own custom variables too. Anything surrounded by double @@ marks will be treated as a variable. So in your template @@AUTOID@@ and @@FAVORITECOLOR@@ would be recognised as variables. If its a custom variable Generico will get the value from the filter string. VideoEasy will get custom variables’ values from the URL parameters. It is also possible to set default values for Generico/VideoEasy so that if not specified the default value will be used. &lt;br /&gt;
&lt;br /&gt;
There is an important thing to note about using variables. Variables can be used in the “template body” and “template script” areas. But the processing is a little different. In the template body the variable @@FAVORITECOLOR@@ might be replaced by ‘pink.’ But in the template script it will be replaced by ‘opts[‘FAVORITECOLOR’].’&lt;br /&gt;
&lt;br /&gt;
So in the “template body” you can place variables any way you choose and they will be swapped straight out for the value. But in “template script” you have to be careful NOT to write something like this:&lt;br /&gt;
var elem = $(‘#@@AUTOID@@’);&lt;br /&gt;
&lt;br /&gt;
this will fail because post processing it will look like this:&lt;br /&gt;
var elem = $(‘#opts[‘AUTOID’]’);&lt;br /&gt;
&lt;br /&gt;
Instead you should write this:&lt;br /&gt;
var elem = $(‘#’ + @@AUTOID@@);&lt;br /&gt;
&lt;br /&gt;
This will work and will lead to something like this:&lt;br /&gt;
var elem = $(‘#’ + opts[‘AUTOID’]);&lt;br /&gt;
&lt;br /&gt;
You might be wondering why we have to do it this way for the script. The reason is that the script file will be cached be Moodle. By using the opts variable in place of the literal value of the variable, caching will work nicely and the user will never be served up old content (or someone else’s content).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== The Template Upload JS ====&lt;br /&gt;
The upload js area allows the administrator to upload a javascript file that will be loaded in the same way that the “template require js” file is loaded. It can be used in addition to the template require js file and is useful when you need more than one 3rd party library file, or when you want the javascript file loaded from the Moodle server and not from a CDN or other internet source. &lt;br /&gt;
&lt;br /&gt;
==== The Template Require CSS ====&lt;br /&gt;
If your template requires a 3rd party CSS file,  then you can place the url for the library here. When specifying the library’s URL, start with // (i.e. not https: or http:).&lt;br /&gt;
&lt;br /&gt;
==== The Template CSS ====&lt;br /&gt;
Specify any custom CSS for your template here. Unfortunately you cannot use template variables in the custom css area. The custom CSS is loaded quite late and the late application of styles is noticeable by the user. If this is a concern, save your custom css declarations to a file and upload them into the “template upload CSS” area.&lt;br /&gt;
&lt;br /&gt;
==== The Template Upload CSS ====&lt;br /&gt;
Similar to the “Template upload js” area, the “Template upload css” area allows the template author to upload a 3rd party CSS file. This is useful when the file should be accessed from the local server, or when the CSS styles should be applied earlier than those specified in “custom css” are.&lt;br /&gt;
&lt;br /&gt;
==== The Template Dataset ====&lt;br /&gt;
It is also possible to set a custom SQL script which will be executed server side and the resulting data returned to your template. The SQL script will be called using Moodle’s $DB-&amp;gt;get_records_sql() function. See: https://docs.moodle.org/dev/Data_manipulation_API#moodle_database::get_records_sql.28.29&lt;br /&gt;
&lt;br /&gt;
If there is only a single record returned, the record will be available for use in the body area of the template using the following syntax @@DATASET:[fieldname]@@. &lt;br /&gt;
e.g&lt;br /&gt;
template dataset: “SELECT * FROM {user} WHERE id = 37;”&lt;br /&gt;
template body: User 37’s first name is &amp;lt;b&amp;gt;@@DATASET:firstname@@&amp;lt;/b&amp;gt;, don’t forget it.&lt;br /&gt;
&lt;br /&gt;
Whether one record or many are returned, if you specify a dataset then a @@DATASET@@ variable will be available to your template’s custom javascript. This will be an array of objects, each object representing one of the records that were returned. In the process of conversion from a PHP array of objects to an javascript array of objects, the order/index of the objects in the array appears to be modified, and so cannot be relied upon.&lt;br /&gt;
&lt;br /&gt;
==== The Template Dataset Variables ====&lt;br /&gt;
Template variables do not work in the template dataset. This is because the get_records_sql api has its own template system. The first parameter to the function is the SQL statement. When you place question marks in the SQL statement, i.e. ‘?’ ,  Moodle recognises that as a variable. Variable values are passed in the second parameter to the function. Moodle will swap out each question mark for one of the values passed in the second parameter. Generic uses this system and allows you to specify a comma separated list of variable values in the Template Dataset Variables field. You can specify Generico template variables here, which gives this a lot of power. Lets demonstrate this by rewriting the above example to return the currently logged in user’s information.&lt;br /&gt;
template dataset: “SELECT * FROM {user} WHERE id = ?;”&lt;br /&gt;
template dataset vars: @@USER:id@@&lt;br /&gt;
template body: User @@USER:id@@’s first name is &amp;lt;b&amp;gt;@@DATASET:firstname@@&amp;lt;/b&amp;gt;, don’t forget it.&lt;br /&gt;
&lt;br /&gt;
Actually this is trivial because we already have access to the currently logged in user’s information via the Generico @@USER:xx@@ variable. But it demonstrates how to pull a dataset from the database using Generico template variables. You can use @@USER:xx@@, @@COURSE:xx@@ or any of the preset variables, and in addition can use variables which you have defined yourself.&lt;br /&gt;
&lt;br /&gt;
Note that there are no ajax calls to get the data. When the filter is parsed the data will be fetched, and after that it will not be fetched again.&lt;br /&gt;
&lt;br /&gt;
NB A bug in the current implementation of Generico means that only the first of the set of variables specified in the Dataset variables is actually made available to the plugin.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Filter]]&lt;/div&gt;</summary>
		<author><name>Harrysmith</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/404/en/index.php?title=Git_for_Administrators&amp;diff=121732</id>
		<title>Git for Administrators</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/404/en/index.php?title=Git_for_Administrators&amp;diff=121732"/>
		<updated>2015-12-06T23:38:27Z</updated>

		<summary type="html">&lt;p&gt;Harrysmith: /* Installing a contributed extension from its Git repository */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Installing Moodle}}&lt;br /&gt;
This page describes how to maintain a copy of Moodle on your production server which can easily be upgraded using Git. If you have customisations of Moodle core code, you are advised to follow the instructions in the [[:dev:Git for developers|Git for developers guide]].&lt;br /&gt;
&lt;br /&gt;
To get the most of Git it is worth making the effort to understand its basic concepts - see the section below. It can be a bit of a steep learning curve, especially if you are used to CVS or Subversion. &lt;br /&gt;
&lt;br /&gt;
== Getting hold of Git (Windows, OSX, Linux and others) ==&lt;br /&gt;
&lt;br /&gt;
Support for Git was, up until recently, mostly confined to Linux but builds are now available for most popular operating systems:&lt;br /&gt;
&lt;br /&gt;
* List of downloads from Git site - http://git-scm.com/download&lt;br /&gt;
&lt;br /&gt;
Once you have downloaded and installed your OS relevant git installation, the git commands in this document should work with your operating system.&lt;br /&gt;
&lt;br /&gt;
== Obtaining the code from Git ==&lt;br /&gt;
&lt;br /&gt;
The command line version of Git is discussed here. Graphical clients are little more than wrappers around the command line version, so you should be able to deduce the correct parameters quite easily. &lt;br /&gt;
&lt;br /&gt;
You can find the official Moodle git repository at git://git.moodle.org/moodle.git (with an official clone at git://github.com/moodle/moodle.git). To initialize your local checkout, use&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd /path/to/your/webroot&lt;br /&gt;
$ git clone git://git.moodle.org/moodle.git                       (1)&lt;br /&gt;
$ cd moodle&lt;br /&gt;
$ git branch -a                                                   (2)&lt;br /&gt;
$ git branch --track MOODLE_30_STABLE origin/MOODLE_30_STABLE     (3)&lt;br /&gt;
$ git checkout MOODLE_30_STABLE                                   (4)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* The command (1) initializes the new local repository as a clone of the &#039;upstream&#039; (i.e. the remote server based) moodle.git repository. The upstream repository is called &#039;origin&#039; by default. It creates a new directory named &#039;&#039;moodle&#039;&#039;, where it downloads all the files. This operation can take a while as it is actually getting the entire history of all Moodle versions&lt;br /&gt;
* The command (2) lists all available branches.&lt;br /&gt;
* Use the command (3) to create a new local branch called MOODLE_30_STABLE and set it to track the remote branch MOODLE_30_STABLE from the upstream repository.&lt;br /&gt;
* The command (4) actually switches to the newly created local branch. &lt;br /&gt;
&lt;br /&gt;
Note that Git has a huge number of options for each command and it&#039;s actually possible to do the above process with a single command (left as an exercise!!).&lt;br /&gt;
&lt;br /&gt;
==Git from behind a firewall==&lt;br /&gt;
&lt;br /&gt;
Git uses a read-only protocol that may be blocked by your firewall (port 9418). If this is a problem, you can use Github&#039;s http version &amp;lt;nowiki&amp;gt;https://github.com/moodle/moodle.git&amp;lt;/nowiki&amp;gt;. It&#039;s a bit slower, so use the Git protocol if you can.&lt;br /&gt;
&lt;br /&gt;
== Updating your installation ==&lt;br /&gt;
&lt;br /&gt;
The Moodle development team performs integration and testing of fixed bugs every Monday and Tuesday. On Wednesday you can install all patches by updating your code. Check the [http://git.moodle.org/gw?p=moodle.git;a=summary shortlog] to see if the official repository has been already updated or not.&lt;br /&gt;
&lt;br /&gt;
To update your code to the latest version (on the MOODLE_30_STABLE branch) &#039;&#039;&#039;all&#039;&#039;&#039; you have to do is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd /path/to/your/moodle/&lt;br /&gt;
$ git pull&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If this is a production site you should still consider the [[Upgrade]] instructions (e.g. take backups).&lt;br /&gt;
&lt;br /&gt;
== Installing a contributed extension from its Git repository ==&lt;br /&gt;
&lt;br /&gt;
This is one way to handle adding plugins from other Git repositories into your Moodle repository. Another way is to use Git Submodules. However, at the time of writing, this is one of Git&#039;s rougher features and should be regarded as an advanced option. &lt;br /&gt;
&lt;br /&gt;
For example, let us say we want to install the [[Certificate module]] from its Git repository into our Moodle 3.0.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd /path/to/your/moodle/&lt;br /&gt;
$ cd mod                                                          (1)&lt;br /&gt;
$ git clone https://github.com/markn86/moodle-mod_certificate.git certificate     (2)&lt;br /&gt;
$ cd certificate&lt;br /&gt;
$ git checkout -b MOODLE_30_STABLE origin/MOODLE_30_STABLE        (3)&lt;br /&gt;
$ git branch -d master                                            (4)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The command (1) changes the current directory into the &#039;&#039;mod&#039;&#039; folder of your local Moodle clone. The command (2) creates a new subdirectory &#039;&#039;certificate&#039;&#039; and makes a local clone of vanilla Certificate repository. The command (3) creates a new local branch that will track the remote branch with a Certificate version for Moodle 3.0. The command (4) deletes the &#039;&#039;master&#039;&#039; that was created automatically by git-clone in (2) as we do not want it in this production checkout.&lt;br /&gt;
&lt;br /&gt;
Note: you should check first the compatibility of a module with your Moodle branch by asking directly to the Maintainer before cloning the repo or - if you want to guess it - by issuing the command below before running the command (3), in order to verify what is available among the branches:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git branch -a&lt;br /&gt;
* master&lt;br /&gt;
  remotes/origin/HEAD -&amp;gt; origin/master&lt;br /&gt;
  remotes/origin/MOODLE_20_STABLE&lt;br /&gt;
  remotes/origin/MOODLE_21_STABLE&lt;br /&gt;
  remotes/origin/MOODLE_22_STABLE&lt;br /&gt;
  remotes/origin/MOODLE_23_STABLE&lt;br /&gt;
  remotes/origin/MOODLE_24_STABLE&lt;br /&gt;
  remotes/origin/MOODLE_25_STABLE&lt;br /&gt;
  remotes/origin/MOODLE_26_STABLE&lt;br /&gt;
  remotes/origin/MOODLE_27_STABLE&lt;br /&gt;
  remotes/origin/MOODLE_28_STABLE&lt;br /&gt;
  remotes/origin/MOODLE_29_STABLE&lt;br /&gt;
  remotes/origin/MOODLE_30_STABLE&lt;br /&gt;
  remotes/origin/master&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will avoid an error message when you issue the command (3) against a nonexistent branch, e.g.:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
§ git checkout -b MOODLE_30_STABLE origin/MOODLE_30_STABLE&lt;br /&gt;
fatal: git checkout: updating paths is incompatible with switching branches.&lt;br /&gt;
Did you intend to checkout &#039;origin/MOODLE_30_STABLE&#039; which can not be resolved as commit?&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now it is wise to add the new directory mod/certificate/ to the list of ignored files of the main Moodle clone, otherwise a status of the main clone will keep reminding you that the new code has not been checked in.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd /path/to/your/moodle/&lt;br /&gt;
$ echo /mod/certificate/ &amp;gt;&amp;gt; .git/info/exclude&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To update your Moodle installation now, you must visit both Git repositories and pull changes from upstream.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd /path/to/your/moodle/&lt;br /&gt;
$ git pull&lt;br /&gt;
$ cd mod/certificate&lt;br /&gt;
$ git pull&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Writing a shell script with these lines in the root of Moodle installation is a very good idea. Otherwise it is easy to forget what Git repositories are there within the main Moodle repository.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Windows installation using Git]]&lt;br /&gt;
* [[Git for Mac]]&lt;br /&gt;
* [[:dev:Moodle versions]]&lt;br /&gt;
* For fixing a Tracker Issue (MDL) / Forking Moodle / CONTRIButing code [[:dev:User:Sam_Hemelryk/My_Moodle_Git_workflow|User:Sam_Hemelryk/My_Moodle_Git_workflow]]&lt;br /&gt;
* [[Moodle_Production_Server_with_GIT|Case study Git + Moodle from Technical University Berlin]]&lt;br /&gt;
&lt;br /&gt;
; Moodle forum discussions&lt;br /&gt;
* [https://moodle.org/mod/forum/discuss.php?d=255175 Github and Moodle deployment for production]&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=168094 GIT help needed]&lt;br /&gt;
* [https://moodle.org/mod/forum/discuss.php?d=231046 Clear git guide for Admins (not developers)]&lt;br /&gt;
&lt;br /&gt;
; External resources &lt;br /&gt;
* [http://thamblings.blogspot.com.au/2013/07/upgrading-moodle-from-git.html Deploying Moodle from git - Blog post from a production experience]&lt;br /&gt;
* [http://gitref.org/ Git Reference]&lt;br /&gt;
* [http://progit.org/book/ Pro Git book]&lt;br /&gt;
&lt;br /&gt;
[[ja:管理者用Git]]&lt;br /&gt;
[[fr:Git_pour_administrateurs]]&lt;br /&gt;
[[es:Git para Administradores]]&lt;/div&gt;</summary>
		<author><name>Harrysmith</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/404/en/index.php?title=Debugging&amp;diff=117815</id>
		<title>Debugging</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/404/en/index.php?title=Debugging&amp;diff=117815"/>
		<updated>2015-04-07T16:09:51Z</updated>

		<summary type="html">&lt;p&gt;Harrysmith: /* In config.php */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Developer tools}}&lt;br /&gt;
Debugging messages can be enabled by an administrator in &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Development &amp;gt; Debugging&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Debugging messages are intended to help diagnose problems and/or help Moodle developers. If you have a problem with your Moodle site and ask for help in a Moodle.org forum, a developer may ask you to turn debug messages on, in order to locate the cause of the problem. By default Moodle does not show any error messages at all. If you are having problems (e.g. blank screens or incomplete screens) turning on debugging is usually the first thing to try. &lt;br /&gt;
&lt;br /&gt;
==Debugging settings==&lt;br /&gt;
Here are the settings on the Debugging page:&lt;br /&gt;
&lt;br /&gt;
===Debug messages===&lt;br /&gt;
The default is none, your choices are:&lt;br /&gt;
&lt;br /&gt;
;NONE : Do not show any errors or warnings (Default) &lt;br /&gt;
;ALL : Show all reasonable PHP debug messages&lt;br /&gt;
;MINIMAL : Show only fatal errors&lt;br /&gt;
;NORMAL : Show warnings, errors and notices&lt;br /&gt;
;DEVELOPER : extra Moodle debug messages for developers&lt;br /&gt;
&lt;br /&gt;
There is rarely any advantage in going to Developer level, unless you are a developer, in which case it is strongly recommended.&lt;br /&gt;
&lt;br /&gt;
Once you have got the error message, and copied and pasted it somewhere.  HIGHLY RECOMMENDED to turn Debug back to NONE. Debug messages can give clues to a hacker as to the setup of your site.&lt;br /&gt;
&lt;br /&gt;
===Display debug messages===&lt;br /&gt;
&lt;br /&gt;
There is an option to choose whether to display error messages or simply record them in the server logs.&lt;br /&gt;
&lt;br /&gt;
===Debug email sending===&lt;br /&gt;
&lt;br /&gt;
Determines whether or not to enable verbose debug information during sending of email messages to SMTP server.&lt;br /&gt;
&lt;br /&gt;
===Performance info===&lt;br /&gt;
&lt;br /&gt;
The Performance info option determines whether performance info will be included in the footer of the standard theme (and some other themes). Performance info includes the time for the page to load, the amount of memory used to generate the page, cpu usage, load, and the record cache hit/miss ration.&lt;br /&gt;
&lt;br /&gt;
If you add&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
define(&#039;MDL_PERF&#039;, true);&lt;br /&gt;
define(&#039;MDL_PERFDB&#039;, true);&lt;br /&gt;
define(&#039;MDL_PERFTOLOG&#039;, true);&lt;br /&gt;
define(&#039;MDL_PERFTOFOOT&#039;, true);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
to your config.php file, then it will also count database queries. (This has to be in config.php, because Moodle starts doing DB queries before it loads the config information in the database!&lt;br /&gt;
&lt;br /&gt;
===Show origin of language strings===&lt;br /&gt;
&lt;br /&gt;
Helps with [[:dev:Translation|translation]] and also with [[Language customization]]. Sometimes &amp;lt;code&amp;gt;?strings=1&amp;lt;/code&amp;gt; should be added; other times &amp;lt;code&amp;gt;&amp;amp;strings=1&amp;lt;/code&amp;gt;. See the Wikipedia article [http://en.wikipedia.org/wiki/Query_string Query string] for details.&lt;br /&gt;
&lt;br /&gt;
===Show validator links===&lt;br /&gt;
Be careful, read the warning.&lt;br /&gt;
&lt;br /&gt;
===Show page information===&lt;br /&gt;
To show page information printed in the page footer.&lt;br /&gt;
&lt;br /&gt;
==What to do if you cannot get to the admin screens==&lt;br /&gt;
&lt;br /&gt;
If the error is stopping you even getting to the admin screens to turn on debugging, then you can set the debugging setting manually.&lt;br /&gt;
&lt;br /&gt;
===Try typing the URL directly===&lt;br /&gt;
&lt;br /&gt;
The debug settings are at the URL &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;http://.../admin/settings.php?section=debugging&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; on your server. Sometimes that URL will work, even though the pages you need to go to get there (for example the site front page) do not. So it is worth trying to enter that URL directly.&lt;br /&gt;
&lt;br /&gt;
===In config.php===&lt;br /&gt;
&lt;br /&gt;
In [[Configuration file|config.php]] you can uncomment lines (delete the // at the start of the line) under Section 7 to enable debugging for all or just specific users:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
//=========================================================================&lt;br /&gt;
// 7. SETTINGS FOR DEVELOPMENT SERVERS - not intended for production use!!!&lt;br /&gt;
//=========================================================================&lt;br /&gt;
//&lt;br /&gt;
// Force a debugging mode regardless the settings in the site administration&lt;br /&gt;
// @error_reporting(E_ALL | E_STRICT);   // NOT FOR PRODUCTION SERVERS!&lt;br /&gt;
// @ini_set(&#039;display_errors&#039;, &#039;1&#039;);         // NOT FOR PRODUCTION SERVERS!&lt;br /&gt;
// $CFG-&amp;gt;debug = (E_ALL | E_STRICT);   // === DEBUG_DEVELOPER - NOT FOR PRODUCTION SERVERS!&lt;br /&gt;
// $CFG-&amp;gt;debugdisplay = 1;              // NOT FOR PRODUCTION SERVERS!&lt;br /&gt;
//&lt;br /&gt;
// You can specify a comma separated list of user ids that that always see&lt;br /&gt;
// debug messages, this overrides the debug flag in $CFG-&amp;gt;debug and $CFG-&amp;gt;debugdisplay&lt;br /&gt;
// for these users only.&lt;br /&gt;
// $CFG-&amp;gt;debugusers = &#039;2&#039;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remember to comment those lines again (reinsert the // at the start of the line) when you have finished diagnosing your problem.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE 1&#039;&#039;&#039;: do not try to modify the config database table directly, it will not work because the values are cached in MUC.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE 2&#039;&#039;&#039;: if you find your config.php does not have the above settings (you have a cut down approx 30 lines config.php) look for a &amp;quot;config-dist.php&amp;quot; file that contains the full details. I would suggest transferring your details in the current config.php file you have into the full config file and renaming that one to &amp;quot;config.php&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* Developers can also use [http://xdebug.org/ XDEBUG] (Installed as a module on the Apache server) to further dig into the code, step by step using an [http://xdebug.org/docs/remote XDEBUG client application]. Probably, as part of their favorite IDE. For example: [http://php.netbeans.org/ NetBeans], [http://www.jetbrains.com/phpstorm/ phpStorm] or...&lt;br /&gt;
&lt;br /&gt;
[[es:Depuración]]&lt;br /&gt;
[[fr:Débogage]]&lt;/div&gt;</summary>
		<author><name>Harrysmith</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/404/en/index.php?title=Debugging&amp;diff=117814</id>
		<title>Debugging</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/404/en/index.php?title=Debugging&amp;diff=117814"/>
		<updated>2015-04-07T16:08:22Z</updated>

		<summary type="html">&lt;p&gt;Harrysmith: /* In config.php */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Developer tools}}&lt;br /&gt;
Debugging messages can be enabled by an administrator in &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Development &amp;gt; Debugging&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Debugging messages are intended to help diagnose problems and/or help Moodle developers. If you have a problem with your Moodle site and ask for help in a Moodle.org forum, a developer may ask you to turn debug messages on, in order to locate the cause of the problem. By default Moodle does not show any error messages at all. If you are having problems (e.g. blank screens or incomplete screens) turning on debugging is usually the first thing to try. &lt;br /&gt;
&lt;br /&gt;
==Debugging settings==&lt;br /&gt;
Here are the settings on the Debugging page:&lt;br /&gt;
&lt;br /&gt;
===Debug messages===&lt;br /&gt;
The default is none, your choices are:&lt;br /&gt;
&lt;br /&gt;
;NONE : Do not show any errors or warnings (Default) &lt;br /&gt;
;ALL : Show all reasonable PHP debug messages&lt;br /&gt;
;MINIMAL : Show only fatal errors&lt;br /&gt;
;NORMAL : Show warnings, errors and notices&lt;br /&gt;
;DEVELOPER : extra Moodle debug messages for developers&lt;br /&gt;
&lt;br /&gt;
There is rarely any advantage in going to Developer level, unless you are a developer, in which case it is strongly recommended.&lt;br /&gt;
&lt;br /&gt;
Once you have got the error message, and copied and pasted it somewhere.  HIGHLY RECOMMENDED to turn Debug back to NONE. Debug messages can give clues to a hacker as to the setup of your site.&lt;br /&gt;
&lt;br /&gt;
===Display debug messages===&lt;br /&gt;
&lt;br /&gt;
There is an option to choose whether to display error messages or simply record them in the server logs.&lt;br /&gt;
&lt;br /&gt;
===Debug email sending===&lt;br /&gt;
&lt;br /&gt;
Determines whether or not to enable verbose debug information during sending of email messages to SMTP server.&lt;br /&gt;
&lt;br /&gt;
===Performance info===&lt;br /&gt;
&lt;br /&gt;
The Performance info option determines whether performance info will be included in the footer of the standard theme (and some other themes). Performance info includes the time for the page to load, the amount of memory used to generate the page, cpu usage, load, and the record cache hit/miss ration.&lt;br /&gt;
&lt;br /&gt;
If you add&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
define(&#039;MDL_PERF&#039;, true);&lt;br /&gt;
define(&#039;MDL_PERFDB&#039;, true);&lt;br /&gt;
define(&#039;MDL_PERFTOLOG&#039;, true);&lt;br /&gt;
define(&#039;MDL_PERFTOFOOT&#039;, true);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
to your config.php file, then it will also count database queries. (This has to be in config.php, because Moodle starts doing DB queries before it loads the config information in the database!&lt;br /&gt;
&lt;br /&gt;
===Show origin of language strings===&lt;br /&gt;
&lt;br /&gt;
Helps with [[:dev:Translation|translation]] and also with [[Language customization]]. Sometimes &amp;lt;code&amp;gt;?strings=1&amp;lt;/code&amp;gt; should be added; other times &amp;lt;code&amp;gt;&amp;amp;strings=1&amp;lt;/code&amp;gt;. See the Wikipedia article [http://en.wikipedia.org/wiki/Query_string Query string] for details.&lt;br /&gt;
&lt;br /&gt;
===Show validator links===&lt;br /&gt;
Be careful, read the warning.&lt;br /&gt;
&lt;br /&gt;
===Show page information===&lt;br /&gt;
To show page information printed in the page footer.&lt;br /&gt;
&lt;br /&gt;
==What to do if you cannot get to the admin screens==&lt;br /&gt;
&lt;br /&gt;
If the error is stopping you even getting to the admin screens to turn on debugging, then you can set the debugging setting manually.&lt;br /&gt;
&lt;br /&gt;
===Try typing the URL directly===&lt;br /&gt;
&lt;br /&gt;
The debug settings are at the URL &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;http://.../admin/settings.php?section=debugging&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; on your server. Sometimes that URL will work, even though the pages you need to go to get there (for example the site front page) do not. So it is worth trying to enter that URL directly.&lt;br /&gt;
&lt;br /&gt;
===In config.php===&lt;br /&gt;
&lt;br /&gt;
In [[Configuration file|config.php]] you can uncomment lines (delete the // at the start of the line) under Section 7 to enable debugging for all or just specific users:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
//=========================================================================&lt;br /&gt;
// 7. SETTINGS FOR DEVELOPMENT SERVERS - not intended for production use!!!&lt;br /&gt;
//=========================================================================&lt;br /&gt;
//&lt;br /&gt;
// Force a debugging mode regardless the settings in the site administration&lt;br /&gt;
// @error_reporting(E_ALL | E_STRICT);   // NOT FOR PRODUCTION SERVERS!&lt;br /&gt;
// @ini_set(&#039;display_errors&#039;, &#039;1&#039;);                 // NOT FOR PRODUCTION SERVERS!&lt;br /&gt;
// $CFG-&amp;gt;debug = (E_ALL | E_STRICT);   // === DEBUG_DEVELOPER - NOT FOR PRODUCTION SERVERS!&lt;br /&gt;
// $CFG-&amp;gt;debugdisplay = 1;                      // NOT FOR PRODUCTION SERVERS!&lt;br /&gt;
//&lt;br /&gt;
// You can specify a comma separated list of user ids that that always see&lt;br /&gt;
// debug messages, this overrides the debug flag in $CFG-&amp;gt;debug and $CFG-&amp;gt;debugdisplay&lt;br /&gt;
// for these users only.&lt;br /&gt;
// $CFG-&amp;gt;debugusers = &#039;2&#039;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remember to comment those lines again (reinsert the // at the start of the line) when you have finished diagnosing your problem.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE 1&#039;&#039;&#039;: do not try to modify the config database table directly, it will not work because the values are cached in MUC.&lt;br /&gt;
&#039;&#039;&#039;NOTE 2&#039;&#039;&#039;: if you find your config.php does not have the above settings (a cut down approx 30 lines config.php) look for a &amp;quot;config-dist.php&amp;quot; file that contains the full details. I would suggest transferring your details in the current config.php file you have into the full config file and renaming that one to &amp;quot;config.php&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* Developers can also use [http://xdebug.org/ XDEBUG] (Installed as a module on the Apache server) to further dig into the code, step by step using an [http://xdebug.org/docs/remote XDEBUG client application]. Probably, as part of their favorite IDE. For example: [http://php.netbeans.org/ NetBeans], [http://www.jetbrains.com/phpstorm/ phpStorm] or...&lt;br /&gt;
&lt;br /&gt;
[[es:Depuración]]&lt;br /&gt;
[[fr:Débogage]]&lt;/div&gt;</summary>
		<author><name>Harrysmith</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/404/en/index.php?title=Debugging&amp;diff=117813</id>
		<title>Debugging</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/404/en/index.php?title=Debugging&amp;diff=117813"/>
		<updated>2015-04-07T14:02:26Z</updated>

		<summary type="html">&lt;p&gt;Harrysmith: /* In config.php */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Developer tools}}&lt;br /&gt;
Debugging messages can be enabled by an administrator in &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Development &amp;gt; Debugging&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Debugging messages are intended to help diagnose problems and/or help Moodle developers. If you have a problem with your Moodle site and ask for help in a Moodle.org forum, a developer may ask you to turn debug messages on, in order to locate the cause of the problem. By default Moodle does not show any error messages at all. If you are having problems (e.g. blank screens or incomplete screens) turning on debugging is usually the first thing to try. &lt;br /&gt;
&lt;br /&gt;
==Debugging settings==&lt;br /&gt;
Here are the settings on the Debugging page:&lt;br /&gt;
&lt;br /&gt;
===Debug messages===&lt;br /&gt;
The default is none, your choices are:&lt;br /&gt;
&lt;br /&gt;
;NONE : Do not show any errors or warnings (Default) &lt;br /&gt;
;ALL : Show all reasonable PHP debug messages&lt;br /&gt;
;MINIMAL : Show only fatal errors&lt;br /&gt;
;NORMAL : Show warnings, errors and notices&lt;br /&gt;
;DEVELOPER : extra Moodle debug messages for developers&lt;br /&gt;
&lt;br /&gt;
There is rarely any advantage in going to Developer level, unless you are a developer, in which case it is strongly recommended.&lt;br /&gt;
&lt;br /&gt;
Once you have got the error message, and copied and pasted it somewhere.  HIGHLY RECOMMENDED to turn Debug back to NONE. Debug messages can give clues to a hacker as to the setup of your site.&lt;br /&gt;
&lt;br /&gt;
===Display debug messages===&lt;br /&gt;
&lt;br /&gt;
There is an option to choose whether to display error messages or simply record them in the server logs.&lt;br /&gt;
&lt;br /&gt;
===Debug email sending===&lt;br /&gt;
&lt;br /&gt;
Determines whether or not to enable verbose debug information during sending of email messages to SMTP server.&lt;br /&gt;
&lt;br /&gt;
===Performance info===&lt;br /&gt;
&lt;br /&gt;
The Performance info option determines whether performance info will be included in the footer of the standard theme (and some other themes). Performance info includes the time for the page to load, the amount of memory used to generate the page, cpu usage, load, and the record cache hit/miss ration.&lt;br /&gt;
&lt;br /&gt;
If you add&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
define(&#039;MDL_PERF&#039;, true);&lt;br /&gt;
define(&#039;MDL_PERFDB&#039;, true);&lt;br /&gt;
define(&#039;MDL_PERFTOLOG&#039;, true);&lt;br /&gt;
define(&#039;MDL_PERFTOFOOT&#039;, true);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
to your config.php file, then it will also count database queries. (This has to be in config.php, because Moodle starts doing DB queries before it loads the config information in the database!&lt;br /&gt;
&lt;br /&gt;
===Show origin of language strings===&lt;br /&gt;
&lt;br /&gt;
Helps with [[:dev:Translation|translation]] and also with [[Language customization]]. Sometimes &amp;lt;code&amp;gt;?strings=1&amp;lt;/code&amp;gt; should be added; other times &amp;lt;code&amp;gt;&amp;amp;strings=1&amp;lt;/code&amp;gt;. See the Wikipedia article [http://en.wikipedia.org/wiki/Query_string Query string] for details.&lt;br /&gt;
&lt;br /&gt;
===Show validator links===&lt;br /&gt;
Be careful, read the warning.&lt;br /&gt;
&lt;br /&gt;
===Show page information===&lt;br /&gt;
To show page information printed in the page footer.&lt;br /&gt;
&lt;br /&gt;
==What to do if you cannot get to the admin screens==&lt;br /&gt;
&lt;br /&gt;
If the error is stopping you even getting to the admin screens to turn on debugging, then you can set the debugging setting manually.&lt;br /&gt;
&lt;br /&gt;
===Try typing the URL directly===&lt;br /&gt;
&lt;br /&gt;
The debug settings are at the URL &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;http://.../admin/settings.php?section=debugging&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; on your server. Sometimes that URL will work, even though the pages you need to go to get there (for example the site front page) do not. So it is worth trying to enter that URL directly.&lt;br /&gt;
&lt;br /&gt;
===In config.php===&lt;br /&gt;
&lt;br /&gt;
In [[Configuration file|config.php]] you can uncomment lines (delete the // at the start of the line) under Section 7 to enable debugging for all or just specific users:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
//=========================================================================&lt;br /&gt;
// 7. SETTINGS FOR DEVELOPMENT SERVERS - not intended for production use!!!&lt;br /&gt;
//=========================================================================&lt;br /&gt;
//&lt;br /&gt;
// Force a debugging mode regardless the settings in the site administration&lt;br /&gt;
// @error_reporting(E_ALL | E_STRICT); // NOT FOR PRODUCTION SERVERS!&lt;br /&gt;
// @ini_set(&#039;display_errors&#039;, &#039;1&#039;);    // NOT FOR PRODUCTION SERVERS!&lt;br /&gt;
// $CFG-&amp;gt;debug = (E_ALL | E_STRICT);   // === DEBUG_DEVELOPER - NOT FOR PRODUCTION SERVERS!&lt;br /&gt;
// $CFG-&amp;gt;debugdisplay = 1;             // NOT FOR PRODUCTION SERVERS!&lt;br /&gt;
//&lt;br /&gt;
// You can specify a comma separated list of user ids that that always see&lt;br /&gt;
// debug messages, this overrides the debug flag in $CFG-&amp;gt;debug and $CFG-&amp;gt;debugdisplay&lt;br /&gt;
// for these users only.&lt;br /&gt;
// $CFG-&amp;gt;debugusers = &#039;2&#039;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remember to comment those lines again (reinsert the // at the start of the line) when you have finished diagnosing your problem.&lt;br /&gt;
&lt;br /&gt;
NOTE: do not try to modify the config database table directly, it will not work because the values are cached in MUC.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* Developers can also use [http://xdebug.org/ XDEBUG] (Installed as a module on the Apache server) to further dig into the code, step by step using an [http://xdebug.org/docs/remote XDEBUG client application]. Probably, as part of their favorite IDE. For example: [http://php.netbeans.org/ NetBeans], [http://www.jetbrains.com/phpstorm/ phpStorm] or...&lt;br /&gt;
&lt;br /&gt;
[[es:Depuración]]&lt;br /&gt;
[[fr:Débogage]]&lt;/div&gt;</summary>
		<author><name>Harrysmith</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/404/en/index.php?title=Moodle_migration&amp;diff=117177</id>
		<title>Moodle migration</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/404/en/index.php?title=Moodle_migration&amp;diff=117177"/>
		<updated>2015-02-21T08:59:56Z</updated>

		<summary type="html">&lt;p&gt;Harrysmith: /* Migrating a complete Moodle site - method 2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Installing Moodle}}&lt;br /&gt;
There may be times when you need to move your Moodle site from one server to another. For example, moving a Moodle site from shared hosting service&#039;s server to a dedicated server.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Tip:&#039;&#039; One common migration mistake is to forget to update the details in the migrated Moodle&#039;s &#039;&#039;[[Configuration file|config.php]]&#039;&#039; file.&lt;br /&gt;
&lt;br /&gt;
==Migrating a complete Moodle site - method 1==&lt;br /&gt;
&lt;br /&gt;
This involves moving a whole site from one server to another. If you are changing the domain/IP address to the new server you need to do these steps:&lt;br /&gt;
* &#039;&#039;&#039;Maintenance mode&#039;&#039;&#039;. Place your current Moodle site into [[Maintenance mode]] Site Administration&amp;gt;Server&amp;gt;Maintenance Mode to prevent any further additions to the Moodle database. Don&#039;t let administrators login during the migration as they are not affected by the maintenance mode setting.&lt;br /&gt;
* &#039;&#039;&#039;Backup your current Moodle database&#039;&#039;&#039;. The right way to back up your database depends on which database system you are using. The instructions below are one way to back up a MySQL database. Another option would be to use a tool like phpMyAdmin to manually make a backup. The documentation for your database will give more options. There are many ways to do such backups. Here is an outline of a little script you can run from command line on Unix to backup the database:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /my/backup/directory&lt;br /&gt;
mv moodle-database.sql.gz moodle-database-old.sql.gz&lt;br /&gt;
mysqldump -h example.com -u myusername --password=mypassword -C -Q -e --create-options mydatabasename &amp;gt; moodle-database.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Change your Moodle URL&#039;&#039;&#039;. If you have a new URL, you&#039;ll need to change this in the Moodle database to the new server. This is needed as links to pictures, files, etc are stored as absolute links and will reference the old &amp;lt;code&amp;gt;$CFG-&amp;gt;wwwroot&amp;lt;/code&amp;gt; value. So when loading a mysql backup dump of the Moodle server into mysql on another server the absolute referenced links will be broken. There are two methods of doing this:&lt;br /&gt;
:(a) The first method changes the Moodle URL using the Moodle script &#039;&#039;replace.php&#039;&#039; while your site is currently running just before you backup the Moodle database. Point your browser to &amp;lt;nowiki&amp;gt;yourserver.com/admin/tool/replace/index.php&amp;lt;/nowiki&amp;gt; or in older versions &amp;lt;nowiki&amp;gt;http://yourserver.com/admin/replace.php&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Enter the url for your old server (&amp;lt;nowiki&amp;gt;http://oldserver.com/&amp;lt;/nowiki&amp;gt;) and new server (&amp;lt;nowiki&amp;gt;http://newserver.com/&amp;lt;/nowiki&amp;gt;) and it will fix the mysql tables. You will also need to clear out any cached links by restarting your webserver. Now, take another backup of the Moodle database - this one will have the correct URLs.&lt;br /&gt;
&lt;br /&gt;
:(b) The second method is to backup the Moodle database first, then use the search and replace feature of your text editor (or use a unix tool like sed) to replace the old URL with the new one in the mysql backup file. Here is an example sed command:&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;code&amp;gt;#sed -e &#039;s/oldserver.com/newserver.com/g&#039; oldmysqldump.sql &amp;gt; newmysqldump.sql&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;NOTE:&#039;&#039; This second method will not replace text in blocks because they are stored base64 encoded in the database, so any links in blocks will not be fixed. Therefore you should consider using the replace tool after you migrate if you use this second method.&lt;br /&gt;
:&#039;&#039;TIP:&#039;&#039; You may want to check the mysqldump file to see how the old server was referenced.&lt;br /&gt;
:After changing the URL, restore the mysql database&lt;br /&gt;
*&#039;&#039;&#039;Copy the database back up files to the new server and restore into the new database server&#039;&#039;&#039;.&lt;br /&gt;
:Once you have created the new database on the new server:&lt;br /&gt;
&amp;lt;pre&amp;gt;mysql -p new_database &amp;lt; moodle-database.sql&amp;lt;/pre&amp;gt;&lt;br /&gt;
:For other databases, follow their instructions for restoring a backup. &lt;br /&gt;
* &#039;&#039;&#039;Copy the Moodle software&#039;&#039;&#039;. You will need to copy the Moodle code itself to the new server (this is the Moodle folder found in your webroot folder e.g. /var/www or public_html).  If you want you can upgrade the code to the latest version at this point by downloading the latest code from the Moodle site, copying over your config.php file and any plugins that you might have installed.  See [[Upgrading]].&lt;br /&gt;
* &#039;&#039;&#039;If you are changing the url or the new server has a different ip address, you will need to change &amp;lt;code&amp;gt;$CFG-&amp;gt;wwwroot&amp;lt;/code&amp;gt;&#039;&#039;&#039;. In your (possibly new) Moodle directory, change the &amp;lt;code&amp;gt;$CFG-&amp;gt;wwwroot&amp;lt;/code&amp;gt; variable in the &#039;&#039;config.php&#039;&#039; file for the new server.&lt;br /&gt;
* &#039;&#039;&#039;Copy data directory contents (moodledata)&#039;&#039;&#039;. Copy the contents of your data directory (check for the value in &amp;lt;code&amp;gt;$CFG-&amp;gt;dataroot&amp;lt;/code&amp;gt;) to the new server. If you&#039;ll use an FTP client, the transfer of the &amp;lt;code&amp;gt;filedir&amp;lt;/code&amp;gt; folder must be in &#039;&#039;&#039;BINARY&#039;&#039;&#039; mode or the files will get corrupted in the process.&lt;br /&gt;
* &#039;&#039;&#039;Review moodledata permissions and ownership&#039;&#039;&#039;. Check also that ownership and permissions remain the same on the new dataroot folder and change the value if you have changed its location on the new server.  Do the same for the new moodle code folder.&lt;br /&gt;
* &#039;&#039;&#039;Test the migration&#039;&#039;&#039;. To test the new install, access Moodle using your browser and the new server&#039;s URL. When you have tested that a number of links in the courses work, take the new Moodle site out of maintenance mode.  If you have upgraded the Moodle code, you will go through the upgrade process when you first access the site.&lt;br /&gt;
&#039;&#039;&#039;See also&#039;&#039;&#039;: Forum discussion on [http://moodle.org/mod/forum/discuss.php?d=85812 migrating Moodle&#039;s data directory on a Windows system].&lt;br /&gt;
&lt;br /&gt;
==Migrating a complete Moodle site - method 2==&lt;br /&gt;
&lt;br /&gt;
Do you have shell access on both servers? If so, the following method is a very quick and efficient method to migrate a Unix based site.&lt;br /&gt;
&lt;br /&gt;
It is also useful for creating snapshots or test sites.&lt;br /&gt;
*Set up a new empty database on the &#039;&#039;&#039;new&#039;&#039;&#039; server.&lt;br /&gt;
*Place your existing Moodle site into maintenance mode.&lt;br /&gt;
*Login to shell on the &#039;&#039;&#039;old&#039;&#039;&#039; existing server.&lt;br /&gt;
*Use rsync to copy &#039;&#039;&#039;moodledata&#039;&#039;&#039; and &#039;&#039;&#039;public_html&#039;&#039;&#039; or &#039;&#039;&#039;moodle&#039;&#039;&#039; folders (or whatever directory your Moodle install is in) to the new server - execute (replacing caps with your details; SOURCE = the directory you want to copy) for each directory:&lt;br /&gt;
::&amp;lt;code&amp;gt;rsync -av -e ssh SOURCE/ USERNAME@NEW_SERVER.COM:/PATH/TO/DESTINATION/&amp;lt;/code&amp;gt;&lt;br /&gt;
*Dump existing database and move and import into database on new server by executing:&lt;br /&gt;
::&amp;lt;code&amp;gt;mysqldump --allow-keywords --opt -uMySQL_USERNAME -pPASSWORD DATABASE | ssh USER@DOMAIN &amp;quot;mysql -uMySQL_USERNAME -pPASSWORD DATABASE&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
*On the &#039;&#039;&#039;new server&#039;&#039;&#039;, update &#039;&#039;&#039;config.php&#039;&#039;&#039; with relevant details where applicable (e.g. database name and user details, the wwwroot and the dataroot).&lt;br /&gt;
*Check ownership and permissions are correct on both moodle code and moodledata directories.&lt;br /&gt;
*To fix any internal Moodle links, login to your &amp;quot;new&amp;quot; Moodle install on your new server and use the [[Search and replace]] admin tool to search and replace the old url for the new one in the database.&lt;br /&gt;
*Make sure everything is working.&lt;br /&gt;
&lt;br /&gt;
Takes about 15 minutes for a small site.  However, transferring several Gigabytes of data for a larger site can take hours depending on your network connection and hard drive read/write speed.&lt;br /&gt;
&lt;br /&gt;
When you are happy all has gone well, set up redirects/make DNS changes if required, take new site out of maintenance mode and &amp;quot;switch off&amp;quot; old site. &lt;br /&gt;
&lt;br /&gt;
*If you are switching the ip address from the old server to the new one, you will need to turn off the old server before firing up the new one to avoid ip addressing conflicts and confusion!&lt;br /&gt;
&lt;br /&gt;
==Other points to consider==&lt;br /&gt;
===Changed URL image links set to old site===&lt;br /&gt;
So you built your Moodle Server with a &amp;lt;nowiki&amp;gt;http//192.168.0.1/Moodle&amp;lt;/nowiki&amp;gt; address. Then you changed the URL for your site to &amp;lt;nowiki&amp;gt;http://OurMoodle.org/Moodle&amp;lt;/nowiki&amp;gt;. You changed the Moodle config file so the CFGs point to the new paths,  but your images still point to the old url.   &lt;br /&gt;
&lt;br /&gt;
One simple, quick solution is to use the Replace script in Moodle to fix this. Login as admin and enter  &amp;lt;nowiki&amp;gt;http://OurMoodle.org/admin/tool/replace/index.php&amp;lt;/nowiki&amp;gt; in your browser address bar (or  &amp;lt;nowiki&amp;gt;http://OurMoodle.com/admin/replace.php&amp;lt;/nowiki&amp;gt; in older versions). Use the two form boxes to change &amp;lt;nowiki&amp;gt;http://192.168.0.1/&amp;lt;/nowiki&amp;gt; to &amp;lt;nowiki&amp;gt;http://OurMoodle.org/&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This replace function is only supported on Moodle sites that run on MySQL or Postgres databases. See MDL-26597 and MDL-35099.&lt;br /&gt;
&lt;br /&gt;
===Upgrade Moodle===&lt;br /&gt;
&lt;br /&gt;
When migrating Moodle it is often a good idea to take the opportunity to upgrade Moodle to the latest version. If you manage your own server, follow the instructions in [[Upgrading | upgrading moodle]], otherwise check if your host can upgrade for you.&lt;br /&gt;
&lt;br /&gt;
===Restoring a single course across servers===&lt;br /&gt;
&lt;br /&gt;
You may need to restore a single course from an old site to a new one, especially if you are testing the migration. When restoring a Moodle backup file to Moodle on a different server than the one used to create the backup, the absolute referenced links to files maybe broken. To fix this problem open the &#039;&#039;backup-coursename.zip&#039;&#039; file and edit the &#039;&#039;moodle.xml&#039;&#039; file replacing links with &amp;lt;code&amp;gt;$@FILEPHP@$&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For example, replace &amp;lt;nowiki&amp;gt;http://yourserver.com/file.php/243/&amp;lt;/nowiki&amp;gt; with &amp;lt;code&amp;gt;$@FILEPHP@$&amp;lt;/code&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
When the file is restored it will use the correct file path for the new course.&lt;br /&gt;
&lt;br /&gt;
===DNS &amp;amp; Masquerading changes===&lt;br /&gt;
&lt;br /&gt;
You may have had to change the DNS entries for the new Moodle site. If you have done so, it will take some time for the changes to replicate, so be patient. If your server is located behind a firewall, you may also have to change your firewall rules to allow access to the new server. See the [[Masquerading | masquerading docs]].&lt;br /&gt;
&lt;br /&gt;
===Internal and external access===&lt;br /&gt;
&lt;br /&gt;
If you have a set up where your Moodle site can be accessed via a network and via the internet, ensure you check that the new site can be accessed internally and externally.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [[Site backup]]&lt;br /&gt;
* [[Site restore]]&lt;br /&gt;
* [[Backup and restore FAQ]]&lt;br /&gt;
* [http://www.youtube.com/watch?v=sFCXvRx20Bs Moving Moodle to a new server video]&lt;br /&gt;
* [http://tracker.moodle.org/browse/MDL-35099 Convert hidden search/replace script into a proper core admin tool] Tracker issue&lt;br /&gt;
&lt;br /&gt;
Using Moodle forum discussions:&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=62959 Changing Moodle URL] &lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=57477 Changing site address] &lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=76704 Upgrading whilst migrating] &lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=65450 Internal and external access] &lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=111807 Migrated Moodle to New Server But Can&#039;t Login]&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=228436 Replace script returns &amp;quot;Service Unavailable&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
[[es:Migración de Moodle]]&lt;br /&gt;
[[fr:Migration de Moodle]]&lt;br /&gt;
[[ja:Moodle移行]]&lt;br /&gt;
[[de:Moodle-Migration]]&lt;/div&gt;</summary>
		<author><name>Harrysmith</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/404/en/index.php?title=WebDAV_repository&amp;diff=105536</id>
		<title>WebDAV repository</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/404/en/index.php?title=WebDAV_repository&amp;diff=105536"/>
		<updated>2013-06-06T07:52:52Z</updated>

		<summary type="html">&lt;p&gt;Harrysmith: /* Options */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Repositories}}&lt;br /&gt;
Web-based Distributed Authoring and Versioning (WebDAV) is a set of methods based on the Hypertext Transfer Protocol (HTTP) that facilitates collaboration between users in editing and managing documents and files stored on World Wide Web servers.&lt;br /&gt;
&lt;br /&gt;
A WebDAV repository can be enabled by a site administrator in &#039;&#039;Settings &amp;gt; Site administration &amp;gt; Plugins &amp;gt; Repositories &amp;gt; Manage repositories&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==WebDAV configuration==&lt;br /&gt;
&lt;br /&gt;
After enabling the WebDAV repository, a repository instance can be created in &#039;&#039;Settings &amp;gt; Site administration &amp;gt; Plugins &amp;gt; Repositories &amp;gt; WebDAV repository&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Webdav config.png]]&lt;br /&gt;
&lt;br /&gt;
===Options===&lt;br /&gt;
WebDAV type: Choose from HTTP or HTTPS connection&lt;br /&gt;
&lt;br /&gt;
WebDAV server: The server name &lt;br /&gt;
&lt;br /&gt;
WebDAV path: The path to webdav directory&lt;br /&gt;
&lt;br /&gt;
Authentication: We currently only support HTTP Basic Authentication&lt;br /&gt;
&lt;br /&gt;
WebDAV server port: The webdav server port&lt;br /&gt;
&lt;br /&gt;
WebDAV server user: HTTP Basic authentication username&lt;br /&gt;
&lt;br /&gt;
WebDAV server password: HTTP Basic authentication password&lt;br /&gt;
&lt;br /&gt;
For example, if you are going to add a webdav server at http://webdavserver.tld/path/to/dir, you should use following options:&lt;br /&gt;
WebDAV type: HTTP&lt;br /&gt;
WebDAV Server: webdavserver.tld&lt;br /&gt;
&lt;br /&gt;
== Configuring WebDAV on Microsoft Windows Server 2003 R2 (Service Pack 2), IIS V6.0 ==&lt;br /&gt;
&lt;br /&gt;
=== Configure Windows Server 2003 ===&lt;br /&gt;
&lt;br /&gt;
First we need to install WebDAV on the server. &#039;&#039;Note:&#039;&#039; when you promote a basic Windows Server 2003 installation to an application server, it installs various IIS 6 components but WebDAV isn’t one of them. &lt;br /&gt;
&lt;br /&gt;
==== Install and Enable WebDAV on the Server ====&lt;br /&gt;
&lt;br /&gt;
To install WebDAV on the IIS 6 machine, use Add or Remove Programs in Control Panel and run the Windows Components Wizard. You can find WebDAV under &#039;&#039;&#039;Application Server -&amp;gt; Internet Information Services -&amp;gt; World Wide Web Service -&amp;gt; WebDAV Publishing&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Once WebDAV is installed it needs to be enabled. Check the WebDAV option under the Web Service Extensions node in IIS Manager.&lt;br /&gt;
&lt;br /&gt;
=== Configure IIS ===&lt;br /&gt;
&lt;br /&gt;
Configuring a new virtual directory in IIS is a two-step process:&lt;br /&gt;
&lt;br /&gt;
#Create a new virtual directory using the Virtual Directory wizard&lt;br /&gt;
#Configure the access permissions on the new virtual directory&lt;br /&gt;
&lt;br /&gt;
==== Create New Virtual Directory ====&lt;br /&gt;
#Open IIS and right-click on your Moodle website. Select &#039;&#039;&#039;New -&amp;gt; Virtual Directory&#039;&#039;&#039;... from the pop-up menu.&amp;lt;br /&amp;gt;[[Image:New_virtual_directory.png|200 px|Menu option required for creating new virtual directory]]&lt;br /&gt;
#Select &#039;&#039;&#039;New -&amp;gt; Virtual directory...&#039;&#039;&#039; from the pop-up menu. The &#039;&#039;&#039;Create New Virtual Directory Wizard&#039;&#039;&#039; is displayed.&amp;lt;br /&amp;gt;[[Image:Wizard_intro.png|200 px|IIS Virtual Directory Creation Wizard]] &lt;br /&gt;
#Call the new virtual directory &#039;&#039;&#039;Moodledata&#039;&#039;&#039;.&amp;lt;br /&amp;gt;[[Image:Name_directory.png|200 px|alt text]]&lt;br /&gt;
#Specify the path to the Moodledata directory.&amp;lt;br /&amp;gt;[[Image:Choose_path.png|200 px|Choosing path to folder on server]]&lt;br /&gt;
#Ensure the new virtual directory has &#039;&#039;&#039;Read&#039;&#039;&#039;, &#039;&#039;&#039;Write&#039;&#039;&#039; and &#039;&#039;&#039;Browse&#039;&#039;&#039; permissions.&amp;lt;br /&amp;gt;[[Image:Directory_permissions.png|200 px|Specifying directory permissions]]&lt;br /&gt;
#Press the Finish button to create the new virtual directory.&lt;br /&gt;
&lt;br /&gt;
==== Configuring Virtual Directory Properties ====&lt;br /&gt;
&lt;br /&gt;
#Right-click on the new virtual directory and select Properties from the pop-up menu.&amp;lt;br /&amp;gt;[[Image:Check_properties.png|200 px|Checking new virtual directory properties]]&lt;br /&gt;
#Ensure that &#039;&#039;&#039;Read&#039;&#039;&#039;, &#039;&#039;&#039;Write&#039;&#039;&#039;, &#039;&#039;&#039;Directory browsing&#039;&#039;&#039;, and &#039;&#039;&#039;Log visits&#039;&#039;&#039; are checked. Ensure &#039;&#039;&#039;Index this resource&#039;&#039;&#039; is unchecked.&amp;lt;br /&amp;gt;[[Image:Properties_view.png|200 px|Virtual directory properties correctly configured]]&lt;br /&gt;
#Click on the &#039;&#039;&#039;Directory Security&#039;&#039;&#039; tab and press the &#039;&#039;&#039;Authentication and access control&#039;&#039;&#039; Edit... button&amp;lt;br /&amp;gt;[[Image:Authentication_tab.png|200 px|Directory Security authentication and access control]]&lt;br /&gt;
#Authenticated access configuration will depend on your needs. Basic access will require you to uncheck &#039;&#039;&#039;Enable anonymous access&#039;&#039;&#039; and check &#039;&#039;&#039;Basic authentication (password is sent in clear text)&#039;&#039;&#039;. You may get a warning about security:&amp;lt;br /&amp;gt;[[Image:Authentication_warn.png|200 px|Directory security warning]]&lt;br /&gt;
#Your new virtual directory is ready for testing.&amp;lt;br /&amp;gt;[[Image:Final_view.png|200 px|New virtual directory ready for use]]&lt;br /&gt;
&lt;br /&gt;
=== Testing WebDAV on Windows XP ===&lt;br /&gt;
&lt;br /&gt;
WebDAV needs to be enabled on any client machines that will be used to create and manage content for Moodle. Windows XP has a built-in WebDAV client service that needs to be enabled:&lt;br /&gt;
&lt;br /&gt;
#Open the &#039;&#039;&#039;Services&#039;&#039;&#039; console under &#039;&#039;&#039;Administrative Tools&#039;&#039;&#039; and find the &#039;&#039;&#039;WebClient&#039;&#039;&#039; service.&lt;br /&gt;
#Double-click on this service to open its &#039;&#039;&#039;Properties&#039;&#039;&#039; sheet.&lt;br /&gt;
#Change the &#039;&#039;&#039;Startup Type&#039;&#039;&#039; to &#039;&#039;Automatic&#039;&#039;, then click the Start button to start the service.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; Internet Explorer 8.0 no longer supports web folders. See [http://blogs.msdn.com/b/askie/archive/2009/03/20/open-as-web-folder-not-in-the-internet-explorer-8-file-open-dialog.aspx this blog post from David Conner] for details. Instead, you will need to map a network drive (instructions on mapping a network drive are also given in David&#039;s blog post).&lt;br /&gt;
&lt;br /&gt;
WebDAV path: /path/to/dir/&lt;br /&gt;
&lt;br /&gt;
==Repository permissions==&lt;br /&gt;
&lt;br /&gt;
This repository is accessible by default to administrators, course creators, teachers, editing teachers and managers, but not to guests or students. This [[Capabilities/repository/webdav:view|capability]] can be changed to control access to users with specific roles.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* MDL-22663&lt;br /&gt;
&lt;br /&gt;
[[Category:Site administration]]&lt;br /&gt;
[[de:WebDAV Repository]]&lt;/div&gt;</summary>
		<author><name>Harrysmith</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/404/en/index.php?title=IMS_Enterprise&amp;diff=105463</id>
		<title>IMS Enterprise</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/404/en/index.php?title=IMS_Enterprise&amp;diff=105463"/>
		<updated>2013-05-30T23:11:37Z</updated>

		<summary type="html">&lt;p&gt;Harrysmith: /* See also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Enrolment}}&lt;br /&gt;
Location: IMS Enterprise file edit settings link in &#039;&#039;Site administration &amp;gt; Plugins &amp;gt; Enrolments &amp;gt; Manage enrol plugins&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IMS Enterprise&#039;&#039;&#039; is an international standard XML file format which may be used to specify enrolments/unenrolments in courses, as well as course information and user information.&lt;br /&gt;
&lt;br /&gt;
==Format overview==&lt;br /&gt;
&lt;br /&gt;
Below is a simple guide to the basic structure of a typical IMS Enterprise data file. Much more information is available on the [http://www.imsglobal.org/enterprise/ IMS Enterprise official website].&lt;br /&gt;
&lt;br /&gt;
You may like to read the [https://github.com/moodle/moodle/blob/master/enrol/imsenterprise/entv1p1_conformance_summary.html conformance summary] which describes which IMS data elements this plugin can process.&lt;br /&gt;
&lt;br /&gt;
==Basic guide to IMS Enterprise file format==&lt;br /&gt;
&lt;br /&gt;
For any IMS-style enrolment you need a &amp;lt;group&amp;gt; tag which specifies the course, a &amp;lt;person&amp;gt; tag which specifies the user account, and a &amp;lt;membership&amp;gt; tag containing &amp;lt;member&amp;gt; tags which specify a person&#039;s role within a given course.&lt;br /&gt;
&lt;br /&gt;
Remember that the numeric keys used in the Moodle databases are not the interoperable data - a student data system is never going to know in advance that Joe is the 20th user added to the Moodle database - so those aren&#039;t the keys exchanged in this type of data.&lt;br /&gt;
&lt;br /&gt;
Typically a course would have a reference code as well as a name, so let&#039;s assume its code is MOODLE101. If you require a new course to be placed in a category other than the default, you can specify that using the &amp;lt;orgunit&amp;gt; tag. To define your course you could use&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;group&amp;gt;&lt;br /&gt;
    &amp;lt;sourcedid&amp;gt;&lt;br /&gt;
      &amp;lt;source&amp;gt;MyDataSystem&amp;lt;/source&amp;gt;&lt;br /&gt;
      &amp;lt;id&amp;gt;MOODLE101&amp;lt;/id&amp;gt;&lt;br /&gt;
    &amp;lt;/sourcedid&amp;gt;&lt;br /&gt;
    &amp;lt;description&amp;gt;&lt;br /&gt;
      &amp;lt;short&amp;gt;Moodle 101&amp;lt;/short&amp;gt;&lt;br /&gt;
      &amp;lt;long&amp;gt;Moodle 101: Course Name&amp;lt;/long&amp;gt;&lt;br /&gt;
    &amp;lt;/description&amp;gt;&lt;br /&gt;
    &amp;lt;org&amp;gt;&lt;br /&gt;
      &amp;lt;orgunit&amp;gt;CATEGORY&amp;lt;/orgunit&amp;gt;&lt;br /&gt;
    &amp;lt;/org&amp;gt;&lt;br /&gt;
  &amp;lt;/group&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The enrolment script will look for a course with code MOODLE101, and (optionally) create it if it doesn&#039;t exist, the plugin also allows you to map between group tags and the course shortname, fullname and summary fields. Similarly for the person - let&#039;s assume it&#039;s &amp;quot;jmoodle&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;person&amp;gt;&lt;br /&gt;
    &amp;lt;sourcedid&amp;gt;&lt;br /&gt;
      &amp;lt;source&amp;gt;MyDataSystem&amp;lt;/source&amp;gt;&lt;br /&gt;
      &amp;lt;id&amp;gt;jmoodle&amp;lt;/id&amp;gt;&lt;br /&gt;
    &amp;lt;/sourcedid&amp;gt;&lt;br /&gt;
    &amp;lt;userid&amp;gt;jmoodle&amp;lt;/userid&amp;gt;&lt;br /&gt;
    &amp;lt;name&amp;gt;&lt;br /&gt;
      &amp;lt;fn&amp;gt;Joe Moodle&amp;lt;/fn&amp;gt;&lt;br /&gt;
      &amp;lt;n&amp;gt;&lt;br /&gt;
        &amp;lt;family&amp;gt;MOODLE&amp;lt;/family&amp;gt;&lt;br /&gt;
        &amp;lt;given&amp;gt;JOE&amp;lt;/given&amp;gt;&lt;br /&gt;
      &amp;lt;/n&amp;gt;&lt;br /&gt;
    &amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;/person&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If Joe doesn&#039;t already have an account, the script can (optionally) create an account for him.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s now look at the membership, adding the person to the course:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;membership&amp;gt;&lt;br /&gt;
    &amp;lt;sourcedid&amp;gt;&lt;br /&gt;
      &amp;lt;source&amp;gt;MyDataSystem&amp;lt;/source&amp;gt;&lt;br /&gt;
      &amp;lt;id&amp;gt;MOODLE101&amp;lt;/id&amp;gt;&lt;br /&gt;
    &amp;lt;/sourcedid&amp;gt;&lt;br /&gt;
    &amp;lt;member&amp;gt;&lt;br /&gt;
      &amp;lt;sourcedid&amp;gt;&lt;br /&gt;
        &amp;lt;source&amp;gt;MyDataSystem&amp;lt;/source&amp;gt;&lt;br /&gt;
        &amp;lt;id&amp;gt;jmoodle&amp;lt;/id&amp;gt;&lt;br /&gt;
      &amp;lt;/sourcedid&amp;gt;&lt;br /&gt;
      &amp;lt;role roletype=&amp;quot;01&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;status&amp;gt;1&amp;lt;/status&amp;gt;&lt;br /&gt;
        &amp;lt;extension&amp;gt;&amp;lt;cohort&amp;gt;unit 2&amp;lt;/cohort&amp;gt;&amp;lt;/extension&amp;gt;&lt;br /&gt;
      &amp;lt;/role&amp;gt;&lt;br /&gt;
    &amp;lt;/member&amp;gt;&lt;br /&gt;
  &amp;lt;/membership&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The IMS Enterprise specification does offer a facility for specifying start/end dates for enrolments, so those can be included using the &amp;lt;timeframe&amp;gt; tag if needed.&lt;br /&gt;
&lt;br /&gt;
If a person is already added to a group within the course, the script won&#039;t actually modify that. If they are not grouped, however, then the specified grouping will be applied.&lt;br /&gt;
&lt;br /&gt;
==Automatic creation of new courses==&lt;br /&gt;
&lt;br /&gt;
If required, the IMS Enterprise enrolment plugin can create new courses for any it finds in the IMS data but not in Moodle&#039;s database.&lt;br /&gt;
&lt;br /&gt;
Courses are first queried by their &amp;quot;idnumber&amp;quot; - an alphanumeric field in Moodle&#039;s course table, which can specify the code used to identify the course in the Student Information System (for example). If that is not found, the course table is searched for the &amp;quot;short description&amp;quot;, which in Moodle is the short course identifier as displayed in the breadcrumbs etc. (In some systems these two fields may well be identical.) Only when that search has failed can the plugin optionally create new courses.&lt;br /&gt;
&lt;br /&gt;
Any newly-generated courses are HIDDEN when created. This is to prevent the possibility of students wandering into completely empty courses that the teacher may be unaware of.&lt;br /&gt;
&lt;br /&gt;
==Unenrolling students/teachers==&lt;br /&gt;
&lt;br /&gt;
If required, the Enterprise data can add as well as remove course enrolments - for students and for teachers. If this setting is turned on, then Moodle will carry out unenrolments when specified in the data. Note, as of Moodle 2, you must use IMSEnterprise to remove members that have been added by the plugin. You cannot manually delete a member.&lt;br /&gt;
&lt;br /&gt;
There are three ways of unenrolling students within the IMS data:&lt;br /&gt;
&lt;br /&gt;
* A &amp;lt;member&amp;gt; element which specifies the given student and course, and with the &amp;quot;recstatus&amp;quot; attribute of the &amp;lt;role&amp;gt; element set to 3 (which means &amp;quot;delete&amp;quot;). THIS IS NOT YET IMPLEMENTED IN THE MOODLE PLUGIN.&lt;br /&gt;
* A &amp;lt;member&amp;gt; element which specifies the given student and course, and with the &amp;lt;status&amp;gt; element set to 0 (which means &amp;quot;inactive&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
The third method is slightly different. It does not require this config setting to be activated, and can be specified well in advance of the unenrolment date:&lt;br /&gt;
&lt;br /&gt;
* A &amp;lt;member&amp;gt; element which specifies a &amp;lt;timeframe&amp;gt; for the enrolment can specify the begin and/or end dates for enrolment of this particular student. These dates are loaded into Moodle&#039;s enrolment data table if present, and so after the end-date, a student will no longer be able to access that particular course.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [http://www.imsglobal.org/enterprise/ IMS Enterprise specification] - the official site&lt;br /&gt;
* [https://github.com/moodle/moodle/blob/master/enrol/imsenterprise/entv1p1_conformance_summary.html Conformance summary] - summarises the parts of the specification which Moodle makes use of&lt;br /&gt;
* [https://studydirect.sussex.ac.uk/downloads/imsenterprise.php Minted IMS Enterprise enrolment plugin] - An extension of the ims enterprise enrolment plugin developed in the [http://www.sussex.ac.uk/minted minted project]&lt;br /&gt;
&lt;br /&gt;
[[fr:Fichier IMS Enterprise]]&lt;br /&gt;
[[de:Einschreibung über IMS Enterprise Datei]]&lt;/div&gt;</summary>
		<author><name>Harrysmith</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/404/en/index.php?title=Moodle_migration&amp;diff=99958</id>
		<title>Moodle migration</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/404/en/index.php?title=Moodle_migration&amp;diff=99958"/>
		<updated>2012-08-13T19:49:19Z</updated>

		<summary type="html">&lt;p&gt;Harrysmith: /* Migrating a complete Moodle site - method 2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Installing Moodle}}&lt;br /&gt;
There may be times when you need to move your Moodle site from one server to another. For example, moving a Moodle site from shared hosting service&#039;s server to a dedicated server.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Tip:&#039;&#039; One common migration mistake is to forget to update the details in the migrated Moodle&#039;s &#039;&#039;[[Configuration file|config.php]]&#039;&#039; file.&lt;br /&gt;
&lt;br /&gt;
==Migrating a complete Moodle site - method 1==&lt;br /&gt;
&lt;br /&gt;
This involves moving a whole site from one server to another. If you are changing the domain/IP address to the new server you need to do these steps:&lt;br /&gt;
* &#039;&#039;&#039;Maintenance mode&#039;&#039;&#039;. Place your current Moodle site in maintenance mode to prevent any further additions to the Moodle database. Don&#039;t let administrators login during the migration as they are not affected by the maintenance mode setting.&lt;br /&gt;
* &#039;&#039;&#039;Backup your current Moodle database&#039;&#039;&#039;. Do this by following the instructions in the [[Upgrading | upgrading Moodle]] or [[Site backup]] page. This will give you a text file containing the mysql dump.&lt;br /&gt;
* &#039;&#039;&#039;Copy the Moodle software&#039;&#039;&#039;. You will need to copy the Moodle code itself to the new server - upgrade the code to the latest version if you can.&lt;br /&gt;
* &#039;&#039;&#039;Change &amp;lt;code&amp;gt;$CFG-&amp;gt;wwwroot&amp;lt;/code&amp;gt;&#039;&#039;&#039;. In your (possibly new) Moodle directory, change the &amp;lt;code&amp;gt;$CFG-&amp;gt;wwwroot&amp;lt;/code&amp;gt; variable in the &#039;&#039;config.php&#039;&#039; file for the new server.&lt;br /&gt;
* &#039;&#039;&#039;Copy data directory contents (moodledata)&#039;&#039;&#039;. Copy the contents of your data directory (check for the value in &amp;lt;code&amp;gt;$CFG-&amp;gt;dataroot&amp;lt;/code&amp;gt;) to the new server.&lt;br /&gt;
* &#039;&#039;&#039;Review moodledata permissions&#039;&#039;&#039;. Check also that permissions remain the same on the new dataroot folder and change the value if you have changed its location on the new server.&lt;br /&gt;
* &#039;&#039;&#039;Change your Moodle URL&#039;&#039;&#039;. If you have a new URL, you&#039;ll need to change this in the Moodle database to the new server. This is needed as links to pictures, files, etc are stored as absolute links and will reference the old &amp;lt;code&amp;gt;$CFG-&amp;gt;wwwroot&amp;lt;/code&amp;gt; value. So when loading a mysql backup dump of the Moodle server into mysql on another server the absolute referenced links will be broken. There are two methods of doing this:&lt;br /&gt;
:(a) The first method changes the Moodle URL using the Moodle script &#039;&#039;replace.php&#039;&#039; while your site is currently running just before you backup the Moodle database. Point your browser to &amp;lt;nowiki&amp;gt;yourserver.com/admin/tool/replace/index.php&amp;lt;/nowiki&amp;gt; or in older versions &amp;lt;nowiki&amp;gt;http://yourserver.com/admin/replace.php&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Enter the url for your old server (&amp;lt;nowiki&amp;gt;http://oldserver.com/&amp;lt;/nowiki&amp;gt;) and new server (&amp;lt;nowiki&amp;gt;http://newserver.com/&amp;lt;/nowiki&amp;gt;) and it will fix the mysql tables. You will also need to clear out any cached links by restarting your webserver. Now, take another backup of the Moodle database - this one will have the correct URLs.&lt;br /&gt;
&lt;br /&gt;
:(b) The second method is to backup the Moodle database first, then use the search and replace feature of your text editor (or use a unix tool like sed) to replace the old URL with the new one in the mysql backup file. Here is an example sed command:&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;code&amp;gt;#sed -e &#039;s/oldserver.com/newserver.com/g&#039; oldmysqldump.sql &amp;gt; newmysqldump.sql&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;NOTE:&#039;&#039; This second method will not replace text in blocks because they are stored base64 encoded in the database, so any links in blocks will not be fixed. Therefore you should consider using the replace tool after you migrate if you use this second method.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;TIP:&#039;&#039; You may want to check the mysqldump file to see how the old server was referenced.&lt;br /&gt;
:After changing the URL, restore the mysql database&lt;br /&gt;
* &#039;&#039;&#039;Test the migration&#039;&#039;&#039;. To test the new install, access Moodle using your browser and the new server&#039;s URL. When you have tested that a number of links in the courses work, take the new Moodle site out of maintenance mode.&lt;br /&gt;
&#039;&#039;&#039;See also&#039;&#039;&#039;: Forum discussion on [http://moodle.org/mod/forum/discuss.php?d=85812 migrating Moodle&#039;s data directory on a Windows system].&lt;br /&gt;
&lt;br /&gt;
==Migrating a complete Moodle site - method 2==&lt;br /&gt;
&lt;br /&gt;
Do you have shell access on both servers? If so, the following method is a very quick and efficient method to migrate a Unix based site.&lt;br /&gt;
&lt;br /&gt;
It is also useful for creating snapshots or test sites.&lt;br /&gt;
*Set up a new empty database on the &#039;&#039;&#039;new&#039;&#039;&#039; server.&lt;br /&gt;
*Place your existing Moodle site into maintenance mode.&lt;br /&gt;
*Login to shell on the &#039;&#039;&#039;old&#039;&#039;&#039; existing server.&lt;br /&gt;
*Use rsync to copy &#039;&#039;&#039;moodledata&#039;&#039;&#039; and &#039;&#039;&#039;public_html&#039;&#039;&#039; (or whatever directory your Moodle install is in) to the new server - execute (replacing caps with your details; SOURCE = the directory you want to copy) for each directory:&lt;br /&gt;
::&amp;lt;code&amp;gt;rsync -av -e ssh SOURCE/ USERNAME@NEW_SERVER.COM:/PATH/TO/DESTINATION/&amp;lt;/code&amp;gt;&lt;br /&gt;
*Dump existing database and move and import into database on new server by executing:&lt;br /&gt;
::&amp;lt;code&amp;gt;mysqldump --allow-keywords --opt -uMySQL_USERNAME -pPASSWORD DATABASE | ssh USER@DOMAIN &amp;quot;mysql -uMySQL_USERNAME -pPASSWORD DATABASE&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
*On the &#039;&#039;&#039;new server&#039;&#039;&#039;, update &#039;&#039;&#039;config.php&#039;&#039;&#039; with relevant details.&lt;br /&gt;
*To fix any internal Moodle links, login to your &amp;quot;new&amp;quot; Moodle install on your new server and use the [[Search and replace]] admin tool to search and replace the old uri for the new.&lt;br /&gt;
*Make sure everything is working.&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Takes about 15 minutes.&lt;br /&gt;
&lt;br /&gt;
When you are happy all has gone well, set up redirects/make DNS changes if required, take new site out of maintenance mode and &amp;quot;switch off&amp;quot; old site.&lt;br /&gt;
&lt;br /&gt;
==Other points to consider==&lt;br /&gt;
===Changed URL image links set to old site===&lt;br /&gt;
So you built your Moodle Server with a &amp;lt;nowiki&amp;gt;http//192.168.0.1/Moodle address.  Then you changed the URL for your site to http://OurMoodle.org/Moodle .   You changed the Moodle config file so the CFGs point to the new paths.  But your images point to the old url. &amp;lt;/nowiki&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;One simple, quick solution.  Login as admin and put  &amp;lt;nowiki&amp;gt;OurMoodle.org/admin/tool/replace/index.php&amp;lt;/nowiki&amp;gt; or in older versions &amp;lt;nowiki&amp;gt;http://OurMoodle.com/admin/replace.php&amp;lt;/nowiki&amp;gt; in your browser address bar.  Use the two form boxes to change http://192.168.0.1/  to  http://OurMoodle.org/ .&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Upgrade Moodle===&lt;br /&gt;
&lt;br /&gt;
When migrating Moodle it is often a good idea to take the opportunity to upgrade Moodle to the latest version. If you manage your own server, follow the instructions in [[Upgrading | upgrading moodle]], otherwise check if your host can upgrade for you.&lt;br /&gt;
&lt;br /&gt;
===Restoring a single course across servers===&lt;br /&gt;
&lt;br /&gt;
You may need to restore a single course from an old site to a new one, especially if you are testing the migration. When restoring a Moodle backup file to Moodle on a different server than the one used to create the backup, the absolute referenced links to files maybe broken. To fix this problem open the &#039;&#039;backup-coursename.zip&#039;&#039; file and edit the &#039;&#039;moodle.xml&#039;&#039; file replacing links with &amp;lt;code&amp;gt;$@FILEPHP@$&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For example, replace &amp;lt;nowiki&amp;gt;http://yourserver.com/file.php/243/&amp;lt;/nowiki&amp;gt; with &amp;lt;code&amp;gt;$@FILEPHP@$&amp;lt;/code&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
When the file is restored it will use the correct file path for the new course.&lt;br /&gt;
&lt;br /&gt;
===DNS &amp;amp; Masquerading changes===&lt;br /&gt;
&lt;br /&gt;
You may have had to change the DNS entries for the new Moodle site. If you have done so, it will take some time for the changes to replicate, so be patient. If your server is located behind a firewall, you may also have to change your firewall rules to allow access to the new server. See the [[Masquerading | masquerading docs]].&lt;br /&gt;
&lt;br /&gt;
===Internal and external access===&lt;br /&gt;
&lt;br /&gt;
If you have a set up where your Moodle site can be accessed via a network and via the internet, ensure you check that the new site can be accessed internally and externally.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [[Site backup]]&lt;br /&gt;
* [[Site restore]]&lt;br /&gt;
* [[Backup and restore FAQ]]&lt;br /&gt;
* [http://www.youtube.com/watch?v=sFCXvRx20Bs Moving Moodle to a new server video]&lt;br /&gt;
&lt;br /&gt;
Using Moodle forum discussions:&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=62959 Changing Moodle URL] &lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=57477 Changing site address] &lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=76704 Upgrading whilst migrating] &lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=65450 Internal and external access] &lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=111807 Migrated Moodle to New Server But Can&#039;t Login]&lt;br /&gt;
&lt;br /&gt;
[[fr:Migration de Moodle]]&lt;br /&gt;
[[ja:Moodle移行]]&lt;br /&gt;
[[de:Moodle-Migration]]&lt;/div&gt;</summary>
		<author><name>Harrysmith</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/404/en/index.php?title=Moodle_migration&amp;diff=45687</id>
		<title>Moodle migration</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/404/en/index.php?title=Moodle_migration&amp;diff=45687"/>
		<updated>2008-10-23T00:41:46Z</updated>

		<summary type="html">&lt;p&gt;Harrysmith: /* Migrating a complete Moodle site - method 2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There may be times when you need to move your Moodle site from one server to another, for example, moving from shared hosting to a dedicated server - this is known as migrating your Moodle site. One common mistake to watch out for is to remember to update the relevant details in your Moodle &#039;&#039;config.php&#039;&#039; file.&lt;br /&gt;
&lt;br /&gt;
==Migrating a complete Moodle site - method 1==&lt;br /&gt;
&lt;br /&gt;
This involves moving a whole site from one server to another. If you are changing the domain/IP address to the new server you need to do these steps:&lt;br /&gt;
* &#039;&#039;&#039;Maintenance mode&#039;&#039;&#039;. Place your current Moodle site in maintenance mode to prevent any further additions to the Moodle database. Don&#039;t let administrators login during the migration as they are not affected by the maintenance mode setting.&lt;br /&gt;
* &#039;&#039;&#039;Backup your current Moodle database&#039;&#039;&#039;. Do this by following the instructions in the [[Upgrading | upgrading Moodle]] page. This will give you a text file containing the mysql dump.&lt;br /&gt;
* &#039;&#039;&#039;Copy the Moodle software&#039;&#039;&#039;. You will need to copy the Moodle code itself to the new server - upgrade the code to the latest version if you can.&lt;br /&gt;
* &#039;&#039;&#039;Change &amp;lt;code&amp;gt;$CFG-&amp;gt;wwwroot&amp;lt;/code&amp;gt;&#039;&#039;&#039;. In your (possibly new) Moodle directory, change the &amp;lt;code&amp;gt;$CFG-&amp;gt;wwwroot&amp;lt;/code&amp;gt; variable in the &#039;&#039;config.php&#039;&#039; file for the new server.&lt;br /&gt;
* &#039;&#039;&#039;Copy data directory contents (moodledata)&#039;&#039;&#039;. Copy the contents of your data directory (check for the value in &amp;lt;code&amp;gt;$CFG-&amp;gt;dataroot&amp;lt;/code&amp;gt;) to the new server. Check also that permissions remain the same on the new dataroot folder and change the value if you have changed its location on the new server.&lt;br /&gt;
* &#039;&#039;&#039;Change your Moodle URL&#039;&#039;&#039;. If you have a new URL, you&#039;ll need to change this in the Moodle database to the new server. This is needed as links to pictures, files, etc are stored as absolute links and will reference the old &amp;lt;code&amp;gt;$CFG-&amp;gt;wwwroot&amp;lt;/code&amp;gt; value. So when loading a mysql backup dump of the Moodle server into mysql on another server the absolute referenced links will be broken. There are two methods of doing this:&lt;br /&gt;
:(a) The first method changes the Moodle URL using the Moodle script &#039;&#039;replace.php&#039;&#039; while your site is currently running just before you backup the Moodle database. Point your browser to &amp;lt;nowiki&amp;gt;http://yourserver.com/admin/replace.php&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Enter the url for your old server (&amp;lt;nowiki&amp;gt;http://oldserver.com/&amp;lt;/nowiki&amp;gt;) and new server (&amp;lt;nowiki&amp;gt;http://newserver.com/&amp;lt;/nowiki&amp;gt;) and it will fix the mysql tables. You will also need to clear out any cached links by restarting your webserver. Now, take another backup of the Moodle database - this one will have the correct URLs.&lt;br /&gt;
&lt;br /&gt;
:(b) The second method is to backup the Moodle database first, then use the search and replace feature of your text editor (or use a unix tool like sed) to replace the old URL with the new one in the mysql backup file. Here is an example sed command:&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;code&amp;gt;#sed -e &#039;s/oldserver.com/newserver.com/g&#039; oldmysqldump.sql &amp;gt; newmysqldump.sql&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;TIP:&#039;&#039; You may want to check the mysqldump file to see how the old server was referenced.&lt;br /&gt;
:After changing the URL, restore the mysql database&lt;br /&gt;
* &#039;&#039;&#039;Test the migration&#039;&#039;&#039;. To test the new install, access Moodle using your browser and the new server&#039;s URL. When you have tested that a number of links in the courses work, take the new Moodle site out of maintenance mode.&lt;br /&gt;
&#039;&#039;&#039;See also&#039;&#039;&#039;: [http://moodle.org/mod/forum/discuss.php?d=85812 Forum discussion] on migrating Moodle&#039;s data directory on a Windows system.&lt;br /&gt;
&lt;br /&gt;
==Migrating a complete Moodle site - method 2==&lt;br /&gt;
&lt;br /&gt;
Do you have shell access on both servers? If so, the following method is a very quick and efficient method to migrate a *nix based site.&lt;br /&gt;
&lt;br /&gt;
It is also useful for creating snapshots or test sites.&lt;br /&gt;
*Set up a new empty database on the &#039;&#039;&#039;new&#039;&#039;&#039; server.&lt;br /&gt;
*Place your Moodle site into maintenance mode.&lt;br /&gt;
*Login to shell on the &#039;&#039;&#039;old&#039;&#039;&#039; server.&lt;br /&gt;
*Use rsync to copy &#039;&#039;&#039;moodledata&#039;&#039;&#039; and &#039;&#039;&#039;public_html&#039;&#039;&#039; (or whatever directory your Moodle install is in) to the new server - execute (replacing caps with your details; SOURCE = the directory you want to copy) for each directory:&lt;br /&gt;
::&amp;lt;code&amp;gt;rsync -av -e ssh SOURCE/ USERNAME@NEW_SERVER.COM:/PATH/TO/DESTINATION/&amp;lt;/code&amp;gt;&lt;br /&gt;
*Dump existing database and move and import into database on new server by executing:&lt;br /&gt;
::&amp;lt;code&amp;gt;mysqldump --allow-keywords --opt -uMySQL_USERNAME -pPASSWORD DATABASE | ssh USER@DOMAIN &amp;quot;mysql -uMySQL_USERNAME -pPASSWORD DATABASE&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
*On the &#039;&#039;&#039;new server&#039;&#039;&#039;, update &#039;&#039;&#039;config.php&#039;&#039;&#039; with relevant details.&lt;br /&gt;
*To fix any internal Moodle links, login to your &amp;quot;new&amp;quot; Moodle install on your new server and use &#039;&#039;&#039;admin/replace.php&#039;&#039;&#039; to search and replace the old uri for the new.&lt;br /&gt;
*Make sure everything is working.&lt;br /&gt;
&lt;br /&gt;
Takes about 15 minutes.&lt;br /&gt;
&lt;br /&gt;
When you are happy all has gone well, set up redirects/make DNS changes if required, take new site out of maintenance mode and &amp;quot;switch off&amp;quot; old site.&lt;br /&gt;
&lt;br /&gt;
==Other points to consider==&lt;br /&gt;
&lt;br /&gt;
===Upgrade Moodle===&lt;br /&gt;
&lt;br /&gt;
When migrating Moodle it is often a good idea to take the opportunity to upgrade Moodle to the latest version. If you manage your own server, follow the instructions in [[Upgrading | upgrading moodle]], otherwise check if your host can upgrade for you.&lt;br /&gt;
&lt;br /&gt;
===Restoring a single course across servers===&lt;br /&gt;
&lt;br /&gt;
You may need to restore a single course from an old site to a new one, especially if you are testing the migration. When restoring a Moodle backup file to Moodle on a different server than the one used to create the backup, the absolute referenced links to files maybe broken. To fix this problem open the &#039;&#039;backup-coursename.zip&#039;&#039; file and edit the &#039;&#039;moodle.xml&#039;&#039; file replacing links with &amp;lt;code&amp;gt;$@FILEPHP@$&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For example, replace &amp;lt;nowiki&amp;gt;http://yourserver.com/file.php/243/&amp;lt;/nowiki&amp;gt; with &amp;lt;code&amp;gt;$@FILEPHP@$&amp;lt;/code&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
When the file is restored it will use the correct file path for the new course.&lt;br /&gt;
&lt;br /&gt;
===DNS &amp;amp; Masquerading changes===&lt;br /&gt;
&lt;br /&gt;
You may have had to change the DNS entries for the new Moodle site. If you have done so, it will take some time for the changes to replicate, so be patient. If your server is located behind a firewall, you may also have to change your firewall rules to allow access to the new server. See the [[Masquerading | masquerading docs]].&lt;br /&gt;
&lt;br /&gt;
===Internal and external access===&lt;br /&gt;
&lt;br /&gt;
If you have a set up where your Moodle site can be accessed via a network and via the internet, ensure you check that the new site can be accessed internally and externally.  &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=62959 Changing Moodle URL] &lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=57477 Changing site address] &lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=76704 Upgrading whilst migrating] &lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=65450 Internal and external access] &lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
&lt;br /&gt;
[[fr:Migration de Moodle]]&lt;br /&gt;
[[nl:Moodle verhuizen]]&lt;br /&gt;
[[ja:Moodle移行]]&lt;/div&gt;</summary>
		<author><name>Harrysmith</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/404/en/index.php?title=Moodle_migration&amp;diff=35136</id>
		<title>Moodle migration</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/404/en/index.php?title=Moodle_migration&amp;diff=35136"/>
		<updated>2008-04-24T02:29:17Z</updated>

		<summary type="html">&lt;p&gt;Harrysmith: Reordered content for focus, added a second method, removed link as not relevant ot focus of page IMHO&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There may be times when you need to move your Moodle site from one server to another, for example, moving from shared hosting to a dedicated server - this is known as migrating your Moodle site. One common mistake to watch out for is to remember to update the relevant details in your Moodle &#039;&#039;config.php&#039;&#039; file.&lt;br /&gt;
&lt;br /&gt;
==Migrating a complete Moodle site - method 1==&lt;br /&gt;
&lt;br /&gt;
This involves moving a whole site from one server to another. If you are changing the domain/IP address to the new server you need to do these steps:&lt;br /&gt;
* &#039;&#039;&#039;Maintenance mode&#039;&#039;&#039;. Place your current Moodle site in maintenance mode to prevent any further additions to the Moodle database. Don&#039;t let administrators login during the migration as they are not affected by the maintenance mode setting.&lt;br /&gt;
* &#039;&#039;&#039;Backup your current Moodle database&#039;&#039;&#039;. Do this by following the instructions in the [[Upgrading | upgrading Moodle]] page. This will give you a text file containing the mysql dump.&lt;br /&gt;
* &#039;&#039;&#039;Copy the Moodle software&#039;&#039;&#039;. You will need to copy the Moodle code itself to the new server - upgrade the code to the latest version if you can.&lt;br /&gt;
* &#039;&#039;&#039;Change &amp;lt;code&amp;gt;$CFG-&amp;gt;wwwroot&amp;lt;/code&amp;gt;&#039;&#039;&#039;. In your (possibly new) Moodle directory, change the &amp;lt;code&amp;gt;$CFG-&amp;gt;wwwroot&amp;lt;/code&amp;gt; variable in the &#039;&#039;config.php&#039;&#039; file for the new server.&lt;br /&gt;
* &#039;&#039;&#039;Copy data directory contents (moodledata)&#039;&#039;&#039;. Copy the contents of your data directory (check for the value in &amp;lt;code&amp;gt;$CFG-&amp;gt;dataroot&amp;lt;/code&amp;gt;) to the new server. Check also that permissions remain the same on the new dataroot folder and change the value if you have changed its location on the new server.&lt;br /&gt;
* &#039;&#039;&#039;Change your Moodle URL&#039;&#039;&#039;. If you have a new URL, you&#039;ll need to change this in the Moodle database to the new server. This is needed as links to pictures, files, etc are stored as absolute links and will reference the old &amp;lt;code&amp;gt;$CFG-&amp;gt;wwwroot&amp;lt;/code&amp;gt; value. So when loading a mysql backup dump of the Moodle server into mysql on another server the absolute referenced links will be broken. There are two methods of doing this:&lt;br /&gt;
:(a) The first method changes the Moodle URL using the Moodle script &#039;&#039;replace.php&#039;&#039; while your site is currently running just before you backup the Moodle database. Point your browser to &amp;lt;nowiki&amp;gt;http://yourserver.com/admin/replace.php&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Enter the url for your old server (&amp;lt;nowiki&amp;gt;http://oldserver.com/&amp;lt;/nowiki&amp;gt;) and new server (&amp;lt;nowiki&amp;gt;http://newserver.com/&amp;lt;/nowiki&amp;gt;) and it will fix the mysql tables. You will also need to clear out any cached links by restarting your webserver. Now, take another backup of the Moodle database - this one will have the correct URLs.&lt;br /&gt;
&lt;br /&gt;
:(b) The second method is to backup the Moodle database first, then use the search and replace feature of your text editor (or use a unix tool like sed) to replace the old URL with the new one in the mysql backup file. Here is an example sed command:&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;code&amp;gt;#sed -e &#039;s/oldserver.com/newserver.com/g&#039; oldmysqldump.sql &amp;gt; newmysqldump.sql&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;Tip&#039;&#039;&#039;: You may want to check the mysqldump file to see how the old server was referenced.&lt;br /&gt;
:After changing the URL, restore the mysql database&lt;br /&gt;
* &#039;&#039;&#039;Test the migration&#039;&#039;&#039;. To test the new install, access Moodle using your browser and the new server&#039;s URL. When you have tested that a number of links in the courses work, take the new Moodle site out of maintenance mode.&lt;br /&gt;
&#039;&#039;&#039;See also&#039;&#039;&#039;: [http://moodle.org/mod/forum/discuss.php?d=85812 Forum discussion] on migrating Moodle&#039;s data directory on a Windows system.&lt;br /&gt;
&lt;br /&gt;
==Migrating a complete Moodle site - method 2==&lt;br /&gt;
&lt;br /&gt;
Do you have shell access on both servers? If so, the following method is a very quick and efficient method to migrate a *nix based site.&lt;br /&gt;
&lt;br /&gt;
It is also useful for creating snapshots or test sites.&lt;br /&gt;
*Set up a new empty database on the &#039;&#039;&#039;new&#039;&#039;&#039; server.&lt;br /&gt;
*Place your Moodle site into maintenance mode.&lt;br /&gt;
*Login to shell on the &#039;&#039;&#039;old&#039;&#039;&#039; server.&lt;br /&gt;
*Use rsync to copy &#039;&#039;&#039;moodledata&#039;&#039;&#039; and &#039;&#039;&#039;public_html&#039;&#039;&#039; (or whatever directory your Moodle install is in) to the new server - execute (replacing caps with your details; SOURCE = the directory you want to copy) for each directory:&lt;br /&gt;
::&amp;lt;code&amp;gt;rsync -av -e ssh SOURCE/ USERNAME@NEW_SERVER.COM:/PATH/TO/DESTINATION/&amp;lt;/code&amp;gt;&lt;br /&gt;
*Dump existing database and move and import into database on new server by executing:&lt;br /&gt;
::&amp;lt;code&amp;gt;mysqldump --allow-keywords --opt -uMySQL_USERNAME -pPASSWORD DATABASE | ssh USER@DOMAIN &amp;quot;mysql -uMySQL_USERNAME -pPASSWORD DATABASE&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
*On the &#039;&#039;&#039;new server&#039;&#039;&#039;, update &#039;&#039;&#039;config.php&#039;&#039;&#039; with relevant details.&lt;br /&gt;
*To fix any internal Moodle links, login to your &amp;quot;new&amp;quot; Moodle install on your new server and use &#039;&#039;&#039;admin/replace.php&#039;&#039;&#039; to search and replace the old uri for the new.&lt;br /&gt;
*Make sure everything is working.&lt;br /&gt;
&lt;br /&gt;
Takes about 15 minutes.&lt;br /&gt;
&lt;br /&gt;
When happy all has gone well, set up redirects/make DNS changes if required, take new site out of maintenance mode and &amp;quot;switch off&amp;quot; old site.&lt;br /&gt;
&lt;br /&gt;
==Other points to consider==&lt;br /&gt;
&lt;br /&gt;
===Upgrade Moodle===&lt;br /&gt;
&lt;br /&gt;
When migrating Moodle it is often a good idea to take the opportunity to upgrade Moodle to the latest version. If you manage your own server, follow the instructions in [[Upgrading | upgrading moodle]], otherwise check if your host can upgrade for you.&lt;br /&gt;
&lt;br /&gt;
===Restoring a single course across servers===&lt;br /&gt;
&lt;br /&gt;
You may need to restore a single course from an old site to a new one, especially if you are testing the migration. When restoring a Moodle backup file to Moodle on a different server than the one used to create the backup, the absolute referenced links to files maybe broken. To fix this problem open the &#039;&#039;backup-coursename.zip&#039;&#039; file and edit the &#039;&#039;moodle.xml&#039;&#039; file replacing links with &amp;lt;code&amp;gt;$@FILEPHP@$&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For example, replace &amp;lt;nowiki&amp;gt;http://yourserver.com/file.php/243/&amp;lt;/nowiki&amp;gt; with &amp;lt;code&amp;gt;$@FILEPHP@$&amp;lt;/code&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
When the file is restored it will use the correct file path for the new course.&lt;br /&gt;
&lt;br /&gt;
===DNS changes===&lt;br /&gt;
&lt;br /&gt;
You may have had to change the DNS entries for the new Moodle site. If you have done so, it will take some time for the changes to replicate, so be patient.&lt;br /&gt;
&lt;br /&gt;
===Internal and external access===&lt;br /&gt;
&lt;br /&gt;
If you have a set up where your Moodle site can be accessed via a network and via the internet, ensure you check that the new site can be accessed internally and externally.  &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=62959 Changing Moodle URL] &lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=57477 Changing site address] &lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=76704 Upgrading whilst migrating] &lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=65450 Internal and external access] &lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
&lt;br /&gt;
[[fr:Migration de Moodle]]&lt;br /&gt;
[[nl:Moodle verhuizen]]&lt;/div&gt;</summary>
		<author><name>Harrysmith</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/404/en/index.php?title=Upgrading&amp;diff=22020</id>
		<title>Upgrading</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/404/en/index.php?title=Upgrading&amp;diff=22020"/>
		<updated>2007-04-01T10:59:30Z</updated>

		<summary type="html">&lt;p&gt;Harrysmith: /* 3. Your database */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Moodle is designed to upgrade cleanly from any earlier version to any later version. Please refer to [[Upgrading to Moodle 1.6]], [[Upgrading to Moodle 1.7]] or [[Upgrading to Moodle 1.8]]  for particular considerations related to features of the version you are upgrading to.&lt;br /&gt;
__TOC__&lt;br /&gt;
When upgrading a Moodle installation you should follow these steps:&lt;br /&gt;
&lt;br /&gt;
==Check the system requirements==&lt;br /&gt;
Spend some time re-reading the [[Installing Moodle | installation documentation]]. Check the system requirements for the version you are upgrading to in &#039;&#039;Administration &amp;gt; Server &amp;gt; [[Environment]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Backup important data ==&lt;br /&gt;
&lt;br /&gt;
Although it is not strictly necessary, it is always a good idea to make a backup of any production system before a major upgrade, just in case you need to revert back to the older version for some reason. In fact, it&#039;s a good idea to automate your server to backup your Moodle installation daily, so that you can skip this step.&lt;br /&gt;
&lt;br /&gt;
There are three areas that need backing up:&lt;br /&gt;
&lt;br /&gt;
=== 1. The Moodle software directory itself ===&lt;br /&gt;
&lt;br /&gt;
Make a separate copy of these files before the upgrade, so that you can retrieve your config.php and any modules you have added like themes, languages etc&lt;br /&gt;
&lt;br /&gt;
=== 2. Your data directory ===&lt;br /&gt;
&lt;br /&gt;
This is where uploaded content resides (such as course resources and student assignments) so it is very important to have a backup of these files anyway. Sometimes upgrades may move or rename directories within your data directory.&lt;br /&gt;
&lt;br /&gt;
=== 3. Your database ===&lt;br /&gt;
&lt;br /&gt;
Most Moodle upgrades will alter the database tables, adding or changing fields. Each database has different ways to backup. One way of backing up a MySQL database is to &#039;dump&#039; it to a single SQL file. The following example shows Unix commands to dump the database called &amp;quot;moodle&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
 mysqldump -u username -p -C -Q -e -a moodle &amp;gt; moodle-backup-2007-04-01.sql&lt;br /&gt;
&lt;br /&gt;
Substitute your database user account for username. The -p flag will prompt you for the password for the username specified by -u.&lt;br /&gt;
&lt;br /&gt;
If your database host is different from the host you want to execute the backup command (usually the web server), you have to specify it with the -h option to mysqldump:&lt;br /&gt;
&lt;br /&gt;
 mysqldump -u username -p -h databasehost -C -Q -e -a moodle &amp;gt; moodle-backup-2007-04-01.sql &lt;br /&gt;
&lt;br /&gt;
You can also use the &amp;quot;Export&amp;quot; feature in Moodle&#039;s optional &amp;quot;MySQL Admin&amp;quot; web interface to do the same thing on all platforms. This interface can be downloaded from http://download.moodle.org/modules/integrations.php. It is an integration of PHPMyAdmin for the Moodle administration interface.&lt;br /&gt;
&lt;br /&gt;
== Install the new Moodle software ==&lt;br /&gt;
&lt;br /&gt;
=== Using a downloaded archive ===&lt;br /&gt;
&lt;br /&gt;
Do not overwrite an old installation unless you know what you are doing ... sometimes old files can cause problems in new installations. The best way is to rename the current Moodle directory to something else, then unpack the new Moodle archive into the old location.&lt;br /&gt;
&lt;br /&gt;
 mv moodle moodle.backup&lt;br /&gt;
 tar xvzf moodle-1.1.tgz&lt;br /&gt;
&lt;br /&gt;
Next, copy across your config.php and any other plugins such as custom themes:&lt;br /&gt;
&lt;br /&gt;
 cp moodle.backup/config.php moodle&lt;br /&gt;
 cp -pr moodle.backup/theme/mytheme moodle/theme/mytheme&lt;br /&gt;
&lt;br /&gt;
=== Using CVS ===&lt;br /&gt;
&lt;br /&gt;
You can use CVS for updating or upgrading your Moodle.&lt;br /&gt;
First you need to do a CVS checkout in your (empty) Moodle root directory.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;For Linux servers&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To do a CVS checkout of Moodle, you first have to logon to the Moodle CVS server.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;nowiki&amp;gt;cvs -d:pserver:anonymous@moodle.cvs.sourceforge.net:/cvsroot/moodle login&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  No password for anonymous, so just hit the Enter button.&lt;br /&gt;
&lt;br /&gt;
Go to the directory where you want the Moodle root to come and type&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;nowiki&amp;gt;cvs -z3 -d:pserver:anonymous@moodle.cvs.sourceforge.net:/cvsroot/moodle co -r MOODLE_18_STABLE moodle&amp;lt;/nowiki&amp;gt; &lt;br /&gt;
  (where MOODLE_18_STABLE is the desired version)&lt;br /&gt;
&lt;br /&gt;
To update, just go into the Moodle root directory and update to the new files:&lt;br /&gt;
&lt;br /&gt;
  cvs update -dP&lt;br /&gt;
To update to a new version type in the following and change 18 to whatever newest version upgrade number is&lt;br /&gt;
  cvs -Q update -dP -r MOODLE_18_STABLE&lt;br /&gt;
&lt;br /&gt;
Make sure you use the &amp;quot;d&amp;quot; parameter to create new directories if necessary, and the &amp;quot;P&amp;quot; parameter to prune empty directories.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;For Windows servers&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can use Tortoise CVS to do the initial checkout and the updates.&lt;br /&gt;
&lt;br /&gt;
If you have been editing Moodle files, watch the messages very closely for possible conflicts. All your customised themes and non-standard plugins will be untouched.&lt;br /&gt;
&lt;br /&gt;
Don&#039;t forget to visit the admin page after the CVS update proces has completed.&lt;br /&gt;
&lt;br /&gt;
== Finishing the upgrade ==&lt;br /&gt;
&lt;br /&gt;
The last step is to trigger the upgrade processes within Moodle.&lt;br /&gt;
&lt;br /&gt;
To do this just visit the admin page of your installation e.g. &#039;&#039;&amp;lt;nowiki&amp;gt;http://example.com/moodle/admin&amp;lt;/nowiki&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It doesn&#039;t matter if you are logged in as admin or not. If you are upgrading from some older versions you would not be able to login before the upgrade anyway.&lt;br /&gt;
&lt;br /&gt;
Moodle will automatically detect the new version and perform all the database or filesystem upgrades that are necessary. If there is anything it can&#039;t do itself (very rare) then you will see messages telling you what you need to do.&lt;br /&gt;
&lt;br /&gt;
Assuming all goes well (no error messages) then you can start using your new version of Moodle and enjoy the new features!&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*Using Moodle [http://moodle.org/mod/forum/view.php?id=28 Installation problems] forum&lt;br /&gt;
*[[Upgrading to Moodle 1.6]]&lt;br /&gt;
*[[Installing Moodle]]&lt;br /&gt;
*[[Installation FAQ]]&lt;br /&gt;
*[http://otaru-jc.ac.jp/hagley/howtoupgrademoodlewithcpanel.swf How to upgrade Moodle with cpanel tutorial].&lt;br /&gt;
*Using Moodle [http://moodle.org/mod/forum/discuss.php?d=26731&amp;amp;parent=125858 Using cvs] forum discussion&lt;br /&gt;
*Using Moodle [http://moodle.org/mod/forum/discuss.php?d=56915 Upgrading from 1.5.2 to 1.7] forum discussion&lt;br /&gt;
*Using Moodle [http://moodle.org/mod/forum/discuss.php?d=56991 Upgrade nightmares.... any help appreciated] forum discussion with a happy ending :-)&lt;br /&gt;
*Using Moodle [http://moodle.org/mod/forum/discuss.php?d=62463 After upgrading i get &amp;quot;Your site may not be secure.&amp;quot; msg.] forum discussion&lt;br /&gt;
&lt;br /&gt;
[[Category:Core]]&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
&lt;br /&gt;
[[es:Actualización de moodle]]&lt;br /&gt;
[[fr:Mise à jour]]&lt;br /&gt;
[[nl:Upgraden]]&lt;br /&gt;
[[zh:升级]]&lt;/div&gt;</summary>
		<author><name>Harrysmith</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/404/en/index.php?title=Upgrading&amp;diff=22019</id>
		<title>Upgrading</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/404/en/index.php?title=Upgrading&amp;diff=22019"/>
		<updated>2007-04-01T09:47:02Z</updated>

		<summary type="html">&lt;p&gt;Harrysmith: /* Using CVS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Moodle is designed to upgrade cleanly from any earlier version to any later version. Please refer to [[Upgrading to Moodle 1.6]], [[Upgrading to Moodle 1.7]] or [[Upgrading to Moodle 1.8]]  for particular considerations related to features of the version you are upgrading to.&lt;br /&gt;
__TOC__&lt;br /&gt;
When upgrading a Moodle installation you should follow these steps:&lt;br /&gt;
&lt;br /&gt;
==Check the system requirements==&lt;br /&gt;
Spend some time re-reading the [[Installing Moodle | installation documentation]]. Check the system requirements for the version you are upgrading to in &#039;&#039;Administration &amp;gt; Server &amp;gt; [[Environment]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Backup important data ==&lt;br /&gt;
&lt;br /&gt;
Although it is not strictly necessary, it is always a good idea to make a backup of any production system before a major upgrade, just in case you need to revert back to the older version for some reason. In fact, it&#039;s a good idea to automate your server to backup your Moodle installation daily, so that you can skip this step.&lt;br /&gt;
&lt;br /&gt;
There are three areas that need backing up:&lt;br /&gt;
&lt;br /&gt;
=== 1. The Moodle software directory itself ===&lt;br /&gt;
&lt;br /&gt;
Make a separate copy of these files before the upgrade, so that you can retrieve your config.php and any modules you have added like themes, languages etc&lt;br /&gt;
&lt;br /&gt;
=== 2. Your data directory ===&lt;br /&gt;
&lt;br /&gt;
This is where uploaded content resides (such as course resources and student assignments) so it is very important to have a backup of these files anyway. Sometimes upgrades may move or rename directories within your data directory.&lt;br /&gt;
&lt;br /&gt;
=== 3. Your database ===&lt;br /&gt;
&lt;br /&gt;
Most Moodle upgrades will alter the database tables, adding or changing fields. Each database has different ways to backup. One way of backing up a MySQL database is to &#039;dump&#039; it to a single SQL file. The following example shows Unix commands to dump the database called &amp;quot;moodle&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
 mysqldump -u username -p -C -Q -e -a moodle &amp;gt; moodle-backup-2007-04-01.sql&lt;br /&gt;
&lt;br /&gt;
Substitute your database user account for username. The -p flag will prompt you for the password for the username specified by -u.&lt;br /&gt;
&lt;br /&gt;
If your database host is different from the host you want to execute the backup command (usually the web server), you have to specify it with the -h option to mysqldump:&lt;br /&gt;
&lt;br /&gt;
 mysqldump -u username -p -h databasehost -C -Q -e -a moodle &amp;gt; moodle-backup-007-04-01.sql &lt;br /&gt;
&lt;br /&gt;
You can also use the &amp;quot;Export&amp;quot; feature in Moodle&#039;s optional &amp;quot;MySQL Admin&amp;quot; web interface to do the same thing on all platforms. This interface can be downloaded from http://download.moodle.org/modules/integrations.php. It is an integration of PHPMyAdmin for the Moodle administration interface.&lt;br /&gt;
&lt;br /&gt;
== Install the new Moodle software ==&lt;br /&gt;
&lt;br /&gt;
=== Using a downloaded archive ===&lt;br /&gt;
&lt;br /&gt;
Do not overwrite an old installation unless you know what you are doing ... sometimes old files can cause problems in new installations. The best way is to rename the current Moodle directory to something else, then unpack the new Moodle archive into the old location.&lt;br /&gt;
&lt;br /&gt;
 mv moodle moodle.backup&lt;br /&gt;
 tar xvzf moodle-1.1.tgz&lt;br /&gt;
&lt;br /&gt;
Next, copy across your config.php and any other plugins such as custom themes:&lt;br /&gt;
&lt;br /&gt;
 cp moodle.backup/config.php moodle&lt;br /&gt;
 cp -pr moodle.backup/theme/mytheme moodle/theme/mytheme&lt;br /&gt;
&lt;br /&gt;
=== Using CVS ===&lt;br /&gt;
&lt;br /&gt;
You can use CVS for updating or upgrading your Moodle.&lt;br /&gt;
First you need to do a CVS checkout in your (empty) Moodle root directory.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;For Linux servers&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To do a CVS checkout of Moodle, you first have to logon to the Moodle CVS server.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;nowiki&amp;gt;cvs -d:pserver:anonymous@moodle.cvs.sourceforge.net:/cvsroot/moodle login&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  No password for anonymous, so just hit the Enter button.&lt;br /&gt;
&lt;br /&gt;
Go to the directory where you want the Moodle root to come and type&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;nowiki&amp;gt;cvs -z3 -d:pserver:anonymous@moodle.cvs.sourceforge.net:/cvsroot/moodle co -r MOODLE_18_STABLE moodle&amp;lt;/nowiki&amp;gt; &lt;br /&gt;
  (where MOODLE_18_STABLE is the desired version)&lt;br /&gt;
&lt;br /&gt;
To update, just go into the Moodle root directory and update to the new files:&lt;br /&gt;
&lt;br /&gt;
  cvs update -dP&lt;br /&gt;
To update to a new version type in the following and change 18 to whatever newest version upgrade number is&lt;br /&gt;
  cvs -Q update -dP -r MOODLE_18_STABLE&lt;br /&gt;
&lt;br /&gt;
Make sure you use the &amp;quot;d&amp;quot; parameter to create new directories if necessary, and the &amp;quot;P&amp;quot; parameter to prune empty directories.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;For Windows servers&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can use Tortoise CVS to do the initial checkout and the updates.&lt;br /&gt;
&lt;br /&gt;
If you have been editing Moodle files, watch the messages very closely for possible conflicts. All your customised themes and non-standard plugins will be untouched.&lt;br /&gt;
&lt;br /&gt;
Don&#039;t forget to visit the admin page after the CVS update proces has completed.&lt;br /&gt;
&lt;br /&gt;
== Finishing the upgrade ==&lt;br /&gt;
&lt;br /&gt;
The last step is to trigger the upgrade processes within Moodle.&lt;br /&gt;
&lt;br /&gt;
To do this just visit the admin page of your installation e.g. &#039;&#039;&amp;lt;nowiki&amp;gt;http://example.com/moodle/admin&amp;lt;/nowiki&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It doesn&#039;t matter if you are logged in as admin or not. If you are upgrading from some older versions you would not be able to login before the upgrade anyway.&lt;br /&gt;
&lt;br /&gt;
Moodle will automatically detect the new version and perform all the database or filesystem upgrades that are necessary. If there is anything it can&#039;t do itself (very rare) then you will see messages telling you what you need to do.&lt;br /&gt;
&lt;br /&gt;
Assuming all goes well (no error messages) then you can start using your new version of Moodle and enjoy the new features!&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*Using Moodle [http://moodle.org/mod/forum/view.php?id=28 Installation problems] forum&lt;br /&gt;
*[[Upgrading to Moodle 1.6]]&lt;br /&gt;
*[[Installing Moodle]]&lt;br /&gt;
*[[Installation FAQ]]&lt;br /&gt;
*[http://otaru-jc.ac.jp/hagley/howtoupgrademoodlewithcpanel.swf How to upgrade Moodle with cpanel tutorial].&lt;br /&gt;
*Using Moodle [http://moodle.org/mod/forum/discuss.php?d=26731&amp;amp;parent=125858 Using cvs] forum discussion&lt;br /&gt;
*Using Moodle [http://moodle.org/mod/forum/discuss.php?d=56915 Upgrading from 1.5.2 to 1.7] forum discussion&lt;br /&gt;
*Using Moodle [http://moodle.org/mod/forum/discuss.php?d=56991 Upgrade nightmares.... any help appreciated] forum discussion with a happy ending :-)&lt;br /&gt;
*Using Moodle [http://moodle.org/mod/forum/discuss.php?d=62463 After upgrading i get &amp;quot;Your site may not be secure.&amp;quot; msg.] forum discussion&lt;br /&gt;
&lt;br /&gt;
[[Category:Core]]&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
&lt;br /&gt;
[[es:Actualización de moodle]]&lt;br /&gt;
[[fr:Mise à jour]]&lt;br /&gt;
[[nl:Upgraden]]&lt;br /&gt;
[[zh:升级]]&lt;/div&gt;</summary>
		<author><name>Harrysmith</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/404/en/index.php?title=Upgrading&amp;diff=22018</id>
		<title>Upgrading</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/404/en/index.php?title=Upgrading&amp;diff=22018"/>
		<updated>2007-04-01T09:45:40Z</updated>

		<summary type="html">&lt;p&gt;Harrysmith: /* 3. Your database */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Moodle is designed to upgrade cleanly from any earlier version to any later version. Please refer to [[Upgrading to Moodle 1.6]], [[Upgrading to Moodle 1.7]] or [[Upgrading to Moodle 1.8]]  for particular considerations related to features of the version you are upgrading to.&lt;br /&gt;
__TOC__&lt;br /&gt;
When upgrading a Moodle installation you should follow these steps:&lt;br /&gt;
&lt;br /&gt;
==Check the system requirements==&lt;br /&gt;
Spend some time re-reading the [[Installing Moodle | installation documentation]]. Check the system requirements for the version you are upgrading to in &#039;&#039;Administration &amp;gt; Server &amp;gt; [[Environment]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Backup important data ==&lt;br /&gt;
&lt;br /&gt;
Although it is not strictly necessary, it is always a good idea to make a backup of any production system before a major upgrade, just in case you need to revert back to the older version for some reason. In fact, it&#039;s a good idea to automate your server to backup your Moodle installation daily, so that you can skip this step.&lt;br /&gt;
&lt;br /&gt;
There are three areas that need backing up:&lt;br /&gt;
&lt;br /&gt;
=== 1. The Moodle software directory itself ===&lt;br /&gt;
&lt;br /&gt;
Make a separate copy of these files before the upgrade, so that you can retrieve your config.php and any modules you have added like themes, languages etc&lt;br /&gt;
&lt;br /&gt;
=== 2. Your data directory ===&lt;br /&gt;
&lt;br /&gt;
This is where uploaded content resides (such as course resources and student assignments) so it is very important to have a backup of these files anyway. Sometimes upgrades may move or rename directories within your data directory.&lt;br /&gt;
&lt;br /&gt;
=== 3. Your database ===&lt;br /&gt;
&lt;br /&gt;
Most Moodle upgrades will alter the database tables, adding or changing fields. Each database has different ways to backup. One way of backing up a MySQL database is to &#039;dump&#039; it to a single SQL file. The following example shows Unix commands to dump the database called &amp;quot;moodle&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
 mysqldump -u username -p -C -Q -e -a moodle &amp;gt; moodle-backup-2007-04-01.sql&lt;br /&gt;
&lt;br /&gt;
Substitute your database user account for username. The -p flag will prompt you for the password for the username specified by -u.&lt;br /&gt;
&lt;br /&gt;
If your database host is different from the host you want to execute the backup command (usually the web server), you have to specify it with the -h option to mysqldump:&lt;br /&gt;
&lt;br /&gt;
 mysqldump -u username -p -h databasehost -C -Q -e -a moodle &amp;gt; moodle-backup-007-04-01.sql &lt;br /&gt;
&lt;br /&gt;
You can also use the &amp;quot;Export&amp;quot; feature in Moodle&#039;s optional &amp;quot;MySQL Admin&amp;quot; web interface to do the same thing on all platforms. This interface can be downloaded from http://download.moodle.org/modules/integrations.php. It is an integration of PHPMyAdmin for the Moodle administration interface.&lt;br /&gt;
&lt;br /&gt;
== Install the new Moodle software ==&lt;br /&gt;
&lt;br /&gt;
=== Using a downloaded archive ===&lt;br /&gt;
&lt;br /&gt;
Do not overwrite an old installation unless you know what you are doing ... sometimes old files can cause problems in new installations. The best way is to rename the current Moodle directory to something else, then unpack the new Moodle archive into the old location.&lt;br /&gt;
&lt;br /&gt;
 mv moodle moodle.backup&lt;br /&gt;
 tar xvzf moodle-1.1.tgz&lt;br /&gt;
&lt;br /&gt;
Next, copy across your config.php and any other plugins such as custom themes:&lt;br /&gt;
&lt;br /&gt;
 cp moodle.backup/config.php moodle&lt;br /&gt;
 cp -pr moodle.backup/theme/mytheme moodle/theme/mytheme&lt;br /&gt;
&lt;br /&gt;
=== Using CVS ===&lt;br /&gt;
&lt;br /&gt;
You can use CVS for updating or upgrading your Moodle.&lt;br /&gt;
First you need to do a CVS checkout in your (empty) Moodle root directory.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;For Linux servers&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To do a CVS checkout of Moodle, you first have to logon to the Moodle CVS server.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;nowiki&amp;gt;cvs -d:pserver:anonymous@moodle.cvs.sourceforge.net:/cvsroot/moodle login&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  No password for anonymous, so just hit the Enter button.&lt;br /&gt;
&lt;br /&gt;
Go to the directory where you want the Moodle root to come and type&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;nowiki&amp;gt;cvs -z3 -d:pserver:anonymous@moodle.cvs.sourceforge.net:/cvsroot/moodle co -r MOODLE_15_STABLE moodle&amp;lt;/nowiki&amp;gt; &lt;br /&gt;
  (where MOODLE_15_STABLE is the desired version)&lt;br /&gt;
&lt;br /&gt;
To update, just go into the Moodle root directory and update to the new files:&lt;br /&gt;
&lt;br /&gt;
  cvs update -dP&lt;br /&gt;
To update to a new version type in the following and change 17 to whatever newest version upgrade number is&lt;br /&gt;
  cvs -Q update -dP -r MOODLE_17_STABLE&lt;br /&gt;
&lt;br /&gt;
Make sure you use the &amp;quot;d&amp;quot; parameter to create new directories if necessary, and the &amp;quot;P&amp;quot; parameter to prune empty directories.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;For Windows servers&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can use Tortoise CVS to do the initial checkout and the updates.&lt;br /&gt;
&lt;br /&gt;
If you have been editing Moodle files, watch the messages very closely for possible conflicts. All your customised themes and non-standard plugins will be untouched.&lt;br /&gt;
&lt;br /&gt;
Don&#039;t forget to visit the admin page after the CVS update proces has completed.&lt;br /&gt;
&lt;br /&gt;
== Finishing the upgrade ==&lt;br /&gt;
&lt;br /&gt;
The last step is to trigger the upgrade processes within Moodle.&lt;br /&gt;
&lt;br /&gt;
To do this just visit the admin page of your installation e.g. &#039;&#039;&amp;lt;nowiki&amp;gt;http://example.com/moodle/admin&amp;lt;/nowiki&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It doesn&#039;t matter if you are logged in as admin or not. If you are upgrading from some older versions you would not be able to login before the upgrade anyway.&lt;br /&gt;
&lt;br /&gt;
Moodle will automatically detect the new version and perform all the database or filesystem upgrades that are necessary. If there is anything it can&#039;t do itself (very rare) then you will see messages telling you what you need to do.&lt;br /&gt;
&lt;br /&gt;
Assuming all goes well (no error messages) then you can start using your new version of Moodle and enjoy the new features!&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*Using Moodle [http://moodle.org/mod/forum/view.php?id=28 Installation problems] forum&lt;br /&gt;
*[[Upgrading to Moodle 1.6]]&lt;br /&gt;
*[[Installing Moodle]]&lt;br /&gt;
*[[Installation FAQ]]&lt;br /&gt;
*[http://otaru-jc.ac.jp/hagley/howtoupgrademoodlewithcpanel.swf How to upgrade Moodle with cpanel tutorial].&lt;br /&gt;
*Using Moodle [http://moodle.org/mod/forum/discuss.php?d=26731&amp;amp;parent=125858 Using cvs] forum discussion&lt;br /&gt;
*Using Moodle [http://moodle.org/mod/forum/discuss.php?d=56915 Upgrading from 1.5.2 to 1.7] forum discussion&lt;br /&gt;
*Using Moodle [http://moodle.org/mod/forum/discuss.php?d=56991 Upgrade nightmares.... any help appreciated] forum discussion with a happy ending :-)&lt;br /&gt;
*Using Moodle [http://moodle.org/mod/forum/discuss.php?d=62463 After upgrading i get &amp;quot;Your site may not be secure.&amp;quot; msg.] forum discussion&lt;br /&gt;
&lt;br /&gt;
[[Category:Core]]&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
&lt;br /&gt;
[[es:Actualización de moodle]]&lt;br /&gt;
[[fr:Mise à jour]]&lt;br /&gt;
[[nl:Upgraden]]&lt;br /&gt;
[[zh:升级]]&lt;/div&gt;</summary>
		<author><name>Harrysmith</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/404/en/index.php?title=Development:Roles&amp;diff=11737</id>
		<title>Development:Roles</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/404/en/index.php?title=Development:Roles&amp;diff=11737"/>
		<updated>2006-06-08T17:12:01Z</updated>

		<summary type="html">&lt;p&gt;Harrysmith: /* Admin - Catgory based */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Roles and capabilities&#039;&#039;&#039; are planned to be included in Moodle 1.7. For now, we have some basic ideas of how to implement such a structure in Moodle.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Please note that none of the following is finalised.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Definitions==&lt;br /&gt;
&lt;br /&gt;
By roles, we mean an identifier of the user&#039;s status, for example, teacher, student and forum moderator are examples of roles.&lt;br /&gt;
&lt;br /&gt;
A capability is a permission to access some particular Moodle feature. Capabilities are associated with roles. For example, &#039;&#039;forum_canreadpost&#039;&#039; is a capability.&lt;br /&gt;
&lt;br /&gt;
==The existing system==&lt;br /&gt;
&lt;br /&gt;
Currently in Moodle, we have a fixed set of roles i.e. primary admin, admins, course creators, editing teachers, non-editing teachers, students, and guests. For each role, the capability or actions that they can performed are fixed. For example, the role student allows the user to submit an assignment, but doesn&#039;t allow the user to browse/edit other users&#039; work. By using this setup we limit ourselves to a rather rigid set of capabilities for each role. If we want, say a particular student or group to be able to mark assignments in a particular course, we can&#039;t do that without giving these users teacher privileges.&lt;br /&gt;
&lt;br /&gt;
==The new roles and capability system==&lt;br /&gt;
&lt;br /&gt;
The new system will allow authorized users to define an arbitrary number of roles. Each role can have a customizable set of capabilities in every context. A context can be the whole Moodle site, a course, or a module instance, e.g. quiz 5 in &#039;Introduction to Photography&#039;. An authorized user will be able to assign an arbitrary number of roles to each user. Since the capabilities in each role could be different, there could be conflict in capabilities. This is resolved by giving roles different &#039;priorities&#039;. For example, to prevent a naughty student from posting, one could assign him a &#039;naughty student&#039; role that does not allow him to post. This role should have a priority higher than that of a normal &#039;student&#039; role. &lt;br /&gt;
&lt;br /&gt;
To facilitate exceptional cases in roles and capabilities, we can use exception rules. For example, we can specify a rule saying that all students are able to mark/read other students&#039; assignment in this particular course. Note that such rules need to have a priority as well. The capability of a user, in any context is then resolved by finding the highest priority role/rule.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;A smooth upgrade will be provided with 1.7. The existing roles (admin, teacher, student, etc), and the exisiting capabilities will be retained. This is done by creating default roles at site/course levels, and assigning the current users to these roles accordingly. The default roles will have default capabilities associated with them, which pretty much is what we have  in 1.6. The whole process is automatic so there&#039;s nothing to worry about =). With no modifications, Moodle will operate exactly the same before and after the upgrade.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==The plan==&lt;br /&gt;
&lt;br /&gt;
There are a few major things that need to be done. Here&#039;s a list (in no particular order):&lt;br /&gt;
&lt;br /&gt;
#Identify permissions required for site/course/each module.&lt;br /&gt;
#Define the database structure for storing roles and capabilities.&lt;br /&gt;
#Recode the whole of Moodle, including all modules to support the new structure. Instead of using &amp;lt;code&amp;gt;isteacher()&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;isstudent()&amp;lt;/code&amp;gt; we should be using &amp;lt;code&amp;gt;has_capabity($capability, $instanceid)&amp;lt;/code&amp;gt; etc. A new API for handling roles and capabilities will be implemented (accesslib.php).&lt;br /&gt;
#Add storage of capabilities for each module. Can be done either in a file, e.g. db/capability.xml, or as a sql file that gets installed to a central db whenever this module is installed. Either way, what do we do when we need to upgrade these capabilities? Some capabilities might needs refining/splitting later on. How do we control the &#039;version&#039; of a capability?&lt;br /&gt;
#Consider interface issues, especially how to manage conflicting role/exception rules.&lt;br /&gt;
#Upon logging in, we should use a cache to store capability, down to module level. How should that be structured?&lt;br /&gt;
#Consider the impact on backup/restore.&lt;br /&gt;
#Upgrade path for current users. The user information in table user_coursecreators, user_admins, user_teachers, and user_students will most likely be migrated to the new roles and capabilities tables. The users will most likely be assigned default roles that comes with default capabilities (e.g. teachers, admins, students, etc). The old tables themselves could possibly be dropped at the end of the upgrade.&lt;br /&gt;
&lt;br /&gt;
==Capabilities==&lt;br /&gt;
&lt;br /&gt;
This is a comprehensive list of capabilities, well, in the making. Please edit. Should we distinguish canedit and candelete?&lt;br /&gt;
&lt;br /&gt;
What about a canview capability? Like for choice, where a person is allowed to see the choice question but not participate in it? --[[User:N Hansen|N Hansen]] 19:29, 16 May 2006 (WST)&lt;br /&gt;
&lt;br /&gt;
Certainly need a canview or cansee capability for parents as linked to their childs data/contributions.&lt;br /&gt;
&lt;br /&gt;
Do we need to add canview and cansearch logs at site/course/user/group level?&lt;br /&gt;
&lt;br /&gt;
===Site-level Capabilities===&lt;br /&gt;
&lt;br /&gt;
#canconfigsitevariables - applcialbe in admin/config.php&lt;br /&gt;
#canreadblogs&lt;br /&gt;
#canpostblogs&lt;br /&gt;
#candeleteallblogs&lt;br /&gt;
#canbrowseuser&lt;br /&gt;
#canviewhiddenactivity&lt;br /&gt;
#cancreatecourse&lt;br /&gt;
#caneditownprofile&lt;br /&gt;
#caneditallprofiles&lt;br /&gt;
&lt;br /&gt;
===Course-level Capabilities===&lt;br /&gt;
&lt;br /&gt;
#viewcoursecontent&lt;br /&gt;
#caneditcourse&lt;br /&gt;
#cancreatebackups&lt;br /&gt;
#canrestorebackups&lt;br /&gt;
#cancreateblocks&lt;br /&gt;
#caneditblocks&lt;br /&gt;
#candeleteblocks&lt;br /&gt;
&lt;br /&gt;
===Module-level Capabilities===&lt;br /&gt;
&lt;br /&gt;
#Assignment&lt;br /&gt;
##assignment_canadd&lt;br /&gt;
##assignment_canedit&lt;br /&gt;
##assignment_candelete&lt;br /&gt;
##assignment_cansubmit&lt;br /&gt;
##assignment_mark - marking, viewing of list of submitted assignments&lt;br /&gt;
##assignment_canviewsubmissions&lt;br /&gt;
#Chat&lt;br /&gt;
##chat_canadd&lt;br /&gt;
##chat_canedit&lt;br /&gt;
##chat_candelete&lt;br /&gt;
##chat_canparticipate&lt;br /&gt;
##chat_canviewpastsessions&lt;br /&gt;
#Choice&lt;br /&gt;
##choice_canadd&lt;br /&gt;
##choice_canedit&lt;br /&gt;
##choice_candelete&lt;br /&gt;
##choice_canparticipate&lt;br /&gt;
##choice_canviewresponses&lt;br /&gt;
#Database&lt;br /&gt;
##database_canadd&lt;br /&gt;
##database_canedit&lt;br /&gt;
##databaes_candelete&lt;br /&gt;
##database_canaddentry&lt;br /&gt;
##database_canaddtemplates&lt;br /&gt;
##database_canedittemplates&lt;br /&gt;
##database_candeleteownentry&lt;br /&gt;
##database_candeleteallentry&lt;br /&gt;
##database_cancomment&lt;br /&gt;
##database_candeletecomment&lt;br /&gt;
##database_canrate&lt;br /&gt;
#Exercise&lt;br /&gt;
##exercise_canadd&lt;br /&gt;
##exercise_canedit&lt;br /&gt;
##exercise_candelete&lt;br /&gt;
##exercise_canassess&lt;br /&gt;
#Forum&lt;br /&gt;
##forum_canadd&lt;br /&gt;
##forum_canedit&lt;br /&gt;
##forum_candelete&lt;br /&gt;
##forum_canreadpost&lt;br /&gt;
##forum_canstartnewdiscussion&lt;br /&gt;
##forum_canreply&lt;br /&gt;
##forum_caneditallpost&lt;br /&gt;
##forum_candeleteallpost&lt;br /&gt;
##forum_canrate&lt;br /&gt;
#Glossary&lt;br /&gt;
##glossary_canadd&lt;br /&gt;
##glossary_canedit&lt;br /&gt;
##glossary_candelete&lt;br /&gt;
##glossary_canaddcat&lt;br /&gt;
##glossary_caneditcat&lt;br /&gt;
##glossary_candeletecat&lt;br /&gt;
##glossary_canadditem&lt;br /&gt;
##glossary_candeleteitem&lt;br /&gt;
##glossary_canedititem&lt;br /&gt;
##glossary_cancomment&lt;br /&gt;
##glossary_canimportentries&lt;br /&gt;
##glossary_canexportentries&lt;br /&gt;
##glossary_canapprove&lt;br /&gt;
#Hotpot&lt;br /&gt;
##hotpot_candd&lt;br /&gt;
##hotpot_canedit&lt;br /&gt;
##hotpot_candelete&lt;br /&gt;
##hotpot_canparticipate&lt;br /&gt;
#Label&lt;br /&gt;
##label_canadd&lt;br /&gt;
##label_canedit&lt;br /&gt;
##label_candelete&lt;br /&gt;
#Lams&lt;br /&gt;
##lams_canadd&lt;br /&gt;
##lams_canedit&lt;br /&gt;
##lams_candelete&lt;br /&gt;
#Lesson&lt;br /&gt;
##lesson_canadd&lt;br /&gt;
##lesson_canedit&lt;br /&gt;
##lesson_candelete&lt;br /&gt;
##lesson_canparticipate&lt;br /&gt;
#Quiz&lt;br /&gt;
##quiz_canadd&lt;br /&gt;
##quiz_canedit&lt;br /&gt;
##quiz_candelete&lt;br /&gt;
##quiz_canaddquestion&lt;br /&gt;
##quiz_caneditquestion&lt;br /&gt;
##quiz_candeletequestion&lt;br /&gt;
##quiz_canparticipate&lt;br /&gt;
##quiz_cangrade&lt;br /&gt;
#Resource&lt;br /&gt;
##resource_canadd&lt;br /&gt;
##resource_canedit&lt;br /&gt;
##resource_candelete&lt;br /&gt;
#Scorm&lt;br /&gt;
##scorm_canadd&lt;br /&gt;
##scorm_canedit&lt;br /&gt;
##socrm_candelete&lt;br /&gt;
#Survey&lt;br /&gt;
##survey_canadd&lt;br /&gt;
##survey_canedit&lt;br /&gt;
##survey_candelete&lt;br /&gt;
##survey_canviewresponses&lt;br /&gt;
#Wiki&lt;br /&gt;
##wiki_canadd&lt;br /&gt;
##wiki_canedit&lt;br /&gt;
##wiki_candelete&lt;br /&gt;
##wiki_canstartnewwiki&lt;br /&gt;
##wiki_canparticipate&lt;br /&gt;
#Workshop&lt;br /&gt;
##workshop_canadd&lt;br /&gt;
##workshop_canedit&lt;br /&gt;
##workshop_candelete&lt;br /&gt;
##workshop_cangrade&lt;br /&gt;
##workshop_canparticipate&lt;br /&gt;
&lt;br /&gt;
==Scenarios==&lt;br /&gt;
&lt;br /&gt;
This section is for brainstorming some example roles that we would like to support:&lt;br /&gt;
&lt;br /&gt;
===Student===&lt;br /&gt;
Has this one been missed?&lt;br /&gt;
&lt;br /&gt;
===Site Designers===&lt;br /&gt;
Is there a role for peole involved in how the site looks but not full administrators? Thinking here of online control of themes rather than FTP theme uploading. But in either case they caneditlogos, caneditcss, candeditlevelatwhichthemeapplies.&lt;br /&gt;
&lt;br /&gt;
===Educational Authority Adviser===&lt;br /&gt;
Someone who would want to browse the site and may be asked to comment or contribute to particular discussions or developments in school. Access for this role would be controlled by the school in the case of school level moodles but may be different if there were to be a Local Authority wide Moodle.&lt;br /&gt;
&lt;br /&gt;
===Educational Inspector===&lt;br /&gt;
Someone who will visit the site to verify the school&#039;s self review that comments on home school relationships, extending the classroom etc. They may want to see summaries of usage and reports from surveys garnering parent and pupil views.&lt;br /&gt;
&lt;br /&gt;
===Second Marker / Moderator===&lt;br /&gt;
A teacher within ths site that has access to assignments and quizzes from another teacher&#039;s course for second marking purposes. This may need additional functionality adding to the assignment module so that two sets of grades/feedback can be given to one set of assignments.&lt;br /&gt;
&lt;br /&gt;
===External Examiner===&lt;br /&gt;
Has all the rights of inpectors, but would also need to be able to review assignments and feedback, view forums, glossaries etc. However, would not want to post, feedback onto the site at all.&lt;br /&gt;
&lt;br /&gt;
===Parent===&lt;br /&gt;
A parent will have one or more children in one or more institutions which could be using one or more moodle instances or a mixture of Learning Platforms. A parent&#039;s role will vary depending on the age of their children and whether they are contributing as a parent or a school supporter.&lt;br /&gt;
&lt;br /&gt;
In Early Years (EY) and Key Stage 1 (KS1) they may play/learn on an activity or write for the child. Parents often interpret homework tasks and read to their children perhaps filling in a joint reading diary.&lt;br /&gt;
&lt;br /&gt;
In Key stages 3 and 4 this changes to more of a monitoring/awareness role where a parent would expect to have a summary report of attendance, attainment and general achievement on a weekly/monthly/termly or annual basis. Parents will often be asked to sign and write back comments about this review report.&lt;br /&gt;
&lt;br /&gt;
In all Key Stages there is a great need for parents to receive communication from the school which they can confirm they have received by signing a form. In some cases this may also involve making choices from a list. It may also involve payment for a trip or disco being returned so there could be the possibility of electronic payments.&lt;br /&gt;
&lt;br /&gt;
Parent&#039;s evening often involve complex booking systems that attempt to get parent&#039;s and teachers together. Easy for EY/KS1/KS2 very difficult for KS3/KS4. Wow would this help if it was built into the Learning Platform.&lt;br /&gt;
&lt;br /&gt;
In some cases there needs to be confidential communication between the parent and the teacher without the child being party to this. It may involve teaching and learning but could also involve a behaviour or medical issue. Often this may be done via a sealed letter or face to face. &lt;br /&gt;
&lt;br /&gt;
The latest incarnation of OfSTED with the Self Review Framework (SEF) there is a greater emphasis on schools gathering parent voice via surveys and discussion. There is a clear match here with parents have access to parental votes, questionnaires and discussions and for schools to be able to publish news, results and reports back to parents.&lt;br /&gt;
&lt;br /&gt;
In the UK the LP framework and agenda as being pushed by the DfES via Becta emphasises that within the mandatory groups and roles functionality the parent role is likely to be required to meet the LP Framework procurement standard.&lt;br /&gt;
&lt;br /&gt;
===Manager===&lt;br /&gt;
&#039;&#039;Please add text here...&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Weekly Seminar Leader===&lt;br /&gt;
&#039;&#039;In a university seminar, typically 8-15 students in their 3rd/4th year, each student is responsible for leading one topic in a study series.  I ask each student to research 5-10 resources, then give a powerpoint presentation to the other students.  This is followed by an in-class discussion and then online homework.  The homework involves some fun quiz questions and then some reflective journal questions.  I ask each seminar leader to prepare the quiz questions and journal questions as well as their presentation.  To do that, I would like to assign activity-making/authoring roles to the student--either for a short period, or for duration of the whole course.  Thus &amp;quot;Allow Quiz Authoring Role&amp;quot; or &amp;quot;Allow Assignment Authoring Role&amp;quot; at the course level or, if possible, even the Topic level (in a topic or week format course) would be important.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Mentor/Mentee===&lt;br /&gt;
&#039;&#039;Please add text here...&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Community-Designed Rating Criteria===&lt;br /&gt;
&#039;&#039;The gradebook tends to be the domain of the teacher.  What if community/peer ratings/marks could also be entered there? What if peer assessment criteria could be designed by the students, not just the teacher?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Visitor===&lt;br /&gt;
&lt;br /&gt;
This would be a role whereby one could allow a visitor to visit one&#039;s classroom. This might be a colleague interested in seeing your course, or a journalist who might be writing an article about one&#039;s site. They should not be able to see the names of any students anywhere (eg recent activity, forum posts) for privacy reasons. They should be able to try out things like quizzes, and lessons but no grades would be recorded (like in teacher preview mode). They would not be able to participate in choices and forums but could view them. It would be read only in a way like former-student role below but without access to a particular student&#039;s records that former student role would grant. &lt;br /&gt;
&lt;br /&gt;
===Former Student===&lt;br /&gt;
This role would be of particular use for courses with rolling enrollments. This role would be one where a student had completed all of the requirements of a course (ie assignments, quizzes etc.) but wished to have continued access to the course material for review or consultation. The key factor is that one would give access to the completed student to the notes he read, his work and the teacher&#039;s comments on it, but he would not be allowed to do anything that would take up the teacher&#039;s time. In other words, a sort-of read-only access to the course. How forums, which might contain pertinent information and would continue to grow, would be handled is a question. Perhaps the student would be shown only what was in the forums at the time he completed the course. He would not be allowed to see any new posts or add any himself. Same thing for database and glossary entries. In other words, a snapshot of the course at the time his regular enrollment ended. He shouldn&#039;t be able to see the names or profiles of any newly enrolled students for privacy reasons-hence the restrictions on forum access. One issue that would have to be dealt with would be changes to existing modules-such as resources. Does the student get access to the module as it was or as it is? We have no versioning of resources in Moodle so this would be a problem. What about a teacher changing a quiz question so that the answer is different? What would a former student see?&lt;br /&gt;
&lt;br /&gt;
===Librarian===&lt;br /&gt;
&lt;br /&gt;
Reference Librarians have an active role in most of the courses taught at Earlham College (with Bibliographic Instruction). The Librarian role within Moodle could encompass default read access to all courses (unless prohibited by course teacher) and read access to all components of the course unless access is barred (again by teacher). The Librarians would also perhaps have a block called perhaps Reference Services or Reference Desk with write access where they could deposit resources. Also this block might have a chat applet whereby enrolled students could chat to the Reference Librarian on duty about their bibliographic research needs.&lt;br /&gt;
&lt;br /&gt;
===Teacher===&lt;br /&gt;
&lt;br /&gt;
Teachers should have read access to other Teacher&#039;s courses unless explictly prohibited. They should be able to set parts of their own course to be totally private (perhaps even to admin?). Just as each activity can currently be set to have group access, each activity could have a permissions field. Teachers could set default permissions for all activities on their course (eg they might disallow Librarian access for example) and then change the access permission for an individual activity. &lt;br /&gt;
&lt;br /&gt;
I think that what is needed is a simple heirarchy of permissions and levels of granularity.&lt;br /&gt;
&lt;br /&gt;
===Community Education Tutors/Trainers===&lt;br /&gt;
Teachers may be community adult education trainers making use of a school moodle so must only have access to their courses unless given access elsewhere. They would not necessarily get the default teacher privileges.&lt;br /&gt;
&lt;br /&gt;
===Secretary/Student Worker===&lt;br /&gt;
&lt;br /&gt;
We often have faculty who want their departmental secretary or student worker to scan and upload files and perhaps create resources. Currently they have to be given teacher access to the course. This is dangerous from a FERPA standpoint since they could easily get access to grades.&lt;br /&gt;
&lt;br /&gt;
===Teaching Assistant===&lt;br /&gt;
&lt;br /&gt;
Our Faculty frequently have undergraduate students acting as Teaching Assistants. These students need to be able to add resources, create assignments, and possibly grade assignments. However, due to FERPA they cannot have access to other students&#039; overall grade information. I think the requirements here are slightly different than those of Secretary/Student Worker&lt;br /&gt;
&lt;br /&gt;
===Admin - Catgory based===&lt;br /&gt;
&lt;br /&gt;
Basically a person in between full Admin and Creator that has the permissions of an Admin but only with respect to courses and students. Currently a Creator has permissions site-wide which does not always meet the requirements of a given organisation (e.g. Department A may not be happy that a person from Department B can create/modify courses within Department A&#039;s area). The ability to designate a Creator within a specific category would allow areas to be set up for a faculty/department/organisation and allow the Admin for that area to create/delete courses, upload users, add site-wide entries to the calendar etc.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*Using Moodle [http://moodle.org/mod/forum/discuss.php?d=38788 Roles and Permissions architecture] forum discussion&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
[[Category:Future]]&lt;/div&gt;</summary>
		<author><name>Harrysmith</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/404/en/index.php?title=Development:Roles&amp;diff=11736</id>
		<title>Development:Roles</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/404/en/index.php?title=Development:Roles&amp;diff=11736"/>
		<updated>2006-06-08T17:11:15Z</updated>

		<summary type="html">&lt;p&gt;Harrysmith: /* Teaching Assistant */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Roles and capabilities&#039;&#039;&#039; are planned to be included in Moodle 1.7. For now, we have some basic ideas of how to implement such a structure in Moodle.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Please note that none of the following is finalised.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Definitions==&lt;br /&gt;
&lt;br /&gt;
By roles, we mean an identifier of the user&#039;s status, for example, teacher, student and forum moderator are examples of roles.&lt;br /&gt;
&lt;br /&gt;
A capability is a permission to access some particular Moodle feature. Capabilities are associated with roles. For example, &#039;&#039;forum_canreadpost&#039;&#039; is a capability.&lt;br /&gt;
&lt;br /&gt;
==The existing system==&lt;br /&gt;
&lt;br /&gt;
Currently in Moodle, we have a fixed set of roles i.e. primary admin, admins, course creators, editing teachers, non-editing teachers, students, and guests. For each role, the capability or actions that they can performed are fixed. For example, the role student allows the user to submit an assignment, but doesn&#039;t allow the user to browse/edit other users&#039; work. By using this setup we limit ourselves to a rather rigid set of capabilities for each role. If we want, say a particular student or group to be able to mark assignments in a particular course, we can&#039;t do that without giving these users teacher privileges.&lt;br /&gt;
&lt;br /&gt;
==The new roles and capability system==&lt;br /&gt;
&lt;br /&gt;
The new system will allow authorized users to define an arbitrary number of roles. Each role can have a customizable set of capabilities in every context. A context can be the whole Moodle site, a course, or a module instance, e.g. quiz 5 in &#039;Introduction to Photography&#039;. An authorized user will be able to assign an arbitrary number of roles to each user. Since the capabilities in each role could be different, there could be conflict in capabilities. This is resolved by giving roles different &#039;priorities&#039;. For example, to prevent a naughty student from posting, one could assign him a &#039;naughty student&#039; role that does not allow him to post. This role should have a priority higher than that of a normal &#039;student&#039; role. &lt;br /&gt;
&lt;br /&gt;
To facilitate exceptional cases in roles and capabilities, we can use exception rules. For example, we can specify a rule saying that all students are able to mark/read other students&#039; assignment in this particular course. Note that such rules need to have a priority as well. The capability of a user, in any context is then resolved by finding the highest priority role/rule.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;A smooth upgrade will be provided with 1.7. The existing roles (admin, teacher, student, etc), and the exisiting capabilities will be retained. This is done by creating default roles at site/course levels, and assigning the current users to these roles accordingly. The default roles will have default capabilities associated with them, which pretty much is what we have  in 1.6. The whole process is automatic so there&#039;s nothing to worry about =). With no modifications, Moodle will operate exactly the same before and after the upgrade.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==The plan==&lt;br /&gt;
&lt;br /&gt;
There are a few major things that need to be done. Here&#039;s a list (in no particular order):&lt;br /&gt;
&lt;br /&gt;
#Identify permissions required for site/course/each module.&lt;br /&gt;
#Define the database structure for storing roles and capabilities.&lt;br /&gt;
#Recode the whole of Moodle, including all modules to support the new structure. Instead of using &amp;lt;code&amp;gt;isteacher()&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;isstudent()&amp;lt;/code&amp;gt; we should be using &amp;lt;code&amp;gt;has_capabity($capability, $instanceid)&amp;lt;/code&amp;gt; etc. A new API for handling roles and capabilities will be implemented (accesslib.php).&lt;br /&gt;
#Add storage of capabilities for each module. Can be done either in a file, e.g. db/capability.xml, or as a sql file that gets installed to a central db whenever this module is installed. Either way, what do we do when we need to upgrade these capabilities? Some capabilities might needs refining/splitting later on. How do we control the &#039;version&#039; of a capability?&lt;br /&gt;
#Consider interface issues, especially how to manage conflicting role/exception rules.&lt;br /&gt;
#Upon logging in, we should use a cache to store capability, down to module level. How should that be structured?&lt;br /&gt;
#Consider the impact on backup/restore.&lt;br /&gt;
#Upgrade path for current users. The user information in table user_coursecreators, user_admins, user_teachers, and user_students will most likely be migrated to the new roles and capabilities tables. The users will most likely be assigned default roles that comes with default capabilities (e.g. teachers, admins, students, etc). The old tables themselves could possibly be dropped at the end of the upgrade.&lt;br /&gt;
&lt;br /&gt;
==Capabilities==&lt;br /&gt;
&lt;br /&gt;
This is a comprehensive list of capabilities, well, in the making. Please edit. Should we distinguish canedit and candelete?&lt;br /&gt;
&lt;br /&gt;
What about a canview capability? Like for choice, where a person is allowed to see the choice question but not participate in it? --[[User:N Hansen|N Hansen]] 19:29, 16 May 2006 (WST)&lt;br /&gt;
&lt;br /&gt;
Certainly need a canview or cansee capability for parents as linked to their childs data/contributions.&lt;br /&gt;
&lt;br /&gt;
Do we need to add canview and cansearch logs at site/course/user/group level?&lt;br /&gt;
&lt;br /&gt;
===Site-level Capabilities===&lt;br /&gt;
&lt;br /&gt;
#canconfigsitevariables - applcialbe in admin/config.php&lt;br /&gt;
#canreadblogs&lt;br /&gt;
#canpostblogs&lt;br /&gt;
#candeleteallblogs&lt;br /&gt;
#canbrowseuser&lt;br /&gt;
#canviewhiddenactivity&lt;br /&gt;
#cancreatecourse&lt;br /&gt;
#caneditownprofile&lt;br /&gt;
#caneditallprofiles&lt;br /&gt;
&lt;br /&gt;
===Course-level Capabilities===&lt;br /&gt;
&lt;br /&gt;
#viewcoursecontent&lt;br /&gt;
#caneditcourse&lt;br /&gt;
#cancreatebackups&lt;br /&gt;
#canrestorebackups&lt;br /&gt;
#cancreateblocks&lt;br /&gt;
#caneditblocks&lt;br /&gt;
#candeleteblocks&lt;br /&gt;
&lt;br /&gt;
===Module-level Capabilities===&lt;br /&gt;
&lt;br /&gt;
#Assignment&lt;br /&gt;
##assignment_canadd&lt;br /&gt;
##assignment_canedit&lt;br /&gt;
##assignment_candelete&lt;br /&gt;
##assignment_cansubmit&lt;br /&gt;
##assignment_mark - marking, viewing of list of submitted assignments&lt;br /&gt;
##assignment_canviewsubmissions&lt;br /&gt;
#Chat&lt;br /&gt;
##chat_canadd&lt;br /&gt;
##chat_canedit&lt;br /&gt;
##chat_candelete&lt;br /&gt;
##chat_canparticipate&lt;br /&gt;
##chat_canviewpastsessions&lt;br /&gt;
#Choice&lt;br /&gt;
##choice_canadd&lt;br /&gt;
##choice_canedit&lt;br /&gt;
##choice_candelete&lt;br /&gt;
##choice_canparticipate&lt;br /&gt;
##choice_canviewresponses&lt;br /&gt;
#Database&lt;br /&gt;
##database_canadd&lt;br /&gt;
##database_canedit&lt;br /&gt;
##databaes_candelete&lt;br /&gt;
##database_canaddentry&lt;br /&gt;
##database_canaddtemplates&lt;br /&gt;
##database_canedittemplates&lt;br /&gt;
##database_candeleteownentry&lt;br /&gt;
##database_candeleteallentry&lt;br /&gt;
##database_cancomment&lt;br /&gt;
##database_candeletecomment&lt;br /&gt;
##database_canrate&lt;br /&gt;
#Exercise&lt;br /&gt;
##exercise_canadd&lt;br /&gt;
##exercise_canedit&lt;br /&gt;
##exercise_candelete&lt;br /&gt;
##exercise_canassess&lt;br /&gt;
#Forum&lt;br /&gt;
##forum_canadd&lt;br /&gt;
##forum_canedit&lt;br /&gt;
##forum_candelete&lt;br /&gt;
##forum_canreadpost&lt;br /&gt;
##forum_canstartnewdiscussion&lt;br /&gt;
##forum_canreply&lt;br /&gt;
##forum_caneditallpost&lt;br /&gt;
##forum_candeleteallpost&lt;br /&gt;
##forum_canrate&lt;br /&gt;
#Glossary&lt;br /&gt;
##glossary_canadd&lt;br /&gt;
##glossary_canedit&lt;br /&gt;
##glossary_candelete&lt;br /&gt;
##glossary_canaddcat&lt;br /&gt;
##glossary_caneditcat&lt;br /&gt;
##glossary_candeletecat&lt;br /&gt;
##glossary_canadditem&lt;br /&gt;
##glossary_candeleteitem&lt;br /&gt;
##glossary_canedititem&lt;br /&gt;
##glossary_cancomment&lt;br /&gt;
##glossary_canimportentries&lt;br /&gt;
##glossary_canexportentries&lt;br /&gt;
##glossary_canapprove&lt;br /&gt;
#Hotpot&lt;br /&gt;
##hotpot_candd&lt;br /&gt;
##hotpot_canedit&lt;br /&gt;
##hotpot_candelete&lt;br /&gt;
##hotpot_canparticipate&lt;br /&gt;
#Label&lt;br /&gt;
##label_canadd&lt;br /&gt;
##label_canedit&lt;br /&gt;
##label_candelete&lt;br /&gt;
#Lams&lt;br /&gt;
##lams_canadd&lt;br /&gt;
##lams_canedit&lt;br /&gt;
##lams_candelete&lt;br /&gt;
#Lesson&lt;br /&gt;
##lesson_canadd&lt;br /&gt;
##lesson_canedit&lt;br /&gt;
##lesson_candelete&lt;br /&gt;
##lesson_canparticipate&lt;br /&gt;
#Quiz&lt;br /&gt;
##quiz_canadd&lt;br /&gt;
##quiz_canedit&lt;br /&gt;
##quiz_candelete&lt;br /&gt;
##quiz_canaddquestion&lt;br /&gt;
##quiz_caneditquestion&lt;br /&gt;
##quiz_candeletequestion&lt;br /&gt;
##quiz_canparticipate&lt;br /&gt;
##quiz_cangrade&lt;br /&gt;
#Resource&lt;br /&gt;
##resource_canadd&lt;br /&gt;
##resource_canedit&lt;br /&gt;
##resource_candelete&lt;br /&gt;
#Scorm&lt;br /&gt;
##scorm_canadd&lt;br /&gt;
##scorm_canedit&lt;br /&gt;
##socrm_candelete&lt;br /&gt;
#Survey&lt;br /&gt;
##survey_canadd&lt;br /&gt;
##survey_canedit&lt;br /&gt;
##survey_candelete&lt;br /&gt;
##survey_canviewresponses&lt;br /&gt;
#Wiki&lt;br /&gt;
##wiki_canadd&lt;br /&gt;
##wiki_canedit&lt;br /&gt;
##wiki_candelete&lt;br /&gt;
##wiki_canstartnewwiki&lt;br /&gt;
##wiki_canparticipate&lt;br /&gt;
#Workshop&lt;br /&gt;
##workshop_canadd&lt;br /&gt;
##workshop_canedit&lt;br /&gt;
##workshop_candelete&lt;br /&gt;
##workshop_cangrade&lt;br /&gt;
##workshop_canparticipate&lt;br /&gt;
&lt;br /&gt;
==Scenarios==&lt;br /&gt;
&lt;br /&gt;
This section is for brainstorming some example roles that we would like to support:&lt;br /&gt;
&lt;br /&gt;
===Student===&lt;br /&gt;
Has this one been missed?&lt;br /&gt;
&lt;br /&gt;
===Site Designers===&lt;br /&gt;
Is there a role for peole involved in how the site looks but not full administrators? Thinking here of online control of themes rather than FTP theme uploading. But in either case they caneditlogos, caneditcss, candeditlevelatwhichthemeapplies.&lt;br /&gt;
&lt;br /&gt;
===Educational Authority Adviser===&lt;br /&gt;
Someone who would want to browse the site and may be asked to comment or contribute to particular discussions or developments in school. Access for this role would be controlled by the school in the case of school level moodles but may be different if there were to be a Local Authority wide Moodle.&lt;br /&gt;
&lt;br /&gt;
===Educational Inspector===&lt;br /&gt;
Someone who will visit the site to verify the school&#039;s self review that comments on home school relationships, extending the classroom etc. They may want to see summaries of usage and reports from surveys garnering parent and pupil views.&lt;br /&gt;
&lt;br /&gt;
===Second Marker / Moderator===&lt;br /&gt;
A teacher within ths site that has access to assignments and quizzes from another teacher&#039;s course for second marking purposes. This may need additional functionality adding to the assignment module so that two sets of grades/feedback can be given to one set of assignments.&lt;br /&gt;
&lt;br /&gt;
===External Examiner===&lt;br /&gt;
Has all the rights of inpectors, but would also need to be able to review assignments and feedback, view forums, glossaries etc. However, would not want to post, feedback onto the site at all.&lt;br /&gt;
&lt;br /&gt;
===Parent===&lt;br /&gt;
A parent will have one or more children in one or more institutions which could be using one or more moodle instances or a mixture of Learning Platforms. A parent&#039;s role will vary depending on the age of their children and whether they are contributing as a parent or a school supporter.&lt;br /&gt;
&lt;br /&gt;
In Early Years (EY) and Key Stage 1 (KS1) they may play/learn on an activity or write for the child. Parents often interpret homework tasks and read to their children perhaps filling in a joint reading diary.&lt;br /&gt;
&lt;br /&gt;
In Key stages 3 and 4 this changes to more of a monitoring/awareness role where a parent would expect to have a summary report of attendance, attainment and general achievement on a weekly/monthly/termly or annual basis. Parents will often be asked to sign and write back comments about this review report.&lt;br /&gt;
&lt;br /&gt;
In all Key Stages there is a great need for parents to receive communication from the school which they can confirm they have received by signing a form. In some cases this may also involve making choices from a list. It may also involve payment for a trip or disco being returned so there could be the possibility of electronic payments.&lt;br /&gt;
&lt;br /&gt;
Parent&#039;s evening often involve complex booking systems that attempt to get parent&#039;s and teachers together. Easy for EY/KS1/KS2 very difficult for KS3/KS4. Wow would this help if it was built into the Learning Platform.&lt;br /&gt;
&lt;br /&gt;
In some cases there needs to be confidential communication between the parent and the teacher without the child being party to this. It may involve teaching and learning but could also involve a behaviour or medical issue. Often this may be done via a sealed letter or face to face. &lt;br /&gt;
&lt;br /&gt;
The latest incarnation of OfSTED with the Self Review Framework (SEF) there is a greater emphasis on schools gathering parent voice via surveys and discussion. There is a clear match here with parents have access to parental votes, questionnaires and discussions and for schools to be able to publish news, results and reports back to parents.&lt;br /&gt;
&lt;br /&gt;
In the UK the LP framework and agenda as being pushed by the DfES via Becta emphasises that within the mandatory groups and roles functionality the parent role is likely to be required to meet the LP Framework procurement standard.&lt;br /&gt;
&lt;br /&gt;
===Manager===&lt;br /&gt;
&#039;&#039;Please add text here...&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Weekly Seminar Leader===&lt;br /&gt;
&#039;&#039;In a university seminar, typically 8-15 students in their 3rd/4th year, each student is responsible for leading one topic in a study series.  I ask each student to research 5-10 resources, then give a powerpoint presentation to the other students.  This is followed by an in-class discussion and then online homework.  The homework involves some fun quiz questions and then some reflective journal questions.  I ask each seminar leader to prepare the quiz questions and journal questions as well as their presentation.  To do that, I would like to assign activity-making/authoring roles to the student--either for a short period, or for duration of the whole course.  Thus &amp;quot;Allow Quiz Authoring Role&amp;quot; or &amp;quot;Allow Assignment Authoring Role&amp;quot; at the course level or, if possible, even the Topic level (in a topic or week format course) would be important.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Mentor/Mentee===&lt;br /&gt;
&#039;&#039;Please add text here...&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Community-Designed Rating Criteria===&lt;br /&gt;
&#039;&#039;The gradebook tends to be the domain of the teacher.  What if community/peer ratings/marks could also be entered there? What if peer assessment criteria could be designed by the students, not just the teacher?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Visitor===&lt;br /&gt;
&lt;br /&gt;
This would be a role whereby one could allow a visitor to visit one&#039;s classroom. This might be a colleague interested in seeing your course, or a journalist who might be writing an article about one&#039;s site. They should not be able to see the names of any students anywhere (eg recent activity, forum posts) for privacy reasons. They should be able to try out things like quizzes, and lessons but no grades would be recorded (like in teacher preview mode). They would not be able to participate in choices and forums but could view them. It would be read only in a way like former-student role below but without access to a particular student&#039;s records that former student role would grant. &lt;br /&gt;
&lt;br /&gt;
===Former Student===&lt;br /&gt;
This role would be of particular use for courses with rolling enrollments. This role would be one where a student had completed all of the requirements of a course (ie assignments, quizzes etc.) but wished to have continued access to the course material for review or consultation. The key factor is that one would give access to the completed student to the notes he read, his work and the teacher&#039;s comments on it, but he would not be allowed to do anything that would take up the teacher&#039;s time. In other words, a sort-of read-only access to the course. How forums, which might contain pertinent information and would continue to grow, would be handled is a question. Perhaps the student would be shown only what was in the forums at the time he completed the course. He would not be allowed to see any new posts or add any himself. Same thing for database and glossary entries. In other words, a snapshot of the course at the time his regular enrollment ended. He shouldn&#039;t be able to see the names or profiles of any newly enrolled students for privacy reasons-hence the restrictions on forum access. One issue that would have to be dealt with would be changes to existing modules-such as resources. Does the student get access to the module as it was or as it is? We have no versioning of resources in Moodle so this would be a problem. What about a teacher changing a quiz question so that the answer is different? What would a former student see?&lt;br /&gt;
&lt;br /&gt;
===Librarian===&lt;br /&gt;
&lt;br /&gt;
Reference Librarians have an active role in most of the courses taught at Earlham College (with Bibliographic Instruction). The Librarian role within Moodle could encompass default read access to all courses (unless prohibited by course teacher) and read access to all components of the course unless access is barred (again by teacher). The Librarians would also perhaps have a block called perhaps Reference Services or Reference Desk with write access where they could deposit resources. Also this block might have a chat applet whereby enrolled students could chat to the Reference Librarian on duty about their bibliographic research needs.&lt;br /&gt;
&lt;br /&gt;
===Teacher===&lt;br /&gt;
&lt;br /&gt;
Teachers should have read access to other Teacher&#039;s courses unless explictly prohibited. They should be able to set parts of their own course to be totally private (perhaps even to admin?). Just as each activity can currently be set to have group access, each activity could have a permissions field. Teachers could set default permissions for all activities on their course (eg they might disallow Librarian access for example) and then change the access permission for an individual activity. &lt;br /&gt;
&lt;br /&gt;
I think that what is needed is a simple heirarchy of permissions and levels of granularity.&lt;br /&gt;
&lt;br /&gt;
===Community Education Tutors/Trainers===&lt;br /&gt;
Teachers may be community adult education trainers making use of a school moodle so must only have access to their courses unless given access elsewhere. They would not necessarily get the default teacher privileges.&lt;br /&gt;
&lt;br /&gt;
===Secretary/Student Worker===&lt;br /&gt;
&lt;br /&gt;
We often have faculty who want their departmental secretary or student worker to scan and upload files and perhaps create resources. Currently they have to be given teacher access to the course. This is dangerous from a FERPA standpoint since they could easily get access to grades.&lt;br /&gt;
&lt;br /&gt;
===Teaching Assistant===&lt;br /&gt;
&lt;br /&gt;
Our Faculty frequently have undergraduate students acting as Teaching Assistants. These students need to be able to add resources, create assignments, and possibly grade assignments. However, due to FERPA they cannot have access to other students&#039; overall grade information. I think the requirements here are slightly different than those of Secretary/Student Worker&lt;br /&gt;
&lt;br /&gt;
===Admin - Catgory based===&lt;br /&gt;
&lt;br /&gt;
Basically a person in between full Admin and Creator that has the permissions of an Admin but only with respect to courses and students. Currently a Creator has permissions site-wide which does not always meet the requirements of a given organisation (e.g. Department A may not be happy that a person from Department B can create/modify courses within Department A&#039;s area). The ability to designate a Creator within a specific category would allow areas to be set up for a faculty/department/organisation and allow the Admin for that area to create/delete courses, upload users, add sitewide entries to the calendar etc.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*Using Moodle [http://moodle.org/mod/forum/discuss.php?d=38788 Roles and Permissions architecture] forum discussion&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
[[Category:Future]]&lt;/div&gt;</summary>
		<author><name>Harrysmith</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/404/en/index.php?title=Adding_a_new_course&amp;diff=7280</id>
		<title>Adding a new course</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/404/en/index.php?title=Adding_a_new_course&amp;diff=7280"/>
		<updated>2006-03-18T13:10:11Z</updated>

		<summary type="html">&lt;p&gt;Harrysmith: /* Delete a course */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Course sub-categories may be created by adding a new course category then using the &amp;quot;move category to&amp;quot; drop-down menu to move the category inside another category.&lt;br /&gt;
&lt;br /&gt;
Similarly, sub-sub-categories etc. may be created.&lt;br /&gt;
&lt;br /&gt;
===Add a course===&lt;br /&gt;
 1. log in as an admin &lt;br /&gt;
 2. click on &#039;&#039;Courses&#039;&#039; in the admin menu &lt;br /&gt;
 3. navigate into the category where you want to add the course&lt;br /&gt;
 4. click on the &#039;&#039;Add a new course&#039;&#039; button&lt;br /&gt;
 5. set up your new course&lt;br /&gt;
&lt;br /&gt;
[[image:Admin_menu.jpg|frame|left| log in as admin and click on &#039;&#039;Courses&#039;&#039;]] &lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both;&amp;quot;&amp;gt;&lt;br /&gt;
[[image:ADDACOURSE.GIF|frame|left|click on the &#039;&#039;Add a new course&#039;&#039; button to add a course]]&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both;&amp;quot;&amp;gt;&lt;br /&gt;
[[image:Setupcourse.gif|frame|left|set up your new course]]&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Delete a course === &lt;br /&gt;
To delete a course&lt;br /&gt;
&lt;br /&gt;
 1. log in as an admin&lt;br /&gt;
 2. click on &#039;&#039;Courses&#039;&#039; in the admin menu &lt;br /&gt;
 3. turn on editing&lt;br /&gt;
 4. click on the x to delete the course&lt;br /&gt;
&lt;br /&gt;
[[image:Admin_menu.jpg|frame|left| log in as admin and click on &#039;&#039;Courses&#039;&#039;]] &lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both;&amp;quot;&amp;gt;&lt;br /&gt;
[[image:Courses.jpg|frame|left|click on the x to delete the course]]&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Add a teacher===&lt;br /&gt;
&lt;br /&gt;
To add a teacher&lt;br /&gt;
&lt;br /&gt;
1. log in as an admin or a teacher&lt;br /&gt;
&lt;br /&gt;
2. click on &#039;&#039;Teachers&#039;&#039; in the Admin Menu (in screen capture below called &#039;&#039;Administrators&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
3. search for a teacher&lt;br /&gt;
&lt;br /&gt;
4. click on the &#039;&#039;Add teacher&#039;&#039; link&lt;br /&gt;
&lt;br /&gt;
[[image:Addadmin1.gif|frame|left|the &#039;&#039;Teachers&#039;&#039; link in this screen capture has been renamed &#039;&#039;Administrators&#039;&#039;]]&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[image:Addadmin2.gif|frame|left|search for a teacher to add (must already have an account, of course)]]&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[image:Addadmin3.gif|frame|left|click on the &#039;&#039;Add teacher&#039;&#039; link]]&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: Administrator]]&lt;/div&gt;</summary>
		<author><name>Harrysmith</name></author>
	</entry>
</feed>