<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.moodle.org/310/en/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jmouneyrac</id>
	<title>MoodleDocs - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://docs.moodle.org/310/en/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jmouneyrac"/>
	<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/Special:Contributions/Jmouneyrac"/>
	<updated>2026-05-14T05:44:54Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Upload_courses&amp;diff=107310</id>
		<title>Upload courses</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Upload_courses&amp;diff=107310"/>
		<updated>2013-10-31T09:09:23Z</updated>

		<summary type="html">&lt;p&gt;Jmouneyrac: /* Short file example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Courses}}&lt;br /&gt;
&lt;br /&gt;
{{New features}}&lt;br /&gt;
An administrator can upload multiple courses using a text file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are many things you can do when using this tool:not only creating courses, but updating or deleting them. You can also update the course enrolment methods or import the content of another course.&lt;br /&gt;
&lt;br /&gt;
==Uploading the file==&lt;br /&gt;
&lt;br /&gt;
You can upload the file by navigating to &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Courses &amp;gt; Upload courses&#039;&#039; and either dragging and dropping the csv file or clicking the button to upload from the file picker.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|[[File:26uploadcourses.png|250px|thumb|Upload courses admin screen]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:uploadcoursesresults.png|250px|thumb|Courses successfully uploaded]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; It is also possible to use the command-line tool &#039;&#039;admin/tool/uploadcourse/cli/uploadcourse.php&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
When using the web interface, use the &#039;&#039;Preview&#039;&#039; option to see if any errors were detected in the previewed rows. If you proceed with the upload and there were something wrong detected with a course, it will be ignored.&lt;br /&gt;
&lt;br /&gt;
=== Short file example ===&lt;br /&gt;
uploadcourse.csv:&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
shortname,fullname,category,summary,enrolment_1,enrolment_1_role,enrolment_1_enrolperiod,role_student&lt;br /&gt;
courserestored,Course restored,1,a summary,manual,student,1 month,&lt;br /&gt;
courserestored2,Course restored 2,1,a summary,,,,&lt;br /&gt;
courserestored3,Course restored 3,1,a summary,,,,padawan&lt;br /&gt;
courserestored4,Course restored 4,1,&amp;quot;a summary, with comma&amp;quot;,manual,student,1 month,padawan&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Notice there are no spaces between the arguments.&lt;br /&gt;
&lt;br /&gt;
==Creating the text file==&lt;br /&gt;
&lt;br /&gt;
The text file to upload courses must be a CSV file. It accepts the following columns which are divided in two categories, the course information, and the course actions.&lt;br /&gt;
&lt;br /&gt;
===Course information fields===&lt;br /&gt;
&lt;br /&gt;
Most of those settings are available on the settings page of a course. Please refer to [[Course settings]] for more information.&lt;br /&gt;
&lt;br /&gt;
;shortname&lt;br /&gt;
: The shortname&lt;br /&gt;
;fullname&lt;br /&gt;
: The full name&lt;br /&gt;
;idnumber&lt;br /&gt;
: The ID number&lt;br /&gt;
;category&lt;br /&gt;
: The ID of the category to place the course in. This takes precedence over &#039;&#039;category_idnumber&#039;&#039; and &#039;&#039;category_path&#039;&#039;.&lt;br /&gt;
;category_idnumber&lt;br /&gt;
: The ID number of the category to place the course in. This takes precedence over &#039;&#039;category_path&#039;&#039;.&lt;br /&gt;
;category_path&lt;br /&gt;
: The path of the category to place the course in. If you want to place the course in a category named &amp;quot;Science-Fiction&amp;quot; which is located under the category &amp;quot;Movies&amp;quot;, the value to provide is: &amp;lt;code&amp;gt;Movies &amp;gt; Science-Fiction&amp;lt;/code&amp;gt;. Note that the separator must be &amp;lt;code&amp;gt;[space]&amp;gt;[space]&amp;lt;/code&amp;gt;. Also note that the category MUST exist, it will not be created.&lt;br /&gt;
;visible&lt;br /&gt;
: 1 if the course is visible, 0 if hidden&lt;br /&gt;
;startdate&lt;br /&gt;
: The time at which the course starts. Please note that this value is passed to the PHP function [http://php.net/manual/en/function.strtotime.php strtotime] to generate a timestamp.&lt;br /&gt;
;summary&lt;br /&gt;
: The summary of the course&lt;br /&gt;
;format&lt;br /&gt;
: The course format to use, this must be a valid course format plugin name. E.g. &#039;&#039;weeks&#039;&#039;, &#039;&#039;topics&#039;&#039;.&lt;br /&gt;
;theme&lt;br /&gt;
: The theme to use&lt;br /&gt;
;lang&lt;br /&gt;
: The language to use&lt;br /&gt;
;newsitems&lt;br /&gt;
: The number of news items&lt;br /&gt;
;showgrades&lt;br /&gt;
: 1 to show the gradebook to students, 0 to hide it.&lt;br /&gt;
;showreports&lt;br /&gt;
: 1 to show the activity reports, 0 to hide it.&lt;br /&gt;
;legacyfiles&lt;br /&gt;
: 1 to enable the legacy course files, 0 not to.&lt;br /&gt;
;maxbytes&lt;br /&gt;
: The maximum upload size of the course in bytes. Use 0 for the site limit.&lt;br /&gt;
;groupmode&lt;br /&gt;
: 0 for &#039;&#039;No groups&#039;&#039;, 1 for &#039;&#039;Separate groups&#039;&#039; and 2 for &#039;&#039;Visible groups&#039;&#039;.&lt;br /&gt;
;groupmodeforce&lt;br /&gt;
: 1 to force the group mode, otherwise enter 0.&lt;br /&gt;
;enablecompletion&lt;br /&gt;
: 1 to enable the activity completion, 0 not to.&lt;br /&gt;
&lt;br /&gt;
====Enrolment fields====&lt;br /&gt;
&lt;br /&gt;
Some fields can be constructed to enable and configure enrolment methods. The fields must be named &#039;&#039;enrolment_[number]&#039;&#039; for the enrolment method name, and &#039;&#039;enrolment_[number]_property&#039;&#039; for its properties.&lt;br /&gt;
&lt;br /&gt;
;enrolment_[number]&lt;br /&gt;
: The name of the enrolment method&lt;br /&gt;
;enrolment_[number]_delete&lt;br /&gt;
: 1 to delete this enrolment method from the course, if set to 1 all the other properties will be ignored.&lt;br /&gt;
;enrolment_[number]_disable&lt;br /&gt;
: 1 to disable this enrolment method from the course, if set to 1 all the other properties will be ignored.&lt;br /&gt;
;enrolment_[number]_startdate&lt;br /&gt;
: The enrolment start date. This value is passed to the PHP function strtotime().&lt;br /&gt;
;enrolment_[number]_enddate&lt;br /&gt;
: The enrolment start date. This value is passed to the PHP function strtotime().&lt;br /&gt;
;enrolment_[number]_enrolperiod&lt;br /&gt;
: Number of seconds, or if not a value understood by strtotime() such as &amp;quot;4 days&amp;quot;.&lt;br /&gt;
;enrolment_[number]_role&lt;br /&gt;
: The role short name&lt;br /&gt;
:enrolment_[number]_[property]&lt;br /&gt;
; Where property is understood by the specified enrolment method&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 enrolment_1: manual&lt;br /&gt;
 enrolment_1_role: student&lt;br /&gt;
 enrolment_1_enrolperiod: 1 month&lt;br /&gt;
 &lt;br /&gt;
 enrolment_2: self&lt;br /&gt;
 enrolment_2_startdate: 2013-01-30&lt;br /&gt;
&lt;br /&gt;
====Role renaming====&lt;br /&gt;
&lt;br /&gt;
To rename some roles, using the following pattern:&lt;br /&gt;
&lt;br /&gt;
;role_[shortname]&lt;br /&gt;
: The new name of the role &#039;&#039;[shortname]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 role_student: Apprentice&lt;br /&gt;
 role_teacher: Master&lt;br /&gt;
 role_mycustomrole: Jedi&lt;br /&gt;
&lt;br /&gt;
===Course action fields===&lt;br /&gt;
&lt;br /&gt;
Those settings take precedence over the &#039;&#039;Course process&#039;&#039; parameters.&lt;br /&gt;
&lt;br /&gt;
;delete&lt;br /&gt;
: 1 to delete the course &lt;br /&gt;
;rename&lt;br /&gt;
: The shortname to rename the course to&lt;br /&gt;
;backupfile&lt;br /&gt;
: An absolute path to a backup file (.mbz) to import in the course&lt;br /&gt;
;templatecourse&lt;br /&gt;
: The short name of a course to import the content from&lt;br /&gt;
;reset&lt;br /&gt;
: 1 to reset the course&lt;br /&gt;
&lt;br /&gt;
===Mandatory fields===&lt;br /&gt;
&lt;br /&gt;
;shortname&lt;br /&gt;
: This field is mandatory for every operation, with the only exception of creating new courses. See details on the course process parameter &#039;&#039;Shortname template&#039;&#039; for more information.&lt;br /&gt;
;fullname&lt;br /&gt;
: Required when creating a new course.&lt;br /&gt;
;category, category_idnumber, category_path&lt;br /&gt;
: One of these is required when creating a course.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Import options===&lt;br /&gt;
&lt;br /&gt;
To prevent unexpected behaviours, you have to specify what you want the tool to be able to do.&lt;br /&gt;
&lt;br /&gt;
;Upload mode&lt;br /&gt;
: This allows you to specify if courses can be created and/or updated.&lt;br /&gt;
;Update mode&lt;br /&gt;
: If you allow courses to be updated, you also have to tell the tool what to update the courses with.&lt;br /&gt;
;Allow deletes&lt;br /&gt;
: Whether the &#039;&#039;delete&#039;&#039; field is accepted or not&lt;br /&gt;
;Allow renames&lt;br /&gt;
: Whether the &#039;&#039;rename&#039;&#039; field is accepted or not&lt;br /&gt;
;Allow resets&lt;br /&gt;
: Whether the &#039;&#039;reset&#039;&#039; field is accepted or not&lt;br /&gt;
&lt;br /&gt;
===Course process===&lt;br /&gt;
&lt;br /&gt;
This allows you to specify actions to be taken on every single courses uploaded.&lt;br /&gt;
&lt;br /&gt;
;Shortname template&lt;br /&gt;
: If you are creating courses without a shortname, you can use this field to automatically generate a shortname. This field accepts two placeholders: %i for the ID number, %f for the summary.&lt;br /&gt;
;Restore file&lt;br /&gt;
: A backup file (.mbz) to import in the course after create/update.&lt;br /&gt;
;Restore from course&lt;br /&gt;
: The shortname of a course to import content from after create/update.&lt;br /&gt;
;Reset after upload&lt;br /&gt;
: Whether to reset the course after creating/updating it.&lt;br /&gt;
&lt;br /&gt;
===Default course values===&lt;br /&gt;
&lt;br /&gt;
Those are values that can be set in the web interface for all the fields that are not specified in the CSV file. Note that they are always used when creating a course, but only when specified during update (see &#039;&#039;Update mode&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
==Increasing speed==&lt;br /&gt;
&lt;br /&gt;
When importing the content of a backup file, or another course, you are adviced to enable the setting &#039;&#039;keeptempdirectoriesonbackup&#039;&#039;. This will considerably speed up the process of the upload if you are importing multiple times from the same source.&lt;br /&gt;
&lt;br /&gt;
[[de:Kurse hochladen]]&lt;br /&gt;
[[es:Subir cursos]]&lt;/div&gt;</summary>
		<author><name>Jmouneyrac</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Upload_courses&amp;diff=107309</id>
		<title>Upload courses</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Upload_courses&amp;diff=107309"/>
		<updated>2013-10-31T08:37:41Z</updated>

		<summary type="html">&lt;p&gt;Jmouneyrac: /* Short file example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Courses}}&lt;br /&gt;
&lt;br /&gt;
{{New features}}&lt;br /&gt;
An administrator can upload multiple courses using a text file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are many things you can do when using this tool:not only creating courses, but updating or deleting them. You can also update the course enrolment methods or import the content of another course.&lt;br /&gt;
&lt;br /&gt;
==Uploading the file==&lt;br /&gt;
&lt;br /&gt;
You can upload the file by navigating to &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Courses &amp;gt; Upload courses&#039;&#039; and either dragging and dropping the csv file or clicking the button to upload from the file picker.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|[[File:26uploadcourses.png|250px|thumb|Upload courses admin screen]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:uploadcoursesresults.png|250px|thumb|Courses successfully uploaded]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; It is also possible to use the command-line tool &#039;&#039;admin/tool/uploadcourse/cli/uploadcourse.php&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
When using the web interface, use the &#039;&#039;Preview&#039;&#039; option to see if any errors were detected in the previewed rows. If you proceed with the upload and there were something wrong detected with a course, it will be ignored.&lt;br /&gt;
&lt;br /&gt;
=== Short file example ===&lt;br /&gt;
uploadcourse.csv:&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
shortname,fullname,category,summary,enrolment_1,enrolment_1_role,enrolment_1_enrolperiod,role_student&lt;br /&gt;
courserestored,Course restored,1,a summary,manual,student,1 month,&lt;br /&gt;
courserestored2,Course restored 2,1,a summary,,,,&lt;br /&gt;
courserestored3,Course restored 3,1,a summary,,,,padawan&lt;br /&gt;
courserestored4,Course restored 4,1,a summary,manual,student,1 month,padawan&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Notice there are no spaces between the arguments.&lt;br /&gt;
&lt;br /&gt;
==Creating the text file==&lt;br /&gt;
&lt;br /&gt;
The text file to upload courses must be a CSV file. It accepts the following columns which are divided in two categories, the course information, and the course actions.&lt;br /&gt;
&lt;br /&gt;
===Course information fields===&lt;br /&gt;
&lt;br /&gt;
Most of those settings are available on the settings page of a course. Please refer to [[Course settings]] for more information.&lt;br /&gt;
&lt;br /&gt;
;shortname&lt;br /&gt;
: The shortname&lt;br /&gt;
;fullname&lt;br /&gt;
: The full name&lt;br /&gt;
;idnumber&lt;br /&gt;
: The ID number&lt;br /&gt;
;category&lt;br /&gt;
: The ID of the category to place the course in. This takes precedence over &#039;&#039;category_idnumber&#039;&#039; and &#039;&#039;category_path&#039;&#039;.&lt;br /&gt;
;category_idnumber&lt;br /&gt;
: The ID number of the category to place the course in. This takes precedence over &#039;&#039;category_path&#039;&#039;.&lt;br /&gt;
;category_path&lt;br /&gt;
: The path of the category to place the course in. If you want to place the course in a category named &amp;quot;Science-Fiction&amp;quot; which is located under the category &amp;quot;Movies&amp;quot;, the value to provide is: &amp;lt;code&amp;gt;Movies &amp;gt; Science-Fiction&amp;lt;/code&amp;gt;. Note that the separator must be &amp;lt;code&amp;gt;[space]&amp;gt;[space]&amp;lt;/code&amp;gt;. Also note that the category MUST exist, it will not be created.&lt;br /&gt;
;visible&lt;br /&gt;
: 1 if the course is visible, 0 if hidden&lt;br /&gt;
;startdate&lt;br /&gt;
: The time at which the course starts. Please note that this value is passed to the PHP function [http://php.net/manual/en/function.strtotime.php strtotime] to generate a timestamp.&lt;br /&gt;
;summary&lt;br /&gt;
: The summary of the course&lt;br /&gt;
;format&lt;br /&gt;
: The course format to use, this must be a valid course format plugin name. E.g. &#039;&#039;weeks&#039;&#039;, &#039;&#039;topics&#039;&#039;.&lt;br /&gt;
;theme&lt;br /&gt;
: The theme to use&lt;br /&gt;
;lang&lt;br /&gt;
: The language to use&lt;br /&gt;
;newsitems&lt;br /&gt;
: The number of news items&lt;br /&gt;
;showgrades&lt;br /&gt;
: 1 to show the gradebook to students, 0 to hide it.&lt;br /&gt;
;showreports&lt;br /&gt;
: 1 to show the activity reports, 0 to hide it.&lt;br /&gt;
;legacyfiles&lt;br /&gt;
: 1 to enable the legacy course files, 0 not to.&lt;br /&gt;
;maxbytes&lt;br /&gt;
: The maximum upload size of the course in bytes. Use 0 for the site limit.&lt;br /&gt;
;groupmode&lt;br /&gt;
: 0 for &#039;&#039;No groups&#039;&#039;, 1 for &#039;&#039;Separate groups&#039;&#039; and 2 for &#039;&#039;Visible groups&#039;&#039;.&lt;br /&gt;
;groupmodeforce&lt;br /&gt;
: 1 to force the group mode, otherwise enter 0.&lt;br /&gt;
;enablecompletion&lt;br /&gt;
: 1 to enable the activity completion, 0 not to.&lt;br /&gt;
&lt;br /&gt;
====Enrolment fields====&lt;br /&gt;
&lt;br /&gt;
Some fields can be constructed to enable and configure enrolment methods. The fields must be named &#039;&#039;enrolment_[number]&#039;&#039; for the enrolment method name, and &#039;&#039;enrolment_[number]_property&#039;&#039; for its properties.&lt;br /&gt;
&lt;br /&gt;
;enrolment_[number]&lt;br /&gt;
: The name of the enrolment method&lt;br /&gt;
;enrolment_[number]_delete&lt;br /&gt;
: 1 to delete this enrolment method from the course, if set to 1 all the other properties will be ignored.&lt;br /&gt;
;enrolment_[number]_disable&lt;br /&gt;
: 1 to disable this enrolment method from the course, if set to 1 all the other properties will be ignored.&lt;br /&gt;
;enrolment_[number]_startdate&lt;br /&gt;
: The enrolment start date. This value is passed to the PHP function strtotime().&lt;br /&gt;
;enrolment_[number]_enddate&lt;br /&gt;
: The enrolment start date. This value is passed to the PHP function strtotime().&lt;br /&gt;
;enrolment_[number]_enrolperiod&lt;br /&gt;
: Number of seconds, or if not a value understood by strtotime() such as &amp;quot;4 days&amp;quot;.&lt;br /&gt;
;enrolment_[number]_role&lt;br /&gt;
: The role short name&lt;br /&gt;
:enrolment_[number]_[property]&lt;br /&gt;
; Where property is understood by the specified enrolment method&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 enrolment_1: manual&lt;br /&gt;
 enrolment_1_role: student&lt;br /&gt;
 enrolment_1_enrolperiod: 1 month&lt;br /&gt;
 &lt;br /&gt;
 enrolment_2: self&lt;br /&gt;
 enrolment_2_startdate: 2013-01-30&lt;br /&gt;
&lt;br /&gt;
====Role renaming====&lt;br /&gt;
&lt;br /&gt;
To rename some roles, using the following pattern:&lt;br /&gt;
&lt;br /&gt;
;role_[shortname]&lt;br /&gt;
: The new name of the role &#039;&#039;[shortname]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 role_student: Apprentice&lt;br /&gt;
 role_teacher: Master&lt;br /&gt;
 role_mycustomrole: Jedi&lt;br /&gt;
&lt;br /&gt;
===Course action fields===&lt;br /&gt;
&lt;br /&gt;
Those settings take precedence over the &#039;&#039;Course process&#039;&#039; parameters.&lt;br /&gt;
&lt;br /&gt;
;delete&lt;br /&gt;
: 1 to delete the course &lt;br /&gt;
;rename&lt;br /&gt;
: The shortname to rename the course to&lt;br /&gt;
;backupfile&lt;br /&gt;
: An absolute path to a backup file (.mbz) to import in the course&lt;br /&gt;
;templatecourse&lt;br /&gt;
: The short name of a course to import the content from&lt;br /&gt;
;reset&lt;br /&gt;
: 1 to reset the course&lt;br /&gt;
&lt;br /&gt;
===Mandatory fields===&lt;br /&gt;
&lt;br /&gt;
;shortname&lt;br /&gt;
: This field is mandatory for every operation, with the only exception of creating new courses. See details on the course process parameter &#039;&#039;Shortname template&#039;&#039; for more information.&lt;br /&gt;
;fullname&lt;br /&gt;
: Required when creating a new course.&lt;br /&gt;
;category, category_idnumber, category_path&lt;br /&gt;
: One of these is required when creating a course.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Import options===&lt;br /&gt;
&lt;br /&gt;
To prevent unexpected behaviours, you have to specify what you want the tool to be able to do.&lt;br /&gt;
&lt;br /&gt;
;Upload mode&lt;br /&gt;
: This allows you to specify if courses can be created and/or updated.&lt;br /&gt;
;Update mode&lt;br /&gt;
: If you allow courses to be updated, you also have to tell the tool what to update the courses with.&lt;br /&gt;
;Allow deletes&lt;br /&gt;
: Whether the &#039;&#039;delete&#039;&#039; field is accepted or not&lt;br /&gt;
;Allow renames&lt;br /&gt;
: Whether the &#039;&#039;rename&#039;&#039; field is accepted or not&lt;br /&gt;
;Allow resets&lt;br /&gt;
: Whether the &#039;&#039;reset&#039;&#039; field is accepted or not&lt;br /&gt;
&lt;br /&gt;
===Course process===&lt;br /&gt;
&lt;br /&gt;
This allows you to specify actions to be taken on every single courses uploaded.&lt;br /&gt;
&lt;br /&gt;
;Shortname template&lt;br /&gt;
: If you are creating courses without a shortname, you can use this field to automatically generate a shortname. This field accepts two placeholders: %i for the ID number, %f for the summary.&lt;br /&gt;
;Restore file&lt;br /&gt;
: A backup file (.mbz) to import in the course after create/update.&lt;br /&gt;
;Restore from course&lt;br /&gt;
: The shortname of a course to import content from after create/update.&lt;br /&gt;
;Reset after upload&lt;br /&gt;
: Whether to reset the course after creating/updating it.&lt;br /&gt;
&lt;br /&gt;
===Default course values===&lt;br /&gt;
&lt;br /&gt;
Those are values that can be set in the web interface for all the fields that are not specified in the CSV file. Note that they are always used when creating a course, but only when specified during update (see &#039;&#039;Update mode&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
==Increasing speed==&lt;br /&gt;
&lt;br /&gt;
When importing the content of a backup file, or another course, you are adviced to enable the setting &#039;&#039;keeptempdirectoriesonbackup&#039;&#039;. This will considerably speed up the process of the upload if you are importing multiple times from the same source.&lt;br /&gt;
&lt;br /&gt;
[[de:Kurse hochladen]]&lt;br /&gt;
[[es:Subir cursos]]&lt;/div&gt;</summary>
		<author><name>Jmouneyrac</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Upload_courses&amp;diff=107308</id>
		<title>Upload courses</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Upload_courses&amp;diff=107308"/>
		<updated>2013-10-31T08:34:09Z</updated>

		<summary type="html">&lt;p&gt;Jmouneyrac: /* Short file example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Courses}}&lt;br /&gt;
&lt;br /&gt;
{{New features}}&lt;br /&gt;
An administrator can upload multiple courses using a text file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are many things you can do when using this tool:not only creating courses, but updating or deleting them. You can also update the course enrolment methods or import the content of another course.&lt;br /&gt;
&lt;br /&gt;
==Uploading the file==&lt;br /&gt;
&lt;br /&gt;
You can upload the file by navigating to &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Courses &amp;gt; Upload courses&#039;&#039; and either dragging and dropping the csv file or clicking the button to upload from the file picker.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|[[File:26uploadcourses.png|250px|thumb|Upload courses admin screen]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:uploadcoursesresults.png|250px|thumb|Courses successfully uploaded]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; It is also possible to use the command-line tool &#039;&#039;admin/tool/uploadcourse/cli/uploadcourse.php&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
When using the web interface, use the &#039;&#039;Preview&#039;&#039; option to see if any errors were detected in the previewed rows. If you proceed with the upload and there were something wrong detected with a course, it will be ignored.&lt;br /&gt;
&lt;br /&gt;
=== Short file example ===&lt;br /&gt;
uploadcourse.csv:&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
shortname,fullname,category,summary,enrolment_1,enrolment_1_role,enrolment_1_enrolperiod,role_student&lt;br /&gt;
courserestored,Course restored,1,xx,manual,student,1 month,&lt;br /&gt;
courserestored2,Course restored 2,1,xx,,,,&lt;br /&gt;
courserestored3,Course restored 3,1,xx,,,,padawan&lt;br /&gt;
courserestored4,Course restored 4,1,xx,manual,student,1 month,padawan&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Notice there are no spaces between the arguments.&lt;br /&gt;
&lt;br /&gt;
==Creating the text file==&lt;br /&gt;
&lt;br /&gt;
The text file to upload courses must be a CSV file. It accepts the following columns which are divided in two categories, the course information, and the course actions.&lt;br /&gt;
&lt;br /&gt;
===Course information fields===&lt;br /&gt;
&lt;br /&gt;
Most of those settings are available on the settings page of a course. Please refer to [[Course settings]] for more information.&lt;br /&gt;
&lt;br /&gt;
;shortname&lt;br /&gt;
: The shortname&lt;br /&gt;
;fullname&lt;br /&gt;
: The full name&lt;br /&gt;
;idnumber&lt;br /&gt;
: The ID number&lt;br /&gt;
;category&lt;br /&gt;
: The ID of the category to place the course in. This takes precedence over &#039;&#039;category_idnumber&#039;&#039; and &#039;&#039;category_path&#039;&#039;.&lt;br /&gt;
;category_idnumber&lt;br /&gt;
: The ID number of the category to place the course in. This takes precedence over &#039;&#039;category_path&#039;&#039;.&lt;br /&gt;
;category_path&lt;br /&gt;
: The path of the category to place the course in. If you want to place the course in a category named &amp;quot;Science-Fiction&amp;quot; which is located under the category &amp;quot;Movies&amp;quot;, the value to provide is: &amp;lt;code&amp;gt;Movies &amp;gt; Science-Fiction&amp;lt;/code&amp;gt;. Note that the separator must be &amp;lt;code&amp;gt;[space]&amp;gt;[space]&amp;lt;/code&amp;gt;. Also note that the category MUST exist, it will not be created.&lt;br /&gt;
;visible&lt;br /&gt;
: 1 if the course is visible, 0 if hidden&lt;br /&gt;
;startdate&lt;br /&gt;
: The time at which the course starts. Please note that this value is passed to the PHP function [http://php.net/manual/en/function.strtotime.php strtotime] to generate a timestamp.&lt;br /&gt;
;summary&lt;br /&gt;
: The summary of the course&lt;br /&gt;
;format&lt;br /&gt;
: The course format to use, this must be a valid course format plugin name. E.g. &#039;&#039;weeks&#039;&#039;, &#039;&#039;topics&#039;&#039;.&lt;br /&gt;
;theme&lt;br /&gt;
: The theme to use&lt;br /&gt;
;lang&lt;br /&gt;
: The language to use&lt;br /&gt;
;newsitems&lt;br /&gt;
: The number of news items&lt;br /&gt;
;showgrades&lt;br /&gt;
: 1 to show the gradebook to students, 0 to hide it.&lt;br /&gt;
;showreports&lt;br /&gt;
: 1 to show the activity reports, 0 to hide it.&lt;br /&gt;
;legacyfiles&lt;br /&gt;
: 1 to enable the legacy course files, 0 not to.&lt;br /&gt;
;maxbytes&lt;br /&gt;
: The maximum upload size of the course in bytes. Use 0 for the site limit.&lt;br /&gt;
;groupmode&lt;br /&gt;
: 0 for &#039;&#039;No groups&#039;&#039;, 1 for &#039;&#039;Separate groups&#039;&#039; and 2 for &#039;&#039;Visible groups&#039;&#039;.&lt;br /&gt;
;groupmodeforce&lt;br /&gt;
: 1 to force the group mode, otherwise enter 0.&lt;br /&gt;
;enablecompletion&lt;br /&gt;
: 1 to enable the activity completion, 0 not to.&lt;br /&gt;
&lt;br /&gt;
====Enrolment fields====&lt;br /&gt;
&lt;br /&gt;
Some fields can be constructed to enable and configure enrolment methods. The fields must be named &#039;&#039;enrolment_[number]&#039;&#039; for the enrolment method name, and &#039;&#039;enrolment_[number]_property&#039;&#039; for its properties.&lt;br /&gt;
&lt;br /&gt;
;enrolment_[number]&lt;br /&gt;
: The name of the enrolment method&lt;br /&gt;
;enrolment_[number]_delete&lt;br /&gt;
: 1 to delete this enrolment method from the course, if set to 1 all the other properties will be ignored.&lt;br /&gt;
;enrolment_[number]_disable&lt;br /&gt;
: 1 to disable this enrolment method from the course, if set to 1 all the other properties will be ignored.&lt;br /&gt;
;enrolment_[number]_startdate&lt;br /&gt;
: The enrolment start date. This value is passed to the PHP function strtotime().&lt;br /&gt;
;enrolment_[number]_enddate&lt;br /&gt;
: The enrolment start date. This value is passed to the PHP function strtotime().&lt;br /&gt;
;enrolment_[number]_enrolperiod&lt;br /&gt;
: Number of seconds, or if not a value understood by strtotime() such as &amp;quot;4 days&amp;quot;.&lt;br /&gt;
;enrolment_[number]_role&lt;br /&gt;
: The role short name&lt;br /&gt;
:enrolment_[number]_[property]&lt;br /&gt;
; Where property is understood by the specified enrolment method&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 enrolment_1: manual&lt;br /&gt;
 enrolment_1_role: student&lt;br /&gt;
 enrolment_1_enrolperiod: 1 month&lt;br /&gt;
 &lt;br /&gt;
 enrolment_2: self&lt;br /&gt;
 enrolment_2_startdate: 2013-01-30&lt;br /&gt;
&lt;br /&gt;
====Role renaming====&lt;br /&gt;
&lt;br /&gt;
To rename some roles, using the following pattern:&lt;br /&gt;
&lt;br /&gt;
;role_[shortname]&lt;br /&gt;
: The new name of the role &#039;&#039;[shortname]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 role_student: Apprentice&lt;br /&gt;
 role_teacher: Master&lt;br /&gt;
 role_mycustomrole: Jedi&lt;br /&gt;
&lt;br /&gt;
===Course action fields===&lt;br /&gt;
&lt;br /&gt;
Those settings take precedence over the &#039;&#039;Course process&#039;&#039; parameters.&lt;br /&gt;
&lt;br /&gt;
;delete&lt;br /&gt;
: 1 to delete the course &lt;br /&gt;
;rename&lt;br /&gt;
: The shortname to rename the course to&lt;br /&gt;
;backupfile&lt;br /&gt;
: An absolute path to a backup file (.mbz) to import in the course&lt;br /&gt;
;templatecourse&lt;br /&gt;
: The short name of a course to import the content from&lt;br /&gt;
;reset&lt;br /&gt;
: 1 to reset the course&lt;br /&gt;
&lt;br /&gt;
===Mandatory fields===&lt;br /&gt;
&lt;br /&gt;
;shortname&lt;br /&gt;
: This field is mandatory for every operation, with the only exception of creating new courses. See details on the course process parameter &#039;&#039;Shortname template&#039;&#039; for more information.&lt;br /&gt;
;fullname&lt;br /&gt;
: Required when creating a new course.&lt;br /&gt;
;category, category_idnumber, category_path&lt;br /&gt;
: One of these is required when creating a course.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Import options===&lt;br /&gt;
&lt;br /&gt;
To prevent unexpected behaviours, you have to specify what you want the tool to be able to do.&lt;br /&gt;
&lt;br /&gt;
;Upload mode&lt;br /&gt;
: This allows you to specify if courses can be created and/or updated.&lt;br /&gt;
;Update mode&lt;br /&gt;
: If you allow courses to be updated, you also have to tell the tool what to update the courses with.&lt;br /&gt;
;Allow deletes&lt;br /&gt;
: Whether the &#039;&#039;delete&#039;&#039; field is accepted or not&lt;br /&gt;
;Allow renames&lt;br /&gt;
: Whether the &#039;&#039;rename&#039;&#039; field is accepted or not&lt;br /&gt;
;Allow resets&lt;br /&gt;
: Whether the &#039;&#039;reset&#039;&#039; field is accepted or not&lt;br /&gt;
&lt;br /&gt;
===Course process===&lt;br /&gt;
&lt;br /&gt;
This allows you to specify actions to be taken on every single courses uploaded.&lt;br /&gt;
&lt;br /&gt;
;Shortname template&lt;br /&gt;
: If you are creating courses without a shortname, you can use this field to automatically generate a shortname. This field accepts two placeholders: %i for the ID number, %f for the summary.&lt;br /&gt;
;Restore file&lt;br /&gt;
: A backup file (.mbz) to import in the course after create/update.&lt;br /&gt;
;Restore from course&lt;br /&gt;
: The shortname of a course to import content from after create/update.&lt;br /&gt;
;Reset after upload&lt;br /&gt;
: Whether to reset the course after creating/updating it.&lt;br /&gt;
&lt;br /&gt;
===Default course values===&lt;br /&gt;
&lt;br /&gt;
Those are values that can be set in the web interface for all the fields that are not specified in the CSV file. Note that they are always used when creating a course, but only when specified during update (see &#039;&#039;Update mode&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
==Increasing speed==&lt;br /&gt;
&lt;br /&gt;
When importing the content of a backup file, or another course, you are adviced to enable the setting &#039;&#039;keeptempdirectoriesonbackup&#039;&#039;. This will considerably speed up the process of the upload if you are importing multiple times from the same source.&lt;br /&gt;
&lt;br /&gt;
[[de:Kurse hochladen]]&lt;br /&gt;
[[es:Subir cursos]]&lt;/div&gt;</summary>
		<author><name>Jmouneyrac</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Upload_courses&amp;diff=107307</id>
		<title>Upload courses</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Upload_courses&amp;diff=107307"/>
		<updated>2013-10-31T08:27:36Z</updated>

		<summary type="html">&lt;p&gt;Jmouneyrac: /* Short file example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Courses}}&lt;br /&gt;
&lt;br /&gt;
{{New features}}&lt;br /&gt;
An administrator can upload multiple courses using a text file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are many things you can do when using this tool:not only creating courses, but updating or deleting them. You can also update the course enrolment methods or import the content of another course.&lt;br /&gt;
&lt;br /&gt;
==Uploading the file==&lt;br /&gt;
&lt;br /&gt;
You can upload the file by navigating to &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Courses &amp;gt; Upload courses&#039;&#039; and either dragging and dropping the csv file or clicking the button to upload from the file picker.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|[[File:26uploadcourses.png|250px|thumb|Upload courses admin screen]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:uploadcoursesresults.png|250px|thumb|Courses successfully uploaded]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; It is also possible to use the command-line tool &#039;&#039;admin/tool/uploadcourse/cli/uploadcourse.php&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
When using the web interface, use the &#039;&#039;Preview&#039;&#039; option to see if any errors were detected in the previewed rows. If you proceed with the upload and there were something wrong detected with a course, it will be ignored.&lt;br /&gt;
&lt;br /&gt;
=== Short file example ===&lt;br /&gt;
uploadcourse.csv:&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
shortname,fullname,category,summary, enrolment_1, enrolment_1_role, enrolment_1_enrolperiod, role_student&lt;br /&gt;
courserestored,Course 4,1,xx, manual, student, 1 month,&lt;br /&gt;
courserestored2,Course 4,1,xx,,,,&lt;br /&gt;
courserestored3,Course 4,1,xx,,,,padawan&lt;br /&gt;
courserestored4,Course 4,1,xx, manual, student, 1 month, padawan&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Creating the text file==&lt;br /&gt;
&lt;br /&gt;
The text file to upload courses must be a CSV file. It accepts the following columns which are divided in two categories, the course information, and the course actions.&lt;br /&gt;
&lt;br /&gt;
===Course information fields===&lt;br /&gt;
&lt;br /&gt;
Most of those settings are available on the settings page of a course. Please refer to [[Course settings]] for more information.&lt;br /&gt;
&lt;br /&gt;
;shortname&lt;br /&gt;
: The shortname&lt;br /&gt;
;fullname&lt;br /&gt;
: The full name&lt;br /&gt;
;idnumber&lt;br /&gt;
: The ID number&lt;br /&gt;
;category&lt;br /&gt;
: The ID of the category to place the course in. This takes precedence over &#039;&#039;category_idnumber&#039;&#039; and &#039;&#039;category_path&#039;&#039;.&lt;br /&gt;
;category_idnumber&lt;br /&gt;
: The ID number of the category to place the course in. This takes precedence over &#039;&#039;category_path&#039;&#039;.&lt;br /&gt;
;category_path&lt;br /&gt;
: The path of the category to place the course in. If you want to place the course in a category named &amp;quot;Science-Fiction&amp;quot; which is located under the category &amp;quot;Movies&amp;quot;, the value to provide is: &amp;lt;code&amp;gt;Movies &amp;gt; Science-Fiction&amp;lt;/code&amp;gt;. Note that the separator must be &amp;lt;code&amp;gt;[space]&amp;gt;[space]&amp;lt;/code&amp;gt;. Also note that the category MUST exist, it will not be created.&lt;br /&gt;
;visible&lt;br /&gt;
: 1 if the course is visible, 0 if hidden&lt;br /&gt;
;startdate&lt;br /&gt;
: The time at which the course starts. Please note that this value is passed to the PHP function [http://php.net/manual/en/function.strtotime.php strtotime] to generate a timestamp.&lt;br /&gt;
;summary&lt;br /&gt;
: The summary of the course&lt;br /&gt;
;format&lt;br /&gt;
: The course format to use, this must be a valid course format plugin name. E.g. &#039;&#039;weeks&#039;&#039;, &#039;&#039;topics&#039;&#039;.&lt;br /&gt;
;theme&lt;br /&gt;
: The theme to use&lt;br /&gt;
;lang&lt;br /&gt;
: The language to use&lt;br /&gt;
;newsitems&lt;br /&gt;
: The number of news items&lt;br /&gt;
;showgrades&lt;br /&gt;
: 1 to show the gradebook to students, 0 to hide it.&lt;br /&gt;
;showreports&lt;br /&gt;
: 1 to show the activity reports, 0 to hide it.&lt;br /&gt;
;legacyfiles&lt;br /&gt;
: 1 to enable the legacy course files, 0 not to.&lt;br /&gt;
;maxbytes&lt;br /&gt;
: The maximum upload size of the course in bytes. Use 0 for the site limit.&lt;br /&gt;
;groupmode&lt;br /&gt;
: 0 for &#039;&#039;No groups&#039;&#039;, 1 for &#039;&#039;Separate groups&#039;&#039; and 2 for &#039;&#039;Visible groups&#039;&#039;.&lt;br /&gt;
;groupmodeforce&lt;br /&gt;
: 1 to force the group mode, otherwise enter 0.&lt;br /&gt;
;enablecompletion&lt;br /&gt;
: 1 to enable the activity completion, 0 not to.&lt;br /&gt;
&lt;br /&gt;
====Enrolment fields====&lt;br /&gt;
&lt;br /&gt;
Some fields can be constructed to enable and configure enrolment methods. The fields must be named &#039;&#039;enrolment_[number]&#039;&#039; for the enrolment method name, and &#039;&#039;enrolment_[number]_property&#039;&#039; for its properties.&lt;br /&gt;
&lt;br /&gt;
;enrolment_[number]&lt;br /&gt;
: The name of the enrolment method&lt;br /&gt;
;enrolment_[number]_delete&lt;br /&gt;
: 1 to delete this enrolment method from the course, if set to 1 all the other properties will be ignored.&lt;br /&gt;
;enrolment_[number]_disable&lt;br /&gt;
: 1 to disable this enrolment method from the course, if set to 1 all the other properties will be ignored.&lt;br /&gt;
;enrolment_[number]_startdate&lt;br /&gt;
: The enrolment start date. This value is passed to the PHP function strtotime().&lt;br /&gt;
;enrolment_[number]_enddate&lt;br /&gt;
: The enrolment start date. This value is passed to the PHP function strtotime().&lt;br /&gt;
;enrolment_[number]_enrolperiod&lt;br /&gt;
: Number of seconds, or if not a value understood by strtotime() such as &amp;quot;4 days&amp;quot;.&lt;br /&gt;
;enrolment_[number]_role&lt;br /&gt;
: The role short name&lt;br /&gt;
:enrolment_[number]_[property]&lt;br /&gt;
; Where property is understood by the specified enrolment method&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 enrolment_1: manual&lt;br /&gt;
 enrolment_1_role: student&lt;br /&gt;
 enrolment_1_enrolperiod: 1 month&lt;br /&gt;
 &lt;br /&gt;
 enrolment_2: self&lt;br /&gt;
 enrolment_2_startdate: 2013-01-30&lt;br /&gt;
&lt;br /&gt;
====Role renaming====&lt;br /&gt;
&lt;br /&gt;
To rename some roles, using the following pattern:&lt;br /&gt;
&lt;br /&gt;
;role_[shortname]&lt;br /&gt;
: The new name of the role &#039;&#039;[shortname]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 role_student: Apprentice&lt;br /&gt;
 role_teacher: Master&lt;br /&gt;
 role_mycustomrole: Jedi&lt;br /&gt;
&lt;br /&gt;
===Course action fields===&lt;br /&gt;
&lt;br /&gt;
Those settings take precedence over the &#039;&#039;Course process&#039;&#039; parameters.&lt;br /&gt;
&lt;br /&gt;
;delete&lt;br /&gt;
: 1 to delete the course &lt;br /&gt;
;rename&lt;br /&gt;
: The shortname to rename the course to&lt;br /&gt;
;backupfile&lt;br /&gt;
: An absolute path to a backup file (.mbz) to import in the course&lt;br /&gt;
;templatecourse&lt;br /&gt;
: The short name of a course to import the content from&lt;br /&gt;
;reset&lt;br /&gt;
: 1 to reset the course&lt;br /&gt;
&lt;br /&gt;
===Mandatory fields===&lt;br /&gt;
&lt;br /&gt;
;shortname&lt;br /&gt;
: This field is mandatory for every operation, with the only exception of creating new courses. See details on the course process parameter &#039;&#039;Shortname template&#039;&#039; for more information.&lt;br /&gt;
;fullname&lt;br /&gt;
: Required when creating a new course.&lt;br /&gt;
;category, category_idnumber, category_path&lt;br /&gt;
: One of these is required when creating a course.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Import options===&lt;br /&gt;
&lt;br /&gt;
To prevent unexpected behaviours, you have to specify what you want the tool to be able to do.&lt;br /&gt;
&lt;br /&gt;
;Upload mode&lt;br /&gt;
: This allows you to specify if courses can be created and/or updated.&lt;br /&gt;
;Update mode&lt;br /&gt;
: If you allow courses to be updated, you also have to tell the tool what to update the courses with.&lt;br /&gt;
;Allow deletes&lt;br /&gt;
: Whether the &#039;&#039;delete&#039;&#039; field is accepted or not&lt;br /&gt;
;Allow renames&lt;br /&gt;
: Whether the &#039;&#039;rename&#039;&#039; field is accepted or not&lt;br /&gt;
;Allow resets&lt;br /&gt;
: Whether the &#039;&#039;reset&#039;&#039; field is accepted or not&lt;br /&gt;
&lt;br /&gt;
===Course process===&lt;br /&gt;
&lt;br /&gt;
This allows you to specify actions to be taken on every single courses uploaded.&lt;br /&gt;
&lt;br /&gt;
;Shortname template&lt;br /&gt;
: If you are creating courses without a shortname, you can use this field to automatically generate a shortname. This field accepts two placeholders: %i for the ID number, %f for the summary.&lt;br /&gt;
;Restore file&lt;br /&gt;
: A backup file (.mbz) to import in the course after create/update.&lt;br /&gt;
;Restore from course&lt;br /&gt;
: The shortname of a course to import content from after create/update.&lt;br /&gt;
;Reset after upload&lt;br /&gt;
: Whether to reset the course after creating/updating it.&lt;br /&gt;
&lt;br /&gt;
===Default course values===&lt;br /&gt;
&lt;br /&gt;
Those are values that can be set in the web interface for all the fields that are not specified in the CSV file. Note that they are always used when creating a course, but only when specified during update (see &#039;&#039;Update mode&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
==Increasing speed==&lt;br /&gt;
&lt;br /&gt;
When importing the content of a backup file, or another course, you are adviced to enable the setting &#039;&#039;keeptempdirectoriesonbackup&#039;&#039;. This will considerably speed up the process of the upload if you are importing multiple times from the same source.&lt;br /&gt;
&lt;br /&gt;
[[de:Kurse hochladen]]&lt;br /&gt;
[[es:Subir cursos]]&lt;/div&gt;</summary>
		<author><name>Jmouneyrac</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Upload_courses&amp;diff=107306</id>
		<title>Upload courses</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Upload_courses&amp;diff=107306"/>
		<updated>2013-10-31T08:27:16Z</updated>

		<summary type="html">&lt;p&gt;Jmouneyrac: /* Short file example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Courses}}&lt;br /&gt;
&lt;br /&gt;
{{New features}}&lt;br /&gt;
An administrator can upload multiple courses using a text file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are many things you can do when using this tool:not only creating courses, but updating or deleting them. You can also update the course enrolment methods or import the content of another course.&lt;br /&gt;
&lt;br /&gt;
==Uploading the file==&lt;br /&gt;
&lt;br /&gt;
You can upload the file by navigating to &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Courses &amp;gt; Upload courses&#039;&#039; and either dragging and dropping the csv file or clicking the button to upload from the file picker.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|[[File:26uploadcourses.png|250px|thumb|Upload courses admin screen]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:uploadcoursesresults.png|250px|thumb|Courses successfully uploaded]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; It is also possible to use the command-line tool &#039;&#039;admin/tool/uploadcourse/cli/uploadcourse.php&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
When using the web interface, use the &#039;&#039;Preview&#039;&#039; option to see if any errors were detected in the previewed rows. If you proceed with the upload and there were something wrong detected with a course, it will be ignored.&lt;br /&gt;
&lt;br /&gt;
=== Short file example ===&lt;br /&gt;
uploadcourse.csv:&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
shortname,fullname,category,summary&lt;br /&gt;
shortname,fullname,category,summary, enrolment_1, enrolment_1_role, enrolment_1_enrolperiod, role_student&lt;br /&gt;
courserestored,Course 4,1,xx, manual, student, 1 month,&lt;br /&gt;
courserestored2,Course 4,1,xx,,,,&lt;br /&gt;
courserestored3,Course 4,1,xx,,,,padawan&lt;br /&gt;
courserestored4,Course 4,1,xx, manual, student, 1 month, padawan&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Creating the text file==&lt;br /&gt;
&lt;br /&gt;
The text file to upload courses must be a CSV file. It accepts the following columns which are divided in two categories, the course information, and the course actions.&lt;br /&gt;
&lt;br /&gt;
===Course information fields===&lt;br /&gt;
&lt;br /&gt;
Most of those settings are available on the settings page of a course. Please refer to [[Course settings]] for more information.&lt;br /&gt;
&lt;br /&gt;
;shortname&lt;br /&gt;
: The shortname&lt;br /&gt;
;fullname&lt;br /&gt;
: The full name&lt;br /&gt;
;idnumber&lt;br /&gt;
: The ID number&lt;br /&gt;
;category&lt;br /&gt;
: The ID of the category to place the course in. This takes precedence over &#039;&#039;category_idnumber&#039;&#039; and &#039;&#039;category_path&#039;&#039;.&lt;br /&gt;
;category_idnumber&lt;br /&gt;
: The ID number of the category to place the course in. This takes precedence over &#039;&#039;category_path&#039;&#039;.&lt;br /&gt;
;category_path&lt;br /&gt;
: The path of the category to place the course in. If you want to place the course in a category named &amp;quot;Science-Fiction&amp;quot; which is located under the category &amp;quot;Movies&amp;quot;, the value to provide is: &amp;lt;code&amp;gt;Movies &amp;gt; Science-Fiction&amp;lt;/code&amp;gt;. Note that the separator must be &amp;lt;code&amp;gt;[space]&amp;gt;[space]&amp;lt;/code&amp;gt;. Also note that the category MUST exist, it will not be created.&lt;br /&gt;
;visible&lt;br /&gt;
: 1 if the course is visible, 0 if hidden&lt;br /&gt;
;startdate&lt;br /&gt;
: The time at which the course starts. Please note that this value is passed to the PHP function [http://php.net/manual/en/function.strtotime.php strtotime] to generate a timestamp.&lt;br /&gt;
;summary&lt;br /&gt;
: The summary of the course&lt;br /&gt;
;format&lt;br /&gt;
: The course format to use, this must be a valid course format plugin name. E.g. &#039;&#039;weeks&#039;&#039;, &#039;&#039;topics&#039;&#039;.&lt;br /&gt;
;theme&lt;br /&gt;
: The theme to use&lt;br /&gt;
;lang&lt;br /&gt;
: The language to use&lt;br /&gt;
;newsitems&lt;br /&gt;
: The number of news items&lt;br /&gt;
;showgrades&lt;br /&gt;
: 1 to show the gradebook to students, 0 to hide it.&lt;br /&gt;
;showreports&lt;br /&gt;
: 1 to show the activity reports, 0 to hide it.&lt;br /&gt;
;legacyfiles&lt;br /&gt;
: 1 to enable the legacy course files, 0 not to.&lt;br /&gt;
;maxbytes&lt;br /&gt;
: The maximum upload size of the course in bytes. Use 0 for the site limit.&lt;br /&gt;
;groupmode&lt;br /&gt;
: 0 for &#039;&#039;No groups&#039;&#039;, 1 for &#039;&#039;Separate groups&#039;&#039; and 2 for &#039;&#039;Visible groups&#039;&#039;.&lt;br /&gt;
;groupmodeforce&lt;br /&gt;
: 1 to force the group mode, otherwise enter 0.&lt;br /&gt;
;enablecompletion&lt;br /&gt;
: 1 to enable the activity completion, 0 not to.&lt;br /&gt;
&lt;br /&gt;
====Enrolment fields====&lt;br /&gt;
&lt;br /&gt;
Some fields can be constructed to enable and configure enrolment methods. The fields must be named &#039;&#039;enrolment_[number]&#039;&#039; for the enrolment method name, and &#039;&#039;enrolment_[number]_property&#039;&#039; for its properties.&lt;br /&gt;
&lt;br /&gt;
;enrolment_[number]&lt;br /&gt;
: The name of the enrolment method&lt;br /&gt;
;enrolment_[number]_delete&lt;br /&gt;
: 1 to delete this enrolment method from the course, if set to 1 all the other properties will be ignored.&lt;br /&gt;
;enrolment_[number]_disable&lt;br /&gt;
: 1 to disable this enrolment method from the course, if set to 1 all the other properties will be ignored.&lt;br /&gt;
;enrolment_[number]_startdate&lt;br /&gt;
: The enrolment start date. This value is passed to the PHP function strtotime().&lt;br /&gt;
;enrolment_[number]_enddate&lt;br /&gt;
: The enrolment start date. This value is passed to the PHP function strtotime().&lt;br /&gt;
;enrolment_[number]_enrolperiod&lt;br /&gt;
: Number of seconds, or if not a value understood by strtotime() such as &amp;quot;4 days&amp;quot;.&lt;br /&gt;
;enrolment_[number]_role&lt;br /&gt;
: The role short name&lt;br /&gt;
:enrolment_[number]_[property]&lt;br /&gt;
; Where property is understood by the specified enrolment method&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 enrolment_1: manual&lt;br /&gt;
 enrolment_1_role: student&lt;br /&gt;
 enrolment_1_enrolperiod: 1 month&lt;br /&gt;
 &lt;br /&gt;
 enrolment_2: self&lt;br /&gt;
 enrolment_2_startdate: 2013-01-30&lt;br /&gt;
&lt;br /&gt;
====Role renaming====&lt;br /&gt;
&lt;br /&gt;
To rename some roles, using the following pattern:&lt;br /&gt;
&lt;br /&gt;
;role_[shortname]&lt;br /&gt;
: The new name of the role &#039;&#039;[shortname]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 role_student: Apprentice&lt;br /&gt;
 role_teacher: Master&lt;br /&gt;
 role_mycustomrole: Jedi&lt;br /&gt;
&lt;br /&gt;
===Course action fields===&lt;br /&gt;
&lt;br /&gt;
Those settings take precedence over the &#039;&#039;Course process&#039;&#039; parameters.&lt;br /&gt;
&lt;br /&gt;
;delete&lt;br /&gt;
: 1 to delete the course &lt;br /&gt;
;rename&lt;br /&gt;
: The shortname to rename the course to&lt;br /&gt;
;backupfile&lt;br /&gt;
: An absolute path to a backup file (.mbz) to import in the course&lt;br /&gt;
;templatecourse&lt;br /&gt;
: The short name of a course to import the content from&lt;br /&gt;
;reset&lt;br /&gt;
: 1 to reset the course&lt;br /&gt;
&lt;br /&gt;
===Mandatory fields===&lt;br /&gt;
&lt;br /&gt;
;shortname&lt;br /&gt;
: This field is mandatory for every operation, with the only exception of creating new courses. See details on the course process parameter &#039;&#039;Shortname template&#039;&#039; for more information.&lt;br /&gt;
;fullname&lt;br /&gt;
: Required when creating a new course.&lt;br /&gt;
;category, category_idnumber, category_path&lt;br /&gt;
: One of these is required when creating a course.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Import options===&lt;br /&gt;
&lt;br /&gt;
To prevent unexpected behaviours, you have to specify what you want the tool to be able to do.&lt;br /&gt;
&lt;br /&gt;
;Upload mode&lt;br /&gt;
: This allows you to specify if courses can be created and/or updated.&lt;br /&gt;
;Update mode&lt;br /&gt;
: If you allow courses to be updated, you also have to tell the tool what to update the courses with.&lt;br /&gt;
;Allow deletes&lt;br /&gt;
: Whether the &#039;&#039;delete&#039;&#039; field is accepted or not&lt;br /&gt;
;Allow renames&lt;br /&gt;
: Whether the &#039;&#039;rename&#039;&#039; field is accepted or not&lt;br /&gt;
;Allow resets&lt;br /&gt;
: Whether the &#039;&#039;reset&#039;&#039; field is accepted or not&lt;br /&gt;
&lt;br /&gt;
===Course process===&lt;br /&gt;
&lt;br /&gt;
This allows you to specify actions to be taken on every single courses uploaded.&lt;br /&gt;
&lt;br /&gt;
;Shortname template&lt;br /&gt;
: If you are creating courses without a shortname, you can use this field to automatically generate a shortname. This field accepts two placeholders: %i for the ID number, %f for the summary.&lt;br /&gt;
;Restore file&lt;br /&gt;
: A backup file (.mbz) to import in the course after create/update.&lt;br /&gt;
;Restore from course&lt;br /&gt;
: The shortname of a course to import content from after create/update.&lt;br /&gt;
;Reset after upload&lt;br /&gt;
: Whether to reset the course after creating/updating it.&lt;br /&gt;
&lt;br /&gt;
===Default course values===&lt;br /&gt;
&lt;br /&gt;
Those are values that can be set in the web interface for all the fields that are not specified in the CSV file. Note that they are always used when creating a course, but only when specified during update (see &#039;&#039;Update mode&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
==Increasing speed==&lt;br /&gt;
&lt;br /&gt;
When importing the content of a backup file, or another course, you are adviced to enable the setting &#039;&#039;keeptempdirectoriesonbackup&#039;&#039;. This will considerably speed up the process of the upload if you are importing multiple times from the same source.&lt;br /&gt;
&lt;br /&gt;
[[de:Kurse hochladen]]&lt;br /&gt;
[[es:Subir cursos]]&lt;/div&gt;</summary>
		<author><name>Jmouneyrac</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Upload_courses&amp;diff=107305</id>
		<title>Upload courses</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Upload_courses&amp;diff=107305"/>
		<updated>2013-10-31T08:15:32Z</updated>

		<summary type="html">&lt;p&gt;Jmouneyrac: /* Quick example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Courses}}&lt;br /&gt;
&lt;br /&gt;
{{New features}}&lt;br /&gt;
An administrator can upload multiple courses using a text file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are many things you can do when using this tool:not only creating courses, but updating or deleting them. You can also update the course enrolment methods or import the content of another course.&lt;br /&gt;
&lt;br /&gt;
==Uploading the file==&lt;br /&gt;
&lt;br /&gt;
You can upload the file by navigating to &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Courses &amp;gt; Upload courses&#039;&#039; and either dragging and dropping the csv file or clicking the button to upload from the file picker.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|[[File:26uploadcourses.png|250px|thumb|Upload courses admin screen]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:uploadcoursesresults.png|250px|thumb|Courses successfully uploaded]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; It is also possible to use the command-line tool &#039;&#039;admin/tool/uploadcourse/cli/uploadcourse.php&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
When using the web interface, use the &#039;&#039;Preview&#039;&#039; option to see if any errors were detected in the previewed rows. If you proceed with the upload and there were something wrong detected with a course, it will be ignored.&lt;br /&gt;
&lt;br /&gt;
=== Short file example ===&lt;br /&gt;
uploadcourse.csv:&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
shortname,fullname,category,summary&lt;br /&gt;
courserestored,Course 4,1,xx&lt;br /&gt;
courserestored2,Course 4,1,xx&lt;br /&gt;
courserestored3,Course 4,1,xx&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Creating the text file==&lt;br /&gt;
&lt;br /&gt;
The text file to upload courses must be a CSV file. It accepts the following columns which are divided in two categories, the course information, and the course actions.&lt;br /&gt;
&lt;br /&gt;
===Course information fields===&lt;br /&gt;
&lt;br /&gt;
Most of those settings are available on the settings page of a course. Please refer to [[Course settings]] for more information.&lt;br /&gt;
&lt;br /&gt;
;shortname&lt;br /&gt;
: The shortname&lt;br /&gt;
;fullname&lt;br /&gt;
: The full name&lt;br /&gt;
;idnumber&lt;br /&gt;
: The ID number&lt;br /&gt;
;category&lt;br /&gt;
: The ID of the category to place the course in. This takes precedence over &#039;&#039;category_idnumber&#039;&#039; and &#039;&#039;category_path&#039;&#039;.&lt;br /&gt;
;category_idnumber&lt;br /&gt;
: The ID number of the category to place the course in. This takes precedence over &#039;&#039;category_path&#039;&#039;.&lt;br /&gt;
;category_path&lt;br /&gt;
: The path of the category to place the course in. If you want to place the course in a category named &amp;quot;Science-Fiction&amp;quot; which is located under the category &amp;quot;Movies&amp;quot;, the value to provide is: &amp;lt;code&amp;gt;Movies &amp;gt; Science-Fiction&amp;lt;/code&amp;gt;. Note that the separator must be &amp;lt;code&amp;gt;[space]&amp;gt;[space]&amp;lt;/code&amp;gt;. Also note that the category MUST exist, it will not be created.&lt;br /&gt;
;visible&lt;br /&gt;
: 1 if the course is visible, 0 if hidden&lt;br /&gt;
;startdate&lt;br /&gt;
: The time at which the course starts. Please note that this value is passed to the PHP function [http://php.net/manual/en/function.strtotime.php strtotime] to generate a timestamp.&lt;br /&gt;
;summary&lt;br /&gt;
: The summary of the course&lt;br /&gt;
;format&lt;br /&gt;
: The course format to use, this must be a valid course format plugin name. E.g. &#039;&#039;weeks&#039;&#039;, &#039;&#039;topics&#039;&#039;.&lt;br /&gt;
;theme&lt;br /&gt;
: The theme to use&lt;br /&gt;
;lang&lt;br /&gt;
: The language to use&lt;br /&gt;
;newsitems&lt;br /&gt;
: The number of news items&lt;br /&gt;
;showgrades&lt;br /&gt;
: 1 to show the gradebook to students, 0 to hide it.&lt;br /&gt;
;showreports&lt;br /&gt;
: 1 to show the activity reports, 0 to hide it.&lt;br /&gt;
;legacyfiles&lt;br /&gt;
: 1 to enable the legacy course files, 0 not to.&lt;br /&gt;
;maxbytes&lt;br /&gt;
: The maximum upload size of the course in bytes. Use 0 for the site limit.&lt;br /&gt;
;groupmode&lt;br /&gt;
: 0 for &#039;&#039;No groups&#039;&#039;, 1 for &#039;&#039;Separate groups&#039;&#039; and 2 for &#039;&#039;Visible groups&#039;&#039;.&lt;br /&gt;
;groupmodeforce&lt;br /&gt;
: 1 to force the group mode, otherwise enter 0.&lt;br /&gt;
;enablecompletion&lt;br /&gt;
: 1 to enable the activity completion, 0 not to.&lt;br /&gt;
&lt;br /&gt;
====Enrolment fields====&lt;br /&gt;
&lt;br /&gt;
Some fields can be constructed to enable and configure enrolment methods. The fields must be named &#039;&#039;enrolment_[number]&#039;&#039; for the enrolment method name, and &#039;&#039;enrolment_[number]_property&#039;&#039; for its properties.&lt;br /&gt;
&lt;br /&gt;
;enrolment_[number]&lt;br /&gt;
: The name of the enrolment method&lt;br /&gt;
;enrolment_[number]_delete&lt;br /&gt;
: 1 to delete this enrolment method from the course, if set to 1 all the other properties will be ignored.&lt;br /&gt;
;enrolment_[number]_disable&lt;br /&gt;
: 1 to disable this enrolment method from the course, if set to 1 all the other properties will be ignored.&lt;br /&gt;
;enrolment_[number]_startdate&lt;br /&gt;
: The enrolment start date. This value is passed to the PHP function strtotime().&lt;br /&gt;
;enrolment_[number]_enddate&lt;br /&gt;
: The enrolment start date. This value is passed to the PHP function strtotime().&lt;br /&gt;
;enrolment_[number]_enrolperiod&lt;br /&gt;
: Number of seconds, or if not a value understood by strtotime() such as &amp;quot;4 days&amp;quot;.&lt;br /&gt;
;enrolment_[number]_role&lt;br /&gt;
: The role short name&lt;br /&gt;
:enrolment_[number]_[property]&lt;br /&gt;
; Where property is understood by the specified enrolment method&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 enrolment_1: manual&lt;br /&gt;
 enrolment_1_role: student&lt;br /&gt;
 enrolment_1_enrolperiod: 1 month&lt;br /&gt;
 &lt;br /&gt;
 enrolment_2: self&lt;br /&gt;
 enrolment_2_startdate: 2013-01-30&lt;br /&gt;
&lt;br /&gt;
====Role renaming====&lt;br /&gt;
&lt;br /&gt;
To rename some roles, using the following pattern:&lt;br /&gt;
&lt;br /&gt;
;role_[shortname]&lt;br /&gt;
: The new name of the role &#039;&#039;[shortname]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 role_student: Apprentice&lt;br /&gt;
 role_teacher: Master&lt;br /&gt;
 role_mycustomrole: Jedi&lt;br /&gt;
&lt;br /&gt;
===Course action fields===&lt;br /&gt;
&lt;br /&gt;
Those settings take precedence over the &#039;&#039;Course process&#039;&#039; parameters.&lt;br /&gt;
&lt;br /&gt;
;delete&lt;br /&gt;
: 1 to delete the course &lt;br /&gt;
;rename&lt;br /&gt;
: The shortname to rename the course to&lt;br /&gt;
;backupfile&lt;br /&gt;
: An absolute path to a backup file (.mbz) to import in the course&lt;br /&gt;
;templatecourse&lt;br /&gt;
: The short name of a course to import the content from&lt;br /&gt;
;reset&lt;br /&gt;
: 1 to reset the course&lt;br /&gt;
&lt;br /&gt;
===Mandatory fields===&lt;br /&gt;
&lt;br /&gt;
;shortname&lt;br /&gt;
: This field is mandatory for every operation, with the only exception of creating new courses. See details on the course process parameter &#039;&#039;Shortname template&#039;&#039; for more information.&lt;br /&gt;
;fullname&lt;br /&gt;
: Required when creating a new course.&lt;br /&gt;
;category, category_idnumber, category_path&lt;br /&gt;
: One of these is required when creating a course.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Import options===&lt;br /&gt;
&lt;br /&gt;
To prevent unexpected behaviours, you have to specify what you want the tool to be able to do.&lt;br /&gt;
&lt;br /&gt;
;Upload mode&lt;br /&gt;
: This allows you to specify if courses can be created and/or updated.&lt;br /&gt;
;Update mode&lt;br /&gt;
: If you allow courses to be updated, you also have to tell the tool what to update the courses with.&lt;br /&gt;
;Allow deletes&lt;br /&gt;
: Whether the &#039;&#039;delete&#039;&#039; field is accepted or not&lt;br /&gt;
;Allow renames&lt;br /&gt;
: Whether the &#039;&#039;rename&#039;&#039; field is accepted or not&lt;br /&gt;
;Allow resets&lt;br /&gt;
: Whether the &#039;&#039;reset&#039;&#039; field is accepted or not&lt;br /&gt;
&lt;br /&gt;
===Course process===&lt;br /&gt;
&lt;br /&gt;
This allows you to specify actions to be taken on every single courses uploaded.&lt;br /&gt;
&lt;br /&gt;
;Shortname template&lt;br /&gt;
: If you are creating courses without a shortname, you can use this field to automatically generate a shortname. This field accepts two placeholders: %i for the ID number, %f for the summary.&lt;br /&gt;
;Restore file&lt;br /&gt;
: A backup file (.mbz) to import in the course after create/update.&lt;br /&gt;
;Restore from course&lt;br /&gt;
: The shortname of a course to import content from after create/update.&lt;br /&gt;
;Reset after upload&lt;br /&gt;
: Whether to reset the course after creating/updating it.&lt;br /&gt;
&lt;br /&gt;
===Default course values===&lt;br /&gt;
&lt;br /&gt;
Those are values that can be set in the web interface for all the fields that are not specified in the CSV file. Note that they are always used when creating a course, but only when specified during update (see &#039;&#039;Update mode&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
==Increasing speed==&lt;br /&gt;
&lt;br /&gt;
When importing the content of a backup file, or another course, you are adviced to enable the setting &#039;&#039;keeptempdirectoriesonbackup&#039;&#039;. This will considerably speed up the process of the upload if you are importing multiple times from the same source.&lt;br /&gt;
&lt;br /&gt;
[[de:Kurse hochladen]]&lt;br /&gt;
[[es:Subir cursos]]&lt;/div&gt;</summary>
		<author><name>Jmouneyrac</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Upload_courses&amp;diff=107304</id>
		<title>Upload courses</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Upload_courses&amp;diff=107304"/>
		<updated>2013-10-31T08:14:58Z</updated>

		<summary type="html">&lt;p&gt;Jmouneyrac: /* Uploading the file */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Courses}}&lt;br /&gt;
