<?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=Plemaire</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=Plemaire"/>
	<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/Special:Contributions/Plemaire"/>
	<updated>2026-04-25T20:15:01Z</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=140680</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=140680"/>
		<updated>2022-02-24T07:17:44Z</updated>

		<summary type="html">&lt;p&gt;Plemaire: /* Short file example */ Layout for rendering one line for each&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Courses}}&lt;br /&gt;
{{Note|This page is about creating courses with a text (.csv) file. If you want to upload a course backup in .mbz or .tgz format, see [[Course restore]].}}&lt;br /&gt;
==Upload courses==&lt;br /&gt;
In addition to creating new courses, the upload courses functionality may also be used to update or delete courses, or import content from another course. For information on using this functionality to create course templates, see [[Adding a new course]].&lt;br /&gt;
&lt;br /&gt;
To upload one or more courses&lt;br /&gt;
#Go to &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Courses &amp;gt; Upload courses&#039;&#039;&lt;br /&gt;
#Either drag and drop the CSV file or click the &#039;Choose a file&#039; button and select the file in the file picker&lt;br /&gt;
#Select appropriate import options carefully, then click the preview button.&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;
Note: 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;
===Short file example===&lt;br /&gt;
uploadcourse.csv:&lt;br /&gt;
&lt;br /&gt;
Note: shortname, fullname, and category are required.&lt;br /&gt;
&lt;br /&gt;
The category field takes the id of the category, with the default category Miscellaneous having id 1. Categories must already exist. If you put a category id that does not exist, you will receive a &amp;quot;Could not resolve category by ID&amp;quot; error during upload preview, and courses in that category will not be created. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
shortname,fullname,category,summary,enrolment_1,enrolment_1_role,enrolment_1_enrolperiod,role_student&amp;lt;br&amp;gt;&lt;br /&gt;
courserestored,Course restored,1,a summary,manual,student,1 month,&amp;lt;br&amp;gt;&lt;br /&gt;
courserestored2,Course restored 2,1,a summary,,,,&amp;lt;br&amp;gt;&lt;br /&gt;
courserestored3,Course restored 3,1,a summary,,,,padawan&amp;lt;br&amp;gt;&lt;br /&gt;
courserestored4,Course restored 4,1,&amp;quot;a summary, with comma&amp;quot;,manual,student,1 month,padawan&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Notice there are no spaces between the items.&lt;br /&gt;
&lt;br /&gt;
==Creating the text file==&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;
===Course information fields===&lt;br /&gt;
Most of those settings are available on the settings page of a course. Please refer to [[Course settings]] for more information. Field names must be lower-case.&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 course ID number&lt;br /&gt;
;category&lt;br /&gt;
:This is the database identifier of the category (found in the category URL) 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 (found and editable on the ‘Edit category’ page) 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 / Science-Fiction&amp;lt;/code&amp;gt;. Note that the separator must be &amp;lt;code&amp;gt;[space]/[space]&amp;lt;/code&amp;gt;. Also note that the category MUST exist, it will not be created. If you want to place the course in the top-level category &amp;quot;Movies&amp;quot;, the value to provide is: &amp;lt;code&amp;gt;Movies&amp;lt;/code&amp;gt;&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. Example 01.12.2014 (1st December 2014)&lt;br /&gt;
;enddate&lt;br /&gt;
:The time at which the course ends. Please note as with startdate that this value is passed to the PHP function [http://php.net/manual/en/function.strtotime.php strtotime] to generate a timestamp. Example 01.12.2014 (1st December 2014)&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;
; tags&lt;br /&gt;
: A comma-separated list of tags to add to the course. Existing tags will be deleted. Enclose multiple tags in quotes.&lt;br /&gt;
====Enrolment fields====&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;
; enrolment_[number]&lt;br /&gt;
:The name of the enrolment method (eg, manual, guest, self)&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 end 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;
;enrolment_[number]_password&lt;br /&gt;
:The course enrolment key&lt;br /&gt;
Note: Upload courses is not yet compatible with all [[Enrolments|enrolment methods]] (MDL-43127).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example&#039;&#039;&#039;&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;
&#039;&#039;&#039;Example of a CSV file and a description of the courses it will create&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
First, find or create the category you want to upload your courses into. Click on the category and make a note of the number at the end of the URL. Replace __ below with that number.&lt;br /&gt;
 shortname,fullname,category,enrolment_1,enrolment_1_password&lt;br /&gt;
&lt;br /&gt;
 Course 1,Course 1,__,manual,&lt;br /&gt;
&lt;br /&gt;
 Course 2,Course 2,__,self,&lt;br /&gt;
&lt;br /&gt;
 Course 3,Course 3,__,self,EnrolMe!&lt;br /&gt;
The above will create 3 courses. The course&#039;s short name and the course&#039;s full name are the same in these instances. &lt;br /&gt;
&lt;br /&gt;
Course 1 has manual enrolment only.&lt;br /&gt;
&lt;br /&gt;
Course 2 has manual enrolment and self-enrolment.&lt;br /&gt;
&lt;br /&gt;
Course 3 has manual enrolment and self-enrolment, and the self-enrolment has an enrolment key which is &amp;quot;EnrolMe!&amp;quot;&lt;br /&gt;
====Role renaming====&lt;br /&gt;
To rename some roles, using the following pattern:&lt;br /&gt;
;role_[shortname]&lt;br /&gt;
:The new name of the role &#039;&#039;[shortname]&#039;&#039;.&lt;br /&gt;
&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
 role_student: Apprentice&lt;br /&gt;
 role_teacher: Master&lt;br /&gt;
 role_mycustomrole: Jedi&lt;br /&gt;
It is worth noting that the short name for the teacher role is &#039;&#039;editingteacher&#039;&#039; and the short name for the non-editing teacher is &#039;&#039;teacher&#039;&#039;.&lt;br /&gt;
===Course action fields===&lt;br /&gt;
Those settings take precedence over the &#039;&#039;Course process&#039;&#039; parameters.&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;
(This means the full path to your course, for example &#039;&#039;/home/yourmoodle/public_html/moodle27/transfert/backup.mbz&#039;&#039; . If you are unsure of this, look at include_path in &#039;&#039;Site administration&amp;gt;Server&amp;gt;PHP info.)&#039;&#039;&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;
===Mandatory fields===&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;
===Import options===&lt;br /&gt;
To prevent unexpected behaviour, you have to specify what you want the tool to be able to do.&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;
===Course process===&lt;br /&gt;
This allows you to specify actions to be taken for every course uploaded.&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;
===Default course values===&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;
==Increasing speed==&lt;br /&gt;
When importing the content of a backup file, or another course, you are advised 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;
==See also==&lt;br /&gt;
*Demo screencast: [http://youtu.be/MzK2jb-9SwE Bulk course creation]&lt;br /&gt;
*[[Upload users]]&lt;br /&gt;
*[http://www.moodleblog.net/2013/11/24/creating-course-templates-in-moodle-2-6/ Creating course templates in Moodle 2.6] blog post by Mary Cooch&lt;br /&gt;
[[fr:Modifier des cours en lots]]&lt;br /&gt;
[[de:Kurse hochladen]]&lt;br /&gt;
[[es:Subir cursos]]&lt;br /&gt;
[[ja:コースをアップロードする]]&lt;/div&gt;</summary>
		<author><name>Plemaire</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Activities_block&amp;diff=140067</id>
		<title>Activities block</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Activities_block&amp;diff=140067"/>
		<updated>2021-04-12T13:08:04Z</updated>

		<summary type="html">&lt;p&gt;Plemaire: change french translation link to match&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Blocks}}&lt;br /&gt;
[[File:Activitiesblockexample.png]]&lt;br /&gt;
The &#039;&#039;&#039;Activities&#039;&#039;&#039; block lists the different activities and resources available in your course ([[Forums]], [[Quizzes]], [[Assignments]], [[Lessons]] and so forth) and provides links to the index page for each activity or resource.&lt;br /&gt;
&lt;br /&gt;
The activities list will grow as you add activities to your course. Therefore, the first time you enter your course, the only category that is listed is Forums. This is because one forum exists by default – the Announcements forum. &lt;br /&gt;
&lt;br /&gt;
[[es:Bloque de actividades]]&lt;br /&gt;
[[eu:Jarduerak]]&lt;br /&gt;
[[fr:Bloc_Activités]]&lt;br /&gt;
[[pl:Blok działalności]]&lt;br /&gt;
[[de:Aktivit%C3%A4ten_%28Block%29]]&lt;/div&gt;</summary>
		<author><name>Plemaire</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Server_settings&amp;diff=139708</id>
		<title>Server settings</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Server_settings&amp;diff=139708"/>
		<updated>2021-02-20T18:32:56Z</updated>

		<summary type="html">&lt;p&gt;Plemaire: change french translation link to match&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Managing a Moodle site}}&lt;br /&gt;
*[[System paths]]&lt;br /&gt;
*[[Session handling]]&lt;br /&gt;
*[[HTTP]]&lt;br /&gt;
*[[Maintenance mode]]&lt;br /&gt;
*[[Cleanup]]&lt;br /&gt;
*[[Environment]]&lt;br /&gt;
*[[Mail configuration]]&lt;br /&gt;
*[[Scheduled tasks]]&lt;br /&gt;
*[[Shell Scripts]]&lt;br /&gt;
&lt;br /&gt;
[[fr:Paramètres_du_serveur]]&lt;br /&gt;
[[de:Servereinstellungen]]&lt;br /&gt;
[[es:Configuraciones del servidor]]&lt;br /&gt;
[[it:Impostazioni Server]]&lt;/div&gt;</summary>
		<author><name>Plemaire</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=SCORM_settings&amp;diff=139707</id>
		<title>SCORM settings</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=SCORM_settings&amp;diff=139707"/>
		<updated>2021-02-19T11:07:42Z</updated>

		<summary type="html">&lt;p&gt;Plemaire: change french translation link to match&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SCORM}}&lt;br /&gt;
