<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.moodle.org/39/en/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Battya</id>
	<title>MoodleDocs - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://docs.moodle.org/39/en/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Battya"/>
	<link rel="alternate" type="text/html" href="https://docs.moodle.org/39/en/Special:Contributions/Battya"/>
	<updated>2026-04-18T01:30:56Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://docs.moodle.org/39/en/index.php?title=Question_behaviours&amp;diff=138872</id>
		<title>Question behaviours</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/39/en/index.php?title=Question_behaviours&amp;diff=138872"/>
		<updated>2021-04-22T03:56:50Z</updated>

		<summary type="html">&lt;p&gt;Battya: /* How questions behave */ Bolded the requirement for &amp;quot;Interactive with multiple tries&amp;quot; of having something in the &amp;quot;multiple tries&amp;quot; hint text boxes.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Questions}}&lt;br /&gt;
==How questions behave==&lt;br /&gt;
The following question behaviours are available when [[Quiz settings|creating a quiz]] (also when previewing questions):&lt;br /&gt;
&lt;br /&gt;
;Deferred feedback&lt;br /&gt;
:Students must enter an answer to each question and then submit the entire quiz, before anything is graded or they get any feedback.&lt;br /&gt;
;Adaptive mode and Adaptive mode (no penalties)&lt;br /&gt;
:Allows students to have multiple attempts at the question before moving on to the next question. This behaviour requires that the &amp;quot;Whether correct&amp;quot; box is ticked under &amp;quot;During the attempt&amp;quot; in the &amp;quot;Review options&amp;quot; section, at a minimum. &lt;br /&gt;
;Manual grading&lt;br /&gt;
:Used for [[Essay question type|essay questions]] (irrespective of what the quiz is set to) but you can now choose to have every question in the quiz manually graded, if you wish.&lt;br /&gt;
;Interactive with multiple tries&lt;br /&gt;
:Used for allowing multiple attempts on the same question (perhaps with a grade penalty). Students answer the question and click the &#039;Check&#039; button. If the answer is wrong, the student can click the &#039;Try again&#039; button to try a new response. &#039;&#039;&#039;Importantly, the question definition must contain hints that will be shown after each incorrect attempt, though the hint text can be as minimal as an HTML non-breaking space.&#039;&#039;&#039; Once the student has got the question right, they can no longer change their response. Once the student has got the question wrong too many times, they are just graded wrong (or partially correct) and get shown the feedback. Unless &#039;Allow redo within an attempt&#039; was enabled in the &#039;[[Quiz_settings#Question_behaviour|Question behaviour]]&#039; settings of the quiz, they can no longer change their answer. There can be specific feedback after each try the student makes, in addition to overall feedback about incorrect or correct answers and answer choices. The number of tries the student gets is the number of hints in the question definition plus one, with a minimum of three.&lt;br /&gt;
;Immediate feedback&lt;br /&gt;
:Similar to interactive mode in that the student can submit their response immediately during the quiz attempt, and get it graded. However, they can only submit one response, they cannot change it later.&lt;br /&gt;
;Deferred feedback or Immediate feedback with Certainty-based marking (CBM)&lt;br /&gt;
:With CBM, the student does not only answer the question, but they also indicate how sure they are they got the question right. The grading is adjusted by the choice of certainty, so that students have to reflect honestly on their own level of knowledge in order to get the best mark.&lt;br /&gt;
;Conditional questions&lt;br /&gt;
:If using the Interactive with multiple tries or Immediate Feedback behaviour and with the navigation method set to &#039;Free&#039;, it is possible to make the display of a question dependent on a previous question being answered first.&lt;br /&gt;
:The question editing page will display padlock icons to the right of each question.&lt;br /&gt;
&lt;br /&gt;
==Certainty-based marking==&lt;br /&gt;
When a student answers a question they also have to state how sure they are of the answer: not very (less than 67%); fairly (more than 67%) or very (more than 80%). Their grading is then adjusted according to how certain they are, which means that for example if they answered correctly but were only guessing, their mark is adjusted from 1 to 0.33. If they answered wrongly but were very sure, their mark is adjusted from 0 to -2. &lt;br /&gt;
&lt;br /&gt;
For detailed information on how CBM works and how students can benefit from it, see [[Using certainty-based marking]].&lt;br /&gt;
{|&lt;br /&gt;
| [[File:cbm03.png|thumb|correct answer; very sure]]&lt;br /&gt;
| [[File:cbm05.png|thumb|correct answer; fairly sure]]&lt;br /&gt;
| [[File:cmb04.png|thumb|correct answer; not very sure]]&lt;br /&gt;
| [[File:cbm01.png|thumb|wrong answer; very sure]]&lt;br /&gt;
| [[File:cbm99.png|thumb|wrong answer; not very sure]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Managing question behaviours==&lt;br /&gt;
&lt;br /&gt;
An administrator can manage question behaviours available across the site in &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Plugins &amp;gt; Question behaviours &amp;gt; Manage question behaviours&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
==Deferred feedback with explanation==&lt;br /&gt;
[https://moodle.org/plugins/view.php?plugin=qbehaviour_deferredfeedbackexplain Deferred feedback with explanation] is an additional question behaviour, available for Moodle 2.6+,  that is just like deferred feedback, but with an additional input box where students can give a reason why they gave the answer they did. No attempt is made to automatically grade the explanation, nor is it required. &lt;br /&gt;
* It may be used in various ways, for example:&lt;br /&gt;
** The teacher may want to manually edit the grades where the student gave a wrong answer, to give partial credit if the student used the right method or approach.&lt;br /&gt;
** The student might want to explain their thinking, so that later, when the results and feedback are revealed, they are reminded of what they were thinking at the time, and so can reflect more deeply.&lt;br /&gt;
* You can use [[Language customization]] to change the default text string &amp;quot;Explain your reasons&amp;quot;  in the file qbehaviour_deferredfeedbackexplain.php to a more specific text such as &amp;quot;Enter justifications below if you want partial credit in numerical problems by showing your steps, ignore otherwise.&amp;quot; as described in https://moodle.org/mod/forum/discuss.php?d=275752&lt;br /&gt;
&lt;br /&gt;
==Interactive with explanation==&lt;br /&gt;
[[qbehaviour interactiveexplain]] is an additional question behaviour, available for Moodle 3.x,  that is based heavily on Tim Hunts deferred feedback with explanation question behaviour. This behaviour is like the interactive with multiple attempts behaviour, but with an additional text box where students can give a reason why they gave the answer they did. No attempt is made to automatically grade the explanation, nor is it required. The code can be found at https://github.com/marcusgreen/moodle-qbehaviour_interactiveexplain &lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [http://www.ucl.ac.uk/lapt/ LAPT: UCL home of Certainty-Based Marking]&lt;br /&gt;
* [https://moodle.org/mod/forum/discuss.php?d=225920 CBM too harsh?] forum discussion&lt;br /&gt;
* [http://school.moodledemo.net/mod/quiz/view.php?id=1496  School demo example of a quiz with CBM]  Log into with username &amp;quot;parent&amp;quot; and password &amp;quot;moodle&amp;quot;&lt;br /&gt;
* [http://helderenwijzer.nl/2011/10/certainty-based-marking-in-moodle/ Certainty Based Marking in Moodle] blog post by Isabelle Langeveld&lt;br /&gt;
* [http://www.open.edu/openlearnworks/mod/oucontent/view.php?id=51788&amp;amp;section=6 Styles of interactive computer marked assessments] from the Open University &lt;br /&gt;
*[https://moodle.org/mod/forum/discuss.php?d=313947 This forum thread] about adding an &#039;all or nothing&#039;  behaviour for adaptive and deferred feedback for questions in a quiz.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Site administration]]&lt;br /&gt;
&lt;br /&gt;
[[de:Frageverhalten]]&lt;br /&gt;
[[es:Comportamientos de preguntas]]&lt;br /&gt;
[[fr:Comportement des questions]]&lt;/div&gt;</summary>
		<author><name>Battya</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/39/en/index.php?title=OPcache&amp;diff=138476</id>
		<title>OPcache</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/39/en/index.php?title=OPcache&amp;diff=138476"/>
		<updated>2020-09-17T23:43:41Z</updated>

		<summary type="html">&lt;p&gt;Battya: /* Linux, Mac OS and other Unix-like platforms */  Corrected &amp;quot;Mac OS&amp;quot; to &amp;quot;macOS,&amp;quot; which is the official styling of the OS name for the past few years.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Environment}}&lt;br /&gt;
&lt;br /&gt;
The standard OPcache extension is strongly recommended; since Moodle 2.6, it is the only solution officially supported by PHP developers. The benefits are increased performance and significantly lower memory usage. However, opcode caching extensions (including OPcache, eAccelerator and APC) aren&#039;t compatible with servers configured to use some common types of high-security PHP handlers such as suPHP (the default on WHM / cPanel Linux servers).&lt;br /&gt;
&lt;br /&gt;
[[File:Opcache_error.png|800px]]&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
&lt;br /&gt;
The OPcache extension is distributed as part of PHP 5.5 and later. It is available also for older stable PHP releases from PECL under the original name ZendOPcache. To check if the extension is loaded and enabled look at [[PHP#Displaying_phpinfo_in_Moodle|the PHP info page]] under the &#039;&#039;&#039;Zend OPcache&#039;&#039;&#039; heading.&lt;br /&gt;
&lt;br /&gt;
===Linux, macOS and other Unix-like platforms===&lt;br /&gt;
&lt;br /&gt;
You may need to install a specific package, e.g. on CentOS, Fedora or Red Hat: &#039;&#039;&#039;dnf install php-opcache&#039;&#039;&#039;. If necessary add the following to &#039;&#039;&#039;php.ini&#039;&#039;&#039; (package installers may do this automatically):&lt;br /&gt;
&amp;lt;code ini&amp;gt;&lt;br /&gt;
zend_extension=/full/path/to/opcache.so &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Microsoft Windows===&lt;br /&gt;
&lt;br /&gt;
The extension &#039;&#039;&#039;php_opcache.dll&#039;&#039;&#039; is included in the &#039;&#039;&#039;ext&#039;&#039;&#039; folder in the [https://windows.php.net/download PHP for Windows binary downloads].&lt;br /&gt;
To enable it add the following to &#039;&#039;&#039;php.ini&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ini&amp;gt;&lt;br /&gt;
zend_extension=php_opcache.dll&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;php.ini&#039;&#039;&#039; settings:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ini&amp;gt;&lt;br /&gt;
[opcache]&lt;br /&gt;
opcache.enable = 1&lt;br /&gt;
opcache.memory_consumption = 128&lt;br /&gt;
opcache.max_accelerated_files = 10000&lt;br /&gt;
opcache.revalidate_freq = 60&lt;br /&gt;
&lt;br /&gt;
; Required for Moodle&lt;br /&gt;
opcache.use_cwd = 1&lt;br /&gt;
opcache.validate_timestamps = 1&lt;br /&gt;
opcache.save_comments = 1&lt;br /&gt;
opcache.enable_file_override = 0&lt;br /&gt;
&lt;br /&gt;
; If something does not work in Moodle&lt;br /&gt;
;opcache.revalidate_path = 1 ; May fix problems with include paths&lt;br /&gt;
;opcache.mmap_base = 0x20000000 ; (Windows only) fix OPcache crashes with event id 487&lt;br /&gt;
&lt;br /&gt;
; Experimental for Moodle 2.6 and later&lt;br /&gt;
;opcache.fast_shutdown = 1&lt;br /&gt;
;opcache.enable_cli = 1 ; Speeds up CLI cron&lt;br /&gt;
;opcache.load_comments = 0 ; May lower memory use, might not be compatible with add-ons and other apps.&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; memory_consumption&lt;br /&gt;
From: [http://blog.jpauli.tech/2015-03-05-opcache-html/ PHP&#039;s OPCache extension review]&lt;br /&gt;
*&#039;&#039;The size of the memory segment can be told using the opcache.memory_consumption INI setting (Megabytes). Size it big, don&#039;t hesitate to give space. Never ever run out of shared memory space, if you do, you will lock your processes, we&#039;ll get back to that later.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;Size the shared memory segment according to your needs, don&#039;t forget that a production server dedicated to PHP processes may bundle several dozens of Gigabytes of memory, just for PHP. Having a 1Gb shared memory segment (or more) is not uncommon, it will depend on your needs, but if you use a modern application stack, aka framework based, with lots of dependencies etc... , then use at least 1Gb of shared memory.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Having that in mind, set opcache.memory_consumption to a value high enough to avoid filling it up (as long as your RAM usage allows you to), and then monitor the OPCache to adjust that value to its optimal size. As the total size of the PHP files in a standard Moodle 3.6 is almost 90MB, setting this value higher than that can be a good idea. Take into account that the PHP files of the plugins and those on the MoodleData folder (language pack files...) also count, so these values can be different on each installation. If you have several instances of Moodle you should multiply that value by the number of instances.&lt;br /&gt;
&lt;br /&gt;
Tip: If using Linux, you can know the total size of the PHP files of a folder using this command:&lt;br /&gt;
&amp;lt;code ini&amp;gt;&lt;br /&gt;
find ./ -type f -name &amp;quot;*.php&amp;quot; -printf &amp;quot;%s\n&amp;quot; | gawk -M &#039;{t+=$1}END{print t}&#039; | numfmt --to=iec&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; max_accelerated_files&lt;br /&gt;
From: [http://php.net/manual/en/opcache.configuration.php#ini.opcache.max-accelerated-files php.net max-accelerated-files]&lt;br /&gt;
*&#039;&#039;The maximum number of keys (and therefore scripts) in the OPcache hash table. The actual value used will be the first number in the set of prime numbers { 223, 463, 983, 1979, 3907, 7963, 16229, 32531, 65407, 130987 } that is greater than or equal to the configured value. The minimum value is 200. The maximum value is 100000 in PHP &amp;lt; 5.5.6, and 1000000 in later versions.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As Moodle 3.6 contains almost 10.000 php files it is recommended above that opcache.max_accelerated_files should be set to 10000 to accommodate this (16229 will actually be used as per the explanation above). If you have several instances of Moodle you should multiply that value by the number of instances.&lt;br /&gt;
&lt;br /&gt;
If many additional plugins are installed so that your total PHP files exceed 16229 then the next most suitable value for max_accelerated_files should be used.&lt;br /&gt;
Tip: If using Linux, you can know the total PHP files of your Moodle using this command:&lt;br /&gt;
&amp;lt;code ini&amp;gt;&lt;br /&gt;
find ./ -type f | grep -E &amp;quot;.*\.php$&amp;quot; | sed -e &#039;s/.*\(\.[a-zA-Z0-9]*\)$/\1/&#039; | sort | uniq -c | sort -n&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Opcache management plugin==&lt;br /&gt;
[[File:Opcache_management_message.png|400px]]&lt;br /&gt;
&lt;br /&gt;
You may consider installing the additional [https://moodle.org/plugins/tool_opcache Opcache management] - Moodle plugin which adds a PHP Opcache management GUI to Moodle site administration, a CLI tool to reset PHP Opcache and a Nagios check for PHP Opcache.&lt;br /&gt;
&lt;br /&gt;
[[File:Opcache management status.png|800px]]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [http://pecl.php.net/package/ZendOpcache PECL ZendOPcache]&lt;br /&gt;
&lt;br /&gt;
Forum discussions:&lt;br /&gt;
* [https://moodle.org/mod/forum/discuss.php?d=244133 OPcache: Memory Usage = 100% (is this good or bad?)]&lt;br /&gt;
* [https://moodle.org/mod/forum/discuss.php?d=245885 OPCode cache]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Environment]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category:Performance]]&lt;br /&gt;
&lt;br /&gt;
[[es:OPcache]]&lt;/div&gt;</summary>
		<author><name>Battya</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/39/en/index.php?title=Site_backup&amp;diff=138441</id>
		<title>Site backup</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/39/en/index.php?title=Site_backup&amp;diff=138441"/>
		<updated>2020-09-12T00:55:16Z</updated>

		<summary type="html">&lt;p&gt;Battya: Updated the AutoMySQLBackup URL to the actively-maintained fork on GitHub, as the original developer has handed it off.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Backup}}&lt;br /&gt;
A site backup allows a site administrator to save everything associated with a moodle site. These backups can be restored to bring a site back to the point in time when the backup was made.  &lt;br /&gt;
&lt;br /&gt;
Performing regular backups are highly recommended to reduce the amount of lost information in the event of a problem on the site and to speed the overall recovery process.&lt;br /&gt;
&lt;br /&gt;
== What needs to be backed up? ==&lt;br /&gt;
&lt;br /&gt;
A Moodle system comprises three parts:&lt;br /&gt;
# The data stored in the database (For example, a MySQL database)&lt;br /&gt;
# The uploaded files (For example, site and course files uploaded via Moodle located in moodledata)&lt;br /&gt;
# The &#039;&#039;&#039;Moodle code&#039;&#039;&#039; (For example, everything in server/htdocs/moodle)&lt;br /&gt;
You can confirm where all these things are located in a Moodle installation by checking the &#039;&#039;&#039;[[Configuration file|config.php]]&#039;&#039;&#039; file. &lt;br /&gt;
&lt;br /&gt;
:# &#039;&#039;&#039;$CFG-&amp;gt;dbname&#039;&#039;&#039; shows the database name&lt;br /&gt;
:# &#039;&#039;&#039;$CFG-&amp;gt;prefix&#039;&#039;&#039; shows the the database table name prefix&lt;br /&gt;
:# &#039;&#039;&#039;$CFG-&amp;gt;dataroot&#039;&#039;&#039; controls where the &#039;&#039;uploaded files&#039;&#039; are stored; and&lt;br /&gt;
:# &#039;&#039;&#039;$CFG-&amp;gt;wwwroot&#039;&#039;&#039; points to where the &#039;&#039;code&#039;&#039; is stored.&lt;br /&gt;
&lt;br /&gt;
;Tip &lt;br /&gt;
Generally speaking, the database (&amp;quot;dbname and prefix&amp;quot;) and the uploaded files (dataroot) are the two most important to copy on a regular basis. These contain information that will change most often. &lt;br /&gt;
&lt;br /&gt;
The Moodle code (wwwroot) is less important as a frequent backup, since it will only change when the the actual code is changed through upgrades, addins and code tweaks. You can always get a copy of the standard Moodle code from http://download.moodle.org so you only have to backup the parts you added or changed yourself.&lt;br /&gt;
&lt;br /&gt;
== Creating a backup of your Moodle site ==&lt;br /&gt;
&lt;br /&gt;
=== Database ===&lt;br /&gt;
&lt;br /&gt;
The right way to back up your database depends on which database system you are using. The instructions below are one way to back up a MySQL database. Another option would be to use a tool like phpMyAdmin to manually make a backup. The documentation for your database will give more options.&lt;br /&gt;
&lt;br /&gt;
There are many ways to do such backups. Here is an outline of a little script you can run on Unix to backup the database (it works well to have such a script run daily via a cron task):&lt;br /&gt;
&lt;br /&gt;
 cd /my/backup/directory&lt;br /&gt;
 mv moodle-database.sql.gz moodle-database-old.sql.gz&lt;br /&gt;
 mysqldump -h example.com -u myusername --password=mypassword -C -Q -e --create-options mydatabasename &amp;gt; moodle-database.sql&lt;br /&gt;
 gzip moodle-database.sql&lt;br /&gt;
&lt;br /&gt;
Also consider using an option to help ensure that the backup is consistent (e.g. avoid the data changing half-way through the backup), e.g. for MySQL/MariaDB and mysqldump try  [https://dev.mysql.com/doc/refman/5.7/en/mysqldump.html#option_mysqldump_single-transaction --single-transaction].&lt;br /&gt;
&lt;br /&gt;
==== Character encoding ====&lt;br /&gt;
Make sure that a database backup uses the correct character encoding. In most databases, use [[UTF-8]].&lt;br /&gt;
&lt;br /&gt;
When dumping the entire Moodle database, check for possible character encoding issues. In some instances, backups created with [http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html mysqldump] or [http://www.phpmyadmin.net phpMyAdmin] may not properly encode all of the data.  This will result in non-readable characters when the database is restored. &lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Tip&#039;&#039;: One solution is to use MySQL Administrator 1.1 or another tool that will force a UTF-8 dump of the data.&lt;br /&gt;
&lt;br /&gt;
==== Tools for database backups ====&lt;br /&gt;
&lt;br /&gt;
; phpMyAdmin&lt;br /&gt;
: [http://www.phpmyadmin.net phpMyAdmin] is the tool of choice with most web hosting providers.&lt;br /&gt;
&lt;br /&gt;
; MySQLDumper&lt;br /&gt;
: [https://sourceforge.net/projects/mysqldumper/ MySQLDumper] is a backup script for MySQL databases, written in PHP and Perl. MySQLDumper uses a proprietary technique to avoid execution interruption when running PHP scripts (the max. execution time is usually set to 30 seconds). MySQLDumper also cares for the encoding problems mentioned above. It also works with compressed files and allows setting up regular cron jobs for updating and updating to a remote FTP site.&lt;br /&gt;
&lt;br /&gt;
; AutoMySQLBackup&lt;br /&gt;
: [https://github.com/sixhop/AutoMySQLBackup AutoMySQLBackup] is a backup script for MySQL databases, written in PHP. AutoMySQLBackup will create Daily, Weekly and Monthly backups of one or more of your MySQL databases from one or more of your MySQL servers. Features include email notification, compression and encryption, configurable backup rotation, incremental database backups, and more.&lt;br /&gt;
&lt;br /&gt;
=== Uploaded files (moodledata) ===&lt;br /&gt;
Through the Moodle interface, users can upload or create files and folders.  These are located in a directory, often called &amp;quot;moodledata&amp;quot;. Since they are just files and folders, there are many different ways to backup or copy moodledata.  &lt;br /&gt;
&lt;br /&gt;
* For example, using a file transfer program, copy the entire moodledata directory to a different area, drive or computer.  Example of file transfer programs include: FTP, WinSP, wget, rsync.&lt;br /&gt;
&lt;br /&gt;
* You might use a compression program  to create compact files (tar, zip. 7z, XZ, BZIP2, GZIP, and WIM are a few file formats) of the entire directory.  This can be done before or after file transfers.&lt;br /&gt;
&lt;br /&gt;
; Tips &lt;br /&gt;
* Typically not all moodledata files change between regular/periodic backups. A new Administrator might want to look into [http://en.wikipedia.org/wiki/Incremental_backup incremental or other efficient backups] procedures. &lt;br /&gt;
* Depending upon the operating environment there are many tools for backing up server files and ways of backing up moodledata.  See [[Tools_for_backing_up_server_files]] for tips on using rsync, FTP or Wget.&lt;br /&gt;
&lt;br /&gt;
=== Moodle code ===&lt;br /&gt;
Backing up the Moodle code, will be similar to backing up moodledata. See [[Tools for backing up server files]].&lt;br /&gt;
&lt;br /&gt;
;Tip&lt;br /&gt;
It is always a good idea to have several backup copies of your Moodle code files.  While you can always download a fresh base copy of the Moodle code from http://download.moodle.org, you might have customized that code. It is a good idea to create a separate backup of your Moodle code before you customize the code.  This includes installing [[Contributed code]], [[Themes]] and upgrading.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=k5rwTy3sNh0 Screencast: How to back up a Moodle site] (thanks to Bruce Chambr)&lt;br /&gt;
*[[Site restore]] Now that you have a backup, how to restore it&lt;br /&gt;
* [[Moodle migration]] - move a Moodle site to a different server&lt;br /&gt;
* Using Moodle [http://moodle.org/mod/forum/discuss.php?d=140949 Site DatabaseBackup Using phpMyAdmin] forum discussion&lt;br /&gt;
* [[Site Backup for Low-tech Users]]&lt;br /&gt;
&lt;br /&gt;
[[de:Sicherung der Moodle-Installation]]&lt;br /&gt;
[[ja:サイトバックアップ]]&lt;br /&gt;
[[es:Copia de seguridad del sitio]]&lt;br /&gt;
[[fr:Sauvegarde de site]]&lt;/div&gt;</summary>
		<author><name>Battya</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/39/en/index.php?title=Cron_with_Unix_or_Linux&amp;diff=138059</id>
		<title>Cron with Unix or Linux</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/39/en/index.php?title=Cron_with_Unix_or_Linux&amp;diff=138059"/>
		<updated>2020-08-14T08:14:27Z</updated>

		<summary type="html">&lt;p&gt;Battya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Installing Moodle}}&lt;br /&gt;
On Unix and Linux use the built in &#039;&#039;cron&#039;&#039; program which is standard on nearly all systems. You are required to add a command to the &#039;crontab&#039; (the table that holds cron commands) for the web server user. &lt;br /&gt;
&lt;br /&gt;
There are two different methods that can be used to invoke the Moodle cron process:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; The commands shown need to be added to the crontab to function (described in a moment). However, you can - and should - run them on the command line to check they work first. &lt;br /&gt;
&lt;br /&gt;
== Method 1: The command line (cli) cron ==&lt;br /&gt;
&lt;br /&gt;
If you have a choice, this is normally the best way to run Moodle cron. &lt;br /&gt;
&lt;br /&gt;
PHP is also capable of running programs directly from the command line. Your system needs to be set up to do this; specifically you need the &#039;CLI&#039; version of PHP to be installed. Most systems with PHP installed will have this by default. If you have the PHP CLI version installed then this is the recommended method of invoking cron. The correct command will be something like...&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/usr/bin/php /path/to/moodle/admin/cli/cron.php&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
(substitute the correct path to moodle and for php as required)&lt;br /&gt;
&lt;br /&gt;
You can simply type this on the command line this to see if it works. If you are not sure about the path to PHP you can type &amp;quot;&amp;lt;code&amp;gt;which php&amp;lt;/code&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip:&#039;&#039;&#039;: If you have problems, see the [[PHP]] page. In particular, suspect an alternate php.ini for the CLI PHP command which may not have suitable settings.&lt;br /&gt;
&lt;br /&gt;
== Method 2: Web based cron ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; In order to use the web based cron script you must first check [[Cron settings]] to make sure this method is permitted. &lt;br /&gt;
&lt;br /&gt;
The idea is to call the following web page (you can try this from your browser):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://url.of.your/moodle/admin/cron.php&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A command line (text based) browser is needed to run this on the server. Possibilities are as follows (OSX, for example, only ships with curl)...&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/usr/bin/wget -q -O /dev/null/ http://url.of.your/moodle/admin/cron.php&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
(no output is displayed - remove the &#039;&#039;-O /dev/null/&#039;&#039; to test)&lt;br /&gt;
&lt;br /&gt;
...OR...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/usr/bin/curl http://url.of.your/moodle/admin/cron.php -o /dev/null/ -silent&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
(no output is displayed - remove the &#039;&#039;-o /dev/null/ -silent&#039;&#039; to test)&lt;br /&gt;
&lt;br /&gt;
==Using the crontab program on Unix/Linux==&lt;br /&gt;
&lt;br /&gt;
Once you have selected (and tested!) an appropriate command to invoke the Moodle cron it must be added to the web users &#039;crontab&#039; to schedule it to run regularly. &#039;Crontab&#039; is both a file containing the user&#039;s cron commands and is also the name of the (command line) program used to edit it. Use the following command (as root) substituting the correct user in place of &#039;www-data&#039; (e.g. &#039;apache&#039; for Centos, &#039;www-data&#039; for Debian/Ubuntu, &#039;_www&#039; for macOS—Google will know!)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# crontab -u www-data -e&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will bring up an editor window (the first time it may ask you which editor to use). Add the command onto the end of the file in this way (it may be empty or it may have some instructional comments):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 */1 * * * * /usr/bin/php  /path/to/moodle/admin/cli/cron.php &amp;gt;/dev/null&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The first five entries specify the times, followed by the command, to run. This says to run the command every minute which is normally ok. On a hosted system you may get complaints if you do not run it a lot less often (e.g. to run every two hours use &#039;0 */2 * * *&#039; for the first five entries). If you want to use the wget/curl version, the first five entries remain the same - just change the command part.&lt;br /&gt;
&lt;br /&gt;
== High performance cron tasks ==&lt;br /&gt;
&lt;br /&gt;
Each time cron is run, after the scheduled tasks the adhoc tasks are also run. But adhoc tasks can be queued at any moment, and generally you want them processed as soon as possible and to not have to wait for the scheduled task to run first. You can run one or more dedicated adhoc task processors:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 * * * * * /usr/bin/php  /path/to/moodle/admin/cli/adhoc_task.php --execute &amp;gt;/dev/null&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Starting from Moodle 3.9 you can tell it to stay alive when the queue is empty waiting for new tasks:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 * * * * * /usr/bin/php  /path/to/moodle/admin/cli/adhoc_task.php --execute --keep-alive=59 &amp;gt;/dev/null&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have a very high low number of adhoc tasks, or scheduled tasks, you can also spawn multiple cron.php and adhoc_task.php processes to get more throughput. By default Moodle will make sure than no more than 3 processes run at any time, you can tune these limits as needed in  Site administration &amp;gt; Server &amp;gt; Tasks &amp;gt; Task processing &lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [http://linuxweblog.com/node/24 A basic crontab tutorial] &lt;br /&gt;
* [http://www.freebsd.org/cgi/man.cgi?query=crontab&amp;amp;apropos=0&amp;amp;sektion=5&amp;amp;manpath=FreeBSD+6.0-RELEASE+and+Ports&amp;amp;format=html Online version of the man page]&lt;br /&gt;
* [http://www.easycron.com/predictor Predicting Cron job&#039;s run time]&lt;br /&gt;
&lt;br /&gt;
[[es:Cron con Unix o Linux]]&lt;/div&gt;</summary>
		<author><name>Battya</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/39/en/index.php?title=OPcache&amp;diff=138051</id>
		<title>OPcache</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/39/en/index.php?title=OPcache&amp;diff=138051"/>
		<updated>2020-08-14T06:42:33Z</updated>

		<summary type="html">&lt;p&gt;Battya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Environment}}&lt;br /&gt;
&lt;br /&gt;
The standard OPcache extension is strongly recommended; since Moodle 2.6, it is the only solution officially supported by PHP developers. The benefits are increased performance and significantly lower memory usage. However, opcode caching extensions (including OPcache, eAccelerator and APC) aren&#039;t compatible with servers configured to use some common types of high-security PHP handlers such as suPHP (the default on WHM / cPanel Linux servers).&lt;br /&gt;
&lt;br /&gt;
[[File:Opcache_error.png|800px]]&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
&lt;br /&gt;
The OPcache extension is distributed as part of PHP 5.5.0 and later. It is available also for older stable PHP releases from PECL under the original name ZendOPcache.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE: If you are running PHP 5.3 or 5.4 you can safely ignore the Environment Check message about OpCache. Nonetheless, [https://moodle.org/mod/forum/discuss.php?d=245885 it might be useful] to upgrade Operating System/PHP and get to 5.5 or newer; as there have been all sorts of problems described on PHP 5.2 and 5.3, and upgrading PHP turned out to be the easier solution. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
=== Windows ===&lt;br /&gt;
PHP.ini settings &#039;&#039;&#039;&#039;&#039;for Windows&#039;&#039;&#039;&#039;&#039; (see immediately below for normal environments):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ini&amp;gt;&lt;br /&gt;
[opcache]&lt;br /&gt;
zend_extension = php_opcache.dll&lt;br /&gt;
opcache.enable = 1&lt;br /&gt;
opcache.memory_consumption = 128&lt;br /&gt;
opcache.max_accelerated_files = 10000&lt;br /&gt;
opcache.revalidate_freq = 60&lt;br /&gt;
&lt;br /&gt;
; Required for Moodle&lt;br /&gt;
opcache.use_cwd = 1&lt;br /&gt;
opcache.validate_timestamps = 1&lt;br /&gt;
opcache.save_comments = 1&lt;br /&gt;
opcache.enable_file_override = 0&lt;br /&gt;
&lt;br /&gt;
; If something does not work in Moodle&lt;br /&gt;
;opcache.revalidate_path = 1 ; May fix problems with include paths&lt;br /&gt;
;opcache.mmap_base = 0x20000000 ; (Windows only) fix OPcache crashes with event id 487&lt;br /&gt;
&lt;br /&gt;
; Experimental for Moodle 2.6 and later&lt;br /&gt;
;opcache.fast_shutdown = 1&lt;br /&gt;
;opcache.enable_cli = 1 ; Speeds up CLI cron&lt;br /&gt;
;opcache.load_comments = 0 ; May lower memory use, might not be compatible with add-ons and other apps.&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
=== Unix/Linux/macOS ===&lt;br /&gt;
When using &#039;&#039;&#039;&#039;&#039;non-Windows&#039;&#039;&#039;&#039;&#039; (i.e., normal Unix/Linux/macOS) platforms, you have to use the &#039;&#039;zend_extension&#039;&#039; configuration to load the OPcache extension into PHP by adding to php.ini.&lt;br /&gt;
&amp;lt;code ini&amp;gt;&lt;br /&gt;
zend_extension=/full/path/to/opcache.so &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
===IIS===&lt;br /&gt;
When using IIS you will need PHP 5.5 and you will need to add the extension for opcache under the &#039;&#039;ExtensionList&#039;&#039; section of the php.ini file. For PHP 5.3 and 5.4 you can download the binaries separately from [http://windows.php.net/downloads/pecl/releases/opcache] and you will also need to enter full absolute path to the module dll in php.ini.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ini&amp;gt;&lt;br /&gt;
[ExtensionList]&lt;br /&gt;
...&lt;br /&gt;
zend_extension=php_opcache.dll&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; memory_consumption&lt;br /&gt;
From: [http://blog.jpauli.tech/2015-03-05-opcache-html/ PHP&#039;s OPCache extension review]&lt;br /&gt;
*&#039;&#039;The size of the memory segment can be told using the opcache.memory_consumption INI setting (Megabytes). Size it big, don&#039;t hesitate to give space. Never ever run out of shared memory space, if you do, you will lock your processes, we&#039;ll get back to that later.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;Size the shared memory segment according to your needs, don&#039;t forget that a production server dedicated to PHP processes may bundle several dozens of Gigabytes of memory, just for PHP. Having a 1Gb shared memory segment (or more) is not uncommon, it will depend on your needs, but if you use a modern application stack, aka framework based, with lots of dependencies etc... , then use at least 1Gb of shared memory.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Having that in mind, set opcache.memory_consumption to a value high enough to avoid filling it up (as long as your RAM usage allows you to), and then monitor the OPCache to adjust that value to its optimal size. As the total size of the PHP files in a standard Moodle 3.6 is almost 90MB, setting this value higher than that can be a good idea. Take into account that the PHP files of the plugins and those on the MoodleData folder (language pack files...) also count, so these values can be different on each installation. If you have several instances of Moodle you should multiply that value by the number of instances.&lt;br /&gt;
&lt;br /&gt;
Tip: If using Linux, you can know the total size of the PHP files of a folder using this command:&lt;br /&gt;
&amp;lt;code ini&amp;gt;&lt;br /&gt;
find ./ -type f -name &amp;quot;*.php&amp;quot; -printf &amp;quot;%s\n&amp;quot; | gawk -M &#039;{t+=$1}END{print t}&#039; | numfmt --to=iec&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; max_accelerated_files&lt;br /&gt;
From: [http://php.net/manual/en/opcache.configuration.php#ini.opcache.max-accelerated-files php.net max-accelerated-files]&lt;br /&gt;
*&#039;&#039;The maximum number of keys (and therefore scripts) in the OPcache hash table. The actual value used will be the first number in the set of prime numbers { 223, 463, 983, 1979, 3907, 7963, 16229, 32531, 65407, 130987 } that is greater than or equal to the configured value. The minimum value is 200. The maximum value is 100000 in PHP &amp;lt; 5.5.6, and 1000000 in later versions.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As Moodle 3.6 contains almost 10.000 php files it is recommended above that opcache.max_accelerated_files should be set to 10000 to accommodate this (16229 will actually be used as per the explanation above). If you have several instances of Moodle you should multiply that value by the number of instances.&lt;br /&gt;
&lt;br /&gt;
If many additional plugins are installed so that your total PHP files exceed 16229 then the next most suitable value for max_accelerated_files should be used.&lt;br /&gt;
Tip: If using Linux, you can know the total PHP files of your Moodle using this command:&lt;br /&gt;
&amp;lt;code ini&amp;gt;&lt;br /&gt;
find ./ -type f | grep -E &amp;quot;.*\.php$&amp;quot; | sed -e &#039;s/.*\(\.[a-zA-Z0-9]*\)$/\1/&#039; | sort | uniq -c | sort -n&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Opcache management plugin==&lt;br /&gt;
[[File:Opcache_management_message.png|400px]]&lt;br /&gt;
&lt;br /&gt;
You may consider installing the additional [https://moodle.org/plugins/tool_opcache Opcache management] - Moodle plugin which adds a PHP Opcache management GUI to Moodle site administration, a CLI tool to reset PHP Opcache and a Nagios check for PHP Opcache.&lt;br /&gt;
&lt;br /&gt;
[[File:Opcache management status.png|800px]]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [http://pecl.php.net/package/ZendOpcache PECL ZendOPcache]&lt;br /&gt;
* [http://windows.php.net/downloads/pecl/releases/opcache/ Windows builds for PHP 5.3-5.4]&lt;br /&gt;
&lt;br /&gt;
Forum discussions:&lt;br /&gt;
* [https://moodle.org/mod/forum/discuss.php?d=244133 OPcache: Memory Usage = 100% (is this good or bad?)]&lt;br /&gt;
* [https://moodle.org/mod/forum/discuss.php?d=245885 OPCode cache]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Environment]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category:Performance]]&lt;br /&gt;
&lt;br /&gt;
[[es:OPcache]]&lt;/div&gt;</summary>
		<author><name>Battya</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/39/en/index.php?title=Question_behaviours&amp;diff=115142</id>
		<title>Question behaviours</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/39/en/index.php?title=Question_behaviours&amp;diff=115142"/>
		<updated>2014-10-04T04:32:11Z</updated>

		<summary type="html">&lt;p&gt;Battya: Added clarification to &amp;quot;Adaptive&amp;quot; question behavior.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Questions}}&lt;br /&gt;
==How questions behave==&lt;br /&gt;
The following question behaviours are available when [[Quiz settings|creating a quiz]] (also when previewing questions):&lt;br /&gt;
&lt;br /&gt;
;Deferred feedback&lt;br /&gt;
:Students must enter an answer to each question and then submit the entire quiz, before anything is graded or they get any feedback.&lt;br /&gt;
;Adaptive mode and Adaptive mode (no penalties)&lt;br /&gt;
:Allows students to have multiple attempts at the question before moving on to the next question. This behaviour requires that the &amp;quot;Whether correct&amp;quot; box is ticked under &amp;quot;During the attempt&amp;quot; in the &amp;quot;Review options&amp;quot; section, at a minimum. &lt;br /&gt;
;Manual grading&lt;br /&gt;
:Used for essay questions (irrespective of what the quiz is set to) but you can now choose to have every question in the quiz manually graded, if you wish.&lt;br /&gt;
;Interactive mode&lt;br /&gt;
:After submitting one answer, and reading the feedback, the student has to click a &#039;Try again&#039; button before they can try a new response.  They can be given hints to help them. Once the student has got the question right, they can no longer change their response. Once the student has got the question wrong too many times, they are just graded wrong (or partially correct) and get shown the feedback and can no longer change their answer. There can be different feedback after each try the student makes. The number of tries the student gets is the number of hints in the question definition plus one.&lt;br /&gt;
;Immediate feedback&lt;br /&gt;
:Similar to interactive mode in that the student can submit their response immediately during the quiz attempt, and get it graded. However, they can only submit one response, they cannot change it later.&lt;br /&gt;
;Deferred feedback or Immediate feedback with Certainty-based marking (CBM)&lt;br /&gt;
:With CBM, the student does not only answer the question, but they also indicate how sure they are they got the question right. The grading is adjusted by the choice of certainty, so that students have to reflect honestly on their own level of knowledge in order to get the best mark. &lt;br /&gt;
&lt;br /&gt;
==Certainty-based marking==&lt;br /&gt;
When a student answers a question they also have to state how sure they are of the answer: not very (less than 67%); fairly (more than 67%) or very (more than 80%). Their grading is then adjusted according to how certain they are, which means that for example if they answered correctly but were only guessing, their mark is adjusted from 1 to 0.33. If they answered wrongly but were very sure, their mark is adjusted from 0 to -2. &lt;br /&gt;
&lt;br /&gt;
For detailed information on how CBM works and how students can benefit from it, see [[Using certainty-based marking]].&lt;br /&gt;
{|&lt;br /&gt;
| [[File:cbm03.png|thumb|correct answer; very sure]]&lt;br /&gt;
| [[File:cbm05.png|thumb|correct answer; fairly sure]]&lt;br /&gt;
| [[File:cmb04.png|thumb|correct answer; not very sure]]&lt;br /&gt;
| [[File:cbm01.png|thumb|wrong answer; very sure]]&lt;br /&gt;
| [[File:cbm99.png|thumb|wrong answer; not very sure]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Managing question behaviours==&lt;br /&gt;
&lt;br /&gt;
An administrator can manage question behaviours available across the site in &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Plugins &amp;gt; Question behaviours &amp;gt; Manage question behaviours&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [http://www.ucl.ac.uk/lapt/ LAPT: UCL home of Certainty-Based Marking]&lt;br /&gt;
* [https://moodle.org/mod/forum/discuss.php?d=225920 CBM too harsh?] forum discussion&lt;br /&gt;
*[http://school.demo.moodle.net/mod/quiz/view.php?id=1496  School demo example of a quiz with CBM]  Log into with username &amp;quot;parent&amp;quot; and password &amp;quot;moodle&amp;quot;&lt;br /&gt;
*[http://helderenwijzer.nl/2011/10/certainty-based-marking-in-moodle/ Certainty Based Marking in Moodle] blog post by Isabelle Langeveld&lt;br /&gt;
&lt;br /&gt;
[[Category:Site administration]]&lt;br /&gt;
&lt;br /&gt;
[[de:Frageverhalten]]&lt;br /&gt;
[[es:Comportamientos de preguntas]]&lt;/div&gt;</summary>
		<author><name>Battya</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/39/en/index.php?title=Cron_with_MAC_OS_X&amp;diff=111228</id>
		<title>Cron with MAC OS X</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/39/en/index.php?title=Cron_with_MAC_OS_X&amp;diff=111228"/>
		<updated>2014-03-21T07:03:19Z</updated>

		<summary type="html">&lt;p&gt;Battya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Cron}}&lt;br /&gt;
&#039;&#039;&#039;NOTE: This describes setting up Moodle&#039;s cron using OSX&#039;s launchd system. However, since OSX is a variant of Unix, cron is also an option. It should be noted, however, that OSX cron is actually managed by launchd.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==launchd==&lt;br /&gt;
&lt;br /&gt;
In Mac OS X 10.5+ you will find the system daemon &#039;&#039;launchd&#039;&#039; for this service. This daemon offers a standardized interface to any user and all programs started automatically by the system. Please look at http://developer.apple.com/macosx/launchd.html for more informations about the configurations and all parameters. &lt;br /&gt;
&lt;br /&gt;
The service should get the web page http://path.to.your/moodle/admin/cron.php every few minutes. The configuration will be done by the file named &#039;&#039;moodle4mac.cron.plist&#039;&#039; which must be placed in the system folder &#039;&#039;/Library/LaunchDaemons/&#039;&#039; ... surely you can use any other file name but it should say something about the function of the service. The extension must be &#039;&#039;.plist&#039;&#039;. After any reboot of your Mac server the cron service will start automaticly because the file is placed in the correct system folder.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; Check the [[Cron settings]] to make sure running the web version of Moodle&#039;s cron is permitted.&lt;br /&gt;
&lt;br /&gt;
===Use the graphical way===&lt;br /&gt;
You can use Lingon (no longer supported, unfortunately) to add a new daemon plist or to edit one. It produces the same text as you can write in your text editor. http://sourceforge.net/projects/lingon/files/&lt;br /&gt;
&lt;br /&gt;
[[Image:macosx-lingon.png|thumb|center|Lingon screenshot]]&lt;br /&gt;
&lt;br /&gt;
===Use a text editor===&lt;br /&gt;
Please use a text editor to write the needed file. You can open the Terminal and use the system editors vi or pico. But you can also write the text file with any GUI text editor ... I mostly use TextWrangler ... but do NOT take an editor for formatted texts like Microsoft Word or OpenOffice Writer. You must get pure text!&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple Computer//DTD PLIST 1.0//EN&amp;quot; &lt;br /&gt;
      &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;dict&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;KeepAlive&amp;lt;/key&amp;gt;&amp;lt;false/&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;Label&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;moodle4mac.cron&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;ProgramArguments&amp;lt;/key&amp;gt;&lt;br /&gt;
 &amp;lt;array&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;curl&amp;lt;/string&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;-s&amp;lt;/string&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;http://your-server-address/moodle19/admin/cron.php&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;/array&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;RunAtLoad&amp;lt;/key&amp;gt;&amp;lt;true /&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StartInterval&amp;lt;/key&amp;gt;&amp;lt;integer&amp;gt;300&amp;lt;/integer&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StandardErrorPath&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;/dev/null&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StandardOutPath&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;/dev/null&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;/dict&amp;gt;&lt;br /&gt;
 &amp;lt;/plist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The label string must be the same as the file name is but without the extension &#039;&#039;.plist&#039;&#039;. Save the text file &#039;&#039;/Library/LaunchDaemons/moodle4mac.cron.plist&#039;&#039;. The owner of the file must be set to the system user &#039;&#039;root&#039;&#039; with the following:&lt;br /&gt;
&lt;br /&gt;
 sudo chown root /Library/LaunchDaemons/moodle4mac.cron.plist&lt;br /&gt;
&lt;br /&gt;
If you use a site with SSL (ie: it has an http&#039;&#039;&#039;s&#039;&#039;&#039;:// protocol) you either need to have your SSL certificates listed for use by the CURL utility ([http://curl.haxx.se/docs/sslcerts.html see these docs] for more details) OR you must use the &#039;-k&#039; switch in addition to the &#039;-s&#039; switch used above; your arguments line would then read: `&amp;lt;string&amp;gt;-s -k&amp;lt;/string&amp;gt;`.&lt;br /&gt;
&lt;br /&gt;
That&#039;s all, really!&lt;br /&gt;
&lt;br /&gt;
===How to start and stop the cron service===&lt;br /&gt;
You can start the new cron service in the Terminal.&lt;br /&gt;
&lt;br /&gt;
 sudo launchctl load /Library/LaunchDaemons/moodle4mac.cron.plist&lt;br /&gt;
&lt;br /&gt;
The following command would stop the service. If you want to activate changes in the cron service you need to &#039;&#039;unload&#039;&#039; and then to &#039;&#039;load&#039;&#039; the daemon again.&lt;br /&gt;
&lt;br /&gt;
 sudo launchctl unload /Library/LaunchDaemons/moodle4mac.cron.plist&lt;br /&gt;
&lt;br /&gt;
===Only one service for two servers?===&lt;br /&gt;
For my server I needed to have a cron service for to instances &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; ... no problem ... with the typo &#039;&#039;moodle[19-20]&#039;&#039; I will get a cron service for both.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;curl -s http://your-server-address/moodle[19-20]/admin/cron.php&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see if the cron service works correctly you should look at the &#039;&#039;access.log&#039;&#039; of your web server. The cron.php should be accessed every 5 minutes ... on my server for both Moodle instances &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; ... oh yes, it works!!&lt;br /&gt;
&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:10:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 1136&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:10:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 1403&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:11:18 +0200] &amp;quot;OPTIONS * HTTP/1.0&amp;quot; 200 -&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:15:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 735&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:15:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 964&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:20:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 1136&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:20:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 1365&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[es:Cron con MAC OS X]]&lt;/div&gt;</summary>
		<author><name>Battya</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/39/en/index.php?title=Cron_with_MAC_OS_X&amp;diff=111227</id>
		<title>Cron with MAC OS X</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/39/en/index.php?title=Cron_with_MAC_OS_X&amp;diff=111227"/>
		<updated>2014-03-21T06:22:08Z</updated>

		<summary type="html">&lt;p&gt;Battya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Cron}}&lt;br /&gt;
&#039;&#039;&#039;NOTE: This describes setting up Moodle&#039;s cron using OSX&#039;s launchd system. However, since OSX is a variant of Unix, we recommend simply using crontab, as it works just as well and is much simpler&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==launchd==&lt;br /&gt;
&lt;br /&gt;
In Mac OS X 10.5+ you will find the system daemon &#039;&#039;launchd&#039;&#039; for this service. This daemon offers a standardized interface to any user and all programs started automatically by the system. Please look at http://developer.apple.com/macosx/launchd.html for more informations about the configurations and all parameters. &lt;br /&gt;
&lt;br /&gt;
The service should get the web page http://path.to.your/moodle/admin/cron.php every few minutes. The configuration will be done by the file named &#039;&#039;moodle4mac.cron.plist&#039;&#039; which must be placed in the system folder &#039;&#039;/Library/LaunchDaemons/&#039;&#039; ... surely you can use any other file name but it should say something about the function of the service. The extension must be &#039;&#039;.plist&#039;&#039;. After any reboot of your Mac server the cron service will start automaticly because the file is placed in the correct system folder.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; Check the [[Cron settings]] to make sure running the web version of Moodle&#039;s cron is permitted.&lt;br /&gt;
&lt;br /&gt;
===Use the graphical way===&lt;br /&gt;
You can use Lingon (no longer supported, unfortunately) to add a new daemon plist or to edit one. It produces the same text as you can write in your text editor. http://sourceforge.net/projects/lingon/files/&lt;br /&gt;
&lt;br /&gt;
[[Image:macosx-lingon.png|thumb|center|Lingon screenshot]]&lt;br /&gt;
&lt;br /&gt;
===Use a text editor===&lt;br /&gt;
Please use a text editor to write the needed file. You can open the Terminal and use the system editors vi or pico. But you can also write the text file with any GUI text editor ... I mostly use TextWrangler ... but do NOT take an editor for formatted texts like Microsoft Word or OpenOffice Writer. You must get pure text!&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple Computer//DTD PLIST 1.0//EN&amp;quot; &lt;br /&gt;
      &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;dict&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;KeepAlive&amp;lt;/key&amp;gt;&amp;lt;false/&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;Label&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;moodle4mac.cron&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;ProgramArguments&amp;lt;/key&amp;gt;&lt;br /&gt;
 &amp;lt;array&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;curl&amp;lt;/string&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;-s&amp;lt;/string&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;http://your-server-address/moodle19/admin/cron.php&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;/array&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;RunAtLoad&amp;lt;/key&amp;gt;&amp;lt;true /&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StartInterval&amp;lt;/key&amp;gt;&amp;lt;integer&amp;gt;300&amp;lt;/integer&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StandardErrorPath&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;/dev/null&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StandardOutPath&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;/dev/null&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;/dict&amp;gt;&lt;br /&gt;
 &amp;lt;/plist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The label string must be the same as the file name is but without the extension &#039;&#039;.plist&#039;&#039;. Save the text file &#039;&#039;/Library/LaunchDaemons/moodle4mac.cron.plist&#039;&#039;. The owner of the file must be set to the system user &#039;&#039;root&#039;&#039;.   If you use a site with SSL (ie: it has an http&#039;&#039;&#039;s&#039;&#039;&#039;:// protocol) you either need to have your SSL certificates listed for use by the CURL utility ([http://curl.haxx.se/docs/sslcerts.html see these docs] for more details) OR you must use the &#039;-k&#039; switch in addition to the &#039;-s&#039; switch used above; your arguments line would then read: `&amp;lt;string&amp;gt;-s -k&amp;lt;/string&amp;gt;`.&lt;br /&gt;
&lt;br /&gt;
That&#039;s all, really!&lt;br /&gt;
&lt;br /&gt;
===How to start and stop the cron service===&lt;br /&gt;
You can start the new cron service in the Terminal.&lt;br /&gt;
&lt;br /&gt;
 sudo launchctl load /Library/LaunchDaemons/moodle4mac.cron.plist&lt;br /&gt;
&lt;br /&gt;
The following command would stop the service. If you want to activate changes in the cron service you need to &#039;&#039;unload&#039;&#039; and then to &#039;&#039;load&#039;&#039; the daemon again.&lt;br /&gt;
&lt;br /&gt;
 sudo launchctl unload /Library/LaunchDaemons/moodle4mac.cron.plist&lt;br /&gt;
&lt;br /&gt;
===Only one service for two servers?===&lt;br /&gt;
For my server I needed to have a cron service for to instances &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; ... no problem ... with the typo &#039;&#039;moodle[19-20]&#039;&#039; I will get a cron service for both.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;curl -s http://your-server-address/moodle[19-20]/admin/cron.php&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see if the cron service works correctly you should look at the &#039;&#039;access.log&#039;&#039; of your web server. The cron.php should be accessed every 5 minutes ... on my server for both Moodle instances &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; ... oh yes, it works!!&lt;br /&gt;
&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:10:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 1136&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:10:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 1403&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:11:18 +0200] &amp;quot;OPTIONS * HTTP/1.0&amp;quot; 200 -&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:15:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 735&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:15:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 964&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:20:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 1136&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:20:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 1365&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[es:Cron con MAC OS X]]&lt;/div&gt;</summary>
		<author><name>Battya</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/39/en/index.php?title=Git_for_Administrators&amp;diff=111041</id>
		<title>Git for Administrators</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/39/en/index.php?title=Git_for_Administrators&amp;diff=111041"/>
		<updated>2014-03-13T02:33:20Z</updated>

		<summary type="html">&lt;p&gt;Battya: &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 [[Development:Quick Git start guide for Moodle development|Quick Git start guide for Moodle development]].&lt;br /&gt;
&lt;br /&gt;
To get the most of of Git it is worth making the effort to understand its basic concepts - see the See also section below. It can be a bit of a 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_26_STABLE origin/MOODLE_26_STABLE     (3)&lt;br /&gt;
$ git checkout MOODLE_26_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_26_STABLE and set it to track the remote branch MOODLE_26_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_26_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.6.&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_26_STABLE origin/MOODLE_26_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.6. 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 issueing 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/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_27_STABLE origin/MOODLE_27_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_27_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 ... [[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>Battya</name></author>
	</entry>
</feed>