&lt;br /&gt;
{{New features}}&lt;br /&gt;
An administrator can upload multiple courses using a text file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are many things you can do when using this tool:not only creating courses, but updating or deleting them. You can also update the course enrolment methods or import the content of another course.&lt;br /&gt;
&lt;br /&gt;
==Uploading the file==&lt;br /&gt;
&lt;br /&gt;
You can upload the file by navigating to &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Courses &amp;gt; Upload courses&#039;&#039; and either dragging and dropping the csv file or clicking the button to upload from the file picker.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|[[File:26uploadcourses.png|250px|thumb|Upload courses admin screen]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:uploadcoursesresults.png|250px|thumb|Courses successfully uploaded]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; It is also possible to use the command-line tool &#039;&#039;admin/tool/uploadcourse/cli/uploadcourse.php&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
When using the web interface, use the &#039;&#039;Preview&#039;&#039; option to see if any errors were detected in the previewed rows. If you proceed with the upload and there were something wrong detected with a course, it will be ignored.&lt;br /&gt;
&lt;br /&gt;
=== Quick example ===&lt;br /&gt;
uploadcourse.csv&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
shortname,fullname,category,summary&lt;br /&gt;
courserestored,Course 4,1,xx&lt;br /&gt;
courserestored2,Course 4,1,xx&lt;br /&gt;
courserestored3,Course 4,1,xx&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Creating the text file==&lt;br /&gt;
&lt;br /&gt;
The text file to upload courses must be a CSV file. It accepts the following columns which are divided in two categories, the course information, and the course actions.&lt;br /&gt;
&lt;br /&gt;
===Course information fields===&lt;br /&gt;
&lt;br /&gt;
Most of those settings are available on the settings page of a course. Please refer to [[Course settings]] for more information.&lt;br /&gt;
&lt;br /&gt;
;shortname&lt;br /&gt;
: The shortname&lt;br /&gt;
;fullname&lt;br /&gt;
: The full name&lt;br /&gt;
;idnumber&lt;br /&gt;
: The ID number&lt;br /&gt;
;category&lt;br /&gt;
: The ID of the category to place the course in. This takes precedence over &#039;&#039;category_idnumber&#039;&#039; and &#039;&#039;category_path&#039;&#039;.&lt;br /&gt;
;category_idnumber&lt;br /&gt;
: The ID number of the category to place the course in. This takes precedence over &#039;&#039;category_path&#039;&#039;.&lt;br /&gt;
;category_path&lt;br /&gt;
: The path of the category to place the course in. If you want to place the course in a category named &amp;quot;Science-Fiction&amp;quot; which is located under the category &amp;quot;Movies&amp;quot;, the value to provide is: &amp;lt;code&amp;gt;Movies &amp;gt; Science-Fiction&amp;lt;/code&amp;gt;. Note that the separator must be &amp;lt;code&amp;gt;[space]&amp;gt;[space]&amp;lt;/code&amp;gt;. Also note that the category MUST exist, it will not be created.&lt;br /&gt;
;visible&lt;br /&gt;
: 1 if the course is visible, 0 if hidden&lt;br /&gt;
;startdate&lt;br /&gt;
: The time at which the course starts. Please note that this value is passed to the PHP function [http://php.net/manual/en/function.strtotime.php strtotime] to generate a timestamp.&lt;br /&gt;
;summary&lt;br /&gt;
: The summary of the course&lt;br /&gt;
;format&lt;br /&gt;
: The course format to use, this must be a valid course format plugin name. E.g. &#039;&#039;weeks&#039;&#039;, &#039;&#039;topics&#039;&#039;.&lt;br /&gt;
;theme&lt;br /&gt;
: The theme to use&lt;br /&gt;
;lang&lt;br /&gt;
: The language to use&lt;br /&gt;
;newsitems&lt;br /&gt;
: The number of news items&lt;br /&gt;
;showgrades&lt;br /&gt;
: 1 to show the gradebook to students, 0 to hide it.&lt;br /&gt;
;showreports&lt;br /&gt;
: 1 to show the activity reports, 0 to hide it.&lt;br /&gt;
;legacyfiles&lt;br /&gt;
: 1 to enable the legacy course files, 0 not to.&lt;br /&gt;
;maxbytes&lt;br /&gt;
: The maximum upload size of the course in bytes. Use 0 for the site limit.&lt;br /&gt;
;groupmode&lt;br /&gt;
: 0 for &#039;&#039;No groups&#039;&#039;, 1 for &#039;&#039;Separate groups&#039;&#039; and 2 for &#039;&#039;Visible groups&#039;&#039;.&lt;br /&gt;
;groupmodeforce&lt;br /&gt;
: 1 to force the group mode, otherwise enter 0.&lt;br /&gt;
;enablecompletion&lt;br /&gt;
: 1 to enable the activity completion, 0 not to.&lt;br /&gt;
&lt;br /&gt;
====Enrolment fields====&lt;br /&gt;
&lt;br /&gt;
Some fields can be constructed to enable and configure enrolment methods. The fields must be named &#039;&#039;enrolment_[number]&#039;&#039; for the enrolment method name, and &#039;&#039;enrolment_[number]_property&#039;&#039; for its properties.&lt;br /&gt;
&lt;br /&gt;
;enrolment_[number]&lt;br /&gt;
: The name of the enrolment method&lt;br /&gt;
;enrolment_[number]_delete&lt;br /&gt;
: 1 to delete this enrolment method from the course, if set to 1 all the other properties will be ignored.&lt;br /&gt;
;enrolment_[number]_disable&lt;br /&gt;
: 1 to disable this enrolment method from the course, if set to 1 all the other properties will be ignored.&lt;br /&gt;
;enrolment_[number]_startdate&lt;br /&gt;
: The enrolment start date. This value is passed to the PHP function strtotime().&lt;br /&gt;
;enrolment_[number]_enddate&lt;br /&gt;
: The enrolment start date. This value is passed to the PHP function strtotime().&lt;br /&gt;
;enrolment_[number]_enrolperiod&lt;br /&gt;
: Number of seconds, or if not a value understood by strtotime() such as &amp;quot;4 days&amp;quot;.&lt;br /&gt;
;enrolment_[number]_role&lt;br /&gt;
: The role short name&lt;br /&gt;
:enrolment_[number]_[property]&lt;br /&gt;
; Where property is understood by the specified enrolment method&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 enrolment_1: manual&lt;br /&gt;
 enrolment_1_role: student&lt;br /&gt;
 enrolment_1_enrolperiod: 1 month&lt;br /&gt;
 &lt;br /&gt;
 enrolment_2: self&lt;br /&gt;
 enrolment_2_startdate: 2013-01-30&lt;br /&gt;
&lt;br /&gt;
====Role renaming====&lt;br /&gt;
&lt;br /&gt;
To rename some roles, using the following pattern:&lt;br /&gt;
&lt;br /&gt;
;role_[shortname]&lt;br /&gt;
: The new name of the role &#039;&#039;[shortname]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 role_student: Apprentice&lt;br /&gt;
 role_teacher: Master&lt;br /&gt;
 role_mycustomrole: Jedi&lt;br /&gt;
&lt;br /&gt;
===Course action fields===&lt;br /&gt;
&lt;br /&gt;
Those settings take precedence over the &#039;&#039;Course process&#039;&#039; parameters.&lt;br /&gt;
&lt;br /&gt;
;delete&lt;br /&gt;
: 1 to delete the course &lt;br /&gt;
;rename&lt;br /&gt;
: The shortname to rename the course to&lt;br /&gt;
;backupfile&lt;br /&gt;
: An absolute path to a backup file (.mbz) to import in the course&lt;br /&gt;
;templatecourse&lt;br /&gt;
: The short name of a course to import the content from&lt;br /&gt;
;reset&lt;br /&gt;
: 1 to reset the course&lt;br /&gt;
&lt;br /&gt;
===Mandatory fields===&lt;br /&gt;
&lt;br /&gt;
;shortname&lt;br /&gt;
: This field is mandatory for every operation, with the only exception of creating new courses. See details on the course process parameter &#039;&#039;Shortname template&#039;&#039; for more information.&lt;br /&gt;
;fullname&lt;br /&gt;
: Required when creating a new course.&lt;br /&gt;
;category, category_idnumber, category_path&lt;br /&gt;
: One of these is required when creating a course.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Import options===&lt;br /&gt;
&lt;br /&gt;
To prevent unexpected behaviours, you have to specify what you want the tool to be able to do.&lt;br /&gt;
&lt;br /&gt;
;Upload mode&lt;br /&gt;
: This allows you to specify if courses can be created and/or updated.&lt;br /&gt;
;Update mode&lt;br /&gt;
: If you allow courses to be updated, you also have to tell the tool what to update the courses with.&lt;br /&gt;
;Allow deletes&lt;br /&gt;
: Whether the &#039;&#039;delete&#039;&#039; field is accepted or not&lt;br /&gt;
;Allow renames&lt;br /&gt;
: Whether the &#039;&#039;rename&#039;&#039; field is accepted or not&lt;br /&gt;
;Allow resets&lt;br /&gt;
: Whether the &#039;&#039;reset&#039;&#039; field is accepted or not&lt;br /&gt;
&lt;br /&gt;
===Course process===&lt;br /&gt;
&lt;br /&gt;
This allows you to specify actions to be taken on every single courses uploaded.&lt;br /&gt;
&lt;br /&gt;
;Shortname template&lt;br /&gt;
: If you are creating courses without a shortname, you can use this field to automatically generate a shortname. This field accepts two placeholders: %i for the ID number, %f for the summary.&lt;br /&gt;
;Restore file&lt;br /&gt;
: A backup file (.mbz) to import in the course after create/update.&lt;br /&gt;
;Restore from course&lt;br /&gt;
: The shortname of a course to import content from after create/update.&lt;br /&gt;
;Reset after upload&lt;br /&gt;
: Whether to reset the course after creating/updating it.&lt;br /&gt;
&lt;br /&gt;
===Default course values===&lt;br /&gt;
&lt;br /&gt;
Those are values that can be set in the web interface for all the fields that are not specified in the CSV file. Note that they are always used when creating a course, but only when specified during update (see &#039;&#039;Update mode&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
==Increasing speed==&lt;br /&gt;
&lt;br /&gt;
When importing the content of a backup file, or another course, you are adviced to enable the setting &#039;&#039;keeptempdirectoriesonbackup&#039;&#039;. This will considerably speed up the process of the upload if you are importing multiple times from the same source.&lt;br /&gt;
&lt;br /&gt;
[[de:Kurse hochladen]]&lt;br /&gt;
[[es:Subir cursos]]&lt;/div&gt;</summary>
		<author><name>Jmouneyrac</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Upgrading&amp;diff=107183</id>
		<title>Upgrading</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Upgrading&amp;diff=107183"/>
		<updated>2013-10-25T07:27:29Z</updated>

		<summary type="html">&lt;p&gt;Jmouneyrac: /* Possible issues that may affect you in Moodle 2.6 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Installing Moodle}}	&lt;br /&gt;
&#039;&#039;This page explains in detail how to upgrade Moodle. For a summary of the process, see [[Upgrade overview]].&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Check the requirements==&lt;br /&gt;
&lt;br /&gt;
Check that your server meets all requirements for 2.6 in &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Server &amp;gt; [[Environment]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Note: You can only upgrade to Moodle 2.6 from Moodle 2.2 or later. If upgrading from earlier versions, you must [https://docs.moodle.org/22/en/Upgrading_to_Moodle_2.2 upgrade to 2.2] as a first step.&lt;br /&gt;
&lt;br /&gt;
==Before you upgrade your site for real==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;We advise that you test the upgrade first on a COPY of your production site, to make sure it works as you expect.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Backup important data ==&lt;br /&gt;
&lt;br /&gt;
There are three areas that should be backed up before any upgrade:&lt;br /&gt;
#Moodle software (For example, everything in server/htdocs/moodle)&lt;br /&gt;
#Moodle uploaded files (For example, server/moodledata)&lt;br /&gt;
#Moodle database (For example, your Postgres or MySQL database dump)&lt;br /&gt;
&lt;br /&gt;
See [[Site backup]] for more specific information.&lt;br /&gt;
&lt;br /&gt;
==Put your site into maintenance mode==&lt;br /&gt;
Before you begin upgrading your site, you should put it into [[Maintenance_mode | maintenance mode]] to stop any non-admin users from logging in.&lt;br /&gt;
&lt;br /&gt;
== Check for add-on updates ==&lt;br /&gt;
&lt;br /&gt;
If you have [[Automatic updates deployment]] enabled, you will be able to update installed add-ons automatically during the upgrade. Just make sure you check for available updates (via the button for it) at the Plugins check screen.&lt;br /&gt;
&lt;br /&gt;
If you are updating add-ons manually, it is a good moment now to check in the [http://moodle.org/plugins Moodle Plugins directory] whether there is a 2.6 version available for any add-ons (including themes) that you have previously installed on your site. If so, download the add-on package. In the next step, you will copy it to the appropriate location in your Moodle code (see [[Installing add-ons]]).&lt;br /&gt;
&lt;br /&gt;
The upgrade of the add-on will then happen as part of the Moodle upgrade process.&lt;br /&gt;
&lt;br /&gt;
If an out-of-date add-on causes your upgrade to fail, you can usually delete the add-on code rather than uninstalling it from within Moodle so that the data associated with it is not deleted.&lt;br /&gt;
&lt;br /&gt;
== Install the new Moodle software ==&lt;br /&gt;
&lt;br /&gt;
=== Standard install package ===&lt;br /&gt;
&lt;br /&gt;
# Move your old Moodle software program files to another location. &#039;&#039;Do NOT copy new files over the old files.&#039;&#039;&lt;br /&gt;
# Unzip or unpack the upgrade file so that all the new Moodle software program files are in the location the old files used to be in on the server. Moodle will adjust SQL and moodledata if it needs to in the upgrade.&lt;br /&gt;
# Copy your old [[Configuration file|config.php file]] back to the new Moodle directory. &lt;br /&gt;
# As mentioned above, if you had installed any custom add-ons on your site you should add them to the new code tree now. It is important to check that you get the correct version for your new version of Moodle. Be particularly careful that you do not overwrite any code in the new version of Moodle.&lt;br /&gt;
&lt;br /&gt;
====Linux====&lt;br /&gt;
 mv moodle moodle.backup&lt;br /&gt;
 tar xvzf moodle-2.6.tgz&lt;br /&gt;
&lt;br /&gt;
Next, copy across your config.php, any custom plugins, and your .htaccess file if you created one (&#039;&#039;&#039;check that custom plugins are the correct version for your new Moodle first&#039;&#039;&#039;):&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;
 cp -pr moodle.backup/mod/mymod moodle/mod/mymod&lt;br /&gt;
&lt;br /&gt;
Don&#039;t forget to make moodle/config.php (and the rest of the source code) readable by your www server. Ideally the files should not be writeable by your server.&lt;br /&gt;
&lt;br /&gt;
If you use cron, take care that cron.php is executeable and uses the correct php command: &lt;br /&gt;
 chmod 740 admin/cli/cron.php (some configurations need chmod 750 or chmod 755)&lt;br /&gt;
 copy the first line from cron.php (if it looks like &#039;#!/usr/local/bin/php&#039; or &#039;#!/usr/local/bin/php5.3&#039;, no need to copy &#039;&amp;lt;?php&#039;)&lt;br /&gt;
&lt;br /&gt;
if necessary.&lt;br /&gt;
&lt;br /&gt;
=== Using Git ===&lt;br /&gt;
&lt;br /&gt;
You can use Git for updating or upgrading your Moodle. See [[Git for Administrators]] for details.&lt;br /&gt;
&lt;br /&gt;
===Command line upgrade===&lt;br /&gt;
&lt;br /&gt;
On Linux servers, Moodle 2.6 supports running the [[CLI|upgrade from the command line]], rather than through a web browser. This is likely to be more reliable, particularly for large sites.&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 go to &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Notifications&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Moodle will automatically detect the new version and perform all the SQL database or file system 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;
Note: If you are running multiple servers then you should purge all caches manually (via &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Development &amp;gt; Purge all caches&#039;&#039;) after completing the upgrade on all servers.&lt;br /&gt;
&lt;br /&gt;
==After upgrading==&lt;br /&gt;
&lt;br /&gt;
The config.php file from your installation should work fine but if you take a look at config-dist.php that came with Moodle 2.6 there are more/different options available (e.g. database drivers and settings). It&#039;s a good idea to map your old config.php settings to a new one based on the 2.6 config-dist.php.&lt;br /&gt;
&lt;br /&gt;
==Fatal error: Maximum execution time of 30 seconds exceeded...==&lt;br /&gt;
&lt;br /&gt;
If your server uses a main language other than English, you may encounter a &#039;Fatal error: Maximum execution time of 30 seconds exceeded&#039; when you try to upgrade it. You can increase max_execution_time = 160 on php.ini to allow the scripts enough time to process the language update. Otherwise, you can switch to English as the default language before doing the upgrade and back to your original language after a succcessful upgrade. See the forum discussion at https://moodle.org/mod/forum/discuss.php?d=119598 .&lt;br /&gt;
&lt;br /&gt;
==Possible issues that may affect you in Moodle 2.6==&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;My Mobile&amp;quot; theme has been removed (see MDL-40874).During the upgrade process &amp;quot;My Mobile&amp;quot; theme will be uninstalled and all its settings will be deleted. &amp;quot;My Mobile&amp;quot; theme and its extending themes will fallback to the mobile friendly &amp;quot;Clean&amp;quot; theme. If you wish to keep &amp;quot;My Mobile&amp;quot; theme and its settings, BEFORE UPGRADING you can copy the files from the unmaintained plugin into theme/mymobile. The unmaintained plugin can be downloaded on the [https://moodle.org/plugins/pluginversion.php?id=4563 Moodle.org plugins repository].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Moodle 2.3, 2.4 and 2.5 improvements ===&lt;br /&gt;
&lt;br /&gt;
Depending on which version you are upgrading from, please see the section &#039;Possible issues that may affect you&#039; in the documentation&lt;br /&gt;
&lt;br /&gt;
* [https://docs.moodle.org/23/en/Upgrading Upgrading to Moodle 2.3]&lt;br /&gt;
* [https://docs.moodle.org/24/en/Upgrading Upgrading to Moodle 2.4]&lt;br /&gt;
* [https://docs.moodle.org/25/en/Upgrading Upgrading to Moodle 2.5]&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;
* [[dev:Moodle 2.6 release notes|Moodle 2.6 release notes]]&lt;br /&gt;
* [[dev:Upgrade API|Upgrade API]]&lt;br /&gt;
&lt;br /&gt;
[[es:Actualización de moodle]]&lt;br /&gt;
[[fr:Mise à jour]]&lt;br /&gt;
[[ja:Moodleをアップグレードする]]&lt;br /&gt;
[[de:Aktualisierung von Moodle]]&lt;/div&gt;</summary>
		<author><name>Jmouneyrac</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=error/local_hub/freshmoodleregistrationerror2&amp;diff=104752</id>
		<title>error/local hub/freshmoodleregistrationerror2</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=error/local_hub/freshmoodleregistrationerror2&amp;diff=104752"/>
		<updated>2013-05-06T04:15:04Z</updated>

		<summary type="html">&lt;p&gt;Jmouneyrac: Created page with &amp;quot;You are trying to register a site with a url that was previously used by another registered site. A request to register this url has already been sent to the site administrator o...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You are trying to register a site with a url that was previously used by another registered site. A request to register this url has already been sent to the site administrator of this other site. This administrator (probably you) need to confirm the new registration.&lt;br /&gt;
&lt;br /&gt;
== Also see ==&lt;br /&gt;
* https://docs.moodle.org/310/en/error/local_hub/freshmoodleregistrationerror&lt;/div&gt;</summary>
		<author><name>Jmouneyrac</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=error/local_hub/freshmoodleregistrationerror&amp;diff=104751</id>
		<title>error/local hub/freshmoodleregistrationerror</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=error/local_hub/freshmoodleregistrationerror&amp;diff=104751"/>
		<updated>2013-05-06T04:09:04Z</updated>

		<summary type="html">&lt;p&gt;Jmouneyrac: Created page with &amp;quot;You are trying to register a site with a url that was previously used by a registered site.   This alert is due to one of these cases: * you try to register a fresh moodle site o...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You are trying to register a site with a url that was previously used by a registered site. &lt;br /&gt;
&lt;br /&gt;
This alert is due to one of these cases:&lt;br /&gt;
* you try to register a fresh moodle site on a previously registered url&lt;br /&gt;
* you try to register a registered moodle site on a different address, this address having been registered too with a different site.&lt;br /&gt;
&lt;br /&gt;
An email should have been sent to the previously registered site administrator to confirm that you are the real owner of the site. The hub only sends one email per day.&lt;br /&gt;
&lt;br /&gt;
The previously registered site administrator will have the choice to delete the previous registration record from the hub. If he/she decide to do it, then you will be able to register your &amp;quot;new&amp;quot; site. Note that except if the site admin changed, you should be this previously registered  administrator, but this step is required to avoid hacking. Thank you.&lt;/div&gt;</summary>
		<author><name>Jmouneyrac</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Hub_administration&amp;diff=103901</id>
		<title>Hub administration</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Hub_administration&amp;diff=103901"/>
		<updated>2013-04-08T10:04:49Z</updated>

		<summary type="html">&lt;p&gt;Jmouneyrac: /* How to set up a Moodle Hub server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Community hubs}}&lt;br /&gt;
==Deciding to run a Hub==&lt;br /&gt;
&lt;br /&gt;
Running a hub server is not something you should undertake lightly.  &lt;br /&gt;
&lt;br /&gt;
As the hub administrator you are responsible for the content in the hub, and you need to put in place processes to:&lt;br /&gt;
* verify all the course content is clean (of porn or malicious javascript)&lt;br /&gt;
* manage registered sites and their status &lt;br /&gt;
* maintain the quality of the listings through editing&lt;br /&gt;
&lt;br /&gt;
=== Minimal Requirements ===&lt;br /&gt;
&lt;br /&gt;
Below is a list of Minimal requirements for running a Moodle Community Hub.&lt;br /&gt;
&lt;br /&gt;
* MySQL - minimum version 5.0.25&lt;br /&gt;
* PHP 5.3.2&lt;br /&gt;
* Apache&lt;br /&gt;
* ensure that the site you will be registering does not use any upper case letters (even though those are perfectly valid).  &#039;&#039;EG: moodle.org/2012-Spring will not work!&#039;&#039;&lt;br /&gt;
* ensure that the following php.ini variables are set to &amp;quot;On&amp;quot;&lt;br /&gt;
** allow_url_fopen: This setting is required the hub to be able to register a site.  If this option is not enabled, you will be given the [[error/local_hub/cannotregisternotavailablesite|cannotregisternotavailablesite]] error. Related tracker issue: https://tracker.moodle.org/browse/CONTRIB-3063&lt;br /&gt;
* mod_security in Apache version 1 and mod_security2 in Apache version 2 will return a 403 forbidden error when a URL that is not the local domain is passed as a get variable. mod_security on either the hub or client servers will block the completion of the client/hub registration process, even to MOOCH, as within the registration process URL&#039;s are passed as get variables a number of times. An exception can be added to mod_security in Apache version 1 via a local .htacess file. However, this ability was removed in mod_security2.  In mod_security2 the exception must be added to mod_security.conf of /conf.d. Related forum discussion: http://moodle.org/mod/forum/discuss.php?d=188933&lt;br /&gt;
&lt;br /&gt;
==How the hub software works==&lt;br /&gt;
&lt;br /&gt;
The hub software is implemented as a separate &amp;quot;local&amp;quot; plugin designed to be added to a standard install of Moodle 2.0 or later.  In this way the hub gets to use on all the features in the Moodle core API and benefits from maintenance of the core code.&lt;br /&gt;
&lt;br /&gt;
Once installed the whole site gets a new frontpage with a simple search box (see http://hub.moodle.org/ for example).&lt;br /&gt;
&lt;br /&gt;
Please don&#039;t add the hub capabilities to an existing Moodle site with real courses.  Although it may work, there are some opportunities for GUI confusion and some unknowns when it comes to security, so please just avoid it. Moodle is free, so it&#039;s trivial to install another clean copy to build your hub with.&lt;br /&gt;
&lt;br /&gt;
==How to set up a Moodle Hub server==&lt;br /&gt;
&lt;br /&gt;
# Install Moodle 2.0 or later somewhere on a web server with a nice URL.&lt;br /&gt;
# Download the latest hub plugin from https://github.com/moodlehq/moodle-local_hub&lt;br /&gt;
# Save the zip into the /local directory of Moodle and unzip, producing /local/hub&lt;br /&gt;
# Visit the &amp;quot;Notifications&amp;quot; page in Moodle (/admin) to complete the upgrade and install the hub software.&lt;br /&gt;
# Uncheck password policy (search &#039;passwordpolicy&#039; in admin search)&lt;br /&gt;
# Allow extended characters in usernames (search &#039;extendedusernamechars&#039; in admin search)&lt;br /&gt;
# Enable web services for the hub (&#039;&#039;Settings &amp;gt; Site Administration &amp;gt; Advanced features&#039;&#039;)&lt;br /&gt;
# Enable the XML-RPC protocol (&#039;&#039;Settings &amp;gt; Site Administration &amp;gt; Plugins &amp;gt; Web services &amp;gt; Manage protocols&#039;&#039;)&lt;br /&gt;
# Set up the SMTP (&#039;&#039;Settings &amp;gt; Site Administration &amp;gt; Plugins &amp;gt; Message outputs &amp;gt; Email&#039;&#039;)&lt;br /&gt;
# Set up the recaptcha (&#039;&#039;Settings &amp;gt; Site Administration &amp;gt; Plugins &amp;gt; Authentication &amp;gt; Manage authentication&#039;&#039;) &lt;br /&gt;
# Set up your hub (&#039;&#039;Settings &amp;gt; Site Administration &amp;gt; Hub &amp;gt; Settings&#039;&#039;) Supply a description, enable the hub, supply a hub password.&lt;br /&gt;
&lt;br /&gt;
Congratulations!  You now have a working hub with no content!&lt;br /&gt;
&lt;br /&gt;
==Site registration==&lt;br /&gt;
&lt;br /&gt;
Only sites that are registered with the hub are allowed to publish content there.&lt;br /&gt;
&lt;br /&gt;
Sites register on the hub via &#039;&#039;Settings &amp;gt; Site administration &amp;gt; Server &amp;gt; Hubs&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==Hub registration==  &lt;br /&gt;
&lt;br /&gt;
You can also register your hub with the Moodle hub Directory, a listing of many hubs from around the world, enabling people from all over the world to find your hub and search the courses within it.  You may want to wait until you have some content before you register.&lt;br /&gt;
&lt;br /&gt;
==Managing sites==&lt;br /&gt;
In &#039;&#039;Settings &amp;gt; Site administration &amp;gt; Hub &amp;gt; Manage sites&#039;&#039;, you can:&lt;br /&gt;
* Prioritise a site: during a search, course from prioritised sites appear on top of the list. A prioritised site is always trusted.&lt;br /&gt;
* Trust a site: when a site is trusted, any published course is immediately available&lt;br /&gt;
* Delete a site: delete a site from the database. A message will be sent to the site administrator.&lt;br /&gt;
* Settings: you can change some information as the name, the description, the language...&lt;br /&gt;
* Make a site visible: only site declared as visible appear on the the site list (currently the site list hasn&#039;t been implemented)&lt;br /&gt;
&lt;br /&gt;
==Managing courses==&lt;br /&gt;
In &#039;&#039;Settings &amp;gt; Site administration &amp;gt; Hub &amp;gt; Manage course&#039;&#039;, you can:&lt;br /&gt;
* Delete a course: delete a course from the database.&lt;br /&gt;
* Settings: you can change some information as the name, the description, the language...&lt;br /&gt;
* Make a course visible: decide if the course is displayed on search result&lt;br /&gt;
&lt;br /&gt;
== Important things about roles, users and web services ==&lt;br /&gt;
A hub server uses intensively Moodle web service 2.0. For this reason it is important to understand the [https://docs.moodle.org/en/Web_Services web services administration], and what happens if you change some roles/users/services.&lt;br /&gt;
&lt;br /&gt;
=== Roles ===&lt;br /&gt;
The hub server creates on the fly some roles that you should &#039;&#039;&#039;never delete/modify&#039;&#039;&#039;:&lt;br /&gt;
* one role for the hub directory&lt;br /&gt;
* one role for registered sites&lt;br /&gt;
* one role for public sites&lt;br /&gt;
&lt;br /&gt;
=== Users ===&lt;br /&gt;
The hub server creates on the fly some users that you should &#039;&#039;&#039;never delete/modify&#039;&#039;&#039;:&lt;br /&gt;
* one user for the hub directory&lt;br /&gt;
* one user for public access&lt;br /&gt;
* as many users as registered sites&lt;br /&gt;
&lt;br /&gt;
=== Services ===&lt;br /&gt;
The hub creates during installation some web services that you should &#039;&#039;&#039;never delete/modify&#039;&#039;&#039;:&lt;br /&gt;
* one service for Hub directory&lt;br /&gt;
* one service for Registered sites&lt;br /&gt;
* one service for Public sites&lt;br /&gt;
&lt;br /&gt;
It also creates tokens on the fly. These tokens are not displayed on the token management list, so you cannot accidentally delete them.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*[[Site registration]]&lt;br /&gt;
&lt;br /&gt;
[[ja:ハブ管理]]&lt;/div&gt;</summary>
		<author><name>Jmouneyrac</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Hub_administration&amp;diff=103900</id>
		<title>Hub administration</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Hub_administration&amp;diff=103900"/>
		<updated>2013-04-08T10:03:16Z</updated>

		<summary type="html">&lt;p&gt;Jmouneyrac: /* How to set up a Moodle Hub server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Community hubs}}&lt;br /&gt;
==Deciding to run a Hub==&lt;br /&gt;
&lt;br /&gt;
Running a hub server is not something you should undertake lightly.  &lt;br /&gt;
&lt;br /&gt;
As the hub administrator you are responsible for the content in the hub, and you need to put in place processes to:&lt;br /&gt;
* verify all the course content is clean (of porn or malicious javascript)&lt;br /&gt;
* manage registered sites and their status &lt;br /&gt;
* maintain the quality of the listings through editing&lt;br /&gt;
&lt;br /&gt;
=== Minimal Requirements ===&lt;br /&gt;
&lt;br /&gt;
Below is a list of Minimal requirements for running a Moodle Community Hub.&lt;br /&gt;
&lt;br /&gt;
* MySQL - minimum version 5.0.25&lt;br /&gt;
* PHP 5.3.2&lt;br /&gt;
* Apache&lt;br /&gt;
* ensure that the site you will be registering does not use any upper case letters (even though those are perfectly valid).  &#039;&#039;EG: moodle.org/2012-Spring will not work!&#039;&#039;&lt;br /&gt;
* ensure that the following php.ini variables are set to &amp;quot;On&amp;quot;&lt;br /&gt;
** allow_url_fopen: This setting is required the hub to be able to register a site.  If this option is not enabled, you will be given the [[error/local_hub/cannotregisternotavailablesite|cannotregisternotavailablesite]] error. Related tracker issue: https://tracker.moodle.org/browse/CONTRIB-3063&lt;br /&gt;
* mod_security in Apache version 1 and mod_security2 in Apache version 2 will return a 403 forbidden error when a URL that is not the local domain is passed as a get variable. mod_security on either the hub or client servers will block the completion of the client/hub registration process, even to MOOCH, as within the registration process URL&#039;s are passed as get variables a number of times. An exception can be added to mod_security in Apache version 1 via a local .htacess file. However, this ability was removed in mod_security2.  In mod_security2 the exception must be added to mod_security.conf of /conf.d. Related forum discussion: http://moodle.org/mod/forum/discuss.php?d=188933&lt;br /&gt;
&lt;br /&gt;
==How the hub software works==&lt;br /&gt;
&lt;br /&gt;
The hub software is implemented as a separate &amp;quot;local&amp;quot; plugin designed to be added to a standard install of Moodle 2.0 or later.  In this way the hub gets to use on all the features in the Moodle core API and benefits from maintenance of the core code.&lt;br /&gt;
&lt;br /&gt;
Once installed the whole site gets a new frontpage with a simple search box (see http://hub.moodle.org/ for example).&lt;br /&gt;
&lt;br /&gt;
Please don&#039;t add the hub capabilities to an existing Moodle site with real courses.  Although it may work, there are some opportunities for GUI confusion and some unknowns when it comes to security, so please just avoid it. Moodle is free, so it&#039;s trivial to install another clean copy to build your hub with.&lt;br /&gt;
&lt;br /&gt;
==How to set up a Moodle Hub server==&lt;br /&gt;
&lt;br /&gt;
# Install Moodle 2.0 or later somewhere on a web server with a nice URL.&lt;br /&gt;
# Download the latest hub plugin from https://github.com/moodlehq/moodle-local_hub&lt;br /&gt;
# Save the zip into the /local directory of Moodle and unzip, producing /local/hub&lt;br /&gt;
# Visit the &amp;quot;Notifications&amp;quot; page in Moodle (/admin) to complete the upgrade and install the hub software.&lt;br /&gt;
# Uncheck password policy (passwordpolicy)&lt;br /&gt;
# Allow extended characters in usernames (extendedusernamechars)&lt;br /&gt;
# Enable web services for the hub (&#039;&#039;Settings &amp;gt; Site Administration &amp;gt; Advanced features&#039;&#039;)&lt;br /&gt;
# Enable the XML-RPC protocol (&#039;&#039;Settings &amp;gt; Site Administration &amp;gt; Plugins &amp;gt; Web services &amp;gt; Manage protocols&#039;&#039;)&lt;br /&gt;
# Set up the SMTP (&#039;&#039;Settings &amp;gt; Site Administration &amp;gt; Plugins &amp;gt; Message outputs &amp;gt; Email&#039;&#039;)&lt;br /&gt;
# Set up the recaptcha (&#039;&#039;Settings &amp;gt; Site Administration &amp;gt; Plugins &amp;gt; Authentication &amp;gt; Manage authentication&#039;&#039;) &lt;br /&gt;
# Set up your hub (&#039;&#039;Settings &amp;gt; Site Administration &amp;gt; Hub &amp;gt; Settings&#039;&#039;) Supply a description, enable the hub, supply a hub password.&lt;br /&gt;
&lt;br /&gt;
Congratulations!  You now have a working hub with no content!&lt;br /&gt;
&lt;br /&gt;
==Site registration==&lt;br /&gt;
&lt;br /&gt;
Only sites that are registered with the hub are allowed to publish content there.&lt;br /&gt;
&lt;br /&gt;
Sites register on the hub via &#039;&#039;Settings &amp;gt; Site administration &amp;gt; Server &amp;gt; Hubs&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==Hub registration==  &lt;br /&gt;
&lt;br /&gt;
You can also register your hub with the Moodle hub Directory, a listing of many hubs from around the world, enabling people from all over the world to find your hub and search the courses within it.  You may want to wait until you have some content before you register.&lt;br /&gt;
&lt;br /&gt;
==Managing sites==&lt;br /&gt;
In &#039;&#039;Settings &amp;gt; Site administration &amp;gt; Hub &amp;gt; Manage sites&#039;&#039;, you can:&lt;br /&gt;
* Prioritise a site: during a search, course from prioritised sites appear on top of the list. A prioritised site is always trusted.&lt;br /&gt;
* Trust a site: when a site is trusted, any published course is immediately available&lt;br /&gt;
* Delete a site: delete a site from the database. A message will be sent to the site administrator.&lt;br /&gt;
* Settings: you can change some information as the name, the description, the language...&lt;br /&gt;
* Make a site visible: only site declared as visible appear on the the site list (currently the site list hasn&#039;t been implemented)&lt;br /&gt;
&lt;br /&gt;
==Managing courses==&lt;br /&gt;
In &#039;&#039;Settings &amp;gt; Site administration &amp;gt; Hub &amp;gt; Manage course&#039;&#039;, you can:&lt;br /&gt;
* Delete a course: delete a course from the database.&lt;br /&gt;
* Settings: you can change some information as the name, the description, the language...&lt;br /&gt;
* Make a course visible: decide if the course is displayed on search result&lt;br /&gt;
&lt;br /&gt;
== Important things about roles, users and web services ==&lt;br /&gt;
A hub server uses intensively Moodle web service 2.0. For this reason it is important to understand the [https://docs.moodle.org/en/Web_Services web services administration], and what happens if you change some roles/users/services.&lt;br /&gt;
&lt;br /&gt;
=== Roles ===&lt;br /&gt;
The hub server creates on the fly some roles that you should &#039;&#039;&#039;never delete/modify&#039;&#039;&#039;:&lt;br /&gt;
* one role for the hub directory&lt;br /&gt;
* one role for registered sites&lt;br /&gt;
* one role for public sites&lt;br /&gt;
&lt;br /&gt;
=== Users ===&lt;br /&gt;
The hub server creates on the fly some users that you should &#039;&#039;&#039;never delete/modify&#039;&#039;&#039;:&lt;br /&gt;
* one user for the hub directory&lt;br /&gt;
* one user for public access&lt;br /&gt;
* as many users as registered sites&lt;br /&gt;
&lt;br /&gt;
=== Services ===&lt;br /&gt;
The hub creates during installation some web services that you should &#039;&#039;&#039;never delete/modify&#039;&#039;&#039;:&lt;br /&gt;
* one service for Hub directory&lt;br /&gt;
* one service for Registered sites&lt;br /&gt;
* one service for Public sites&lt;br /&gt;
&lt;br /&gt;
It also creates tokens on the fly. These tokens are not displayed on the token management list, so you cannot accidentally delete them.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*[[Site registration]]&lt;br /&gt;
&lt;br /&gt;
[[ja:ハブ管理]]&lt;/div&gt;</summary>
		<author><name>Jmouneyrac</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Hub_administration&amp;diff=103899</id>
		<title>Hub administration</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Hub_administration&amp;diff=103899"/>
		<updated>2013-04-08T09:46:01Z</updated>

		<summary type="html">&lt;p&gt;Jmouneyrac: /* Minimal Requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Community hubs}}&lt;br /&gt;
==Deciding to run a Hub==&lt;br /&gt;
&lt;br /&gt;
Running a hub server is not something you should undertake lightly.  &lt;br /&gt;
&lt;br /&gt;
As the hub administrator you are responsible for the content in the hub, and you need to put in place processes to:&lt;br /&gt;
* verify all the course content is clean (of porn or malicious javascript)&lt;br /&gt;
* manage registered sites and their status &lt;br /&gt;
* maintain the quality of the listings through editing&lt;br /&gt;
&lt;br /&gt;
=== Minimal Requirements ===&lt;br /&gt;
&lt;br /&gt;
Below is a list of Minimal requirements for running a Moodle Community Hub.&lt;br /&gt;
&lt;br /&gt;
* MySQL - minimum version 5.0.25&lt;br /&gt;
* PHP 5.3.2&lt;br /&gt;
* Apache&lt;br /&gt;
* ensure that the site you will be registering does not use any upper case letters (even though those are perfectly valid).  &#039;&#039;EG: moodle.org/2012-Spring will not work!&#039;&#039;&lt;br /&gt;
* ensure that the following php.ini variables are set to &amp;quot;On&amp;quot;&lt;br /&gt;
** allow_url_fopen: This setting is required the hub to be able to register a site.  If this option is not enabled, you will be given the [[error/local_hub/cannotregisternotavailablesite|cannotregisternotavailablesite]] error. Related tracker issue: https://tracker.moodle.org/browse/CONTRIB-3063&lt;br /&gt;
* mod_security in Apache version 1 and mod_security2 in Apache version 2 will return a 403 forbidden error when a URL that is not the local domain is passed as a get variable. mod_security on either the hub or client servers will block the completion of the client/hub registration process, even to MOOCH, as within the registration process URL&#039;s are passed as get variables a number of times. An exception can be added to mod_security in Apache version 1 via a local .htacess file. However, this ability was removed in mod_security2.  In mod_security2 the exception must be added to mod_security.conf of /conf.d. Related forum discussion: http://moodle.org/mod/forum/discuss.php?d=188933&lt;br /&gt;
&lt;br /&gt;
==How the hub software works==&lt;br /&gt;
&lt;br /&gt;
The hub software is implemented as a separate &amp;quot;local&amp;quot; plugin designed to be added to a standard install of Moodle 2.0 or later.  In this way the hub gets to use on all the features in the Moodle core API and benefits from maintenance of the core code.&lt;br /&gt;
&lt;br /&gt;
Once installed the whole site gets a new frontpage with a simple search box (see http://hub.moodle.org/ for example).&lt;br /&gt;
&lt;br /&gt;
Please don&#039;t add the hub capabilities to an existing Moodle site with real courses.  Although it may work, there are some opportunities for GUI confusion and some unknowns when it comes to security, so please just avoid it. Moodle is free, so it&#039;s trivial to install another clean copy to build your hub with.&lt;br /&gt;
&lt;br /&gt;
==How to set up a Moodle Hub server==&lt;br /&gt;
&lt;br /&gt;
# Install Moodle 2.0 or later somewhere on a web server with a nice URL.&lt;br /&gt;
# Download the latest hub plugin from https://github.com/moodlehq/moodle-local_hub&lt;br /&gt;
# Save the zip into the /local directory of Moodle and unzip, producing /local/hub&lt;br /&gt;
# Visit the &amp;quot;Notifications&amp;quot; page in Moodle (/admin) to complete the upgrade and install the hub software.&lt;br /&gt;
# Enable web services for the hub (&#039;&#039;Settings &amp;gt; Site Administration &amp;gt; Advanced features&#039;&#039;)&lt;br /&gt;
# Enable the XML-RPC protocol (&#039;&#039;Settings &amp;gt; Site Administration &amp;gt; Plugins &amp;gt; Web services &amp;gt; Manage protocols&#039;&#039;)&lt;br /&gt;
# Set up the SMTP (&#039;&#039;Settings &amp;gt; Site Administration &amp;gt; Plugins &amp;gt; Message outputs &amp;gt; Email&#039;&#039;)&lt;br /&gt;
# Set up the recaptcha (&#039;&#039;Settings &amp;gt; Site Administration &amp;gt; Plugins &amp;gt; Authentication &amp;gt; Manage authentication&#039;&#039;) &lt;br /&gt;
# Set up your hub (&#039;&#039;Settings &amp;gt; Site Administration &amp;gt; Hub &amp;gt; Settings&#039;&#039;) Supply a description, enable the hub, supply a hub password.&lt;br /&gt;
&lt;br /&gt;
Congratulations!  You now have a working hub with no content!&lt;br /&gt;
&lt;br /&gt;
==Site registration==&lt;br /&gt;
&lt;br /&gt;
Only sites that are registered with the hub are allowed to publish content there.&lt;br /&gt;
&lt;br /&gt;
Sites register on the hub via &#039;&#039;Settings &amp;gt; Site administration &amp;gt; Server &amp;gt; Hubs&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==Hub registration==  &lt;br /&gt;
&lt;br /&gt;
You can also register your hub with the Moodle hub Directory, a listing of many hubs from around the world, enabling people from all over the world to find your hub and search the courses within it.  You may want to wait until you have some content before you register.&lt;br /&gt;
&lt;br /&gt;
==Managing sites==&lt;br /&gt;
In &#039;&#039;Settings &amp;gt; Site administration &amp;gt; Hub &amp;gt; Manage sites&#039;&#039;, you can:&lt;br /&gt;
* Prioritise a site: during a search, course from prioritised sites appear on top of the list. A prioritised site is always trusted.&lt;br /&gt;
* Trust a site: when a site is trusted, any published course is immediately available&lt;br /&gt;
* Delete a site: delete a site from the database. A message will be sent to the site administrator.&lt;br /&gt;
* Settings: you can change some information as the name, the description, the language...&lt;br /&gt;
* Make a site visible: only site declared as visible appear on the the site list (currently the site list hasn&#039;t been implemented)&lt;br /&gt;
&lt;br /&gt;
==Managing courses==&lt;br /&gt;
In &#039;&#039;Settings &amp;gt; Site administration &amp;gt; Hub &amp;gt; Manage course&#039;&#039;, you can:&lt;br /&gt;
* Delete a course: delete a course from the database.&lt;br /&gt;
* Settings: you can change some information as the name, the description, the language...&lt;br /&gt;
* Make a course visible: decide if the course is displayed on search result&lt;br /&gt;
&lt;br /&gt;
== Important things about roles, users and web services ==&lt;br /&gt;
A hub server uses intensively Moodle web service 2.0. For this reason it is important to understand the [https://docs.moodle.org/en/Web_Services web services administration], and what happens if you change some roles/users/services.&lt;br /&gt;
&lt;br /&gt;
=== Roles ===&lt;br /&gt;
The hub server creates on the fly some roles that you should &#039;&#039;&#039;never delete/modify&#039;&#039;&#039;:&lt;br /&gt;
* one role for the hub directory&lt;br /&gt;
* one role for registered sites&lt;br /&gt;
* one role for public sites&lt;br /&gt;
&lt;br /&gt;
=== Users ===&lt;br /&gt;
The hub server creates on the fly some users that you should &#039;&#039;&#039;never delete/modify&#039;&#039;&#039;:&lt;br /&gt;
* one user for the hub directory&lt;br /&gt;
* one user for public access&lt;br /&gt;
* as many users as registered sites&lt;br /&gt;
&lt;br /&gt;
=== Services ===&lt;br /&gt;
The hub creates during installation some web services that you should &#039;&#039;&#039;never delete/modify&#039;&#039;&#039;:&lt;br /&gt;
* one service for Hub directory&lt;br /&gt;
* one service for Registered sites&lt;br /&gt;
* one service for Public sites&lt;br /&gt;
&lt;br /&gt;
It also creates tokens on the fly. These tokens are not displayed on the token management list, so you cannot accidentally delete them.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*[[Site registration]]&lt;br /&gt;
&lt;br /&gt;
[[ja:ハブ管理]]&lt;/div&gt;</summary>
		<author><name>Jmouneyrac</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Hub_administration&amp;diff=103898</id>
		<title>Hub administration</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Hub_administration&amp;diff=103898"/>
		<updated>2013-04-08T09:44:09Z</updated>

		<summary type="html">&lt;p&gt;Jmouneyrac: /* Minimal Requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Community hubs}}&lt;br /&gt;
==Deciding to run a Hub==&lt;br /&gt;
&lt;br /&gt;
Running a hub server is not something you should undertake lightly.  &lt;br /&gt;
&lt;br /&gt;
As the hub administrator you are responsible for the content in the hub, and you need to put in place processes to:&lt;br /&gt;
* verify all the course content is clean (of porn or malicious javascript)&lt;br /&gt;
* manage registered sites and their status &lt;br /&gt;
* maintain the quality of the listings through editing&lt;br /&gt;
&lt;br /&gt;
=== Minimal Requirements ===&lt;br /&gt;
&lt;br /&gt;
Below is a list of Minimal requirements for running a Moodle Community Hub.&lt;br /&gt;
&lt;br /&gt;
* Apache 2+ / MySQL 5+ / PHP 5.2+ &lt;br /&gt;
* verify the server meets the requirements to run the latest version of Moodle found in the documents at [[Installing_Moodle#Requirements|Installing_Moodle]] and [[PHP]]&lt;br /&gt;
* ensure that the site you will be registering does not use any upper case letters (even though those are perfectly valid).  &#039;&#039;EG: moodle.org/2012-Spring will not work!&#039;&#039;&lt;br /&gt;
* ensure that the following php.ini variables are set to &amp;quot;On&amp;quot;&lt;br /&gt;
** allow_url_fopen: This setting is required the hub to be able to register a site.  If this option is not enabled, you will be given the [[error/local_hub/cannotregisternotavailablesite|cannotregisternotavailablesite]] error. Related tracker issue: https://tracker.moodle.org/browse/CONTRIB-3063&lt;br /&gt;
* mod_security in Apache version 1 and mod_security2 in Apache version 2 will return a 403 forbidden error when a URL that is not the local domain is passed as a get variable. mod_security on either the hub or client servers will block the completion of the client/hub registration process, even to MOOCH, as within the registration process URL&#039;s are passed as get variables a number of times. An exception can be added to mod_security in Apache version 1 via a local .htacess file. However, this ability was removed in mod_security2.  In mod_security2 the exception must be added to mod_security.conf of /conf.d. Related forum discussion: http://moodle.org/mod/forum/discuss.php?d=188933&lt;br /&gt;
&lt;br /&gt;
==How the hub software works==&lt;br /&gt;
&lt;br /&gt;
The hub software is implemented as a separate &amp;quot;local&amp;quot; plugin designed to be added to a standard install of Moodle 2.0 or later.  In this way the hub gets to use on all the features in the Moodle core API and benefits from maintenance of the core code.&lt;br /&gt;
&lt;br /&gt;
Once installed the whole site gets a new frontpage with a simple search box (see http://hub.moodle.org/ for example).&lt;br /&gt;
&lt;br /&gt;
Please don&#039;t add the hub capabilities to an existing Moodle site with real courses.  Although it may work, there are some opportunities for GUI confusion and some unknowns when it comes to security, so please just avoid it. Moodle is free, so it&#039;s trivial to install another clean copy to build your hub with.&lt;br /&gt;
&lt;br /&gt;
==How to set up a Moodle Hub server==&lt;br /&gt;
&lt;br /&gt;
# Install Moodle 2.0 or later somewhere on a web server with a nice URL.&lt;br /&gt;
# Download the latest hub plugin from https://github.com/moodlehq/moodle-local_hub&lt;br /&gt;
# Save the zip into the /local directory of Moodle and unzip, producing /local/hub&lt;br /&gt;
# Visit the &amp;quot;Notifications&amp;quot; page in Moodle (/admin) to complete the upgrade and install the hub software.&lt;br /&gt;
# Enable web services for the hub (&#039;&#039;Settings &amp;gt; Site Administration &amp;gt; Advanced features&#039;&#039;)&lt;br /&gt;
# Enable the XML-RPC protocol (&#039;&#039;Settings &amp;gt; Site Administration &amp;gt; Plugins &amp;gt; Web services &amp;gt; Manage protocols&#039;&#039;)&lt;br /&gt;
# Set up the SMTP (&#039;&#039;Settings &amp;gt; Site Administration &amp;gt; Plugins &amp;gt; Message outputs &amp;gt; Email&#039;&#039;)&lt;br /&gt;
# Set up the recaptcha (&#039;&#039;Settings &amp;gt; Site Administration &amp;gt; Plugins &amp;gt; Authentication &amp;gt; Manage authentication&#039;&#039;) &lt;br /&gt;
# Set up your hub (&#039;&#039;Settings &amp;gt; Site Administration &amp;gt; Hub &amp;gt; Settings&#039;&#039;) Supply a description, enable the hub, supply a hub password.&lt;br /&gt;
&lt;br /&gt;
Congratulations!  You now have a working hub with no content!&lt;br /&gt;
&lt;br /&gt;
==Site registration==&lt;br /&gt;
&lt;br /&gt;
Only sites that are registered with the hub are allowed to publish content there.&lt;br /&gt;
&lt;br /&gt;
Sites register on the hub via &#039;&#039;Settings &amp;gt; Site administration &amp;gt; Server &amp;gt; Hubs&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==Hub registration==  &lt;br /&gt;
&lt;br /&gt;
You can also register your hub with the Moodle hub Directory, a listing of many hubs from around the world, enabling people from all over the world to find your hub and search the courses within it.  You may want to wait until you have some content before you register.&lt;br /&gt;
&lt;br /&gt;
==Managing sites==&lt;br /&gt;
In &#039;&#039;Settings &amp;gt; Site administration &amp;gt; Hub &amp;gt; Manage sites&#039;&#039;, you can:&lt;br /&gt;
* Prioritise a site: during a search, course from prioritised sites appear on top of the list. A prioritised site is always trusted.&lt;br /&gt;
* Trust a site: when a site is trusted, any published course is immediately available&lt;br /&gt;
* Delete a site: delete a site from the database. A message will be sent to the site administrator.&lt;br /&gt;
* Settings: you can change some information as the name, the description, the language...&lt;br /&gt;
* Make a site visible: only site declared as visible appear on the the site list (currently the site list hasn&#039;t been implemented)&lt;br /&gt;
&lt;br /&gt;
==Managing courses==&lt;br /&gt;
In &#039;&#039;Settings &amp;gt; Site administration &amp;gt; Hub &amp;gt; Manage course&#039;&#039;, you can:&lt;br /&gt;
* Delete a course: delete a course from the database.&lt;br /&gt;
* Settings: you can change some information as the name, the description, the language...&lt;br /&gt;
* Make a course visible: decide if the course is displayed on search result&lt;br /&gt;
&lt;br /&gt;
== Important things about roles, users and web services ==&lt;br /&gt;
A hub server uses intensively Moodle web service 2.0. For this reason it is important to understand the [https://docs.moodle.org/en/Web_Services web services administration], and what happens if you change some roles/users/services.&lt;br /&gt;
&lt;br /&gt;
=== Roles ===&lt;br /&gt;
The hub server creates on the fly some roles that you should &#039;&#039;&#039;never delete/modify&#039;&#039;&#039;:&lt;br /&gt;
* one role for the hub directory&lt;br /&gt;
* one role for registered sites&lt;br /&gt;
* one role for public sites&lt;br /&gt;
&lt;br /&gt;
=== Users ===&lt;br /&gt;
The hub server creates on the fly some users that you should &#039;&#039;&#039;never delete/modify&#039;&#039;&#039;:&lt;br /&gt;
* one user for the hub directory&lt;br /&gt;
* one user for public access&lt;br /&gt;
* as many users as registered sites&lt;br /&gt;
&lt;br /&gt;
=== Services ===&lt;br /&gt;
The hub creates during installation some web services that you should &#039;&#039;&#039;never delete/modify&#039;&#039;&#039;:&lt;br /&gt;
* one service for Hub directory&lt;br /&gt;
* one service for Registered sites&lt;br /&gt;
* one service for Public sites&lt;br /&gt;
&lt;br /&gt;
It also creates tokens on the fly. These tokens are not displayed on the token management list, so you cannot accidentally delete them.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*[[Site registration]]&lt;br /&gt;
&lt;br /&gt;
[[ja:ハブ管理]]&lt;/div&gt;</summary>
		<author><name>Jmouneyrac</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Moodle_app&amp;diff=103856</id>
		<title>Moodle app</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Moodle_app&amp;diff=103856"/>
		<updated>2013-04-04T11:11:55Z</updated>

		<summary type="html">&lt;p&gt;Jmouneyrac: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Mobile}}&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&#039;&#039;&#039;Mobile app latest&#039;&#039;&#039;: The &#039;&#039;Moodle Mobile&#039;&#039; app (developed on HTML5 and Phonegap)  is replacing the old mobile app for iPhone, &#039;&#039;My Moodle&#039;&#039;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
* upload a picture into your private file area&lt;br /&gt;
* record an audio file and upload it into your private file area&lt;br /&gt;
* send a private message to a course participant (can be done offline)&lt;br /&gt;
* take a personal note about a course participant (can be done offline)&lt;br /&gt;
* add a course participant to your phone contact&lt;br /&gt;
* call a course participant touching the phone number&lt;br /&gt;
* locate a course participant address on Google map&lt;br /&gt;
* download and view some resources&lt;br /&gt;
* quick access to your course contents&lt;br /&gt;
&lt;br /&gt;
==Moodle sites must be enabled for the app to access them==&lt;br /&gt;
&lt;br /&gt;
The administrator of your Moodle site (which must be version 2.4 or later) must enable mobile access as follows:&lt;br /&gt;
&lt;br /&gt;
* In &#039;&#039;Site administration &amp;gt; Plugins &amp;gt; Web services &amp;gt; Mobile&#039;&#039; tick the &#039;Enable web services for mobile devices&#039; checkbox, then click the button to save changes.&lt;br /&gt;
&lt;br /&gt;
==Installing the mobile app==&lt;br /&gt;
&lt;br /&gt;
Android:  https://play.google.com/store/apps/details?id=com.moodle.moodlemobile&lt;br /&gt;
&lt;br /&gt;
iOS:  Coming soon&lt;br /&gt;
&lt;br /&gt;
==Testing the app on a demo site==&lt;br /&gt;
&lt;br /&gt;
In the login screen, type &amp;quot;teacher&amp;quot; or &amp;quot;student&amp;quot; in the Username field and click the Add button. You will be logged automatically to a Moodle demo site for testing the app.&lt;br /&gt;
&lt;br /&gt;
== Cache ==&lt;br /&gt;
If you connect to your Moodle site and update/create/delete anything, and then go to your mobile app, the content will not be displayed. You will have to wait a couple of minutes. The cache time for the app is currently 5 minutes.&lt;br /&gt;
&lt;br /&gt;
==How to report a bug==&lt;br /&gt;
&lt;br /&gt;
# Log in to the [http://tracker.moodle.org/ Moodle Tracker] (you&#039;ll need to [http://tracker.moodle.org/secure/Signup%21default.jspa create a tracker account] if you&#039;ve not done so previously)&lt;br /&gt;
# &#039;&#039;Check whether the issue has already been reported by searching&#039;&#039;&lt;br /&gt;
# If not, report the bug by clicking the &#039;Create Issue&#039; link at the top right of the page, selecting &#039;Moodle Mobile&#039; as the project&lt;br /&gt;
# Add a detailed description then click the Create button&lt;br /&gt;
# Attach the following files to the issue by selecting &#039;Attach Files&#039; in the &#039;More actions&#039; dropdown menu:&lt;br /&gt;
#* &#039;Device information&#039; - this can be found in the app (Settings -&amp;gt; Development -&amp;gt; Device info, you can send yourself this information by email using the e-mail button at the bottom)&lt;br /&gt;
#* App Log (&#039;&#039;Settings -&amp;gt; Development -&amp;gt; Show Log&#039;&#039;, again you can send yourself this information by email)&lt;br /&gt;
&lt;br /&gt;
=== Report a bug by email ===&lt;br /&gt;
You can send us the same report by email using &#039;&#039;Settings -&amp;gt; Report a bug&#039;&#039;. As the report is sent by email to mobile@moodle.com, the report will take more time to be filed in the tracker.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[:dev:Moodle Mobile|Moodle Mobile developer docs]]&lt;br /&gt;
* [[Mobile web services]]&lt;/div&gt;</summary>
		<author><name>Jmouneyrac</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Moodle_app&amp;diff=103777</id>
		<title>Moodle app</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Moodle_app&amp;diff=103777"/>
		<updated>2013-03-29T00:52:53Z</updated>

		<summary type="html">&lt;p&gt;Jmouneyrac: /* Moodle sites must be enabled for the app to access them */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Mobile}}&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&#039;&#039;&#039;Mobile app latest&#039;&#039;&#039;: The &#039;&#039;Moodle Mobile&#039;&#039; app (developed on HTML5 and Phonegap)  is replacing the old mobile app for iPhone, &#039;&#039;My Moodle&#039;&#039;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