*This page explores in more detail the settings for the [[SCORM activity]] once you have added it to your course and also covers the Site administration settings.&lt;br /&gt;
*SCORM packages may also be added by selecting the Single activity course format when setting up a course, and then uploading or dragging/dropping the package. The same settings apply.&lt;br /&gt;
&lt;br /&gt;
Note that if you want to edit an existing SCORM pacakge, click the Edit link to its right and choose the action you wish to take, eg &#039;Edit settings&#039;.&lt;br /&gt;
==General==&lt;br /&gt;
In the Description, provide instructions for students. Check the box if you want these instructions to display on the course page.&lt;br /&gt;
==Package==&lt;br /&gt;
Drag and drop or click the icon top left to upload your SCORM package. (Note that you must not unzip the package before upload.)&lt;br /&gt;
:If your admin has added additional options in &#039;&#039;Site administration&amp;gt;Plugins&amp;gt;Activity modules&amp;gt;SCORM package&#039;&#039; then these will be available in a dropdown menu. See the section on Site settings below.&lt;br /&gt;
&lt;br /&gt;
If you access your SCORM package from a repository (such as [[File system repository]] or [[Private files]]) you can choose to create an &#039;&#039;&#039;alias/shortcut t&#039;&#039;&#039;o it and then  set an update frequency to set how often Moodle should check to see if there is an updated zip. (See [[Working with files]] for more information on setting an alias/shortcut.)&lt;br /&gt;
&lt;br /&gt;
It it possible to select the imsmanifest.xml file and have it as an alias/shortcut. To do this, you need to have  created a [[File system repository]] and, when configuring it, allowed relative files. Extract your SCORM package into a folder there. When clicking on the Add button to add your SCORM package, select the file system repository folder with your SCORM package and browse for and select the imsmanfest.xml file, ensuring you  the option to create an alias/shortcut to the file. Save and display. (Note this method is only currently supported by the File system repository.)&lt;br /&gt;
&lt;br /&gt;
===Appearance===&lt;br /&gt;
;Display package&lt;br /&gt;
:Choose from current or new window. Note that if you choose a  new window, students need to ensure pop ups are enabled. &lt;br /&gt;
;Display course structure on entry page&lt;br /&gt;
:If this is enabled then the table of contents of the package will be displayed when the students clicks to access the package.&lt;br /&gt;
;Show Navigation&lt;br /&gt;
:This setting determines whether the navigation buttons are shown or not.&lt;br /&gt;
#No -they are hidden&lt;br /&gt;
#Under content - they are displayed underneath the SCORM package&lt;br /&gt;
#Floating - the navigation buttons are floating (with options to choose the position from the left and top)&lt;br /&gt;
;Display attempt status&lt;br /&gt;
:You can choose whether to display a summary of the student&#039;s attempts on the entry page, on their [[Dashboard]] page or both. This setting is helpful when debugging grading issues - working out why a user got a certain grade.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The following settings become visible when &amp;quot;Show more&amp;quot; is clicked:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====Width====&lt;br /&gt;
Stage size width as a css value, either % or pixels. Default is 100%. You can change to a different percentage by putting a % symbol after the number (ex. 80%). You can also set to a pixels value by entering a number higher than 100 (ex. 800). &lt;br /&gt;
====Height====&lt;br /&gt;
Stage size height as a css value, either % or pixels. Default is 500 pixels. You can change to a percentage by putting a % symbol after the number (ex. 80%). You can also set to a pixels value by entering a number higher than 100 (ex. 800). &lt;br /&gt;
&lt;br /&gt;
====Options====&lt;br /&gt;
There is a series of check boxes for:Allow the window to be resized ad scrolled, displaying directory links, location bar, menu bar, toolbar and/or status.&lt;br /&gt;
*&#039;&#039;&#039;Student skip content structure page&#039;&#039;&#039; - never, first access, always&lt;br /&gt;
*&#039;&#039;&#039;Disable preview mode&#039;&#039;&#039; - If this option is set to Yes, the Preview button in the view page of a SCORM/AICC Package activity will be hidden. The student can choose to preview (browse mode) the activity or attempt it in the normal mode. When a Learning Object is completed in preview (browse) mode, it&#039;s marked with browsed icon&lt;br /&gt;
*&#039;&#039;&#039;Display course structure in player&#039;&#039;&#039;&lt;br /&gt;
==Availability==&lt;br /&gt;
Choose here the dates you wish the SCORM package to be available to students.&lt;br /&gt;
==Grade==&lt;br /&gt;
;Grading method&lt;br /&gt;
** Learning Objects - This mode shows the number of completed/passed Learning Objects for the activity. The max value is the number of Package&#039;s Learning Objects. &#039;&#039;Tip:&#039;&#039; If your SCORM package does report cmi.core.lesson_status, and does not report cmi.core.score.raw, then you should use this setting. &lt;br /&gt;
** Highest grade - The grade page will display the highest score obtained by users in all passed Learning Objects. &#039;&#039;Tip:&#039;&#039; If your SCORM package does report cmi.core.score.raw, and does not report cmi.core.lesson_status, then you should use this setting, Average grade, or Sum grade. &lt;br /&gt;
** Average grade - If you choose this mode Moodle will calculate the average of all scores.&lt;br /&gt;
**Sum grade - With this mode all the scores will be added.&lt;br /&gt;
;Maximum grade&lt;br /&gt;
:Not applicable if Grading Method is Learning objects. Usual setting is 100. If your SCO &#039;s high score is something other than 100, you should adjust this value appropriately. When grading Method is one of the score settings, then the gradebook grade is package score divided by this number.&lt;br /&gt;
==Attempts management==&lt;br /&gt;
;Number of attempts&lt;br /&gt;
:Defines the number of attempts permitted to users. It works only with SCORM 1.2 and AICC packages. SCORM2004 has its own max attempts definition. &lt;br /&gt;
** The option to start a new attempt is provided by a checkbox above the &#039;&#039;&#039;Enter&#039;&#039;&#039; button on the content structure page, so be sure you&#039;re providing access to that page if you want to allow more than one attempt.&lt;br /&gt;
** An attempt is not complete until the cmi.core.lesson_status for the attempt is set to either &#039;completed&#039; or &#039;passed&#039;. After that, the &#039;&#039;&#039;Start new attempt&#039;&#039;&#039; checkbox is available to the learner.  &lt;br /&gt;
;Attempts grading&lt;br /&gt;
:When you permit multiple attempts for students, you can choose how to record the result in gradebook by first, last, average or highest settings.&lt;br /&gt;
* &#039;&#039;&#039;Display attempt status&#039;&#039;&#039; - If enabled, scores and grades for attempts are displayed on the SCORM outline page. This setting makes the block display more info to the user on the entry page to the SCORM and in the course overview block - if you turn it off it will display less info. This setting is helpful when debugging grading issues - working out why a user got a certain grade.&lt;br /&gt;
;Force new attempt&lt;br /&gt;
:If this is enabled then every time the student accesses the package, it will count as a new attempt.&lt;br /&gt;
;Lock after final attempt&lt;br /&gt;
:If this is enabled then once a student has used up all their attempts, they can no longer access the SCORM package.&lt;br /&gt;
==Compatibility settings==&lt;br /&gt;
;Auto-continue&lt;br /&gt;
:For SCORM packages that contain multiple learning objects (or SCO&#039;s) and Auto-continue is set to Yes, when a Learning Object calls the &amp;quot;close communication&amp;quot; method the next available object is launched automatically.If it is set to No, the users must use the navigation provided to continue to the next object. Many SCORM packages only contain a single learning object (or SCO) so this setting does not apply.&lt;br /&gt;
:&#039;&#039;TIP:&#039;&#039; If your package contains multiple branches Auto-Continue will only move from one object to the next within the same topic.&lt;br /&gt;
;Force completed&lt;br /&gt;
:If this is enabled then the status of the current attempt is set to &amp;quot;complete&amp;quot;. Note that this only applies to SCORM 1.2 packages and is useful if the SCORM package does not handle revisiting an attempt correctly, in review or browse mode, or otherwise incorrectly issues the completion status.&lt;br /&gt;
;Auto commit&lt;br /&gt;
:Some SCORM packages don&#039;t explicitly call Commit() regularly for whatever reason so progress is not stored in the database. This patch will Commit() the data from the SCORM package 60 seconds after the values are set, unless the package Commit()s sooner.&lt;br /&gt;
;Mastery score overrides status&lt;br /&gt;
:If this setting is enabled and a mastery score is provided within your package, when LMSFinish is called and a raw score has been set, if the raw score is lower than the mastery score, the lesson status will be overridden and set to &amp;quot;failed&amp;quot;. More information on this behaviour is available in the [[SCORM_FAQ#Moodle_changes_cmi.core.lesson_status_from_.22completed.22_or_.22passed.22_to_.22failed.22|SCORM FAQ:Moodle changes cmi.core.lesson_status from completed or passed to failed]]&lt;br /&gt;
&lt;br /&gt;
==Other settings==&lt;br /&gt;
Depending on what is enabled for your site and course, you may also need to explore [[Common  module settings]], [[Restrict access| Restrict access]],  [[Activity completion]], [[Tags]] and [[Competencies]]&lt;br /&gt;
&lt;br /&gt;
If your SCORM package doesn&#039;t display as you wish, check the site settings below:&lt;br /&gt;
&lt;br /&gt;
==Site administration settings==&lt;br /&gt;
&lt;br /&gt;
These options are available to the site admin via &#039;&#039;Site administration &amp;gt; Plugins &amp;gt; Activity Modules &amp;gt; SCORM Package&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
===Default Value Settings===&lt;br /&gt;
Many of the settings available in the SCORM Package administration simply set the default value for the SCORM activity module setup options provided within courses. Edit these settings to save yourself time when adding large numbers of packages, or to establish a standard for presentation across the site.&lt;br /&gt;
&lt;br /&gt;
===Other Important Settings===&lt;br /&gt;
The following options provided which &#039;&#039;&#039;do not&#039;&#039;&#039; simply set a default value for the SCORM activity editing page view. &lt;br /&gt;
; Auto-update frequency&lt;br /&gt;
If not using a standard SCORM package uploaded using the filepicker and the SCORM package is hosted outside your Moodle installation the option to auto-update the package will be available - you can elect to have the package updated on every entry to the package or daily via the Moodle cron.&lt;br /&gt;
;Synchronization time&lt;br /&gt;
&lt;br /&gt;
;Enable SCORM 1.2 standard mode &lt;br /&gt;
:If this setting is disabled, then it will be possible to exceed the allowed amount of stored data for SCORM 1.2 packages. Many SCORM packages go over the 4096 characters limit and while SCORM 2004 allows a higher number of characters, it is not supported. This setting will mean users can allow their 1.2 packages to store more data. When disabled it extends the items restricted to 256 and 4096 by the SCORM 1.2 spec to 64000 (the highest value allowed in the SCORM 2004 spec)&lt;br /&gt;
;Enable external package type&lt;br /&gt;
:If selected, presents a text field to paste a URL to a remote imsmanifest.xml (in an unzipped remote SCORM package), as well as the file picker option provided by default. Note that the content is played from the designated location, and not unpacked into the Moodle file system. So if the base url is different from your moodle url then browser security will block cross-domain communcation and no grades/tracking information will be passed back to Moodle.&lt;br /&gt;
;Enable downloaded package type&lt;br /&gt;
:If selected, presents a text field to paste a URL to a remote package.zip SCORM package. Package is downloaded and unzipped into the Moodle file system.&lt;br /&gt;
;Enable IMS package type&lt;br /&gt;
:Enables a package to be selected from within an IMS repository&lt;br /&gt;
;Force users to enable JavaScript&lt;br /&gt;
:Since the SCORM API uses JavaScript to save data to Moodle, this is a great idea!&lt;br /&gt;
;Activate API debug and tracing (set the capture mask with apidebugmask)&lt;br /&gt;
:Turns on debugging for SCORM activities. In Moodle 2 you no longer have to also turn on debugging in the developer options. &lt;br /&gt;
;API debug capture mask&lt;br /&gt;
:.* will debug for admin user only: You can use the mask to enable debugging under certain conditions. For example, if you are logged in using the admin user (username admin) you can set the api mask to: &#039;&#039;&#039;admin.*&#039;&#039;&#039; Users not logged in as admin will not see the debugging log. The &amp;quot;Default&amp;quot; api mask is &#039;&#039;&#039;.*&#039;&#039;&#039; which translates roughly to &#039;&#039;&#039;everybody&#039;&#039;&#039;.&lt;br /&gt;
;Enable direct AICC url&lt;br /&gt;
:Makes it easier to connect to externally hosted AICC content as the teacher doesn&#039;t have to create an AICC package and is able to link directly to the external AICC url.&lt;br /&gt;
;Enable external AICC HACP&lt;br /&gt;
:The SCORM activity can also support external AICC HACP Communication where the AICC package is hosted on an external content providers site and passes back http requests directly from the external server instead of within the users web browser session - this is disabled by default.&lt;br /&gt;
;AICC pass numeric user id&lt;br /&gt;
&lt;br /&gt;
; Protect package downloads. &lt;br /&gt;
:This is disabled by default, meaning packages can always be downloaded (eg for offline mobile use.) If this is enabled then only users with the capability course:manageactivities can download the package.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [[:dev:SCORM_schema |SCORM Schema]] for developers&lt;br /&gt;
&lt;br /&gt;
[[de:Lernpaket konfigurieren]]&lt;br /&gt;
[[fr:Paramètres_SCORM]]&lt;br /&gt;
[[ja:SCORMを追加/編集する]]&lt;br /&gt;
[[es:Configuraciones del SCORM]]&lt;/div&gt;</summary>
		<author><name>Plemaire</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Scheduled_tasks&amp;diff=139666</id>
		<title>Scheduled tasks</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Scheduled_tasks&amp;diff=139666"/>
		<updated>2021-02-10T13:41:01Z</updated>

		<summary type="html">&lt;p&gt;Plemaire: change french translation link to match&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server settings}}&lt;br /&gt;
==Managing scheduled tasks==&lt;br /&gt;
An administrator can schedule routine tasks very precisely from &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Server &amp;gt; Scheduled tasks.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Note that you still need to run the [[Cron|CRON scripts]] (\admin\cli\cron.php or http:\\yoursite\admin\cron.php) at regular intervals. It is recommended that the cron is run every minute.&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:scheduledtasks1.png|thumb|Scheduled tasks]]&lt;br /&gt;
|[[File:scheduledtasks2.png|thumb|Editing a scheduled task]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Clicking the edit icon allows the administrator to specify the minute/hour/day/month or day of the week the task is to be run. It is also possible to reset the task to its default setting or disable it completely.&lt;br /&gt;
&lt;br /&gt;
The column &#039;Next run&#039; provides information on whether a plugin or a task is disabled (as well as the date that a task will next run).&lt;br /&gt;
&lt;br /&gt;
==Format for scheduling tasks==&lt;br /&gt;
&lt;br /&gt;
When typing into the fields, the format is the same as for Unix cron. Examples are as follows and are according to which field you are editing:&lt;br /&gt;
&lt;br /&gt;
 * is every minute, hour, day, month&lt;br /&gt;
 */2 is every two minutes, every two hours or every second day&lt;br /&gt;
 2-10 is every minute between two and ten past the hour or every hour between 2 and 10 am &lt;br /&gt;
 0 is every Sunday&lt;br /&gt;
 1 is every Monday or every January&lt;br /&gt;
 2,5 is the second and 5th of the month, or February and May, or Tuesday and Friday.&lt;br /&gt;
&lt;br /&gt;
==Fail delay==&lt;br /&gt;
&lt;br /&gt;
If you&#039;re trying to debug a cron task, you may notice the Fail Delay becomes populated with a number. This is the time in seconds the cron will delay running the task. To sidestep this problem for development purposes, take a look at the Scheduled Tasks section here: [[Administration_via_command_line#Scheduled_tasks]].&lt;br /&gt;
&lt;br /&gt;
==Running individual tasks==&lt;br /&gt;
&lt;br /&gt;
To be able to run individual scheduled tasks via &#039;Run now&#039; links on the scheduled tasks page, &#039;Allow &#039;Run now&#039; for scheduled tasks&#039; (tool_task | enablerunnow) in Site administration / Security / Site security settings should be enabled AND  &#039;Path to PHP CLI&#039; (pathtophp) in Site administration / Server / System paths should be set.&lt;br /&gt;
&lt;br /&gt;
[[File:examplescheduledtasks.png]]&lt;br /&gt;
&lt;br /&gt;
==Tasks running now==&lt;br /&gt;
{{New features}}&lt;br /&gt;
Currently running tasks may be viewed from Site administration &amp;gt; Server &amp;gt; Tasks &amp;gt;Tasks running now&lt;br /&gt;
[[File:TasksRunningNow.png|600px|center]]&lt;br /&gt;
&lt;br /&gt;
==Launching a task from CLI==&lt;br /&gt;
You can also launch individual task from Command Line Interface (see [[Administration_via_command_line#Scheduled_tasks|Administration via command line]]).&lt;br /&gt;
&lt;br /&gt;
[[es:Trabajos agendados]]&lt;br /&gt;
[[de:Geplante Vorgänge]]&lt;br /&gt;
[[fr:Tâches programmées]]&lt;/div&gt;</summary>
		<author><name>Plemaire</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Administration_via_command_line&amp;diff=138164</id>
		<title>Administration via command line</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Administration_via_command_line&amp;diff=138164"/>
		<updated>2020-08-20T10:51:12Z</updated>

		<summary type="html">&lt;p&gt;Plemaire: /* Get and set configuration values */ more specifics examples&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Installing Moodle}}&lt;br /&gt;
==Running CLI scripts==&lt;br /&gt;
If you have shell access to your web server, you may find various CLI (command line interface) scripts useful during Moodle administration. Core admin CLI tools are located in the &amp;lt;code&amp;gt;admin/cli/*&amp;lt;/code&amp;gt; folder. Other plugins provide their CLI functionality via scripts in their own cli folder. For example, the enrol_db sync script is located in &amp;lt;code&amp;gt;enrol/db/cli/&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
To avoid problems with access control, you should run them as the owner of the web server process. It is especially important for CLI installation and upgrade as they create new files in moodledata directory and the web server has to have write access to them. In Linux distributions, the user that runs the web server is usually apache or wwrun or httpd or something similar. As a root, you will probably want to execute Moodle CLI scripts like this:&lt;br /&gt;
&lt;br /&gt;
    $ cd /path/to/your/moodle/dir&lt;br /&gt;
    $ sudo -u apache /usr/bin/php admin/cli/somescript.php --params&lt;br /&gt;
&lt;br /&gt;
Most of the scripts accept common --help (or -h) parameter to display the full usage information, for example:&lt;br /&gt;
&lt;br /&gt;
    $ sudo -u apache /usr/bin/php admin/cli/install.php --help&lt;br /&gt;
&lt;br /&gt;
{{Note|These scripts are supposed to be run under the identity of the web server user. Examples on this page use the &amp;lt;tt&amp;gt;apache&amp;lt;/tt&amp;gt; user for illustration. The particular value depends on your OS distribution and local set-up. Typical values may be &amp;lt;tt&amp;gt;apache&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;www-data&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;httpd&amp;lt;/tt&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
== Upgrading ==&lt;br /&gt;
&lt;br /&gt;
Moodle can be upgraded from the command line. As with the installation script, there is either interactive or non-interactive mode of the upgrade. The script itself does not put the site into the maintenance mode, you have to do it on your own. Also, the script does not backup any data (if you read this page, you probably have some own scripts to backup your moodledata and the database, right?)&lt;br /&gt;
&lt;br /&gt;
    $ sudo -u apache /usr/bin/php admin/cli/upgrade.php&lt;br /&gt;
&lt;br /&gt;
Upgrading via command line is a very comfortable way of Moodle upgrade if you use Git checkout of the Moodle source code (see [[Git for Administrators]]). See the following procedure how to upgrade your site within several seconds to the most recent version while preserving your eventual local customizations tracked in git repository:&lt;br /&gt;
&lt;br /&gt;
    $ cd /var/www/sites/moodle/htdocs/&lt;br /&gt;
    $ sudo -u apache /usr/bin/php admin/cli/maintenance.php --enable&lt;br /&gt;
    $ git pull&lt;br /&gt;
    $ sudo -u apache /usr/bin/php admin/cli/upgrade.php&lt;br /&gt;
    $ sudo -u apache /usr/bin/php admin/cli/maintenance.php --disable&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
There are two modes of installing Moodle from the command line. In interactive mode, the install script asks you for all data needed to properly set up new Moodle site. In non-interactive mode, you must provide all required data as the script parameters and then the new site is installed silently. The parameters can be passed in the interactive mode, too. The provided values are then used as the default values during the interactive session.&lt;br /&gt;
&lt;br /&gt;
    $ sudo -u apache /usr/bin/php admin/cli/install.php --lang=cs&lt;br /&gt;
&lt;br /&gt;
If your arguments contain some specials characters for Linux based systems, don&#039;t forget to &#039;&#039;escape&#039;&#039; them with a backslash. For example, if you want to create an admin with &#039;&#039;pa$sword&#039;&#039; as password you should wrote &#039;&#039;pa\$sword&#039;&#039; instead!&lt;br /&gt;
&lt;br /&gt;
If required, the database install may be skipped, with just config.php populated.&lt;br /&gt;
&lt;br /&gt;
   $ sudo -u apache /usr/bin/php admin/cli/install.php --skip-database&lt;br /&gt;
&lt;br /&gt;
== Maintenance mode ==&lt;br /&gt;
&lt;br /&gt;
To switch your site into the maintenance mode via CLI, you can use&lt;br /&gt;
&lt;br /&gt;
    $ sudo -u apache /usr/bin/php admin/cli/maintenance.php --enable&lt;br /&gt;
&lt;br /&gt;
To turn maintenance mode off, execute the same script with the --disable parameter:&lt;br /&gt;
&lt;br /&gt;
    $ sudo -u apache /usr/bin/php admin/cli/maintenance.php --disable&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t want to enable maintenance mode immediately, but show a countdown to your users, execute the same script with the --enablelater parameter and the number of minutes which the countdown should run:&lt;br /&gt;
&lt;br /&gt;
    $ sudo -u apache /usr/bin/php admin/cli/maintenance.php --enablelater=10&lt;br /&gt;
&lt;br /&gt;
This script will also create and remove the climaintenance.html file for &amp;quot;Offline&amp;quot; mode.&lt;br /&gt;
&lt;br /&gt;
== Offline mode ==&lt;br /&gt;
&lt;br /&gt;
In some situations, you may want to switch your Moodle site into offline mode so that it is not accessible via the web but you can not stop the web server completely (typically because there are other web pages and applications running there). If a file called &amp;lt;code&amp;gt;climaintenance.html&amp;lt;/code&amp;gt; exists in the root folder of moodledata directory, Moodle will automatically display the contents of that file instead of any other page.&lt;br /&gt;
&lt;br /&gt;
    $ cd /var/www/sites/moodle/moodledata/&lt;br /&gt;
    $ echo &#039;&amp;amp;lt;h1&amp;amp;gt;Sorry, maintenance in progress&amp;amp;lt;/h1&amp;amp;gt;&#039; &amp;amp;gt; climaintenance.html&lt;br /&gt;
&lt;br /&gt;
You can prepare a nice formatted HTML page to inform your users about the server being down and keep in the moodledata directory under a name like &amp;lt;code&amp;gt;climaintenance.off&amp;lt;/code&amp;gt; and rename it to the &amp;lt;code&amp;gt;climaintenance.html&amp;lt;/code&amp;gt; if needed.&lt;br /&gt;
&lt;br /&gt;
== Custom site defaults ==&lt;br /&gt;
&lt;br /&gt;
During the install and upgrade via CLI, Moodle sets the administration variables to the default values. You can use different defaults. See MDL-17850 for details. Shortly, all you need to do is to add a file &amp;lt;code&amp;gt;local/defaults.php&amp;lt;/code&amp;gt; into your Moodle installation. The format of the file is like&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
$defaults[&#039;pluginname&#039;][&#039;settingname&#039;] = &#039;settingvalue&#039;; // for plugins&lt;br /&gt;
$defaults[&#039;moodle&#039;][&#039;settingname&#039;] = &#039;settingvalue&#039;;     // for core settings&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These defaults are used during install, upgrade and are also displayed as defaults on Site administration pages.&lt;br /&gt;
&lt;br /&gt;
== Reset user password ==&lt;br /&gt;
&lt;br /&gt;
If you happen to forget your admin password (or you want to set a password for any other user on the site), you can use reset_password.php script. The script sets the correctly salted password for the given user.&lt;br /&gt;
&lt;br /&gt;
    $ sudo -u apache /usr/bin/php admin/cli/reset_password.php&lt;br /&gt;
&lt;br /&gt;
== MySQL storage engine conversion ==&lt;br /&gt;
&lt;br /&gt;
If you run your Moodle site with MySQL database backend and use the default MyISAM as the storage engine for your tables, you may want to convert them to use some more reliable engine like InnoDB (actually, you should want to switch to PostgreSQL ;-) anyway).&lt;br /&gt;
&lt;br /&gt;
    $ sudo -u apache /usr/bin/php admin/cli/mysql_engine.php --engine=InnoDB&lt;br /&gt;
&lt;br /&gt;
==Converting InnoDB tables to Barracuda==&lt;br /&gt;
&lt;br /&gt;
Sites using MySQL with database tables using Antelope as the file format are recommended to convert the tables to the Barracuda file format.&lt;br /&gt;
&lt;br /&gt;
This is because tables using Antelope as the file format cannot handle more than 10 text columns. This file formats only supports &#039;&#039;compact&#039;&#039; and &#039;&#039;redundant&#039;&#039; row formats for backward compatibility reasons. This may cause a problem on larger sites when restoring a course, in which case the following error will be displayed: &lt;br /&gt;
&lt;br /&gt;
 Row size too large (&amp;gt;8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help.&lt;br /&gt;
&lt;br /&gt;
Barracuda is the newest innoDB file format. In addition to supporting &#039;&#039;compact&#039;&#039; and &#039;&#039;redundant&#039;&#039; row formats, Barracuda also supports &#039;&#039;compressed&#039;&#039; and &#039;&#039;dynamic&#039;&#039; row formats. &lt;br /&gt;
&lt;br /&gt;
However, converting tables to Barracuda is only recommended, and not required, since not all MySQL users are affected. (It may only be a problem for larger sites.)&lt;br /&gt;
&lt;br /&gt;
===Tool for converting tables===&lt;br /&gt;
&lt;br /&gt;
A command line tool is included in Moodle for converting tables to Barracuda.&lt;br /&gt;
&lt;br /&gt;
To view tables requiring conversion, use the list option:&lt;br /&gt;
&lt;br /&gt;
 $ php admin/cli/mysql_compressed_rows.php --list&lt;br /&gt;
&lt;br /&gt;
Here is an example output:&lt;br /&gt;
&lt;br /&gt;
 mdl_data                            Compact     (needs fixing) &lt;br /&gt;
 mdl_data_fields                     Compact     (needs fixing)&lt;br /&gt;
 mdl_enrol_paypal                    Compact     (needs fixing)&lt;br /&gt;
&lt;br /&gt;
To proceed with the conversion, run the command using the fix option:&lt;br /&gt;
&lt;br /&gt;
 $ php admin/cli/mysql_compressed_rows.php --fix&lt;br /&gt;
&lt;br /&gt;
Successful table conversion will be reported in the output, for example:&lt;br /&gt;
&lt;br /&gt;
 mdl_data                   ... Compressed&lt;br /&gt;
 mdl_data_fields            ... Compressed&lt;br /&gt;
 mdl_enrol_paypal           ... Compressed&lt;br /&gt;
&lt;br /&gt;
Please note that the commands must be executed on your moodle directory. Once tables are fixed, the warning message will no longer be displayed.&lt;br /&gt;
 &lt;br /&gt;
For further information on InnoDB file formats see the [http://dev.mysql.com/doc/innodb/1.1/en/glossary.html#glos_antelope MySQL InnoDB glossary - Antelope] and the [http://dev.mysql.com/doc/innodb/1.1/en/glossary.html#glos_barracuda MySQL InnoDB glossary - Barracuda].&lt;br /&gt;
&lt;br /&gt;
If you get errors due to having insufficient privileges to run these commands (this is quite likely) then the easiest solution is to generate the required SQL commands using,&lt;br /&gt;
&lt;br /&gt;
 $ php admin/cli/mysql_compressed_rows.php --showsql&lt;br /&gt;
&lt;br /&gt;
You can then copy the generated SQL into your mysql client running as the &#039;root&#039; user.&lt;br /&gt;
&lt;br /&gt;
==Converting to the new character set and collation==&lt;br /&gt;
&lt;br /&gt;
 $ php admin/cli/mysql_collation.php --collation=utf8mb4_unicode_ci&lt;br /&gt;
&lt;br /&gt;
== Running cron via command line ==&lt;br /&gt;
&lt;br /&gt;
In versions 1.x, you could execute admin/cron.php either from command line or via the web. Since Moodle 2.0, only admin/cli/cron.php script can be run via command line.&lt;br /&gt;
&lt;br /&gt;
== Scheduled tasks ==&lt;br /&gt;
&lt;br /&gt;
Scheduled tasks are automatically run by the cron script, but the specific tasks which run on each cron iteration are determined by the scheduled tasks configuration. It is possible to override the scheduled tasks configuration and run a single scheduled task immediately using the admin/tool/task/cli/schedule_task.php script. &lt;br /&gt;
&lt;br /&gt;
This script accepts the following arguments:&lt;br /&gt;
&lt;br /&gt;
 --list - list all the known scheduled tasks. The tasks are listed by the class name used to run the task. This class name is required as the argument to the next option in order to run a specific task immediately.&lt;br /&gt;
&lt;br /&gt;
 --execute=&amp;lt;task&amp;gt; - Runs a single scheduled task immediately - regardless of scheduling settings. This will even run disabled tasks. Tasks will still use locking to prevent concurrent execution of the same task - even on clusters. The format of the &amp;lt;task&amp;gt; argument must be the same as returned by the --list option above.&lt;br /&gt;
&lt;br /&gt;
 --showsql - Shows sql queries before they are execute&lt;br /&gt;
&lt;br /&gt;
 --showdebugging - Shows developer debugging info&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; You must escape the &amp;quot;\&amp;quot; with an extra \ when using the --execute command. Take the following for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;php admin/tool/task/cli/schedule_task.php --list&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will return something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
== List of scheduled tasks (http://yourserver.com/moodle) ==&lt;br /&gt;
\enrol_imsenterprise\task\cron_task                10 * * * * *      ASAP&lt;br /&gt;
\logstore_legacy\task\cleanup_task                 * 5 * * * *       ASAP&lt;br /&gt;
\logstore_standard\task\cleanup_task               * 4 * * * *       Wednesday, November 12, 2014, 4:35 AM&lt;br /&gt;
\mod_forum\task\cron_task                          * * * * * *       ASAP&lt;br /&gt;
\core\task\automated_backup_task                   50 * * * * *      ASAP&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To run the first task in that list, you would execute&lt;br /&gt;
&lt;br /&gt;
 php admin/tool/task/cli/schedule_task.php --execute=&#039;\enrol_imsenterprise\task\cron_task&#039;&lt;br /&gt;
&lt;br /&gt;
Be aware of the single quotes. Without them, you would need to use double backlashes to avoid escaping by the shell.&lt;br /&gt;
&lt;br /&gt;
==Database transfer==&lt;br /&gt;
&lt;br /&gt;
A command line script for [[Database transfer]] may be found in &#039;&#039;admin/tool/dbtransfer/cli/migrate.php&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==Purge caches==&lt;br /&gt;
&lt;br /&gt;
You can purge caches using this script:&lt;br /&gt;
&lt;br /&gt;
  php admin/cli/purge_caches.php&lt;br /&gt;
&lt;br /&gt;
==Kill all sessions==&lt;br /&gt;
If needed for administrative reasons, you can kill all user sessions using this script:&lt;br /&gt;
&lt;br /&gt;
 php admin/cli/kill_all_sessions.php&lt;br /&gt;
&lt;br /&gt;
As a result, all users will be logged out from Moodle.&lt;br /&gt;
&lt;br /&gt;
==Fix course / module sequences==&lt;br /&gt;
&lt;br /&gt;
In rare cases (such as after upgrading from a very old version of Moodle), the course / section / module sequence data can be out of sync. This can cause various problems for affected courses, such as sections not appearing, backups failing, pages not displaying etc. There is a specific check to check for errors caused by this problem, and to fix the data in the database if they are found. To run this script please use the command below:&lt;br /&gt;
&lt;br /&gt;
  php admin/cli/fix_course_sequence.php -c=* --fix&lt;br /&gt;
&lt;br /&gt;
This will check every course in Moodle and report which ones had errors and were fixed.&lt;br /&gt;
&lt;br /&gt;
==Fix orphaned question categories==&lt;br /&gt;
&lt;br /&gt;
When a quiz is created, a new question category for the quiz is automatically created. In versions of Moodle prior to 2.9.1, if the quiz is deleted, the question category and any questions in the category remain in database. These orphaned question categories may be fixed by running the admin/cli/fix_orphaned_question_categories.php script with the --fix option.&lt;br /&gt;
&lt;br /&gt;
==Search and replace text==&lt;br /&gt;
&lt;br /&gt;
This script can be used to search and replace text throughout the whole database. Use carefully and backup first always. More info in [[Search and replace tool]].&lt;br /&gt;
&lt;br /&gt;
  php admin/tool/replace/cli/replace.php --search=//oldsitehost --replace=//newsitehost&lt;br /&gt;
&lt;br /&gt;
==Build theme CSS cache==&lt;br /&gt;
&lt;br /&gt;
If Moodle is not running in theme designer mode it will keep a copy of the compiled CSS on local disk and serve that to the browser when it requests a page. If there isn&#039;t a copy on local disk then a copy will be built the first time a page within Moodle is requested. &lt;br /&gt;
&lt;br /&gt;
With this script you can pre-compile the cached CSS files for themes within Moodle to avoid having a user wait for the theme to compile during the first page request.&lt;br /&gt;
&lt;br /&gt;
  php admin/cli/build_theme_css.php --themes=boost&lt;br /&gt;
&lt;br /&gt;
==Get and set configuration values==&lt;br /&gt;
&lt;br /&gt;
Displays the current value of the given setting, or set the given setting to the specified value.&lt;br /&gt;
&lt;br /&gt;
 $ php admin/cli/cfg.php [--component=&amp;lt;componentname&amp;gt;] [--json] [--shell-arg]&lt;br /&gt;
 $ php admin/cli/cfg.php --name=&amp;lt;configname&amp;gt; [--component=&amp;lt;componentname&amp;gt;] [--shell-arg] [--no-eol]&lt;br /&gt;
 $ php admin/cli/cfg.php --name=&amp;lt;configname&amp;gt; [--component=&amp;lt;componentname&amp;gt;] --set=&amp;lt;value&amp;gt;&lt;br /&gt;
 $ php admin/cli/cfg.php --name=&amp;lt;configname&amp;gt; [--component=&amp;lt;componentname&amp;gt;] --unset&lt;br /&gt;
 $ php admin/cli/cfg.php [--help|-h]&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
 $ php admin/cli/cfg.php --name=langmenu&lt;br /&gt;
will display the value of &#039;&#039;Display language menu&#039;&#039; in &#039;&#039;Site administration &amp;gt; Language &amp;gt; Language settings&#039;&#039; (0 for &#039;&#039;No&#039;&#039; or 1 for &#039;&#039;Yes&#039;&#039;).&lt;br /&gt;
 $ php cfg.php --name=maxsizetodownload --component=folder&lt;br /&gt;
will display the value of &#039;&#039;Maximum folder download size (MB)&#039;&#039; accessible from &#039;&#039;Site administration &amp;gt; Plugins &amp;gt; Activity modules &amp;gt; Folder&#039;&#039;.&lt;br /&gt;
 $ php admin/cli/cfg.php --name=langmenu --set=0&lt;br /&gt;
will disable the &#039;&#039;Language menu&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* MDL-35736 - Manage plugins via command line&lt;br /&gt;
* MDL-36237 - Resort course list via CLI&lt;br /&gt;
* [http://moosh-online.com/ MOOSH] - MOOdle SHell. It is a commandline tool that will allow you to perform most common Moodle tasks.&lt;br /&gt;
&lt;br /&gt;
[[fr:Administration en ligne de commande]]&lt;br /&gt;
[[de:Administration über Kommandozeile]]&lt;br /&gt;
[[es:Administración por línea de comando]]&lt;br /&gt;
[[it:Amministrazione via linea di comando]]&lt;br /&gt;
[[ja:コマンドライン経由の管理]]&lt;/div&gt;</summary>
		<author><name>Plemaire</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Administration_via_command_line&amp;diff=137791</id>
		<title>Administration via command line</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Administration_via_command_line&amp;diff=137791"/>
		<updated>2020-08-02T17:58:59Z</updated>

		<summary type="html">&lt;p&gt;Plemaire: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Installing Moodle}}&lt;br /&gt;
==Running CLI scripts==&lt;br /&gt;
If you have shell access to your web server, you may find various CLI (command line interface) scripts useful during Moodle administration. Core admin CLI tools are located in the &amp;lt;code&amp;gt;admin/cli/*&amp;lt;/code&amp;gt; folder. Other plugins provide their CLI functionality via scripts in their own cli folder. For example, the enrol_db sync script is located in &amp;lt;code&amp;gt;enrol/db/cli/&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
To avoid problems with access control, you should run them as the owner of the web server process. It is especially important for CLI installation and upgrade as they create new files in moodledata directory and the web server has to have write access to them. In Linux distributions, the user that runs the web server is usually apache or wwrun or httpd or something similar. As a root, you will probably want to execute Moodle CLI scripts like this:&lt;br /&gt;
&lt;br /&gt;
    $ cd /path/to/your/moodle/dir&lt;br /&gt;
    $ sudo -u apache /usr/bin/php admin/cli/somescript.php --params&lt;br /&gt;
&lt;br /&gt;
Most of the scripts accept common --help (or -h) parameter to display the full usage information, for example:&lt;br /&gt;
&lt;br /&gt;
    $ sudo -u apache /usr/bin/php admin/cli/install.php --help&lt;br /&gt;
&lt;br /&gt;
{{Note|These scripts are supposed to be run under the identity of the web server user. Examples on this page use the &amp;lt;tt&amp;gt;apache&amp;lt;/tt&amp;gt; user for illustration. The particular value depends on your OS distribution and local set-up. Typical values may be &amp;lt;tt&amp;gt;apache&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;www-data&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;httpd&amp;lt;/tt&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
== Upgrading ==&lt;br /&gt;
&lt;br /&gt;
Moodle can be upgraded from the command line. As with the installation script, there is either interactive or non-interactive mode of the upgrade. The script itself does not put the site into the maintenance mode, you have to do it on your own. Also, the script does not backup any data (if you read this page, you probably have some own scripts to backup your moodledata and the database, right?)&lt;br /&gt;
&lt;br /&gt;
    $ sudo -u apache /usr/bin/php admin/cli/upgrade.php&lt;br /&gt;
&lt;br /&gt;
Upgrading via command line is a very comfortable way of Moodle upgrade if you use Git checkout of the Moodle source code (see [[Git for Administrators]]). See the following procedure how to upgrade your site within several seconds to the most recent version while preserving your eventual local customizations tracked in git repository:&lt;br /&gt;
&lt;br /&gt;
    $ cd /var/www/sites/moodle/htdocs/&lt;br /&gt;
    $ sudo -u apache /usr/bin/php admin/cli/maintenance.php --enable&lt;br /&gt;
    $ git pull&lt;br /&gt;
    $ sudo -u apache /usr/bin/php admin/cli/upgrade.php&lt;br /&gt;
    $ sudo -u apache /usr/bin/php admin/cli/maintenance.php --disable&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
There are two modes of installing Moodle from the command line. In interactive mode, the install script asks you for all data needed to properly set up new Moodle site. In non-interactive mode, you must provide all required data as the script parameters and then the new site is installed silently. The parameters can be passed in the interactive mode, too. The provided values are then used as the default values during the interactive session.&lt;br /&gt;
&lt;br /&gt;
    $ sudo -u apache /usr/bin/php admin/cli/install.php --lang=cs&lt;br /&gt;
&lt;br /&gt;
If your arguments contain some specials characters for Linux based systems, don&#039;t forget to &#039;&#039;escape&#039;&#039; them with a backslash. For example, if you want to create an admin with &#039;&#039;pa$sword&#039;&#039; as password you should wrote &#039;&#039;pa\$sword&#039;&#039; instead!&lt;br /&gt;
&lt;br /&gt;
If required, the database install may be skipped, with just config.php populated.&lt;br /&gt;
&lt;br /&gt;
   $ sudo -u apache /usr/bin/php admin/cli/install.php --skip-database&lt;br /&gt;
&lt;br /&gt;
== Maintenance mode ==&lt;br /&gt;
&lt;br /&gt;
To switch your site into the maintenance mode via CLI, you can use&lt;br /&gt;
&lt;br /&gt;
    $ sudo -u apache /usr/bin/php admin/cli/maintenance.php --enable&lt;br /&gt;
&lt;br /&gt;
To turn maintenance mode off, execute the same script with the --disable parameter:&lt;br /&gt;
&lt;br /&gt;
    $ sudo -u apache /usr/bin/php admin/cli/maintenance.php --disable&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t want to enable maintenance mode immediately, but show a countdown to your users, execute the same script with the --enablelater parameter and the number of minutes which the countdown should run:&lt;br /&gt;
&lt;br /&gt;
    $ sudo -u apache /usr/bin/php admin/cli/maintenance.php --enablelater=10&lt;br /&gt;
&lt;br /&gt;
This script will also create and remove the climaintenance.html file for &amp;quot;Offline&amp;quot; mode.&lt;br /&gt;
&lt;br /&gt;
== Offline mode ==&lt;br /&gt;
&lt;br /&gt;
In some situations, you may want to switch your Moodle site into offline mode so that it is not accessible via the web but you can not stop the web server completely (typically because there are other web pages and applications running there). If a file called &amp;lt;code&amp;gt;climaintenance.html&amp;lt;/code&amp;gt; exists in the root folder of moodledata directory, Moodle will automatically display the contents of that file instead of any other page.&lt;br /&gt;
&lt;br /&gt;
    $ cd /var/www/sites/moodle/moodledata/&lt;br /&gt;
    $ echo &#039;&amp;amp;lt;h1&amp;amp;gt;Sorry, maintenance in progress&amp;amp;lt;/h1&amp;amp;gt;&#039; &amp;amp;gt; climaintenance.html&lt;br /&gt;
&lt;br /&gt;
You can prepare a nice formatted HTML page to inform your users about the server being down and keep in the moodledata directory under a name like &amp;lt;code&amp;gt;climaintenance.off&amp;lt;/code&amp;gt; and rename it to the &amp;lt;code&amp;gt;climaintenance.html&amp;lt;/code&amp;gt; if needed.&lt;br /&gt;
&lt;br /&gt;
== Custom site defaults ==&lt;br /&gt;
&lt;br /&gt;
During the install and upgrade via CLI, Moodle sets the administration variables to the default values. You can use different defaults. See MDL-17850 for details. Shortly, all you need to do is to add a file &amp;lt;code&amp;gt;local/defaults.php&amp;lt;/code&amp;gt; into your Moodle installation. The format of the file is like&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
$defaults[&#039;pluginname&#039;][&#039;settingname&#039;] = &#039;settingvalue&#039;; // for plugins&lt;br /&gt;
$defaults[&#039;moodle&#039;][&#039;settingname&#039;] = &#039;settingvalue&#039;;     // for core settings&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These defaults are used during install, upgrade and are also displayed as defaults on Site administration pages.&lt;br /&gt;
&lt;br /&gt;
== Reset user password ==&lt;br /&gt;
&lt;br /&gt;
If you happen to forget your admin password (or you want to set a password for any other user on the site), you can use reset_password.php script. The script sets the correctly salted password for the given user.&lt;br /&gt;
&lt;br /&gt;
    $ sudo -u apache /usr/bin/php admin/cli/reset_password.php&lt;br /&gt;
&lt;br /&gt;
== MySQL storage engine conversion ==&lt;br /&gt;
&lt;br /&gt;
If you run your Moodle site with MySQL database backend and use the default MyISAM as the storage engine for your tables, you may want to convert them to use some more reliable engine like InnoDB (actually, you should want to switch to PostgreSQL ;-) anyway).&lt;br /&gt;
&lt;br /&gt;
    $ sudo -u apache /usr/bin/php admin/cli/mysql_engine.php --engine=InnoDB&lt;br /&gt;
&lt;br /&gt;
==Converting InnoDB tables to Barracuda==&lt;br /&gt;
&lt;br /&gt;
Sites using MySQL with database tables using Antelope as the file format are recommended to convert the tables to the Barracuda file format.&lt;br /&gt;
&lt;br /&gt;
This is because tables using Antelope as the file format cannot handle more than 10 text columns. This file formats only supports &#039;&#039;compact&#039;&#039; and &#039;&#039;redundant&#039;&#039; row formats for backward compatibility reasons. This may cause a problem on larger sites when restoring a course, in which case the following error will be displayed: &lt;br /&gt;
&lt;br /&gt;
 Row size too large (&amp;gt;8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help.&lt;br /&gt;
&lt;br /&gt;
Barracuda is the newest innoDB file format. In addition to supporting &#039;&#039;compact&#039;&#039; and &#039;&#039;redundant&#039;&#039; row formats, Barracuda also supports &#039;&#039;compressed&#039;&#039; and &#039;&#039;dynamic&#039;&#039; row formats. &lt;br /&gt;
&lt;br /&gt;
However, converting tables to Barracuda is only recommended, and not required, since not all MySQL users are affected. (It may only be a problem for larger sites.)&lt;br /&gt;
&lt;br /&gt;
===Tool for converting tables===&lt;br /&gt;
&lt;br /&gt;
A command line tool is included in Moodle for converting tables to Barracuda.&lt;br /&gt;
&lt;br /&gt;
To view tables requiring conversion, use the list option:&lt;br /&gt;
&lt;br /&gt;
 $ php admin/cli/mysql_compressed_rows.php --list&lt;br /&gt;
&lt;br /&gt;
Here is an example output:&lt;br /&gt;
&lt;br /&gt;
 mdl_data                            Compact     (needs fixing) &lt;br /&gt;
 mdl_data_fields                     Compact     (needs fixing)&lt;br /&gt;
 mdl_enrol_paypal                    Compact     (needs fixing)&lt;br /&gt;
&lt;br /&gt;
To proceed with the conversion, run the command using the fix option:&lt;br /&gt;
&lt;br /&gt;
 $ php admin/cli/mysql_compressed_rows.php --fix&lt;br /&gt;
&lt;br /&gt;
Successful table conversion will be reported in the output, for example:&lt;br /&gt;
&lt;br /&gt;
 mdl_data                   ... Compressed&lt;br /&gt;
 mdl_data_fields            ... Compressed&lt;br /&gt;
 mdl_enrol_paypal           ... Compressed&lt;br /&gt;
&lt;br /&gt;
Please note that the commands must be executed on your moodle directory. Once tables are fixed, the warning message will no longer be displayed.&lt;br /&gt;
 &lt;br /&gt;
For further information on InnoDB file formats see the [http://dev.mysql.com/doc/innodb/1.1/en/glossary.html#glos_antelope MySQL InnoDB glossary - Antelope] and the [http://dev.mysql.com/doc/innodb/1.1/en/glossary.html#glos_barracuda MySQL InnoDB glossary - Barracuda].&lt;br /&gt;
&lt;br /&gt;
If you get errors due to having insufficient privileges to run these commands (this is quite likely) then the easiest solution is to generate the required SQL commands using,&lt;br /&gt;
&lt;br /&gt;
 $ php admin/cli/mysql_compressed_rows.php --showsql&lt;br /&gt;
&lt;br /&gt;
You can then copy the generated SQL into your mysql client running as the &#039;root&#039; user.&lt;br /&gt;
&lt;br /&gt;
==Converting to the new character set and collation==&lt;br /&gt;
&lt;br /&gt;
 $ php admin/cli/mysql_collation.php --collation=utf8mb4_unicode_ci&lt;br /&gt;
&lt;br /&gt;
== Running cron via command line ==&lt;br /&gt;
&lt;br /&gt;
In versions 1.x, you could execute admin/cron.php either from command line or via the web. Since Moodle 2.0, only admin/cli/cron.php script can be run via command line.&lt;br /&gt;
&lt;br /&gt;
== Scheduled tasks ==&lt;br /&gt;
&lt;br /&gt;
Scheduled tasks are automatically run by the cron script, but the specific tasks which run on each cron iteration are determined by the scheduled tasks configuration. It is possible to override the scheduled tasks configuration and run a single scheduled task immediately using the admin/tool/task/cli/schedule_task.php script. &lt;br /&gt;
&lt;br /&gt;
This script accepts the following arguments:&lt;br /&gt;
&lt;br /&gt;
 --list - list all the known scheduled tasks. The tasks are listed by the class name used to run the task. This class name is required as the argument to the next option in order to run a specific task immediately.&lt;br /&gt;
&lt;br /&gt;
 --execute=&amp;lt;task&amp;gt; - Runs a single scheduled task immediately - regardless of scheduling settings. This will even run disabled tasks. Tasks will still use locking to prevent concurrent execution of the same task - even on clusters. The format of the &amp;lt;task&amp;gt; argument must be the same as returned by the --list option above.&lt;br /&gt;
&lt;br /&gt;
 --showsql - Shows sql queries before they are execute&lt;br /&gt;
&lt;br /&gt;
 --showdebugging - Shows developer debugging info&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; You must escape the &amp;quot;\&amp;quot; with an extra \ when using the --execute command. Take the following for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;php admin/tool/task/cli/schedule_task.php --list&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will return something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
== List of scheduled tasks (http://yourserver.com/moodle) ==&lt;br /&gt;
\enrol_imsenterprise\task\cron_task                10 * * * * *      ASAP&lt;br /&gt;
\logstore_legacy\task\cleanup_task                 * 5 * * * *       ASAP&lt;br /&gt;
\logstore_standard\task\cleanup_task               * 4 * * * *       Wednesday, November 12, 2014, 4:35 AM&lt;br /&gt;
\mod_forum\task\cron_task                          * * * * * *       ASAP&lt;br /&gt;
\core\task\automated_backup_task                   50 * * * * *      ASAP&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To run the first task in that list, you would execute&lt;br /&gt;
&lt;br /&gt;
 php admin/tool/task/cli/schedule_task.php --execute=&#039;\enrol_imsenterprise\task\cron_task&#039;&lt;br /&gt;
&lt;br /&gt;
Be aware of the single quotes. Without them, you would need to use double backlashes to avoid escaping by the shell.&lt;br /&gt;
&lt;br /&gt;
==Database transfer==&lt;br /&gt;
&lt;br /&gt;
A command line script for [[Database transfer]] may be found in &#039;&#039;admin/tool/dbtransfer/cli/migrate.php&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==Purge caches==&lt;br /&gt;
&lt;br /&gt;
You can purge caches using this script:&lt;br /&gt;
&lt;br /&gt;
  php admin/cli/purge_caches.php&lt;br /&gt;
&lt;br /&gt;
==Kill all sessions==&lt;br /&gt;
If needed for administrative reasons, you can kill all user sessions using this script:&lt;br /&gt;
&lt;br /&gt;
 php admin/cli/kill_all_sessions.php&lt;br /&gt;
&lt;br /&gt;
As a result, all users will be logged out from Moodle.&lt;br /&gt;
&lt;br /&gt;
==Fix course / module sequences==&lt;br /&gt;
&lt;br /&gt;
In rare cases (such as after upgrading from a very old version of Moodle), the course / section / module sequence data can be out of sync. This can cause various problems for affected courses, such as sections not appearing, backups failing, pages not displaying etc. There is a specific check to check for errors caused by this problem, and to fix the data in the database if they are found. To run this script please use the command below:&lt;br /&gt;
&lt;br /&gt;
  php admin/cli/fix_course_sequence.php -c=* --fix&lt;br /&gt;
&lt;br /&gt;
This will check every course in Moodle and report which ones had errors and were fixed.&lt;br /&gt;
&lt;br /&gt;
==Fix orphaned question categories==&lt;br /&gt;
&lt;br /&gt;
When a quiz is created, a new question category for the quiz is automatically created. In versions of Moodle prior to 2.9.1, if the quiz is deleted, the question category and any questions in the category remain in database. These orphaned question categories may be fixed by running the admin/cli/fix_orphaned_question_categories.php script with the --fix option.&lt;br /&gt;
&lt;br /&gt;
==Search and replace text==&lt;br /&gt;
&lt;br /&gt;
This script can be used to search and replace text throughout the whole database. Use carefully and backup first always. More info in [[Search and replace tool]].&lt;br /&gt;
&lt;br /&gt;
  php admin/tool/replace/cli/replace.php --search=//oldsitehost --replace=//newsitehost&lt;br /&gt;
&lt;br /&gt;
==Build theme CSS cache==&lt;br /&gt;
&lt;br /&gt;
If Moodle is not running in theme designer mode it will keep a copy of the compiled CSS on local disk and serve that to the browser when it requests a page. If there isn&#039;t a copy on local disk then a copy will be built the first time a page within Moodle is requested. &lt;br /&gt;
&lt;br /&gt;
With this script you can pre-compile the cached CSS files for themes within Moodle to avoid having a user wait for the theme to compile during the first page request.&lt;br /&gt;
&lt;br /&gt;
  php admin/cli/build_theme_css.php --themes=boost&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* MDL-35736 - Manage plugins via command line&lt;br /&gt;
* MDL-36237 - Resort course list via CLI&lt;br /&gt;
* [http://moosh-online.com/ MOOSH] - MOOdle SHell. It is a commandline tool that will allow you to perform most common Moodle tasks.&lt;br /&gt;
&lt;br /&gt;
[[fr:Administration en ligne de commande]]&lt;br /&gt;
[[de:Administration über Kommandozeile]]&lt;br /&gt;
[[es:Administración por línea de comando]]&lt;br /&gt;
[[it:Amministrazione via linea di comando]]&lt;br /&gt;
[[ja:コマンドライン経由の管理]]&lt;/div&gt;</summary>
		<author><name>Plemaire</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Marking_guide&amp;diff=133562</id>
		<title>Marking guide</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Marking_guide&amp;diff=133562"/>
		<updated>2019-04-19T10:05:08Z</updated>

		<summary type="html">&lt;p&gt;Plemaire: FR link rectified&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Advanced grading methods}}&lt;br /&gt;
A marking guide (in the US &#039;grading guide&#039;) is an [[Advanced grading methods|advanced grading method]] where a teacher enters a comment per criterion and a mark up to a maximum.&lt;br /&gt;
&lt;br /&gt;
==Selecting Marking guide==&lt;br /&gt;
*Create an assignment, and in the &#039;&#039;Grades&#039;&#039; section, choose from the &#039;&#039;Grading method&#039;&#039; drop down menu the &#039;&#039;Marking guide&#039;&#039; option:&lt;br /&gt;
&lt;br /&gt;
[[File:markinguidelocation.png]]&lt;br /&gt;
&lt;br /&gt;
==Creating a new Marking guide==&lt;br /&gt;
*When the assignment has been created and Marking guide selected as above, click &#039;&#039;Save and display&#039;&#039; and choose &#039;&#039;Define new grading form from scratch&#039;&#039; &lt;br /&gt;
*(See section 5 for information on how to use a template.)&lt;br /&gt;
&lt;br /&gt;
[[File:markinguidefromscratch.png]]&lt;br /&gt;
&lt;br /&gt;
*Give the guide a name and description.&lt;br /&gt;
*Click &#039;&#039;on&#039;&#039; the criterion name to edit it. It will open up a box for typing into.&lt;br /&gt;
*Click the &#039;&#039;Click to edit&#039;&#039; links to provide an explanation for students and for markers as to what is required. It will open up a box for typing into.&lt;br /&gt;
*Click the &#039;&#039;Click to edit&#039;&#039; link to allocate a maximum mark for this criterion. It will open up a box for typing into.&lt;br /&gt;
&lt;br /&gt;
[[File:clickhereguide.png]]&lt;br /&gt;
&lt;br /&gt;
===Adding more criteria===&lt;br /&gt;
*Click the button to add one or more criteria (and then repeat the process as above)&lt;br /&gt;
&lt;br /&gt;
[[File:markinguidemorecriteria.png]]&lt;br /&gt;
&lt;br /&gt;
===Adding frequently used comments===&lt;br /&gt;
*If a teacher regularly uses the same comments when marking, it is possible to add these to a &#039;&#039;frequently used comments&#039;&#039; bank.&lt;br /&gt;
*Click the &#039;&#039;Click to edit&#039;&#039; link and add a comment.&lt;br /&gt;
*Click the &#039;&#039;+Add frequently used comment&#039;&#039; button to add another one and repeat as needed:&lt;br /&gt;
&lt;br /&gt;
[[File:frequentcomments1.png]]&lt;br /&gt;
&lt;br /&gt;
===Marking guide options===&lt;br /&gt;
*By checking the appropriate boxes it is possible to allow students to see (or not)the guide definition and how many marks are allocated per criterion.&lt;br /&gt;
&lt;br /&gt;
==Saving and using Marking guide==&lt;br /&gt;
*Once completed, the guide may be saved as a draft or saved and made ready to use, according to the button selected at the bottom of the screen.&lt;br /&gt;
&lt;br /&gt;
==Editing or deleting Marking guide==&lt;br /&gt;
*Once completed, a guide may be edited or deleted by going to &#039;&#039;Settings&amp;gt;Assignment administration&amp;gt;Advanced grading&amp;gt;Marking guide.&#039;&#039; Options appear to edit or delete the currently defined form.&lt;br /&gt;
*When an assignment has been graded, a warning appears if the guide is edited to check whether the assignments need to be regraded or not.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| [[File:editdelete.png|thumb|Editing or deleting Marking guide]]&lt;br /&gt;
| [[File:markforregrade.png|thumb|Alert about regrading]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Using templates==&lt;br /&gt;
*Those users with the capability [[Capabilities/moodle/grade:sharegradingforms]] (and perhaps [[Capabilities/moodle/grade:managesharedforms]])  may save their forms as a template for others to use.  They will see an additional option in &#039;&#039;Settings&amp;gt;Assignment administration&amp;gt;Advanced grading&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:markingtemplate.png]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;(Note that teachers do not have these capabilities by default.&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*If templates have been made available, then on first accessing the Marking guide, teachers may select to &amp;quot;Create a new grading form from a template&amp;quot;. This will open up a search box to locate the desired template:&lt;br /&gt;
&lt;br /&gt;
[[File:gradingformsearch.png]]&lt;br /&gt;
&lt;br /&gt;
==Duplicating the Marking guide==&lt;br /&gt;
Note that when duplicating or restoring a Marking guide, frequently used comments will be duplicated only from from Moodle 2.6.2 onwards. Prior to this version they were not copied over.&lt;br /&gt;
&lt;br /&gt;
==Marking assignments==&lt;br /&gt;
*When the assignment to be graded is accessed in the usual way, the form appears with the criteria and an empty comments and score box. If  frequently used comments have been added, the teacherclicks into the box and then clicks on the required comment to insert it:&lt;br /&gt;
&lt;br /&gt;
[[File:markingwithmarkingguide.png]]&lt;br /&gt;
&lt;br /&gt;
==How students view the marking guide==&lt;br /&gt;
&lt;br /&gt;
When students click on an assignment which has a marking guide attached to it, they will see the marking guide as part of the information about their assignment. Thus, they can see the marking guide before they submit.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|[[File:markingguidebeforesubmission.png|thumb|Student view of marking guide on assignment grading screen]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*[http://school.demo.moodle.net/grade/grading/manage.php?areaid=30  School demo example of teacher view of Marking guide ready for usage] (Log in as username &#039;&#039;&#039;teacher&#039;&#039;&#039;/password &#039;&#039;&#039;moodle&#039;&#039;&#039;)&lt;br /&gt;
*[http://school.demo.moodle.net/grade/grading/form/guide/preview.php?areaid=30 School demo example of student view of Marking guide to help with assignment] (Log in as username &#039;&#039;&#039;student&#039;&#039;&#039;/password &#039;&#039;&#039;moodle&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
[[de:Bewertungsrichtlinien]]&lt;br /&gt;
[[es:Guía de puntaje]]&lt;br /&gt;
[[fr:Guide_d%27évaluation]]&lt;/div&gt;</summary>
		<author><name>Plemaire</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Course_reports&amp;diff=133556</id>
		<title>Course reports</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Course_reports&amp;diff=133556"/>
		<updated>2019-04-18T14:16:27Z</updated>

		<summary type="html">&lt;p&gt;Plemaire: FR link rectified&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Tracking progress}}&lt;br /&gt;
&lt;br /&gt;
{{MediaPlayer | url = https://youtu.be/VR91YcB3tCw | desc = Course reports}}&lt;br /&gt;
&lt;br /&gt;
* [[Competency breakdown report]]&lt;br /&gt;
* [[Logs]] &lt;br /&gt;
* [[Activity report]]&lt;br /&gt;
* [[Participation report]]&lt;br /&gt;
* [[Statistics]]&lt;br /&gt;
* [[Event monitoring]]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [[Site-wide reports]] in Managing a Moodle site&lt;br /&gt;
* [[Learning analytics]]&lt;br /&gt;
&lt;br /&gt;
[[es:Reportes del curso]]&lt;br /&gt;
[[de:Kursberichte]]&lt;br /&gt;
[[fr:Rapports du cours]]&lt;/div&gt;</summary>
		<author><name>Plemaire</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Site-wide_reports&amp;diff=133555</id>
		<title>Site-wide reports</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Site-wide_reports&amp;diff=133555"/>
		<updated>2019-04-18T13:46:27Z</updated>

		<summary type="html">&lt;p&gt;Plemaire: Add FR link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Managing a Moodle site}}&lt;br /&gt;
==Standard reports for administrators==&lt;br /&gt;
In addition to reports available at both site and course level, the following site-wide reports are available for administrators:&lt;br /&gt;
&lt;br /&gt;
* [[Config changes report|Config changes]]  - Shows changes made by an administrator to the site configuration&lt;br /&gt;
* [[Course overview report|Course overview]]&lt;br /&gt;
* [[Events list report|Events list]]&lt;br /&gt;
* [[Question instances report|Question instances]] - Reports where particular question types are used on the site&lt;br /&gt;
* [[admin/comment/index#Comments_report|Comments]] - See all comments created on the site. &lt;br /&gt;
* [[admin/report/backups/index#Backups_report|Backups]] - displays a list of all course backups made, the time taken to create them, their status, and the next scheduled automated backup execution time&lt;br /&gt;
* [[Logs]] - Activity reports for course or site&lt;br /&gt;
* [[admin/report/loglive/index#Live_logs_from_the_past_hour|Live Logs]] - Live logs from the past hour as a table&lt;br /&gt;
* [[Performance_overview|Performance overview]] - overview of settings that may impact site performance such as Theme Designer Mode or Debugging&lt;br /&gt;
* [[admin/report/security/index|Security overview]] - overview of security related settings such as Allowing EMBED and OBJECT tags or No Authentication.&lt;br /&gt;
* [[admin/tool/spamcleaner/index#Cleaning_up_spam|Spam cleaner]] - helpful tool for rooting out spam users if you do not have [[Email-based_self-registration#Enable_reCAPTCHA_element|Captcha]] required as part of authentication.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*[[Browser sessions]]&lt;br /&gt;
*[[Reports FAQ]] &lt;br /&gt;
*[[Course reports]] in Managing a Moodle course&lt;br /&gt;
*[[Plugins_overview| Plugins overview]] for checking the status of all plugins on the site.&lt;br /&gt;
*[[:dev:General report plugins|General report plugins]] developer documentation&lt;br /&gt;
*[[ad-hoc contributed reports]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Report]]&lt;br /&gt;
&lt;br /&gt;
[[es:Reportes del sitio]]&lt;br /&gt;
[[de:Systemweite Berichte]]&lt;br /&gt;
[[it:Report a livello di sito]]&lt;br /&gt;
[[fr:Rapports de site]]&lt;/div&gt;</summary>
		<author><name>Plemaire</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Upload_courses&amp;diff=133548</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=133548"/>
		<updated>2019-04-17T17:14:57Z</updated>

		<summary type="html">&lt;p&gt;Plemaire: Link for FR&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Courses}}&lt;br /&gt;
{{Note|This page is about creating courses with a text (.csv) file. If you want to upload a course backup in .mbz or .tgz format, see [[Course restore]].}}&lt;br /&gt;
&lt;br /&gt;
==Upload courses==&lt;br /&gt;
&lt;br /&gt;
In addition to creating new courses, the upload courses functionality may also be used to update or delete courses, or import content from another course. For information on using this functionality to create course templates, see [[Adding a new course]].&lt;br /&gt;
&lt;br /&gt;
To upload one or more courses&lt;br /&gt;
&lt;br /&gt;
# Go to &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Courses &amp;gt; Upload courses&#039;&#039;&lt;br /&gt;
# Either drag and drop the CSV file or click the &#039;Choose a file&#039; button and select the file in the file picker&lt;br /&gt;
# Select appropriate import options carefully, then click the preview button.&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;
Note: 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;
&lt;br /&gt;
Note: shortname, fullname, and category are required.&lt;br /&gt;
&lt;br /&gt;
The category field takes the id of the category, with the default category Miscellaneous having id 1. Categories must already exist. If you put a category id that does not exist, you will receive a &amp;quot;Could not resolve category by ID&amp;quot; error during upload preview, and courses in that category will not be created. &lt;br /&gt;
&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 items.&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. Field names must be lower-case.&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 (found on the ‘Edit Category’ page)&lt;br /&gt;
;category&lt;br /&gt;
:  This is 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 (found in the category url). 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 / Science-Fiction&amp;lt;/code&amp;gt;. Note that the separator must be &amp;lt;code&amp;gt;[space]/[space]&amp;lt;/code&amp;gt;. Also note that the category MUST exist, it will not be created.  If you want to place the course in the top-level category &amp;quot;Movies&amp;quot;, the value to provide is: &amp;lt;code&amp;gt;Movies&amp;lt;/code&amp;gt;&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. Example 01.12.2014 (1st December 2014)&lt;br /&gt;
;enddate&lt;br /&gt;
: The time at which the course ends. Please note as with startdate that this value is passed to the PHP function [http://php.net/manual/en/function.strtotime.php strtotime] to generate a timestamp. Example 01.12.2014 (1st December 2014)&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;
;tags&lt;br /&gt;
: A comma-separated list of tags to add to the course. Existing tags will be deleted. Enclose multiple tags in quotes.&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 (eg, manual, guest, self)&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 end 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;
;enrolment_[number]_password&lt;br /&gt;
: The course enrolment key&lt;br /&gt;
&lt;br /&gt;
Note: Upload courses is not yet compatible with all [[Enrolments|enrolment methods]] (MDL-43127).&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;
It is worth noting that the short name for the teacher role is &#039;&#039;editingteacher&#039;&#039; and the short name for the non-editing teacher is &#039;&#039;teacher&#039;&#039;.&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;
&lt;br /&gt;
(This means the full path to your course, for example &#039;&#039;/home/yourmoodle/public_html/moodle27/transfert/backup.mbz&#039;&#039; . If you are unsure of this, look at include_path in &#039;&#039;Site administration&amp;gt;Server&amp;gt;PHP info.)&#039;&#039;&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;
===Import options===&lt;br /&gt;
&lt;br /&gt;
To prevent unexpected behaviour, 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 for every course 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 advised 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;
==See also==&lt;br /&gt;
&lt;br /&gt;
* Demo screencast: [http://youtu.be/MzK2jb-9SwE Bulk course creation]&lt;br /&gt;
* [[Upload users]]&lt;br /&gt;
* [http://www.moodleblog.net/2013/11/24/creating-course-templates-in-moodle-2-6/ Creating course templates in Moodle 2.6] blog post by Mary Cooch&lt;br /&gt;
&lt;br /&gt;
[[fr:Modifier des cours en lots]]&lt;br /&gt;
[[de:Kurse hochladen]]&lt;br /&gt;
[[es:Subir cursos]]&lt;br /&gt;
[[ja:コースをアップロードする]]&lt;/div&gt;</summary>
		<author><name>Plemaire</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Scheduled_tasks&amp;diff=133521</id>
		<title>Scheduled tasks</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Scheduled_tasks&amp;diff=133521"/>
		<updated>2019-04-14T07:43:01Z</updated>

		<summary type="html">&lt;p&gt;Plemaire: add cli link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server settings}}&lt;br /&gt;
An administrator can schedule routine tasks very precisely from &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Server &amp;gt; Scheduled tasks.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Note that you still need to run the [[Cron|CRON scripts]] (\admin\cli\cron.php or http:\\yoursite\admin\cron.php) at regular intervals. It is recommended that the cron is run every minute.&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|[[File:scheduledtasks1.png|thumb|Scheduled tasks]]&lt;br /&gt;
|[[File:scheduledtasks2.png|thumb|Editing a scheduled task]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Clicking the edit icon allows the administrator to specify the minute/hour/day/month or day of the week the task is to be run. It is also possible to reset the task to its default setting or disable it completely.&lt;br /&gt;
&lt;br /&gt;
The column &#039;Next run&#039; provides information on whether a plugin or a task is disabled (as well as the date that a task will next run).&lt;br /&gt;
&lt;br /&gt;
==Format for scheduling tasks==&lt;br /&gt;
&lt;br /&gt;
When typing into the fields, the format is the same as for Unix cron. Examples are as follows and are according to which field you are editing:&lt;br /&gt;
&lt;br /&gt;
 * is every minute, hour, day, month&lt;br /&gt;
 */2 is every two minutes, every two hours or every second day&lt;br /&gt;
 2-10 is every minute between two and ten past the hour or every hour between 2 and 10 am &lt;br /&gt;
 0 is every Sunday&lt;br /&gt;
 1 is every Monday or every January&lt;br /&gt;
 2,5 is the second and 5th of the month, or February and May, or Tuesday and Friday.&lt;br /&gt;
&lt;br /&gt;
==Fail delay==&lt;br /&gt;
&lt;br /&gt;
If you&#039;re trying to debug a cron task, you may notice the Fail Delay becomes populated with a number. This is the time in seconds the cron will delay running the task. To sidestep this problem for development purposes, take a look at the Scheduled Tasks section here: [[Administration_via_command_line#Scheduled_tasks]].&lt;br /&gt;
&lt;br /&gt;
==Running individual tasks==&lt;br /&gt;
&lt;br /&gt;
To be able to run individual scheduled tasks via &#039;Run now&#039; links on the scheduled tasks page, &#039;Allow &#039;Run now&#039; for scheduled tasks&#039; (tool_task | enablerunnow) in Site administration / Security / Site security settings should be enabled AND (new in 3.6 onwards) &#039;Path to PHP CLI&#039; (pathtophp) in Site administration / Server / System paths should be set.&lt;br /&gt;
&lt;br /&gt;
[[File:examplescheduledtasks.png]]&lt;br /&gt;
&lt;br /&gt;
===Launching a task from CLI===&lt;br /&gt;
You can also launch individual task from Command Line Interface (see [[Administration_via_command_line#Scheduled_tasks|Administration via command line]]).&lt;br /&gt;
&lt;br /&gt;
[[es:Trabajos agendados]]&lt;br /&gt;
[[de:Geplante Vorgänge]]&lt;/div&gt;</summary>
		<author><name>Plemaire</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Marking_guide&amp;diff=133481</id>
		<title>Marking guide</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Marking_guide&amp;diff=133481"/>
		<updated>2019-04-08T07:21:26Z</updated>

		<summary type="html">&lt;p&gt;Plemaire: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Advanced grading methods}}&lt;br /&gt;
A marking guide (in the US &#039;grading guide&#039;) is an [[Advanced grading methods|advanced grading method]] where a teacher enters a comment per criterion and a mark up to a maximum.&lt;br /&gt;
&lt;br /&gt;
==Selecting Marking guide==&lt;br /&gt;
*Create an assignment, and in the &#039;&#039;Grades&#039;&#039; section, choose from the &#039;&#039;Grading method&#039;&#039; drop down menu the &#039;&#039;Marking guide&#039;&#039; option:&lt;br /&gt;
&lt;br /&gt;
[[File:markinguidelocation.png]]&lt;br /&gt;
&lt;br /&gt;
==Creating a new Marking guide==&lt;br /&gt;
*When the assignment has been created and Marking guide selected as above, click &#039;&#039;Save and display&#039;&#039; and choose &#039;&#039;Define new grading form from scratch&#039;&#039; &lt;br /&gt;
*(See section 5 for information on how to use a template.)&lt;br /&gt;
&lt;br /&gt;
[[File:markinguidefromscratch.png]]&lt;br /&gt;
&lt;br /&gt;
*Give the guide a name and description.&lt;br /&gt;
*Click &#039;&#039;on&#039;&#039; the criterion name to edit it. It will open up a box for typing into.&lt;br /&gt;
*Click the &#039;&#039;Click to edit&#039;&#039; links to provide an explanation for students and for markers as to what is required. It will open up a box for typing into.&lt;br /&gt;
*Click the &#039;&#039;Click to edit&#039;&#039; link to allocate a maximum mark for this criterion. It will open up a box for typing into.&lt;br /&gt;
&lt;br /&gt;
[[File:clickhereguide.png]]&lt;br /&gt;
&lt;br /&gt;
===Adding more criteria===&lt;br /&gt;
*Click the button to add one or more criteria (and then repeat the process as above)&lt;br /&gt;
&lt;br /&gt;
[[File:markinguidemorecriteria.png]]&lt;br /&gt;
&lt;br /&gt;
===Adding frequently used comments===&lt;br /&gt;
*If a teacher regularly uses the same comments when marking, it is possible to add these to a &#039;&#039;frequently used comments&#039;&#039; bank.&lt;br /&gt;
*Click the &#039;&#039;Click to edit&#039;&#039; link and add a comment.&lt;br /&gt;
*Click the &#039;&#039;+Add frequently used comment&#039;&#039; button to add another one and repeat as needed:&lt;br /&gt;
&lt;br /&gt;
[[File:frequentcomments1.png]]&lt;br /&gt;
&lt;br /&gt;
===Marking guide options===&lt;br /&gt;
*By checking the appropriate boxes it is possible to allow students to see (or not)the guide definition and how many marks are allocated per criterion.&lt;br /&gt;
&lt;br /&gt;
==Saving and using Marking guide==&lt;br /&gt;
*Once completed, the guide may be saved as a draft or saved and made ready to use, according to the button selected at the bottom of the screen.&lt;br /&gt;
&lt;br /&gt;
==Editing or deleting Marking guide==&lt;br /&gt;
*Once completed, a guide may be edited or deleted by going to &#039;&#039;Settings&amp;gt;Assignment administration&amp;gt;Advanced grading&amp;gt;Marking guide.&#039;&#039; Options appear to edit or delete the currently defined form.&lt;br /&gt;
*When an assignment has been graded, a warning appears if the guide is edited to check whether the assignments need to be regraded or not.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| [[File:editdelete.png|thumb|Editing or deleting Marking guide]]&lt;br /&gt;
| [[File:markforregrade.png|thumb|Alert about regrading]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Using templates==&lt;br /&gt;
*Those users with the capability [[Capabilities/moodle/grade:sharegradingforms]] (and perhaps [[Capabilities/moodle/grade:managesharedforms]])  may save their forms as a template for others to use.  They will see an additional option in &#039;&#039;Settings&amp;gt;Assignment administration&amp;gt;Advanced grading&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:markingtemplate.png]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;(Note that teachers do not have these capabilities by default.&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*If templates have been made available, then on first accessing the Marking guide, teachers may select to &amp;quot;Create a new grading form from a template&amp;quot;. This will open up a search box to locate the desired template:&lt;br /&gt;
&lt;br /&gt;
[[File:gradingformsearch.png]]&lt;br /&gt;
&lt;br /&gt;
==Duplicating the Marking guide==&lt;br /&gt;
Note that when duplicating or restoring a Marking guide, frequently used comments will be duplicated only from from Moodle 2.6.2 onwards. Prior to this version they were not copied over.&lt;br /&gt;
&lt;br /&gt;
==Marking assignments==&lt;br /&gt;
*When the assignment to be graded is accessed in the usual way, the form appears with the criteria and an empty comments and score box. If  frequently used comments have been added, the teacherclicks into the box and then clicks on the required comment to insert it:&lt;br /&gt;
&lt;br /&gt;
[[File:markingwithmarkingguide.png]]&lt;br /&gt;
&lt;br /&gt;
==How students view the marking guide==&lt;br /&gt;
&lt;br /&gt;
When students click on an assignment which has a marking guide attached to it, they will see the marking guide as part of the information about their assignment. Thus, they can see the marking guide before they submit.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|[[File:markingguidebeforesubmission.png|thumb|Student view of marking guide on assignment grading screen]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*[http://school.demo.moodle.net/grade/grading/manage.php?areaid=30  School demo example of teacher view of Marking guide ready for usage] (Log in as username &#039;&#039;&#039;teacher&#039;&#039;&#039;/password &#039;&#039;&#039;moodle&#039;&#039;&#039;)&lt;br /&gt;
*[http://school.demo.moodle.net/grade/grading/form/guide/preview.php?areaid=30 School demo example of student view of Marking guide to help with assignment] (Log in as username &#039;&#039;&#039;student&#039;&#039;&#039;/password &#039;&#039;&#039;moodle&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
[[de:Bewertungsrichtlinien]]&lt;br /&gt;
[[es:Guía de puntaje]]&lt;br /&gt;
[[fr:Grille_d%27évaluation]]&lt;/div&gt;</summary>
		<author><name>Plemaire</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=admin/environment/php_setting/file_uploads&amp;diff=131219</id>
		<title>admin/environment/php setting/file uploads</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=admin/environment/php_setting/file_uploads&amp;diff=131219"/>
		<updated>2018-06-15T11:49:30Z</updated>

		<summary type="html">&lt;p&gt;Plemaire: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Environment}}&lt;br /&gt;
&#039;&#039;file_uploads&#039;&#039; needs to be activated (ON).&lt;br /&gt;
&lt;br /&gt;
[[Category:Environment|PHP]]&lt;br /&gt;
&lt;br /&gt;
[[es:admin/environment/php setting/file uploads]]&lt;/div&gt;</summary>
		<author><name>Plemaire</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Filters_FAQ&amp;diff=130267</id>
		<title>Filters FAQ</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Filters_FAQ&amp;diff=130267"/>
		<updated>2018-03-09T14:31:59Z</updated>

		<summary type="html">&lt;p&gt;Plemaire: /* Why is my filter not working? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Filters}}&lt;br /&gt;
== What are filters? ==&lt;br /&gt;
&lt;br /&gt;
Filters allow for the automatic transformation of entered text into different, often more complex forms. For example the titles of resources can automatically become hyperlinks that take you to the relevant resource, URLs pointing to mp3 files can become Flash controls embedded in the web page that let you pause and rewind the audio. The possibilities are endless and there are a number of standard filters included with Moodle and many more specialized filters available from the Moodle.org Modules and plugins database.&lt;br /&gt;
&lt;br /&gt;
See [[Filters]] for details.&lt;br /&gt;
&lt;br /&gt;
== How do I enable filters? ==&lt;br /&gt;
&lt;br /&gt;
You find the settings under &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Plugins &amp;gt; Filters &amp;gt; Manage filters&#039;&#039;, see [[Managing filters]] for details.&lt;br /&gt;
&lt;br /&gt;
==Why is my filter not working?==&lt;br /&gt;
&lt;br /&gt;
After checking that the filter is enabled for the site, course and activity or resource, go to &#039;&#039;Site administration &amp;gt; Plugins &amp;gt; Filters &amp;gt; Manage filters&#039;&#039; and try moving the filter higher up the list. See the forum discussion [http://moodle.org/mod/forum/discuss.php?d=194684 Moodle Media player not appearing] for an example.&lt;br /&gt;
&lt;br /&gt;
If you have enabled the automatic URL conversion filter but do not see the result in forum posts or on a page resource, you will need to enable HTML content in &amp;quot;filter_urltolink | formats&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Where do I find additional filters? ==&lt;br /&gt;
&lt;br /&gt;
You will find a number of contributed filters in the [http://moodle.org/plugins/browse.php?list=category&amp;amp;id=7 Moodle Plugins directory].&lt;br /&gt;
&lt;br /&gt;
== How do I create custom filters? ==&lt;br /&gt;
&lt;br /&gt;
See the following developer docs for details:&lt;br /&gt;
* [[:dev:Filters]]&lt;br /&gt;
* [[:dev:Filters schema]]&lt;br /&gt;
* [[:dev:Filters 2.0]]&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Filters used on the Moodle.org forums]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:FAQ]]&lt;br /&gt;
&lt;br /&gt;
[[de:Filter FAQ]]&lt;/div&gt;</summary>
		<author><name>Plemaire</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Filters_FAQ&amp;diff=130266</id>
		<title>Filters FAQ</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Filters_FAQ&amp;diff=130266"/>
		<updated>2018-03-09T14:31:28Z</updated>

		<summary type="html">&lt;p&gt;Plemaire: /* Why is my filter not working? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Filters}}&lt;br /&gt;
== What are filters? ==&lt;br /&gt;
&lt;br /&gt;
Filters allow for the automatic transformation of entered text into different, often more complex forms. For example the titles of resources can automatically become hyperlinks that take you to the relevant resource, URLs pointing to mp3 files can become Flash controls embedded in the web page that let you pause and rewind the audio. The possibilities are endless and there are a number of standard filters included with Moodle and many more specialized filters available from the Moodle.org Modules and plugins database.&lt;br /&gt;
&lt;br /&gt;
See [[Filters]] for details.&lt;br /&gt;
&lt;br /&gt;
== How do I enable filters? ==&lt;br /&gt;
&lt;br /&gt;
You find the settings under &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Plugins &amp;gt; Filters &amp;gt; Manage filters&#039;&#039;, see [[Managing filters]] for details.&lt;br /&gt;
&lt;br /&gt;
==Why is my filter not working?==&lt;br /&gt;
&lt;br /&gt;
After checking that the filter is enabled for the site, course and activity or resource, go to &#039;&#039;Site administration &amp;gt; Plugins &amp;gt; Filters &amp;gt; Manage filters&#039;&#039; and try moving the filter higher up the list. See the forum discussion [http://moodle.org/mod/forum/discuss.php?d=194684 Moodle Media player not appearing] for an example.&lt;br /&gt;
If you have enabled the automatic URL conversion filter but do not see the result in forum posts or on a page resource, you will need to enable HTML content in &amp;quot;filter_urltolink | formats&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Where do I find additional filters? ==&lt;br /&gt;
&lt;br /&gt;
You will find a number of contributed filters in the [http://moodle.org/plugins/browse.php?list=category&amp;amp;id=7 Moodle Plugins directory].&lt;br /&gt;
&lt;br /&gt;
== How do I create custom filters? ==&lt;br /&gt;
&lt;br /&gt;
See the following developer docs for details:&lt;br /&gt;
* [[:dev:Filters]]&lt;br /&gt;
* [[:dev:Filters schema]]&lt;br /&gt;
* [[:dev:Filters 2.0]]&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Filters used on the Moodle.org forums]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:FAQ]]&lt;br /&gt;
&lt;br /&gt;
[[de:Filter FAQ]]&lt;/div&gt;</summary>
		<author><name>Plemaire</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Git_for_Administrators&amp;diff=119692</id>
		<title>Git for Administrators</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Git_for_Administrators&amp;diff=119692"/>
		<updated>2015-08-29T16:11:51Z</updated>

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

		<summary type="html">&lt;p&gt;Plemaire: /* SQL database */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Moodle is designed to upgrade cleanly from one version to the next.  Please refer to [[Upgrading to Moodle 1.6]], [[Upgrading to Moodle 1.8]] or [[Upgrading to Moodle 1.9]]  for particular considerations related to the upgraded version.  &lt;br /&gt;
&lt;br /&gt;
Changes that have been made to the original code, such as installing a contributed module (non-standard module) or a site edit of a php file, may not upgrade. This includes modifications to standard themes that might be overwritten during an upgrade.&lt;br /&gt;
&lt;br /&gt;
* For those using cpanel, you can use [http://ic.eflclasses.org/tutorials/howtoupgrademoodlewithcpanel.swf this tutorial]. It is a bit rough around the edges and is a little dated, but you should get the idea.&lt;br /&gt;
&lt;br /&gt;
* For those who have installed the package version of Moodle using an Ubuntu/Kubuntu/Debian package manager, upgrade instructions can be found [[Ubuntu_Debian_Upgrades|here]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
When upgrading a Moodle installation you should follow these steps:&lt;br /&gt;
&lt;br /&gt;
==Check the requirements==&lt;br /&gt;
Spend some time re-reading the [[Installing Moodle | installation documentation]] and documentation for the new version. Check the system requirements for the target version you want to upgrade-to in &#039;&#039;Administration &amp;gt; Server &amp;gt; [[Environment]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Backup important data ==&lt;br /&gt;
There are three areas that need backing up:&lt;br /&gt;
#Moodle software directory/folder (For example, everything in server/htdocs/moodle)&lt;br /&gt;
#Moodle data (For example, server/moodledata)&lt;br /&gt;
#Moodle SQL database&lt;br /&gt;
&lt;br /&gt;
Experienced site administrators know that it is a best practice (a very good idea) to make a backup of any production system before a major upgrade. In fact, it is a good idea to automate your server to backup your Moodle installation daily.  Most upgrades on sites that have used the standard Moodle packages (no contributed code and no little tweaks to the php files), will not have any major issue.  &lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;TIP:&#039;&#039; One more time, &amp;quot;do not risk what you can not afford to lose&amp;quot;: do regular backups, make sure it backed up and know how to restore it! &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Moodle software directory ===&lt;br /&gt;
Make a separate copy of these files before the upgrade, so that you can retrieve your config.php and any modules you have added like themes, and languages.&lt;br /&gt;
&lt;br /&gt;
The best way is to rename the current Moodle directory to something else, then unpack the new Moodle archive into the old location.&lt;br /&gt;
&lt;br /&gt;
=== Moodle data directory ===&lt;br /&gt;
The default name for this folder is moodledata. This is where uploaded content resides (such as course resources and student assignments). It is very important to have a backup of these files on a regular basis as a best practice. Sometimes upgrades may move or rename directories within your data directory. &lt;br /&gt;
&lt;br /&gt;
In Linux you can use the cp (copy) command to make a temporary copy of the moodledata. example:&lt;br /&gt;
====Linux====&lt;br /&gt;
 mkdir /var/www/moodledata_backup&lt;br /&gt;
 cp -r /var/www/moodledata/* /var/www/moodledata_backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== SQL database ===&lt;br /&gt;
Most Moodle upgrades will alter the SQL database tables, adding or changing fields. Each SQL server program (for example,MySQL, Postgresql, Oracle) has different ways to backup. In a MySQL server, one way of backing up is to &#039;dump&#039; it to a single SQL file. The following example shows Unix commands to dump the database called &amp;quot;moodle&amp;quot;: &lt;br /&gt;
&lt;br /&gt;
 mysqldump -u username -p -C -Q -e --create-options moodle &amp;gt; moodle-backup-2007-04-01.sql&lt;br /&gt;
&lt;br /&gt;
Substitute your database user account for username. The -p flag will prompt you for the password for the username specified by -u.&lt;br /&gt;
&lt;br /&gt;
If your database host is different from the host you want to execute the backup command (usually the web server), you have to specify it with the -h option to mysqldump:&lt;br /&gt;
&lt;br /&gt;
 mysqldump -u username -p -h databasehost -C -Q -e --create-options moodle &amp;gt; moodle-backup-2007-04-01.sql &lt;br /&gt;
&lt;br /&gt;
You can also use the &amp;quot;Export&amp;quot; feature in Moodle&#039;s optional &amp;quot;MySQL Admin&amp;quot; web interface to do the same thing on all platforms. In Moodle v1.9 and greater, this is located in &#039;&#039;&#039;Site Administration&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;Server&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;Database&#039;&#039;&#039;. This interface can also be downloaded from http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=448. It is an integration of PHPMyAdmin for the Moodle administration interface.&lt;br /&gt;
&lt;br /&gt;
==== SQL dump caveats ====&lt;br /&gt;
There are a &#039;&#039;&#039;MANY&#039;&#039;&#039; options possible for mysqldump. &lt;br /&gt;
*Please talk with your Systems Administrator (if you have one) or similar to see if there are site-specific flags you should use for your SQL dump.&lt;br /&gt;
** For example, if your local installation is running MySQL 5.2 and you are moving to a system running MySQL 5.0 or 4.1, you really ought to use the &amp;quot;--compat=mysql40&amp;quot; flag. (This is not too uncommon of a situation given the nature of ISP hosting as compared to local user Moodle setups)&lt;br /&gt;
* This seems obvious, but should be said outright: These instructions only work for dumping from MySQL! Postgresql, Oracle, and other database servers have different tools to dump databases.&lt;br /&gt;
* Given the example mysql import lines, above, you really should use the --no-create-db flag. If your database locally is named something differently from the migration site, not including this flag could cause problems.&lt;br /&gt;
&lt;br /&gt;
== Install the new Moodle software ==&lt;br /&gt;
Upgrading can be a simple process or a more complicated process.  Sites that have not used contributed code and are migrating from say Moodle 1.x.1 to 1.x.3 &#039;&#039;&#039;should&#039;&#039;&#039; not have a problem.  However, we still recommend that with any production server that you have made a successful backup of the MySQL database, the moodledata directory and the moodle program folders and files.  &lt;br /&gt;
&lt;br /&gt;
*Do not overwrite an old installation unless you know what you are doing ... sometimes old files can cause problems in new installations. Review the backup section above.&lt;br /&gt;
&lt;br /&gt;
=== Standard install package ===&lt;br /&gt;
Having read the cautions about backups, download a copy of the standard install package. Here is a set of simple instructions for an average site.&lt;br /&gt;
*It is probably a good idea to use the site administration block&amp;gt;Server&amp;gt;Maintenance mode to prevent user activity as the site upgrades. &lt;br /&gt;
*Unzip or unpack the upgrade file so that all the Moodle software program files are overwritten on the server.  Moodle will adjust SQL and moodledata if it needs to in the upgrade.&lt;br /&gt;
*Use the notification link in the site administration to start the upgrade process. You will see a series of lines indicating progress.  &lt;br /&gt;
*After a successful upgrade, turn off the maintenance mode for your users.&lt;br /&gt;
&lt;br /&gt;
=== Using a downloaded archive ===&lt;br /&gt;
*Do not overwrite an old installation unless you know what you are doing ... sometimes old files can cause problems in new installations. The best way is to rename the current Moodle directory to something else, then unpack the new Moodle archive into the old location.&lt;br /&gt;
&lt;br /&gt;
====Linux====&lt;br /&gt;
 mv moodle moodle.backup&lt;br /&gt;
 tar xvzf moodle-1.1.tgz&lt;br /&gt;
&lt;br /&gt;
Next, copy across your config.php, any other plugins such as custom themes, and your .htaccess file if you created one:&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 &lt;br /&gt;
&lt;br /&gt;
 sudo chown www-data moodle/config.php&lt;br /&gt;
&lt;br /&gt;
if necessary.&lt;br /&gt;
&lt;br /&gt;
where www-data is whatever user the Apache user is on your system. This is often &#039;apache&#039; or &#039;www&#039;.&lt;br /&gt;
You can find out by doing &#039;ls -l&#039; in your /var/www/moodle folder (or wherever your moodle site is)&lt;br /&gt;
and then looking at the owner and group.&lt;br /&gt;
&lt;br /&gt;
so you may see something like&lt;br /&gt;
&lt;br /&gt;
 ls -l&lt;br /&gt;
 ...lots of lines...&lt;br /&gt;
 -rw-r--r--   1 apache system     784 Jun 28  2007 config.php &lt;br /&gt;
 ...lots more lines...&lt;br /&gt;
&lt;br /&gt;
so the owner is apache and the group is system. &lt;br /&gt;
&lt;br /&gt;
To replicate this on your new system you can do  &#039;chown apache:system config.php&#039; &lt;br /&gt;
&lt;br /&gt;
or to do a whole group do&lt;br /&gt;
&lt;br /&gt;
 chown apache:system ./*&lt;br /&gt;
&lt;br /&gt;
and recursively&lt;br /&gt;
&lt;br /&gt;
 chown -R apache:system ./*&lt;br /&gt;
&lt;br /&gt;
=== Using CVS ===&lt;br /&gt;
&lt;br /&gt;
You can use CVS for updating or upgrading your Moodle.&lt;br /&gt;
First you need to do a CVS checkout in your (empty) Moodle root directory.&lt;br /&gt;
&lt;br /&gt;
You can use any of our [[CVS_for_Administrators#CVS_Servers|CVS Mirror servers]]. Just replace &#039;&#039;&#039;SERVER.cvs.moodle.org&#039;&#039;&#039; in the instructions below with the name of the mirror server you chose!.&lt;br /&gt;
&lt;br /&gt;
====For Linux servers====&lt;br /&gt;
&lt;br /&gt;
To do a CVS checkout of Moodle, you first have to logon to the Moodle CVS server.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;nowiki&amp;gt;cvs -d:pserver:anonymous@SERVER.cvs.moodle.org:/cvsroot/moodle login&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  No password for anonymous, so just hit the Enter button.&lt;br /&gt;
&lt;br /&gt;
Go to the directory where you want the Moodle root to come and type&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;nowiki&amp;gt;cvs -z3 -d:pserver:anonymous@SERVER.cvs.moodle.org:/cvsroot/moodle co -r MOODLE_18_STABLE moodle&amp;lt;/nowiki&amp;gt; &lt;br /&gt;
  (where MOODLE_18_STABLE is the desired version)&lt;br /&gt;
&lt;br /&gt;
To update, just go into the Moodle root directory and update to the new files:&lt;br /&gt;
&lt;br /&gt;
  cvs update -dP&lt;br /&gt;
To update to a new version type in the following and change 18 to whatever newest version upgrade number is&lt;br /&gt;
  cvs -Q update -dP -r MOODLE_18_STABLE&lt;br /&gt;
&lt;br /&gt;
Make sure you use the &amp;quot;d&amp;quot; parameter to create new directories if necessary, and the &amp;quot;P&amp;quot; parameter to prune empty directories.&lt;br /&gt;
&lt;br /&gt;
====For Windows servers====&lt;br /&gt;
&lt;br /&gt;
You can use Tortoise CVS to do the initial checkout and the updates.&lt;br /&gt;
&lt;br /&gt;
If you have been editing Moodle files, watch the messages very closely for possible conflicts. All your customised themes and non-standard plugins will be untouched.&lt;br /&gt;
&lt;br /&gt;
Do not forget to trigger the install process in the site administration block (see below).&lt;br /&gt;
&lt;br /&gt;
== Finishing the upgrade ==&lt;br /&gt;
&lt;br /&gt;
The last step is to trigger the upgrade processes within Moodle. &lt;br /&gt;
&lt;br /&gt;
To do this just visit the site administration block admin page (or &#039;&#039;&amp;lt;nowiki&amp;gt;http://example.com/moodle/admin&amp;lt;/nowiki&amp;gt;&#039;&#039;) and the &amp;quot;Notifications&amp;quot; link.&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;
&lt;br /&gt;
:&#039;&#039;TIP:&#039;&#039; Use the site administration block&amp;gt;Server&amp;gt;Maintenance mode to prevent users from changing data during the upgrade.&lt;br /&gt;
:&#039;&#039;TIP:&#039;&#039; If you are running a large scale Moodle site (e.g. have more tha 10,000+ courses and 40,000+ users), make sure that you do your own performance profiling testing.  Post a thread or check the [http://moodle.org/mod/forum/view.php?id=28 Installation problems forum] and check [[Tracker]] for potential issues.&lt;br /&gt;
&lt;br /&gt;
== Verify the upgrade (optional) ==&lt;br /&gt;
&lt;br /&gt;
If you wish to confirm that the database definitions in the upgraded database match the definitions of a new, clean install (which they should) you might like to look at [[Verify Database Schema]].&lt;br /&gt;
&lt;br /&gt;
==Upgrading more than one version==&lt;br /&gt;
&lt;br /&gt;
In general, it is recommended to upgrade via each version of Moodle, for example 1.7 -&amp;gt; 1.9. An exception to this is when upgrading from 1.5 or 1.6, when it is recommended that 1.7 and 1.8 are skipped, in other words upgrade 1.5 -&amp;gt; 1.6 -&amp;gt; 1.9. (The main reason for this recommendation is that the default roles settings obtained when upgrading to 1.7 are not ideal for 1.8 onwards, 1.8 has problems with groups, etc.)&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*[[Installing Moodle]]&lt;br /&gt;
*[[Installation FAQ]]&lt;br /&gt;
*[[Upgrading to Moodle 1.6]]&lt;br /&gt;
*[[Upgrading to Moodle 1.8]]&lt;br /&gt;
*[[Upgrading to Moodle 1.9]]&lt;br /&gt;
*[[Upgrading to Moodle 2.0]]&lt;br /&gt;
*[[Environment]]&lt;br /&gt;
*[[Git]] Version control and upgrading&lt;br /&gt;
*Moodle.org [http://moodle.org/mod/forum/view.php?id=28 Installation problems forum] &lt;br /&gt;
*[http://ic.eflclasses.org/tutorials/howtoupgrademoodlewithcpanel.swf How to upgrade Moodle with cpanel tutorial] - screencasts of older Moodle/Cpanel install but useful (also, a very large file that will take some time to load).&lt;br /&gt;
&lt;br /&gt;
Using Moodle.org forum discussions:&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=26731&amp;amp;parent=125858 Using cvs]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=56915 Upgrading from 1.5.2 to 1.7]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=56991 Upgrade nightmares.... any help appreciated]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=62463 After upgrading i get &amp;quot;Your site may not be secure.&amp;quot; msg]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=104887 Best practices for QA]&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[es:Actualización de moodle]]&lt;br /&gt;
[[fr:Mise à jour]]&lt;br /&gt;
[[ja:アップグレード]]&lt;br /&gt;
[[nl:Upgraden]]&lt;br /&gt;
[[zh:升级]]&lt;br /&gt;
[[pl:Aktualizacja]]&lt;br /&gt;
[[de:Aktualisierung von Moodle]]&lt;br /&gt;
[[ru:Обновление]]&lt;/div&gt;</summary>
		<author><name>Plemaire</name></author>
	</entry>
</feed>