* upload a picture into your private file area&lt;br /&gt;
* record an audio file and upload it into your private file area&lt;br /&gt;
* send a private message to a course participant (can be done offline)&lt;br /&gt;
* take a personal note about a course participant (can be done offline)&lt;br /&gt;
* add a course participant to your phone contact&lt;br /&gt;
* call a course participant touching the phone number&lt;br /&gt;
* locate a course participant address on Google map&lt;br /&gt;
* download and view some resources&lt;br /&gt;
* quick access to your course contents&lt;br /&gt;
&lt;br /&gt;
==Moodle sites must be enabled for the app to access them==&lt;br /&gt;
&lt;br /&gt;
The administrator of your Moodle site (which must be version 2.4 or later) must enable mobile access as follows:&lt;br /&gt;
&lt;br /&gt;
* In &#039;&#039;Site administration &amp;gt; Plugins &amp;gt; Web services &amp;gt; Mobile&#039;&#039; tick the &#039;Enable web services for mobile devices&#039; checkbox, then click the button to save changes.&lt;br /&gt;
&lt;br /&gt;
==Installing the mobile app==&lt;br /&gt;
&lt;br /&gt;
Android:  https://play.google.com/store/apps/details?id=com.moodle.moodlemobile&lt;br /&gt;
&lt;br /&gt;
iOS:  Coming soon&lt;br /&gt;
&lt;br /&gt;
==Testing the app on a demo site==&lt;br /&gt;
&lt;br /&gt;
In the login screen, type &amp;quot;teacher&amp;quot; or &amp;quot;student&amp;quot; in the Username field and click the Add button. You will be logged automatically to a Moodle demo site for testing the app.&lt;br /&gt;
&lt;br /&gt;
==How to report a bug==&lt;br /&gt;
&lt;br /&gt;
# Log in to the [http://tracker.moodle.org/ Moodle Tracker] (you&#039;ll need to [http://tracker.moodle.org/secure/Signup%21default.jspa create a tracker account] if you&#039;ve not done so previously)&lt;br /&gt;
# &#039;&#039;Check whether the issue has already been reported by searching&#039;&#039;&lt;br /&gt;
# If not, report the bug by clicking the &#039;Create Issue&#039; link at the top right of the page, selecting &#039;Moodle Mobile&#039; as the project&lt;br /&gt;
# Add a detailed description then click the Create button&lt;br /&gt;
# Attach the following files to the issue by selecting &#039;Attach Files&#039; in the &#039;More actions&#039; dropdown menu:&lt;br /&gt;
#* &#039;Device information&#039; - this can be found in the app (Settings -&amp;gt; Development -&amp;gt; Device info, you can send yourself this information by email using the e-mail button at the bottom)&lt;br /&gt;
#* App Log (&#039;&#039;Settings -&amp;gt; Development -&amp;gt; Show Log&#039;&#039;, again you can send yourself this information by email)&lt;br /&gt;
&lt;br /&gt;
=== Report a bug by email ===&lt;br /&gt;
You can send us the same report by email using &#039;&#039;Settings -&amp;gt; Report a bug&#039;&#039;. As the report is sent by email to mobile@moodle.com, the report will take more time to be filed in the tracker.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[:dev:Moodle Mobile|Moodle Mobile developer docs]]&lt;br /&gt;
* [[Mobile web services]]&lt;/div&gt;</summary>
		<author><name>Jmouneyrac</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Moodle_app&amp;diff=103757</id>
		<title>Moodle app</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Moodle_app&amp;diff=103757"/>
		<updated>2013-03-27T03:39:26Z</updated>

		<summary type="html">&lt;p&gt;Jmouneyrac: /* Features */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Mobile}}&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&#039;&#039;&#039;Mobile app latest&#039;&#039;&#039;: The &#039;&#039;Moodle Mobile&#039;&#039; app (developed on HTML5 and Phonegap)  is replacing the old mobile app for iPhone, &#039;&#039;My Moodle&#039;&#039;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
* upload a picture into your private file area&lt;br /&gt;
* record an audio file and upload it into your private file area&lt;br /&gt;
* send a private message to a course participant (can be done offline)&lt;br /&gt;
* take a personal note about a course participant (can be done offline)&lt;br /&gt;
* add a course participant to your phone contact&lt;br /&gt;
* call a course participant touching the phone number&lt;br /&gt;
* locate a course participant address on Google map&lt;br /&gt;
* download and view some resources&lt;br /&gt;
* quick access to your course contents&lt;br /&gt;
&lt;br /&gt;
==Moodle sites must be enabled for the app to access them==&lt;br /&gt;
&lt;br /&gt;
The administrator of your Moodle site (which must be version 2.4 or later) must enable mobile access as follows:&lt;br /&gt;
&lt;br /&gt;
# In &#039;&#039;Settings &amp;gt; Site administration &amp;gt; Advanced features&#039;&#039; tick the &#039;Enable web services&#039; checkbox, then click the button to save changes&lt;br /&gt;
# In &#039;&#039;Site administration &amp;gt; Plugins &amp;gt; Web services &amp;gt; Mobile&#039;&#039; tick the &#039;Enable web services for mobile devices&#039; checkbox, then click the button to save changes. (Ticking the &#039;Enable web services&#039; checkbox should enable this also, but doesn&#039;t always.)&lt;br /&gt;
&lt;br /&gt;
==Installing the mobile app==&lt;br /&gt;
&lt;br /&gt;
Android:  https://play.google.com/store/apps/details?id=com.moodle.moodlemobile&lt;br /&gt;
&lt;br /&gt;
iOS:  Coming soon&lt;br /&gt;
&lt;br /&gt;
==Testing the app on a demo site==&lt;br /&gt;
&lt;br /&gt;
In the login screen, type &amp;quot;teacher&amp;quot; or &amp;quot;student&amp;quot; in the Username field and click the Add button. You will be logged automatically to a Moodle demo site for testing the app.&lt;br /&gt;
&lt;br /&gt;
==How to report a bug==&lt;br /&gt;
&lt;br /&gt;
# Log in to the [http://tracker.moodle.org/ Moodle Tracker] (you&#039;ll need to [http://tracker.moodle.org/secure/Signup%21default.jspa create a tracker account] if you&#039;ve not done so previously)&lt;br /&gt;
# &#039;&#039;Check whether the issue has already been reported by searching&#039;&#039;&lt;br /&gt;
# If not, report the bug by clicking the &#039;Create Issue&#039; link at the top right of the page, selecting &#039;Moodle Mobile&#039; as the project&lt;br /&gt;
# Add a detailed description then click the Create button&lt;br /&gt;
# Attach the following files to the issue by selecting &#039;Attach Files&#039; in the &#039;More actions&#039; dropdown menu:&lt;br /&gt;
#* &#039;Device information&#039; - this can be found in the app (Settings -&amp;gt; Development -&amp;gt; Device info, you can send yourself this information by email using the e-mail button at the bottom)&lt;br /&gt;
#* App Log (Settings -&amp;gt; Development -&amp;gt; Show Log, again you can send yourself this information by email)&lt;br /&gt;
&lt;br /&gt;
=== by email ===&lt;br /&gt;
You can send us the same report by email using Settings -&amp;gt; Report a bug. As the report is sent by email to mobile@moodle.com, the report will take more time to be filled in the tracker.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[:dev:Moodle Mobile|Moodle Mobile developer docs]]&lt;br /&gt;
* [[Mobile web services]]&lt;/div&gt;</summary>
		<author><name>Jmouneyrac</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Moodle_app&amp;diff=103756</id>
		<title>Moodle app</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Moodle_app&amp;diff=103756"/>
		<updated>2013-03-27T03:29:03Z</updated>

		<summary type="html">&lt;p&gt;Jmouneyrac: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Mobile}}&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&#039;&#039;&#039;Mobile app latest&#039;&#039;&#039;: The &#039;&#039;Moodle Mobile&#039;&#039; app (developed on HTML5 and Phonegap)  is replacing the old mobile app for iPhone, &#039;&#039;My Moodle&#039;&#039;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
* upload a picture into your private file area&lt;br /&gt;
* record an audio file and upload it into your private file area&lt;br /&gt;
* send a private message to a course participant (can be done offline)&lt;br /&gt;
* take a personal note about a course participant (can be done offline)&lt;br /&gt;
* add a course participant to your phone contact&lt;br /&gt;
* call a course participant touching the phone number&lt;br /&gt;
* locate a course participant address on Google map&lt;br /&gt;
* download a PDF/DOC/Image/HTML resource&lt;br /&gt;
&lt;br /&gt;
==Moodle sites must be enabled for the app to access them==&lt;br /&gt;
&lt;br /&gt;
The administrator of your Moodle site (which must be version 2.4 or later) must enable mobile access as follows:&lt;br /&gt;
&lt;br /&gt;
# In &#039;&#039;Settings &amp;gt; Site administration &amp;gt; Advanced features&#039;&#039; tick the &#039;Enable web services&#039; checkbox, then click the button to save changes&lt;br /&gt;
# In &#039;&#039;Site administration &amp;gt; Plugins &amp;gt; Web services &amp;gt; Mobile&#039;&#039; tick the &#039;Enable web services for mobile devices&#039; checkbox, then click the button to save changes. (Ticking the &#039;Enable web services&#039; checkbox should enable this also, but doesn&#039;t always.)&lt;br /&gt;
&lt;br /&gt;
==Installing the mobile app==&lt;br /&gt;
&lt;br /&gt;
Android:  https://play.google.com/store/apps/details?id=com.moodle.moodlemobile&lt;br /&gt;
&lt;br /&gt;
iOS:  Coming soon&lt;br /&gt;
&lt;br /&gt;
==Testing the app on a demo site==&lt;br /&gt;
&lt;br /&gt;
In the login screen, type &amp;quot;teacher&amp;quot; or &amp;quot;student&amp;quot; in the Username field and click the Add button. You will be logged automatically to a Moodle demo site for testing the app.&lt;br /&gt;
&lt;br /&gt;
==How to report a bug==&lt;br /&gt;
&lt;br /&gt;
# Log in to the [http://tracker.moodle.org/ Moodle Tracker] (you&#039;ll need to [http://tracker.moodle.org/secure/Signup%21default.jspa create a tracker account] if you&#039;ve not done so previously)&lt;br /&gt;
# &#039;&#039;Check whether the issue has already been reported by searching&#039;&#039;&lt;br /&gt;
# If not, report the bug by clicking the &#039;Create Issue&#039; link at the top right of the page, selecting &#039;Moodle Mobile&#039; as the project&lt;br /&gt;
# Add a detailed description then click the Create button&lt;br /&gt;
# Attach the following files to the issue by selecting &#039;Attach Files&#039; in the &#039;More actions&#039; dropdown menu:&lt;br /&gt;
#* &#039;Device information&#039; - this can be found in the app (Settings -&amp;gt; Development -&amp;gt; Device info, you can send yourself this information by email using the e-mail button at the bottom)&lt;br /&gt;
#* App Log (Settings -&amp;gt; Development -&amp;gt; Show Log, again you can send yourself this information by email)&lt;br /&gt;
&lt;br /&gt;
=== by email ===&lt;br /&gt;
You can send us the same report by email using Settings -&amp;gt; Report a bug. As the report is sent by email to mobile@moodle.com, the report will take more time to be filled in the tracker.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[:dev:Moodle Mobile|Moodle Mobile developer docs]]&lt;br /&gt;
* [[Mobile web services]]&lt;/div&gt;</summary>
		<author><name>Jmouneyrac</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Moodle_app&amp;diff=103732</id>
		<title>Moodle app</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Moodle_app&amp;diff=103732"/>
		<updated>2013-03-22T03:05:20Z</updated>

		<summary type="html">&lt;p&gt;Jmouneyrac: /* What is the app used for */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Mobile}}&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&#039;&#039;&#039;Mobile app latest&#039;&#039;&#039;: The &#039;&#039;Moodle Mobile&#039;&#039; app (developed on HTML5 and Phonegap)  is replacing the old mobile app for iPhone, &#039;&#039;My Moodle&#039;&#039;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
* upload a picture into your private file area&lt;br /&gt;
* record an audio file and upload it into your private file area&lt;br /&gt;
* send a private message to a course participant (can be done offline)&lt;br /&gt;
* take a personal note about a course participant (can be done offline)&lt;br /&gt;
* add a course participant to your phone contact&lt;br /&gt;
* call a course participant touching the phone number&lt;br /&gt;
* locate a course participant address on Google map&lt;br /&gt;
* download a PDF/DOC/Image/HTML resource&lt;br /&gt;
&lt;br /&gt;
==Moodle sites must be enabled for the app to access them==&lt;br /&gt;
&lt;br /&gt;
The administrator of your Moodle site (which must be version 2.4 or later) must enable mobile access as follows:&lt;br /&gt;
&lt;br /&gt;
# In &#039;&#039;Settings &amp;gt; Site administration &amp;gt; Advanced features&#039;&#039; tick the &#039;Enable web services&#039; checkbox, then click the button to save changes&lt;br /&gt;
# In &#039;&#039;Site administration &amp;gt; Plugins &amp;gt; Web services &amp;gt; Mobile&#039;&#039; tick the &#039;Enable web services for mobile devices&#039; checkbox, then click the button to save changes. (Ticking the &#039;Enable web services&#039; checkbox should enable this also, but doesn&#039;t always.)&lt;br /&gt;
&lt;br /&gt;
==Installing the mobile app==&lt;br /&gt;
&lt;br /&gt;
Android:  https://play.google.com/store/apps/details?id=com.moodle.moodlemobile&lt;br /&gt;
&lt;br /&gt;
iOS:  Coming soon&lt;br /&gt;
&lt;br /&gt;
==Connecting to your Moodle site ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Browsing courses==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Information coming soon...&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Uploading photos and audio==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Information coming soon...&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Managing multiple Moodle sites==&lt;br /&gt;
&lt;br /&gt;
==Notifications==&lt;br /&gt;
&lt;br /&gt;
Currently not available&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Settings==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Information coming soon...&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Testing the app on a demo site==&lt;br /&gt;
&lt;br /&gt;
In the login screen, type &amp;quot;teacher&amp;quot; or &amp;quot;student&amp;quot; in the Username field and click the Add button. You will be logged automatically to a Moodle demo site for testing the app.&lt;br /&gt;
&lt;br /&gt;
==How to report a bug==&lt;br /&gt;
&lt;br /&gt;
# Log in to the [http://tracker.moodle.org/ Moodle Tracker] (you&#039;ll need to [http://tracker.moodle.org/secure/Signup%21default.jspa create a tracker account] if you&#039;ve not done so previously)&lt;br /&gt;
# &#039;&#039;Check whether the issue has already been reported by searching&#039;&#039;&lt;br /&gt;
# If not, report the bug by clicking the &#039;Create Issue&#039; link at the top right of the page, selecting &#039;Moodle Mobile&#039; as the project&lt;br /&gt;
# Add a detailed description then click the Create button&lt;br /&gt;
# Attach the following files to the issue by selecting &#039;Attach Files&#039; in the &#039;More actions&#039; dropdown menu:&lt;br /&gt;
#* &#039;Device information&#039; - this can be found in the app (Settings -&amp;gt; Device info, you can send yourself this information by email using the e-mail button at the bottom)&lt;br /&gt;
#* App Log (Settings -&amp;gt; Development -&amp;gt; Show Log, again you can send yourself this information by email)&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[:dev:Moodle Mobile|Moodle Mobile developer docs]]&lt;br /&gt;
* [[Mobile web services]]&lt;/div&gt;</summary>
		<author><name>Jmouneyrac</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Moodle_app&amp;diff=103731</id>
		<title>Moodle app</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Moodle_app&amp;diff=103731"/>
		<updated>2013-03-22T02:48:06Z</updated>

		<summary type="html">&lt;p&gt;Jmouneyrac: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Mobile}}&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&#039;&#039;&#039;Mobile app latest&#039;&#039;&#039;: The &#039;&#039;Moodle Mobile&#039;&#039; app (developed on HTML5 and Phonegap)  is replacing the old mobile app for iPhone, &#039;&#039;My Moodle&#039;&#039;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== What is the app used for ==&lt;br /&gt;
The app offers few features which have for advantage to be done quicker than on the Moodle site or to be done offline.&lt;br /&gt;
* upload a picture into your private file (so you can use it in the file picker straight away)&lt;br /&gt;
* record an audio file and upload into your private file (so you can use it in the file picker straight away)&lt;br /&gt;
* send a private message to a student/teacher (faster than in Moodle + it works offline)&lt;br /&gt;
* take a personal/reminder note about someone else (faster than in Moodle + it works offline)&lt;br /&gt;
* add someone to your phone contact (you don’t need to copy/type details manually)&lt;br /&gt;
* call someone touching the phone number (you don’t need to copy/type the number in your dialapp)&lt;br /&gt;
* locate someone address on Google map (you don’t need to copy/type the address in the map)&lt;br /&gt;
* view a PDF/DOC/Image/HTML resource (some resources can be downloaded to be used offline on your phone)&lt;br /&gt;
&lt;br /&gt;
==Moodle sites must be enabled for the app to access them==&lt;br /&gt;
&lt;br /&gt;
The administrator of your Moodle site (which must be version 2.4 or later) must enable mobile access as follows:&lt;br /&gt;
&lt;br /&gt;
# In &#039;&#039;Settings &amp;gt; Site administration &amp;gt; Advanced features&#039;&#039; tick the &#039;Enable web services&#039; checkbox, then click the button to save changes&lt;br /&gt;
# In &#039;&#039;Site administration &amp;gt; Plugins &amp;gt; Web services &amp;gt; Mobile&#039;&#039; tick the &#039;Enable web services for mobile devices&#039; checkbox, then click the button to save changes. (Ticking the &#039;Enable web services&#039; checkbox should enable this also, but doesn&#039;t always.)&lt;br /&gt;
&lt;br /&gt;
==Installing the mobile app==&lt;br /&gt;
&lt;br /&gt;
Android:  https://play.google.com/store/apps/details?id=com.moodle.moodlemobile&lt;br /&gt;
&lt;br /&gt;
iOS:  Coming soon&lt;br /&gt;
&lt;br /&gt;
==Connecting to your Moodle site ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Browsing courses==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Information coming soon...&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Uploading photos and audio==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Information coming soon...&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Managing multiple Moodle sites==&lt;br /&gt;
&lt;br /&gt;
==Notifications==&lt;br /&gt;
&lt;br /&gt;
Currently not available&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Settings==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Information coming soon...&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Testing the app on a demo site==&lt;br /&gt;
&lt;br /&gt;
In the login screen, type &amp;quot;teacher&amp;quot; or &amp;quot;student&amp;quot; in the Username field and click the Add button. You will be logged automatically to a Moodle demo site for testing the app.&lt;br /&gt;
&lt;br /&gt;
==How to report a bug==&lt;br /&gt;
&lt;br /&gt;
# Log in to the [http://tracker.moodle.org/ Moodle Tracker] (you&#039;ll need to [http://tracker.moodle.org/secure/Signup%21default.jspa create a tracker account] if you&#039;ve not done so previously)&lt;br /&gt;
# &#039;&#039;Check whether the issue has already been reported by searching&#039;&#039;&lt;br /&gt;
# If not, report the bug by clicking the &#039;Create Issue&#039; link at the top right of the page, selecting &#039;Moodle Mobile&#039; as the project&lt;br /&gt;
# Add a detailed description then click the Create button&lt;br /&gt;
# Attach the following files to the issue by selecting &#039;Attach Files&#039; in the &#039;More actions&#039; dropdown menu:&lt;br /&gt;
#* &#039;Device information&#039; - this can be found in the app (Settings -&amp;gt; Device info, you can send yourself this information by email using the e-mail button at the bottom)&lt;br /&gt;
#* App Log (Settings -&amp;gt; Development -&amp;gt; Show Log, again you can send yourself this information by email)&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[:dev:Moodle Mobile|Moodle Mobile developer docs]]&lt;br /&gt;
* [[Mobile web services]]&lt;/div&gt;</summary>
		<author><name>Jmouneyrac</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Mobile_web_services&amp;diff=102166</id>
		<title>Mobile web services</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Mobile_web_services&amp;diff=102166"/>
		<updated>2012-11-26T07:29:22Z</updated>

		<summary type="html">&lt;p&gt;Jmouneyrac: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Web services}}&lt;br /&gt;
Moodle comes with a built-in web service designed for mobile applications. It is required to run the official [[dev:Moodle Mobile]]. Enable it only if you want people to use the official app or if a third party app explicitly requires it.&lt;br /&gt;
&lt;br /&gt;
== Enabling mobile web services ==&lt;br /&gt;
&lt;br /&gt;
A site administrator first must enable mobile web services:&lt;br /&gt;
&lt;br /&gt;
*In &#039;&#039;Settings &amp;gt; Site administration &amp;gt; Plugins &amp;gt; Web services &amp;gt; Mobile&#039;&#039; &lt;br /&gt;
*Check &amp;quot;Enable mobile web services&amp;quot; and then&lt;br /&gt;
*Click Save.&lt;br /&gt;
&lt;br /&gt;
That&#039;s it! No other steps required.&lt;br /&gt;
&lt;br /&gt;
The rest of this document explains the &amp;quot;behind the scenes&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== What happens when the service is enabled ==&lt;br /&gt;
Enabling the mobile web services will automatically:&lt;br /&gt;
* enable the web services system (&#039;&#039;Settings &amp;gt; Site administration &amp;gt; Advanced features&#039;&#039;)&lt;br /&gt;
* enable the built-in external service called &#039;Mobile web services&#039; - you should see this new mobile service listed as enabled&lt;br /&gt;
* enable the xml-rpc protocol (for backward compatibility with unmaintained My Moodle app)&lt;br /&gt;
* enable the rest protocol&lt;br /&gt;
* allow the &#039;webservice/xmlrpc:use&#039; capability for authenticated user role&lt;br /&gt;
* allow the &#039;webservice/rest:use&#039; capability for authenticated user role&lt;br /&gt;
&lt;br /&gt;
== Disabling mobile web services ==&lt;br /&gt;
When you uncheck &#039;Enable mobile web services&#039;, it will automatically:&lt;br /&gt;
* disable the external service called &#039;Mobile web services&#039;.&lt;br /&gt;
*if &#039;Mobile web services&#039; was the only external service enabled:&lt;br /&gt;
** disable the web services system&lt;br /&gt;
** disable the xml-rpc protocol&lt;br /&gt;
** disable the rest protocol&lt;br /&gt;
** remove the &#039;webservice/xmlrpc:use&#039; capability for authenticated user role&lt;br /&gt;
** remove the &#039;webservice/rest:use&#039; capability for authenticated user role&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Mobile app]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Mobile]]&lt;/div&gt;</summary>
		<author><name>Jmouneyrac</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Mobile_web_services&amp;diff=102165</id>
		<title>Mobile web services</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Mobile_web_services&amp;diff=102165"/>
		<updated>2012-11-26T07:27:28Z</updated>

		<summary type="html">&lt;p&gt;Jmouneyrac: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Web services}}&lt;br /&gt;
Moodle comes with a built-in web service designed for mobile applications. It is required to run the official [[Mobile app]]. Enable it only if you want people to use the official app or if a third party app explicitly requires it.&lt;br /&gt;
&lt;br /&gt;
== Enabling mobile web services ==&lt;br /&gt;
&lt;br /&gt;
A site administrator first must enable mobile web services:&lt;br /&gt;
&lt;br /&gt;
*In &#039;&#039;Settings &amp;gt; Site administration &amp;gt; Plugins &amp;gt; Web services &amp;gt; Mobile&#039;&#039; &lt;br /&gt;
*Check &amp;quot;Enable mobile web services&amp;quot; and then&lt;br /&gt;
*Click Save.&lt;br /&gt;
&lt;br /&gt;
That&#039;s it! No other steps required.&lt;br /&gt;
&lt;br /&gt;
The rest of this document explains the &amp;quot;behind the scenes&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== What happens when the service is enabled ==&lt;br /&gt;
Enabling the mobile web services will automatically:&lt;br /&gt;
* enable the web services system (&#039;&#039;Settings &amp;gt; Site administration &amp;gt; Advanced features&#039;&#039;)&lt;br /&gt;
* enable the built-in external service called &#039;Mobile web services&#039; - you should see this new mobile service listed as enabled&lt;br /&gt;
* enable the xml-rpc protocol (for backward compatibility with unmaintained My Moodle app)&lt;br /&gt;
* enable the rest protocol&lt;br /&gt;
* allow the &#039;webservice/xmlrpc:use&#039; capability for authenticated user role&lt;br /&gt;
* allow the &#039;webservice/rest:use&#039; capability for authenticated user role&lt;br /&gt;
&lt;br /&gt;
== Disabling mobile web services ==&lt;br /&gt;
When you uncheck &#039;Enable mobile web services&#039;, it will automatically:&lt;br /&gt;
* disable the external service called &#039;Mobile web services&#039;.&lt;br /&gt;
*if &#039;Mobile web services&#039; was the only external service enabled:&lt;br /&gt;
** disable the web services system&lt;br /&gt;
** disable the xml-rpc protocol&lt;br /&gt;
** disable the rest protocol&lt;br /&gt;
** remove the &#039;webservice/xmlrpc:use&#039; capability for authenticated user role&lt;br /&gt;
** remove the &#039;webservice/rest:use&#039; capability for authenticated user role&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Mobile app]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Mobile]]&lt;/div&gt;</summary>
		<author><name>Jmouneyrac</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Hub_administration&amp;diff=97759</id>
		<title>Hub administration</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Hub_administration&amp;diff=97759"/>
		<updated>2012-05-16T06:53:05Z</updated>

		<summary type="html">&lt;p&gt;Jmouneyrac: /* How to set up a Moodle Hub server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Community hubs}}&lt;br /&gt;
==Deciding to run a Hub==&lt;br /&gt;
&lt;br /&gt;
Running a hub server is not something you should undertake lightly.  &lt;br /&gt;
&lt;br /&gt;
As the hub administrator you are responsible for the content in the hub, and you need to put in place processes to:&lt;br /&gt;
* verify all the course content is clean (of porn or malicious javascript)&lt;br /&gt;
* manage registered sites and their status &lt;br /&gt;
* maintain the quality of the listings through editing&lt;br /&gt;
&lt;br /&gt;
=== Minimal Requirements ===&lt;br /&gt;
&lt;br /&gt;
Below is a list of Minimal requirements for running a Moodle Community Hub.&lt;br /&gt;
&lt;br /&gt;
* verify the server meets the requirements to run the latest version of Moodle found in the documents at [[Installing_Moodle#Requirements|Installing_Moodle]] and [[PHP]]&lt;br /&gt;
* ensure that the following php.ini variables are set to &amp;quot;On&amp;quot;&lt;br /&gt;
** allow_url_fopen: This setting is required the hub to be able to register a site.  If this option is not enabled, you will be given the [[error/local_hub/cannotregisternotavailablesite|cannotregisternotavailablesite]] error. Related tracker issue: https://tracker.moodle.org/browse/CONTRIB-3063&lt;br /&gt;
* mod_security in Apache version 1 and mod_security2 in Apache version 2 will return a 403 forbidden error when a URL that is not the local domain is passed as a get variable. mod_security on either the hub or client servers will block the completion of the client/hub registration process, even to MOOCH, as within the registration process URL&#039;s are passed as get variables a number of times. An exception can be added to mod_security in Apache version 1 via a local .htacess file. However, this ability was removed in mod_security2.  In mod_security2 the exception must be added to mod_security.conf of /conf.d. Related forum discussion: http://moodle.org/mod/forum/discuss.php?d=188933&lt;br /&gt;
&lt;br /&gt;
==How the hub software works==&lt;br /&gt;
&lt;br /&gt;
The hub software is implemented as a separate &amp;quot;local&amp;quot; plugin designed to be added to a standard install of Moodle 2.0 or later.  In this way the hub gets to use on all the features in the Moodle core API and benefits from maintenance of the core code.&lt;br /&gt;
&lt;br /&gt;
Once installed the whole site gets a new frontpage with a simple search box (see http://hub.moodle.org/ for example).&lt;br /&gt;
&lt;br /&gt;
Please don&#039;t add the hub capabilities to an existing Moodle site with real courses.  Although it may work, there are some opportunities for GUI confusion and some unknowns when it comes to security, so please just avoid it. Moodle is free, so it&#039;s trivial to install another clean copy to build your hub with.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==How to set up a Moodle Hub server==&lt;br /&gt;
&lt;br /&gt;
# Install Moodle 2.0 or later somewhere on a web server with a nice URL.&lt;br /&gt;
# Download the latest hub plugin from http://download.moodle.org/download.php/plugins/local/hub.zip&lt;br /&gt;
# Save the zip into the /local directory of Moodle and unzip, producing /local/hub&lt;br /&gt;
# Visit the &amp;quot;Notifications&amp;quot; page in Moodle (/admin) to complete the upgrade and install the hub software.&lt;br /&gt;
# Enable web services for the hub (&#039;&#039;&#039;Site Administration &amp;gt; Advanced features&#039;&#039;&#039;)&lt;br /&gt;
# Enable the XML-RPC protocol (&#039;&#039;&#039;Site Administration &amp;gt; Plugins &amp;gt; Web services &amp;gt; Manage protocols&#039;&#039;&#039;)&lt;br /&gt;
# Set up the SMTP (&#039;&#039;&#039;Site Administration &amp;gt; Plugins &amp;gt; Message outputs &amp;gt; Email&#039;&#039;&#039;)&lt;br /&gt;
#Set up the recaptcha (&#039;&#039;&#039;Site Administration &amp;gt; Plugins &amp;gt; Authentication &amp;gt; Manage authentication&#039;&#039;&#039;) &lt;br /&gt;
# Set up your hub (&#039;&#039;&#039;Site Administration &amp;gt; Hub &amp;gt; Settings&#039;&#039;&#039;)&lt;br /&gt;
# In &#039;&#039;&#039;Site Administration &amp;gt; Security &amp;gt; Site policies&#039;&#039;&#039; enable &#039;&#039;Allow extended characters in usernames&#039;&#039;. This step will be automatically executed when CONTRIB-3646 is done.&lt;br /&gt;
&lt;br /&gt;
Congratulations!  You now have a working hub with no content!&lt;br /&gt;
&lt;br /&gt;
==Site registration==&lt;br /&gt;
&lt;br /&gt;
Only sites that are registered with the hub are allowed to publish content there.&lt;br /&gt;
&lt;br /&gt;
Sites register on the hub via &#039;&#039;&#039;Site Administration &amp;gt; Registration&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Hub registration==  &lt;br /&gt;
&lt;br /&gt;
You can also register your hub with the Moodle hub Directory, a listing of many hubs from around the world, enabling people from all over the world to find your hub and search the courses within it.  You may want to wait until you have some content before you register.&lt;br /&gt;
&lt;br /&gt;
==Managing sites==&lt;br /&gt;
In &#039;&#039;&#039;Administration &amp;gt; Hub &amp;gt; Manage sites&#039;&#039;&#039;, you can:&lt;br /&gt;
* Prioritise a site: during a search, course from prioritised sites appear on top of the list. A prioritised site is always trusted.&lt;br /&gt;
* Trust a site: when a site is trusted, any published course is immediatly available&lt;br /&gt;
* Delete a site: delete a site from the database. A message will be sent to the site administrator.&lt;br /&gt;
* Settings: you can change some information as the name, the description, the language...&lt;br /&gt;
* Make a site visible: only site declared as visible appear on the the site list (currently the site list hasn&#039;t been implemented)&lt;br /&gt;
&lt;br /&gt;
==Managing courses==&lt;br /&gt;
In &#039;&#039;&#039;Administration &amp;gt; Hub &amp;gt; Manage course&#039;&#039;&#039;, you can:&lt;br /&gt;
* Delete a course: delete a course from the database.&lt;br /&gt;
* Settings: you can change some information as the name, the description, the language...&lt;br /&gt;
* Make a course visible: decide if the course is displayed on search result&lt;br /&gt;
&lt;br /&gt;
== Important things about roles, users and web services ==&lt;br /&gt;
A hub server uses intensively Moodle web service 2.0. For this reason it is important to understand the [https://docs.moodle.org/en/Web_Services web services administration], and what happens if you change some roles/users/services.&lt;br /&gt;
&lt;br /&gt;
=== Roles ===&lt;br /&gt;
The hub server creates on the fly some roles that you should &#039;&#039;&#039;never delete/modify&#039;&#039;&#039;:&lt;br /&gt;
* one role for the hub directory&lt;br /&gt;
* one role for registered sites&lt;br /&gt;
* one role for public sites&lt;br /&gt;
&lt;br /&gt;
=== Users ===&lt;br /&gt;
The hub server creates on the fly some users that you should &#039;&#039;&#039;never delete/modify&#039;&#039;&#039;:&lt;br /&gt;
* one user for the hub directory&lt;br /&gt;
* one user for public access&lt;br /&gt;
* as many users as registered sites&lt;br /&gt;
&lt;br /&gt;
=== Services ===&lt;br /&gt;
The hub creates during installation some web services that you should &#039;&#039;&#039;never delete/modify&#039;&#039;&#039;:&lt;br /&gt;
* one service for Hub directory&lt;br /&gt;
* one service for Registered sites&lt;br /&gt;
* one service for Public sites&lt;br /&gt;
&lt;br /&gt;
It also creates tokens on the fly. These tokens are not displayed on the token management list, so you cannot accidentally delete them.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*[[Site registration]]&lt;br /&gt;
&lt;br /&gt;
[[ja:ハブ管理]]&lt;/div&gt;</summary>
		<author><name>Jmouneyrac</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Moodle_app_FAQ&amp;diff=95389</id>
		<title>Moodle app FAQ</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Moodle_app_FAQ&amp;diff=95389"/>
		<updated>2012-01-24T02:31:49Z</updated>

		<summary type="html">&lt;p&gt;Jmouneyrac: /* Where can I download the official Mobile app for iPhone? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Mobile}}&lt;br /&gt;
== How can I use Moodle on mobile devices? ==&lt;br /&gt;
There are currently 3 main ways to use Moodle on mobile devices:&lt;br /&gt;
&lt;br /&gt;
* Users can open Moodle sites in their mobile web browsers.&lt;br /&gt;
* Users can download native apps for their mobile devices.&lt;br /&gt;
* Admins can configure their Moodle site to be Mobile-accessible through server extensions.&lt;br /&gt;
&lt;br /&gt;
=== Mobile Apps ===&lt;br /&gt;
* [http://www.moodletouch.com MoodleTouch] (aka &#039;&#039;mTouch&#039;&#039;) for iOS, created by Ali OzGur.&lt;br /&gt;
* [http://mpage.hk/ mPage] for iOS and Android (work in progress), created by Mass Media HK.&lt;br /&gt;
* [http://codeguild.org/app/mbot/ Mbot] for Android, created by Code Guild.&lt;br /&gt;
* The official [[Mobile app]] for iPhone, created by Moodle HQ.&lt;br /&gt;
* [https://market.android.com/details?id=com.ivoid.droodle Droodle] - an Android client for the Moodle 2.1 platform&lt;br /&gt;
&lt;br /&gt;
=== Server-side ===&lt;br /&gt;
* [http://www.mobilemoodle.org/momo18/ MoMo] (Moodle for Mobiles) - Requires a server extension and a client app; supports most mobile OSes including Symbian.&lt;br /&gt;
* [http://mle.sourceforge.net MLE-Moodle] - Allows course designers to make a separate set of Moodle pages for mobile users.&lt;br /&gt;
* [http://code.google.com/p/moodbile/ Moodbile] - Reference implementation of Moodle Web Services. Under development.&lt;br /&gt;
* [http://iphone.moodle.com.au iPhone4Moodle] - Under development.&lt;br /&gt;
&lt;br /&gt;
==Where can I download the official Mobile app for iPhone (My Moodle)?==&lt;br /&gt;
&lt;br /&gt;
The Mobile app, My Moodle, can be downloaded for free from the Apple Online  Store http://itunes.apple.com/ie/app/my-moodle/id461289000.&lt;br /&gt;
&lt;br /&gt;
==How do I get the official Mobile app to work for my Moodle site?==&lt;br /&gt;
&lt;br /&gt;
Firstly, your Moodle site must be using Moodle 2.1 or later.&lt;br /&gt;
&lt;br /&gt;
Secondly mobile web services must be enabled. See [[Enable mobile web services]] for details. &lt;br /&gt;
&lt;br /&gt;
==When will there be an official Mobile app for Android?==&lt;br /&gt;
&lt;br /&gt;
The Android app is expected to be ready around Christmas or soon after. (Source: [[:dev:Developer meeting November 2011|Nov 2011 developer meeting notes]])&lt;br /&gt;
&lt;br /&gt;
==Where can I select a theme for mobile devices?==&lt;br /&gt;
&lt;br /&gt;
In &#039;&#039;Site administration &amp;gt; Appearance &amp;gt; Themes &amp;gt; Theme selector&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
New in Moodle 2.2 onwards is the MyMobile theme especially designed for mobile devices. &lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [http://moodle.org/mod/forum/view.php?id=7798 Moodle for mobile forum]&lt;br /&gt;
* Using Moodle [http://moodle.org/mod/forum/discuss.php?d=162872 Proposal for Supporting Mobile Themes and Browser Detection] forum discussion&lt;br /&gt;
* An open course, about &amp;quot;[http://tempus-efa.proj.ac.il/moodle/course/view.php?id=102 Teaching using Mobile - Best practices]&amp;quot;&lt;br /&gt;
* [http://www.moodlenews.com/mobile/ Moodle News - Mobile] - a breakdown of the mobile projects and products available&lt;br /&gt;
&lt;br /&gt;
[[Category:FAQ]]&lt;br /&gt;
&lt;br /&gt;
[[fr:Moodle pour les mobiles]]&lt;/div&gt;</summary>
		<author><name>Jmouneyrac</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Hub_administration&amp;diff=94464</id>
		<title>Hub administration</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Hub_administration&amp;diff=94464"/>
		<updated>2011-12-12T03:43:02Z</updated>

		<summary type="html">&lt;p&gt;Jmouneyrac: /* Minimal Requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Community hubs}}&lt;br /&gt;
==Deciding to run a Hub==&lt;br /&gt;
&lt;br /&gt;
Running a hub server is not something you should undertake lightly.  &lt;br /&gt;
&lt;br /&gt;
As the hub administrator you are responsible for the content in the hub, and you need to put in place processes to:&lt;br /&gt;
* verify all the course content is clean (of porn or malicious javascript)&lt;br /&gt;
* manage registered sites and their status &lt;br /&gt;
* maintain the quality of the listings through editing&lt;br /&gt;
&lt;br /&gt;
=== Minimal Requirements ===&lt;br /&gt;
&lt;br /&gt;
Below is a list of Minimal requirements for running a Moodle Community Hub.&lt;br /&gt;
&lt;br /&gt;
* verify the server meets the requirements to run the latest version of Moodle found in the documents at [[Installing_Moodle#Requirements|Installing_Moodle]] and [[PHP]]&lt;br /&gt;
* ensure that the following php.ini variables are set to &amp;quot;On&amp;quot;&lt;br /&gt;
** allow_url_fopen: This setting is required the hub to be able to register a site.  If this option is not enabled, you will be given the [[error/local_hub/cannotregisternotavailablesite|cannotregisternotavailablesite]] error. Related tracker issue: https://tracker.moodle.org/browse/CONTRIB-3063&lt;br /&gt;
* mod_security in Apache version 1 and mod_security2 in Apache version 2 will return a 403 forbidden error when a URL that is not the local domain is passed as a get variable. mod_security on either the hub or client servers will block the completion of the client/hub registration process, even to MOOCH, as within the registration process URL&#039;s are passed as get variables a number of times. An exception can be added to mod_security in Apache version 1 via a local .htacess file. However, this ability was removed in mod_security2.  In mod_security2 the exception must be added to mod_security.conf of /conf.d. Related forum discussion: http://moodle.org/mod/forum/discuss.php?d=188933&lt;br /&gt;
&lt;br /&gt;
==How the hub software works==&lt;br /&gt;
&lt;br /&gt;
The hub software is implemented as a separate &amp;quot;local&amp;quot; plugin designed to be added to a standard install of Moodle 2.0 or later.  In this way the hub gets to use on all the features in the Moodle core API and benefits from maintenance of the core code.&lt;br /&gt;
&lt;br /&gt;
Once installed the whole site gets a new frontpage with a simple search box (see http://hub.moodle.org/ for example).&lt;br /&gt;
&lt;br /&gt;
Please don&#039;t add the hub capabilities to an existing Moodle site with real courses.  Although it may work, there are some opportunities for GUI confusion and some unknowns when it comes to security, so please just avoid it. Moodle is free, so it&#039;s trivial to install another clean copy to build your hub with.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==How to set up a Moodle Hub server==&lt;br /&gt;
&lt;br /&gt;
# Install Moodle 2.0 or later somewhere on a web server with a nice URL.&lt;br /&gt;
# Download the latest hub plugin from http://download.moodle.org/download.php/plugins/local/hub.zip&lt;br /&gt;
# Save the zip into the /local directory of Moodle and unzip, producing /local/hub&lt;br /&gt;
# Visit the &amp;quot;Notifications&amp;quot; page in Moodle (/admin) to complete the upgrade and install the hub software.&lt;br /&gt;
# Enable web services for the hub (&#039;&#039;&#039;Site Administration &amp;gt; Advanced features&#039;&#039;&#039;)&lt;br /&gt;
# Enable the XML-RPC protocol (&#039;&#039;&#039;Site Administration &amp;gt; Plugins &amp;gt; Web services &amp;gt; Manage protocols&#039;&#039;&#039;)&lt;br /&gt;
# Set up the SMTP (&#039;&#039;&#039;Site Administration &amp;gt; Plugins &amp;gt; Message outputs &amp;gt; Email&#039;&#039;&#039;)&lt;br /&gt;
#Set up the recaptcha (&#039;&#039;&#039;Site Administration &amp;gt; Plugins &amp;gt; Authentication &amp;gt; Manage authentication&#039;&#039;&#039;) &lt;br /&gt;
# Set up your hub (&#039;&#039;&#039;Site Administration &amp;gt; Hub &amp;gt; Settings&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
Congratulations!  You now have a working hub with no content!&lt;br /&gt;
&lt;br /&gt;
==Site registration==&lt;br /&gt;
&lt;br /&gt;
Only sites that are registered with the hub are allowed to publish content there.&lt;br /&gt;
&lt;br /&gt;
Sites register on the hub via &#039;&#039;&#039;Site Administration &amp;gt; Registration&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Hub registration==  &lt;br /&gt;
&lt;br /&gt;
You can also register your hub with the Moodle hub Directory, a listing of many hubs from around the world, enabling people from all over the world to find your hub and search the courses within it.  You may want to wait until you have some content before you register.&lt;br /&gt;
&lt;br /&gt;
==Managing sites==&lt;br /&gt;
In &#039;&#039;&#039;Administration &amp;gt; Hub &amp;gt; Manage sites&#039;&#039;&#039;, you can:&lt;br /&gt;
* Prioritise a site: during a search, course from prioritised sites appear on top of the list. A prioritised site is always trusted.&lt;br /&gt;
* Trust a site: when a site is trusted, any published course is immediatly available&lt;br /&gt;
* Delete a site: delete a site from the database. A message will be sent to the site administrator.&lt;br /&gt;
* Settings: you can change some information as the name, the description, the language...&lt;br /&gt;
* Make a site visible: only site declared as visible appear on the the site list (currently the site list hasn&#039;t been implemented)&lt;br /&gt;
&lt;br /&gt;
==Managing courses==&lt;br /&gt;
In &#039;&#039;&#039;Administration &amp;gt; Hub &amp;gt; Manage course&#039;&#039;&#039;, you can:&lt;br /&gt;
* Delete a course: delete a course from the database.&lt;br /&gt;
* Settings: you can change some information as the name, the description, the language...&lt;br /&gt;
* Make a course visible: decide if the course is displayed on search result&lt;br /&gt;
&lt;br /&gt;
== Important things about roles, users and web services ==&lt;br /&gt;
A hub server uses intensively Moodle web service 2.0. For this reason it is important to understand the [https://docs.moodle.org/en/Web_Services web services administration], and what happens if you change some roles/users/services.&lt;br /&gt;
&lt;br /&gt;
=== Roles ===&lt;br /&gt;
The hub server creates on the fly some roles that you should &#039;&#039;&#039;never delete/modify&#039;&#039;&#039;:&lt;br /&gt;
* one role for the hub directory&lt;br /&gt;
* one role for registered sites&lt;br /&gt;
* one role for public sites&lt;br /&gt;
&lt;br /&gt;
=== Users ===&lt;br /&gt;
The hub server creates on the fly some users that you should &#039;&#039;&#039;never delete/modify&#039;&#039;&#039;:&lt;br /&gt;
* one user for the hub directory&lt;br /&gt;
* one user for public access&lt;br /&gt;
* as many users as registered sites&lt;br /&gt;
&lt;br /&gt;
=== Services ===&lt;br /&gt;
The hub creates during installation some web services that you should &#039;&#039;&#039;never delete/modify&#039;&#039;&#039;:&lt;br /&gt;
* one service for Hub directory&lt;br /&gt;
* one service for Registered sites&lt;br /&gt;
* one service for Public sites&lt;br /&gt;
&lt;br /&gt;
It also creates tokens on the fly. These tokens are not displayed on the token management list, so you cannot accidentally delete them.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*[[Site registration]]&lt;br /&gt;
&lt;br /&gt;
[[ja:ハブ管理]]&lt;/div&gt;</summary>
		<author><name>Jmouneyrac</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Web_services_FAQ&amp;diff=94165</id>
		<title>Web services FAQ</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Web_services_FAQ&amp;diff=94165"/>
		<updated>2011-11-29T02:36:27Z</updated>

		<summary type="html">&lt;p&gt;Jmouneyrac: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Web services}}&lt;br /&gt;
This document lists some popular questions from the [http://moodle.org/mod/forum/view.php?id=6971 Web Services forum].&lt;br /&gt;
&lt;br /&gt;
== What is the difference between web services and MNet ==&lt;br /&gt;
&lt;br /&gt;
[[MNet]] is used to authenticate some users from a Moodle A site into a Moodle B site.&lt;br /&gt;
&lt;br /&gt;
Web services are functions that can be called by external applications (via SOAP, XML-RPC, REST or AMF).&lt;br /&gt;
&lt;br /&gt;
== I see the term &amp;quot;Web services&amp;quot; used in different ways, what does it mean? ==&lt;br /&gt;
&lt;br /&gt;
# The entire system in Moodle is referred to as the Moodle Web Service system.&lt;br /&gt;
# A particular action (like creating a user) is known as a Web service &#039;&#039;&#039;function&#039;&#039;&#039;.&lt;br /&gt;
# The admin can enable groups of these functions for outside use, and these are known as a &amp;quot;Web service&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Where is the Web Service API documented? ==&lt;br /&gt;
&lt;br /&gt;
Since different Moodle sites can extend or restrict the API, and the API will evolve over time, the best way to see the exact API for a particular Moodle site is to look at the automatically generated documentation.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Full API documentation&#039;&#039;&#039;&lt;br /&gt;
# Connect as admin&lt;br /&gt;
# Go to Administration Settings block &amp;gt; Plugins &amp;gt; Web services &amp;gt; API documentation&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Specific documentation to a user&#039;&#039;&#039;&lt;br /&gt;
# Connect as admin, enable web service, create a service and add some Moodle functions to it. Also see [[How_to_create_and_enable_a_web_service]].&lt;br /&gt;
# connect as non admin, and access the service documentation on your [[How_to_get_a_security_key|security keys page]].&lt;br /&gt;
&lt;br /&gt;
== Why are there not many functions in the API? ==&lt;br /&gt;
&lt;br /&gt;
We have been very careful when adding new functions because we don&#039;t want to be changing the API functions once they are implemented.  The ones we have in Moodle 2.0 are the most commonly requested ones (for users, courses, groups and enrolments).  &lt;br /&gt;
&lt;br /&gt;
We will add more functions to core over time, based on contributions from the community and feature requests.  See the [[:dev:Web_services_Roadmap|web service roadmap]].&lt;br /&gt;
&lt;br /&gt;
You can also extend the API on your own Moodle site by creating your own API functions (see next question).&lt;br /&gt;
&lt;br /&gt;
== How can I create a new web service function? ==&lt;br /&gt;
&lt;br /&gt;
The easiest and recommended way to add a web service is to write a new Moodle local plugin and to implement the web service functions there.  The Moodle administrator will just need to add the plugin in Moodle (copy the files in /local/), the web service functions will be automatically added. Please read /local/readme.txt for more information about plugin development. Finally read  [[:dev:Creating_a_web_service_and_a_web_service_function|how to implement a web service and a web service function]].&lt;br /&gt;
&lt;br /&gt;
== How can I set up a web service? ==&lt;br /&gt;
&lt;br /&gt;
* See the document [[How_to_create_and_enable_a_web_service| How to create and enable a web service]]. &lt;br /&gt;
* &#039;&#039;Settings &amp;gt; Site administration &amp;gt; Plugins &amp;gt; Web services &amp;gt; Overview&#039;&#039; explains two use cases.&lt;br /&gt;
* Finally ask questions on the [http://moodle.org/mod/forum/view.php?id=6971 Web Services forum]&lt;br /&gt;
&lt;br /&gt;
== Does the Moodle SOAP server work with JAVA or .NET? ==&lt;br /&gt;
&lt;br /&gt;
Unfortunately the generated WSDL isn&#039;t currently compatible with JAVA or .NET. See MDL-28988 and MDL-28989 for plans to create a JAVA-compatible SOAP WSDL.&lt;br /&gt;
&lt;br /&gt;
== How to get a user token from an external application? ==&lt;br /&gt;
you can generate and retrieve user tokens with the /login/token.php file =&amp;gt; [[:dev:Creating_a_web_service_client#How_to_get_a_user_token|How to get a user token]]&lt;br /&gt;
&lt;br /&gt;
== What is the &#039;Access control exception&#039; error ==&lt;br /&gt;
It means that one of this admin setting has failed:&lt;br /&gt;
* authorised user: ip restriction fails to authenticate the user (Administration &amp;gt; Plugins &amp;gt; Web services &amp;gt; Manage services &amp;gt; Authorized users &amp;gt; click on user full name)&lt;br /&gt;
* authorised user: valid date is expired (Administration &amp;gt; Plugins &amp;gt; Web services &amp;gt; Manage services &amp;gt; Authorized users &amp;gt; click on user full name)&lt;br /&gt;
* admin created the token: ip restriction fails to authenticate the user (Administration &amp;gt; Plugins &amp;gt; Web services &amp;gt; Manage tokens &amp;gt; check the status)&lt;br /&gt;
* admin created the token: valid date is expired (Administration &amp;gt; Plugins &amp;gt; Web services &amp;gt; Manage tokens &amp;gt; check the status)&lt;br /&gt;
* the user is not listed in the authorized list (Administration &amp;gt; Plugins &amp;gt; Web services &amp;gt; Manage services &amp;gt; Authorized users)&lt;br /&gt;
* the user hasn&#039;t the required capability (Administration &amp;gt; Plugins &amp;gt; Web services &amp;gt; Manage services &amp;gt; Edit service)&lt;br /&gt;
* site in maintenance mode&lt;br /&gt;
* user is suspended&lt;br /&gt;
* user is not confirmed&lt;br /&gt;
* user is deleted&lt;br /&gt;
* the user authentication is set to nologin (edit the user profile)&lt;br /&gt;
* password expired (most likely happens with external authentication like LDAP)&lt;br /&gt;
* web service disabled (Administration &amp;gt; Advanced features)&lt;br /&gt;
&lt;br /&gt;
Since Moodle 2.2, if the administrator turns Moodle debug mode &amp;gt;= NORMAL, then a explicit error message will be returned.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* Using Moodle [http://moodle.org/mod/forum/view.php?id=6971 Web Services forum]&lt;br /&gt;
&lt;br /&gt;
[[Category:MNet]]&lt;br /&gt;
[[Category:FAQ]]&lt;/div&gt;</summary>
		<author><name>Jmouneyrac</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Web_services_FAQ&amp;diff=94014</id>
		<title>Web services FAQ</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Web_services_FAQ&amp;diff=94014"/>
		<updated>2011-11-23T05:46:25Z</updated>

		<summary type="html">&lt;p&gt;Jmouneyrac: /* How to get a user token from an external application? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Web services}}&lt;br /&gt;
This document lists some popular questions from the [http://moodle.org/mod/forum/view.php?id=6971 Web Services forum].&lt;br /&gt;
&lt;br /&gt;
== What is the difference between web services and MNet ==&lt;br /&gt;
&lt;br /&gt;
[[MNet]] is used to authenticate some users from a Moodle A site into a Moodle B site.&lt;br /&gt;
&lt;br /&gt;
Web services are functions that can be called by external applications (via SOAP, XML-RPC, REST or AMF).&lt;br /&gt;
&lt;br /&gt;
== I see the term &amp;quot;Web services&amp;quot; used in different ways, what does it mean? ==&lt;br /&gt;
&lt;br /&gt;
# The entire system in Moodle is referred to as the Moodle Web Service system.&lt;br /&gt;
# A particular action (like creating a user) is known as a Web service &#039;&#039;&#039;function&#039;&#039;&#039;.&lt;br /&gt;
# The admin can enable groups of these functions for outside use, and these are known as a &amp;quot;Web service&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Where is the Web Service API documented? ==&lt;br /&gt;
&lt;br /&gt;
Since different Moodle sites can extend or restrict the API, and the API will evolve over time, the best way to see the exact API for a particular Moodle site is to look at the automatically generated documentation.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Full API documentation&#039;&#039;&#039;&lt;br /&gt;
# Connect as admin&lt;br /&gt;
# Go to Administration Settings block &amp;gt; Plugins &amp;gt; Web services &amp;gt; API documentation&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Specific documentation to a user&#039;&#039;&#039;&lt;br /&gt;
# Connect as admin, enable web service, create a service and add some Moodle functions to it. Also see [[How_to_create_and_enable_a_web_service]].&lt;br /&gt;
# connect as non admin, and access the service documentation on your [[How_to_get_a_security_key|security keys page]].&lt;br /&gt;
&lt;br /&gt;
== Why are there not many functions in the API? ==&lt;br /&gt;
&lt;br /&gt;
We have been very careful when adding new functions because we don&#039;t want to be changing the API functions once they are implemented.  The ones we have in Moodle 2.0 are the most commonly requested ones (for users, courses, groups and enrolments).  &lt;br /&gt;
&lt;br /&gt;
We will add more functions to core over time, based on contributions from the community and feature requests.  See the [[:dev:Web_services_Roadmap|web service roadmap]].&lt;br /&gt;
&lt;br /&gt;
You can also extend the API on your own Moodle site by creating your own API functions (see next question).&lt;br /&gt;
&lt;br /&gt;
== How can I create a new web service function? ==&lt;br /&gt;
&lt;br /&gt;
The easiest and recommended way to add a web service is to write a new Moodle local plugin and to implement the web service functions there.  The Moodle administrator will just need to add the plugin in Moodle (copy the files in /local/), the web service functions will be automatically added. Please read /local/readme.txt for more information about plugin development. Finally read  [[:dev:Creating_a_web_service_and_a_web_service_function|how to implement a web service and a web service function]].&lt;br /&gt;
&lt;br /&gt;
== How can I set up a web service? ==&lt;br /&gt;
&lt;br /&gt;
* See the document [[How_to_create_and_enable_a_web_service| How to create and enable a web service]]. &lt;br /&gt;
* &#039;&#039;Settings &amp;gt; Site administration &amp;gt; Plugins &amp;gt; Web services &amp;gt; Overview&#039;&#039; explains two use cases.&lt;br /&gt;
* Finally ask questions on the [http://moodle.org/mod/forum/view.php?id=6971 Web Services forum]&lt;br /&gt;
&lt;br /&gt;
== Does the Moodle SOAP server work with JAVA or .NET? ==&lt;br /&gt;
&lt;br /&gt;
Unfortunately the generated WSDL isn&#039;t currently compatible with JAVA or .NET. See MDL-28988 and MDL-28989 for plans to create a JAVA-compatible SOAP WSDL.&lt;br /&gt;
&lt;br /&gt;
== How to get a user token from an external application? ==&lt;br /&gt;
you can generate and retrieve user tokens with the /login/token.php file =&amp;gt; [[:dev:Creating_a_web_service_client#How_to_get_a_user_token|How to get a user token]]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* Using Moodle [http://moodle.org/mod/forum/view.php?id=6971 Web Services forum]&lt;br /&gt;
&lt;br /&gt;
[[Category:MNet]]&lt;br /&gt;
[[Category:FAQ]]&lt;/div&gt;</summary>
		<author><name>Jmouneyrac</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Web_services_FAQ&amp;diff=94013</id>
		<title>Web services FAQ</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Web_services_FAQ&amp;diff=94013"/>
		<updated>2011-11-23T05:44:42Z</updated>

		<summary type="html">&lt;p&gt;Jmouneyrac: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Web services}}&lt;br /&gt;
This document lists some popular questions from the [http://moodle.org/mod/forum/view.php?id=6971 Web Services forum].&lt;br /&gt;
&lt;br /&gt;
== What is the difference between web services and MNet ==&lt;br /&gt;
&lt;br /&gt;
[[MNet]] is used to authenticate some users from a Moodle A site into a Moodle B site.&lt;br /&gt;
&lt;br /&gt;
Web services are functions that can be called by external applications (via SOAP, XML-RPC, REST or AMF).&lt;br /&gt;
&lt;br /&gt;
== I see the term &amp;quot;Web services&amp;quot; used in different ways, what does it mean? ==&lt;br /&gt;
&lt;br /&gt;
# The entire system in Moodle is referred to as the Moodle Web Service system.&lt;br /&gt;
# A particular action (like creating a user) is known as a Web service &#039;&#039;&#039;function&#039;&#039;&#039;.&lt;br /&gt;
# The admin can enable groups of these functions for outside use, and these are known as a &amp;quot;Web service&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Where is the Web Service API documented? ==&lt;br /&gt;
&lt;br /&gt;
Since different Moodle sites can extend or restrict the API, and the API will evolve over time, the best way to see the exact API for a particular Moodle site is to look at the automatically generated documentation.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Full API documentation&#039;&#039;&#039;&lt;br /&gt;
# Connect as admin&lt;br /&gt;
# Go to Administration Settings block &amp;gt; Plugins &amp;gt; Web services &amp;gt; API documentation&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Specific documentation to a user&#039;&#039;&#039;&lt;br /&gt;
# Connect as admin, enable web service, create a service and add some Moodle functions to it. Also see [[How_to_create_and_enable_a_web_service]].&lt;br /&gt;
# connect as non admin, and access the service documentation on your [[How_to_get_a_security_key|security keys page]].&lt;br /&gt;
&lt;br /&gt;
== Why are there not many functions in the API? ==&lt;br /&gt;
&lt;br /&gt;
We have been very careful when adding new functions because we don&#039;t want to be changing the API functions once they are implemented.  The ones we have in Moodle 2.0 are the most commonly requested ones (for users, courses, groups and enrolments).  &lt;br /&gt;
&lt;br /&gt;
We will add more functions to core over time, based on contributions from the community and feature requests.  See the [[:dev:Web_services_Roadmap|web service roadmap]].&lt;br /&gt;
&lt;br /&gt;
You can also extend the API on your own Moodle site by creating your own API functions (see next question).&lt;br /&gt;
&lt;br /&gt;
== How can I create a new web service function? ==&lt;br /&gt;
&lt;br /&gt;
The easiest and recommended way to add a web service is to write a new Moodle local plugin and to implement the web service functions there.  The Moodle administrator will just need to add the plugin in Moodle (copy the files in /local/), the web service functions will be automatically added. Please read /local/readme.txt for more information about plugin development. Finally read  [[:dev:Creating_a_web_service_and_a_web_service_function|how to implement a web service and a web service function]].&lt;br /&gt;
&lt;br /&gt;
== How can I set up a web service? ==&lt;br /&gt;
&lt;br /&gt;
* See the document [[How_to_create_and_enable_a_web_service| How to create and enable a web service]]. &lt;br /&gt;
* &#039;&#039;Settings &amp;gt; Site administration &amp;gt; Plugins &amp;gt; Web services &amp;gt; Overview&#039;&#039; explains two use cases.&lt;br /&gt;
* Finally ask questions on the [http://moodle.org/mod/forum/view.php?id=6971 Web Services forum]&lt;br /&gt;
&lt;br /&gt;
== Does the Moodle SOAP server work with JAVA or .NET? ==&lt;br /&gt;
&lt;br /&gt;
Unfortunately the generated WSDL isn&#039;t currently compatible with JAVA or .NET. See MDL-28988 and MDL-28989 for plans to create a JAVA-compatible SOAP WSDL.&lt;br /&gt;
&lt;br /&gt;
== How to get a user token from an external application? ==&lt;br /&gt;
In Moodle 2.2 you can generate and retrieve user tokens with the /login/token.php file =&amp;gt; [[:dev:Creating_a_web_service_client#How_to_get_a_user_token|How to get a user token]]&lt;br /&gt;
&lt;br /&gt;
The condition being that the service need a shortname. At the moment a service can have a shortname if you:&lt;br /&gt;
* create the service as a built-in service (in db/services.php files) &lt;br /&gt;
* add the shortname manually in the DB. Note: we&#039;ll add the admin UI for shortname later (MDL-30229) &lt;br /&gt;
&lt;br /&gt;
Just for the info, the file login/token.php exists since 2.1 but for this Moodle version it can only generate token for the mobile service.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* Using Moodle [http://moodle.org/mod/forum/view.php?id=6971 Web Services forum]&lt;br /&gt;
&lt;br /&gt;
[[Category:MNet]]&lt;br /&gt;
[[Category:FAQ]]&lt;/div&gt;</summary>
		<author><name>Jmouneyrac</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Web_services&amp;diff=93235</id>
		<title>Web services</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Web_services&amp;diff=93235"/>
		<updated>2011-11-02T08:59:42Z</updated>

		<summary type="html">&lt;p&gt;Jmouneyrac: /* See also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Managing a Moodle site}}&lt;br /&gt;
Web services enable other systems to login to Moodle and perform operations. &lt;br /&gt;
&lt;br /&gt;
== Administrator documentation ==&lt;br /&gt;
* [[How_to_create_and_enable_a_web_service|How to create and enable a web service]]&lt;br /&gt;
* [[Enable mobile web services|How to enable the mobile web service]]&lt;br /&gt;
&lt;br /&gt;
== User documentation ==&lt;br /&gt;
Most of the time, the client application will retrieve the key (token) for a user. However, it is still possible for a user to view the key and to regenerate it.&lt;br /&gt;
* [[Security keys|How to obtain a security key (token)]]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
Sharing knowledge:&lt;br /&gt;
* The official discussion [http://moodle.org/mod/forum/view.php?id=6971| forum is here]&lt;br /&gt;
* [[Web_services_FAQ|Web services FAQ]]&lt;br /&gt;
&lt;br /&gt;
Developer documentation:&lt;br /&gt;
* [[Development:Web_services | Web services]]&lt;br /&gt;
* [[:dev:Web_services_Roadmap | Web service Roadmap]]&lt;br /&gt;
&lt;br /&gt;
Other implementations:&lt;br /&gt;
* [[:dev:Web_Services:OK_Tech_Web_Services|OK Tech Web Services]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Web Services]]&lt;br /&gt;
&lt;br /&gt;
[[eu:Web-zerbitzuak]]&lt;br /&gt;
[[ja:ウェブサービス]]&lt;/div&gt;</summary>
		<author><name>Jmouneyrac</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Web_services&amp;diff=93234</id>
		<title>Web services</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Web_services&amp;diff=93234"/>
		<updated>2011-11-02T08:44:57Z</updated>

		<summary type="html">&lt;p&gt;Jmouneyrac: /* See also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Managing a Moodle site}}&lt;br /&gt;
Web services enable other systems to login to Moodle and perform operations. &lt;br /&gt;
&lt;br /&gt;
== Administrator documentation ==&lt;br /&gt;
* [[How_to_create_and_enable_a_web_service|How to create and enable a web service]]&lt;br /&gt;
* [[Enable mobile web services|How to enable the mobile web service]]&lt;br /&gt;
&lt;br /&gt;
== User documentation ==&lt;br /&gt;
Most of the time, the client application will retrieve the key (token) for a user. However, it is still possible for a user to view the key and to regenerate it.&lt;br /&gt;
* [[Security keys|How to obtain a security key (token)]]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
Sharing knowledge:&lt;br /&gt;
* The official discussion [http://moodle.org/mod/forum/view.php?id=6971| forum is here]&lt;br /&gt;
* [[Web_services_FAQ|Web services FAQ]]&lt;br /&gt;
&lt;br /&gt;
Developer documentation:&lt;br /&gt;
* [[Development:Web_services | Web services]]&lt;br /&gt;
* [[Development:Web_services_Roadmap | Web service Roadmap]]&lt;br /&gt;
&lt;br /&gt;
Other implementations:&lt;br /&gt;
* [[:dev:Web_Services:OK_Tech_Web_Services|OK Tech Web Services]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Web Services]]&lt;br /&gt;
&lt;br /&gt;
[[eu:Web-zerbitzuak]]&lt;br /&gt;
[[ja:ウェブサービス]]&lt;/div&gt;</summary>
		<author><name>Jmouneyrac</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Web_services&amp;diff=93233</id>
		<title>Web services</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Web_services&amp;diff=93233"/>
		<updated>2011-11-02T08:44:02Z</updated>

		<summary type="html">&lt;p&gt;Jmouneyrac: /* See also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Managing a Moodle site}}&lt;br /&gt;
Web services enable other systems to login to Moodle and perform operations. &lt;br /&gt;
&lt;br /&gt;
== Administrator documentation ==&lt;br /&gt;
* [[How_to_create_and_enable_a_web_service|How to create and enable a web service]]&lt;br /&gt;
* [[Enable mobile web services|How to enable the mobile web service]]&lt;br /&gt;
&lt;br /&gt;
== User documentation ==&lt;br /&gt;
Most of the time, the client application will retrieve the key (token) for a user. However, it is still possible for a user to view the key and to regenerate it.&lt;br /&gt;
* [[Security keys|How to obtain a security key (token)]]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
Sharing knowledge:&lt;br /&gt;
* The official discussion [http://moodle.org/mod/forum/view.php?id=6971| forum is here]&lt;br /&gt;
* [[Web_services_FAQ|Web services FAQ]]&lt;br /&gt;
&lt;br /&gt;
Developer documentation:&lt;br /&gt;
* [[Development:Web_services | Web services]]&lt;br /&gt;
&lt;br /&gt;
Other implementations:&lt;br /&gt;
* [[:dev:Web_Services:OK_Tech_Web_Services|OK Tech Web Services]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Web Services]]&lt;br /&gt;
&lt;br /&gt;
[[eu:Web-zerbitzuak]]&lt;br /&gt;
[[ja:ウェブサービス]]&lt;/div&gt;</summary>
		<author><name>Jmouneyrac</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Web_services&amp;diff=93232</id>
		<title>Web services</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Web_services&amp;diff=93232"/>
		<updated>2011-11-02T08:35:15Z</updated>

		<summary type="html">&lt;p&gt;Jmouneyrac: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Managing a Moodle site}}&lt;br /&gt;
Web services enable other systems to login to Moodle and perform operations. &lt;br /&gt;
&lt;br /&gt;
== Administrator documentation ==&lt;br /&gt;
* [[How_to_create_and_enable_a_web_service|How to create and enable a web service]]&lt;br /&gt;
* [[Enable mobile web services|How to enable the mobile web service]]&lt;br /&gt;
&lt;br /&gt;
== User documentation ==&lt;br /&gt;
Most of the time, the client application will retrieve the key (token) for a user. However, it is still possible for a user to view the key and to regenerate it.&lt;br /&gt;
* [[Security keys|How to obtain a security key (token)]]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
Sharing knowledge:&lt;br /&gt;
* The official discussion [http://moodle.org/mod/forum/view.php?id=6971| forum is here]&lt;br /&gt;
* [[Web_services_FAQ|Web services FAQ]]&lt;br /&gt;
&lt;br /&gt;
Developer documentation:&lt;br /&gt;
* [[Development:Web_services | Web services]]&lt;br /&gt;
* [[Development:External services security | External services security]]&lt;br /&gt;
* [[Development:External services description | External services description]]&lt;br /&gt;
&lt;br /&gt;
Other implementations:&lt;br /&gt;
* [[:dev:Web_Services:OK_Tech_Web_Services|OK Tech Web Services]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Web Services]]&lt;br /&gt;
&lt;br /&gt;
[[eu:Web-zerbitzuak]]&lt;br /&gt;
[[ja:ウェブサービス]]&lt;/div&gt;</summary>
		<author><name>Jmouneyrac</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Web_services&amp;diff=93231</id>
		<title>Web services</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Web_services&amp;diff=93231"/>
		<updated>2011-11-02T08:33:28Z</updated>

		<summary type="html">&lt;p&gt;Jmouneyrac: /* See also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Managing a Moodle site}}&lt;br /&gt;
Web services enable other systems to login to Moodle and perform operations. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Administrator documentation ==&lt;br /&gt;
* [[How_to_create_and_enable_a_web_service|How to create and enable a web service]]&lt;br /&gt;
* [[Enable mobile web services|How to enable the mobile web service]]&lt;br /&gt;
&lt;br /&gt;
== User documentation ==&lt;br /&gt;
Most of the time, the client application will retrieve the key (token) for a user. However, it is still possible for a user to view the key and to regenerate it.&lt;br /&gt;
* [[Security keys|How to obtain a security key (token)]]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
Sharing knowledge:&lt;br /&gt;
* The official discussion [http://moodle.org/mod/forum/view.php?id=6971| forum is here]&lt;br /&gt;
* [[Web_services_FAQ|Web services FAQ]]&lt;br /&gt;
&lt;br /&gt;
Developer documentation:&lt;br /&gt;
* [[Development:Web_services | Web services]]&lt;br /&gt;
* [[Development:External services security | External services security]]&lt;br /&gt;
* [[Development:External services description | External services description]]&lt;br /&gt;
&lt;br /&gt;
Other implementations:&lt;br /&gt;
* [[:dev:Web_Services:OK_Tech_Web_Services|OK Tech Web Services]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Web Services]]&lt;br /&gt;
&lt;br /&gt;
[[eu:Web-zerbitzuak]]&lt;br /&gt;
[[ja:ウェブサービス]]&lt;/div&gt;</summary>
		<author><name>Jmouneyrac</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Web_services&amp;diff=93230</id>
		<title>Web services</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Web_services&amp;diff=93230"/>
		<updated>2011-11-02T08:32:45Z</updated>

		<summary type="html">&lt;p&gt;Jmouneyrac: /* See also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Managing a Moodle site}}&lt;br /&gt;
Web services enable other systems to login to Moodle and perform operations. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Administrator documentation ==&lt;br /&gt;
* [[How_to_create_and_enable_a_web_service|How to create and enable a web service]]&lt;br /&gt;
* [[Enable mobile web services|How to enable the mobile web service]]&lt;br /&gt;
&lt;br /&gt;
== User documentation ==&lt;br /&gt;
Most of the time, the client application will retrieve the key (token) for a user. However, it is still possible for a user to view the key and to regenerate it.&lt;br /&gt;
* [[Security keys|How to obtain a security key (token)]]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
Sharing knowledge:&lt;br /&gt;
* The official discussion [http://moodle.org/mod/forum/view.php?id=6971| forum is here]&lt;br /&gt;
* [[Web_services_FAQ|Web services FAQ]]&lt;br /&gt;
&lt;br /&gt;
Developer documentation:&lt;br /&gt;
* [[Development:Web_services | Developer documentation]]&lt;br /&gt;
* [[Development:External services security]]&lt;br /&gt;
* [[Development:External services description]]&lt;br /&gt;
&lt;br /&gt;
Other implementations:&lt;br /&gt;
* [[:dev:Web_Services:OK_Tech_Web_Services|OK Tech Web Services]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Web Services]]&lt;br /&gt;
&lt;br /&gt;
[[eu:Web-zerbitzuak]]&lt;br /&gt;
[[ja:ウェブサービス]]&lt;/div&gt;</summary>
		<author><name>Jmouneyrac</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Web_services&amp;diff=93229</id>
		<title>Web services</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Web_services&amp;diff=93229"/>
		<updated>2011-11-02T08:31:58Z</updated>

		<summary type="html">&lt;p&gt;Jmouneyrac: /* Developer documentation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Managing a Moodle site}}&lt;br /&gt;
Web services enable other systems to login to Moodle and perform operations. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Administrator documentation ==&lt;br /&gt;
* [[How_to_create_and_enable_a_web_service|How to create and enable a web service]]&lt;br /&gt;
* [[Enable mobile web services|How to enable the mobile web service]]&lt;br /&gt;
&lt;br /&gt;
== User documentation ==&lt;br /&gt;
Most of the time, the client application will retrieve the key (token) for a user. However, it is still possible for a user to view the key and to regenerate it.&lt;br /&gt;
* [[Security keys|How to obtain a security key (token)]]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
Sharing knowledge:&lt;br /&gt;
* The official discussion [http://moodle.org/mod/forum/view.php?id=6971| forum is here]&lt;br /&gt;
* [[Web_services_FAQ|Web services FAQ]]&lt;br /&gt;
&lt;br /&gt;
Specification / core development / brainstorming:&lt;br /&gt;
* [[Development:External services security]]&lt;br /&gt;
* [[Development:External services description]]&lt;br /&gt;
&lt;br /&gt;
Other implementations:&lt;br /&gt;
* [[:dev:Web_Services:OK_Tech_Web_Services|OK Tech Web Services]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Web Services]]&lt;br /&gt;
&lt;br /&gt;
[[eu:Web-zerbitzuak]]&lt;br /&gt;
[[ja:ウェブサービス]]&lt;/div&gt;</summary>
		<author><name>Jmouneyrac</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Web_services&amp;diff=93228</id>
		<title>Web services</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Web_services&amp;diff=93228"/>
		<updated>2011-11-02T08:29:46Z</updated>

		<summary type="html">&lt;p&gt;Jmouneyrac: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Managing a Moodle site}}&lt;br /&gt;
Web services enable other systems to login to Moodle and perform operations. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Administrator documentation ==&lt;br /&gt;
* [[How_to_create_and_enable_a_web_service|How to create and enable a web service]]&lt;br /&gt;
* [[Enable mobile web services|How to enable the mobile web service]]&lt;br /&gt;
&lt;br /&gt;
== User documentation ==&lt;br /&gt;
Most of the time, the client application will retrieve the key (token) for a user. However, it is still possible for a user to view the key and to regenerate it.&lt;br /&gt;
* [[Security keys|How to obtain a security key (token)]]&lt;br /&gt;
&lt;br /&gt;
== Developer documentation==&lt;br /&gt;
The full API can be founnd on any Moodle sites under &#039;&#039;&#039; Administration block &amp;gt; Plugins &amp;gt; Web services &amp;gt; API Documentation&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
* [[Development:Creating a web service and a web service function | Implement a web service and a web service function]]&lt;br /&gt;
* [[Development:Creating a web service client | Implement a web service client]]&lt;br /&gt;
* [https://docs.moodle.org/dev/Web_services_Roadmap Web service Roadmap]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
Sharing knowledge:&lt;br /&gt;
* The official discussion [http://moodle.org/mod/forum/view.php?id=6971| forum is here]&lt;br /&gt;
* [[Web_services_FAQ|Web services FAQ]]&lt;br /&gt;
&lt;br /&gt;
Specification / core development / brainstorming:&lt;br /&gt;
* [[Development:External services security]]&lt;br /&gt;
* [[Development:External services description]]&lt;br /&gt;
&lt;br /&gt;
Other implementations:&lt;br /&gt;
* [[:dev:Web_Services:OK_Tech_Web_Services|OK Tech Web Services]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Web Services]]&lt;br /&gt;
&lt;br /&gt;
[[eu:Web-zerbitzuak]]&lt;br /&gt;
[[ja:ウェブサービス]]&lt;/div&gt;</summary>
		<author><name>Jmouneyrac</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Web_services&amp;diff=93203</id>
		<title>Web services</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Web_services&amp;diff=93203"/>
		<updated>2011-11-02T02:18:31Z</updated>

		<summary type="html">&lt;p&gt;Jmouneyrac: /* See also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Managing a Moodle site}}&lt;br /&gt;
Web services enable other systems to login to Moodle and perform operations. &lt;br /&gt;
&lt;br /&gt;
=== How it works ===&lt;br /&gt;
This simple example will give you an idea of how our web services infrastructure works. &lt;br /&gt;
#The client sends a username and password to the web service login script.&lt;br /&gt;
#The script returns a token for that user account.&lt;br /&gt;
#The client calls a particular web service function on a protocol server including the token .&lt;br /&gt;
#The protocol server uses the token to check that the user can call the function.&lt;br /&gt;
#The protocol server call the matching external function, located in a externallib.php file inside the relevant module.&lt;br /&gt;
#The external function checks that the current user has_capability to do this operation.&lt;br /&gt;
#The external function calls the matching Moodle core function (in lib.php usually).&lt;br /&gt;
#The core function can return a result to the external function. &lt;br /&gt;
#The external function will return a result to the protocol server.&lt;br /&gt;
#The protocol server returns the result to the client.&lt;br /&gt;
&lt;br /&gt;
== Administrator documentation ==&lt;br /&gt;
* [[How_to_create_and_enable_a_web_service|How to create and enable a web service]]&lt;br /&gt;
* [[Enable mobile web services|How to enable the mobile web service]]&lt;br /&gt;
&lt;br /&gt;
== User documentation ==&lt;br /&gt;
Most of the time, the client application will retrieve the key (token) for a user. However, it is still possible for a user to view the key and to regenerate it.&lt;br /&gt;
* [[Security keys|How to obtain a security key (token)]]&lt;br /&gt;
&lt;br /&gt;
== Developer documentation==&lt;br /&gt;
The full API can be founnd on any Moodle sites under &#039;&#039;&#039; Administration block &amp;gt; Plugins &amp;gt; Web services &amp;gt; API Documentation&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
* [[Development:Creating a web service and a web service function | Implement a web service and a web service function]]&lt;br /&gt;
* [[Development:Creating a web service client | Implement a web service client]]&lt;br /&gt;
* [https://docs.moodle.org/dev/Web_services_Roadmap Web service Roadmap]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
Sharing knowledge:&lt;br /&gt;
* The official discussion [http://moodle.org/mod/forum/view.php?id=6971| forum is here]&lt;br /&gt;
* [[Web_services_FAQ|Web services FAQ]]&lt;br /&gt;
&lt;br /&gt;
Specification / core development / brainstorming:&lt;br /&gt;
* [[Development:External services security]]&lt;br /&gt;
* [[Development:External services description]]&lt;br /&gt;
&lt;br /&gt;
Other implementations:&lt;br /&gt;
* [[:dev:Web_Services:OK_Tech_Web_Services|OK Tech Web Services]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Web Services]]&lt;br /&gt;
&lt;br /&gt;
[[eu:Web-zerbitzuak]]&lt;br /&gt;
[[ja:ウェブサービス]]&lt;/div&gt;</summary>
		<author><name>Jmouneyrac</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Mobile_web_services&amp;diff=93202</id>
		<title>Mobile web services</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Mobile_web_services&amp;diff=93202"/>
		<updated>2011-11-02T02:12:19Z</updated>

		<summary type="html">&lt;p&gt;Jmouneyrac: /* See also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Mobile}}&lt;br /&gt;
{{Moodle 2.1}}Moodle 2.1 comes with a built-in web service designed for mobile applications. It is required to run the official [[Mobile app]]. Enable it only if you want people to use the official app or if a third party app explicitly requires it.&lt;br /&gt;
&lt;br /&gt;
== Enabling mobile web services ==&lt;br /&gt;
&lt;br /&gt;
A site administrator first must enable mobile web services:&lt;br /&gt;
&lt;br /&gt;
*In &#039;&#039;Settings &amp;gt; Site administration &amp;gt; Plugins &amp;gt; Web services &amp;gt; External services&#039;&#039; &lt;br /&gt;
*Check &amp;quot;Enable mobile web services&amp;quot; and then&lt;br /&gt;
*Click Save.&lt;br /&gt;
&lt;br /&gt;
That&#039;s it! No other steps required.&lt;br /&gt;
&lt;br /&gt;
The rest of this document explains the &amp;quot;behind the scenes&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== What happens when the service is enabled ==&lt;br /&gt;
Enabling the mobile web services will automatically:&lt;br /&gt;
* enable the web services system (&#039;&#039;Settings &amp;gt; Site administration &amp;gt; Advanced features&#039;&#039;)&lt;br /&gt;
* enable the built-in external service called &#039;Mobile web services&#039; - you should see this new mobile service listed as enabled&lt;br /&gt;
* enable the xml-rpc protocol&lt;br /&gt;
* allow the &#039;webservice/xmlrpc:use&#039; capability for authenticated user role&lt;br /&gt;
&lt;br /&gt;
== Disabling mobile web services ==&lt;br /&gt;
When you uncheck &#039;Enable mobile web services&#039;, it will automatically:&lt;br /&gt;
* disable the external service called &#039;Mobile web services&#039;.&lt;br /&gt;
*if &#039;Mobile web services&#039; was the only external service enabled:&lt;br /&gt;
** disable the web services system&lt;br /&gt;
** disable the xml-rpc protocol&lt;br /&gt;
** remove the &#039;webservice/xmlrpc:use&#039; capability for authenticated user role&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Web_services|Web Services]]&lt;br /&gt;
* [[How_to_create_and_enable_a_web_service|How to create and enable a web service]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Web Services]]&lt;br /&gt;
[[Category:Mobile]]&lt;/div&gt;</summary>
		<author><name>Jmouneyrac</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Mobile_web_services&amp;diff=93201</id>
		<title>Mobile web services</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Mobile_web_services&amp;diff=93201"/>
		<updated>2011-11-02T02:11:12Z</updated>

		<summary type="html">&lt;p&gt;Jmouneyrac: /* See also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Mobile}}&lt;br /&gt;
{{Moodle 2.1}}Moodle 2.1 comes with a built-in web service designed for mobile applications. It is required to run the official [[Mobile app]]. Enable it only if you want people to use the official app or if a third party app explicitly requires it.&lt;br /&gt;
&lt;br /&gt;
== Enabling mobile web services ==&lt;br /&gt;
&lt;br /&gt;
A site administrator first must enable mobile web services:&lt;br /&gt;
&lt;br /&gt;
*In &#039;&#039;Settings &amp;gt; Site administration &amp;gt; Plugins &amp;gt; Web services &amp;gt; External services&#039;&#039; &lt;br /&gt;
*Check &amp;quot;Enable mobile web services&amp;quot; and then&lt;br /&gt;
*Click Save.&lt;br /&gt;
&lt;br /&gt;
That&#039;s it! No other steps required.&lt;br /&gt;
&lt;br /&gt;
The rest of this document explains the &amp;quot;behind the scenes&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== What happens when the service is enabled ==&lt;br /&gt;
Enabling the mobile web services will automatically:&lt;br /&gt;
* enable the web services system (&#039;&#039;Settings &amp;gt; Site administration &amp;gt; Advanced features&#039;&#039;)&lt;br /&gt;
* enable the built-in external service called &#039;Mobile web services&#039; - you should see this new mobile service listed as enabled&lt;br /&gt;
* enable the xml-rpc protocol&lt;br /&gt;
* allow the &#039;webservice/xmlrpc:use&#039; capability for authenticated user role&lt;br /&gt;
&lt;br /&gt;
== Disabling mobile web services ==&lt;br /&gt;
When you uncheck &#039;Enable mobile web services&#039;, it will automatically:&lt;br /&gt;
* disable the external service called &#039;Mobile web services&#039;.&lt;br /&gt;
*if &#039;Mobile web services&#039; was the only external service enabled:&lt;br /&gt;
** disable the web services system&lt;br /&gt;
** disable the xml-rpc protocol&lt;br /&gt;
** remove the &#039;webservice/xmlrpc:use&#039; capability for authenticated user role&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Web_services]]&lt;br /&gt;
* [[How_to_create_and_enable_a_web_service|How to create and enable a web service]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Web Services]]&lt;br /&gt;
[[Category:Mobile]]&lt;/div&gt;</summary>
		<author><name>Jmouneyrac</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Using_web_services&amp;diff=93200</id>
		<title>Using web services</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Using_web_services&amp;diff=93200"/>
		<updated>2011-11-02T02:07:15Z</updated>

		<summary type="html">&lt;p&gt;Jmouneyrac: /* Adding functions to the service */&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;Settings &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;Settings &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 [[How_to_get_a_security_key|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;Settings &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;
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;Admin &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;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 [https://docs.moodle.org/en/Manage_roles Manage roles] documentation.&lt;br /&gt;
&lt;br /&gt;
Once done, the web service should be set up. Users should be able to [[How_to_get_a_security_key|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;Settings &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 setup 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;Settings &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, you can note that like for authorised users, you can also set &#039;&#039;IP restriction&#039;&#039; and &#039;&#039;Valid until&#039;&#039; on a token.&lt;/div&gt;</summary>
		<author><name>Jmouneyrac</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Using_web_services&amp;diff=93199</id>
		<title>Using web services</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Using_web_services&amp;diff=93199"/>
		<updated>2011-11-02T02:02:07Z</updated>

		<summary type="html">&lt;p&gt;Jmouneyrac: /* Adding functions to the service */&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;Settings &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;Settings &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 [[How_to_get_a_security_key|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;Settings &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;
You will then be returned to the service functions list. Opposite each function is a &#039;Required capabilities&#039; field. Users need these capabilities to run each function. However there are exceptions - see the function descriptions in the API Documenation (&#039;&#039;Admin &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;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 [https://docs.moodle.org/en/Manage_roles Manage roles] documentation.&lt;br /&gt;
&lt;br /&gt;
Once done, the web service should be set up. Users should be able to [[How_to_get_a_security_key|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;Settings &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 setup 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;Settings &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, you can note that like for authorised users, you can also set &#039;&#039;IP restriction&#039;&#039; and &#039;&#039;Valid until&#039;&#039; on a token.&lt;/div&gt;</summary>
		<author><name>Jmouneyrac</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Using_web_services&amp;diff=93198</id>
		<title>Using web services</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Using_web_services&amp;diff=93198"/>
		<updated>2011-11-02T01:58:21Z</updated>

		<summary type="html">&lt;p&gt;Jmouneyrac: /* Alternative settings */&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;Settings &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;Settings &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 [[How_to_get_a_security_key|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;Settings &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 now, select &#039;Create group&#039; as it is the function used as an example in [[Development:Creating_a_web_service_client|Creating a web service client]].&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;
You will then be returned to the service functions list. Opposite each function is a &#039;Required capabilities&#039; field. Users need these capabilities to run each function. However there are exceptions - see the web service function documentation for details.&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;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 [https://docs.moodle.org/en/Manage_roles Manage roles] documentation.&lt;br /&gt;
&lt;br /&gt;
Once done, the web service should be set up. Users should be able to [[How_to_get_a_security_key|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;Settings &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 setup 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;Settings &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, you can note that like for authorised users, you can also set &#039;&#039;IP restriction&#039;&#039; and &#039;&#039;Valid until&#039;&#039; on a token.&lt;/div&gt;</summary>
		<author><name>Jmouneyrac</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Using_web_services&amp;diff=93197</id>
		<title>Using web services</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Using_web_services&amp;diff=93197"/>
		<updated>2011-11-02T01:55:54Z</updated>

		<summary type="html">&lt;p&gt;Jmouneyrac: /* Enabling capabilities */&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;Settings &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;Settings &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 [[How_to_get_a_security_key|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;Settings &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 now, select &#039;Create group&#039; as it is the function used as an example in [[Development:Creating_a_web_service_client|Creating a web service client]].&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;
You will then be returned to the service functions list. Opposite each function is a &#039;Required capabilities&#039; field. Users need these capabilities to run each function. However there are exceptions - see the web service function documentation for details.&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;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 [https://docs.moodle.org/en/Manage_roles Manage roles] documentation.&lt;br /&gt;
&lt;br /&gt;
Once done, the web service should be set up. Users should be able to [[How_to_get_a_security_key|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;Settings &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 setup some specific options: IP restriction and Valid until.&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;Settings &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;/div&gt;</summary>
		<author><name>Jmouneyrac</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Using_web_services&amp;diff=93196</id>
		<title>Using web services</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Using_web_services&amp;diff=93196"/>
		<updated>2011-11-02T01:55:01Z</updated>

		<summary type="html">&lt;p&gt;Jmouneyrac: /* Enabling capabilities */&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;Settings &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;Settings &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 [[How_to_get_a_security_key|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;Settings &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 now, select &#039;Create group&#039; as it is the function used as an example in [[Development:Creating_a_web_service_client|Creating a web service client]].&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;
You will then be returned to the service functions list. Opposite each function is a &#039;Required capabilities&#039; field. Users need these capabilities to run each function. However there are exceptions - see the web service function documentation for details.&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 (Manage Services &amp;gt;&#039;&#039;&#039;Edit&#039;&#039;&#039; link).&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 [https://docs.moodle.org/en/Manage_roles Manage roles] documentation.&lt;br /&gt;
&lt;br /&gt;
Once done, the web service should be set up. Users should be able to [[How_to_get_a_security_key|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;Settings &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 setup some specific options: IP restriction and Valid until.&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;Settings &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;/div&gt;</summary>
		<author><name>Jmouneyrac</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Using_web_services&amp;diff=93195</id>
		<title>Using web services</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Using_web_services&amp;diff=93195"/>
		<updated>2011-11-02T01:52:26Z</updated>

		<summary type="html">&lt;p&gt;Jmouneyrac: /* Enabling capabilities */&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;Settings &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;Settings &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 [[How_to_get_a_security_key|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;Settings &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 now, select &#039;Create group&#039; as it is the function used as an example in [[Development:Creating_a_web_service_client|Creating a web service client]].&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;
You will then be returned to the service functions list. Opposite each function is a &#039;Required capabilities&#039; field. Users need these capabilities to run each function. However there are exceptions - see the web service function documentation for details.&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 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 [https://docs.moodle.org/en/Manage_roles Manage roles] documentation.&lt;br /&gt;
&lt;br /&gt;
Once done, the web service should be set up. Users should be able to [[How_to_get_a_security_key|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;Settings &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 setup some specific options: IP restriction and Valid until.&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;Settings &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;/div&gt;</summary>
		<author><name>Jmouneyrac</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Using_web_services&amp;diff=93194</id>
		<title>Using web services</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Using_web_services&amp;diff=93194"/>
		<updated>2011-11-02T01:51:31Z</updated>

		<summary type="html">&lt;p&gt;Jmouneyrac: /* Alternative settings */&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;Settings &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;Settings &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 [[How_to_get_a_security_key|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;Settings &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 now, select &#039;Create group&#039; as it is the function used as an example in [[Development:Creating_a_web_service_client|Creating a web service client]].&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;
You will then be returned to the service functions list. Opposite each function is a &#039;Required capabilities&#039; field. Users need these capabilities to run each function. However there are exceptions - see the web service function documentation for details.&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 required capabilities for the web service functions. These required capabilities are listed when you add a function to the service.&lt;br /&gt;
&lt;br /&gt;
Once done, the web service should be set up. Users can [[How_to_get_a_security_key|obtain a personal security key]] and copy it in an external application.&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;Settings &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 setup some specific options: IP restriction and Valid until.&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;Settings &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;/div&gt;</summary>
		<author><name>Jmouneyrac</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Using_web_services&amp;diff=93193</id>
		<title>Using web services</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Using_web_services&amp;diff=93193"/>
		<updated>2011-11-02T01:49:38Z</updated>

		<summary type="html">&lt;p&gt;Jmouneyrac: /* Authorise only specific users */&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;Settings &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;Settings &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 [[How_to_get_a_security_key|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;Settings &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 now, select &#039;Create group&#039; as it is the function used as an example in [[Development:Creating_a_web_service_client|Creating a web service client]].&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;
You will then be returned to the service functions list. Opposite each function is a &#039;Required capabilities&#039; field. Users need these capabilities to run each function. However there are exceptions - see the web service function documentation for details.&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 required capabilities for the web service functions. These required capabilities are listed when you add a function to the service.&lt;br /&gt;
&lt;br /&gt;
Once done, the web service should be set up. Users can [[How_to_get_a_security_key|obtain a personal security key]] and copy it in an external application.&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;Settings &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 setup some specific options: IP restriction and Valid until.&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;Settings &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;
== Enable capabilities for the user==&lt;br /&gt;
The last step, and the trickiest, is to grant the right permission to the external system user. It would need the following capabilities:&lt;br /&gt;
* &amp;quot;&#039;&#039;webservice/rest:use&#039;&#039;, &#039;&#039;webservice/soap:use&#039;&#039;, &#039;&#039;webservice/xmlrpc:use&#039;&#039;, &#039;&#039;webservice/amf:use&#039;&#039;&amp;quot; matching the enabled protocols.&lt;br /&gt;
* the required capabilities by the web service functions. These required capabilities are listed when you add a function to the service.&lt;br /&gt;
As you previously created a token for the external system user, you do not need to assign &amp;quot;&#039;&#039;moodle/webservice:createtoken&#039;&#039;&amp;quot; to it.&lt;br /&gt;
For more information about roles and capabilities, read the [https://docs.moodle.org/en/Manage_roles Manage roles] documentation.&lt;/div&gt;</summary>
		<author><name>Jmouneyrac</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Using_web_services&amp;diff=93192</id>
		<title>Using web services</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Using_web_services&amp;diff=93192"/>
		<updated>2011-11-02T01:48:43Z</updated>

		<summary type="html">&lt;p&gt;Jmouneyrac: /* Authorise only specific users */&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;Settings &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;Settings &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 [[How_to_get_a_security_key|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;Settings &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 now, select &#039;Create group&#039; as it is the function used as an example in [[Development:Creating_a_web_service_client|Creating a web service client]].&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;
You will then be returned to the service functions list. Opposite each function is a &#039;Required capabilities&#039; field. Users need these capabilities to run each function. However there are exceptions - see the web service function documentation for details.&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 required capabilities for the web service functions. These required capabilities are listed when you add a function to the service.&lt;br /&gt;
&lt;br /&gt;
Once done, the web service should be set up. Users can [[How_to_get_a_security_key|obtain a personal security key]] and copy it in an external application.&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;Settings &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 the created user and click &#039;&#039;&#039;Add&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As you can see in the second screen capture, Moodle indicates if some capabilities need to be assigned to an authorised user. Moreover if you click on the authorised user you can setup some specific options: IP restriction and Valid until.&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;Settings &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;
== Enable capabilities for the user==&lt;br /&gt;
The last step, and the trickiest, is to grant the right permission to the external system user. It would need the following capabilities:&lt;br /&gt;
* &amp;quot;&#039;&#039;webservice/rest:use&#039;&#039;, &#039;&#039;webservice/soap:use&#039;&#039;, &#039;&#039;webservice/xmlrpc:use&#039;&#039;, &#039;&#039;webservice/amf:use&#039;&#039;&amp;quot; matching the enabled protocols.&lt;br /&gt;
* the required capabilities by the web service functions. These required capabilities are listed when you add a function to the service.&lt;br /&gt;
As you previously created a token for the external system user, you do not need to assign &amp;quot;&#039;&#039;moodle/webservice:createtoken&#039;&#039;&amp;quot; to it.&lt;br /&gt;
For more information about roles and capabilities, read the [https://docs.moodle.org/en/Manage_roles Manage roles] documentation.&lt;/div&gt;</summary>
		<author><name>Jmouneyrac</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Using_web_services&amp;diff=93191</id>
		<title>Using web services</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Using_web_services&amp;diff=93191"/>
		<updated>2011-11-02T01:48:26Z</updated>

		<summary type="html">&lt;p&gt;Jmouneyrac: /* Authorise only specific users */&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;Settings &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;Settings &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 [[How_to_get_a_security_key|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;Settings &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 now, select &#039;Create group&#039; as it is the function used as an example in [[Development:Creating_a_web_service_client|Creating a web service client]].&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;
You will then be returned to the service functions list. Opposite each function is a &#039;Required capabilities&#039; field. Users need these capabilities to run each function. However there are exceptions - see the web service function documentation for details.&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 required capabilities for the web service functions. These required capabilities are listed when you add a function to the service.&lt;br /&gt;
&lt;br /&gt;
Once done, the web service should be set up. Users can [[How_to_get_a_security_key|obtain a personal security key]] and copy it in an external application.&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;Settings &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;Authorised users only&#039; in the &#039;Edit&#039; link)&lt;br /&gt;
# Select the created user and click &#039;&#039;&#039;Add&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As you can see in the second screen capture, Moodle indicates if some capabilities need to be assigned to an authorised user. Moreover if you click on the authorised user you can setup some specific options: IP restriction and Valid until.&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;Settings &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;
== Enable capabilities for the user==&lt;br /&gt;
The last step, and the trickiest, is to grant the right permission to the external system user. It would need the following capabilities:&lt;br /&gt;
* &amp;quot;&#039;&#039;webservice/rest:use&#039;&#039;, &#039;&#039;webservice/soap:use&#039;&#039;, &#039;&#039;webservice/xmlrpc:use&#039;&#039;, &#039;&#039;webservice/amf:use&#039;&#039;&amp;quot; matching the enabled protocols.&lt;br /&gt;
* the required capabilities by the web service functions. These required capabilities are listed when you add a function to the service.&lt;br /&gt;
As you previously created a token for the external system user, you do not need to assign &amp;quot;&#039;&#039;moodle/webservice:createtoken&#039;&#039;&amp;quot; to it.&lt;br /&gt;
For more information about roles and capabilities, read the [https://docs.moodle.org/en/Manage_roles Manage roles] documentation.&lt;/div&gt;</summary>
		<author><name>Jmouneyrac</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Using_web_services&amp;diff=93190</id>
		<title>Using web services</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Using_web_services&amp;diff=93190"/>
		<updated>2011-11-02T01:45:36Z</updated>

		<summary type="html">&lt;p&gt;Jmouneyrac: /* Creating a service */&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;Settings &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;Settings &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 [[How_to_get_a_security_key|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;Settings &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 now, select &#039;Create group&#039; as it is the function used as an example in [[Development:Creating_a_web_service_client|Creating a web service client]].&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;
You will then be returned to the service functions list. Opposite each function is a &#039;Required capabilities&#039; field. Users need these capabilities to run each function. However there are exceptions - see the web service function documentation for details.&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 required capabilities for the web service functions. These required capabilities are listed when you add a function to the service.&lt;br /&gt;
&lt;br /&gt;
Once done, the web service should be set up. Users can [[How_to_get_a_security_key|obtain a personal security key]] and copy it in an external application.&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;Settings &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&lt;br /&gt;
# Select the created user and click &#039;&#039;&#039;Add&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As you can see in the second screen capture, Moodle indicates if some capabilities need to be assigned to an authorised user. Moreover if you click on the authorised user you can setup some specific options: IP restriction and Valid until.&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;Settings &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;
== Enable capabilities for the user==&lt;br /&gt;
The last step, and the trickiest, is to grant the right permission to the external system user. It would need the following capabilities:&lt;br /&gt;
* &amp;quot;&#039;&#039;webservice/rest:use&#039;&#039;, &#039;&#039;webservice/soap:use&#039;&#039;, &#039;&#039;webservice/xmlrpc:use&#039;&#039;, &#039;&#039;webservice/amf:use&#039;&#039;&amp;quot; matching the enabled protocols.&lt;br /&gt;
* the required capabilities by the web service functions. These required capabilities are listed when you add a function to the service.&lt;br /&gt;
As you previously created a token for the external system user, you do not need to assign &amp;quot;&#039;&#039;moodle/webservice:createtoken&#039;&#039;&amp;quot; to it.&lt;br /&gt;
For more information about roles and capabilities, read the [https://docs.moodle.org/en/Manage_roles Manage roles] documentation.&lt;/div&gt;</summary>
		<author><name>Jmouneyrac</name></author>
	</entry>
</feed>