<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.moodle.org/21/en/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Rcollman</id>
	<title>MoodleDocs - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://docs.moodle.org/21/en/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Rcollman"/>
	<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/Special:Contributions/Rcollman"/>
	<updated>2026-06-04T05:05:56Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Question_categories&amp;diff=95822</id>
		<title>Question categories</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Question_categories&amp;diff=95822"/>
		<updated>2012-05-03T21:41:14Z</updated>

		<summary type="html">&lt;p&gt;Rcollman: /* Question Sharing */ minor&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Managing questions}}&lt;br /&gt;
A question category can contain individual questions or other question categories.  They can be found by using the  [[Question bank]] or when [[Building Quiz|building a quiz]].&lt;br /&gt;
&lt;br /&gt;
==What are question categories and how are they organized?==&lt;br /&gt;
&lt;br /&gt;
[[Image:question-categories.png|thumb|300px|Question category as a folder]]&lt;br /&gt;
Imagine a question category as a folder that contains questions that are unique to that folder. You can put one or more question categories within another question category.  This is similar to a file system on a computer.  You can have the same file name, with identical content (an identical question) located in many folders, but each file (question) is unique.  Like a file, when you edit one question in a folder, it does not change any other question. &lt;br /&gt;
&lt;br /&gt;
Moodle 2.x introduced context levels.  In short, each context level can have unique question categories and subcategories.   However, the user&#039;s context determines which question categories they can see.  Generally speaking, the System level context question categories can always be seen.  A course level context question category can not be seen/used by another course.  There are other context levels.   &lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;TIP:&#039;&#039; The robust potential for question organization deserves some planning.  Fortunately, it is possible to move question categories between and in context levels, and move questions between question categories.&lt;br /&gt;
&lt;br /&gt;
===Question Sharing===&lt;br /&gt;
&lt;br /&gt;
You can share questions by placing them in a [[Context|context]] level question category. For example, placing a question category categories in the &#039;System&#039; context is similar to publishing the question category so many teachers can potentially use it.  Or for example, placing a question category in a Course category context level (say Math) will hide it from a course in a different course category (say Biology).   See the [[Question contexts]] page for more information.&lt;br /&gt;
&lt;br /&gt;
By default a course teacher cannot see or use any Question context above the course level.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039;&#039;&#039; In 2.x the &amp;quot;System&amp;quot; is the top context level.  In previous versions of Moodle it was call the &amp;quot;Core System&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Adding and managing question categories==&lt;br /&gt;
Settings &amp;gt; Question bank &amp;gt; Categories &lt;br /&gt;
The &amp;quot;Editing categories&amp;quot; page has two sections.  The top is for managing existing categories, and the bottom is for adding categories.&lt;br /&gt;
&lt;br /&gt;
===Adding categories===&lt;br /&gt;
To add a question category you will need to name it, place it within a context level (see [[Question contexts]]) and perhaps place it as a sub category of an existing category.  &lt;br /&gt;
* At the bottom of the category page link, below current categories, you will see a form to add a new category.&lt;br /&gt;
* Choose the &#039;parent&#039; context level with the pull down menu&lt;br /&gt;
** Placing your category in another category makes it a sub-category of the parent category.&lt;br /&gt;
** Choosing &#039;Top&#039; in any of the context means that your category is a top level category, not a sub category of an existing category. &lt;br /&gt;
** Remember, your current context may hide question categories that exist, but are not available.  For example, a question category that is in a course context level of a different course will be hidden. &lt;br /&gt;
* Type the name of your new question category in the text box.&lt;br /&gt;
* Add an optional description in the category info area.&lt;br /&gt;
* Click the &#039;Add Category&#039; button. Your new question category will appear in the list of current categories.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Moving question categories between context levels===&lt;br /&gt;
Settings &amp;gt; Question bank &amp;gt; Categories  &amp;quot;Edit categories section&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
*Select the edit icon of the category which you wish to move. This will bring you to the &amp;quot;Edit this category&amp;quot; form.&lt;br /&gt;
*Use the pull down menu to select the context level, as described in the adding categories section.  &lt;br /&gt;
*Click &amp;quot;Save Changes&amp;quot;  &lt;br /&gt;
&lt;br /&gt;
===Using arrow icons for moving categories within a context level===&lt;br /&gt;
Settings &amp;gt; Question bank &amp;gt; Categories  &amp;quot;Edit categories section&amp;quot;&lt;br /&gt;
You can also arrange the question categories with a context level (only) by using the arrow keys, instead of opening up the &amp;quot;Edit this category&amp;quot; form.  The arrow keys effect is similar to working with an outline on a word processor.&lt;br /&gt;
&lt;br /&gt;
* The up/down arrow icons change the order in which question category &#039;peers&#039; are displayed within a single context level.&lt;br /&gt;
* The right arrow icon changes a category to be a sub category of the category listed immediately above it.&lt;br /&gt;
* The left arrow icon moves the sub category to be a peer of the category above it.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;TIP:&#039;&#039; You can not use the arrow icons to move a question category between context levels.   Thus you can not use an arrow icon to move a question category that is in the course context level to the system context level.  &lt;br /&gt;
&lt;br /&gt;
===Deleting Categories===&lt;br /&gt;
Categories can also be created or deleted at will. However, if you try to delete a category containing questions, then you will be asked to specify another category to move them to. You cannot delete or move the last category in any context, there must always be one category in a context.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[Question contexts]]&lt;br /&gt;
*Using Moodle [http://moodle.org/mod/forum/discuss.php?d=47540 I can see other teacher&#039;s categories] forum discussion&lt;br /&gt;
&lt;br /&gt;
[[fr:Catégories de questions]]&lt;br /&gt;
[[ru:Категории вопросов]]&lt;br /&gt;
[[de:Fragenkategorien]]&lt;/div&gt;</summary>
		<author><name>Rcollman</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Question_categories&amp;diff=95821</id>
		<title>Question categories</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Question_categories&amp;diff=95821"/>
		<updated>2012-05-03T21:33:30Z</updated>

		<summary type="html">&lt;p&gt;Rcollman: /* What are question categories? */  got rid of 1.9 stuff&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Managing questions}}&lt;br /&gt;
A question category can contain individual questions or other question categories.  They can be found by using the  [[Question bank]] or when [[Building Quiz|building a quiz]].&lt;br /&gt;
&lt;br /&gt;
==What are question categories and how are they organized?==&lt;br /&gt;
&lt;br /&gt;
[[Image:question-categories.png|thumb|300px|Question category as a folder]]&lt;br /&gt;
Imagine a question category as a folder that contains questions that are unique to that folder. You can put one or more question categories within another question category.  This is similar to a file system on a computer.  You can have the same file name, with identical content (an identical question) located in many folders, but each file (question) is unique.  Like a file, when you edit one question in a folder, it does not change any other question. &lt;br /&gt;
&lt;br /&gt;
Moodle 2.x introduced context levels.  In short, each context level can have unique question categories and subcategories.   However, the user&#039;s context determines which question categories they can see.  Generally speaking, the System level context question categories can always be seen.  A course level context question category can not be seen/used by another course.  There are other context levels.   &lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;TIP:&#039;&#039; The robust potential for question organization deserves some planning.  Fortunately, it is possible to move question categories between and in context levels, and move questions between question categories.&lt;br /&gt;
&lt;br /&gt;
==Question Sharing==&lt;br /&gt;
&lt;br /&gt;
You can share questions in several different [[Context|contexts]]. Sharing categories in the &#039;System&#039; contex or &#039;Course&#039; context has a similar effect to publishing the category so others can see them or hiding a question category from specific users. See the [[Question contexts]] page for more infromation.&lt;br /&gt;
&lt;br /&gt;
By default a course teacher cannot see or use any Question context above the course level.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039;&#039;&#039; &amp;quot;Core System&amp;quot; and &amp;quot;System&amp;quot; refer to the same thing when we are describing or showing screen shots of question categories. &amp;quot;System&amp;quot; is the current term you will see in 2.x releases of Moodle.&lt;br /&gt;
&lt;br /&gt;
==Adding and managing question categories==&lt;br /&gt;
Settings &amp;gt; Question bank &amp;gt; Categories &lt;br /&gt;
The &amp;quot;Editing categories&amp;quot; page has two sections.  The top is for managing existing categories, and the bottom is for adding categories.&lt;br /&gt;
&lt;br /&gt;
===Adding categories===&lt;br /&gt;
To add a question category you will need to name it, place it within a context level (see [[Question contexts]]) and perhaps place it as a sub category of an existing category.  &lt;br /&gt;
* At the bottom of the category page link, below current categories, you will see a form to add a new category.&lt;br /&gt;
* Choose the &#039;parent&#039; context level with the pull down menu&lt;br /&gt;
** Placing your category in another category makes it a sub-category of the parent category.&lt;br /&gt;
** Choosing &#039;Top&#039; in any of the context means that your category is a top level category, not a sub category of an existing category. &lt;br /&gt;
** Remember, your current context may hide question categories that exist, but are not available.  For example, a question category that is in a course context level of a different course will be hidden. &lt;br /&gt;
* Type the name of your new question category in the text box.&lt;br /&gt;
* Add an optional description in the category info area.&lt;br /&gt;
* Click the &#039;Add Category&#039; button. Your new question category will appear in the list of current categories.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Moving question categories between context levels===&lt;br /&gt;
Settings &amp;gt; Question bank &amp;gt; Categories  &amp;quot;Edit categories section&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
*Select the edit icon of the category which you wish to move. This will bring you to the &amp;quot;Edit this category&amp;quot; form.&lt;br /&gt;
*Use the pull down menu to select the context level, as described in the adding categories section.  &lt;br /&gt;
*Click &amp;quot;Save Changes&amp;quot;  &lt;br /&gt;
&lt;br /&gt;
===Using arrow icons for moving categories within a context level===&lt;br /&gt;
Settings &amp;gt; Question bank &amp;gt; Categories  &amp;quot;Edit categories section&amp;quot;&lt;br /&gt;
You can also arrange the question categories with a context level (only) by using the arrow keys, instead of opening up the &amp;quot;Edit this category&amp;quot; form.  The arrow keys effect is similar to working with an outline on a word processor.&lt;br /&gt;
&lt;br /&gt;
* The up/down arrow icons change the order in which question category &#039;peers&#039; are displayed within a single context level.&lt;br /&gt;
* The right arrow icon changes a category to be a sub category of the category listed immediately above it.&lt;br /&gt;
* The left arrow icon moves the sub category to be a peer of the category above it.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;TIP:&#039;&#039; You can not use the arrow icons to move a question category between context levels.   Thus you can not use an arrow icon to move a question category that is in the course context level to the system context level.  &lt;br /&gt;
&lt;br /&gt;
===Deleting Categories===&lt;br /&gt;
Categories can also be created or deleted at will. However, if you try to delete a category containing questions, then you will be asked to specify another category to move them to. You cannot delete or move the last category in any context, there must always be one category in a context.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[Question contexts]]&lt;br /&gt;
*Using Moodle [http://moodle.org/mod/forum/discuss.php?d=47540 I can see other teacher&#039;s categories] forum discussion&lt;br /&gt;
&lt;br /&gt;
[[fr:Catégories de questions]]&lt;br /&gt;
[[ru:Категории вопросов]]&lt;br /&gt;
[[de:Fragenkategorien]]&lt;/div&gt;</summary>
		<author><name>Rcollman</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Question_categories&amp;diff=95820</id>
		<title>Question categories</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Question_categories&amp;diff=95820"/>
		<updated>2012-05-03T21:05:25Z</updated>

		<summary type="html">&lt;p&gt;Rcollman: /* Category Set Up and Management */  rewrote the way it works in 2.1.3 :)  Deleted the image as not being helpful&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Managing questions}}&lt;br /&gt;
A question category can contain individual questions or other question categories.  They can be found by using the  [[Question bank]] or when [[Building Quiz|building a quiz]].&lt;br /&gt;
&lt;br /&gt;
==What are question categories?==&lt;br /&gt;
&lt;br /&gt;
[[Image:question-categories.png|thumb|300px|Question category as a folder]]&lt;br /&gt;
You can imagine a question category as a folder on your desktop computer. Then, questions are stored in these categories in a similar way as your files are stored in a file system.&lt;br /&gt;
&lt;br /&gt;
Each category must have a name and you can include a short description of the category. You can create a &#039;&#039;category hierarchy&#039;&#039;.  For example, you can specify a parent category for each category or the &#039;Top&#039; as the parent, when a category has no parent. &lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Tip:&#039;&#039; Creating question categories and sub categories is a good practice.  It is better than keeping all your questions in one big list in the quiz module.  The hierarchy feature enables you to separate categories into sub categories and sub categories into sub sub categories etc. indefinitely. Categories and sub categories, etc., are very powerful when combined with random questions that can select either from one category or from a category or any of its sub categories.&lt;br /&gt;
&lt;br /&gt;
==Question Sharing==&lt;br /&gt;
&lt;br /&gt;
You can share questions in several different [[Context|contexts]]. Sharing categories in the &#039;System&#039; contex or &#039;Course&#039; context has a similar effect to publishing the category so others can see them or hiding a question category from specific users. See the [[Question contexts]] page for more infromation.&lt;br /&gt;
&lt;br /&gt;
By default a course teacher cannot see or use any Question context above the course level.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039;&#039;&#039; &amp;quot;Core System&amp;quot; and &amp;quot;System&amp;quot; refer to the same thing when we are describing or showing screen shots of question categories. &amp;quot;System&amp;quot; is the current term you will see in 2.x releases of Moodle.&lt;br /&gt;
&lt;br /&gt;
==Adding and managing question categories==&lt;br /&gt;
Settings &amp;gt; Question bank &amp;gt; Categories &lt;br /&gt;
The &amp;quot;Editing categories&amp;quot; page has two sections.  The top is for managing existing categories, and the bottom is for adding categories.&lt;br /&gt;
&lt;br /&gt;
===Adding categories===&lt;br /&gt;
To add a question category you will need to name it, place it within a context level (see [[Question contexts]]) and perhaps place it as a sub category of an existing category.  &lt;br /&gt;
* At the bottom of the category page link, below current categories, you will see a form to add a new category.&lt;br /&gt;
* Choose the &#039;parent&#039; context level with the pull down menu&lt;br /&gt;
** Placing your category in another category makes it a sub-category of the parent category.&lt;br /&gt;
** Choosing &#039;Top&#039; in any of the context means that your category is a top level category, not a sub category of an existing category. &lt;br /&gt;
** Remember, your current context may hide question categories that exist, but are not available.  For example, a question category that is in a course context level of a different course will be hidden. &lt;br /&gt;
* Type the name of your new question category in the text box.&lt;br /&gt;
* Add an optional description in the category info area.&lt;br /&gt;
* Click the &#039;Add Category&#039; button. Your new question category will appear in the list of current categories.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Moving question categories between context levels===&lt;br /&gt;
Settings &amp;gt; Question bank &amp;gt; Categories  &amp;quot;Edit categories section&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
*Select the edit icon of the category which you wish to move. This will bring you to the &amp;quot;Edit this category&amp;quot; form.&lt;br /&gt;
*Use the pull down menu to select the context level, as described in the adding categories section.  &lt;br /&gt;
*Click &amp;quot;Save Changes&amp;quot;  &lt;br /&gt;
&lt;br /&gt;
===Using arrow icons for moving categories within a context level===&lt;br /&gt;
Settings &amp;gt; Question bank &amp;gt; Categories  &amp;quot;Edit categories section&amp;quot;&lt;br /&gt;
You can also arrange the question categories with a context level (only) by using the arrow keys, instead of opening up the &amp;quot;Edit this category&amp;quot; form.  The arrow keys effect is similar to working with an outline on a word processor.&lt;br /&gt;
&lt;br /&gt;
* The up/down arrow icons change the order in which question category &#039;peers&#039; are displayed within a single context level.&lt;br /&gt;
* The right arrow icon changes a category to be a sub category of the category listed immediately above it.&lt;br /&gt;
* The left arrow icon moves the sub category to be a peer of the category above it.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;TIP:&#039;&#039; You can not use the arrow icons to move a question category between context levels.   Thus you can not use an arrow icon to move a question category that is in the course context level to the system context level.  &lt;br /&gt;
&lt;br /&gt;
===Deleting Categories===&lt;br /&gt;
Categories can also be created or deleted at will. However, if you try to delete a category containing questions, then you will be asked to specify another category to move them to. You cannot delete or move the last category in any context, there must always be one category in a context.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[Question contexts]]&lt;br /&gt;
*Using Moodle [http://moodle.org/mod/forum/discuss.php?d=47540 I can see other teacher&#039;s categories] forum discussion&lt;br /&gt;
&lt;br /&gt;
[[fr:Catégories de questions]]&lt;br /&gt;
[[ru:Категории вопросов]]&lt;br /&gt;
[[de:Fragenkategorien]]&lt;/div&gt;</summary>
		<author><name>Rcollman</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Talk:Question_categories&amp;diff=95819</id>
		<title>Talk:Question categories</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Talk:Question_categories&amp;diff=95819"/>
		<updated>2012-05-03T20:26:24Z</updated>

		<summary type="html">&lt;p&gt;Rcollman: Will make some changes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Using Arrow Icons for Moving Categories==&lt;br /&gt;
Moving categories does not exactly work this way.&lt;br /&gt;
&lt;br /&gt;
You can not move categories between the contextual levels (System, course category, course, activity) with the arrow icons.  You have to edit the category and change the parent level with the drop down box.&lt;br /&gt;
&lt;br /&gt;
However, you can use the arrow icons within a context level to make a category a sub category of another, or to move a category out of being a sub category of the category directly above it.   &lt;br /&gt;
&lt;br /&gt;
The word hierarchy is confusing because it applies both to the contextual levels and category/sub-category relationships.  &lt;br /&gt;
&lt;br /&gt;
Will work on it :)  Maybe images would help. --[[User:chris collman|chris collman]] 04:26, 4 May 2012 (WST)&lt;/div&gt;</summary>
		<author><name>Rcollman</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Cron&amp;diff=95757</id>
		<title>Cron</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Cron&amp;diff=95757"/>
		<updated>2012-04-30T16:51:00Z</updated>

		<summary type="html">&lt;p&gt;Rcollman: minor&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Installing Moodle}}&lt;br /&gt;
The Moodle &#039;cron&#039; process is a script that is usually triggered by a web server program.   The Moodle cron script runs different tasks at differently scheduled intervals.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IMPORTANT: Do not skip setting up the cron process on your server for your Moodle. Your site will not work properly without it&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A cron web server program is programmed to run the Moodle cron script at a regular interval.  The Moodle cron script determines which tasks need to be completed.   For example these tasks include sending mail, updating Moodle reports, RSS feeds, activity completions, posting forum messages and other tasks. Since different tasks have different schedules, not every task will run in Moodle when the cron script is triggered. &lt;br /&gt;
&lt;br /&gt;
On so&lt;br /&gt;
&lt;br /&gt;
== Setting up cron on your system ==&lt;br /&gt;
 &lt;br /&gt;
Choose the information for your server type:&lt;br /&gt;
&lt;br /&gt;
*[[Cron with Unix or Linux]]- Cron services on various UNIX and Linux flavored operating systems.&lt;br /&gt;
*[[Cron with Windows OS]] - Cron services in Windows&lt;br /&gt;
*&#039;&#039;Apple OSX&#039;&#039; - use the built-in &#039;crontab&#039; service which is exactly the same as [[Cron with Unix or Linux]]. However, you might want to do it the &#039;Apple way&#039; using launchd - see [[Cron with MAC OS X]]&lt;br /&gt;
*[[Cron with web hosting services]]- Cron services in various web hosting examples.&lt;br /&gt;
&lt;br /&gt;
=== Cron settings in Moodle ===&lt;br /&gt;
&lt;br /&gt;
There are settings within Moodle that control aspects of cron operation:&lt;br /&gt;
&lt;br /&gt;
*[[Cron settings]] - Moodle cron process password and CLI settings&lt;br /&gt;
&lt;br /&gt;
== Setting up cron on your system ==&lt;br /&gt;
 &lt;br /&gt;
Choose the information for your server type:&lt;br /&gt;
&lt;br /&gt;
*[[Cron with Unix or Linux]]- Cron services on various UNIX and Linux flavored operating systems.&lt;br /&gt;
*[[Cron with Windows OS]] - Cron services in Windows&lt;br /&gt;
*&#039;&#039;Apple OSX&#039;&#039; - use the built-in &#039;crontab&#039; service which is exactly the same as [[Cron with Unix or Linux]]. However, you might want to do it the &#039;Apple way&#039; using launchd - see [[Cron with MAC OS X]]&lt;br /&gt;
*[[Cron with web hosting services]]- Cron services in various web hosting examples.&lt;br /&gt;
&lt;br /&gt;
=== Cron settings in Moodle ===&lt;br /&gt;
&lt;br /&gt;
There are settings within Moodle that control aspects of cron operation:&lt;br /&gt;
&lt;br /&gt;
*[[Cron settings]] - Moodle cron process password and CLI settings&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Remote cron===&lt;br /&gt;
Using the &#039;web based&#039; version of cron it is perfectly ok to place the cron process on a different machine to the Moodle server. For example, the cron service on a Unix server can invoke the cron web &#039;page&#039; on a Windows based Moodle server.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
Using Moodle forum discussions:&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=41827 Cron - can someone give me a quick confirmation of function?]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=97684 Cronjob Question]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=97457 Slow cron : avoiding simultaneous cron]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=117168 Visibility of cron.php]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=139263#p609060 How to log the output of a Scheduled Task on Windows] - this discussion explains a nice trick that can be very useful when you are experiencing problems with your Windows Scheduled Task and you need to log the output of the Scheduled Task to a log file.&lt;br /&gt;
&lt;br /&gt;
[[es:Cron]]&lt;br /&gt;
[[fr:Cron]]&lt;br /&gt;
[[nl:Cron]]&lt;br /&gt;
[[sk:Cron]]&lt;br /&gt;
[[pl:Cron]]&lt;br /&gt;
[[ja:Cron]]&lt;/div&gt;</summary>
		<author><name>Rcollman</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Cron&amp;diff=95756</id>
		<title>Cron</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Cron&amp;diff=95756"/>
		<updated>2012-04-30T16:14:37Z</updated>

		<summary type="html">&lt;p&gt;Rcollman: update intro&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Installing Moodle}}&lt;br /&gt;
The Moodle &#039;cron&#039; process is a script that runs in the background different tasks at scheduled intervals. In Moodle, these scheduled tasks include sending mail, updating course or activity completions, posting forum messages or other tasks.  Cron is a server operating system program, which needs to be told to trigger the Moodle cron scripts.    &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IMPORTANT: Do not skip setting up the cron process on your server for your Moodle. Your site will not work properly without it&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
On some Moodle sites it is possible to trigger the Moodle cron script by running yourmoodle/admin/cron.php in the address bar of a web browser.  &lt;br /&gt;
&lt;br /&gt;
== Setting up cron on your system ==&lt;br /&gt;
 &lt;br /&gt;
Choose the information for your server type:&lt;br /&gt;
&lt;br /&gt;
*[[Cron with Unix or Linux]]- Cron services on various UNIX and Linux flavored operating systems.&lt;br /&gt;
*[[Cron with Windows OS]] - Cron services in Windows&lt;br /&gt;
*&#039;&#039;Apple OSX&#039;&#039; - use the built-in &#039;crontab&#039; service which is exactly the same as [[Cron with Unix or Linux]]. However, you might want to do it the &#039;Apple way&#039; using launchd - see [[Cron with MAC OS X]]&lt;br /&gt;
*[[Cron with web hosting services]]- Cron services in various web hosting examples.&lt;br /&gt;
&lt;br /&gt;
=== Cron settings in Moodle ===&lt;br /&gt;
&lt;br /&gt;
There are settings within Moodle that control aspects of cron operation:&lt;br /&gt;
&lt;br /&gt;
*[[Cron settings]] - Moodle cron process password and CLI settings&lt;br /&gt;
&lt;br /&gt;
== Setting up cron on your system ==&lt;br /&gt;
 &lt;br /&gt;
Choose the information for your server type:&lt;br /&gt;
&lt;br /&gt;
*[[Cron with Unix or Linux]]- Cron services on various UNIX and Linux flavored operating systems.&lt;br /&gt;
*[[Cron with Windows OS]] - Cron services in Windows&lt;br /&gt;
*&#039;&#039;Apple OSX&#039;&#039; - use the built-in &#039;crontab&#039; service which is exactly the same as [[Cron with Unix or Linux]]. However, you might want to do it the &#039;Apple way&#039; using launchd - see [[Cron with MAC OS X]]&lt;br /&gt;
*[[Cron with web hosting services]]- Cron services in various web hosting examples.&lt;br /&gt;
&lt;br /&gt;
=== Cron settings in Moodle ===&lt;br /&gt;
&lt;br /&gt;
There are settings within Moodle that control aspects of cron operation:&lt;br /&gt;
&lt;br /&gt;
*[[Cron settings]] - Moodle cron process password and CLI settings&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Remote cron===&lt;br /&gt;
Using the &#039;web based&#039; version of cron it is perfectly ok to place the cron process on a different machine to the Moodle server. For example, the cron service on a Unix server can invoke the cron web &#039;page&#039; on a Windows based Moodle server.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
Using Moodle forum discussions:&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=41827 Cron - can someone give me a quick confirmation of function?]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=97684 Cronjob Question]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=97457 Slow cron : avoiding simultaneous cron]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=117168 Visibility of cron.php]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=139263#p609060 How to log the output of a Scheduled Task on Windows] - this discussion explains a nice trick that can be very useful when you are experiencing problems with your Windows Scheduled Task and you need to log the output of the Scheduled Task to a log file.&lt;br /&gt;
&lt;br /&gt;
[[es:Cron]]&lt;br /&gt;
[[fr:Cron]]&lt;br /&gt;
[[nl:Cron]]&lt;br /&gt;
[[sk:Cron]]&lt;br /&gt;
[[pl:Cron]]&lt;br /&gt;
[[ja:Cron]]&lt;/div&gt;</summary>
		<author><name>Rcollman</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Lesson_FAQ&amp;diff=95677</id>
		<title>Lesson FAQ</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Lesson_FAQ&amp;diff=95677"/>
		<updated>2012-04-22T21:43:32Z</updated>

		<summary type="html">&lt;p&gt;Rcollman: /* Import PowerPoint does not work */ add link to new page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Lesson}}&lt;br /&gt;
==What&#039;s a Branch Table?==&lt;br /&gt;
Older versions of Moodle called  Lesson module Content pages &amp;quot;Branch tables&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Import PowerPoint does not work==&lt;br /&gt;
&amp;quot;No data&amp;quot; or some other error shows up after an attempt to import.  &lt;br /&gt;
*Please read [[Import PowerPoint]]. Most common causes:&lt;br /&gt;
#Complicated PowerPoint. Too many images, text boxes or fancy features.&lt;br /&gt;
#Wrong version of PowerPoint&lt;br /&gt;
#Site error - try the tested zip file at  [http://tracker.moodle.org/browse/MDL-15755 Tracker.Moodle.org]&lt;br /&gt;
*For some other alternatives see [[Inserting_content_into_a_lesson_activity]]&lt;br /&gt;
&lt;br /&gt;
==Jumps not working in a question==&lt;br /&gt;
A wrong answer should go to &amp;quot;this page&amp;quot; in my lesson. But after the student answers it, the student goes to the next page.&lt;br /&gt;
*See adding/editing a lesson and Maximum Attempts in Lesson settings.  If maximum attempt is set to 1, then the student will be advanced to the next page after they choice a wrong answer that is sent to &amp;quot;this page&amp;quot;.  If it is set to 2, after the student selects the wrong answer the 2nd time they will be sent to the next page.  This can be used to keep the student out of an endless loop when than can not answer a question correctly.&lt;br /&gt;
&lt;br /&gt;
==Edits of answers or branch buttons are not saved==&lt;br /&gt;
I have a 4 answer multiple choice question.  I can only seem to save the first two answers, their jumps and feedback. Any edits on the last answers, their jumps and feedbacks are not saved.  Moodle does not tell me there is anything wrong.   Same thing happened with a Content page. I can not seem to get the last two descriptions change after I save an edit.   GRRRRR!&lt;br /&gt;
&lt;br /&gt;
*Go back to your lesson settings.   Maximum number of answers is probably set to 2; change it to 4 or the maximum number of answers or descriptions in your lesson.  Now the edits can be saved.&lt;br /&gt;
::&#039;&#039;Tip:&#039;&#039; Changing the &amp;quot;Maximum number&amp;quot; as a teacher builds a lesson is a trick used to limit scrolling passed unused answers or branch choices to get to the save button. For example, 15 pages have 4 choices but one page will have 8 choices. The teacher will use &amp;quot;Maximum number&amp;quot; at 8 setting only when they initially create that page, then switch it back to 4.  They (and their students) will always see all 8 answers but the lesson setting will prevent them from editing some of them.&lt;br /&gt;
&lt;br /&gt;
==What is a Branch ?==&lt;br /&gt;
Many Moodlers call a series of pages in their lesson &amp;quot;&#039;&#039;&#039;a branch&#039;&#039;&#039;&amp;quot;. Usually the student will enter the series by jumping from a page that is not directly before the &amp;quot;branch&amp;quot;.   Thus, a student will &amp;quot;branch&amp;quot; off the lesson path from a missed question and visit a series of pages for review before they are returned to the main lesson path again.  &lt;br /&gt;
&lt;br /&gt;
Lesson also have special pages that create a [[Lesson clusters|cluster]].  These are also a series of page.  &lt;br /&gt;
&lt;br /&gt;
Confused yet? :)  Maybe [[Branch structures]] will help.&lt;br /&gt;
&lt;br /&gt;
==Multiple Choice and Multianswer issues==&lt;br /&gt;
When I check the multianswer box in a multiple choice question, it does not work. It makes random jumps and does not put the teacher&#039;s response with the students choice.   &lt;br /&gt;
&lt;br /&gt;
*In a Lesson module [[Lesson_module#Multiple_choice|multianswer question]], all the correct choices must have the same jump and teacher response.  All the wrong choices must also have the same jump and teacher response.&lt;br /&gt;
&lt;br /&gt;
==Are there some examples of Lessons I can see?==&lt;br /&gt;
I have been to demo.moodle and looked at the [http://demo.moodle.org/mod/lesson/view.php?id=224 Lesson section], are there more examples of Lessons used in a real course?&lt;br /&gt;
*[[Lesson samples]] is one place to look.&lt;br /&gt;
&lt;br /&gt;
==The lesson was completed but it does not record it==&lt;br /&gt;
*Every lesson must have one question that a student must answer in order for it to show up in some reports. This can affect [[Grades]] and a Lesson&#039;s dependency setting (see other FAQs below).   &lt;br /&gt;
::&#039;&#039;Tip:&#039;&#039; There are lots of creative ways to put in a question, such as setting a multiple choice question so that all answers are correct and the answers act like a content page. Or put in content and then award 1 point for &amp;quot;next page&amp;quot; as the answer and do not include the score in grades.&lt;br /&gt;
::&#039;&#039;Tip:&#039;&#039; Due to a specific Lesson&#039;s design, some students can complete the lesson without answering one or more questions which have been placed in the Lesson.  When Lesson can not record any scores for a student, no grade is pushed to the gradebook. It may appear therefore that Lesson is being inconsistent in recording grades.&lt;br /&gt;
&lt;br /&gt;
==Dependency in Lesson does not work==&lt;br /&gt;
The second lesson tells the student they must complete the first one.  They did, what is wrong?&lt;br /&gt;
*For dependency to work, you need to have at least 1 question page in the lesson. The student may not need a minimum score, but Lesson needs to know that the student tried a question.  You can always put a question as the first or last page, You don&#039;t need to ask a question but do put in an answer of &amp;quot;continue&amp;quot; with a jump of the next page.&lt;br /&gt;
&lt;br /&gt;
*Also for dependency to work, the lesson can not be a practice lesson.&lt;br /&gt;
&lt;br /&gt;
==How to add sound to a lesson page==&lt;br /&gt;
*[[Audio in Moodle]] has an overview and tool recommendations.&lt;br /&gt;
&lt;br /&gt;
==Can I turn off the answer shuffle in a lesson?==&lt;br /&gt;
* In short, no.   Turning off the page and answer shuffle are Quiz options, but neither is found in Lesson. A minor hack to the Lesson code is possible but that would impact the entire Moodle site.    &lt;br /&gt;
::&#039;&#039;TIP:&#039;&#039;  If you don&#039;t need to score students answers in a question, then consider using a Content page instead of a Multiple Choice or a True/False question.&lt;br /&gt;
&lt;br /&gt;
==Can I change standard words used by Lesson?==&lt;br /&gt;
*Yes.  You or your site administrator can edit the language file called Lesson.php.   This will impact the whole site.  Your site administrator might create a language just for you and then in Lesson settings use the force language option.&lt;br /&gt;
&lt;br /&gt;
==Grrr something happened -lesson list is not right -  I can&#039;t move things==&lt;br /&gt;
Try a backup and restore of your course to solve some of those &amp;quot;quirky&amp;quot; issues.   &lt;br /&gt;
*Example: I was building a course, started adding lessons to topic 2 and then realized I should move it up to become Topic 1. Did that and continue to add lessons to topic 1, then lessons to topic 2 etc.   Later I had to add lessons to topic 1.  I did but could not move them between those first lessons I created. Every time I tried to move them they went to the bottom of topic 2!   I also noticed that my list of just lessons, showed those first lessons as being in the correct course display order but showed they were in Topic 2!.   &lt;br /&gt;
*Moral: Sometimes a backup and a restore will re-establish harmony and fix things.&lt;br /&gt;
&lt;br /&gt;
==What happened to my HTML code on a Lesson page?==&lt;br /&gt;
I had the lesson page formatted just the way I wanted by using the HTML source toggle on the tool bar.  I went back in to tweak my code and some of my code was missing!&lt;br /&gt;
*Lesson will &amp;quot;clean&amp;quot; up your HTML code every time you toggle into HTML text.   This can be frustrating, especially if you are trying to get a flash file to display just right.  Save you work in a text editor, so the next time you tweak it, you can paste all your code back in.&lt;br /&gt;
&lt;br /&gt;
==Pages are not displayed in the lesson&#039;s left menu==&lt;br /&gt;
The Lesson module&#039;s left menu navigation feature, only displays content (branch table) pages.  If your lesson only has question pages, it will not display any pages.   Use a content page before a series of question pages, so your students will know where the series starts.  Alternative, use the same content page and put links to each of the question using descriptions and jumps.  Remember, you can effectively have the student jump past (not view) this content page as they go through the lesson and only reach it via the left menu.&lt;br /&gt;
&lt;br /&gt;
==Students are not returning to where they left the lesson==&lt;br /&gt;
A student has left the lesson after looking at 10 pages.   The next time they return to the lesson they start at the beginning again. How can the student return to the same place?&lt;br /&gt;
:You have seen more than one page of this lesson already. Do you want to start at the last page you saw?&lt;br /&gt;
&lt;br /&gt;
Several things must be met before this will happen.  First make sure your lesson settings allow the student to retake the lesson and that this lesson is not a &amp;quot;practice&amp;quot; lesson.   The important thing is that the above words are not exactly correct.  They are correct only when the student left immediately after answering a question in a Lesson.  For the purposes of returning to the same place, Lesson only remembers question pages as benchmarks.  So lastly, make sure you have questions scattered in your Lesson for this feature to work and tell students.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;TIPs:&#039;&#039; Use a content page at the start of the lesson as a table of contents, so the student are forced to remember where they are but can jump to your teaching points.  Or put a question at the start or end of every &amp;quot;teaching point&amp;quot;.  And of course, you can tell your students how it is going to work.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* Using Moodle [http://moodle.org/mod/forum/view.php?f=333 Lesson module forum]&lt;br /&gt;
&lt;br /&gt;
[[Category:FAQ]]&lt;br /&gt;
[[de:Lektion_FAQ]]&lt;/div&gt;</summary>
		<author><name>Rcollman</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Import_PowerPoint&amp;diff=95676</id>
		<title>Import PowerPoint</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Import_PowerPoint&amp;diff=95676"/>
		<updated>2012-04-22T21:42:45Z</updated>

		<summary type="html">&lt;p&gt;Rcollman: /* See also */ add link to new page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Lesson}}&lt;br /&gt;
&lt;br /&gt;
This page deals with the option to import a Powerpoint 2003 file into Moodle&#039;s [[Lesson]] module. If you simply wish to display a Powerpoint in your course, then see [[File]]&lt;br /&gt;
&lt;br /&gt;
==Importing a Powerpoint presentation - Why and Why not==&lt;br /&gt;
If you have a Powerpoint 2003 presentation already made, you can -  with many limitations- import it into your Moodle Lesson to save recreating each slide from scratch. However; the method outlined below is not really recommended. It will not bring &lt;br /&gt;
complex elements such as background images, multiple text boxes and multiple images on a page. It is not a particularly successful way of creating lessons, and &#039;&#039;&#039;does not work with later versions of Powerpoint&#039;&#039;&#039; There is a tracker entry MDL-21801 requesting that Import Powerpoint be removed from the Lesson module because it does not work properly. &lt;br /&gt;
&lt;br /&gt;
=== Powerpoint 2003 Instructions===&lt;br /&gt;
#Create your MS Powerpoint 2003 presentation.&lt;br /&gt;
#*In the &amp;quot;File&amp;quot; menu click on  &amp;quot;Save as Webpage&amp;quot;&lt;br /&gt;
#*Change or note &amp;quot;Save In&amp;quot; setting location and name&lt;br /&gt;
#**&#039;&#039;The Save &amp;quot;file type&amp;quot; should be &amp;quot;Web Page&amp;quot;&#039;&#039;&lt;br /&gt;
#*Click on &amp;quot;Save&amp;quot;&lt;br /&gt;
#**&#039;&#039;This will create a file and a folder. The HTML file has links to files in the new folder of the same name as the HTML file. &#039;&#039;&lt;br /&gt;
#Using Windows Explorer or your favorite program&lt;br /&gt;
#*Zip the new folder that contains the webpage files ***NB - DO NOT INCLUDE THE HTML FILE OR THE IMPORT WILL FAIL***&lt;br /&gt;
#**&#039;&#039;This is the file you will import into a new lesson. &#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Moodle instructions===&lt;br /&gt;
After you have created the zip file above&lt;br /&gt;
*Add a new Lesson activity to a course; set the setting; save the settings.&lt;br /&gt;
**&#039;&#039;This will bring you to a screen with several choices&#039;&#039;&lt;br /&gt;
*Select &amp;quot;Import PowerPoint&amp;quot;&lt;br /&gt;
*Use the browse button to select the zipped file that contains the webpage folder&lt;br /&gt;
*Select &amp;quot;Continue&amp;quot;&lt;br /&gt;
*Start editing the Content pages&lt;br /&gt;
&lt;br /&gt;
===Basic tips===&lt;br /&gt;
# Keep it simple: text only is best&lt;br /&gt;
#* No page numbers (see masterslide)&lt;br /&gt;
#* No text boxes with graphic or filled backgrounds&lt;br /&gt;
#* Masterslide content will not import, but delete all the footers&lt;br /&gt;
#* Watermarks and text over graphics is probably not a good idea&lt;br /&gt;
#* It will import some bullet formats but not all&lt;br /&gt;
#* It probably does not like &amp;quot;special characters&amp;quot; (any non-english letters)&lt;br /&gt;
# Graphic images can be imported as a part of the presentation but&lt;br /&gt;
#* Graphic images will have to be moved in the Lesson page&lt;br /&gt;
#* More than one graphic image might not always import to a Lesson page&lt;br /&gt;
&lt;br /&gt;
==An alternative method of importing presentation pages==&lt;br /&gt;
It is possible to save presentation slides as images by selecting an image file type such as .png from the &#039;&#039;save as...&#039;&#039; drop down menu in either Powerpoint or Open/Libre Office. These images can then be embedded into individual content pages of a lesson. As with the previous Powerpoint 2003 option however; this is only suitable for plain text and images. Animations/transitions will not work and care also must be taken regarding the dimensions and loading time of the images in each content page.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* MDL-17413 to vote for an improvement to insert (by importing) a series of pictures or a series of text pages into a series of lesson branch pages at any point in the lesson. (Like a series of questions). &lt;br /&gt;
*[[Inserting_content_into_a_lesson_activity]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Teacher]]&lt;br /&gt;
[[Category:Lesson]]&lt;br /&gt;
[[fr:Importer un fichier PowerPoint]]&lt;br /&gt;
[[de:PowerPoint importieren]]&lt;/div&gt;</summary>
		<author><name>Rcollman</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Inserting_content_into_a_lesson_activity&amp;diff=95675</id>
		<title>Inserting content into a lesson activity</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Inserting_content_into_a_lesson_activity&amp;diff=95675"/>
		<updated>2012-04-22T21:41:38Z</updated>

		<summary type="html">&lt;p&gt;Rcollman: copied content of 2.2&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A common question. &amp;quot;We have many course documents in Word and PDF format at the moment.  We ant to put them in a lesson, where 1 chapter would be 1 lesson. Is there anyway to easily do this and retain the formatting, esp around screenshots with arrows and description around them?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*The only import option is powerpoint (and if you are using Moodle version 1.9 or below this basically doesn&#039;t work anyway).&lt;br /&gt;
*Create some image files of your pdf or word document converted to pdf.&lt;br /&gt;
*Create some image files of your PowerPoint and insert those&lt;br /&gt;
*Reference the PDF for a lesson by the &amp;quot;pop to file or web page&amp;quot; option&lt;br /&gt;
*Convert your pdf files a movie files&lt;br /&gt;
*Do not have lessons, use a word or pdf file as a resource, use conditional activities to link it to a quiz that is loaded with feedback to each question&lt;br /&gt;
&lt;br /&gt;
==Creating manageable PDFs==&lt;br /&gt;
PDF files can be split into chapters. There are free &amp;quot;pdf splitter&amp;quot; utilities that will do this. Google &amp;quot;pdf splitter&amp;quot; and you&#039;ll find a bunch. In your situation, you might want to attach the chapter as a resource in this form. You can also, obviously split the PDF more granularly (if that&#039;s a word?) than chapter, and some of the utilities probably have a feature to automatically split all the pages.&lt;br /&gt;
&lt;br /&gt;
The quality of the resulting small PDFs is usually higher than the same PDF exported as an image. Your PDF can be referenced by the lesson in the &amp;quot;pop-to file or web page&amp;quot; option, or as a URL - you obviously need to host the PDF on your Moodle site.&lt;br /&gt;
&lt;br /&gt;
==Copy and pasting Word into Moodle==&lt;br /&gt;
Word does add hidden formatting to be copied when it is pasted into Moodle directly. There are solutions.&lt;br /&gt;
&lt;br /&gt;
Start by using Word&#039;s &amp;quot;File&amp;gt; Save As &amp;gt; Filtered HTML&amp;quot; option. This had different names in different versions of Word, but basically gets rid of a lot of the Word-specific junk.  This does a fair job in the context of Moodle.&lt;br /&gt;
&lt;br /&gt;
Next you could run a utility on this to make it better. For some free tools search for &amp;quot;clean word html&amp;quot; on the web.  The &amp;quot;granddaddy&amp;quot; of these tools is HTMLTidy. &lt;br /&gt;
&lt;br /&gt;
At this point you have a really good html document as your source. &lt;br /&gt;
&lt;br /&gt;
*Use the &amp;quot;popup to file or web page&amp;quot; for the lesson to reference that &amp;quot;chapter&amp;quot; (IOW host the HTML you created; see next point).&lt;br /&gt;
*Add the file as a URL resource if you host what you have created (NB: do *not* forget the folder of images that is created in tandem with the HTML file)&lt;br /&gt;
*Copy and paste into the Moodle editor after opening the cleaned HTML in Word or browser &lt;br /&gt;
:Tip: you will probably have to reload the images&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*{http://moodle.org/mod/forum/discuss.php?d=200976 Lesson forum thread] which had these ideas&lt;br /&gt;
*[http://www.rogerobeid.com/2011/02/24/clean-up-microsoft-word-html/ Here&#039;s a nice little blog post] on using HTMLTidy options to deal with Word&lt;/div&gt;</summary>
		<author><name>Rcollman</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=CSS&amp;diff=94190</id>
		<title>CSS</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=CSS&amp;diff=94190"/>
		<updated>2011-11-29T15:27:21Z</updated>

		<summary type="html">&lt;p&gt;Rcollman: Provided links to moved information in devDocs and elsewhere&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;CSS stands for Cascading Style Sheets.  CSS supplements HTML code and is used in Moodle themes. Moodle developers define and edit the standard CSS codes.    Those who wish to learn more about these codes should visit:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;[https://docs.moodle.org/dev/CSS CSS documentation in devDocs]&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [https://docs.moodle.org/dev/CSS_FAQ CSS FAQ]&lt;br /&gt;
* [[Themes|Themes]]&lt;br /&gt;
* [[Themes FAQ]]&lt;br /&gt;
* [https://docs.moodle.org/dev/CSS_styles_ layout.css CSS_styles_ layout.css] contains the layout specifications for various page elements.  &lt;br /&gt;
* [https://docs.moodle.org/dev/CSS_styles_color.css CSS_styles_color.css]  contains the colors used in the page elements. &lt;br /&gt;
* [https://docs.moodle.org/dev/CSS_styles_fonts.css CSS_styles_fonts.css]] defines the fonts used in the page elements.&lt;br /&gt;
* [https://docs.moodle.org/dev/CSS styles moz.css CSS styles moz.css]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Cascading_Style_Sheets Wikipedia Cascading Style Sheets]&lt;br /&gt;
* [http://www.w3schools.com/css/default.asp W3schools]&lt;/div&gt;</summary>
		<author><name>Rcollman</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Certificate_customizing&amp;diff=94093</id>
		<title>Certificate customizing</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Certificate_customizing&amp;diff=94093"/>
		<updated>2011-11-27T15:26:08Z</updated>

		<summary type="html">&lt;p&gt;Rcollman: /* Adding a New Line of Text */  add a second page, will check this out later.   Thanks to J-M !&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Certificate}}&lt;br /&gt;
[[Certificate module|Certificate]] is a contributed module and it can be customized. &lt;br /&gt;
&lt;br /&gt;
Often customization can be accomplished by adding images to one of the /mod/certificate/pix folders, so they will appear as an option in the certificate settings page.   Additionally, you can change the language strings located in /mod/certificate/lang. &lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;In November 2011 the Certificate &amp;quot;Type&amp;quot; php code has been modified for Moodle 2.x.  These code changes will impact string and image positions in the generated pdf document. Please see the &amp;quot;[[#Nov 2011 changes]]&amp;quot; section below.&#039;&#039;   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Certificate examples==&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Certificate examples - click on any to enlarge&amp;quot; widths=&amp;quot;200px&amp;quot; heights=&amp;quot;100px&amp;quot; perrow=&amp;quot;6&amp;quot;&amp;gt;&lt;br /&gt;
Image:Certificate 1.gif|Fancy border, signature line, seal, code&lt;br /&gt;
Image:Certificate199 example lines.png|Lines, signature, seal, watermark, code, grade, outcomes, custom text&lt;br /&gt;
Image:Certificate199 example creative.png|New border, new signature, new seal, new watermark, code, outcome&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Customizing==&lt;br /&gt;
The certificate code is located in the /mod/certificate folder.   There are sub-folders for backup, db, lang (holds language sub-folders), pix (holds sub-folders for borders, seals, signatures and watermarks) and type (holds standard certificate types, each in their own sub-folder).  &lt;br /&gt;
&lt;br /&gt;
===Adding images===&lt;br /&gt;
[[Image:Certificate199 example creative.png|thumb|Creative customized example]] The easiest way to customize your certificate is to add your own JPG or PNG images. Place these in the appropriate mod/certificate/pix folder on your site.  The added JPG or PNG image will appear in the dropdown list by its file name. &lt;br /&gt;
&lt;br /&gt;
Make sure your new files are the same size as the standard images. For example, the standard signature file is 150x31 pixels. If the signature file is a different size, you may need to modify the code line.  The same will be true for seals, borders and watermarks.&lt;br /&gt;
&lt;br /&gt;
In the creative example, a custom border, watermark, signature and seal were added to the right folders.  All were sized and in the same file format as the one supplied with the initial certificate install.&lt;br /&gt;
&lt;br /&gt;
===Customize format===&lt;br /&gt;
It is a good idea to create your own custom certificate type, that will appear on a list along with the standard certificates types.  You will know which is your custom certificate type and it will survive when you upgrade.  Here is how:&lt;br /&gt;
&lt;br /&gt;
1.  Choose the certificate/type folder with the size/orientation you desire, copy and paste it in the certificate/type folder  and give the copied folder a new name.  For example copy the /type/letter_non_embedded folder and rename it &#039;mycertificate&#039;. &lt;br /&gt;
&lt;br /&gt;
2.  Open the certificate/lang/en/certificate.php file and add the name of your new folder type.  Following the above example, you would add:&lt;br /&gt;
&lt;br /&gt;
:$string[&#039;typemycertificate&#039;] = &#039;My New Certificate&#039;;&lt;br /&gt;
 &lt;br /&gt;
Now, when you add a certificate to a course, your new type will appear on the drop down list as &amp;quot;My New Certificate&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Tip:&#039;&#039; You should add the proper string as shown in step 2 above or you may receive an error message and it will appear as if the code is broken.  And remember if you update your certificate module that this file maybe erased with a new version. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Modifying image position code example====&lt;br /&gt;
We will change the signature position that is found in the type/letter_non_embedded/certificate.php file when we generate a pdf in landscape mode.  There are at least 2 ways to change the code. Say we want to move it to the left at 100 and up to 435 line.&lt;br /&gt;
*Around line 100 you should notice there are a set of variables for &amp;quot;Landscape&amp;quot; which are followed by another set for &amp;quot;Portrait&amp;quot;. We can overrule some of the landscape and portrait codes the $sigx and $sigy position variables, so they read $sigx = 100 and $sigy = 435 .  &lt;br /&gt;
*Alternatively, we can overrule some of the landscape and portrait codes, in this case the signature block. Around line 145 we see the code that actually prints in the correct position:&lt;br /&gt;
:print_signature($pdf, $certificate, $sigx, $sigy, &#039;&#039;, &#039;&#039;);&lt;br /&gt;
By changing the variables to fix numbers it will not matter if the teacher selects landscape or portrait. For example:&lt;br /&gt;
:print_signature($pdf, $certificate, 100, 435, &#039;&#039;, &#039;&#039;);&lt;br /&gt;
&lt;br /&gt;
If others have not added a standard signature line, you might want to fix it to a certain size.  For example, you want the image to print 150px by 75px.   &lt;br /&gt;
&lt;br /&gt;
:print_signature($pdf, $certificate, $sigx, $sigy, &#039;150&#039;, &#039;75&#039;);&lt;br /&gt;
&lt;br /&gt;
This should give you a good idea about how to change the position of other images.&lt;br /&gt;
:&#039;&#039;Tip:&#039;&#039; Call your custom folder &amp;quot;a_landscape_special&amp;quot;. Now you can use the second method and nobody should be surprised if they can read and been trained properly.&lt;br /&gt;
&lt;br /&gt;
====Adjusting transparency of an image====&lt;br /&gt;
It is possible to put in a strong image as a watermark and adjust the transparency setting when the PDF is created.  Look for the SetAlpha code in front of a print element. For example infront of the &amp;quot;print_watermark..&amp;quot; line, you will see $pdf_SetAlpha(0.1);  It is currently set to .1, a .5 would be less transparent.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Tip:&#039;&#039; In older version of certificate, the watermark image itself was dimmed before it was placed in the folder.  If you had a custom watermark, this is the way it was done.   You can change the SetAlpha in the code to 1 and it should appear as it did in previous version of certificate.&lt;br /&gt;
&lt;br /&gt;
===Changing printed text===&lt;br /&gt;
There are two ways to change the language strings.  A best practice is to customize your language pack via site administration.  You will find the certificate.php in the mod group.   If you use the method below, when you update all your certificate files, then your changes will not be saved.     &lt;br /&gt;
&lt;br /&gt;
You can edit the language file found in the certificate folder, such as certificate/lang/en/certificate.php if you are not worried about losing you changes. Lets say you want to change the words at the top of all certificates on your site.&lt;br /&gt;
&lt;br /&gt;
Find the default strings:&lt;br /&gt;
:$string[&#039;title&#039;] = &#039;CERTIFICATE OF ACHIEVEMENT&#039;;     &lt;br /&gt;
:$string[&#039;intro&#039;] = &#039;This is to certify that&#039;;&lt;br /&gt;
:$string[&#039;statement&#039;] = &#039;has completed the course&#039;;&lt;br /&gt;
&lt;br /&gt;
Change them to read (for example):&lt;br /&gt;
:$string[&#039;title&#039;] = &#039;DIP0LOMA&#039;;    &lt;br /&gt;
:$string[&#039;intro&#039;] = &#039;I am proud to state that&#039;; &lt;br /&gt;
:$string[&#039;statement&#039;] = &#039;has successfully passed the final exam&#039;;&lt;br /&gt;
&lt;br /&gt;
===Adding a New Line of Text===&lt;br /&gt;
You have created a couple of custom certificate types.   In these certificates you want some new words to appear.  There are basically 2 choices, you can have it look up a new string, or hard code the words in the certificate type instead of looking for a string.  &lt;br /&gt;
&lt;br /&gt;
*Add new string method.&lt;br /&gt;
**Open the certificate/lang/en/certificate.php file and add your new string giving it a unique name. &lt;br /&gt;
:$string[&#039;mynewtext&#039;] = &#039;This is what I want to print on the certificate&#039;;&lt;br /&gt;
&lt;br /&gt;
**Open the file for your certificate type and change the string reference. For example, go to  certificate/type/mycertificate/certificate.php.  Near the end of the file find &amp;quot;// Add Text&amp;quot;.  This is the area that prints--you guessed it--text on the certificate.  Find the current line below which you would like your new text to be printed.  For example, if you want your text to print below the course name, find the line:&lt;br /&gt;
&lt;br /&gt;
:cert_printtext($pdf, $x, $y, &#039;C&#039;, &#039;Helvetica&#039;, &#039;&#039;, 30, get_string(&#039;title&#039;, &#039;certificate&#039;));&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Add a new line below that to print your new text using the name you gave your new lang string like this:&lt;br /&gt;
:cert_printtext($pdf, $x, $y+25, &#039;C&#039;, &#039;Helvetica&#039;, &#039;B&#039;, 10, $mynewtext);&lt;br /&gt;
&lt;br /&gt;
Quick review.  We want the string mynewtext to start on the $x position from the left, on the $y+25 line, and the line should be center aligned (C, L, R or &#039; &#039;), in Helvetica type, in bold, with a font size of 10.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. You can add a hard coded line of text. For example, add signature title block line under the signature image:&lt;br /&gt;
:cert_printtext($pdf, $sigx, $sigy+30,&#039;&#039;, &#039;Helvetica&#039;, &#039;B&#039;, 10, &#039;Martin Dougiamas, Lead Developer&#039;);&lt;br /&gt;
&lt;br /&gt;
===Adding a second page===&lt;br /&gt;
After you have created your first page (or copied an existing page), add this bit of code:&lt;br /&gt;
&lt;br /&gt;
$pdf-&amp;gt;AddPage();&lt;br /&gt;
&lt;br /&gt;
Then you in the code for the second page. You can create a certificate with as many pages as you want.&lt;br /&gt;
&lt;br /&gt;
==Nov 2011 changes==&lt;br /&gt;
[https://github.com/PukunuiAustralia/moodle-mod_certificate PukunuiAustralia / moodle-mod_certificate] version 2011110107 is the basis for these comments.  There maybe earlier versions which are different.&lt;br /&gt;
*Standard types of certificates.  There are 4 standard certificate types based upon paper size and if the fonts are embedded or non-embedded in the pdf documents.   The orientation of landscape or portrait is located within each of these types.  This is different from the 1.9.x versions.&lt;br /&gt;
*The code for printing strings has changed.   While similar to the pre 2.0, be careful.&lt;br /&gt;
&lt;br /&gt;
==Tips &amp;amp; Tricks==&lt;br /&gt;
*Start with one of the existing certificate types, copy it and modify it. &lt;br /&gt;
*Try your customized code on a non production site, such as a local host.&lt;br /&gt;
*In Administration&amp;gt;&amp;gt;Server set debugging to maximum (to show any coding error messages).&lt;br /&gt;
*While you can leave a php file open in edit mode, you must save the file before your changes become active.&lt;br /&gt;
*Make code changes one at a time, test and then backup after each successful change. For example,after adding a new string to the certificate lang file), go to your course page and click on a certificate to see if it appears on the list.&lt;br /&gt;
*If you broke the code you may get a blank screen for a certificate.  &lt;br /&gt;
**So it might be a good idea to make a backup of each successful change before starting the next change.   For example, after the 3rd code change, save certificate.php as certificate3.txt.&lt;br /&gt;
*Certificate icon location-If you are using your own theme you have to put the icon.gif inside a folder called certificate and put in your mod folder image.  For example, if your theme uses custom icons, you must put a certificate folder with the certificate icon.gif in it under your theme/pix/mod folder.&lt;br /&gt;
*Consider editing you language pack rather than the /certificate/lang/en/certificate.php file.  You can do this through the Settings &amp;gt; Site administration &amp;gt;Language &amp;gt; Language customization menu. Look for mod/certificate.php.  Then when you update your certificate and it&#039;s language,it will keep your changes for the standard strings.   &lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[mod/certificate/mod|Add/Edit Certificate]]&lt;br /&gt;
* [[mod/certificate/view|Viewing a Certificate]]&lt;br /&gt;
* Moodle 2.x and later versions of certificate can be found at [https://github.com/PukunuiAustralia/moodle-mod_certificate PukunuiAustralia / moodle-mod_certificate].&lt;/div&gt;</summary>
		<author><name>Rcollman</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=About_Moodle&amp;diff=94048</id>
		<title>About Moodle</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=About_Moodle&amp;diff=94048"/>
		<updated>2011-11-23T20:39:52Z</updated>

		<summary type="html">&lt;p&gt;Rcollman: Reverted edits by Nataliaposadaseverino (talk) to last revision by Tsala&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Main page}}&lt;br /&gt;
&#039;&#039;&#039;[[Moodle]]&#039;&#039;&#039; is a [http://download.moodle.org/ software package] for producing Internet-based courses and web sites. It is a global development project designed to support a [[Philosophy|social constructionist]] framework of education.&lt;br /&gt;
&lt;br /&gt;
Moodle is provided freely as [http://opensource.org/docs/osd Open Source] software (under the [http://www.gnu.org/copyleft/gpl.html GNU Public License]). Basically this means Moodle is copyrighted, but that you have additional freedoms. You are allowed to copy, use and modify Moodle provided that you agree to: &#039;&#039;&#039;provide the source to others; not modify or remove the original license and copyrights&#039;&#039;&#039;, and &#039;&#039;&#039;apply this same license to any derivative work&#039;&#039;&#039;. Read the [[:dev:License|full license]] for details and please contact the [http://moodle.com/helpdesk copyright holder via the Moodle.com helpdesk] if you have any questions.&lt;br /&gt;
&lt;br /&gt;
Moodle can be [[Installing Moodle|installed]] on any computer that can run PHP, and can support an SQL type database (for example MySQL). It can be run on [[Complete_install_packages|Windows and  Mac]] operating systems and many flavors of linux (for example [[RedHat Linux installation| Red Hat]] or [[Debian GNU/Linux installation|Debian GNU]]). There are many &#039;&#039;&#039;knowledgeable&#039;&#039;&#039; [http://moodle.com/partners/ Moodle Partners] to assist you, even [http://moodle.com/hosting/ host your Moodle site].&lt;br /&gt;
&lt;br /&gt;
The word Moodle was originally an acronym for Modular Object-Oriented Dynamic Learning Environment, which is mostly useful to programmers and education theorists.  It&#039;s also a verb that describes the process of lazily meandering through something, doing things as it occurs to you to do them, an enjoyable tinkering that often leads to insight and creativity. As such it applies both to the way Moodle was developed, and to the way a student or teacher might approach studying or teaching an online course. Anyone who uses Moodle is a Moodler.&lt;br /&gt;
&lt;br /&gt;
Come [http://moodle.org/community/ moodle with us]!&lt;br /&gt;
&lt;br /&gt;
*[[Philosophy]]&lt;br /&gt;
*[[Pedagogy]]&lt;br /&gt;
*[[Moodle site - basic structure]]&lt;br /&gt;
*[[Moodle key terms]]&lt;br /&gt;
&lt;br /&gt;
[[Category:About Moodle]]&lt;br /&gt;
&lt;br /&gt;
[[ca:Quant al Moodle]]&lt;br /&gt;
[[es:Acerca de Moodle]]&lt;br /&gt;
[[eu:Moodle-ri buruz]]&lt;br /&gt;
[[fr:À propos de Moodle]]&lt;br /&gt;
[[nl:Over Moodle]]&lt;br /&gt;
[[de:Was ist Moodle?]]&lt;br /&gt;
[[hr:O_Moodle_rješenju]]&lt;br /&gt;
[[ja:Moodleとは]]&lt;br /&gt;
[[pt:Sobre o Moodle]]&lt;br /&gt;
[[zh:关于Moodle]]&lt;br /&gt;
[[ru:О Moodle]]&lt;br /&gt;
[[ko:무들에 대하여]]&lt;/div&gt;</summary>
		<author><name>Rcollman</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Talk:Cron&amp;diff=94047</id>
		<title>Talk:Cron</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Talk:Cron&amp;diff=94047"/>
		<updated>2011-11-23T20:38:38Z</updated>

		<summary type="html">&lt;p&gt;Rcollman: Go Howard, Go :)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Comment from Eloy:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;If there is some template to mark one page as &amp;quot;require some love&amp;quot; I&#039;d say https://docs.moodle.org/en/Cron requires it. It talks 99% of the time to use web-browser cron. Only 1 line talks about cli cron.&amp;quot; --[[User:Helen Foster|Helen Foster]] 20:44, 9 November 2011 (WST)&lt;br /&gt;
:I just noticed this comment. Cron is not one of my special areas of knowledge but obviously use it. Did a quick &amp;quot;Cron CLI&amp;quot; on the web and got lost in how to program a php file to run cron jobs.   Saw the note about 2.0 and CLI on this page.   &lt;br /&gt;
&lt;br /&gt;
I think Eloy&#039;s comment is also saying that this page is too long and could be split up? For example use a navtrail and a Cron template.  Proposed pages:&lt;br /&gt;
*Cron page - Overview section   &lt;br /&gt;
*[[Cron with Windows OS]] page - move section.&lt;br /&gt;
*[[Cron with MAC OS X]] page - move section&lt;br /&gt;
*[[Cron with web hosting services]] page - move section&lt;br /&gt;
*[[Cron with UNIX]] page - move section&lt;br /&gt;
*[[Cron reports]]&lt;br /&gt;
*[[Cron settings]]&lt;br /&gt;
Comments? --[[User:chris collman|chris collman]] 23:25, 12 November 2011 (WST)&lt;br /&gt;
&lt;br /&gt;
Notice that I am using the phrase &amp;quot;the Moodle cron process&amp;quot;. As I understand it, this process can be triggered via admin/cron.php  OR via a cron service at admin/cli/cron.php. Frankly, I am not sure how lib/cronlib.php  works with either of these trigeer points but I don&#039;t think that is important for the site admin.  The old cron page refered to cron.php with the assumption that it was in admin.   To avoid confusion for a new user, I decided to call it a Moodle cron process.--[[User:chris collman|chris collman]] 23:57, 19 November 2011 (WST)&lt;br /&gt;
&lt;br /&gt;
:Hi Chris, thanks for your work in improving the cron documentation and sorry for taking so long to reply to your comments. Unfortunately I have no knowledge of the cron, however the good news is that Howard has offered to help improve all of our installation documentation, so he&#039;ll most likely review the cron documentation too :-) --[[User:Helen Foster|Helen Foster]] 17:14, 23 November 2011 (WST)&lt;br /&gt;
::Super.   Course Completion has been crashing the Moodle Cron process, so I got my nose in it.  I am still at Cron 101.  Looking forward to Howard cleaning it up.  Having it in seperate pages should help. --[[User:chris collman|chris collman]] 04:38, 24 November 2011 (WST)&lt;/div&gt;</summary>
		<author><name>Rcollman</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Upload_users&amp;diff=93990</id>
		<title>Upload users</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Upload_users&amp;diff=93990"/>
		<updated>2011-11-22T13:28:55Z</updated>

		<summary type="html">&lt;p&gt;Rcollman: /* Hints */ list of all valid fields&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Accounts}}&lt;br /&gt;
An administrator can upload multiple user accounts via text file in &#039;&#039;Settings &amp;gt; Site administration &amp;gt; Users &amp;gt; Accounts &amp;gt; Upload users&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
There are many robust options for uploading information (fields associated with a user) with this method: from enrolling users in multiple courses with course specific [[Roles|roles]] to updating user information in the [[User profile]] to deleting users from the site.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Tip:&#039;&#039; It is usually not necessary to upload users in bulk with Upload users.  To keep maintenance work down you should first explore forms of authentication that do not require manual maintenance, such as [[External database authentication|connecting to existing external databases]] or letting the users create their own accounts ([[Self enrolment]]). See [[Authentication]] for more information.&lt;br /&gt;
&lt;br /&gt;
[[File:Upload users initial 2.0.JPG|thumb|center|Initial upload users screen 2.1]]&lt;br /&gt;
&lt;br /&gt;
==Upload user process==&lt;br /&gt;
Here is an outline of the process:&lt;br /&gt;
&lt;br /&gt;
# Create file for uploading&lt;br /&gt;
# Go to &#039;&#039;Settings &amp;gt; Site administration &amp;gt; Users &amp;gt; Accounts &amp;gt; Upload users&#039;&#039;&lt;br /&gt;
# Add file to upload&lt;br /&gt;
# Upload users preview - check settings and default user profile settings&lt;br /&gt;
# Upload users preview - click &amp;quot;Upload users&amp;quot;&lt;br /&gt;
# Upload users results - shows list of users, exceptions made in upload and summary of number of users&lt;br /&gt;
# Upload users results - click &amp;quot;Continue&amp;quot;&lt;br /&gt;
# Returns to Upload users screen&lt;br /&gt;
&lt;br /&gt;
==Updating users preview==&lt;br /&gt;
There are settings for the kind of Upload user function you want to perform on the &amp;quot;Upload users preview&amp;quot; page.&lt;br /&gt;
[[File:Upload users preview 2.0.JPG|thumb|center|Upload users preview in Moodle 2.x]]&lt;br /&gt;
&lt;br /&gt;
===Updating existing accounts===&lt;br /&gt;
&lt;br /&gt;
By default Moodle adds new user accounts and skips existing users lines where the &amp;lt;code&amp;gt;username&amp;lt;/code&amp;gt; matches an existing account. Set &amp;quot;Upload Type&amp;quot; to &#039;&#039;&#039;Add  new and update existing users&#039;&#039;&#039;, and existing user account will be updated.&lt;br /&gt;
*Add all, append number to usernames if needed&lt;br /&gt;
*Add new and update existing users&lt;br /&gt;
*Update existing users only&lt;br /&gt;
There are also fields settings to force password change, allow renames, allow deletes, prevent email address duplicates, standardise usernames and select for bulk operations(new users. updated users, all users).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning&#039;&#039;&#039;: errors updating existing accounts can affect your users badly. Be careful when using the options to update.&lt;br /&gt;
&lt;br /&gt;
===Set default user values===&lt;br /&gt;
&lt;br /&gt;
You may be able to set default user field values, if the fields were not included in the uploaded file on this page.&lt;br /&gt;
&lt;br /&gt;
==Upload user results ==&lt;br /&gt;
After accepting the preview settings by clicking on &amp;quot;Upload users&amp;quot;, you should see the the Upload users results screen.&lt;br /&gt;
[[File:Upload users results 2.0.JPG|thumb|center|The 2.0 results screen, everything went well]]&lt;br /&gt;
This screen will show you any exceptions or changes that were made to each user in the upload process.   For example if you were updating user information, the updated information will be shown.  Or if a user was not added that record will be highlighted.&lt;br /&gt;
&lt;br /&gt;
The screen will summarize how many users were uploaded or updated, indicate the number of week passwords and the number of errors.&lt;br /&gt;
&lt;br /&gt;
==File formats for upload users file==&lt;br /&gt;
The upload files have their fields separated by a comma (or other delimiter).   The first line contains the valid field names.  The rest of the lines (records) contain information about each user.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;:Tip:&#039;&#039; If you are not an expert, avoid special characters in field information like quotes or other commas. Test a file with only one record before a large upload. Remember there are other ways to authenticate users on you site or enroll users in a course.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;:Tip:&#039;&#039; You can use a spread sheet program to create the file with the required columns and fields. Then save the file as &amp;quot;CSV (comma delimited)&amp;quot;. These files can be opened with simple text editors for verification. &lt;br /&gt;
&lt;br /&gt;
===Valid upload file for testing===&lt;br /&gt;
Here is an example of a simple valid upload file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;username, password, firstname, lastname, email, course1, group1&amp;lt;br /&amp;gt;&lt;br /&gt;
jonest, verysecret, Tom, Jones, jonest@someplace.edu, math102, Section 1&amp;lt;br /&amp;gt;&lt;br /&gt;
reznort, somesecret, Trent, Reznor, reznort@someplace.edu, math102, Section 3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Fields that can be included===&lt;br /&gt;
&#039;&#039;:Tip:&#039;&#039; We strongly recommend that you test a file that contains fields you proposed to use with one user before attempting a file upload for the first time.  demo.moodle.net might be a good place to see if your test file works.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Required fields&#039;&#039;&#039;: &lt;br /&gt;
:&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;username, firstname, lastname, email&amp;lt;/code&amp;gt;&lt;br /&gt;
:Validity checks are performed for:&lt;br /&gt;
#&amp;lt;code&amp;gt;username&amp;lt;/code&amp;gt; can only contain alphabetical &#039;&#039;&#039;lowercase&#039;&#039;&#039; letters , numbers, hypen &#039;-&#039;, underscore &#039;_&#039;, period &#039;.&#039;, or at-sign &#039;@&#039; &lt;br /&gt;
#&amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; is in the form: &#039;&#039;name@example.com&#039;&#039; .&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Password field&#039;&#039;&#039;: &amp;quot;password&amp;quot; field is optional if &amp;quot;Create password if needed&amp;quot; setting is chosen (default). &lt;br /&gt;
**If included, values should meet the requirements for the site&#039;s [[Site_policies#Password_policy|Password policy]]. To force password change for a particular user, set the password field to &amp;lt;code&amp;gt;changeme&amp;lt;/code&amp;gt;. &lt;br /&gt;
**If omitted, a password will be generated for each user (during the next Cron job) and welcome e-mails sent out (not working in v2.0.2?).&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Optional fields&#039;&#039;&#039;: To provide values other than the default include one or more of these&lt;br /&gt;
:&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;institution, department, city, country, lang, auth, ajax, timezone, idnumber, icq, phone1, phone2, address, url, description, mailformat, maildisplay, htmleditor, autosubscribe&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
*Country- use a country TWO LETTER CODE&lt;br /&gt;
*Some fields have a maximum number of  characters that are allow.  See hints below.&lt;br /&gt;
*Maildisplay, htmleditor and autosubscribe can be set from an import screen in Moodle 2.0.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Custom profile field names&#039;&#039;&#039;: (Optional). xxxxx is the real custom user profile field name (i.e. the unique shortname)&lt;br /&gt;
:&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;profile_field_xxxxx&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
: Create the custom fields BEFORE importing. Use the standard header. The &amp;quot;shortname&amp;quot; for your custom field is xxxxx (NB: as at v2.0.2, the shortname must be all lowercase, otherwise won&#039;t be recognised). The first record must include &amp;quot;profile_field_xxxxx&amp;quot;.&lt;br /&gt;
:&#039;&#039;&#039;Example&#039;&#039;&#039;: To create a custom field &amp;quot;genre&amp;quot;, you must write a shortname &amp;quot;genre&amp;quot; in the new field, and write &amp;quot;profile_field_genre&amp;quot; in the header of the .csv file.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Special fields&#039;&#039;&#039;: Used for changing of usernames or deleting of users&lt;br /&gt;
:&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;oldusername&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;deleted&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
*&#039;&#039;&#039;Enrolment fields&#039;&#039;&#039;: (Optional):&lt;br /&gt;
:&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;course1, type1, role1, group1, enrolperiod1, course2, type2, role2, group2, enrolperiod2&amp;lt;/code&amp;gt; etc.&lt;br /&gt;
**&amp;lt;code&amp;gt;course&amp;lt;/code&amp;gt; is the &amp;quot;shortname&amp;quot; of the course, if present the user will be enrolled in those courses.&lt;br /&gt;
** &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; refers to the role to be used for associated course enrolment. Value 1 is default course role, 2 is legacy Teacher role and 3 is legacy Non-editing Teacher.&lt;br /&gt;
** You can use role field instead to specify roles directly - use either role short name or id (numeric names of roles are not supported).&lt;br /&gt;
** Users may be also assigned to groups in course (group1 in course1, group2 in course2, etc.).&lt;br /&gt;
*** A group is identified by name or id (numeric group names are not supported).&lt;br /&gt;
** From Moodle 2.0, you can set the enrolment duration, in days, for each course (&amp;lt;code&amp;gt;enrolperiod1&amp;lt;/code&amp;gt; for &amp;lt;code&amp;gt;course1&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;enrolperiod2&amp;lt;/code&amp;gt; for &amp;lt;code&amp;gt;course2&amp;lt;/code&amp;gt;, etc.).&lt;br /&gt;
&lt;br /&gt;
Commas within  a field must be encoded as &amp;amp;#44 - the script will decode these back to commas.&lt;br /&gt;
&lt;br /&gt;
For Boolean fields, use &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; for false and &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; for true.&lt;br /&gt;
&lt;br /&gt;
To prevent users from receiving a large number of emails from courses or forced subscription forums use the &#039;&#039;&#039;maildigest&#039;&#039;&#039;.  The options for this field are 0 = No digest, 1 = Complete digest and 2 = Digest with just subjects.&lt;br /&gt;
&lt;br /&gt;
==Advanced potentials of Upload user==&lt;br /&gt;
===Templates===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: This section needs checking and updating if necessary for Moodle 2.0. Please do so and remove this note when finished.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The default values are processed as templates in which the following codes are allowed:&lt;br /&gt;
&lt;br /&gt;
* %l - will be replaced by the lastname&lt;br /&gt;
* %f - will be replaced by the firstname&lt;br /&gt;
* %u - will be replaced by the username&lt;br /&gt;
* %% - will be replaced by the %&lt;br /&gt;
&lt;br /&gt;
Between the percent sign (%) and any code letter (l, f or u) the following modifiers are allowed:&lt;br /&gt;
&lt;br /&gt;
* (-) minus sign - the information specified by the code letter will be converted to lowercase&lt;br /&gt;
* (+) plus sign - the information specified by the code letter will be converted to UPPERCASE&lt;br /&gt;
* (~) tilde sign - the information specified by the code letter will be converted to Title Case&lt;br /&gt;
* a decimal number - the information specified by the code letter will be truncated to that many characters&lt;br /&gt;
&lt;br /&gt;
For example, if the firstname is John and the lastname is Doe, the following values will be obtained with the specified templates:&lt;br /&gt;
&lt;br /&gt;
* %l%f = DoeJohn&lt;br /&gt;
* %l%1f = DoeJ&lt;br /&gt;
* %-l%+f = doeJOHN&lt;br /&gt;
* %-f_%-l = john_doe&lt;br /&gt;
*&amp;lt;nowiki&amp;gt; http://www.example.com/~%u/&amp;lt;/nowiki&amp;gt; results in  &amp;lt;nowiki&amp;gt;http://www.example.com/~jdoe/&amp;lt;/nowiki&amp;gt; (if the username is jdoe or %-1f%-l)&lt;br /&gt;
&lt;br /&gt;
Template processing is done only on default values, and not on the values retrieved from the CSV file.&lt;br /&gt;
&lt;br /&gt;
In order to create correct Moodle usernames, the username is always converted to lowercase. Moreover, if the &amp;quot;Allow extended characters in usernames&amp;quot; option in the Site policies page is off, characters different to letters, digits, dash (-) and dot (.) are removed. For example if the firstname is John Jr. and the lastname is Doe, the username %-f_%-l will produce john jr._doe when Allow extended characters in usernames is on, and johnjr.doe when off.&lt;br /&gt;
&lt;br /&gt;
When the &amp;quot;New username duplicate handling&amp;quot; setting is set to Append counter, an auto-increment counter will be append to duplicate usernames produced by the template. For example, if the CSV file contains the users named John Doe, Jane Doe and Jenny Doe without explicit usernames, the default username is %-1f%-l and New username duplicate handling is set to Append counter, then the usernames produced will be jdoe, jdoe2 and jdoe3.&lt;br /&gt;
&lt;br /&gt;
===Deleting accounts===&lt;br /&gt;
&lt;br /&gt;
If the &amp;lt;code&amp;gt;deleted&amp;lt;/code&amp;gt; field is present, users with value 1 for it will be deleted. In this case, all the fields may be omitted, except for &amp;lt;code&amp;gt;username&amp;lt;/code&amp;gt;. After uploading the file, be sure to change the &amp;quot;Upload type&amp;quot; to &amp;quot;Update existing users only&amp;quot; and the &amp;quot;Allow deletes&amp;quot; option to &amp;quot;Yes&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Deleting and uploading accounts could be done with a single CSV file. For example, the following file will add the user Tom Jones and delete the user reznort:&lt;br /&gt;
&lt;br /&gt;
 username, firstname, lastname, deleted&lt;br /&gt;
 jonest, Tom, Jones, 0&lt;br /&gt;
 reznort, , , 1&lt;br /&gt;
&lt;br /&gt;
==Encoding file format==&lt;br /&gt;
On the initial Upload user screen, you may select the file encoding format from a pull down list.  These include UTF-8 (the default), ASCII,  ISO-8859-1 to ISO-8859-11 or any one of over 36 formats.&lt;br /&gt;
&lt;br /&gt;
==Hints==&lt;br /&gt;
&lt;br /&gt;
===Spreadsheet===&lt;br /&gt;
&lt;br /&gt;
If you use a spreadsheet program such as Excel to create your .csv file, check the resulting output in a text editor before you upload it.  It is possible to get trailing commas on each line from an empty field if you have added and deleted columns of information prior to saving the final file. Also check the character encoding. A csv file is a simple text file (ASCII or Unicode) that can be used to upload user accounts.&lt;br /&gt;
&lt;br /&gt;
Excel translates passwords that begin with - (minus) or + (plus) as zero. Even when saving as .csv and saying &amp;quot;Yes&amp;quot; to &amp;quot;Keep this format, and leave out any incompatible features.&amp;quot; Check for this before uploading, as a zero halts the upload process.&lt;br /&gt;
&lt;br /&gt;
If you use a formula in Excel to create fields (for example, the concatenate function to create a user name), then remember to copy the cells with the formula and use special paste with values checked to make them into an acceptable data for a csv file.&lt;br /&gt;
&lt;br /&gt;
===Country===&lt;br /&gt;
The country should be written as a two letter code, in capitals. For example, use BE for Belgium or NL for the Netherlands.  Using &amp;quot;be&amp;quot; or &amp;quot;nl&amp;quot; as a country code will result in a database error.&lt;br /&gt;
:&#039;&#039;Tip:&#039;&#039;  If you are having trouble working out the two-letter code for a country, you can consult this Moodle source code file /moodle/lang/en_utf8/countries.php [http://cvs.moodle.org/moodle/lang/en_utf8/countries.php?view=markup&amp;amp;pathrev=MOODLE_19_STABLE or click here for a 1.9 STABLE list].&lt;br /&gt;
ISO Website: [http://www.iso.org/iso/country_codes/iso_3166_code_lists/english_country_names_and_code_elements.htm]&lt;br /&gt;
===Field size limits===&lt;br /&gt;
Some fields have maximum character lengths.  Typically the file will import to the preview list screen but not finish the process.  Turn on debug to see the fields that are too long. A common field to cause problems is the &amp;quot;Institution&amp;quot; field which has a limit of 40 characters.&lt;br /&gt;
===All fields listed here===&lt;br /&gt;
:All the fields that are valid in 2.1 are listed below, except for any custom fields you may have created. &lt;br /&gt;
firstname, lastname, username, email, city, country, lang, timezone, mailformat, maildisplay, maildigest, htmleditor, ajax, autosubscribe ,institution, department, idnumber, skype , msn, aim, yahoo, icq, phone1, phone2, address, url, description, descriptionformat, password, auth, oldusername , deleted, course1, course2, course3, course4&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
*[[Flat file]] enrolment&lt;br /&gt;
&lt;br /&gt;
Using Moodle forum discussions:&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=36851 Can I auto enroll from Excel?]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=58215 Making Email Optional]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=97903 Uploading users to custom roles]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=181259 User upload option: standardise usernames]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=144569 Matriculacion con flat file csv] - discussion in Spanish&lt;br /&gt;
&lt;br /&gt;
[[fr:Importer des utilisateurs]]&lt;br /&gt;
[[ja:ユーザのアップロード]]&lt;br /&gt;
[[zh:上传用户]]&lt;br /&gt;
[[ru:Загрузка пользователей]]&lt;/div&gt;</summary>
		<author><name>Rcollman</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Talk:Upload_users&amp;diff=93989</id>
		<title>Talk:Upload users</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Talk:Upload_users&amp;diff=93989"/>
		<updated>2011-11-22T13:23:54Z</updated>

		<summary type="html">&lt;p&gt;Rcollman: /* Notes from Moodle 2.1 uploaduser.php */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Notes from Moodle 2.1 uploaduser.php==&lt;br /&gt;
firstname, lastname, username, email, city, country, lang, timezone, mailformat, maildisplay, maildigest, htmleditor, ajax, autosubscribe ,institution, department , idnumber, skype , msn, aim, yahoo, icq, phone1, phone2, address, url, description, descriptionformat, password, auth, oldusername , deleted, course1, course2, course3, course4  &lt;br /&gt;
		        &lt;br /&gt;
// watch out when changing auth type or using external auth plugins!&lt;br /&gt;
// use oldusername when renaming users - this is the original username&lt;br /&gt;
// 1 means delete user&lt;br /&gt;
//course# not sure about these put short course name&lt;br /&gt;
&lt;br /&gt;
--[[User:chris collman|chris collman]] 21:22, 22 November 2011 (WST)&lt;/div&gt;</summary>
		<author><name>Rcollman</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Talk:Upload_users&amp;diff=93988</id>
		<title>Talk:Upload users</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Talk:Upload_users&amp;diff=93988"/>
		<updated>2011-11-22T13:22:26Z</updated>

		<summary type="html">&lt;p&gt;Rcollman: /* Notes from Moodle 2.1 uploaduser.php */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Notes from Moodle 2.1 uploaduser.php==&lt;br /&gt;
firstname, lastname, username, email, city, country, lang, timezone, mailformat, maildisplay, maildigest, htmleditor, ajax, autosubscribe ,institution, department , idnumber, skype , msn, aim, yahoo, icq, phone1, phone2, address, url, description, descriptionformat, password, auth, oldusername , deleted, course1, course2, course3, course4  &lt;br /&gt;
		        // watch out when changing auth type or using external auth plugins!&lt;br /&gt;
				// use oldusername when renaming users - this is the original username&lt;br /&gt;
				// 1 means delete user&lt;br /&gt;
				//course# not sure about these&lt;br /&gt;
&lt;br /&gt;
--[[User:chris collman|chris collman]] 21:22, 22 November 2011 (WST)&lt;/div&gt;</summary>
		<author><name>Rcollman</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Talk:Upload_users&amp;diff=93987</id>
		<title>Talk:Upload users</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Talk:Upload_users&amp;diff=93987"/>
		<updated>2011-11-22T13:21:59Z</updated>

		<summary type="html">&lt;p&gt;Rcollman: List of valid fields forlater reference&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Notes from Moodle 2.1 uploaduser.php==&lt;br /&gt;
firstname, lastname, username, email, city, country, lang, timezone, mailformat, maildisplay, maildigest, htmleditor, ajax, autosubscribe ,institution, department , idnumber, skype , msn, aim, yahoo, icq, phone1, phone2, address, url, description, descriptionformat, password, auth, oldusername , deleted, course1, course2, course3, course4  &lt;br /&gt;
		        // watch out when changing auth type or using external auth plugins!&lt;br /&gt;
				// use oldusername when renaming users - this is the original username&lt;br /&gt;
				// 1 means delete user&lt;br /&gt;
				//course# not sure about these&lt;/div&gt;</summary>
		<author><name>Rcollman</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Upload_users&amp;diff=93985</id>
		<title>Upload users</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Upload_users&amp;diff=93985"/>
		<updated>2011-11-22T12:15:58Z</updated>

		<summary type="html">&lt;p&gt;Rcollman: /* Templates */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Accounts}}&lt;br /&gt;
An administrator can upload multiple user accounts via text file in &#039;&#039;Settings &amp;gt; Site administration &amp;gt; Users &amp;gt; Accounts &amp;gt; Upload users&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
There are many robust options for uploading information (fields associated with a user) with this method: from enrolling users in multiple courses with course specific [[Roles|roles]] to updating user information in the [[User profile]] to deleting users from the site.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Tip:&#039;&#039; It is usually not necessary to upload users in bulk with Upload users.  To keep maintenance work down you should first explore forms of authentication that do not require manual maintenance, such as [[External database authentication|connecting to existing external databases]] or letting the users create their own accounts ([[Self enrolment]]). See [[Authentication]] for more information.&lt;br /&gt;
&lt;br /&gt;
[[File:Upload users initial 2.0.JPG|thumb|center|Initial upload users screen 2.1]]&lt;br /&gt;
&lt;br /&gt;
==Upload user process==&lt;br /&gt;
Here is an outline of the process:&lt;br /&gt;
&lt;br /&gt;
# Create file for uploading&lt;br /&gt;
# Go to &#039;&#039;Settings &amp;gt; Site administration &amp;gt; Users &amp;gt; Accounts &amp;gt; Upload users&#039;&#039;&lt;br /&gt;
# Add file to upload&lt;br /&gt;
# Upload users preview - check settings and default user profile settings&lt;br /&gt;
# Upload users preview - click &amp;quot;Upload users&amp;quot;&lt;br /&gt;
# Upload users results - shows list of users, exceptions made in upload and summary of number of users&lt;br /&gt;
# Upload users results - click &amp;quot;Continue&amp;quot;&lt;br /&gt;
# Returns to Upload users screen&lt;br /&gt;
&lt;br /&gt;
==Updating users preview==&lt;br /&gt;
There are settings for the kind of Upload user function you want to perform on the &amp;quot;Upload users preview&amp;quot; page.&lt;br /&gt;
[[File:Upload users preview 2.0.JPG|thumb|center|Upload users preview in Moodle 2.x]]&lt;br /&gt;
&lt;br /&gt;
===Updating existing accounts===&lt;br /&gt;
&lt;br /&gt;
By default Moodle adds new user accounts and skips existing users lines where the &amp;lt;code&amp;gt;username&amp;lt;/code&amp;gt; matches an existing account. Set &amp;quot;Upload Type&amp;quot; to &#039;&#039;&#039;Add  new and update existing users&#039;&#039;&#039;, and existing user account will be updated.&lt;br /&gt;
*Add all, append number to usernames if needed&lt;br /&gt;
*Add new and update existing users&lt;br /&gt;
*Update existing users only&lt;br /&gt;
There are also fields settings to force password change, allow renames, allow deletes, prevent email address duplicates, standardise usernames and select for bulk operations(new users. updated users, all users).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning&#039;&#039;&#039;: errors updating existing accounts can affect your users badly. Be careful when using the options to update.&lt;br /&gt;
&lt;br /&gt;
===Set default user values===&lt;br /&gt;
&lt;br /&gt;
You may be able to set default user field values, if the fields were not included in the uploaded file on this page.&lt;br /&gt;
&lt;br /&gt;
==Upload user results ==&lt;br /&gt;
After accepting the preview settings by clicking on &amp;quot;Upload users&amp;quot;, you should see the the Upload users results screen.&lt;br /&gt;
[[File:Upload users results 2.0.JPG|thumb|center|The 2.0 results screen, everything went well]]&lt;br /&gt;
This screen will show you any exceptions or changes that were made to each user in the upload process.   For example if you were updating user information, the updated information will be shown.  Or if a user was not added that record will be highlighted.&lt;br /&gt;
&lt;br /&gt;
The screen will summarize how many users were uploaded or updated, indicate the number of week passwords and the number of errors.&lt;br /&gt;
&lt;br /&gt;
==File formats for upload users file==&lt;br /&gt;
The upload files have their fields separated by a comma (or other delimiter).   The first line contains the valid field names.  The rest of the lines (records) contain information about each user.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;:Tip:&#039;&#039; If you are not an expert, avoid special characters in field information like quotes or other commas. Test a file with only one record before a large upload. Remember there are other ways to authenticate users on you site or enroll users in a course.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;:Tip:&#039;&#039; You can use a spread sheet program to create the file with the required columns and fields. Then save the file as &amp;quot;CSV (comma delimited)&amp;quot;. These files can be opened with simple text editors for verification. &lt;br /&gt;
&lt;br /&gt;
===Valid upload file for testing===&lt;br /&gt;
Here is an example of a simple valid upload file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;username, password, firstname, lastname, email, course1, group1&amp;lt;br /&amp;gt;&lt;br /&gt;
jonest, verysecret, Tom, Jones, jonest@someplace.edu, math102, Section 1&amp;lt;br /&amp;gt;&lt;br /&gt;
reznort, somesecret, Trent, Reznor, reznort@someplace.edu, math102, Section 3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Fields that can be included===&lt;br /&gt;
&#039;&#039;:Tip:&#039;&#039; We strongly recommend that you test a file that contains fields you proposed to use with one user before attempting a file upload for the first time.  demo.moodle.net might be a good place to see if your test file works.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Required fields&#039;&#039;&#039;: &lt;br /&gt;
:&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;username, firstname, lastname, email&amp;lt;/code&amp;gt;&lt;br /&gt;
:Validity checks are performed for:&lt;br /&gt;
#&amp;lt;code&amp;gt;username&amp;lt;/code&amp;gt; can only contain alphabetical &#039;&#039;&#039;lowercase&#039;&#039;&#039; letters , numbers, hypen &#039;-&#039;, underscore &#039;_&#039;, period &#039;.&#039;, or at-sign &#039;@&#039; &lt;br /&gt;
#&amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; is in the form: &#039;&#039;name@example.com&#039;&#039; .&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Password field&#039;&#039;&#039;: &amp;quot;password&amp;quot; field is optional if &amp;quot;Create password if needed&amp;quot; setting is chosen (default). &lt;br /&gt;
**If included, values should meet the requirements for the site&#039;s [[Site_policies#Password_policy|Password policy]]. To force password change for a particular user, set the password field to &amp;lt;code&amp;gt;changeme&amp;lt;/code&amp;gt;. &lt;br /&gt;
**If omitted, a password will be generated for each user (during the next Cron job) and welcome e-mails sent out (not working in v2.0.2?).&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Optional fields&#039;&#039;&#039;: To provide values other than the default include one or more of these&lt;br /&gt;
:&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;institution, department, city, country, lang, auth, ajax, timezone, idnumber, icq, phone1, phone2, address, url, description, mailformat, maildisplay, htmleditor, autosubscribe&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
*Country- use a country TWO LETTER CODE&lt;br /&gt;
*Some fields have a maximum number of  characters that are allow.  See hints below.&lt;br /&gt;
*Maildisplay, htmleditor and autosubscribe can be set from an import screen in Moodle 2.0.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Custom profile field names&#039;&#039;&#039;: (Optional). xxxxx is the real custom user profile field name (i.e. the unique shortname)&lt;br /&gt;
:&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;profile_field_xxxxx&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
: Create the custom fields BEFORE importing. Use the standard header. The &amp;quot;shortname&amp;quot; for your custom field is xxxxx (NB: as at v2.0.2, the shortname must be all lowercase, otherwise won&#039;t be recognised). The first record must include &amp;quot;profile_field_xxxxx&amp;quot;.&lt;br /&gt;
:&#039;&#039;&#039;Example&#039;&#039;&#039;: To create a custom field &amp;quot;genre&amp;quot;, you must write a shortname &amp;quot;genre&amp;quot; in the new field, and write &amp;quot;profile_field_genre&amp;quot; in the header of the .csv file.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Special fields&#039;&#039;&#039;: Used for changing of usernames or deleting of users&lt;br /&gt;
:&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;oldusername&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;deleted&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
*&#039;&#039;&#039;Enrolment fields&#039;&#039;&#039;: (Optional):&lt;br /&gt;
:&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;course1, type1, role1, group1, enrolperiod1, course2, type2, role2, group2, enrolperiod2&amp;lt;/code&amp;gt; etc.&lt;br /&gt;
**&amp;lt;code&amp;gt;course&amp;lt;/code&amp;gt; is the &amp;quot;shortname&amp;quot; of the course, if present the user will be enrolled in those courses.&lt;br /&gt;
** &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; refers to the role to be used for associated course enrolment. Value 1 is default course role, 2 is legacy Teacher role and 3 is legacy Non-editing Teacher.&lt;br /&gt;
** You can use role field instead to specify roles directly - use either role short name or id (numeric names of roles are not supported).&lt;br /&gt;
** Users may be also assigned to groups in course (group1 in course1, group2 in course2, etc.).&lt;br /&gt;
*** A group is identified by name or id (numeric group names are not supported).&lt;br /&gt;
** From Moodle 2.0, you can set the enrolment duration, in days, for each course (&amp;lt;code&amp;gt;enrolperiod1&amp;lt;/code&amp;gt; for &amp;lt;code&amp;gt;course1&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;enrolperiod2&amp;lt;/code&amp;gt; for &amp;lt;code&amp;gt;course2&amp;lt;/code&amp;gt;, etc.).&lt;br /&gt;
&lt;br /&gt;
Commas within  a field must be encoded as &amp;amp;#44 - the script will decode these back to commas.&lt;br /&gt;
&lt;br /&gt;
For Boolean fields, use &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; for false and &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; for true.&lt;br /&gt;
&lt;br /&gt;
To prevent users from receiving a large number of emails from courses or forced subscription forums use the &#039;&#039;&#039;maildigest&#039;&#039;&#039;.  The options for this field are 0 = No digest, 1 = Complete digest and 2 = Digest with just subjects.&lt;br /&gt;
&lt;br /&gt;
==Advanced potentials of Upload user==&lt;br /&gt;
===Templates===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: This section needs checking and updating if necessary for Moodle 2.0. Please do so and remove this note when finished.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The default values are processed as templates in which the following codes are allowed:&lt;br /&gt;
&lt;br /&gt;
* %l - will be replaced by the lastname&lt;br /&gt;
* %f - will be replaced by the firstname&lt;br /&gt;
* %u - will be replaced by the username&lt;br /&gt;
* %% - will be replaced by the %&lt;br /&gt;
&lt;br /&gt;
Between the percent sign (%) and any code letter (l, f or u) the following modifiers are allowed:&lt;br /&gt;
&lt;br /&gt;
* (-) minus sign - the information specified by the code letter will be converted to lowercase&lt;br /&gt;
* (+) plus sign - the information specified by the code letter will be converted to UPPERCASE&lt;br /&gt;
* (~) tilde sign - the information specified by the code letter will be converted to Title Case&lt;br /&gt;
* a decimal number - the information specified by the code letter will be truncated to that many characters&lt;br /&gt;
&lt;br /&gt;
For example, if the firstname is John and the lastname is Doe, the following values will be obtained with the specified templates:&lt;br /&gt;
&lt;br /&gt;
* %l%f = DoeJohn&lt;br /&gt;
* %l%1f = DoeJ&lt;br /&gt;
* %-l%+f = doeJOHN&lt;br /&gt;
* %-f_%-l = john_doe&lt;br /&gt;
*&amp;lt;nowiki&amp;gt; http://www.example.com/~%u/&amp;lt;/nowiki&amp;gt; results in  &amp;lt;nowiki&amp;gt;http://www.example.com/~jdoe/&amp;lt;/nowiki&amp;gt; (if the username is jdoe or %-1f%-l)&lt;br /&gt;
&lt;br /&gt;
Template processing is done only on default values, and not on the values retrieved from the CSV file.&lt;br /&gt;
&lt;br /&gt;
In order to create correct Moodle usernames, the username is always converted to lowercase. Moreover, if the &amp;quot;Allow extended characters in usernames&amp;quot; option in the Site policies page is off, characters different to letters, digits, dash (-) and dot (.) are removed. For example if the firstname is John Jr. and the lastname is Doe, the username %-f_%-l will produce john jr._doe when Allow extended characters in usernames is on, and johnjr.doe when off.&lt;br /&gt;
&lt;br /&gt;
When the &amp;quot;New username duplicate handling&amp;quot; setting is set to Append counter, an auto-increment counter will be append to duplicate usernames produced by the template. For example, if the CSV file contains the users named John Doe, Jane Doe and Jenny Doe without explicit usernames, the default username is %-1f%-l and New username duplicate handling is set to Append counter, then the usernames produced will be jdoe, jdoe2 and jdoe3.&lt;br /&gt;
&lt;br /&gt;
===Deleting accounts===&lt;br /&gt;
&lt;br /&gt;
If the &amp;lt;code&amp;gt;deleted&amp;lt;/code&amp;gt; field is present, users with value 1 for it will be deleted. In this case, all the fields may be omitted, except for &amp;lt;code&amp;gt;username&amp;lt;/code&amp;gt;. After uploading the file, be sure to change the &amp;quot;Upload type&amp;quot; to &amp;quot;Update existing users only&amp;quot; and the &amp;quot;Allow deletes&amp;quot; option to &amp;quot;Yes&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Deleting and uploading accounts could be done with a single CSV file. For example, the following file will add the user Tom Jones and delete the user reznort:&lt;br /&gt;
&lt;br /&gt;
 username, firstname, lastname, deleted&lt;br /&gt;
 jonest, Tom, Jones, 0&lt;br /&gt;
 reznort, , , 1&lt;br /&gt;
&lt;br /&gt;
==Encoding file format==&lt;br /&gt;
On the initial Upload user screen, you may select the file encoding format from a pull down list.  These include UTF-8 (the default), ASCII,  ISO-8859-1 to ISO-8859-11 or any one of over 36 formats.&lt;br /&gt;
&lt;br /&gt;
==Hints==&lt;br /&gt;
&lt;br /&gt;
===Spreadsheet===&lt;br /&gt;
&lt;br /&gt;
If you use a spreadsheet program such as Excel to create your .csv file, check the resulting output in a text editor before you upload it.  It is possible to get trailing commas on each line from an empty field if you have added and deleted columns of information prior to saving the final file. Also check the character encoding. A csv file is a simple text file (ASCII or Unicode) that can be used to upload user accounts.&lt;br /&gt;
&lt;br /&gt;
Excel translates passwords that begin with - (minus) or + (plus) as zero. Even when saving as .csv and saying &amp;quot;Yes&amp;quot; to &amp;quot;Keep this format, and leave out any incompatible features.&amp;quot; Check for this before uploading, as a zero halts the upload process.&lt;br /&gt;
&lt;br /&gt;
If you use a formula in Excel to create fields (for example, the concatenate function to create a user name), then remember to copy the cells with the formula and use special paste with values checked to make them into an acceptable data for a csv file.&lt;br /&gt;
&lt;br /&gt;
===Country===&lt;br /&gt;
The country should be written as a two letter code, in capitals. For example, use BE for Belgium or NL for the Netherlands.  Using &amp;quot;be&amp;quot; or &amp;quot;nl&amp;quot; as a country code will result in a database error.&lt;br /&gt;
:&#039;&#039;Tip:&#039;&#039;  If you are having trouble working out the two-letter code for a country, you can consult this Moodle source code file /moodle/lang/en_utf8/countries.php [http://cvs.moodle.org/moodle/lang/en_utf8/countries.php?view=markup&amp;amp;pathrev=MOODLE_19_STABLE or click here for a 1.9 STABLE list].&lt;br /&gt;
ISO Website: [http://www.iso.org/iso/country_codes/iso_3166_code_lists/english_country_names_and_code_elements.htm]&lt;br /&gt;
===Field size limits===&lt;br /&gt;
Some fields have maximum character lengths.  Typically the file will import to the preview list screen but not finish the process.  Turn on debug to see the fields that are too long. A common field to cause problems is the &amp;quot;Institution&amp;quot; field which has a limit of 40 characters.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
*[[Flat file]] enrolment&lt;br /&gt;
&lt;br /&gt;
Using Moodle forum discussions:&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=36851 Can I auto enroll from Excel?]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=58215 Making Email Optional]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=97903 Uploading users to custom roles]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=181259 User upload option: standardise usernames]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=144569 Matriculacion con flat file csv] - discussion in Spanish&lt;br /&gt;
&lt;br /&gt;
[[fr:Importer des utilisateurs]]&lt;br /&gt;
[[ja:ユーザのアップロード]]&lt;br /&gt;
[[zh:上传用户]]&lt;br /&gt;
[[ru:Загрузка пользователей]]&lt;/div&gt;</summary>
		<author><name>Rcollman</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Talk:Cron_with_Unix_or_Linux&amp;diff=93984</id>
		<title>Talk:Cron with Unix or Linux</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Talk:Cron_with_Unix_or_Linux&amp;diff=93984"/>
		<updated>2011-11-22T12:09:43Z</updated>

		<summary type="html">&lt;p&gt;Rcollman: copy MoodleDocs some of 2.0 Talk:Cron&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Since wget is being used to run the cron.php script anyway, you can really run this ANYWHERE ==&lt;br /&gt;
:Brought this comment from 2.0 Cron comment page.  It was unsigned/undated --[[User:chris collman|chris collman]] 20:09, 22 November 2011 (WST)&lt;br /&gt;
It is important to note that since the cron.php script is not run internally by Moodle, but by an outside interaction, you can really run a cron job on ANY server that runs the cron.php on your Moodle installation.&lt;br /&gt;
&lt;br /&gt;
So, for example, if you have a Moodle install at an ISP that does not let you run cron jobs, but you have, say, a DSLline at home, you can use any of your Linux computers at home to run cron.  (you do use Linux at home, right? :)&lt;br /&gt;
&lt;br /&gt;
And the beauty of it is, the crontab line is *exactly* the same as listed in the main article. It just points to an outside URL.&lt;br /&gt;
&lt;br /&gt;
Now, I mention this because at one point I had configured a server to run Moodle but, in the interest of security, I did not have wget available on the server.  (cron was available, but not wget).&lt;br /&gt;
&lt;br /&gt;
Well, the easiest thing to do was to just run a cron job somewhere else.&lt;br /&gt;
&lt;br /&gt;
Alrighty, seeyalater!&lt;br /&gt;
&lt;br /&gt;
== Update and clarify ==&lt;br /&gt;
:Brought this comment from 2.0 Cron comment page.  It was unsigned/undated --[[User:chris collman|chris collman]] 20:09, 22 November 2011 (WST)&lt;br /&gt;
&lt;br /&gt;
* The whole cronclionly vs. shell invocation vs. &amp;quot;using wget&amp;quot; is completely misleading.&lt;br /&gt;
** while you can call cron.php using a web browser or a command line web &amp;quot;browser&amp;quot; like wget, curl, lynx from outside or inside the server. The latter commands can be scripted, e.g. to be called by cron.&lt;br /&gt;
** the &amp;quot;cronclionly&amp;quot; checkbox restricts the call to cron.php to calling it from inside the server and only using &amp;quot;bin/php&amp;quot;. This can be scripted to be called by cron, as well.&lt;br /&gt;
* It should be said somewhere that using e.g. the &amp;quot;www-data&amp;quot; user in e.g. /etc/cron.d/moodle is far better than using /etc/crontab which is executed by root. AFAICS this is nowhere mentioned.&lt;/div&gt;</summary>
		<author><name>Rcollman</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Talk:Cron&amp;diff=93983</id>
		<title>Talk:Cron</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Talk:Cron&amp;diff=93983"/>
		<updated>2011-11-22T12:05:52Z</updated>

		<summary type="html">&lt;p&gt;Rcollman: delete temp draft of mine&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Comment from Eloy:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;If there is some template to mark one page as &amp;quot;require some love&amp;quot; I&#039;d say https://docs.moodle.org/en/Cron requires it. It talks 99% of the time to use web-browser cron. Only 1 line talks about cli cron.&amp;quot; --[[User:Helen Foster|Helen Foster]] 20:44, 9 November 2011 (WST)&lt;br /&gt;
:I just noticed this comment. Cron is not one of my special areas of knowledge but obviously use it. Did a quick &amp;quot;Cron CLI&amp;quot; on the web and got lost in how to program a php file to run cron jobs.   Saw the note about 2.0 and CLI on this page.   &lt;br /&gt;
&lt;br /&gt;
I think Eloy&#039;s comment is also saying that this page is too long and could be split up? For example use a navtrail and a Cron template.  Proposed pages:&lt;br /&gt;
*Cron page - Overview section   &lt;br /&gt;
*[[Cron with Windows OS]] page - move section.&lt;br /&gt;
*[[Cron with MAC OS X]] page - move section&lt;br /&gt;
*[[Cron with web hosting services]] page - move section&lt;br /&gt;
*[[Cron with UNIX]] page - move section&lt;br /&gt;
*[[Cron reports]]&lt;br /&gt;
*[[Cron settings]]&lt;br /&gt;
Comments? --[[User:chris collman|chris collman]] 23:25, 12 November 2011 (WST)&lt;br /&gt;
&lt;br /&gt;
Notice that I am using the phrase &amp;quot;the Moodle cron process&amp;quot;. As I understand it, this process can be triggered via admin/cron.php  OR via a cron service at admin/cli/cron.php. Frankly, I am not sure how lib/cronlib.php  works with either of these trigeer points but I don&#039;t think that is important for the site admin.  The old cron page refered to cron.php with the assumption that it was in admin.   To avoid confusion for a new user, I decided to call it a Moodle cron process.--[[User:chris collman|chris collman]] 23:57, 19 November 2011 (WST)&lt;/div&gt;</summary>
		<author><name>Rcollman</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Cron&amp;diff=93982</id>
		<title>Cron</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Cron&amp;diff=93982"/>
		<updated>2011-11-22T11:53:36Z</updated>

		<summary type="html">&lt;p&gt;Rcollman: Upgrade page, split into many pages that are linked with template&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Installing Moodle}}&lt;br /&gt;
Cron is the name of a Unix program that runs predefined tasks on a computer at regular intervals. The cron process in Moodle assists some modules to perform tasks on a scheduled basis. For example, the cron process might tell Moodle to check all discussion forums so it can mail out copies of new posts to people who have subscribed to that forum. &lt;br /&gt;
&lt;br /&gt;
The Moodle cron process can not tell itself to run.  It is a best practice to set up a cron service either on the hosting web server, another server or on another computer that will tell the Moodle cron process to run. &lt;br /&gt;
 &lt;br /&gt;
*[[Cron reports]] - Examples of reports shown after admin/cron.php was triggered&lt;br /&gt;
*[[Cron settings]] - Moodle cron process password and CLI settings&lt;br /&gt;
*[[Cron with Windows OS]] - Cron services in Windows&lt;br /&gt;
*[[Cron with MAC OS X]]- Cron services in a MAC environment&lt;br /&gt;
*[[Cron with web hosting services]]- Cron services in various web hosting examples.&lt;br /&gt;
*[[Cron with UNIX]]- Cron services on various UNIX and Linux flavored operating systems.&lt;br /&gt;
&lt;br /&gt;
:Note: Asking a human to use their browser to run the Moodle cron process every five or ten minutes,or when anybody on the site thinks it needs to be run is not a best practice.   The outside cron service provides a &amp;quot;heartbeat&amp;quot; so that the Moodle cron process can perform functions at periods defined for each module that needs it.&lt;br /&gt;
&lt;br /&gt;
==Starting cron==&lt;br /&gt;
There are a number of way to invoke Moodle cron process. Cron can be started from the address bar in a browser (For example http:demo.moodle.net/admin/cron.php), via a [[Daemon]], or wq1et, curl or some other form of a cron service. &lt;br /&gt;
&lt;br /&gt;
===Cron service location and timing===&lt;br /&gt;
Note that the machine providing the cron service  &#039;&#039;&#039;does not need to be the same machine that is running Moodle&#039;&#039;&#039;. For example, if you have a limited web hosting service that does not have a cron service, then you might choose to run cron on another server or on your home computer. All that matters is that the Moodle cron process is run on a regular basis.&lt;br /&gt;
&lt;br /&gt;
The load of the Moodle cron process on the Moodle server is not very high, so 5 minutes is usually reasonable.  However if you&#039;re worried about it you can reduce the time period to something like 15 minutes or even 30 minutes. &lt;br /&gt;
:It&#039;s best not to make the time period too long.  For example delaying mail-outs can slow down activity within the course and create a large mail outbox to process.  Or student want to see their activity and course completions updated quickly.  &lt;br /&gt;
&lt;br /&gt;
===Testing cron and manual trigger===&lt;br /&gt;
On a new Moodle install or upgrade, it is a good idea to test the Moodle cron process directly from your browser: &#039;&#039;&amp;lt;nowiki&amp;gt;http://example.com/moodle/admin/cron.php&amp;lt;/nowiki&amp;gt;&#039;&#039;  (See [[Cron settings]] if this does not work).&lt;br /&gt;
&lt;br /&gt;
Next, you need to set up a way to manage an automatic scheduled process to run the script on a regular basis. This will depend upon the operating system and program you select.&lt;br /&gt;
&lt;br /&gt;
:Note: When the Moodle cron process is called from cron service, &#039;the command line&#039; trigger creates a temporary admin environment (similar to a login) in order to run and then deletes that environment. You can disable command line running of cron by disabling the appropriate section in the cron.php file.&lt;br /&gt;
&lt;br /&gt;
==Moodle cron process ==&lt;br /&gt;
The Moodle cron process basically finds and determines if certain functions need to run. These functions are defined in code associated with specific activities and processes. Usually the function looks for new activity that has occurred since cron was last run.  Some of the functions may use a timestamp to determine if they should look for new activity. A few functions are run on a random basis.  &lt;br /&gt;
&lt;br /&gt;
===Examples of Moodle cron processes===&lt;br /&gt;
Moodle&#039;s cron processes include:&lt;br /&gt;
*updating reports such as quiz, admin, gradebook &lt;br /&gt;
*updating course and activity completion (if enabled in advanced settings)&lt;br /&gt;
*updating portfolio&lt;br /&gt;
*plagiarism checks &lt;br /&gt;
*updates activity modules. It looks through the mod directory for lib.php files that contain the function activity-name_cron and will call it. In a standard install this includes assignment, chat, forum, and SCROM.&lt;br /&gt;
*updates blocks.  It looks for blocks for their cron methods (object functions) to be run.  It then, for each such block, runs the cron method for a new object associated with that block (for more details read admin/cron.php). These files (the lib.php files and the files where the block classes are defined) can contain cleanup functions, email functions or anything that needs to be run on a regular basis. &lt;br /&gt;
*create the backups of courses at the time specified in the administration settings. &lt;br /&gt;
*updating messaging module or forum email notifications.&lt;br /&gt;
*unenrol students - this is done on a random basis about 20% of the time Moodle&#039;s cron process is triggered.&lt;br /&gt;
*deleting users who have not filled out their profile via the 20% random trigger&lt;br /&gt;
*deleting old logs are also checked 20% of the time via the 20% random trigger&lt;br /&gt;
*deletes old cached text&lt;br /&gt;
*generates new passwords for new users and notifies users&lt;br /&gt;
*runs authentication enrolments processes&lt;br /&gt;
*updates stats if enabled.&lt;br /&gt;
*runs blog cleanups&lt;br /&gt;
*updates registrations&lt;br /&gt;
&lt;br /&gt;
The code in lib/cronlib.php shows the places that are being checked when the admin/cron.php is run and the report which is displayed on the screen after it has run.  As mentioned elsewhere admin/cli/cron.php is the file which outside cron services run to trigger the Moodle cron process.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
Using Moodle forum discussions:&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=41827 Cron - can someone give me a quick confirmation of function?]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=97684 Cronjob Question]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=97457 Slow cron : avoiding simultaneous cron]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=117168 Visibility of cron.php]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=139263#p609060 How to log the output of a Scheduled Task on Windows] - this discussion explains a nice trick that can be very useful when you are experiencing problems with your Windows Scheduled Task and you need to log the output of the Scheduled Task to a log file.&lt;br /&gt;
&lt;br /&gt;
[[es:Cron]]&lt;br /&gt;
[[fr:Cron]]&lt;br /&gt;
[[nl:Cron]]&lt;br /&gt;
[[sk:Cron]]&lt;br /&gt;
[[pl:Cron]]&lt;br /&gt;
[[ja:Cron]]&lt;/div&gt;</summary>
		<author><name>Rcollman</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Talk:Cron&amp;diff=93981</id>
		<title>Talk:Cron</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Talk:Cron&amp;diff=93981"/>
		<updated>2011-11-22T11:50:32Z</updated>

		<summary type="html">&lt;p&gt;Rcollman: /* =Examples of Moodle cron processes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Comment from Eloy:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;If there is some template to mark one page as &amp;quot;require some love&amp;quot; I&#039;d say https://docs.moodle.org/en/Cron requires it. It talks 99% of the time to use web-browser cron. Only 1 line talks about cli cron.&amp;quot; --[[User:Helen Foster|Helen Foster]] 20:44, 9 November 2011 (WST)&lt;br /&gt;
:I just noticed this comment. Cron is not one of my special areas of knowledge but obviously use it. Did a quick &amp;quot;Cron CLI&amp;quot; on the web and got lost in how to program a php file to run cron jobs.   Saw the note about 2.0 and CLI on this page.   &lt;br /&gt;
&lt;br /&gt;
I think Eloy&#039;s comment is also saying that this page is too long and could be split up? For example use a navtrail and a Cron template.  Proposed pages:&lt;br /&gt;
*Cron page - Overview section   &lt;br /&gt;
*[[Cron with Windows OS]] page - move section.&lt;br /&gt;
*[[Cron with MAC OS X]] page - move section&lt;br /&gt;
*[[Cron with web hosting services]] page - move section&lt;br /&gt;
*[[Cron with UNIX]] page - move section&lt;br /&gt;
*[[Cron reports]]&lt;br /&gt;
*[[Cron settings]]&lt;br /&gt;
Comments? --[[User:chris collman|chris collman]] 23:25, 12 November 2011 (WST)&lt;br /&gt;
&lt;br /&gt;
Notice that I am using the phrase &amp;quot;the Moodle cron process&amp;quot;. As I understand it, this process can be triggered via admin/cron.php  OR via a cron service at admin/cli/cron.php. Frankly, I am not sure how lib/cronlib.php  works with either of these trigeer points but I don&#039;t think that is important for the site admin.  The old cron page refered to cron.php with the assumption that it was in admin.   To avoid confusion for a new user, I decided to call it a Moodle cron process.--[[User:chris collman|chris collman]] 23:57, 19 November 2011 (WST)&lt;br /&gt;
&lt;br /&gt;
==Will create change on this page later==&lt;br /&gt;
Not hearing any immediate response to my proposals, I will wait a few days before I change things.  I will go back and change the 2.0 Docs as well--[[User:chris collman|chris collman]] 22:58, 17 November 2011 (WST)&lt;br /&gt;
&lt;br /&gt;
::&#039;&#039;&#039;DRAFT OF NEW CRON PAGE STARTS HERE&#039;&#039;&#039; (will remove later)&lt;br /&gt;
&#039;&#039;&#039;Change Moodle 2.0 Docs as well&#039;&#039;&#039;&lt;br /&gt;
Cron is the name of a Unix program that runs predefined tasks on a computer at regular intervals. The cron process in Moodle assists some modules to perform tasks on a scheduled basis. For example, the cron process might tell Moodle to check all discussion forums so it can mail out copies of new posts to people who have subscribed to that forum. &lt;br /&gt;
&lt;br /&gt;
The Moodle cron process can not tell itself to run.  It is a best practice to set up a cron service either on the hosting web server, another server or on another computer that will tell the Moodle cron process to run. &lt;br /&gt;
 &lt;br /&gt;
*[[Cron reports]] - Examples of reports shown after admin/cron.php was triggered&lt;br /&gt;
*[[Cron settings]] - Moodle cron process password and CLI settings&lt;br /&gt;
*[[Cron with Windows OS]] - Cron services in Windows&lt;br /&gt;
*[[Cron with MAC OS X]]- Cron services in a MAC environment&lt;br /&gt;
*[[Cron with web hosting services]]- Cron services in various web hosting examples.&lt;br /&gt;
*[[Cron with UNIX]]- Cron services on various UNIX and Linux flavored operating systems.&lt;br /&gt;
&lt;br /&gt;
:Note: Asking a human to use their browser to run the Moodle cron process every five or ten minutes,or when anybody on the site thinks it needs to be run is not a best practice.   The outside cron service provides a &amp;quot;heartbeat&amp;quot; so that the Moodle cron process can perform functions at periods defined for each module that needs it.&lt;br /&gt;
&lt;br /&gt;
==Starting cron==&lt;br /&gt;
There are a number of way to invoke Moodle cron process. Cron can be started from the address bar in a browser (For example http:demo.moodle.net/admin/cron.php), via a [[Daemon]], or wq1et, curl or some other form of a cron service. &lt;br /&gt;
&lt;br /&gt;
===Cron service location and timing===&lt;br /&gt;
Note that the machine providing the cron service  &#039;&#039;&#039;does not need to be the same machine that is running Moodle&#039;&#039;&#039;. For example, if you have a limited web hosting service that does not have a cron service, then you might choose to run cron on another server or on your home computer. All that matters is that the Moodle cron process is run on a regular basis.&lt;br /&gt;
&lt;br /&gt;
The load of the Moodle cron process on the Moodle server is not very high, so 5 minutes is usually reasonable.  However if you&#039;re worried about it you can reduce the time period to something like 15 minutes or even 30 minutes. &lt;br /&gt;
:It&#039;s best not to make the time period too long.  For example delaying mail-outs can slow down activity within the course and create a large mail outbox to process.  Or student want to see their activity and course completions updated quickly.  &lt;br /&gt;
&lt;br /&gt;
===Testing cron and manual trigger===&lt;br /&gt;
On a new Moodle install or upgrade, it is a good idea to test the Moodle cron process directly from your browser: &#039;&#039;&amp;lt;nowiki&amp;gt;http://example.com/moodle/admin/cron.php&amp;lt;/nowiki&amp;gt;&#039;&#039;  (See [[Cron settings]] if this does not work).&lt;br /&gt;
&lt;br /&gt;
Next, you need to set up a way to manage an automatic scheduled process to run the script on a regular basis. This will depend upon the operating system and program you select.&lt;br /&gt;
&lt;br /&gt;
:Note: When the Moodle cron process is called from cron service, &#039;the command line&#039; trigger creates a temporary admin environment (similar to a login) in order to run and then deletes that environment. You can disable command line running of cron by disabling the appropriate section in the cron.php file.&lt;br /&gt;
&lt;br /&gt;
==Moodle cron process ==&lt;br /&gt;
The Moodle cron process basically finds and determines if certain functions need to run. These functions are defined in code associated with specific activities and processes. Usually the function looks for new activity that has occurred since cron was last run.  Some of the functions may use a timestamp to determine if they should look for new activity. A few functions are run on a random basis.  &lt;br /&gt;
&lt;br /&gt;
===Examples of Moodle cron processes===&lt;br /&gt;
Moodle&#039;s cron processes include:&lt;br /&gt;
*updating reports such as quiz, admin, gradebook &lt;br /&gt;
*updating course and activity completion (if enabled in advanced settings)&lt;br /&gt;
*updating portfolio&lt;br /&gt;
*plagiarism checks &lt;br /&gt;
*updates activity modules. It looks through the mod directory for lib.php files that contain the function activity-name_cron and will call it. In a standard install this includes assignment, chat, forum, and SCROM.&lt;br /&gt;
*updates blocks.  It looks for blocks for their cron methods (object functions) to be run.  It then, for each such block, runs the cron method for a new object associated with that block (for more details read admin/cron.php). These files (the lib.php files and the files where the block classes are defined) can contain cleanup functions, email functions or anything that needs to be run on a regular basis. &lt;br /&gt;
*create the backups of courses at the time specified in the administration settings. &lt;br /&gt;
*updating messaging module or forum email notifications.&lt;br /&gt;
*unenroll students - this is done on a random basis about 20% of the time Moodle&#039;s cron process is triggered.&lt;br /&gt;
*deleting users who have not filled out their profile via the 20% random trigger&lt;br /&gt;
*deleting old logs are also checked 20% of the time via the 20% random trigger&lt;br /&gt;
*deletes old cached text&lt;br /&gt;
*generates new passwords for new users and notifies users&lt;br /&gt;
*runs authentication enrolments processes&lt;br /&gt;
*updates stats if enabled.&lt;br /&gt;
*runs blog cleanups&lt;br /&gt;
*updates registrations&lt;br /&gt;
&lt;br /&gt;
The code in lib/cronlib.php shows the places that are being checked when the admin/cron.php is run and the report which is displayed on the screen after it has run.  As mentioned elsewhere admin/cli/cron.php is the file which outside cron services run to trigger the Moodle cron process.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
Using Moodle forum discussions:&#039;&#039;&#039;No wiki start&#039;&#039;&#039;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=41827 Cron - can someone give me a quick confirmation of function?]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=97684 Cronjob Question]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=97457 Slow cron : avoiding simultaneous cron]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=117168 Visibility of cron.php]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=139263#p609060 How to log the output of a Scheduled Task on Windows] - this discussion explains a nice trick that can be very useful when you are experiencing problems with your Windows Scheduled Task and you need to log the output of the Scheduled Task to a log file.&lt;br /&gt;
&lt;br /&gt;
[[es:Cron]]&lt;br /&gt;
[[fr:Cron]]&lt;br /&gt;
[[nl:Cron]]&lt;br /&gt;
[[sk:Cron]]&lt;br /&gt;
[[pl:Cron]]&lt;br /&gt;
[[ja:Cron]]&amp;lt;/nowiki&amp;gt;&#039;&#039;&#039;No wiki end&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
::&#039;&#039;&#039;END OF DRAFT PAGE HERE&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Rcollman</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Template:Lesson&amp;diff=93942</id>
		<title>Template:Lesson</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Template:Lesson&amp;diff=93942"/>
		<updated>2011-11-20T15:51:42Z</updated>

		<summary type="html">&lt;p&gt;Rcollman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;navtrail&amp;quot;&amp;gt;[[Main page]] ► [[Managing a Moodle course]] ► [[Activities]] ► [[Lesson module]] ► [[{{PAGENAME}}]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;sideblock right&amp;quot; style=&amp;quot;width: 12em;&amp;quot;&amp;gt;	&lt;br /&gt;
&amp;lt;div class=&amp;quot;header&amp;quot;&amp;gt;[[Lesson module]]&amp;lt;/div&amp;gt;	&lt;br /&gt;
&amp;lt;div class=&amp;quot;content&amp;quot;&amp;gt;&lt;br /&gt;
* [[Lesson settings]]&lt;br /&gt;
* [[Building Lesson]]&lt;br /&gt;
* [[Using Lesson]]&lt;br /&gt;
* [[Lesson reports]]&lt;br /&gt;
* [[Lesson FAQ]]&lt;br /&gt;
* [[Jumps]]&lt;br /&gt;
* [[Adding a content page|Adding content page]]&lt;br /&gt;
* [[Adding a question page|Adding question page]]&lt;br /&gt;
* [[Lesson clusters|Clusters]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;[[Category:Lesson]]&amp;lt;/includeonly&amp;gt;&lt;br /&gt;
&amp;lt;noinclude&amp;gt;This template will categorize articles that include it into [[:Category:Lesson]].&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rcollman</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Template:Lesson&amp;diff=93941</id>
		<title>Template:Lesson</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Template:Lesson&amp;diff=93941"/>
		<updated>2011-11-20T15:50:54Z</updated>

		<summary type="html">&lt;p&gt;Rcollman: expand to include most of pages that contain this template&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;navtrail&amp;quot;&amp;gt;[[Main page]] ► [[Managing a Moodle course]] ► [[Activities]] ► [[Lesson module]] ► [[{{PAGENAME}}]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;sideblock right&amp;quot; style=&amp;quot;width: 12em;&amp;quot;&amp;gt;	&lt;br /&gt;
&amp;lt;div class=&amp;quot;header&amp;quot;&amp;gt;[[Lesson module]]&amp;lt;/div&amp;gt;	&lt;br /&gt;
&amp;lt;div class=&amp;quot;content&amp;quot;&amp;gt;&lt;br /&gt;
* [[Lesson settings]]&lt;br /&gt;
* [[Building Lesson]]&lt;br /&gt;
* [[Using Lesson]]&lt;br /&gt;
* [[Lesson reports]]&lt;br /&gt;
* [[Lesson FAQ]]&lt;br /&gt;
* [[Jumps]]&lt;br /&gt;
* [[Adding content page]]&lt;br /&gt;
* [[Adding question page]]&lt;br /&gt;
* [[Lesson clusters|Clusters]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;[[Category:Lesson]]&amp;lt;/includeonly&amp;gt;&lt;br /&gt;
&amp;lt;noinclude&amp;gt;This template will categorize articles that include it into [[:Category:Lesson]].&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rcollman</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Template:Lesson&amp;diff=93940</id>
		<title>Template:Lesson</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Template:Lesson&amp;diff=93940"/>
		<updated>2011-11-20T15:45:37Z</updated>

		<summary type="html">&lt;p&gt;Rcollman: reports has template&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;navtrail&amp;quot;&amp;gt;[[Main page]] ► [[Managing a Moodle course]] ► [[Activities]] ► [[Lesson module]] ► [[{{PAGENAME}}]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;sideblock right&amp;quot; style=&amp;quot;width: 12em;&amp;quot;&amp;gt;	&lt;br /&gt;
&amp;lt;div class=&amp;quot;header&amp;quot;&amp;gt;[[Lesson module]]&amp;lt;/div&amp;gt;	&lt;br /&gt;
&amp;lt;div class=&amp;quot;content&amp;quot;&amp;gt;&lt;br /&gt;
* [[Lesson settings]]&lt;br /&gt;
* [[Building Lesson]]&lt;br /&gt;
* [[Using Lesson]]&lt;br /&gt;
* [[Lesson reports]]&lt;br /&gt;
* [[Lesson FAQ]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;[[Category:Lesson]]&amp;lt;/includeonly&amp;gt;&lt;br /&gt;
&amp;lt;noinclude&amp;gt;This template will categorize articles that include it into [[:Category:Lesson]].&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rcollman</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Answers&amp;diff=93939</id>
		<title>Answers</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Answers&amp;diff=93939"/>
		<updated>2011-11-20T15:43:49Z</updated>

		<summary type="html">&lt;p&gt;Rcollman: /* The Ultimate Answer to Everything */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is about Answers used in a Course [[Lesson module]] question or in a Course [[Quiz module]] or a [[Question bank]] question.  Typically students are presented with a question, they select or create an answer, which maybe scored and bring additional information to the student or present a new set of information to consider.&lt;br /&gt;
&lt;br /&gt;
==Links to answers==&lt;br /&gt;
*[[Lesson module#Answers | Answers used in Lesson Page]] &lt;br /&gt;
*[[Lesson module#Types_of_questions_available_within_a_lesson|Types of questions]]  in a Lesson that have answers&lt;br /&gt;
*[[Quiz]] page in MoodleDocs&lt;br /&gt;
*[[Question types]] available in a Quiz that have answers &lt;br /&gt;
* The [https://docs.moodle.org/en/Category:Quiz Quiz Topic Index Quiz index] is also an excellent source of information about different types of questions and their types of answers. Lesson and Quiz questions types are the same&lt;br /&gt;
&lt;br /&gt;
==Links to places to find answers==&lt;br /&gt;
*Moodle Documentation article- do not click your mouse, you are here.  Use the search field on the left side of the page.  &lt;br /&gt;
**Go looks for a specific page with that text&lt;br /&gt;
**Search looks for every use of the text&lt;br /&gt;
*Moodle Documentation page comments - not a good place for questions but sometimes they have answers&lt;br /&gt;
*[http://moodle.org/mod/forum/index.php?id=5 Moodle forums] - these are organized by interest and there are lots of them.  &lt;br /&gt;
*[http://moodle.org/mod/forum/view.php?id=6801 Moodle social forum] - for answers to real philosophical or non Moodle questions&lt;br /&gt;
*[[Tracker|Moodle Tracker]] - Not only a place to report bugs but a place to answer the question if others have noticed the same thing.&lt;br /&gt;
*[http://demo.moodle.org/ demo.moodle.org] find your own answers in the demonstration.  You can&#039;t break it, every hour it restores itself.&lt;br /&gt;
&lt;br /&gt;
==The Ultimate &#039;&#039;&#039;Answer&#039;&#039;&#039; to Everything==&lt;br /&gt;
The ultimate answer to everything is of course [http://en.wikipedia.org/wiki/Answer_to_Life%2C_the_Universe%2C_and_Everything 42].  For something more specific than &#039;&#039;&#039;The Ultimate Answer to EVERYTHING&#039;&#039;&#039;, um.... may we suggest you look at&lt;br /&gt;
*[[Table_of_Contents]] and to find the answer, or&lt;br /&gt;
*Seek out your favorite spiritual adviser for additional help, or perhaps&lt;br /&gt;
*Go to one of the [http://moodle.org/course/view.php?id=5 Using Moodle forums]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Lesson]]&lt;br /&gt;
[[Category:Quiz]]&lt;/div&gt;</summary>
		<author><name>Rcollman</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Lesson_FAQ&amp;diff=93938</id>
		<title>Lesson FAQ</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Lesson_FAQ&amp;diff=93938"/>
		<updated>2011-11-20T15:24:38Z</updated>

		<summary type="html">&lt;p&gt;Rcollman: /* Students do not see content in end of branch page */ delete&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Lesson}}&lt;br /&gt;
==Where were Branch Tables?==&lt;br /&gt;
In Moodle 2.0, the official name of a branch table page was changed to &amp;quot;&#039;&#039;&#039;Content&#039;&#039;&#039;&amp;quot; page. The documentation is slowly being changed to reflect this change. The features of this page type did not change.&lt;br /&gt;
&lt;br /&gt;
==Import PowerPoint does not work==&lt;br /&gt;
&amp;quot;No data&amp;quot; or some other error shows up after an attempt to import.  &lt;br /&gt;
*Please read [[Import PowerPoint]]. Most common causes:&lt;br /&gt;
#Complicated PowerPoint. Too many images, text boxes or fancy features.&lt;br /&gt;
#Wrong version of PowerPoint&lt;br /&gt;
#Site error - try the tested zip file at  [http://tracker.moodle.org/browse/MDL-15755 Tracker.Moodle.org]&lt;br /&gt;
&lt;br /&gt;
==Jumps not working in a question==&lt;br /&gt;
A wrong answer should go to &amp;quot;this page&amp;quot; in my lesson. But after the student answers it, the student goes to the next page.&lt;br /&gt;
*See adding/editing a lesson and Maximum Attempts in Lesson settings.  If maximum attempt is set to 1, then the student will be advanced to the next page after they choice a wrong answer that is sent to &amp;quot;this page&amp;quot;.  If it is set to 2, after the student selects the wrong answer the 2nd time they will be sent to the next page.  This can be used to keep the student out of an endless loop when than can not answer a question correctly.&lt;br /&gt;
&lt;br /&gt;
==Edits of answers or branch buttons are not saved==&lt;br /&gt;
I have a 4 answer multiple choice question.  I can only seem to save the first two answers, their jumps and feedback. Any edits on the last answers, their jumps and feedbacks are not saved.  Moodle does not tell me there is anything wrong.   Same thing happened with a Branch table, I can not seem to get the last two descriptions change after I save an edit.   GRRRRR!&lt;br /&gt;
&lt;br /&gt;
*Go back to your lesson settings.   Maximum number of answers/branches is probably set to 2, change it to 4 or the maximum number of answers or branch descriptions in your lesson.  Now the edits can be saved.&lt;br /&gt;
::&#039;&#039;Tip:&#039;&#039; Changing the &amp;quot;Maximum number&amp;quot; as a teacher builds a lesson is a trick used to limit scrolling passed unused answers or branch choices to get to the save button. For example, 15 pages have 4 choices but one page will have 8 choices. The teacher will use &amp;quot;Maximum number&amp;quot; at 8 setting only when they initially create that page, then switch it back to 4.  They (and their students) will always see all 8 answers but the lesson setting will prevent them from editing some of them.&lt;br /&gt;
&lt;br /&gt;
==What is a Branch ?==&lt;br /&gt;
Many Moodlers call a series of pages in their lesson &amp;quot;&#039;&#039;&#039;a branch&#039;&#039;&#039;&amp;quot;. Usually the student will enter the series by jumping from a page that is not directly before the &amp;quot;branch&amp;quot;.   Thus, a student will &amp;quot;branch&amp;quot; off the lesson path from a missed question and visit a series of pages for review before they are returned to the main lesson path again.  &lt;br /&gt;
&lt;br /&gt;
Lesson also have special pages that create a [[Lesson clusters|cluster]].  These are also a series of page.  &lt;br /&gt;
&lt;br /&gt;
Confused yet? :)  Maybe [[Branch structures]] will help.&lt;br /&gt;
&lt;br /&gt;
==Multiple Choice and Multianswer issues==&lt;br /&gt;
When I check the multianswer box in a multiple choice question, it does not work. It makes random jumps and does not put the teacher&#039;s response with the students choice.   &lt;br /&gt;
&lt;br /&gt;
*In a Lesson module [[Lesson_module#Multiple_choice|multianswer question]], all the correct choices must have the same jump and teacher response.  All the wrong choices must also have the same jump and teacher response.&lt;br /&gt;
&lt;br /&gt;
==Are there some examples of Lessons I can see?==&lt;br /&gt;
I have been to demo.moodle and looked at the [http://demo.moodle.org/mod/lesson/view.php?id=224 Lesson section], are there more examples of Lessons used in a real course?&lt;br /&gt;
*[[Lesson samples]] is one place to look.&lt;br /&gt;
&lt;br /&gt;
==The lesson was completed but it does not record it==&lt;br /&gt;
*Every lesson must have one question that a student must answer in order for it to show up in some reports. This can effect [[Grades]] and a Lesson&#039;s dependency setting (see other FAQs below).   &lt;br /&gt;
::&#039;&#039;Tip:&#039;&#039; There are lots of creative ways to put in a question, such as setting a multiple choice question so that all answers are correct and the answers act like a content (branch table) page. Or put in content and then award 1 point for &amp;quot;next page&amp;quot; as the answer, do not include the score in grades.&lt;br /&gt;
::&#039;&#039;Tip:&#039;&#039; Due to a specific Lesson&#039;s design, some students can complete the lesson without answering one or more questions which have been placed in the Lesson.  When Lesson can not record any scores for a student, no grade is pushed to the gradebook. It may appear therefore that Lesson is being inconsistent in recording grades.&lt;br /&gt;
&lt;br /&gt;
==Dependency in Lesson does not work==&lt;br /&gt;
The second lesson tells the student they must complete the first one.  They did, what is wrong?&lt;br /&gt;
*For dependency to work, you need to have at least 1 question page in the lesson. The student may not need a minimum score, but Lesson needs to know that the student tried a question.  You can always put a question as the first or last page, You don&#039;t need to ask a question but do put in an answer of &amp;quot;continue&amp;quot; with a jump of the next page.&lt;br /&gt;
&lt;br /&gt;
*Also for dependency to work, the lesson can not be a practice lesson.&lt;br /&gt;
&lt;br /&gt;
==How to add sound to a lesson page==&lt;br /&gt;
There are some detailed instructions and options on linking to sound files.&lt;br /&gt;
&lt;br /&gt;
*[[MP3_player#Inserting_sounds_into_questions|Here is the best place to look]] - adding sounds to questions.  &lt;br /&gt;
*[[Audio in Moodle]] has an overview and tool recommendations.&lt;br /&gt;
&lt;br /&gt;
==Can I turn off the answer shuffle in a lesson?==&lt;br /&gt;
* In short, no.   Turning off the page and answer shuffle are Quiz options, but neither is found in Lesson. A minor hack to the Lesson code is possible but that would impact the entire Moodle site.    &lt;br /&gt;
::&#039;&#039;TIP:&#039;&#039;  If you don&#039;t need to score students answers in a question, then consider using a Content page instead of a Multiple Choice or a True/False question.&lt;br /&gt;
&lt;br /&gt;
==How can I change the default for Arrange content page buttons horizontally? ==&lt;br /&gt;
I used to know, now I am clueless. Just imported 200 slides and the box is checked on every one.  How can I change the default?&lt;br /&gt;
&lt;br /&gt;
==Can I change standard words used by Lesson?==&lt;br /&gt;
*Yes.  You or your site administrator can edit the language file called Lesson.php.   This will impact the whole site.  Your site administrator might create a language just for you, in Lesson settings use the force language option.&lt;br /&gt;
&lt;br /&gt;
==Grrr something happened, lesson list is not right, I can&#039;t move things==&lt;br /&gt;
Try a backup and restore of your course to solve some of those &amp;quot;quirky&amp;quot; issues.   &lt;br /&gt;
*Example: I was building a course, started adding lessons to topic 2 and then realized I should move it up to become Topic 1. Did that and continue to add lessons to topic 1, then lessons to topic 2 etc.   Later I had to add lessons to topic 1.  I did but could not move them between those first lessons I created. Every time I tried to move them they went to the bottom of topic 2!   I also noticed that my list of just lessons, showed those first lessons as being in the correct course display order but showed they were in Topic 2!.   &lt;br /&gt;
*Moral: Sometimes a backup and a restore will re-establish harmony and fix things.     &lt;br /&gt;
&lt;br /&gt;
==What happened to my HTML code on a Lesson page?==&lt;br /&gt;
I had the lesson page formatted just the way I wanted by using the HTML source toggle on the tool bar.  I went back in to tweak my code and some of my code was missing!&lt;br /&gt;
*Lesson will &amp;quot;clean&amp;quot; up your HTML code every time you toggle into HTML text.   This can be frustrating, especially if you are trying to get a flash file to display just right.  Save you work in a text editor, so the next time you tweak it, you can paste all your code back in.&lt;br /&gt;
&lt;br /&gt;
==Pages are not displayed in the lesson&#039;s left menu==&lt;br /&gt;
The Lesson module&#039;s left menu navigation feature, only displays content (branch table) pages.  If your lesson only has question pages, it will not display any pages.   Use a content page before a series of question pages, so your students will know where the series starts.  Alternative, use the same content page and put links to each of the question using descriptions and jumps.  Remember, you can effectively have the student jump past (not view) this content page as they go through the lesson and only reach it via the left menu.&lt;br /&gt;
&lt;br /&gt;
==Students are not returning to where they left the lesson==&lt;br /&gt;
A student has left the lesson after looking at 10 pages.   The next time they return to the lesson they start at the beginning again. How can the student return to the same place?&lt;br /&gt;
:You have seen more than one page of this lesson already. Do you want to start at the last page you saw?&lt;br /&gt;
&lt;br /&gt;
Several things must be met before this will happen.  First make sure your lesson settings allow the student to retake the lesson and that this lesson is not a &amp;quot;practice&amp;quot; lesson.   The important thing is that the above words are not exactly correct.  They are correct only when the student left immediately after answering a question in a Lesson.  For the purposes of returning to the same place, Lesson only remembers question pages as benchmarks.  So lastly, make sure you have questions scattered in your Lesson for this feature to work and tell students.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;TIPs:&#039;&#039; Use a content page at the start of the lesson as a table of contents, so the student are forced to remember where they are but can jump to your teaching points.  Or put a question at the start or end of every &amp;quot;teaching point&amp;quot;.  And of course, you can tell your students how it is going to work.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* Using Moodle [http://moodle.org/mod/forum/view.php?f=333 Lesson module forum]&lt;br /&gt;
&lt;br /&gt;
[[Category:FAQ]]&lt;br /&gt;
[[de:Lektion_FAQ]]&lt;/div&gt;</summary>
		<author><name>Rcollman</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Lesson_FAQ&amp;diff=93937</id>
		<title>Lesson FAQ</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Lesson_FAQ&amp;diff=93937"/>
		<updated>2011-11-20T15:22:44Z</updated>

		<summary type="html">&lt;p&gt;Rcollman: /* How can I change the default for Arrange Branch buttons horizontally? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Lesson}}&lt;br /&gt;
==Where were Branch Tables?==&lt;br /&gt;
In Moodle 2.0, the official name of a branch table page was changed to &amp;quot;&#039;&#039;&#039;Content&#039;&#039;&#039;&amp;quot; page. The documentation is slowly being changed to reflect this change. The features of this page type did not change.&lt;br /&gt;
&lt;br /&gt;
==Import PowerPoint does not work==&lt;br /&gt;
&amp;quot;No data&amp;quot; or some other error shows up after an attempt to import.  &lt;br /&gt;
*Please read [[Import PowerPoint]]. Most common causes:&lt;br /&gt;
#Complicated PowerPoint. Too many images, text boxes or fancy features.&lt;br /&gt;
#Wrong version of PowerPoint&lt;br /&gt;
#Site error - try the tested zip file at  [http://tracker.moodle.org/browse/MDL-15755 Tracker.Moodle.org]&lt;br /&gt;
&lt;br /&gt;
==Jumps not working in a question==&lt;br /&gt;
A wrong answer should go to &amp;quot;this page&amp;quot; in my lesson. But after the student answers it, the student goes to the next page.&lt;br /&gt;
*See adding/editing a lesson and Maximum Attempts in Lesson settings.  If maximum attempt is set to 1, then the student will be advanced to the next page after they choice a wrong answer that is sent to &amp;quot;this page&amp;quot;.  If it is set to 2, after the student selects the wrong answer the 2nd time they will be sent to the next page.  This can be used to keep the student out of an endless loop when than can not answer a question correctly.&lt;br /&gt;
&lt;br /&gt;
==Edits of answers or branch buttons are not saved==&lt;br /&gt;
I have a 4 answer multiple choice question.  I can only seem to save the first two answers, their jumps and feedback. Any edits on the last answers, their jumps and feedbacks are not saved.  Moodle does not tell me there is anything wrong.   Same thing happened with a Branch table, I can not seem to get the last two descriptions change after I save an edit.   GRRRRR!&lt;br /&gt;
&lt;br /&gt;
*Go back to your lesson settings.   Maximum number of answers/branches is probably set to 2, change it to 4 or the maximum number of answers or branch descriptions in your lesson.  Now the edits can be saved.&lt;br /&gt;
::&#039;&#039;Tip:&#039;&#039; Changing the &amp;quot;Maximum number&amp;quot; as a teacher builds a lesson is a trick used to limit scrolling passed unused answers or branch choices to get to the save button. For example, 15 pages have 4 choices but one page will have 8 choices. The teacher will use &amp;quot;Maximum number&amp;quot; at 8 setting only when they initially create that page, then switch it back to 4.  They (and their students) will always see all 8 answers but the lesson setting will prevent them from editing some of them.&lt;br /&gt;
&lt;br /&gt;
==What is a Branch ?==&lt;br /&gt;
Many Moodlers call a series of pages in their lesson &amp;quot;&#039;&#039;&#039;a branch&#039;&#039;&#039;&amp;quot;. Usually the student will enter the series by jumping from a page that is not directly before the &amp;quot;branch&amp;quot;.   Thus, a student will &amp;quot;branch&amp;quot; off the lesson path from a missed question and visit a series of pages for review before they are returned to the main lesson path again.  &lt;br /&gt;
&lt;br /&gt;
Lesson also have special pages that create a [[Lesson clusters|cluster]].  These are also a series of page.  &lt;br /&gt;
&lt;br /&gt;
Confused yet? :)  Maybe [[Branch structures]] will help.&lt;br /&gt;
&lt;br /&gt;
==Multiple Choice and Multianswer issues==&lt;br /&gt;
When I check the multianswer box in a multiple choice question, it does not work. It makes random jumps and does not put the teacher&#039;s response with the students choice.   &lt;br /&gt;
&lt;br /&gt;
*In a Lesson module [[Lesson_module#Multiple_choice|multianswer question]], all the correct choices must have the same jump and teacher response.  All the wrong choices must also have the same jump and teacher response.&lt;br /&gt;
&lt;br /&gt;
==Are there some examples of Lessons I can see?==&lt;br /&gt;
I have been to demo.moodle and looked at the [http://demo.moodle.org/mod/lesson/view.php?id=224 Lesson section], are there more examples of Lessons used in a real course?&lt;br /&gt;
*[[Lesson samples]] is one place to look.&lt;br /&gt;
&lt;br /&gt;
==The lesson was completed but it does not record it==&lt;br /&gt;
*Every lesson must have one question that a student must answer in order for it to show up in some reports. This can effect [[Grades]] and a Lesson&#039;s dependency setting (see other FAQs below).   &lt;br /&gt;
::&#039;&#039;Tip:&#039;&#039; There are lots of creative ways to put in a question, such as setting a multiple choice question so that all answers are correct and the answers act like a content (branch table) page. Or put in content and then award 1 point for &amp;quot;next page&amp;quot; as the answer, do not include the score in grades.&lt;br /&gt;
::&#039;&#039;Tip:&#039;&#039; Due to a specific Lesson&#039;s design, some students can complete the lesson without answering one or more questions which have been placed in the Lesson.  When Lesson can not record any scores for a student, no grade is pushed to the gradebook. It may appear therefore that Lesson is being inconsistent in recording grades.&lt;br /&gt;
&lt;br /&gt;
==Dependency in Lesson does not work==&lt;br /&gt;
The second lesson tells the student they must complete the first one.  They did, what is wrong?&lt;br /&gt;
*For dependency to work, you need to have at least 1 question page in the lesson. The student may not need a minimum score, but Lesson needs to know that the student tried a question.  You can always put a question as the first or last page, You don&#039;t need to ask a question but do put in an answer of &amp;quot;continue&amp;quot; with a jump of the next page.&lt;br /&gt;
&lt;br /&gt;
*Also for dependency to work, the lesson can not be a practice lesson.&lt;br /&gt;
&lt;br /&gt;
==How to add sound to a lesson page==&lt;br /&gt;
There are some detailed instructions and options on linking to sound files.&lt;br /&gt;
&lt;br /&gt;
*[[MP3_player#Inserting_sounds_into_questions|Here is the best place to look]] - adding sounds to questions.  &lt;br /&gt;
*[[Audio in Moodle]] has an overview and tool recommendations.&lt;br /&gt;
&lt;br /&gt;
==Can I turn off the answer shuffle in a lesson?==&lt;br /&gt;
* In short, no.   Turning off the page and answer shuffle are Quiz options, but neither is found in Lesson. A minor hack to the Lesson code is possible but that would impact the entire Moodle site.    &lt;br /&gt;
::&#039;&#039;TIP:&#039;&#039;  If you don&#039;t need to score students answers in a question, then consider using a Content page instead of a Multiple Choice or a True/False question.&lt;br /&gt;
&lt;br /&gt;
==How can I change the default for Arrange content page buttons horizontally? ==&lt;br /&gt;
I used to know, now I am clueless. Just imported 200 slides and the box is checked on every one.  How can I change the default?&lt;br /&gt;
&lt;br /&gt;
==Can I change standard words used by Lesson?==&lt;br /&gt;
*Yes.  You or your site administrator can edit the language file called Lesson.php.   This will impact the whole site.  Your site administrator might create a language just for you, in Lesson settings use the force language option.&lt;br /&gt;
&lt;br /&gt;
==Grrr something happened, lesson list is not right, I can&#039;t move things==&lt;br /&gt;
Try a backup and restore of your course to solve some of those &amp;quot;quirky&amp;quot; issues.   &lt;br /&gt;
*Example: I was building a course, started adding lessons to topic 2 and then realized I should move it up to become Topic 1. Did that and continue to add lessons to topic 1, then lessons to topic 2 etc.   Later I had to add lessons to topic 1.  I did but could not move them between those first lessons I created. Every time I tried to move them they went to the bottom of topic 2!   I also noticed that my list of just lessons, showed those first lessons as being in the correct course display order but showed they were in Topic 2!.   &lt;br /&gt;
*Moral: Sometimes a backup and a restore will re-establish harmony and fix things.     &lt;br /&gt;
&lt;br /&gt;
==What happened to my HTML code on a Lesson page?==&lt;br /&gt;
I had the lesson page formatted just the way I wanted by using the HTML source toggle on the tool bar.  I went back in to tweak my code and some of my code was missing!&lt;br /&gt;
*Lesson will &amp;quot;clean&amp;quot; up your HTML code every time you toggle into HTML text.   This can be frustrating, especially if you are trying to get a flash file to display just right.  Save you work in a text editor, so the next time you tweak it, you can paste all your code back in.&lt;br /&gt;
&lt;br /&gt;
==Students do not see content in end of branch page==&lt;br /&gt;
&amp;quot;End of Branch&amp;quot;, &amp;quot;Start&amp;quot; and &amp;quot;End Cluster&amp;quot; pages are special navigational pages that students do not see.   A teacher can see their content in edit mode but this content is never displayed to a student, nor in preview mode to the teacher.  Use a different kind of page and figure out how the student will reach it via jumps at the right time.&lt;br /&gt;
&lt;br /&gt;
:Moodle 2.0 uses the words &amp;quot;Content page&amp;quot;, instead of &amp;quot;Branch Table&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Pages are not displayed in the lesson&#039;s left menu==&lt;br /&gt;
The Lesson module&#039;s left menu navigation feature, only displays content (branch table) pages.  If your lesson only has question pages, it will not display any pages.   Use a content page before a series of question pages, so your students will know where the series starts.  Alternative, use the same content page and put links to each of the question using descriptions and jumps.  Remember, you can effectively have the student jump past (not view) this content page as they go through the lesson and only reach it via the left menu.&lt;br /&gt;
&lt;br /&gt;
==Students are not returning to where they left the lesson==&lt;br /&gt;
A student has left the lesson after looking at 10 pages.   The next time they return to the lesson they start at the beginning again. How can the student return to the same place?&lt;br /&gt;
:You have seen more than one page of this lesson already. Do you want to start at the last page you saw?&lt;br /&gt;
&lt;br /&gt;
Several things must be met before this will happen.  First make sure your lesson settings allow the student to retake the lesson and that this lesson is not a &amp;quot;practice&amp;quot; lesson.   The important thing is that the above words are not exactly correct.  They are correct only when the student left immediately after answering a question in a Lesson.  For the purposes of returning to the same place, Lesson only remembers question pages as benchmarks.  So lastly, make sure you have questions scattered in your Lesson for this feature to work and tell students.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;TIPs:&#039;&#039; Use a content page at the start of the lesson as a table of contents, so the student are forced to remember where they are but can jump to your teaching points.  Or put a question at the start or end of every &amp;quot;teaching point&amp;quot;.  And of course, you can tell your students how it is going to work.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* Using Moodle [http://moodle.org/mod/forum/view.php?f=333 Lesson module forum]&lt;br /&gt;
&lt;br /&gt;
[[Category:FAQ]]&lt;br /&gt;
[[de:Lektion_FAQ]]&lt;/div&gt;</summary>
		<author><name>Rcollman</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Lesson_FAQ&amp;diff=93936</id>
		<title>Lesson FAQ</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Lesson_FAQ&amp;diff=93936"/>
		<updated>2011-11-20T15:21:15Z</updated>

		<summary type="html">&lt;p&gt;Rcollman: /* What is a Branch ? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Lesson}}&lt;br /&gt;
==Where were Branch Tables?==&lt;br /&gt;
In Moodle 2.0, the official name of a branch table page was changed to &amp;quot;&#039;&#039;&#039;Content&#039;&#039;&#039;&amp;quot; page. The documentation is slowly being changed to reflect this change. The features of this page type did not change.&lt;br /&gt;
&lt;br /&gt;
==Import PowerPoint does not work==&lt;br /&gt;
&amp;quot;No data&amp;quot; or some other error shows up after an attempt to import.  &lt;br /&gt;
*Please read [[Import PowerPoint]]. Most common causes:&lt;br /&gt;
#Complicated PowerPoint. Too many images, text boxes or fancy features.&lt;br /&gt;
#Wrong version of PowerPoint&lt;br /&gt;
#Site error - try the tested zip file at  [http://tracker.moodle.org/browse/MDL-15755 Tracker.Moodle.org]&lt;br /&gt;
&lt;br /&gt;
==Jumps not working in a question==&lt;br /&gt;
A wrong answer should go to &amp;quot;this page&amp;quot; in my lesson. But after the student answers it, the student goes to the next page.&lt;br /&gt;
*See adding/editing a lesson and Maximum Attempts in Lesson settings.  If maximum attempt is set to 1, then the student will be advanced to the next page after they choice a wrong answer that is sent to &amp;quot;this page&amp;quot;.  If it is set to 2, after the student selects the wrong answer the 2nd time they will be sent to the next page.  This can be used to keep the student out of an endless loop when than can not answer a question correctly.&lt;br /&gt;
&lt;br /&gt;
==Edits of answers or branch buttons are not saved==&lt;br /&gt;
I have a 4 answer multiple choice question.  I can only seem to save the first two answers, their jumps and feedback. Any edits on the last answers, their jumps and feedbacks are not saved.  Moodle does not tell me there is anything wrong.   Same thing happened with a Branch table, I can not seem to get the last two descriptions change after I save an edit.   GRRRRR!&lt;br /&gt;
&lt;br /&gt;
*Go back to your lesson settings.   Maximum number of answers/branches is probably set to 2, change it to 4 or the maximum number of answers or branch descriptions in your lesson.  Now the edits can be saved.&lt;br /&gt;
::&#039;&#039;Tip:&#039;&#039; Changing the &amp;quot;Maximum number&amp;quot; as a teacher builds a lesson is a trick used to limit scrolling passed unused answers or branch choices to get to the save button. For example, 15 pages have 4 choices but one page will have 8 choices. The teacher will use &amp;quot;Maximum number&amp;quot; at 8 setting only when they initially create that page, then switch it back to 4.  They (and their students) will always see all 8 answers but the lesson setting will prevent them from editing some of them.&lt;br /&gt;
&lt;br /&gt;
==What is a Branch ?==&lt;br /&gt;
Many Moodlers call a series of pages in their lesson &amp;quot;&#039;&#039;&#039;a branch&#039;&#039;&#039;&amp;quot;. Usually the student will enter the series by jumping from a page that is not directly before the &amp;quot;branch&amp;quot;.   Thus, a student will &amp;quot;branch&amp;quot; off the lesson path from a missed question and visit a series of pages for review before they are returned to the main lesson path again.  &lt;br /&gt;
&lt;br /&gt;
Lesson also have special pages that create a [[Lesson clusters|cluster]].  These are also a series of page.  &lt;br /&gt;
&lt;br /&gt;
Confused yet? :)  Maybe [[Branch structures]] will help.&lt;br /&gt;
&lt;br /&gt;
==Multiple Choice and Multianswer issues==&lt;br /&gt;
When I check the multianswer box in a multiple choice question, it does not work. It makes random jumps and does not put the teacher&#039;s response with the students choice.   &lt;br /&gt;
&lt;br /&gt;
*In a Lesson module [[Lesson_module#Multiple_choice|multianswer question]], all the correct choices must have the same jump and teacher response.  All the wrong choices must also have the same jump and teacher response.&lt;br /&gt;
&lt;br /&gt;
==Are there some examples of Lessons I can see?==&lt;br /&gt;
I have been to demo.moodle and looked at the [http://demo.moodle.org/mod/lesson/view.php?id=224 Lesson section], are there more examples of Lessons used in a real course?&lt;br /&gt;
*[[Lesson samples]] is one place to look.&lt;br /&gt;
&lt;br /&gt;
==The lesson was completed but it does not record it==&lt;br /&gt;
*Every lesson must have one question that a student must answer in order for it to show up in some reports. This can effect [[Grades]] and a Lesson&#039;s dependency setting (see other FAQs below).   &lt;br /&gt;
::&#039;&#039;Tip:&#039;&#039; There are lots of creative ways to put in a question, such as setting a multiple choice question so that all answers are correct and the answers act like a content (branch table) page. Or put in content and then award 1 point for &amp;quot;next page&amp;quot; as the answer, do not include the score in grades.&lt;br /&gt;
::&#039;&#039;Tip:&#039;&#039; Due to a specific Lesson&#039;s design, some students can complete the lesson without answering one or more questions which have been placed in the Lesson.  When Lesson can not record any scores for a student, no grade is pushed to the gradebook. It may appear therefore that Lesson is being inconsistent in recording grades.&lt;br /&gt;
&lt;br /&gt;
==Dependency in Lesson does not work==&lt;br /&gt;
The second lesson tells the student they must complete the first one.  They did, what is wrong?&lt;br /&gt;
*For dependency to work, you need to have at least 1 question page in the lesson. The student may not need a minimum score, but Lesson needs to know that the student tried a question.  You can always put a question as the first or last page, You don&#039;t need to ask a question but do put in an answer of &amp;quot;continue&amp;quot; with a jump of the next page.&lt;br /&gt;
&lt;br /&gt;
*Also for dependency to work, the lesson can not be a practice lesson.&lt;br /&gt;
&lt;br /&gt;
==How to add sound to a lesson page==&lt;br /&gt;
There are some detailed instructions and options on linking to sound files.&lt;br /&gt;
&lt;br /&gt;
*[[MP3_player#Inserting_sounds_into_questions|Here is the best place to look]] - adding sounds to questions.  &lt;br /&gt;
*[[Audio in Moodle]] has an overview and tool recommendations.&lt;br /&gt;
&lt;br /&gt;
==Can I turn off the answer shuffle in a lesson?==&lt;br /&gt;
* In short, no.   Turning off the page and answer shuffle are Quiz options, but neither is found in Lesson. A minor hack to the Lesson code is possible but that would impact the entire Moodle site.    &lt;br /&gt;
::&#039;&#039;TIP:&#039;&#039;  If you don&#039;t need to score students answers in a question, then consider using a Content page instead of a Multiple Choice or a True/False question.&lt;br /&gt;
&lt;br /&gt;
==How can I change the default for Arrange Branch buttons horizontally? ==&lt;br /&gt;
I used to know, now I am clueless. Just imported 200 slides and the box is checked on every one.  How can I change the default?&lt;br /&gt;
&lt;br /&gt;
==Can I change standard words used by Lesson?==&lt;br /&gt;
*Yes.  You or your site administrator can edit the language file called Lesson.php.   This will impact the whole site.  Your site administrator might create a language just for you, in Lesson settings use the force language option.&lt;br /&gt;
&lt;br /&gt;
==Grrr something happened, lesson list is not right, I can&#039;t move things==&lt;br /&gt;
Try a backup and restore of your course to solve some of those &amp;quot;quirky&amp;quot; issues.   &lt;br /&gt;
*Example: I was building a course, started adding lessons to topic 2 and then realized I should move it up to become Topic 1. Did that and continue to add lessons to topic 1, then lessons to topic 2 etc.   Later I had to add lessons to topic 1.  I did but could not move them between those first lessons I created. Every time I tried to move them they went to the bottom of topic 2!   I also noticed that my list of just lessons, showed those first lessons as being in the correct course display order but showed they were in Topic 2!.   &lt;br /&gt;
*Moral: Sometimes a backup and a restore will re-establish harmony and fix things.     &lt;br /&gt;
&lt;br /&gt;
==What happened to my HTML code on a Lesson page?==&lt;br /&gt;
I had the lesson page formatted just the way I wanted by using the HTML source toggle on the tool bar.  I went back in to tweak my code and some of my code was missing!&lt;br /&gt;
*Lesson will &amp;quot;clean&amp;quot; up your HTML code every time you toggle into HTML text.   This can be frustrating, especially if you are trying to get a flash file to display just right.  Save you work in a text editor, so the next time you tweak it, you can paste all your code back in.&lt;br /&gt;
&lt;br /&gt;
==Students do not see content in end of branch page==&lt;br /&gt;
&amp;quot;End of Branch&amp;quot;, &amp;quot;Start&amp;quot; and &amp;quot;End Cluster&amp;quot; pages are special navigational pages that students do not see.   A teacher can see their content in edit mode but this content is never displayed to a student, nor in preview mode to the teacher.  Use a different kind of page and figure out how the student will reach it via jumps at the right time.&lt;br /&gt;
&lt;br /&gt;
:Moodle 2.0 uses the words &amp;quot;Content page&amp;quot;, instead of &amp;quot;Branch Table&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Pages are not displayed in the lesson&#039;s left menu==&lt;br /&gt;
The Lesson module&#039;s left menu navigation feature, only displays content (branch table) pages.  If your lesson only has question pages, it will not display any pages.   Use a content page before a series of question pages, so your students will know where the series starts.  Alternative, use the same content page and put links to each of the question using descriptions and jumps.  Remember, you can effectively have the student jump past (not view) this content page as they go through the lesson and only reach it via the left menu.&lt;br /&gt;
&lt;br /&gt;
==Students are not returning to where they left the lesson==&lt;br /&gt;
A student has left the lesson after looking at 10 pages.   The next time they return to the lesson they start at the beginning again. How can the student return to the same place?&lt;br /&gt;
:You have seen more than one page of this lesson already. Do you want to start at the last page you saw?&lt;br /&gt;
&lt;br /&gt;
Several things must be met before this will happen.  First make sure your lesson settings allow the student to retake the lesson and that this lesson is not a &amp;quot;practice&amp;quot; lesson.   The important thing is that the above words are not exactly correct.  They are correct only when the student left immediately after answering a question in a Lesson.  For the purposes of returning to the same place, Lesson only remembers question pages as benchmarks.  So lastly, make sure you have questions scattered in your Lesson for this feature to work and tell students.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;TIPs:&#039;&#039; Use a content page at the start of the lesson as a table of contents, so the student are forced to remember where they are but can jump to your teaching points.  Or put a question at the start or end of every &amp;quot;teaching point&amp;quot;.  And of course, you can tell your students how it is going to work.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* Using Moodle [http://moodle.org/mod/forum/view.php?f=333 Lesson module forum]&lt;br /&gt;
&lt;br /&gt;
[[Category:FAQ]]&lt;br /&gt;
[[de:Lektion_FAQ]]&lt;/div&gt;</summary>
		<author><name>Rcollman</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Lesson_FAQ&amp;diff=93935</id>
		<title>Lesson FAQ</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Lesson_FAQ&amp;diff=93935"/>
		<updated>2011-11-20T15:20:19Z</updated>

		<summary type="html">&lt;p&gt;Rcollman: /* What is the difference between a Branch and a Branch Table? */ change this question for 2.1&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Lesson}}&lt;br /&gt;
==Where were Branch Tables?==&lt;br /&gt;
In Moodle 2.0, the official name of a branch table page was changed to &amp;quot;&#039;&#039;&#039;Content&#039;&#039;&#039;&amp;quot; page. The documentation is slowly being changed to reflect this change. The features of this page type did not change.&lt;br /&gt;
&lt;br /&gt;
==Import PowerPoint does not work==&lt;br /&gt;
&amp;quot;No data&amp;quot; or some other error shows up after an attempt to import.  &lt;br /&gt;
*Please read [[Import PowerPoint]]. Most common causes:&lt;br /&gt;
#Complicated PowerPoint. Too many images, text boxes or fancy features.&lt;br /&gt;
#Wrong version of PowerPoint&lt;br /&gt;
#Site error - try the tested zip file at  [http://tracker.moodle.org/browse/MDL-15755 Tracker.Moodle.org]&lt;br /&gt;
&lt;br /&gt;
==Jumps not working in a question==&lt;br /&gt;
A wrong answer should go to &amp;quot;this page&amp;quot; in my lesson. But after the student answers it, the student goes to the next page.&lt;br /&gt;
*See adding/editing a lesson and Maximum Attempts in Lesson settings.  If maximum attempt is set to 1, then the student will be advanced to the next page after they choice a wrong answer that is sent to &amp;quot;this page&amp;quot;.  If it is set to 2, after the student selects the wrong answer the 2nd time they will be sent to the next page.  This can be used to keep the student out of an endless loop when than can not answer a question correctly.&lt;br /&gt;
&lt;br /&gt;
==Edits of answers or branch buttons are not saved==&lt;br /&gt;
I have a 4 answer multiple choice question.  I can only seem to save the first two answers, their jumps and feedback. Any edits on the last answers, their jumps and feedbacks are not saved.  Moodle does not tell me there is anything wrong.   Same thing happened with a Branch table, I can not seem to get the last two descriptions change after I save an edit.   GRRRRR!&lt;br /&gt;
&lt;br /&gt;
*Go back to your lesson settings.   Maximum number of answers/branches is probably set to 2, change it to 4 or the maximum number of answers or branch descriptions in your lesson.  Now the edits can be saved.&lt;br /&gt;
::&#039;&#039;Tip:&#039;&#039; Changing the &amp;quot;Maximum number&amp;quot; as a teacher builds a lesson is a trick used to limit scrolling passed unused answers or branch choices to get to the save button. For example, 15 pages have 4 choices but one page will have 8 choices. The teacher will use &amp;quot;Maximum number&amp;quot; at 8 setting only when they initially create that page, then switch it back to 4.  They (and their students) will always see all 8 answers but the lesson setting will prevent them from editing some of them.&lt;br /&gt;
&lt;br /&gt;
==What is a Branch ?==&lt;br /&gt;
Many Moodlers call a series of pages in their lesson &amp;quot;&#039;&#039;&#039;a branch&#039;&#039;&#039;&amp;quot;. Usually the student will enter the series by jumping from a page that is not directly before the &amp;quot;branch&amp;quot;.   Thus, a student will &amp;quot;branch&amp;quot; off the lesson path from a missed question and visit a series of pages for review before they are returned to the main lesson path again.  &lt;br /&gt;
&lt;br /&gt;
Lesson also have special pages that create a [[Lesson cluster]] cluster.  These are also a series of page.  &lt;br /&gt;
&lt;br /&gt;
Confused yet? :)  Maybe [[Branch structures]] will help.&lt;br /&gt;
&lt;br /&gt;
==Multiple Choice and Multianswer issues==&lt;br /&gt;
When I check the multianswer box in a multiple choice question, it does not work. It makes random jumps and does not put the teacher&#039;s response with the students choice.   &lt;br /&gt;
&lt;br /&gt;
*In a Lesson module [[Lesson_module#Multiple_choice|multianswer question]], all the correct choices must have the same jump and teacher response.  All the wrong choices must also have the same jump and teacher response.&lt;br /&gt;
&lt;br /&gt;
==Are there some examples of Lessons I can see?==&lt;br /&gt;
I have been to demo.moodle and looked at the [http://demo.moodle.org/mod/lesson/view.php?id=224 Lesson section], are there more examples of Lessons used in a real course?&lt;br /&gt;
*[[Lesson samples]] is one place to look.&lt;br /&gt;
&lt;br /&gt;
==The lesson was completed but it does not record it==&lt;br /&gt;
*Every lesson must have one question that a student must answer in order for it to show up in some reports. This can effect [[Grades]] and a Lesson&#039;s dependency setting (see other FAQs below).   &lt;br /&gt;
::&#039;&#039;Tip:&#039;&#039; There are lots of creative ways to put in a question, such as setting a multiple choice question so that all answers are correct and the answers act like a content (branch table) page. Or put in content and then award 1 point for &amp;quot;next page&amp;quot; as the answer, do not include the score in grades.&lt;br /&gt;
::&#039;&#039;Tip:&#039;&#039; Due to a specific Lesson&#039;s design, some students can complete the lesson without answering one or more questions which have been placed in the Lesson.  When Lesson can not record any scores for a student, no grade is pushed to the gradebook. It may appear therefore that Lesson is being inconsistent in recording grades.&lt;br /&gt;
&lt;br /&gt;
==Dependency in Lesson does not work==&lt;br /&gt;
The second lesson tells the student they must complete the first one.  They did, what is wrong?&lt;br /&gt;
*For dependency to work, you need to have at least 1 question page in the lesson. The student may not need a minimum score, but Lesson needs to know that the student tried a question.  You can always put a question as the first or last page, You don&#039;t need to ask a question but do put in an answer of &amp;quot;continue&amp;quot; with a jump of the next page.&lt;br /&gt;
&lt;br /&gt;
*Also for dependency to work, the lesson can not be a practice lesson.&lt;br /&gt;
&lt;br /&gt;
==How to add sound to a lesson page==&lt;br /&gt;
There are some detailed instructions and options on linking to sound files.&lt;br /&gt;
&lt;br /&gt;
*[[MP3_player#Inserting_sounds_into_questions|Here is the best place to look]] - adding sounds to questions.  &lt;br /&gt;
*[[Audio in Moodle]] has an overview and tool recommendations.&lt;br /&gt;
&lt;br /&gt;
==Can I turn off the answer shuffle in a lesson?==&lt;br /&gt;
* In short, no.   Turning off the page and answer shuffle are Quiz options, but neither is found in Lesson. A minor hack to the Lesson code is possible but that would impact the entire Moodle site.    &lt;br /&gt;
::&#039;&#039;TIP:&#039;&#039;  If you don&#039;t need to score students answers in a question, then consider using a Content page instead of a Multiple Choice or a True/False question.&lt;br /&gt;
&lt;br /&gt;
==How can I change the default for Arrange Branch buttons horizontally? ==&lt;br /&gt;
I used to know, now I am clueless. Just imported 200 slides and the box is checked on every one.  How can I change the default?&lt;br /&gt;
&lt;br /&gt;
==Can I change standard words used by Lesson?==&lt;br /&gt;
*Yes.  You or your site administrator can edit the language file called Lesson.php.   This will impact the whole site.  Your site administrator might create a language just for you, in Lesson settings use the force language option.&lt;br /&gt;
&lt;br /&gt;
==Grrr something happened, lesson list is not right, I can&#039;t move things==&lt;br /&gt;
Try a backup and restore of your course to solve some of those &amp;quot;quirky&amp;quot; issues.   &lt;br /&gt;
*Example: I was building a course, started adding lessons to topic 2 and then realized I should move it up to become Topic 1. Did that and continue to add lessons to topic 1, then lessons to topic 2 etc.   Later I had to add lessons to topic 1.  I did but could not move them between those first lessons I created. Every time I tried to move them they went to the bottom of topic 2!   I also noticed that my list of just lessons, showed those first lessons as being in the correct course display order but showed they were in Topic 2!.   &lt;br /&gt;
*Moral: Sometimes a backup and a restore will re-establish harmony and fix things.     &lt;br /&gt;
&lt;br /&gt;
==What happened to my HTML code on a Lesson page?==&lt;br /&gt;
I had the lesson page formatted just the way I wanted by using the HTML source toggle on the tool bar.  I went back in to tweak my code and some of my code was missing!&lt;br /&gt;
*Lesson will &amp;quot;clean&amp;quot; up your HTML code every time you toggle into HTML text.   This can be frustrating, especially if you are trying to get a flash file to display just right.  Save you work in a text editor, so the next time you tweak it, you can paste all your code back in.&lt;br /&gt;
&lt;br /&gt;
==Students do not see content in end of branch page==&lt;br /&gt;
&amp;quot;End of Branch&amp;quot;, &amp;quot;Start&amp;quot; and &amp;quot;End Cluster&amp;quot; pages are special navigational pages that students do not see.   A teacher can see their content in edit mode but this content is never displayed to a student, nor in preview mode to the teacher.  Use a different kind of page and figure out how the student will reach it via jumps at the right time.&lt;br /&gt;
&lt;br /&gt;
:Moodle 2.0 uses the words &amp;quot;Content page&amp;quot;, instead of &amp;quot;Branch Table&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Pages are not displayed in the lesson&#039;s left menu==&lt;br /&gt;
The Lesson module&#039;s left menu navigation feature, only displays content (branch table) pages.  If your lesson only has question pages, it will not display any pages.   Use a content page before a series of question pages, so your students will know where the series starts.  Alternative, use the same content page and put links to each of the question using descriptions and jumps.  Remember, you can effectively have the student jump past (not view) this content page as they go through the lesson and only reach it via the left menu.&lt;br /&gt;
&lt;br /&gt;
==Students are not returning to where they left the lesson==&lt;br /&gt;
A student has left the lesson after looking at 10 pages.   The next time they return to the lesson they start at the beginning again. How can the student return to the same place?&lt;br /&gt;
:You have seen more than one page of this lesson already. Do you want to start at the last page you saw?&lt;br /&gt;
&lt;br /&gt;
Several things must be met before this will happen.  First make sure your lesson settings allow the student to retake the lesson and that this lesson is not a &amp;quot;practice&amp;quot; lesson.   The important thing is that the above words are not exactly correct.  They are correct only when the student left immediately after answering a question in a Lesson.  For the purposes of returning to the same place, Lesson only remembers question pages as benchmarks.  So lastly, make sure you have questions scattered in your Lesson for this feature to work and tell students.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;TIPs:&#039;&#039; Use a content page at the start of the lesson as a table of contents, so the student are forced to remember where they are but can jump to your teaching points.  Or put a question at the start or end of every &amp;quot;teaching point&amp;quot;.  And of course, you can tell your students how it is going to work.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* Using Moodle [http://moodle.org/mod/forum/view.php?f=333 Lesson module forum]&lt;br /&gt;
&lt;br /&gt;
[[Category:FAQ]]&lt;br /&gt;
[[de:Lektion_FAQ]]&lt;/div&gt;</summary>
		<author><name>Rcollman</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Lesson_settings&amp;diff=93934</id>
		<title>Lesson settings</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Lesson_settings&amp;diff=93934"/>
		<updated>2011-11-20T15:16:05Z</updated>

		<summary type="html">&lt;p&gt;Rcollman: /* Restrict access */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Improve}}&lt;br /&gt;
&lt;br /&gt;
{{Lesson}}&lt;br /&gt;
This page is about lesson settings that can be changed by the teacher. Some settings maybe shown by clicking on &amp;quot;These settings can be changed when in a lesson by the &#039;&#039;[[Settings block]] &amp;gt; Lesson administration &amp;gt; Edit settings&#039;&#039;.  There are excellent help files once Lesson settings window has been open. &lt;br /&gt;
&lt;br /&gt;
When creating a new lesson with the &amp;quot;Add activity&amp;quot; pull down menu, Moodle will first show the lesson settings page. &lt;br /&gt;
&lt;br /&gt;
After reviewing the lesson settings and saving them, you (the teacher) will jump back to the page list with its insert, edit, move or delete potentials.  See [[Building Lesson]] for more help.&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
There is a &amp;quot;Show or Hide Advanced&amp;quot; toggle button(s) that is found in many other activities.   Remember to click on this button to see features.  &lt;br /&gt;
&lt;br /&gt;
===Name===&lt;br /&gt;
Lesson name. HTML code will not work in this field.&lt;br /&gt;
&lt;br /&gt;
===Time limit=== &lt;br /&gt;
[[Image:Lesson Timer.png|right]]&lt;br /&gt;
Allows teacher to set a time limit on the lesson. Students are shown a count down counter and the time is recorded in the database. The timer does not evict a student from the lesson when the time is up, but does not score a question after the time limit reaches 0:00:00. The time in the database is checked each time a student submits a question.&lt;br /&gt;
&lt;br /&gt;
===The Maximum Number of Answers / Branches in a Lesson===&lt;br /&gt;
This value determines the maximum number of answers the teacher can see and use when editing a lesson or a page. The default value is 12.  This is a useful feature in older versions of Moodle that have no collapsed view.  This value can reduce the number of screens a teacher might see in the lesson edit mode.&lt;br /&gt;
&lt;br /&gt;
This parameter also sets the maximum number of buttons with descriptions and jumps that can be seen by the teacher in a Content (Branch Table) page.&lt;br /&gt;
&lt;br /&gt;
It is safe to change the value of this parameter at any time. It only effects what the teacher sees, not the data. For example, a teacher starting to enter a series of multiple choice questions with 6 answers, might set this value to 6.  Then when the teacher starts to enter a series of questions with 2 answers,  they might set this value to 2 because they don&#039;t need to see 4 blank answers for every question in the design phase.&lt;br /&gt;
&lt;br /&gt;
In a similar manner, changing the value does not effect what the student sees when they view a content page, nor does it change previous information put in by the teacher.&lt;br /&gt;
&lt;br /&gt;
===Password protected===&lt;br /&gt;
Change to &amp;quot;Yes&amp;quot;  and enter the password if you want to protect the lesson&lt;br /&gt;
&lt;br /&gt;
== Grade Options ==&lt;br /&gt;
&lt;br /&gt;
===Practice Lesson===&lt;br /&gt;
A practice lesson will not show up in the Gradebook.  A practice lesson can not be a dependent lesson.&lt;br /&gt;
&lt;br /&gt;
===Custom Scoring===&lt;br /&gt;
This will allow you to put a numerical point value on each answer in a question page. Answers may have negative values or positive values. Imported questions will automatically be assigned 1 point for correct answers and 0 for incorrect, though you may change this after the import. &lt;br /&gt;
&lt;br /&gt;
===Re-takes allowed===&lt;br /&gt;
This setting determines whether the students can take the lesson more than once or only once. The teacher may decide that the lesson contains material which the students ought to know thoroughly. In which case repeated viewing of the lesson should be allowed. If, however, the material is used more like an exam then the students should not be allowed to re-take the lesson.&lt;br /&gt;
&lt;br /&gt;
===Handling of re-takes===&lt;br /&gt;
When the students are allowed to re-take the lesson, the grades shown in the Grades page are either their average grade over the re-takes or their best grade for the lesson. The next parameter determines which of these two grading alternatives is used.&lt;br /&gt;
&lt;br /&gt;
:Note that the Question Analysis always uses the answers from the first tries of the lesson, subsequent re-takes by students are ignored.&lt;br /&gt;
&lt;br /&gt;
===Display ongoing score===&lt;br /&gt;
This setting will allow the student to see their current score.&lt;br /&gt;
&lt;br /&gt;
== Flow Control ==&lt;br /&gt;
Please see [[Using_Lesson#Some_Flow_control_scenarios_.26_their_implications|Some flow control scenarios]] for some examples that use these settings.  &lt;br /&gt;
===Allow Student Review===&lt;br /&gt;
This will place a &amp;quot;Review Lesson&amp;quot; button on the last screen of the lesson to encourage the student to navigate through the lesson again from the start.  Be sure to check other settings to allow them to change their answers.&lt;br /&gt;
&lt;br /&gt;
===Display Review Button===&lt;br /&gt;
This will display a button after an incorrectly answered question, allowing a student to re-attempt it.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;TIP:&#039;&#039; It is not compatible with essay questions, so leave this off if you are using essay questions.  Sometimes this setting will override any &amp;quot;display default feedback&amp;quot; lesson setting, where the default feedback will always be displayed when the review button is shown.&lt;br /&gt;
&lt;br /&gt;
===The Maximum Number of Attempts (by a Student)===&lt;br /&gt;
This value determines the maximum number of attempts a student (not a teacher) will have to answer any question in the lesson. Once reached, the student will not see the question again.  &lt;br /&gt;
&lt;br /&gt;
The default value is 5. Smaller values may discourage the student from trying different answers about a question. Larger values may lead to frustration when the student &amp;quot;does not get it&amp;quot;.  For example with a short answer or numerical question, the student is not given an opportunity to try different answer choices. This value provides an escape route to the next page in the lesson. &lt;br /&gt;
&lt;br /&gt;
Setting this value to 1 gives the students just single chance to answer each question. This would be similar to a question in the Quiz module.  &lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note:&#039;&#039; this value is student global parameter and that it applies to all the questions in the lesson regardless of their type. However it does not apply to teachers checking of questions or navigating through the lesson. Checking the number of attempts relies on values stored in the database and question attempts by teachers are not recorded. The teacher should after all know the answers!  So teachers should switch their roles to that of a student to observe this feature.&lt;br /&gt;
&lt;br /&gt;
===Action after correct answer=== &lt;br /&gt;
&amp;quot;Normal&amp;quot;, &amp;quot;Show unseen&amp;quot;, &amp;quot;Show unanswered&amp;quot;&lt;br /&gt;
&lt;br /&gt;
====Action after a Correct Answer====&lt;br /&gt;
The usual action is to follow the jump as specified in the answer. In most cases this will probably show the Next Page of the lesson. The student is taken through the lesson in a logical way, beginning at the start and ending at the end. (In 2.0 this is an Advanced feature.)&lt;br /&gt;
&lt;br /&gt;
However, the lesson module can also be used as a type of Flash Card assignment. The student is shown some information (optional) and a question in basically a random order. There is no set beginning and no set end. Just a set of Cards shown one after another in no particular order.&lt;br /&gt;
&lt;br /&gt;
This option allows two very similar variants of Slide show (Flash Card) behavior. The option &amp;quot;Show an unseen page&amp;quot; never shows the same page twice (even if the student did not answer the question associated with the Card/Page correctly). The other non-default option &amp;quot;Show an unanswered page&amp;quot; allows the student to see pages that may have appeared before but only if they answered the associated question wrongly.&lt;br /&gt;
&lt;br /&gt;
In either of these Flash Card-type lessons the teacher can decide to use either all the Cards/Pages in the lesson or just a (random) sub-set. This is done through the &amp;quot;Number of Pages (Cards) to show&amp;quot; parameter.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;If you want a student to be taken directly from one question to the next irrespective of their answer being correct or incorrect&#039;&#039;&#039;: in the Lesson Settings, set Maximum number of attempts: to 1. Please note, however, that a message &amp;quot;correct / incorrect&amp;quot; will still be displayed to the student upon answering each question. If you do not want this (default) feedback message to be displayed then enter your own feedback message (i.e. &amp;quot;continue&amp;quot;, &amp;quot;---&amp;quot;, etc.) In case you want no visible message displayed then enter a non-breaking space as feedback, so you&#039;ll have to put a # after the answer which may be ~3 and write &amp;amp; n b s p ; after that.(without spaces between these characters) To find out how Moodle works - you may export a sample of your questions with GIFT and check them out!&lt;br /&gt;
&lt;br /&gt;
===Display default feedback ===&lt;br /&gt;
&lt;br /&gt;
Feedback to a specific answer to a question can appear on the next page after the student makes a choice and submits it. The question, the student&#039;s answer and the feedback appear on a page with a continue button at the bottom.  This lesson setting controls what appears as the feedback response and if the page appears at all.&lt;br /&gt;
&lt;br /&gt;
When this option is set to Yes, the standard default response will appear.  In most lessons, when this is set to yes, Lesson first looks for the teachers custom feedback and if it does not find one, will put in the default feedback. It is possible to change the words used in the standard [[Language editing|default feedbacks]] for the entire Moodle Site.&lt;br /&gt;
&lt;br /&gt;
Selecting No, will only show the teacher&#039;s supplied feedbacks for each specific answer.  If the teacher has not entered a response for a specific answer, then the feedback page is not displayed and the student will immediately go to the page that the specific answer&#039;s jump is set to. &lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;TIP:&#039;&#039; Under some versions of Moodle, other lesson settings may cause the default feedback to appear, even when the teacher has supplied their own feedback.  Changing the &amp;quot;Review button&amp;quot; lesson setting to &amp;quot;No&amp;quot; will show the teachers custom feedback.&lt;br /&gt;
&lt;br /&gt;
===Progress bar===&lt;br /&gt;
A simple bar at the bottom of the lesson which will give an approximate percentage of completion.  Since lessons vary greatly in their navigation, this works best with lesson that follow the logical order and do not jump around.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Tip:&#039;&#039; While calculating the percent completed, Content and Question pages that are answered correctly count toward Lesson progress. While calculating the total number of pages in the Lesson, clusters and pages within clusters only count as a single page and End of Cluster and End of Branch Table pages are excluded. All other pages count toward the total number of pages in the Lesson.&lt;br /&gt;
&lt;br /&gt;
===Display left menu options=== &lt;br /&gt;
This will show a list of the pages (Branch Tables) in the lesson. Question pages, cluster pages, etc. will not be shown by default (you may choose to show question pages by checking that option on the question).&lt;br /&gt;
&lt;br /&gt;
By setting a grade greater than 0, the user taking the Lesson must have a grade equal to or greater than the grade set in order to view the Left Menu. This allows Lesson designers to force users to go through the entire lesson during the user&#039;s first attempt. Then, if a user retakes the Lesson after meeting the required grade, s/he can see the Left Menu to help with review.&lt;br /&gt;
&lt;br /&gt;
=== Minimum Number of Questions ===&lt;br /&gt;
This value determines the &#039;&#039;&#039;minimum&#039;&#039;&#039; number of questions that will be used to calculate a student&#039;s score.  It does not force students to answer that many questions in the lesson.  When a lesson contains one or more [[Adding a branch table| branches]], the teacher should normally set this parameter. &lt;br /&gt;
&lt;br /&gt;
:For example, setting this parameter to 20, will ensure that grades are given as though the students have seen at least this number of questions. Take the case of a student who only looks at a single branch in a lesson with 5 pages and answers all the associated questions correctly. This student then choose to end the lesson (assuming there is that option in the &amp;quot;top level&amp;quot;Branch Table, a reasonable enough assumption). If this parameter was set to 0 their grade would be 5 out of 5, that is 100%. However, with it set to 20 their grade would be reduced to 5 out of 20, that is 25%. In the case of another student who goes through all the branches and sees, say, 25 pages and answers all but two of the questions correctly, then their grade would be 23 out of 25, that is 92%.&lt;br /&gt;
&lt;br /&gt;
If this parameter is used, the teacher might want to add  a statement on the opening page of the lesson.  For example, if the teacher set the value to 20 they might say:&lt;br /&gt;
&lt;br /&gt;
:In this lesson you are expected to attempt at least &#039;&#039;20&#039;&#039; questions. You can attempt more if you wish. However, if you attempt less than &#039;&#039;20&#039;&#039; questions your grade will be calculated as though you attempted &#039;&#039;20&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
When this parameter is set to a value more than 0,  students are told how many questions they have attempted and how many they are expected to attempt.&lt;br /&gt;
&lt;br /&gt;
===Number of Pages to Show===&lt;br /&gt;
This setting only works when &amp;quot;Action after correct answer&amp;quot; is set to &amp;quot;Show an unseen page&amp;quot; or &amp;quot;Show an unanswered page&amp;quot;.  Lesson will then show a specific number of random pages to a student. For example, setting this to 10, will show 10 random pages and then bring the student to the end of the lesson with their grade. (In 2.0 this is an Advanced feature.)&lt;br /&gt;
&lt;br /&gt;
If this parameter is set to a number greater than the number of pages in the lesson then the end of the lesson is reached when all the pages have been shown.  When set to the default of 0 (zero), all pages are shown. &lt;br /&gt;
&lt;br /&gt;
===Slideshow===&lt;br /&gt;
This enables the display of the lesson as a slide show, with a fixed width, height, and custom background color. A CSS based scroll bar will be displayed if the width or height of the slide is exceeded by the content of a page. Questions will &#039;break out&#039; of the slide show mode, only content (branch tables) pages will be shown in a slide by default. Buttons labeled with the default for &amp;quot;Next&amp;quot; and &amp;quot;Previous&amp;quot; will be shown at the far right and left of the slide if that option is chosen on the page. Other buttons will be centered below the slide.  You can also decide on the width, height and the background colour of the slide show.  See site administration settings below for more information.&lt;br /&gt;
&lt;br /&gt;
===Link to an activity===&lt;br /&gt;
You may pick another activity link that will appear on the end of lesson page that shows the student their score.&lt;br /&gt;
&lt;br /&gt;
==Pop-up to file or web page==&lt;br /&gt;
At the start of the lesson, this creates a popup window.  For example this might be a music file, an agreement or text which the student can refer while in the lesson.See site administration settings below concerning width and height.&lt;br /&gt;
&lt;br /&gt;
== Dependent on ==&lt;br /&gt;
A lesson can be dependent upon another lesson. There are 3 possible dependencies which can be use separately or in combination with each other. Time Spent (minutes) refers to how long the student was in the lesson on their last attempt (it is not cumulative). Completed means the student has attempted one question. Grade as a percentage of a specific lesson means just that.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note:&#039;&#039;  This feature was developed before but is similar to the site wide &amp;quot;Restrict access&amp;quot; feature below.  &lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;TIP:&#039;&#039; When dependency does not seem to work when it is set to &amp;quot;Completed&amp;quot; on another lesson, you must have a question for lesson to recognize that it is complete.  Put a multiple choice question at the end of the lesson and ask: &amp;quot;In this lesson you learned A, B, and C.&amp;quot; Do not put in an answer or a jump.  The student will see &amp;quot;Continue&amp;quot; at the end and go to the end of the lesson and fulfill the requirement of completing the lesson.  The dependent on lesson can not be a practice lesson.&lt;br /&gt;
&lt;br /&gt;
==Common module settings==&lt;br /&gt;
&lt;br /&gt;
*Groupings: Groups must be turned on in the course&lt;br /&gt;
*Available for groups only check box (advanced)&lt;br /&gt;
*Visible (moved from Access Control section)&lt;br /&gt;
*ID number&lt;br /&gt;
*Grade category&lt;br /&gt;
&lt;br /&gt;
==Restrict access==&lt;br /&gt;
This group of settings will show when the site administrator has activated two advanced settings in Site administration &amp;gt; Advanced settings. For more information see:&lt;br /&gt;
*[[Completion tracking]] = marks activity complete based upon criterion.&lt;br /&gt;
*[[Conditional activities]] - controls entry into the lesson based upon criterion.&lt;br /&gt;
&lt;br /&gt;
==Site administration settings==&lt;br /&gt;
&lt;br /&gt;
The lesson module has additional settings which may be changed by an administrator in &#039;&#039;Settings &amp;gt; Site administration &amp;gt; Plugins &amp;gt; Activity modules &amp;gt; Lesson&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===Slideshow width===&lt;br /&gt;
Sets the width of the slideshow only when this feature is enabled in a Lesson&#039;s &amp;quot;Change settings&amp;quot;. &lt;br /&gt;
*Variable name: lesson_slideshowwidth, Default 640.&lt;br /&gt;
&lt;br /&gt;
===Slideshow height===&lt;br /&gt;
Sets the height of the slideshow only when this feature is enabled in a Lesson&#039;s &amp;quot;Change settings&amp;quot;. &lt;br /&gt;
*Variable name: lesson_slideshowheight, Default 480.&lt;br /&gt;
&lt;br /&gt;
===Slideshow background colour===&lt;br /&gt;
Background colour to for the slideshow if it is enabled. &lt;br /&gt;
*Variable name: lesson_slideshowbgcolor, Default #FFFFFF.&lt;br /&gt;
&lt;br /&gt;
===Popup window width===&lt;br /&gt;
Sets the width of the popup displayed for a linked media file&lt;br /&gt;
*Variable name: lesson_mediawidth, Default 640.&lt;br /&gt;
&lt;br /&gt;
===Popup window  height===&lt;br /&gt;
Sets the height of the popup displayed for a linked media file&lt;br /&gt;
*Variable name: lesson_mediaheight, Default 480.&lt;br /&gt;
&lt;br /&gt;
===Show close button:===&lt;br /&gt;
Displays a close button as part of the popup generated for a linked media file&lt;br /&gt;
*Variable name: lesson_mediaclose, Default No.&lt;br /&gt;
&lt;br /&gt;
===Number of high scores displayed===&lt;br /&gt;
Sets the number of high scores to display&lt;br /&gt;
*Variable name: lesson_maxhighscores, Default: 10&lt;br /&gt;
&lt;br /&gt;
===Maximum number of answers/branches===&lt;br /&gt;
Default maximum number of answers/branches per page for site&lt;br /&gt;
*Variable name: lesson_maxanswers, Default: 4.&lt;br /&gt;
&lt;br /&gt;
===Action after correct answer===&lt;br /&gt;
The default action to take after a correct answer&lt;br /&gt;
*Variable name: lesson_defaultnextpage, Default: Normal - follow lesson path&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[http://www.youtube.com/watch?v=4xjXelUZguw Creating a Lesson video tutorial]&lt;br /&gt;
*[[Lesson defaults]] - site wide defaults in Moodle 2.0&lt;br /&gt;
&lt;br /&gt;
[[fr:Ajouter/modifier une leçon]]&lt;br /&gt;
[[de:Lektion_anlegen]]&lt;/div&gt;</summary>
		<author><name>Rcollman</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Lesson_settings&amp;diff=93933</id>
		<title>Lesson settings</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Lesson_settings&amp;diff=93933"/>
		<updated>2011-11-20T15:13:39Z</updated>

		<summary type="html">&lt;p&gt;Rcollman: /* Restrict access, Activity completion settings */  change group name, reformat info put links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Improve}}&lt;br /&gt;
&lt;br /&gt;
{{Lesson}}&lt;br /&gt;
This page is about lesson settings that can be changed by the teacher. Some settings maybe shown by clicking on &amp;quot;These settings can be changed when in a lesson by the &#039;&#039;[[Settings block]] &amp;gt; Lesson administration &amp;gt; Edit settings&#039;&#039;.  There are excellent help files once Lesson settings window has been open. &lt;br /&gt;
&lt;br /&gt;
When creating a new lesson with the &amp;quot;Add activity&amp;quot; pull down menu, Moodle will first show the lesson settings page. &lt;br /&gt;
&lt;br /&gt;
After reviewing the lesson settings and saving them, you (the teacher) will jump back to the page list with its insert, edit, move or delete potentials.  See [[Building Lesson]] for more help.&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
There is a &amp;quot;Show or Hide Advanced&amp;quot; toggle button(s) that is found in many other activities.   Remember to click on this button to see features.  &lt;br /&gt;
&lt;br /&gt;
===Name===&lt;br /&gt;
Lesson name. HTML code will not work in this field.&lt;br /&gt;
&lt;br /&gt;
===Time limit=== &lt;br /&gt;
[[Image:Lesson Timer.png|right]]&lt;br /&gt;
Allows teacher to set a time limit on the lesson. Students are shown a count down counter and the time is recorded in the database. The timer does not evict a student from the lesson when the time is up, but does not score a question after the time limit reaches 0:00:00. The time in the database is checked each time a student submits a question.&lt;br /&gt;
&lt;br /&gt;
===The Maximum Number of Answers / Branches in a Lesson===&lt;br /&gt;
This value determines the maximum number of answers the teacher can see and use when editing a lesson or a page. The default value is 12.  This is a useful feature in older versions of Moodle that have no collapsed view.  This value can reduce the number of screens a teacher might see in the lesson edit mode.&lt;br /&gt;
&lt;br /&gt;
This parameter also sets the maximum number of buttons with descriptions and jumps that can be seen by the teacher in a Content (Branch Table) page.&lt;br /&gt;
&lt;br /&gt;
It is safe to change the value of this parameter at any time. It only effects what the teacher sees, not the data. For example, a teacher starting to enter a series of multiple choice questions with 6 answers, might set this value to 6.  Then when the teacher starts to enter a series of questions with 2 answers,  they might set this value to 2 because they don&#039;t need to see 4 blank answers for every question in the design phase.&lt;br /&gt;
&lt;br /&gt;
In a similar manner, changing the value does not effect what the student sees when they view a content page, nor does it change previous information put in by the teacher.&lt;br /&gt;
&lt;br /&gt;
===Password protected===&lt;br /&gt;
Change to &amp;quot;Yes&amp;quot;  and enter the password if you want to protect the lesson&lt;br /&gt;
&lt;br /&gt;
== Grade Options ==&lt;br /&gt;
&lt;br /&gt;
===Practice Lesson===&lt;br /&gt;
A practice lesson will not show up in the Gradebook.  A practice lesson can not be a dependent lesson.&lt;br /&gt;
&lt;br /&gt;
===Custom Scoring===&lt;br /&gt;
This will allow you to put a numerical point value on each answer in a question page. Answers may have negative values or positive values. Imported questions will automatically be assigned 1 point for correct answers and 0 for incorrect, though you may change this after the import. &lt;br /&gt;
&lt;br /&gt;
===Re-takes allowed===&lt;br /&gt;
This setting determines whether the students can take the lesson more than once or only once. The teacher may decide that the lesson contains material which the students ought to know thoroughly. In which case repeated viewing of the lesson should be allowed. If, however, the material is used more like an exam then the students should not be allowed to re-take the lesson.&lt;br /&gt;
&lt;br /&gt;
===Handling of re-takes===&lt;br /&gt;
When the students are allowed to re-take the lesson, the grades shown in the Grades page are either their average grade over the re-takes or their best grade for the lesson. The next parameter determines which of these two grading alternatives is used.&lt;br /&gt;
&lt;br /&gt;
:Note that the Question Analysis always uses the answers from the first tries of the lesson, subsequent re-takes by students are ignored.&lt;br /&gt;
&lt;br /&gt;
===Display ongoing score===&lt;br /&gt;
This setting will allow the student to see their current score.&lt;br /&gt;
&lt;br /&gt;
== Flow Control ==&lt;br /&gt;
Please see [[Using_Lesson#Some_Flow_control_scenarios_.26_their_implications|Some flow control scenarios]] for some examples that use these settings.  &lt;br /&gt;
===Allow Student Review===&lt;br /&gt;
This will place a &amp;quot;Review Lesson&amp;quot; button on the last screen of the lesson to encourage the student to navigate through the lesson again from the start.  Be sure to check other settings to allow them to change their answers.&lt;br /&gt;
&lt;br /&gt;
===Display Review Button===&lt;br /&gt;
This will display a button after an incorrectly answered question, allowing a student to re-attempt it.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;TIP:&#039;&#039; It is not compatible with essay questions, so leave this off if you are using essay questions.  Sometimes this setting will override any &amp;quot;display default feedback&amp;quot; lesson setting, where the default feedback will always be displayed when the review button is shown.&lt;br /&gt;
&lt;br /&gt;
===The Maximum Number of Attempts (by a Student)===&lt;br /&gt;
This value determines the maximum number of attempts a student (not a teacher) will have to answer any question in the lesson. Once reached, the student will not see the question again.  &lt;br /&gt;
&lt;br /&gt;
The default value is 5. Smaller values may discourage the student from trying different answers about a question. Larger values may lead to frustration when the student &amp;quot;does not get it&amp;quot;.  For example with a short answer or numerical question, the student is not given an opportunity to try different answer choices. This value provides an escape route to the next page in the lesson. &lt;br /&gt;
&lt;br /&gt;
Setting this value to 1 gives the students just single chance to answer each question. This would be similar to a question in the Quiz module.  &lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note:&#039;&#039; this value is student global parameter and that it applies to all the questions in the lesson regardless of their type. However it does not apply to teachers checking of questions or navigating through the lesson. Checking the number of attempts relies on values stored in the database and question attempts by teachers are not recorded. The teacher should after all know the answers!  So teachers should switch their roles to that of a student to observe this feature.&lt;br /&gt;
&lt;br /&gt;
===Action after correct answer=== &lt;br /&gt;
&amp;quot;Normal&amp;quot;, &amp;quot;Show unseen&amp;quot;, &amp;quot;Show unanswered&amp;quot;&lt;br /&gt;
&lt;br /&gt;
====Action after a Correct Answer====&lt;br /&gt;
The usual action is to follow the jump as specified in the answer. In most cases this will probably show the Next Page of the lesson. The student is taken through the lesson in a logical way, beginning at the start and ending at the end. (In 2.0 this is an Advanced feature.)&lt;br /&gt;
&lt;br /&gt;
However, the lesson module can also be used as a type of Flash Card assignment. The student is shown some information (optional) and a question in basically a random order. There is no set beginning and no set end. Just a set of Cards shown one after another in no particular order.&lt;br /&gt;
&lt;br /&gt;
This option allows two very similar variants of Slide show (Flash Card) behavior. The option &amp;quot;Show an unseen page&amp;quot; never shows the same page twice (even if the student did not answer the question associated with the Card/Page correctly). The other non-default option &amp;quot;Show an unanswered page&amp;quot; allows the student to see pages that may have appeared before but only if they answered the associated question wrongly.&lt;br /&gt;
&lt;br /&gt;
In either of these Flash Card-type lessons the teacher can decide to use either all the Cards/Pages in the lesson or just a (random) sub-set. This is done through the &amp;quot;Number of Pages (Cards) to show&amp;quot; parameter.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;If you want a student to be taken directly from one question to the next irrespective of their answer being correct or incorrect&#039;&#039;&#039;: in the Lesson Settings, set Maximum number of attempts: to 1. Please note, however, that a message &amp;quot;correct / incorrect&amp;quot; will still be displayed to the student upon answering each question. If you do not want this (default) feedback message to be displayed then enter your own feedback message (i.e. &amp;quot;continue&amp;quot;, &amp;quot;---&amp;quot;, etc.) In case you want no visible message displayed then enter a non-breaking space as feedback, so you&#039;ll have to put a # after the answer which may be ~3 and write &amp;amp; n b s p ; after that.(without spaces between these characters) To find out how Moodle works - you may export a sample of your questions with GIFT and check them out!&lt;br /&gt;
&lt;br /&gt;
===Display default feedback ===&lt;br /&gt;
&lt;br /&gt;
Feedback to a specific answer to a question can appear on the next page after the student makes a choice and submits it. The question, the student&#039;s answer and the feedback appear on a page with a continue button at the bottom.  This lesson setting controls what appears as the feedback response and if the page appears at all.&lt;br /&gt;
&lt;br /&gt;
When this option is set to Yes, the standard default response will appear.  In most lessons, when this is set to yes, Lesson first looks for the teachers custom feedback and if it does not find one, will put in the default feedback. It is possible to change the words used in the standard [[Language editing|default feedbacks]] for the entire Moodle Site.&lt;br /&gt;
&lt;br /&gt;
Selecting No, will only show the teacher&#039;s supplied feedbacks for each specific answer.  If the teacher has not entered a response for a specific answer, then the feedback page is not displayed and the student will immediately go to the page that the specific answer&#039;s jump is set to. &lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;TIP:&#039;&#039; Under some versions of Moodle, other lesson settings may cause the default feedback to appear, even when the teacher has supplied their own feedback.  Changing the &amp;quot;Review button&amp;quot; lesson setting to &amp;quot;No&amp;quot; will show the teachers custom feedback.&lt;br /&gt;
&lt;br /&gt;
===Progress bar===&lt;br /&gt;
A simple bar at the bottom of the lesson which will give an approximate percentage of completion.  Since lessons vary greatly in their navigation, this works best with lesson that follow the logical order and do not jump around.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Tip:&#039;&#039; While calculating the percent completed, Content and Question pages that are answered correctly count toward Lesson progress. While calculating the total number of pages in the Lesson, clusters and pages within clusters only count as a single page and End of Cluster and End of Branch Table pages are excluded. All other pages count toward the total number of pages in the Lesson.&lt;br /&gt;
&lt;br /&gt;
===Display left menu options=== &lt;br /&gt;
This will show a list of the pages (Branch Tables) in the lesson. Question pages, cluster pages, etc. will not be shown by default (you may choose to show question pages by checking that option on the question).&lt;br /&gt;
&lt;br /&gt;
By setting a grade greater than 0, the user taking the Lesson must have a grade equal to or greater than the grade set in order to view the Left Menu. This allows Lesson designers to force users to go through the entire lesson during the user&#039;s first attempt. Then, if a user retakes the Lesson after meeting the required grade, s/he can see the Left Menu to help with review.&lt;br /&gt;
&lt;br /&gt;
=== Minimum Number of Questions ===&lt;br /&gt;
This value determines the &#039;&#039;&#039;minimum&#039;&#039;&#039; number of questions that will be used to calculate a student&#039;s score.  It does not force students to answer that many questions in the lesson.  When a lesson contains one or more [[Adding a branch table| branches]], the teacher should normally set this parameter. &lt;br /&gt;
&lt;br /&gt;
:For example, setting this parameter to 20, will ensure that grades are given as though the students have seen at least this number of questions. Take the case of a student who only looks at a single branch in a lesson with 5 pages and answers all the associated questions correctly. This student then choose to end the lesson (assuming there is that option in the &amp;quot;top level&amp;quot;Branch Table, a reasonable enough assumption). If this parameter was set to 0 their grade would be 5 out of 5, that is 100%. However, with it set to 20 their grade would be reduced to 5 out of 20, that is 25%. In the case of another student who goes through all the branches and sees, say, 25 pages and answers all but two of the questions correctly, then their grade would be 23 out of 25, that is 92%.&lt;br /&gt;
&lt;br /&gt;
If this parameter is used, the teacher might want to add  a statement on the opening page of the lesson.  For example, if the teacher set the value to 20 they might say:&lt;br /&gt;
&lt;br /&gt;
:In this lesson you are expected to attempt at least &#039;&#039;20&#039;&#039; questions. You can attempt more if you wish. However, if you attempt less than &#039;&#039;20&#039;&#039; questions your grade will be calculated as though you attempted &#039;&#039;20&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
When this parameter is set to a value more than 0,  students are told how many questions they have attempted and how many they are expected to attempt.&lt;br /&gt;
&lt;br /&gt;
===Number of Pages to Show===&lt;br /&gt;
This setting only works when &amp;quot;Action after correct answer&amp;quot; is set to &amp;quot;Show an unseen page&amp;quot; or &amp;quot;Show an unanswered page&amp;quot;.  Lesson will then show a specific number of random pages to a student. For example, setting this to 10, will show 10 random pages and then bring the student to the end of the lesson with their grade. (In 2.0 this is an Advanced feature.)&lt;br /&gt;
&lt;br /&gt;
If this parameter is set to a number greater than the number of pages in the lesson then the end of the lesson is reached when all the pages have been shown.  When set to the default of 0 (zero), all pages are shown. &lt;br /&gt;
&lt;br /&gt;
===Slideshow===&lt;br /&gt;
This enables the display of the lesson as a slide show, with a fixed width, height, and custom background color. A CSS based scroll bar will be displayed if the width or height of the slide is exceeded by the content of a page. Questions will &#039;break out&#039; of the slide show mode, only content (branch tables) pages will be shown in a slide by default. Buttons labeled with the default for &amp;quot;Next&amp;quot; and &amp;quot;Previous&amp;quot; will be shown at the far right and left of the slide if that option is chosen on the page. Other buttons will be centered below the slide.  You can also decide on the width, height and the background colour of the slide show.  See site administration settings below for more information.&lt;br /&gt;
&lt;br /&gt;
===Link to an activity===&lt;br /&gt;
You may pick another activity link that will appear on the end of lesson page that shows the student their score.&lt;br /&gt;
&lt;br /&gt;
==Pop-up to file or web page==&lt;br /&gt;
At the start of the lesson, this creates a popup window.  For example this might be a music file, an agreement or text which the student can refer while in the lesson.See site administration settings below concerning width and height.&lt;br /&gt;
&lt;br /&gt;
== Dependent on ==&lt;br /&gt;
A lesson can be dependent upon another lesson. There are 3 possible dependencies which can be use separately or in combination with each other. Time Spent (minutes) refers to how long the student was in the lesson on their last attempt (it is not cumulative). Completed means the student has attempted one question. Grade as a percentage of a specific lesson means just that.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note:&#039;&#039;  This feature was developed before but is similar to the site wide &amp;quot;Restrict access&amp;quot; feature below.  &lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;TIP:&#039;&#039; When dependency does not seem to work when it is set to &amp;quot;Completed&amp;quot; on another lesson, you must have a question for lesson to recognize that it is complete.  Put a multiple choice question at the end of the lesson and ask: &amp;quot;In this lesson you learned A, B, and C.&amp;quot; Do not put in an answer or a jump.  The student will see &amp;quot;Continue&amp;quot; at the end and go to the end of the lesson and fulfill the requirement of completing the lesson.  The dependent on lesson can not be a practice lesson.&lt;br /&gt;
&lt;br /&gt;
==Common module settings==&lt;br /&gt;
&lt;br /&gt;
*Groupings: Groups must be turned on in the course&lt;br /&gt;
*Available for groups only check box (advanced)&lt;br /&gt;
*Visible (moved from Access Control section)&lt;br /&gt;
*ID number&lt;br /&gt;
*Grade category&lt;br /&gt;
&lt;br /&gt;
==Restrict access==&lt;br /&gt;
This group of settings will show when the site administrator has activated two advanced settings in Site administration &amp;gt; Advanced settings. For more information see:&lt;br /&gt;
*[[Completion tracking]] = marks activity complete based upon criterion.&lt;br /&gt;
*[[Conditional access]] - controls entry into the lesson based upon criterion.&lt;br /&gt;
&lt;br /&gt;
==Site administration settings==&lt;br /&gt;
&lt;br /&gt;
The lesson module has additional settings which may be changed by an administrator in &#039;&#039;Settings &amp;gt; Site administration &amp;gt; Plugins &amp;gt; Activity modules &amp;gt; Lesson&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===Slideshow width===&lt;br /&gt;
Sets the width of the slideshow only when this feature is enabled in a Lesson&#039;s &amp;quot;Change settings&amp;quot;. &lt;br /&gt;
*Variable name: lesson_slideshowwidth, Default 640.&lt;br /&gt;
&lt;br /&gt;
===Slideshow height===&lt;br /&gt;
Sets the height of the slideshow only when this feature is enabled in a Lesson&#039;s &amp;quot;Change settings&amp;quot;. &lt;br /&gt;
*Variable name: lesson_slideshowheight, Default 480.&lt;br /&gt;
&lt;br /&gt;
===Slideshow background colour===&lt;br /&gt;
Background colour to for the slideshow if it is enabled. &lt;br /&gt;
*Variable name: lesson_slideshowbgcolor, Default #FFFFFF.&lt;br /&gt;
&lt;br /&gt;
===Popup window width===&lt;br /&gt;
Sets the width of the popup displayed for a linked media file&lt;br /&gt;
*Variable name: lesson_mediawidth, Default 640.&lt;br /&gt;
&lt;br /&gt;
===Popup window  height===&lt;br /&gt;
Sets the height of the popup displayed for a linked media file&lt;br /&gt;
*Variable name: lesson_mediaheight, Default 480.&lt;br /&gt;
&lt;br /&gt;
===Show close button:===&lt;br /&gt;
Displays a close button as part of the popup generated for a linked media file&lt;br /&gt;
*Variable name: lesson_mediaclose, Default No.&lt;br /&gt;
&lt;br /&gt;
===Number of high scores displayed===&lt;br /&gt;
Sets the number of high scores to display&lt;br /&gt;
*Variable name: lesson_maxhighscores, Default: 10&lt;br /&gt;
&lt;br /&gt;
===Maximum number of answers/branches===&lt;br /&gt;
Default maximum number of answers/branches per page for site&lt;br /&gt;
*Variable name: lesson_maxanswers, Default: 4.&lt;br /&gt;
&lt;br /&gt;
===Action after correct answer===&lt;br /&gt;
The default action to take after a correct answer&lt;br /&gt;
*Variable name: lesson_defaultnextpage, Default: Normal - follow lesson path&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[http://www.youtube.com/watch?v=4xjXelUZguw Creating a Lesson video tutorial]&lt;br /&gt;
*[[Lesson defaults]] - site wide defaults in Moodle 2.0&lt;br /&gt;
&lt;br /&gt;
[[fr:Ajouter/modifier une leçon]]&lt;br /&gt;
[[de:Lektion_anlegen]]&lt;/div&gt;</summary>
		<author><name>Rcollman</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Lesson_settings&amp;diff=93932</id>
		<title>Lesson settings</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Lesson_settings&amp;diff=93932"/>
		<updated>2011-11-20T15:07:51Z</updated>

		<summary type="html">&lt;p&gt;Rcollman: /* Dependent on */ caution, similar to restrict access&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Improve}}&lt;br /&gt;
&lt;br /&gt;
{{Lesson}}&lt;br /&gt;
This page is about lesson settings that can be changed by the teacher. Some settings maybe shown by clicking on &amp;quot;These settings can be changed when in a lesson by the &#039;&#039;[[Settings block]] &amp;gt; Lesson administration &amp;gt; Edit settings&#039;&#039;.  There are excellent help files once Lesson settings window has been open. &lt;br /&gt;
&lt;br /&gt;
When creating a new lesson with the &amp;quot;Add activity&amp;quot; pull down menu, Moodle will first show the lesson settings page. &lt;br /&gt;
&lt;br /&gt;
After reviewing the lesson settings and saving them, you (the teacher) will jump back to the page list with its insert, edit, move or delete potentials.  See [[Building Lesson]] for more help.&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
There is a &amp;quot;Show or Hide Advanced&amp;quot; toggle button(s) that is found in many other activities.   Remember to click on this button to see features.  &lt;br /&gt;
&lt;br /&gt;
===Name===&lt;br /&gt;
Lesson name. HTML code will not work in this field.&lt;br /&gt;
&lt;br /&gt;
===Time limit=== &lt;br /&gt;
[[Image:Lesson Timer.png|right]]&lt;br /&gt;
Allows teacher to set a time limit on the lesson. Students are shown a count down counter and the time is recorded in the database. The timer does not evict a student from the lesson when the time is up, but does not score a question after the time limit reaches 0:00:00. The time in the database is checked each time a student submits a question.&lt;br /&gt;
&lt;br /&gt;
===The Maximum Number of Answers / Branches in a Lesson===&lt;br /&gt;
This value determines the maximum number of answers the teacher can see and use when editing a lesson or a page. The default value is 12.  This is a useful feature in older versions of Moodle that have no collapsed view.  This value can reduce the number of screens a teacher might see in the lesson edit mode.&lt;br /&gt;
&lt;br /&gt;
This parameter also sets the maximum number of buttons with descriptions and jumps that can be seen by the teacher in a Content (Branch Table) page.&lt;br /&gt;
&lt;br /&gt;
It is safe to change the value of this parameter at any time. It only effects what the teacher sees, not the data. For example, a teacher starting to enter a series of multiple choice questions with 6 answers, might set this value to 6.  Then when the teacher starts to enter a series of questions with 2 answers,  they might set this value to 2 because they don&#039;t need to see 4 blank answers for every question in the design phase.&lt;br /&gt;
&lt;br /&gt;
In a similar manner, changing the value does not effect what the student sees when they view a content page, nor does it change previous information put in by the teacher.&lt;br /&gt;
&lt;br /&gt;
===Password protected===&lt;br /&gt;
Change to &amp;quot;Yes&amp;quot;  and enter the password if you want to protect the lesson&lt;br /&gt;
&lt;br /&gt;
== Grade Options ==&lt;br /&gt;
&lt;br /&gt;
===Practice Lesson===&lt;br /&gt;
A practice lesson will not show up in the Gradebook.  A practice lesson can not be a dependent lesson.&lt;br /&gt;
&lt;br /&gt;
===Custom Scoring===&lt;br /&gt;
This will allow you to put a numerical point value on each answer in a question page. Answers may have negative values or positive values. Imported questions will automatically be assigned 1 point for correct answers and 0 for incorrect, though you may change this after the import. &lt;br /&gt;
&lt;br /&gt;
===Re-takes allowed===&lt;br /&gt;
This setting determines whether the students can take the lesson more than once or only once. The teacher may decide that the lesson contains material which the students ought to know thoroughly. In which case repeated viewing of the lesson should be allowed. If, however, the material is used more like an exam then the students should not be allowed to re-take the lesson.&lt;br /&gt;
&lt;br /&gt;
===Handling of re-takes===&lt;br /&gt;
When the students are allowed to re-take the lesson, the grades shown in the Grades page are either their average grade over the re-takes or their best grade for the lesson. The next parameter determines which of these two grading alternatives is used.&lt;br /&gt;
&lt;br /&gt;
:Note that the Question Analysis always uses the answers from the first tries of the lesson, subsequent re-takes by students are ignored.&lt;br /&gt;
&lt;br /&gt;
===Display ongoing score===&lt;br /&gt;
This setting will allow the student to see their current score.&lt;br /&gt;
&lt;br /&gt;
== Flow Control ==&lt;br /&gt;
Please see [[Using_Lesson#Some_Flow_control_scenarios_.26_their_implications|Some flow control scenarios]] for some examples that use these settings.  &lt;br /&gt;
===Allow Student Review===&lt;br /&gt;
This will place a &amp;quot;Review Lesson&amp;quot; button on the last screen of the lesson to encourage the student to navigate through the lesson again from the start.  Be sure to check other settings to allow them to change their answers.&lt;br /&gt;
&lt;br /&gt;
===Display Review Button===&lt;br /&gt;
This will display a button after an incorrectly answered question, allowing a student to re-attempt it.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;TIP:&#039;&#039; It is not compatible with essay questions, so leave this off if you are using essay questions.  Sometimes this setting will override any &amp;quot;display default feedback&amp;quot; lesson setting, where the default feedback will always be displayed when the review button is shown.&lt;br /&gt;
&lt;br /&gt;
===The Maximum Number of Attempts (by a Student)===&lt;br /&gt;
This value determines the maximum number of attempts a student (not a teacher) will have to answer any question in the lesson. Once reached, the student will not see the question again.  &lt;br /&gt;
&lt;br /&gt;
The default value is 5. Smaller values may discourage the student from trying different answers about a question. Larger values may lead to frustration when the student &amp;quot;does not get it&amp;quot;.  For example with a short answer or numerical question, the student is not given an opportunity to try different answer choices. This value provides an escape route to the next page in the lesson. &lt;br /&gt;
&lt;br /&gt;
Setting this value to 1 gives the students just single chance to answer each question. This would be similar to a question in the Quiz module.  &lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note:&#039;&#039; this value is student global parameter and that it applies to all the questions in the lesson regardless of their type. However it does not apply to teachers checking of questions or navigating through the lesson. Checking the number of attempts relies on values stored in the database and question attempts by teachers are not recorded. The teacher should after all know the answers!  So teachers should switch their roles to that of a student to observe this feature.&lt;br /&gt;
&lt;br /&gt;
===Action after correct answer=== &lt;br /&gt;
&amp;quot;Normal&amp;quot;, &amp;quot;Show unseen&amp;quot;, &amp;quot;Show unanswered&amp;quot;&lt;br /&gt;
&lt;br /&gt;
====Action after a Correct Answer====&lt;br /&gt;
The usual action is to follow the jump as specified in the answer. In most cases this will probably show the Next Page of the lesson. The student is taken through the lesson in a logical way, beginning at the start and ending at the end. (In 2.0 this is an Advanced feature.)&lt;br /&gt;
&lt;br /&gt;
However, the lesson module can also be used as a type of Flash Card assignment. The student is shown some information (optional) and a question in basically a random order. There is no set beginning and no set end. Just a set of Cards shown one after another in no particular order.&lt;br /&gt;
&lt;br /&gt;
This option allows two very similar variants of Slide show (Flash Card) behavior. The option &amp;quot;Show an unseen page&amp;quot; never shows the same page twice (even if the student did not answer the question associated with the Card/Page correctly). The other non-default option &amp;quot;Show an unanswered page&amp;quot; allows the student to see pages that may have appeared before but only if they answered the associated question wrongly.&lt;br /&gt;
&lt;br /&gt;
In either of these Flash Card-type lessons the teacher can decide to use either all the Cards/Pages in the lesson or just a (random) sub-set. This is done through the &amp;quot;Number of Pages (Cards) to show&amp;quot; parameter.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;If you want a student to be taken directly from one question to the next irrespective of their answer being correct or incorrect&#039;&#039;&#039;: in the Lesson Settings, set Maximum number of attempts: to 1. Please note, however, that a message &amp;quot;correct / incorrect&amp;quot; will still be displayed to the student upon answering each question. If you do not want this (default) feedback message to be displayed then enter your own feedback message (i.e. &amp;quot;continue&amp;quot;, &amp;quot;---&amp;quot;, etc.) In case you want no visible message displayed then enter a non-breaking space as feedback, so you&#039;ll have to put a # after the answer which may be ~3 and write &amp;amp; n b s p ; after that.(without spaces between these characters) To find out how Moodle works - you may export a sample of your questions with GIFT and check them out!&lt;br /&gt;
&lt;br /&gt;
===Display default feedback ===&lt;br /&gt;
&lt;br /&gt;
Feedback to a specific answer to a question can appear on the next page after the student makes a choice and submits it. The question, the student&#039;s answer and the feedback appear on a page with a continue button at the bottom.  This lesson setting controls what appears as the feedback response and if the page appears at all.&lt;br /&gt;
&lt;br /&gt;
When this option is set to Yes, the standard default response will appear.  In most lessons, when this is set to yes, Lesson first looks for the teachers custom feedback and if it does not find one, will put in the default feedback. It is possible to change the words used in the standard [[Language editing|default feedbacks]] for the entire Moodle Site.&lt;br /&gt;
&lt;br /&gt;
Selecting No, will only show the teacher&#039;s supplied feedbacks for each specific answer.  If the teacher has not entered a response for a specific answer, then the feedback page is not displayed and the student will immediately go to the page that the specific answer&#039;s jump is set to. &lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;TIP:&#039;&#039; Under some versions of Moodle, other lesson settings may cause the default feedback to appear, even when the teacher has supplied their own feedback.  Changing the &amp;quot;Review button&amp;quot; lesson setting to &amp;quot;No&amp;quot; will show the teachers custom feedback.&lt;br /&gt;
&lt;br /&gt;
===Progress bar===&lt;br /&gt;
A simple bar at the bottom of the lesson which will give an approximate percentage of completion.  Since lessons vary greatly in their navigation, this works best with lesson that follow the logical order and do not jump around.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Tip:&#039;&#039; While calculating the percent completed, Content and Question pages that are answered correctly count toward Lesson progress. While calculating the total number of pages in the Lesson, clusters and pages within clusters only count as a single page and End of Cluster and End of Branch Table pages are excluded. All other pages count toward the total number of pages in the Lesson.&lt;br /&gt;
&lt;br /&gt;
===Display left menu options=== &lt;br /&gt;
This will show a list of the pages (Branch Tables) in the lesson. Question pages, cluster pages, etc. will not be shown by default (you may choose to show question pages by checking that option on the question).&lt;br /&gt;
&lt;br /&gt;
By setting a grade greater than 0, the user taking the Lesson must have a grade equal to or greater than the grade set in order to view the Left Menu. This allows Lesson designers to force users to go through the entire lesson during the user&#039;s first attempt. Then, if a user retakes the Lesson after meeting the required grade, s/he can see the Left Menu to help with review.&lt;br /&gt;
&lt;br /&gt;
=== Minimum Number of Questions ===&lt;br /&gt;
This value determines the &#039;&#039;&#039;minimum&#039;&#039;&#039; number of questions that will be used to calculate a student&#039;s score.  It does not force students to answer that many questions in the lesson.  When a lesson contains one or more [[Adding a branch table| branches]], the teacher should normally set this parameter. &lt;br /&gt;
&lt;br /&gt;
:For example, setting this parameter to 20, will ensure that grades are given as though the students have seen at least this number of questions. Take the case of a student who only looks at a single branch in a lesson with 5 pages and answers all the associated questions correctly. This student then choose to end the lesson (assuming there is that option in the &amp;quot;top level&amp;quot;Branch Table, a reasonable enough assumption). If this parameter was set to 0 their grade would be 5 out of 5, that is 100%. However, with it set to 20 their grade would be reduced to 5 out of 20, that is 25%. In the case of another student who goes through all the branches and sees, say, 25 pages and answers all but two of the questions correctly, then their grade would be 23 out of 25, that is 92%.&lt;br /&gt;
&lt;br /&gt;
If this parameter is used, the teacher might want to add  a statement on the opening page of the lesson.  For example, if the teacher set the value to 20 they might say:&lt;br /&gt;
&lt;br /&gt;
:In this lesson you are expected to attempt at least &#039;&#039;20&#039;&#039; questions. You can attempt more if you wish. However, if you attempt less than &#039;&#039;20&#039;&#039; questions your grade will be calculated as though you attempted &#039;&#039;20&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
When this parameter is set to a value more than 0,  students are told how many questions they have attempted and how many they are expected to attempt.&lt;br /&gt;
&lt;br /&gt;
===Number of Pages to Show===&lt;br /&gt;
This setting only works when &amp;quot;Action after correct answer&amp;quot; is set to &amp;quot;Show an unseen page&amp;quot; or &amp;quot;Show an unanswered page&amp;quot;.  Lesson will then show a specific number of random pages to a student. For example, setting this to 10, will show 10 random pages and then bring the student to the end of the lesson with their grade. (In 2.0 this is an Advanced feature.)&lt;br /&gt;
&lt;br /&gt;
If this parameter is set to a number greater than the number of pages in the lesson then the end of the lesson is reached when all the pages have been shown.  When set to the default of 0 (zero), all pages are shown. &lt;br /&gt;
&lt;br /&gt;
===Slideshow===&lt;br /&gt;
This enables the display of the lesson as a slide show, with a fixed width, height, and custom background color. A CSS based scroll bar will be displayed if the width or height of the slide is exceeded by the content of a page. Questions will &#039;break out&#039; of the slide show mode, only content (branch tables) pages will be shown in a slide by default. Buttons labeled with the default for &amp;quot;Next&amp;quot; and &amp;quot;Previous&amp;quot; will be shown at the far right and left of the slide if that option is chosen on the page. Other buttons will be centered below the slide.  You can also decide on the width, height and the background colour of the slide show.  See site administration settings below for more information.&lt;br /&gt;
&lt;br /&gt;
===Link to an activity===&lt;br /&gt;
You may pick another activity link that will appear on the end of lesson page that shows the student their score.&lt;br /&gt;
&lt;br /&gt;
==Pop-up to file or web page==&lt;br /&gt;
At the start of the lesson, this creates a popup window.  For example this might be a music file, an agreement or text which the student can refer while in the lesson.See site administration settings below concerning width and height.&lt;br /&gt;
&lt;br /&gt;
== Dependent on ==&lt;br /&gt;
A lesson can be dependent upon another lesson. There are 3 possible dependencies which can be use separately or in combination with each other. Time Spent (minutes) refers to how long the student was in the lesson on their last attempt (it is not cumulative). Completed means the student has attempted one question. Grade as a percentage of a specific lesson means just that.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note:&#039;&#039;  This feature was developed before but is similar to the site wide &amp;quot;Restrict access&amp;quot; feature below.  &lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;TIP:&#039;&#039; When dependency does not seem to work when it is set to &amp;quot;Completed&amp;quot; on another lesson, you must have a question for lesson to recognize that it is complete.  Put a multiple choice question at the end of the lesson and ask: &amp;quot;In this lesson you learned A, B, and C.&amp;quot; Do not put in an answer or a jump.  The student will see &amp;quot;Continue&amp;quot; at the end and go to the end of the lesson and fulfill the requirement of completing the lesson.  The dependent on lesson can not be a practice lesson.&lt;br /&gt;
&lt;br /&gt;
==Common module settings==&lt;br /&gt;
&lt;br /&gt;
*Groupings: Groups must be turned on in the course&lt;br /&gt;
*Available for groups only check box (advanced)&lt;br /&gt;
*Visible (moved from Access Control section)&lt;br /&gt;
*ID number&lt;br /&gt;
*Grade category&lt;br /&gt;
&lt;br /&gt;
==Restrict access, Activity completion settings==&lt;br /&gt;
If the site administrator has enabled [[Completion tracking]] (and the teacher has enabled [[Student review]] in the course) you will see &amp;quot;Activity completion&amp;quot; settings.  If the site administrator has enable [[Conditional access] on the site, then you will see the [[Restrict access settings]].&lt;br /&gt;
&lt;br /&gt;
==Site administration settings==&lt;br /&gt;
&lt;br /&gt;
The lesson module has additional settings which may be changed by an administrator in &#039;&#039;Settings &amp;gt; Site administration &amp;gt; Plugins &amp;gt; Activity modules &amp;gt; Lesson&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===Slideshow width===&lt;br /&gt;
Sets the width of the slideshow only when this feature is enabled in a Lesson&#039;s &amp;quot;Change settings&amp;quot;. &lt;br /&gt;
*Variable name: lesson_slideshowwidth, Default 640.&lt;br /&gt;
&lt;br /&gt;
===Slideshow height===&lt;br /&gt;
Sets the height of the slideshow only when this feature is enabled in a Lesson&#039;s &amp;quot;Change settings&amp;quot;. &lt;br /&gt;
*Variable name: lesson_slideshowheight, Default 480.&lt;br /&gt;
&lt;br /&gt;
===Slideshow background colour===&lt;br /&gt;
Background colour to for the slideshow if it is enabled. &lt;br /&gt;
*Variable name: lesson_slideshowbgcolor, Default #FFFFFF.&lt;br /&gt;
&lt;br /&gt;
===Popup window width===&lt;br /&gt;
Sets the width of the popup displayed for a linked media file&lt;br /&gt;
*Variable name: lesson_mediawidth, Default 640.&lt;br /&gt;
&lt;br /&gt;
===Popup window  height===&lt;br /&gt;
Sets the height of the popup displayed for a linked media file&lt;br /&gt;
*Variable name: lesson_mediaheight, Default 480.&lt;br /&gt;
&lt;br /&gt;
===Show close button:===&lt;br /&gt;
Displays a close button as part of the popup generated for a linked media file&lt;br /&gt;
*Variable name: lesson_mediaclose, Default No.&lt;br /&gt;
&lt;br /&gt;
===Number of high scores displayed===&lt;br /&gt;
Sets the number of high scores to display&lt;br /&gt;
*Variable name: lesson_maxhighscores, Default: 10&lt;br /&gt;
&lt;br /&gt;
===Maximum number of answers/branches===&lt;br /&gt;
Default maximum number of answers/branches per page for site&lt;br /&gt;
*Variable name: lesson_maxanswers, Default: 4.&lt;br /&gt;
&lt;br /&gt;
===Action after correct answer===&lt;br /&gt;
The default action to take after a correct answer&lt;br /&gt;
*Variable name: lesson_defaultnextpage, Default: Normal - follow lesson path&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[http://www.youtube.com/watch?v=4xjXelUZguw Creating a Lesson video tutorial]&lt;br /&gt;
*[[Lesson defaults]] - site wide defaults in Moodle 2.0&lt;br /&gt;
&lt;br /&gt;
[[fr:Ajouter/modifier une leçon]]&lt;br /&gt;
[[de:Lektion_anlegen]]&lt;/div&gt;</summary>
		<author><name>Rcollman</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=User_talk:Helen_Foster&amp;diff=93931</id>
		<title>User talk:Helen Foster</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=User_talk:Helen_Foster&amp;diff=93931"/>
		<updated>2011-11-20T14:58:55Z</updated>

		<summary type="html">&lt;p&gt;Rcollman: Cron?&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Cron==&lt;br /&gt;
Hi Helen.  First to comment in 2.1 !   Do you and/or Eloy like what I am proposing for [[Cron]]? --[[User:chris collman|chris collman]] 22:58, 20 November 2011 (WST)&lt;/div&gt;</summary>
		<author><name>Rcollman</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Certificate_reports&amp;diff=93928</id>
		<title>Certificate reports</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Certificate_reports&amp;diff=93928"/>
		<updated>2011-11-19T18:52:26Z</updated>

		<summary type="html">&lt;p&gt;Rcollman: /* View and download certificate reports */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Certificate}}&lt;br /&gt;
A teacher can view and download a report of all certificates issued in their course.  &lt;br /&gt;
&lt;br /&gt;
==View and download certificate reports==&lt;br /&gt;
{{Update}}&lt;br /&gt;
The teacher can see a list of all certificates by clicking on the course homepage certificate link. Then selecting the view certificates link in the upper right corner.  This will present a list of certificates, showing student name, grade, and code.   &lt;br /&gt;
If the certificate administration edit settings was set to save, they can download a copy of the certificate for a students.   &lt;br /&gt;
&lt;br /&gt;
This page also allows an option of downloading the report in 1 of 3 formats.&lt;br /&gt;
&lt;br /&gt;
==Site wide reports==&lt;br /&gt;
A version of site wide reports is available in 2.1.&lt;br /&gt;
*[http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=2505 Kaalgat updated Modules and plugins for 2.1].&lt;/div&gt;</summary>
		<author><name>Rcollman</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Certificate_reports&amp;diff=93927</id>
		<title>Certificate reports</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Certificate_reports&amp;diff=93927"/>
		<updated>2011-11-19T18:52:05Z</updated>

		<summary type="html">&lt;p&gt;Rcollman: /* Site wide reports */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Certificate}}&lt;br /&gt;
A teacher can view and download a report of all certificates issued in their course.  &lt;br /&gt;
&lt;br /&gt;
==View and download certificate reports==&lt;br /&gt;
{{Update}}&lt;br /&gt;
The teacher can see a list of all certificates by clicking on the course homepage certificate link. Then selecting the view certificates link in the upper right corner.  This will present a list of certificates, showing student name, grade, and code.   &lt;br /&gt;
If the certificate administration edit settings was set to save, they can download a copy of the certificate for a students.   &lt;br /&gt;
&lt;br /&gt;
This page also allows an option of downloading the report in 1 of 3 formates.&lt;br /&gt;
==Site wide reports==&lt;br /&gt;
A version of site wide reports is available in 2.1.&lt;br /&gt;
*[http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=2505 Kaalgat updated Modules and plugins for 2.1].&lt;/div&gt;</summary>
		<author><name>Rcollman</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Certificate_reports&amp;diff=93926</id>
		<title>Certificate reports</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Certificate_reports&amp;diff=93926"/>
		<updated>2011-11-19T18:51:35Z</updated>

		<summary type="html">&lt;p&gt;Rcollman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Certificate}}&lt;br /&gt;
A teacher can view and download a report of all certificates issued in their course.  &lt;br /&gt;
&lt;br /&gt;
==View and download certificate reports==&lt;br /&gt;
{{Update}}&lt;br /&gt;
The teacher can see a list of all certificates by clicking on the course homepage certificate link. Then selecting the view certificates link in the upper right corner.  This will present a list of certificates, showing student name, grade, and code.   &lt;br /&gt;
If the certificate administration edit settings was set to save, they can download a copy of the certificate for a students.   &lt;br /&gt;
&lt;br /&gt;
This page also allows an option of downloading the report in 1 of 3 formates.&lt;br /&gt;
==Site wide reports==&lt;br /&gt;
A version of site wide reports is aavailable in 2.1.&lt;br /&gt;
*[http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=2505 Kaalgat updated Modules and plugins].&lt;/div&gt;</summary>
		<author><name>Rcollman</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Certificate_reports&amp;diff=93925</id>
		<title>Certificate reports</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Certificate_reports&amp;diff=93925"/>
		<updated>2011-11-19T18:48:02Z</updated>

		<summary type="html">&lt;p&gt;Rcollman: /* Site wide reports */ post link for 2.1 version&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Certificate}}&lt;br /&gt;
A teacher can view and download a report of all certificates issued in their course.  &lt;br /&gt;
&lt;br /&gt;
==View and download certificate reports==&lt;br /&gt;
{{Update}}&lt;br /&gt;
The teacher can see a list of all certificates by clicking on the course homepage certificate link. Then selecting the view certificates link in the upper right corner.  This will present a list of certificates, showing student name, grade, and code.   &lt;br /&gt;
If the certificate administration edit settings was set to save, they can download a copy of the certificate for a students.   &lt;br /&gt;
&lt;br /&gt;
This page also allows an option of downloading the report in 1 of 3 formates.&lt;br /&gt;
==Site wide reports==&lt;br /&gt;
A version of site wide reports is aavailable in 2.1.&lt;br /&gt;
*[http://www.KindleeBooksLibrary.com/report_my_certificates_2_1.zip Kaalgat provided this link] in the Certificate forum.&lt;br /&gt;
&lt;br /&gt;
:In 1.9.x versions there was an optional block that provided a link to a report visible to administrators and students. Students could see of all their certificates on the site. Administrators (or those who have the capability of viewing site reports) will see a link on the Certificate Report page to view/download a report of all students&#039; received certificates.&lt;/div&gt;</summary>
		<author><name>Rcollman</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Talk:Cron&amp;diff=93924</id>
		<title>Talk:Cron</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Talk:Cron&amp;diff=93924"/>
		<updated>2011-11-19T16:36:18Z</updated>

		<summary type="html">&lt;p&gt;Rcollman: Reminder to change MoodleDocs 2.0 as well&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Comment from Eloy:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;If there is some template to mark one page as &amp;quot;require some love&amp;quot; I&#039;d say https://docs.moodle.org/en/Cron requires it. It talks 99% of the time to use web-browser cron. Only 1 line talks about cli cron.&amp;quot; --[[User:Helen Foster|Helen Foster]] 20:44, 9 November 2011 (WST)&lt;br /&gt;
:I just noticed this comment. Cron is not one of my special areas of knowledge but obviously use it. Did a quick &amp;quot;Cron CLI&amp;quot; on the web and got lost in how to program a php file to run cron jobs.   Saw the note about 2.0 and CLI on this page.   &lt;br /&gt;
&lt;br /&gt;
I think Eloy&#039;s comment is also saying that this page is too long and could be split up? For example use a navtrail and a Cron template.  Proposed pages:&lt;br /&gt;
*Cron page - Overview section   &lt;br /&gt;
*[[Cron with Windows OS]] page - move section.&lt;br /&gt;
*[[Cron with MAC OS X]] page - move section&lt;br /&gt;
*[[Cron with web hosting services]] page - move section&lt;br /&gt;
*[[Cron with UNIX]] page - move section&lt;br /&gt;
*[[Cron reports]]&lt;br /&gt;
*[[Cron settings]]&lt;br /&gt;
Comments? --[[User:chris collman|chris collman]] 23:25, 12 November 2011 (WST)&lt;br /&gt;
&lt;br /&gt;
Notice that I am using the phrase &amp;quot;the Moodle cron process&amp;quot;. As I understand it, this process can be triggered via admin/cron.php  OR via a cron service at admin/cli/cron.php. Frankly, I am not sure how lib/cronlib.php  works with either of these trigeer points but I don&#039;t think that is important for the site admin.  The old cron page refered to cron.php with the assumption that it was in admin.   To avoid confusion for a new user, I decided to call it a Moodle cron process.--[[User:chris collman|chris collman]] 23:57, 19 November 2011 (WST)&lt;br /&gt;
&lt;br /&gt;
==Will create change on this page later==&lt;br /&gt;
Not hearing any immediate response to my proposals, I will wait a few days before I change things.  I will go back and change the 2.0 Docs as well--[[User:chris collman|chris collman]] 22:58, 17 November 2011 (WST)&lt;br /&gt;
&lt;br /&gt;
::&#039;&#039;&#039;DRAFT OF NEW CRON PAGE STARTS HERE&#039;&#039;&#039; (will remove later)&lt;br /&gt;
&#039;&#039;&#039;Change Moodle 2.0 Docs as well&#039;&#039;&#039;&lt;br /&gt;
Cron is the name of a Unix program that runs predefined tasks on a computer at regular intervals. The cron process in Moodle assists some modules to perform tasks on a scheduled basis. For example, the cron process might tell Moodle to check all discussion forums so it can mail out copies of new posts to people who have subscribed to that forum. &lt;br /&gt;
&lt;br /&gt;
The Moodle cron process can not tell itself to run.  It is a best practice to set up a cron service either on the hosting web server, another server or on another computer that will tell the Moodle cron process to run. &lt;br /&gt;
 &lt;br /&gt;
*[[Cron reports]] - Examples of reports shown after admin/cron.php was triggered&lt;br /&gt;
*[[Cron settings]] - Moodle cron process password and CLI settings&lt;br /&gt;
*[[Cron with Windows OS]] - Cron services in Windows&lt;br /&gt;
*[[Cron with MAC OS X]]- Cron services in a MAC environment&lt;br /&gt;
*[[Cron with web hosting services]]- Cron services in various web hosting examples.&lt;br /&gt;
*[[Cron with UNIX]]- Cron services on various UNIX and Linux flavored operating systems.&lt;br /&gt;
&lt;br /&gt;
:Note: Asking a human to use their browser to run the Moodle cron process every five or ten minutes,or when anybody on the site thinks it needs to be run is not a best practice.   The outside cron service provides a &amp;quot;heartbeat&amp;quot; so that the Moodle cron process can perform functions at periods defined for each module that needs it.&lt;br /&gt;
&lt;br /&gt;
==Starting cron==&lt;br /&gt;
There are a number of way to invoke Moodle cron process. Cron can be started from the address bar in a browser (For example http:demo.moodle.net/admin/cron.php), via a [[Daemon]], or wq1et, curl or some other form of a cron service. &lt;br /&gt;
&lt;br /&gt;
===Cron service location and timing===&lt;br /&gt;
Note that the machine providing the cron service  &#039;&#039;&#039;does not need to be the same machine that is running Moodle&#039;&#039;&#039;. For example, if you have a limited web hosting service that does not have a cron service, then you might choose to run cron on another server or on your home computer. All that matters is that the Moodle cron process is run on a regular basis.&lt;br /&gt;
&lt;br /&gt;
The load of the Moodle cron process on the Moodle server is not very high, so 5 minutes is usually reasonable.  However if you&#039;re worried about it you can reduce the time period to something like 15 minutes or even 30 minutes. &lt;br /&gt;
:It&#039;s best not to make the time period too long.  For example delaying mail-outs can slow down activity within the course and create a large mail outbox to process.  Or student want to see their activity and course completions updated quickly.  &lt;br /&gt;
&lt;br /&gt;
===Testing cron and manual trigger===&lt;br /&gt;
On a new Moodle install or upgrade, it is a good idea to test the Moodle cron process directly from your browser: &#039;&#039;&amp;lt;nowiki&amp;gt;http://example.com/moodle/admin/cron.php&amp;lt;/nowiki&amp;gt;&#039;&#039;  (See [[Cron settings]] if this does not work).&lt;br /&gt;
&lt;br /&gt;
Next, you need to set up a way to manage an automatic scheduled process to run the script on a regular basis. This will depend upon the operating system and program you select.&lt;br /&gt;
&lt;br /&gt;
:Note: When the Moodle cron process is called from cron service, &#039;the command line&#039; trigger creates a temporary admin environment (similar to a login) in order to run and then deletes that environment. You can disable command line running of cron by disabling the appropriate section in the cron.php file.&lt;br /&gt;
&lt;br /&gt;
==Moodle cron process ==&lt;br /&gt;
The Moodle cron process basically finds and determines if certain functions need to run. These functions are defined in code associated with specific activities and processes. Usually the function looks for new activity that has occurred since cron was last run.  Some of the functions may use a timestamp to determine if they should look for new activity. A few functions are run on a random basis.  &lt;br /&gt;
&lt;br /&gt;
===Examples of Moodle cron processes==&lt;br /&gt;
Moodle&#039;s cron processes include:&lt;br /&gt;
*updating reports such as quiz, admin, gradebook &lt;br /&gt;
*updating course and activity completion (if enabled in advanced settings)&lt;br /&gt;
*updating portfolio&lt;br /&gt;
*plagiarism checks &lt;br /&gt;
*updates activity modules. It looks through the mod directory for lib.php files that contain the function activity-name_cron and will call it. In a standard install this includes assignment, chat, forum, and SCROM.&lt;br /&gt;
*updates blocks.  It looks for blocks for their cron methods (object functions) to be run.  It then, for each such block, runs the cron method for a new object associated with that block (for more details read admin/cron.php). These files (the lib.php files and the files where the block classes are defined) can contain cleanup functions, email functions or anything that needs to be run on a regular basis. &lt;br /&gt;
*create the backups of courses at the time specified in the administration settings. &lt;br /&gt;
*updating messaging module or forum email notifications.&lt;br /&gt;
*unenroll students - this is done on a random basis about 20% of the time Moodle&#039;s cron process is triggered.&lt;br /&gt;
*deleting users who have not filled out their profile via the 20% random trigger&lt;br /&gt;
*deleting old logs are also checked 20% of the time via the 20% random trigger&lt;br /&gt;
*deletes old cached text&lt;br /&gt;
*generates new passwords for new users and notifies users&lt;br /&gt;
*runs authentication enrolments processes&lt;br /&gt;
*updates stats if enabled.&lt;br /&gt;
*runs blog cleanups&lt;br /&gt;
*updates registrations&lt;br /&gt;
&lt;br /&gt;
The code in lib/cronlib.php shows the places that are being checked when the admin/cron.php is run and the report which is displayed on the screen after it has run.  As mentioned elsewhere admin/cli/cron.php is the file which outside cron services run to trigger the Moodle cron process.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
Using Moodle forum discussions:&#039;&#039;&#039;No wiki start&#039;&#039;&#039;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=41827 Cron - can someone give me a quick confirmation of function?]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=97684 Cronjob Question]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=97457 Slow cron : avoiding simultaneous cron]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=117168 Visibility of cron.php]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=139263#p609060 How to log the output of a Scheduled Task on Windows] - this discussion explains a nice trick that can be very useful when you are experiencing problems with your Windows Scheduled Task and you need to log the output of the Scheduled Task to a log file.&lt;br /&gt;
&lt;br /&gt;
[[es:Cron]]&lt;br /&gt;
[[fr:Cron]]&lt;br /&gt;
[[nl:Cron]]&lt;br /&gt;
[[sk:Cron]]&lt;br /&gt;
[[pl:Cron]]&lt;br /&gt;
[[ja:Cron]]&amp;lt;/nowiki&amp;gt;&#039;&#039;&#039;No wiki end&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
::&#039;&#039;&#039;END OF DRAFT PAGE HERE&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Rcollman</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Talk:Unenrolment&amp;diff=93923</id>
		<title>Talk:Unenrolment</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Talk:Unenrolment&amp;diff=93923"/>
		<updated>2011-11-19T16:33:55Z</updated>

		<summary type="html">&lt;p&gt;Rcollman: Still not sure if it really deletes all user data&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page should probably also have information for users on what happens to the data for users who are unenrolled, as well as if they are accidentally unenrolled what data is preserved upon re-enrollment. --[[User:Mary Parke|Mary Parke]] 05:04, 18 November 2011 (WST)&lt;br /&gt;
:Good point.  In my 2.1 servers, I have not unenrolled anyone yet. I just unenrolled Maree Anderson from the demo.moodle Water course. She had grades, they went away when I re-enrolled her. I ran cron.php after I unenrolled her.  I looked in course and site admin settings and did not see anything about ways to prevent loss of data.  I did not go to the MySQL database and see how good a cleanup job Moodle did on the db.  I am uneasy writing anything on the basis of a one time demo.moodle test :)   --[[User:chris collman|chris collman]] 00:33, 20 November 2011 (WST)&lt;/div&gt;</summary>
		<author><name>Rcollman</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Talk:Unenrolment&amp;diff=93922</id>
		<title>Talk:Unenrolment</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Talk:Unenrolment&amp;diff=93922"/>
		<updated>2011-11-19T16:24:42Z</updated>

		<summary type="html">&lt;p&gt;Rcollman: Still a good point&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page should probably also have information for users on what happens to the data for users who are unenrolled, as well as if they are accidentally unenrolled what data is preserved upon re-enrollment. --[[User:Mary Parke|Mary Parke]] 05:04, 18 November 2011 (WST)&lt;br /&gt;
:Good point.  In my 2.1 servers, I have not unenrolled anyone yet. I just unenrolled Maree Anderson from the demo.moodle Water course. She had grades, they went away when I re-enrolled her.   Wonder if there is a setting to prevent this. --[[User:chris collman|chris collman]] 00:24, 20 November 2011 (WST)--[[User:chris collman|chris collman]] 00:18, 20 November 2011 (WST)&lt;/div&gt;</summary>
		<author><name>Rcollman</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Talk:Unenrolment&amp;diff=93921</id>
		<title>Talk:Unenrolment</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Talk:Unenrolment&amp;diff=93921"/>
		<updated>2011-11-19T16:18:15Z</updated>

		<summary type="html">&lt;p&gt;Rcollman: good point, want o write a section in this page?&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page should probably also have information for users on what happens to the data for users who are unenrolled, as well as if they are accidentally unenrolled what data is preserved upon re-enrollment. --[[User:Mary Parke|Mary Parke]] 05:04, 18 November 2011 (WST)&lt;br /&gt;
:Good point.  In my 2.1 servers, I have not unenrolled anyone yet. As I recall in pre 2.x, the data never went away.  If you re-enrolled someone, they were back in as if they never left.  Which was an issue for some sites that wanted to do things like yearly training. --[[User:chris collman|chris collman]] 00:18, 20 November 2011 (WST)&lt;/div&gt;</summary>
		<author><name>Rcollman</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Talk:Cron&amp;diff=93920</id>
		<title>Talk:Cron</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Talk:Cron&amp;diff=93920"/>
		<updated>2011-11-19T15:57:34Z</updated>

		<summary type="html">&lt;p&gt;Rcollman: Stll needs review by cron &amp;quot;expert:&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Comment from Eloy:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;If there is some template to mark one page as &amp;quot;require some love&amp;quot; I&#039;d say https://docs.moodle.org/en/Cron requires it. It talks 99% of the time to use web-browser cron. Only 1 line talks about cli cron.&amp;quot; --[[User:Helen Foster|Helen Foster]] 20:44, 9 November 2011 (WST)&lt;br /&gt;
:I just noticed this comment. Cron is not one of my special areas of knowledge but obviously use it. Did a quick &amp;quot;Cron CLI&amp;quot; on the web and got lost in how to program a php file to run cron jobs.   Saw the note about 2.0 and CLI on this page.   &lt;br /&gt;
&lt;br /&gt;
I think Eloy&#039;s comment is also saying that this page is too long and could be split up? For example use a navtrail and a Cron template.  Proposed pages:&lt;br /&gt;
*Cron page - Overview section   &lt;br /&gt;
*[[Cron with Windows OS]] page - move section.&lt;br /&gt;
*[[Cron with MAC OS X]] page - move section&lt;br /&gt;
*[[Cron with web hosting services]] page - move section&lt;br /&gt;
*[[Cron with UNIX]] page - move section&lt;br /&gt;
*[[Cron reports]]&lt;br /&gt;
*[[Cron settings]]&lt;br /&gt;
Comments? --[[User:chris collman|chris collman]] 23:25, 12 November 2011 (WST)&lt;br /&gt;
&lt;br /&gt;
Notice that I am using the phrase &amp;quot;the Moodle cron process&amp;quot;. As I understand it, this process can be triggered via admin/cron.php  OR via a cron service at admin/cli/cron.php. Frankly, I am not sure how lib/cronlib.php  works with either of these trigeer points but I don&#039;t think that is important for the site admin.  The old cron page refered to cron.php with the assumption that it was in admin.   To avoid confusion for a new user, I decided to call it a Moodle cron process.--[[User:chris collman|chris collman]] 23:57, 19 November 2011 (WST)&lt;br /&gt;
&lt;br /&gt;
==Will create change on this page later==&lt;br /&gt;
Not hearing any immediate response to my proposals, I will wait a few days before I change things--[[User:chris collman|chris collman]] 22:58, 17 November 2011 (WST)&lt;br /&gt;
&lt;br /&gt;
::&#039;&#039;&#039;DRAFT OF NEW CRON PAGE STARTS HERE&#039;&#039;&#039; (will remove later)&lt;br /&gt;
Cron is the name of a Unix program that runs predefined tasks on a computer at regular intervals. The cron process in Moodle assists some modules to perform tasks on a scheduled basis. For example, the cron process might tell Moodle to check all discussion forums so it can mail out copies of new posts to people who have subscribed to that forum. &lt;br /&gt;
&lt;br /&gt;
The Moodle cron process can not tell itself to run.  It is a best practice to set up a cron service either on the hosting web server, another server or on another computer that will tell the Moodle cron process to run. &lt;br /&gt;
 &lt;br /&gt;
*[[Cron reports]] - Examples of reports shown after admin/cron.php was triggered&lt;br /&gt;
*[[Cron settings]] - Moodle cron process password and CLI settings&lt;br /&gt;
*[[Cron with Windows OS]] - Cron services in Windows&lt;br /&gt;
*[[Cron with MAC OS X]]- Cron services in a MAC environment&lt;br /&gt;
*[[Cron with web hosting services]]- Cron services in various web hosting examples.&lt;br /&gt;
*[[Cron with UNIX]]- Cron services on various UNIX and Linux flavored operating systems.&lt;br /&gt;
&lt;br /&gt;
:Note: Asking a human to use their browser to run the Moodle cron process every five or ten minutes,or when anybody on the site thinks it needs to be run is not a best practice.   The outside cron service provides a &amp;quot;heartbeat&amp;quot; so that the Moodle cron process can perform functions at periods defined for each module that needs it.&lt;br /&gt;
&lt;br /&gt;
==Starting cron==&lt;br /&gt;
There are a number of way to invoke Moodle cron process. Cron can be started from the address bar in a browser (For example http:demo.moodle.net/admin/cron.php), via a [[Daemon]], or wq1et, curl or some other form of a cron service. &lt;br /&gt;
&lt;br /&gt;
===Cron service location and timing===&lt;br /&gt;
Note that the machine providing the cron service  &#039;&#039;&#039;does not need to be the same machine that is running Moodle&#039;&#039;&#039;. For example, if you have a limited web hosting service that does not have a cron service, then you might choose to run cron on another server or on your home computer. All that matters is that the Moodle cron process is run on a regular basis.&lt;br /&gt;
&lt;br /&gt;
The load of the Moodle cron process on the Moodle server is not very high, so 5 minutes is usually reasonable.  However if you&#039;re worried about it you can reduce the time period to something like 15 minutes or even 30 minutes. &lt;br /&gt;
:It&#039;s best not to make the time period too long.  For example delaying mail-outs can slow down activity within the course and create a large mail outbox to process.  Or student want to see their activity and course completions updated quickly.  &lt;br /&gt;
&lt;br /&gt;
===Testing cron and manual trigger===&lt;br /&gt;
On a new Moodle install or upgrade, it is a good idea to test the Moodle cron process directly from your browser: &#039;&#039;&amp;lt;nowiki&amp;gt;http://example.com/moodle/admin/cron.php&amp;lt;/nowiki&amp;gt;&#039;&#039;  (See [[Cron settings]] if this does not work).&lt;br /&gt;
&lt;br /&gt;
Next, you need to set up a way to manage an automatic scheduled process to run the script on a regular basis. This will depend upon the operating system and program you select.&lt;br /&gt;
&lt;br /&gt;
:Note: When the Moodle cron process is called from cron service, &#039;the command line&#039; trigger creates a temporary admin environment (similar to a login) in order to run and then deletes that environment. You can disable command line running of cron by disabling the appropriate section in the cron.php file.&lt;br /&gt;
&lt;br /&gt;
==Moodle cron process ==&lt;br /&gt;
The Moodle cron process basically finds and determines if certain functions need to run. These functions are defined in code associated with specific activities and processes. Usually the function looks for new activity that has occurred since cron was last run.  Some of the functions may use a timestamp to determine if they should look for new activity. A few functions are run on a random basis.  &lt;br /&gt;
&lt;br /&gt;
===Examples of Moodle cron processes==&lt;br /&gt;
Moodle&#039;s cron processes include:&lt;br /&gt;
*updating reports such as quiz, admin, gradebook &lt;br /&gt;
*updating course and activity completion (if enabled in advanced settings)&lt;br /&gt;
*updating portfolio&lt;br /&gt;
*plagiarism checks &lt;br /&gt;
*updates activity modules. It looks through the mod directory for lib.php files that contain the function activity-name_cron and will call it. In a standard install this includes assignment, chat, forum, and SCROM.&lt;br /&gt;
*updates blocks.  It looks for blocks for their cron methods (object functions) to be run.  It then, for each such block, runs the cron method for a new object associated with that block (for more details read admin/cron.php). These files (the lib.php files and the files where the block classes are defined) can contain cleanup functions, email functions or anything that needs to be run on a regular basis. &lt;br /&gt;
*create the backups of courses at the time specified in the administration settings. &lt;br /&gt;
*updating messaging module or forum email notifications.&lt;br /&gt;
*unenroll students - this is done on a random basis about 20% of the time Moodle&#039;s cron process is triggered.&lt;br /&gt;
*deleting users who have not filled out their profile via the 20% random trigger&lt;br /&gt;
*deleting old logs are also checked 20% of the time via the 20% random trigger&lt;br /&gt;
*deletes old cached text&lt;br /&gt;
*generates new passwords for new users and notifies users&lt;br /&gt;
*runs authentication enrolments processes&lt;br /&gt;
*updates stats if enabled.&lt;br /&gt;
*runs blog cleanups&lt;br /&gt;
*updates registrations&lt;br /&gt;
&lt;br /&gt;
The code in lib/cronlib.php shows the places that are being checked when the admin/cron.php is run and the report which is displayed on the screen after it has run.  As mentioned elsewhere admin/cli/cron.php is the file which outside cron services run to trigger the Moodle cron process.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
Using Moodle forum discussions:&#039;&#039;&#039;No wiki start&#039;&#039;&#039;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=41827 Cron - can someone give me a quick confirmation of function?]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=97684 Cronjob Question]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=97457 Slow cron : avoiding simultaneous cron]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=117168 Visibility of cron.php]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=139263#p609060 How to log the output of a Scheduled Task on Windows] - this discussion explains a nice trick that can be very useful when you are experiencing problems with your Windows Scheduled Task and you need to log the output of the Scheduled Task to a log file.&lt;br /&gt;
&lt;br /&gt;
[[es:Cron]]&lt;br /&gt;
[[fr:Cron]]&lt;br /&gt;
[[nl:Cron]]&lt;br /&gt;
[[sk:Cron]]&lt;br /&gt;
[[pl:Cron]]&lt;br /&gt;
[[ja:Cron]]&amp;lt;/nowiki&amp;gt;&#039;&#039;&#039;No wiki end&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
::&#039;&#039;&#039;END OF DRAFT PAGE HERE&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Rcollman</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Talk:Cron&amp;diff=93918</id>
		<title>Talk:Cron</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Talk:Cron&amp;diff=93918"/>
		<updated>2011-11-19T15:49:21Z</updated>

		<summary type="html">&lt;p&gt;Rcollman: /* Starting cron */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Comment from Eloy:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;If there is some template to mark one page as &amp;quot;require some love&amp;quot; I&#039;d say https://docs.moodle.org/en/Cron requires it. It talks 99% of the time to use web-browser cron. Only 1 line talks about cli cron.&amp;quot; --[[User:Helen Foster|Helen Foster]] 20:44, 9 November 2011 (WST)&lt;br /&gt;
:I just noticed this comment. Cron is not one of my special areas of knowledge but obviously use it. Did a quick &amp;quot;Cron CLI&amp;quot; on the web and got lost in how to program a php file to run cron jobs.   Saw the note about 2.0 and CLI on this page.   &lt;br /&gt;
&lt;br /&gt;
I think Eloy&#039;s comment is also saying that this page is too long and could be split up? For example use a navtrail and a Cron template.  Proposed pages:&lt;br /&gt;
*Cron page - Overview section   &lt;br /&gt;
*[[Cron with Windows OS]] page - move section.&lt;br /&gt;
*[[Cron with MAC OS X]] page - move section&lt;br /&gt;
*[[Cron with web hosting services]] page - move section&lt;br /&gt;
*[[Cron with UNIX]] page - move section&lt;br /&gt;
*[[Cron reports]]&lt;br /&gt;
*[[Cron settings]]&lt;br /&gt;
Comments? --[[User:chris collman|chris collman]] 23:25, 12 November 2011 (WST)&lt;br /&gt;
&lt;br /&gt;
==Will create change on this page later==&lt;br /&gt;
Not hearing any immediate response to my proposals, I will wait a few days before I change things--[[User:chris collman|chris collman]] 22:58, 17 November 2011 (WST)&lt;br /&gt;
&lt;br /&gt;
Seems excessive to create a Cron settings page but why not, that is consistent with other functions --[[User:chris collman|chris collman]] 22:02, 19 November 2011 (WST)&lt;br /&gt;
&lt;br /&gt;
::&#039;&#039;&#039;DRAFT OF NEW CRON PAGE STARTS HERE&#039;&#039;&#039; (will remove later)&lt;br /&gt;
Cron is the name of a Unix program that runs predefined tasks on a computer at regular intervals. The cron process in Moodle assists some modules to perform tasks on a scheduled basis. For example, the cron process might tell Moodle to check all discussion forums so it can mail out copies of new posts to people who have subscribed to that forum. &lt;br /&gt;
&lt;br /&gt;
The Moodle cron process can not tell itself to run.  It is a best practice to set up a cron service either on the hosting web server, another server or on another computer that will tell the Moodle cron process to run. &lt;br /&gt;
 &lt;br /&gt;
*[[Cron reports]] - Examples of reports shown after admin/cron.php was triggered&lt;br /&gt;
*[[Cron settings]] - Moodle cron process password and CLI settings&lt;br /&gt;
*[[Cron with Windows OS]] - Cron services in Windows&lt;br /&gt;
*[[Cron with MAC OS X]]- Cron services in a MAC environment&lt;br /&gt;
*[[Cron with web hosting services]]- Cron services in various web hosting examples.&lt;br /&gt;
*[[Cron with UNIX]]- Cron services on various UNIX and Linux flavored operating systems.&lt;br /&gt;
&lt;br /&gt;
:Note: Asking a human to use their browser to run the Moodle cron process every five or ten minutes,or when anybody on the site thinks it needs to be run is not a best practice.   The outside cron service provides a &amp;quot;heartbeat&amp;quot; so that the Moodle cron process can perform functions at periods defined for each module that needs it.&lt;br /&gt;
&lt;br /&gt;
==Starting cron==&lt;br /&gt;
There are a number of way to invoke Moodle cron process. Cron can be started from the address bar in a browser (For example http:demo.moodle.net/admin/cron.php), via a [[Daemon]], or wq1et, curl or some other form of a cron service. &lt;br /&gt;
&lt;br /&gt;
===Cron service location and timing===&lt;br /&gt;
Note that the machine providing the cron service  &#039;&#039;&#039;does not need to be the same machine that is running Moodle&#039;&#039;&#039;. For example, if you have a limited web hosting service that does not have a cron service, then you might choose to run cron on another server or on your home computer. All that matters is that the Moodle cron process is run on a regular basis.&lt;br /&gt;
&lt;br /&gt;
The load of the Moodle cron process on the Moodle server is not very high, so 5 minutes is usually reasonable.  However if you&#039;re worried about it you can reduce the time period to something like 15 minutes or even 30 minutes. &lt;br /&gt;
:It&#039;s best not to make the time period too long.  For example delaying mail-outs can slow down activity within the course and create a large mail outbox to process.  Or student want to see their activity and course completions updated quickly.  &lt;br /&gt;
&lt;br /&gt;
===Testing cron and manual trigger===&lt;br /&gt;
On a new Moodle install or upgrade, it is a good idea to test the Moodle cron process directly from your browser: &#039;&#039;&amp;lt;nowiki&amp;gt;http://example.com/moodle/admin/cron.php&amp;lt;/nowiki&amp;gt;&#039;&#039;  (See [[Cron settings]] if this does not work).&lt;br /&gt;
&lt;br /&gt;
Next, you need to set up a way to manage an automatic scheduled process to run the script on a regular basis. This will depend upon the operating system and program you select.&lt;br /&gt;
&lt;br /&gt;
:Note: When the Moodle cron process is called from cron service, &#039;the command line&#039; trigger creates a temporary admin environment (similar to a login) in order to run and then deletes that environment. You can disable command line running of cron by disabling the appropriate section in the cron.php file.&lt;br /&gt;
&lt;br /&gt;
==Moodle cron process ==&lt;br /&gt;
The Moodle cron process basically finds and determines if certain functions need to run. These functions are defined in code associated with specific activities and processes. Usually the function looks for new activity that has occurred since cron was last run.  Some of the functions may use a timestamp to determine if they should look for new activity. A few functions are run on a random basis.  &lt;br /&gt;
&lt;br /&gt;
===Examples of Moodle cron processes==&lt;br /&gt;
Moodle&#039;s cron processes include:&lt;br /&gt;
*updating reports such as quiz, admin, gradebook &lt;br /&gt;
*updating course and activity completion (if enabled in advanced settings)&lt;br /&gt;
*updating portfolio&lt;br /&gt;
*plagiarism checks &lt;br /&gt;
*updates activity modules. It looks through the mod directory for lib.php files that contain the function activity-name_cron and will call it. In a standard install this includes assignment, chat, forum, and SCROM.&lt;br /&gt;
*updates blocks.  It looks for blocks for their cron methods (object functions) to be run.  It then, for each such block, runs the cron method for a new object associated with that block (for more details read admin/cron.php). These files (the lib.php files and the files where the block classes are defined) can contain cleanup functions, email functions or anything that needs to be run on a regular basis. &lt;br /&gt;
*create the backups of courses at the time specified in the administration settings. &lt;br /&gt;
*updating messaging module or forum email notifications.&lt;br /&gt;
*unenroll students - this is done on a random basis about 20% of the time Moodle&#039;s cron process is triggered.&lt;br /&gt;
*deleting users who have not filled out their profile via the 20% random trigger&lt;br /&gt;
*deleting old logs are also checked 20% of the time via the 20% random trigger&lt;br /&gt;
*deletes old cached text&lt;br /&gt;
*generates new passwords for new users and notifies users&lt;br /&gt;
*runs authentication enrolments processes&lt;br /&gt;
*updates stats if enabled.&lt;br /&gt;
*runs blog cleanups&lt;br /&gt;
*updates registrations&lt;br /&gt;
&lt;br /&gt;
The code in lib/cronlib.php shows the places that are being checked when the admin/cron.php is run and the report which is displayed on the screen after it has run.  As mentioned elsewhere admin/cli/cron.php is the file which outside cron services run to trigger the Moodle cron process.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
Using Moodle forum discussions:&#039;&#039;&#039;No wiki start&#039;&#039;&#039;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=41827 Cron - can someone give me a quick confirmation of function?]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=97684 Cronjob Question]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=97457 Slow cron : avoiding simultaneous cron]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=117168 Visibility of cron.php]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=139263#p609060 How to log the output of a Scheduled Task on Windows] - this discussion explains a nice trick that can be very useful when you are experiencing problems with your Windows Scheduled Task and you need to log the output of the Scheduled Task to a log file.&lt;br /&gt;
&lt;br /&gt;
[[es:Cron]]&lt;br /&gt;
[[fr:Cron]]&lt;br /&gt;
[[nl:Cron]]&lt;br /&gt;
[[sk:Cron]]&lt;br /&gt;
[[pl:Cron]]&lt;br /&gt;
[[ja:Cron]]&amp;lt;/nowiki&amp;gt;&#039;&#039;&#039;No wiki end&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
::&#039;&#039;&#039;END OF DRAFT PAGE HERE&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Rcollman</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Talk:Cron&amp;diff=93917</id>
		<title>Talk:Cron</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Talk:Cron&amp;diff=93917"/>
		<updated>2011-11-19T15:46:52Z</updated>

		<summary type="html">&lt;p&gt;Rcollman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Comment from Eloy:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;If there is some template to mark one page as &amp;quot;require some love&amp;quot; I&#039;d say https://docs.moodle.org/en/Cron requires it. It talks 99% of the time to use web-browser cron. Only 1 line talks about cli cron.&amp;quot; --[[User:Helen Foster|Helen Foster]] 20:44, 9 November 2011 (WST)&lt;br /&gt;
:I just noticed this comment. Cron is not one of my special areas of knowledge but obviously use it. Did a quick &amp;quot;Cron CLI&amp;quot; on the web and got lost in how to program a php file to run cron jobs.   Saw the note about 2.0 and CLI on this page.   &lt;br /&gt;
&lt;br /&gt;
I think Eloy&#039;s comment is also saying that this page is too long and could be split up? For example use a navtrail and a Cron template.  Proposed pages:&lt;br /&gt;
*Cron page - Overview section   &lt;br /&gt;
*[[Cron with Windows OS]] page - move section.&lt;br /&gt;
*[[Cron with MAC OS X]] page - move section&lt;br /&gt;
*[[Cron with web hosting services]] page - move section&lt;br /&gt;
*[[Cron with UNIX]] page - move section&lt;br /&gt;
*[[Cron reports]]&lt;br /&gt;
*[[Cron settings]]&lt;br /&gt;
Comments? --[[User:chris collman|chris collman]] 23:25, 12 November 2011 (WST)&lt;br /&gt;
&lt;br /&gt;
==Will create change on this page later==&lt;br /&gt;
Not hearing any immediate response to my proposals, I will wait a few days before I change things--[[User:chris collman|chris collman]] 22:58, 17 November 2011 (WST)&lt;br /&gt;
&lt;br /&gt;
Seems excessive to create a Cron settings page but why not, that is consistent with other functions --[[User:chris collman|chris collman]] 22:02, 19 November 2011 (WST)&lt;br /&gt;
&lt;br /&gt;
::&#039;&#039;&#039;DRAFT OF NEW CRON PAGE STARTS HERE&#039;&#039;&#039; (will remove later)&lt;br /&gt;
Cron is the name of a Unix program that runs predefined tasks on a computer at regular intervals. The cron process in Moodle assists some modules to perform tasks on a scheduled basis. For example, the cron process might tell Moodle to check all discussion forums so it can mail out copies of new posts to people who have subscribed to that forum. &lt;br /&gt;
&lt;br /&gt;
The Moodle cron process can not tell itself to run.  It is a best practice to set up a cron service either on the hosting web server, another server or on another computer that will tell the Moodle cron process to run. &lt;br /&gt;
 &lt;br /&gt;
*[[Cron reports]] - Examples of reports shown after admin/cron.php was triggered&lt;br /&gt;
*[[Cron settings]] - Moodle cron process password and CLI settings&lt;br /&gt;
*[[Cron with Windows OS]] - Cron services in Windows&lt;br /&gt;
*[[Cron with MAC OS X]]- Cron services in a MAC environment&lt;br /&gt;
*[[Cron with web hosting services]]- Cron services in various web hosting examples.&lt;br /&gt;
*[[Cron with UNIX]]- Cron services on various UNIX and Linux flavored operating systems.&lt;br /&gt;
&lt;br /&gt;
:Note: Asking a human to use their browser to run the Moodle cron process every five or ten minutes,or when anybody on the site thinks it needs to be run is not a best practice.   The outside cron service provides a &amp;quot;heartbeat&amp;quot; so that the Moodle cron process can perform functions at periods defined for each module that needs it.&lt;br /&gt;
&lt;br /&gt;
==Starting cron==&lt;br /&gt;
There are a number of way to invoke Moodle cron process. Cron can be started from the address bar in a browser (For example http:demo.moodle.net/admin/cron.php), via a [[Daemon]], or wq1et, curl or some other code.&lt;br /&gt;
&lt;br /&gt;
===Cron service location and timing===&lt;br /&gt;
Note that the machine providing the cron service  &#039;&#039;&#039;does not need to be the same machine that is running Moodle&#039;&#039;&#039;. For example, if you have a limited web hosting service that does not have a cron service, then you might choose to run cron on another server or on your home computer. All that matters is that the Moodle cron process is run on a regular basis.&lt;br /&gt;
&lt;br /&gt;
The load of the Moodle cron process on the Moodle server is not very high, so 5 minutes is usually reasonable.  However if you&#039;re worried about it you can reduce the time period to something like 15 minutes or even 30 minutes. &lt;br /&gt;
:It&#039;s best not to make the time period too long.  For example delaying mail-outs can slow down activity within the course and create a large mail outbox to process.  Or student want to see their activity and course completions updated quickly.  &lt;br /&gt;
&lt;br /&gt;
===Testing cron and manual trigger===&lt;br /&gt;
On a new Moodle install or upgrade, it is a good idea to test the Moodle cron process directly from your browser: &#039;&#039;&amp;lt;nowiki&amp;gt;http://example.com/moodle/admin/cron.php&amp;lt;/nowiki&amp;gt;&#039;&#039;  (See [[Cron settings]] if this does not work).&lt;br /&gt;
&lt;br /&gt;
Next, you need to set up a way to manage an automatic scheduled process to run the script on a regular basis. This will depend upon the operating system and program you select.&lt;br /&gt;
&lt;br /&gt;
:Note: When the Moodle cron process is called from cron service, &#039;the command line&#039; trigger creates a temporary admin environment (similar to a login) in order to run and then deletes that environment. You can disable command line running of cron by disabling the appropriate section in the cron.php file.&lt;br /&gt;
&lt;br /&gt;
==Moodle cron process ==&lt;br /&gt;
The Moodle cron process basically finds and determines if certain functions need to run. These functions are defined in code associated with specific activities and processes. Usually the function looks for new activity that has occurred since cron was last run.  Some of the functions may use a timestamp to determine if they should look for new activity. A few functions are run on a random basis.  &lt;br /&gt;
&lt;br /&gt;
===Examples of Moodle cron processes==&lt;br /&gt;
Moodle&#039;s cron processes include:&lt;br /&gt;
*updating reports such as quiz, admin, gradebook &lt;br /&gt;
*updating course and activity completion (if enabled in advanced settings)&lt;br /&gt;
*updating portfolio&lt;br /&gt;
*plagiarism checks &lt;br /&gt;
*updates activity modules. It looks through the mod directory for lib.php files that contain the function activity-name_cron and will call it. In a standard install this includes assignment, chat, forum, and SCROM.&lt;br /&gt;
*updates blocks.  It looks for blocks for their cron methods (object functions) to be run.  It then, for each such block, runs the cron method for a new object associated with that block (for more details read admin/cron.php). These files (the lib.php files and the files where the block classes are defined) can contain cleanup functions, email functions or anything that needs to be run on a regular basis. &lt;br /&gt;
*create the backups of courses at the time specified in the administration settings. &lt;br /&gt;
*updating messaging module or forum email notifications.&lt;br /&gt;
*unenroll students - this is done on a random basis about 20% of the time Moodle&#039;s cron process is triggered.&lt;br /&gt;
*deleting users who have not filled out their profile via the 20% random trigger&lt;br /&gt;
*deleting old logs are also checked 20% of the time via the 20% random trigger&lt;br /&gt;
*deletes old cached text&lt;br /&gt;
*generates new passwords for new users and notifies users&lt;br /&gt;
*runs authentication enrolments processes&lt;br /&gt;
*updates stats if enabled.&lt;br /&gt;
*runs blog cleanups&lt;br /&gt;
*updates registrations&lt;br /&gt;
&lt;br /&gt;
The code in lib/cronlib.php shows the places that are being checked when the admin/cron.php is run and the report which is displayed on the screen after it has run.  As mentioned elsewhere admin/cli/cron.php is the file which outside cron services run to trigger the Moodle cron process.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
Using Moodle forum discussions:&#039;&#039;&#039;No wiki start&#039;&#039;&#039;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=41827 Cron - can someone give me a quick confirmation of function?]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=97684 Cronjob Question]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=97457 Slow cron : avoiding simultaneous cron]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=117168 Visibility of cron.php]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=139263#p609060 How to log the output of a Scheduled Task on Windows] - this discussion explains a nice trick that can be very useful when you are experiencing problems with your Windows Scheduled Task and you need to log the output of the Scheduled Task to a log file.&lt;br /&gt;
&lt;br /&gt;
[[es:Cron]]&lt;br /&gt;
[[fr:Cron]]&lt;br /&gt;
[[nl:Cron]]&lt;br /&gt;
[[sk:Cron]]&lt;br /&gt;
[[pl:Cron]]&lt;br /&gt;
[[ja:Cron]]&amp;lt;/nowiki&amp;gt;&#039;&#039;&#039;No wiki end&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
::&#039;&#039;&#039;END OF DRAFT PAGE HERE&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Rcollman</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Talk:Cron&amp;diff=93916</id>
		<title>Talk:Cron</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Talk:Cron&amp;diff=93916"/>
		<updated>2011-11-19T15:35:56Z</updated>

		<summary type="html">&lt;p&gt;Rcollman: /* See also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Comment from Eloy:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;If there is some template to mark one page as &amp;quot;require some love&amp;quot; I&#039;d say https://docs.moodle.org/en/Cron requires it. It talks 99% of the time to use web-browser cron. Only 1 line talks about cli cron.&amp;quot; --[[User:Helen Foster|Helen Foster]] 20:44, 9 November 2011 (WST)&lt;br /&gt;
:I just noticed this comment. Cron is not one of my special areas of knowledge but obviously use it. Did a quick &amp;quot;Cron CLI&amp;quot; on the web and got lost in how to program a php file to run cron jobs.   Saw the note about 2.0 and CLI on this page.   &lt;br /&gt;
&lt;br /&gt;
I think Eloy&#039;s comment is also saying that this page is too long and could be split up? For example use a navtrail and a Cron template.  Proposed pages:&lt;br /&gt;
*Cron page - Overview section   &lt;br /&gt;
*[[Cron with Windows OS]] page - move section.&lt;br /&gt;
*[[Cron with MAC OS X]] page - move section&lt;br /&gt;
*[[Cron with web hosting services]] page - move section&lt;br /&gt;
*[[Cron with UNIX]] page - move section&lt;br /&gt;
*[[Cron reports]]&lt;br /&gt;
Comments? --[[User:chris collman|chris collman]] 23:25, 12 November 2011 (WST)&lt;br /&gt;
&lt;br /&gt;
==Will create change on this page later==&lt;br /&gt;
Not hearing any immediate response to my proposals, I will wait a few days before I change things--[[User:chris collman|chris collman]] 22:58, 17 November 2011 (WST)&lt;br /&gt;
&lt;br /&gt;
Seems excessive to create a Cron settings page but why not, that is consistent with other functions --[[User:chris collman|chris collman]] 22:02, 19 November 2011 (WST)&lt;br /&gt;
&lt;br /&gt;
::&#039;&#039;&#039;DRAFT OF NEW CRON PAGE STARTS HERE&#039;&#039;&#039; (will remove later)&lt;br /&gt;
Cron is the name of a Unix program that runs predefined tasks on a computer at regular intervals. The cron process in Moodle assists some modules to perform tasks on a scheduled basis. For example, the cron process might tell Moodle to check all discussion forums so it can mail out copies of new posts to people who have subscribed to that forum. &lt;br /&gt;
&lt;br /&gt;
The Moodle cron process can not tell itself to run.  It is a best practice to set up a cron service either on the hosting web server, another server or on another computer that will tell the Moodle cron process to run.    &lt;br /&gt;
&lt;br /&gt;
:Note: Asking a human to use their browser to run the Moodle cron process every five or ten minutes,or when anybody on the site thinks it needs to be run is not a best practice.   The outside cron service provides a &amp;quot;heartbeat&amp;quot; so that the Moodle cron process can perform functions at periods defined for each module that needs it.&lt;br /&gt;
&lt;br /&gt;
==Starting cron==&lt;br /&gt;
There are a number of way to invoke Moodle cron process. Cron can be started from the address bar in a browser (For example http:demo.moodle.net/admin/cron.php), via a [[Daemon]], or wq1et, curl or some other code.&lt;br /&gt;
&lt;br /&gt;
===Cron service location and timing===&lt;br /&gt;
Note that the machine providing the cron service  &#039;&#039;&#039;does not need to be the same machine that is running Moodle&#039;&#039;&#039;. For example, if you have a limited web hosting service that does not have a cron service, then you might choose to run cron on another server or on your home computer. All that matters is that the Moodle cron process is run on a regular basis.&lt;br /&gt;
&lt;br /&gt;
The load of the Moodle cron process on the Moodle server is not very high, so 5 minutes is usually reasonable.  However if you&#039;re worried about it you can reduce the time period to something like 15 minutes or even 30 minutes. &lt;br /&gt;
:It&#039;s best not to make the time period too long.  For example delaying mail-outs can slow down activity within the course and create a large mail outbox to process.  Or student want to see their activity and course completions updated quickly.  &lt;br /&gt;
&lt;br /&gt;
===Testing cron and manual trigger===&lt;br /&gt;
On a new Moodle install or upgrade, it is a good idea to test the Moodle cron process directly from your browser: &#039;&#039;&amp;lt;nowiki&amp;gt;http://example.com/moodle/admin/cron.php&amp;lt;/nowiki&amp;gt;&#039;&#039;  (See [[Cron settings]] if this does not work).&lt;br /&gt;
&lt;br /&gt;
Next, you need to set up a way to manage an automatic scheduled process to run the script on a regular basis. This will depend upon the operating system and program you select.&lt;br /&gt;
&lt;br /&gt;
:Note: When the Moodle cron process is called from cron service, &#039;the command line&#039; trigger creates a temporary admin environment (similar to a login) in order to run and then deletes that environment. You can disable command line running of cron by disabling the appropriate section in the cron.php file.&lt;br /&gt;
&lt;br /&gt;
==Moodle cron process ==&lt;br /&gt;
The Moodle cron process basically finds and determines if certain functions need to run. These functions are defined in code associated with specific activities and processes. Usually the function looks for new activity that has occurred since cron was last run.  Some of the functions may use a timestamp to determine if they should look for new activity. A few functions are run on a random basis.  &lt;br /&gt;
&lt;br /&gt;
===Examples of Moodle cron processes==&lt;br /&gt;
Moodle&#039;s cron processes include:&lt;br /&gt;
*updating reports such as quiz, admin, gradebook &lt;br /&gt;
*updating course and activity completion (if enabled in advanced settings)&lt;br /&gt;
*updating portfolio&lt;br /&gt;
*plagiarism checks &lt;br /&gt;
*updates activity modules. It looks through the mod directory for lib.php files that contain the function activity-name_cron and will call it. In a standard install this includes assignment, chat, forum, and SCROM.&lt;br /&gt;
*updates blocks.  It looks for blocks for their cron methods (object functions) to be run.  It then, for each such block, runs the cron method for a new object associated with that block (for more details read admin/cron.php). These files (the lib.php files and the files where the block classes are defined) can contain cleanup functions, email functions or anything that needs to be run on a regular basis. &lt;br /&gt;
*create the backups of courses at the time specified in the administration settings. &lt;br /&gt;
*updating messaging module or forum email notifications.&lt;br /&gt;
*unenroll students - this is done on a random basis about 20% of the time Moodle&#039;s cron process is triggered.&lt;br /&gt;
*deleting users who have not filled out their profile via the 20% random trigger&lt;br /&gt;
*deleting old logs are also checked 20% of the time via the 20% random trigger&lt;br /&gt;
*deletes old cached text&lt;br /&gt;
*generates new passwords for new users and notifies users&lt;br /&gt;
*runs authentication enrolments processes&lt;br /&gt;
*updates stats if enabled.&lt;br /&gt;
*runs blog cleanups&lt;br /&gt;
*updates registrations&lt;br /&gt;
&lt;br /&gt;
The code in lib/cronlib.php shows the places that are being checked when the admin/cron.php is run and the report which is displayed on the screen after it has run.  As mentioned elsewhere admin/cli/cron.php is the file which outside cron services run to trigger the Moodle cron process.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
Using Moodle forum discussions:&#039;&#039;&#039;No wiki start&#039;&#039;&#039;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=41827 Cron - can someone give me a quick confirmation of function?]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=97684 Cronjob Question]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=97457 Slow cron : avoiding simultaneous cron]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=117168 Visibility of cron.php]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=139263#p609060 How to log the output of a Scheduled Task on Windows] - this discussion explains a nice trick that can be very useful when you are experiencing problems with your Windows Scheduled Task and you need to log the output of the Scheduled Task to a log file.&lt;br /&gt;
&lt;br /&gt;
[[es:Cron]]&lt;br /&gt;
[[fr:Cron]]&lt;br /&gt;
[[nl:Cron]]&lt;br /&gt;
[[sk:Cron]]&lt;br /&gt;
[[pl:Cron]]&lt;br /&gt;
[[ja:Cron]]&amp;lt;/nowiki&amp;gt;&#039;&#039;&#039;No wiki end&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
::&#039;&#039;&#039;END OF DRAFT PAGE HERE&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Rcollman</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Talk:Cron&amp;diff=93915</id>
		<title>Talk:Cron</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Talk:Cron&amp;diff=93915"/>
		<updated>2011-11-19T15:17:17Z</updated>

		<summary type="html">&lt;p&gt;Rcollman: /* Script overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Comment from Eloy:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;If there is some template to mark one page as &amp;quot;require some love&amp;quot; I&#039;d say https://docs.moodle.org/en/Cron requires it. It talks 99% of the time to use web-browser cron. Only 1 line talks about cli cron.&amp;quot; --[[User:Helen Foster|Helen Foster]] 20:44, 9 November 2011 (WST)&lt;br /&gt;
:I just noticed this comment. Cron is not one of my special areas of knowledge but obviously use it. Did a quick &amp;quot;Cron CLI&amp;quot; on the web and got lost in how to program a php file to run cron jobs.   Saw the note about 2.0 and CLI on this page.   &lt;br /&gt;
&lt;br /&gt;
I think Eloy&#039;s comment is also saying that this page is too long and could be split up? For example use a navtrail and a Cron template.  Proposed pages:&lt;br /&gt;
*Cron page - Overview section   &lt;br /&gt;
*[[Cron with Windows OS]] page - move section.&lt;br /&gt;
*[[Cron with MAC OS X]] page - move section&lt;br /&gt;
*[[Cron with web hosting services]] page - move section&lt;br /&gt;
*[[Cron with UNIX]] page - move section&lt;br /&gt;
*[[Cron reports]]&lt;br /&gt;
Comments? --[[User:chris collman|chris collman]] 23:25, 12 November 2011 (WST)&lt;br /&gt;
&lt;br /&gt;
==Will create change on this page later==&lt;br /&gt;
Not hearing any immediate response to my proposals, I will wait a few days before I change things--[[User:chris collman|chris collman]] 22:58, 17 November 2011 (WST)&lt;br /&gt;
&lt;br /&gt;
Seems excessive to create a Cron settings page but why not, that is consistent with other functions --[[User:chris collman|chris collman]] 22:02, 19 November 2011 (WST)&lt;br /&gt;
&lt;br /&gt;
::&#039;&#039;&#039;DRAFT OF NEW CRON PAGE STARTS HERE&#039;&#039;&#039; (will remove later)&lt;br /&gt;
Cron is the name of a Unix program that runs predefined tasks on a computer at regular intervals. The cron process in Moodle assists some modules to perform tasks on a scheduled basis. For example, the cron process might tell Moodle to check all discussion forums so it can mail out copies of new posts to people who have subscribed to that forum. &lt;br /&gt;
&lt;br /&gt;
The Moodle cron process can not tell itself to run.  It is a best practice to set up a cron service either on the hosting web server, another server or on another computer that will tell the Moodle cron process to run.    &lt;br /&gt;
&lt;br /&gt;
:Note: Asking a human to use their browser to run the Moodle cron process every five or ten minutes,or when anybody on the site thinks it needs to be run is not a best practice.   The outside cron service provides a &amp;quot;heartbeat&amp;quot; so that the Moodle cron process can perform functions at periods defined for each module that needs it.&lt;br /&gt;
&lt;br /&gt;
==Starting cron==&lt;br /&gt;
There are a number of way to invoke Moodle cron process. Cron can be started from the address bar in a browser (For example http:demo.moodle.net/admin/cron.php), via a [[Daemon]], or wq1et, curl or some other code.&lt;br /&gt;
&lt;br /&gt;
===Cron service location and timing===&lt;br /&gt;
Note that the machine providing the cron service  &#039;&#039;&#039;does not need to be the same machine that is running Moodle&#039;&#039;&#039;. For example, if you have a limited web hosting service that does not have a cron service, then you might choose to run cron on another server or on your home computer. All that matters is that the Moodle cron process is run on a regular basis.&lt;br /&gt;
&lt;br /&gt;
The load of the Moodle cron process on the Moodle server is not very high, so 5 minutes is usually reasonable.  However if you&#039;re worried about it you can reduce the time period to something like 15 minutes or even 30 minutes. &lt;br /&gt;
:It&#039;s best not to make the time period too long.  For example delaying mail-outs can slow down activity within the course and create a large mail outbox to process.  Or student want to see their activity and course completions updated quickly.  &lt;br /&gt;
&lt;br /&gt;
===Testing cron and manual trigger===&lt;br /&gt;
On a new Moodle install or upgrade, it is a good idea to test the Moodle cron process directly from your browser: &#039;&#039;&amp;lt;nowiki&amp;gt;http://example.com/moodle/admin/cron.php&amp;lt;/nowiki&amp;gt;&#039;&#039;  (See [[Cron settings]] if this does not work).&lt;br /&gt;
&lt;br /&gt;
Next, you need to set up a way to manage an automatic scheduled process to run the script on a regular basis. This will depend upon the operating system and program you select.&lt;br /&gt;
&lt;br /&gt;
:Note: When the Moodle cron process is called from cron service, &#039;the command line&#039; trigger creates a temporary admin environment (similar to a login) in order to run and then deletes that environment. You can disable command line running of cron by disabling the appropriate section in the cron.php file.&lt;br /&gt;
&lt;br /&gt;
==Moodle cron process ==&lt;br /&gt;
The Moodle cron process basically finds and determines if certain functions need to run. These functions are defined in code associated with specific activities and processes. Usually the function looks for new activity that has occurred since cron was last run.  Some of the functions may use a timestamp to determine if they should look for new activity. A few functions are run on a random basis.  &lt;br /&gt;
&lt;br /&gt;
===Examples of Moodle cron processes==&lt;br /&gt;
Moodle&#039;s cron processes include:&lt;br /&gt;
*updating reports such as quiz, admin, gradebook &lt;br /&gt;
*updating course and activity completion (if enabled in advanced settings)&lt;br /&gt;
*updating portfolio&lt;br /&gt;
*plagiarism checks &lt;br /&gt;
*updates activity modules. It looks through the mod directory for lib.php files that contain the function activity-name_cron and will call it. In a standard install this includes assignment, chat, forum, and SCROM.&lt;br /&gt;
*updates blocks.  It looks for blocks for their cron methods (object functions) to be run.  It then, for each such block, runs the cron method for a new object associated with that block (for more details read admin/cron.php). These files (the lib.php files and the files where the block classes are defined) can contain cleanup functions, email functions or anything that needs to be run on a regular basis. &lt;br /&gt;
*create the backups of courses at the time specified in the administration settings. &lt;br /&gt;
*updating messaging module or forum email notifications.&lt;br /&gt;
*unenroll students - this is done on a random basis about 20% of the time Moodle&#039;s cron process is triggered.&lt;br /&gt;
*deleting users who have not filled out their profile via the 20% random trigger&lt;br /&gt;
*deleting old logs are also checked 20% of the time via the 20% random trigger&lt;br /&gt;
*deletes old cached text&lt;br /&gt;
*generates new passwords for new users and notifies users&lt;br /&gt;
*runs authentication enrolments processes&lt;br /&gt;
*updates stats if enabled.&lt;br /&gt;
*runs blog cleanups&lt;br /&gt;
*updates registrations&lt;br /&gt;
&lt;br /&gt;
The code in lib/cronlib.php shows the places that are being checked when the admin/cron.php is run and the report which is displayed on the screen after it has run.  As mentioned elsewhere admin/cli/cron.php is the file which outside cron services run to trigger the Moodle cron process.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
Using Moodle forum discussions:&amp;lt;nowiki&amp;gt;&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=41827 Cron - can someone give me a quick confirmation of function?]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=97684 Cronjob Question]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=97457 Slow cron : avoiding simultaneous cron]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=117168 Visibility of cron.php]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=139263#p609060 How to log the output of a Scheduled Task on Windows] - this discussion explains a nice trick that can be very useful when you are experiencing problems with your Windows Scheduled Task and you need to log the output of the Scheduled Task to a log file.&lt;br /&gt;
&lt;br /&gt;
[[es:Cron]]&lt;br /&gt;
[[fr:Cron]]&lt;br /&gt;
[[nl:Cron]]&lt;br /&gt;
[[sk:Cron]]&lt;br /&gt;
[[pl:Cron]]&lt;br /&gt;
[[ja:Cron]]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
::&#039;&#039;&#039;END OF DRAFT PAGE HERE&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Rcollman</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Talk:Cron&amp;diff=93914</id>
		<title>Talk:Cron</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Talk:Cron&amp;diff=93914"/>
		<updated>2011-11-19T15:12:06Z</updated>

		<summary type="html">&lt;p&gt;Rcollman: /* Testing cron and manual trigger */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Comment from Eloy:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;If there is some template to mark one page as &amp;quot;require some love&amp;quot; I&#039;d say https://docs.moodle.org/en/Cron requires it. It talks 99% of the time to use web-browser cron. Only 1 line talks about cli cron.&amp;quot; --[[User:Helen Foster|Helen Foster]] 20:44, 9 November 2011 (WST)&lt;br /&gt;
:I just noticed this comment. Cron is not one of my special areas of knowledge but obviously use it. Did a quick &amp;quot;Cron CLI&amp;quot; on the web and got lost in how to program a php file to run cron jobs.   Saw the note about 2.0 and CLI on this page.   &lt;br /&gt;
&lt;br /&gt;
I think Eloy&#039;s comment is also saying that this page is too long and could be split up? For example use a navtrail and a Cron template.  Proposed pages:&lt;br /&gt;
*Cron page - Overview section   &lt;br /&gt;
*[[Cron with Windows OS]] page - move section.&lt;br /&gt;
*[[Cron with MAC OS X]] page - move section&lt;br /&gt;
*[[Cron with web hosting services]] page - move section&lt;br /&gt;
*[[Cron with UNIX]] page - move section&lt;br /&gt;
*[[Cron reports]]&lt;br /&gt;
Comments? --[[User:chris collman|chris collman]] 23:25, 12 November 2011 (WST)&lt;br /&gt;
&lt;br /&gt;
==Will create change on this page later==&lt;br /&gt;
Not hearing any immediate response to my proposals, I will wait a few days before I change things--[[User:chris collman|chris collman]] 22:58, 17 November 2011 (WST)&lt;br /&gt;
&lt;br /&gt;
Seems excessive to create a Cron settings page but why not, that is consistent with other functions --[[User:chris collman|chris collman]] 22:02, 19 November 2011 (WST)&lt;br /&gt;
&lt;br /&gt;
::&#039;&#039;&#039;DRAFT OF NEW CRON PAGE STARTS HERE&#039;&#039;&#039; (will remove later)&lt;br /&gt;
Cron is the name of a Unix program that runs predefined tasks on a computer at regular intervals. The cron process in Moodle assists some modules to perform tasks on a scheduled basis. For example, the cron process might tell Moodle to check all discussion forums so it can mail out copies of new posts to people who have subscribed to that forum. &lt;br /&gt;
&lt;br /&gt;
The Moodle cron process can not tell itself to run.  It is a best practice to set up a cron service either on the hosting web server, another server or on another computer that will tell the Moodle cron process to run.    &lt;br /&gt;
&lt;br /&gt;
:Note: Asking a human to use their browser to run the Moodle cron process every five or ten minutes,or when anybody on the site thinks it needs to be run is not a best practice.   The outside cron service provides a &amp;quot;heartbeat&amp;quot; so that the Moodle cron process can perform functions at periods defined for each module that needs it.&lt;br /&gt;
&lt;br /&gt;
==Starting cron==&lt;br /&gt;
There are a number of way to invoke Moodle cron process. Cron can be started from the address bar in a browser (For example http:demo.moodle.net/admin/cron.php), via a [[Daemon]], or wq1et, curl or some other code.&lt;br /&gt;
&lt;br /&gt;
===Cron service location and timing===&lt;br /&gt;
Note that the machine providing the cron service  &#039;&#039;&#039;does not need to be the same machine that is running Moodle&#039;&#039;&#039;. For example, if you have a limited web hosting service that does not have a cron service, then you might choose to run cron on another server or on your home computer. All that matters is that the Moodle cron process is run on a regular basis.&lt;br /&gt;
&lt;br /&gt;
The load of the Moodle cron process on the Moodle server is not very high, so 5 minutes is usually reasonable.  However if you&#039;re worried about it you can reduce the time period to something like 15 minutes or even 30 minutes. &lt;br /&gt;
:It&#039;s best not to make the time period too long.  For example delaying mail-outs can slow down activity within the course and create a large mail outbox to process.  Or student want to see their activity and course completions updated quickly.  &lt;br /&gt;
&lt;br /&gt;
===Testing cron and manual trigger===&lt;br /&gt;
On a new Moodle install or upgrade, it is a good idea to test the Moodle cron process directly from your browser: &#039;&#039;&amp;lt;nowiki&amp;gt;http://example.com/moodle/admin/cron.php&amp;lt;/nowiki&amp;gt;&#039;&#039;  (See [[Cron settings]] if this does not work).&lt;br /&gt;
&lt;br /&gt;
Next, you need to set up a way to manage an automatic scheduled process to run the script on a regular basis. This will depend upon the operating system and program you select.&lt;br /&gt;
&lt;br /&gt;
:Note: When the Moodle cron process is called from cron service, &#039;the command line&#039; trigger creates a temporary admin environment (similar to a login) in order to run and then deletes that environment. You can disable command line running of cron by disabling the appropriate section in the cron.php file.&lt;br /&gt;
&lt;br /&gt;
===Script overview===&lt;br /&gt;
The cron.php script basically finds and determines if certain functions need to run. These functions are defined in code associated with specific activities and processes. Usually the function looks for new activity that has occurred since cron was last run.  Some of the functions may use a timestamp to determine if they should look for new activity. A few functions are run on a random basis.  &lt;br /&gt;
&lt;br /&gt;
Moodle&#039;s cron processes include:&lt;br /&gt;
*updating reports such as quiz, admin, gradebook &lt;br /&gt;
*updating course and activity completion (if enabled in advanced settings)&lt;br /&gt;
*updating portfolio&lt;br /&gt;
*plagiarism checks &lt;br /&gt;
*updates activity modules. It looks through the mod directory for lib.php files that contain the function activity-name_cron and will call it. In a standard install this includes assignment, chat, forum, and SCROM.&lt;br /&gt;
*updates blocks.  It looks for blocks for their cron methods (object functions) to be run.  It then, for each such block, runs the cron method for a new object associated with that block (for more details read admin/cron.php). These files (the lib.php files and the files where the block classes are defined) can contain cleanup functions, email functions or anything that needs to be run on a regular basis. &lt;br /&gt;
*create the backups of courses at the time specified in the administration settings. &lt;br /&gt;
*updating messaging module or forum email notifications.&lt;br /&gt;
*unenroll students - this is done on a random basis about 20% of the time Moodle&#039;s cron process is triggered.&lt;br /&gt;
*deleting users who have not filled out their profile via the 20% random trigger&lt;br /&gt;
*deleting old logs are also checked 20% of the time via the 20% random trigger&lt;br /&gt;
*deletes old cached text&lt;br /&gt;
*generates new passwords for new users and notifies users&lt;br /&gt;
*runs authentication enrolments processes&lt;br /&gt;
*updates stats if enabled.&lt;br /&gt;
*runs blog cleanups&lt;br /&gt;
*updates registrations&lt;br /&gt;
&lt;br /&gt;
The code in lib/cronlib.php shows the places that are being checked when the admin/cron.php is run and the report which is displayed on the screen after it has run&lt;br /&gt;
&lt;br /&gt;
::&#039;&#039;&#039;END OF DRAFT PAGE HERE&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Rcollman</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Talk:Cron&amp;diff=93913</id>
		<title>Talk:Cron</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Talk:Cron&amp;diff=93913"/>
		<updated>2011-11-19T15:10:54Z</updated>

		<summary type="html">&lt;p&gt;Rcollman: /* Starting cron */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Comment from Eloy:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;If there is some template to mark one page as &amp;quot;require some love&amp;quot; I&#039;d say https://docs.moodle.org/en/Cron requires it. It talks 99% of the time to use web-browser cron. Only 1 line talks about cli cron.&amp;quot; --[[User:Helen Foster|Helen Foster]] 20:44, 9 November 2011 (WST)&lt;br /&gt;
:I just noticed this comment. Cron is not one of my special areas of knowledge but obviously use it. Did a quick &amp;quot;Cron CLI&amp;quot; on the web and got lost in how to program a php file to run cron jobs.   Saw the note about 2.0 and CLI on this page.   &lt;br /&gt;
&lt;br /&gt;
I think Eloy&#039;s comment is also saying that this page is too long and could be split up? For example use a navtrail and a Cron template.  Proposed pages:&lt;br /&gt;
*Cron page - Overview section   &lt;br /&gt;
*[[Cron with Windows OS]] page - move section.&lt;br /&gt;
*[[Cron with MAC OS X]] page - move section&lt;br /&gt;
*[[Cron with web hosting services]] page - move section&lt;br /&gt;
*[[Cron with UNIX]] page - move section&lt;br /&gt;
*[[Cron reports]]&lt;br /&gt;
Comments? --[[User:chris collman|chris collman]] 23:25, 12 November 2011 (WST)&lt;br /&gt;
&lt;br /&gt;
==Will create change on this page later==&lt;br /&gt;
Not hearing any immediate response to my proposals, I will wait a few days before I change things--[[User:chris collman|chris collman]] 22:58, 17 November 2011 (WST)&lt;br /&gt;
&lt;br /&gt;
Seems excessive to create a Cron settings page but why not, that is consistent with other functions --[[User:chris collman|chris collman]] 22:02, 19 November 2011 (WST)&lt;br /&gt;
&lt;br /&gt;
::&#039;&#039;&#039;DRAFT OF NEW CRON PAGE STARTS HERE&#039;&#039;&#039; (will remove later)&lt;br /&gt;
Cron is the name of a Unix program that runs predefined tasks on a computer at regular intervals. The cron process in Moodle assists some modules to perform tasks on a scheduled basis. For example, the cron process might tell Moodle to check all discussion forums so it can mail out copies of new posts to people who have subscribed to that forum. &lt;br /&gt;
&lt;br /&gt;
The Moodle cron process can not tell itself to run.  It is a best practice to set up a cron service either on the hosting web server, another server or on another computer that will tell the Moodle cron process to run.    &lt;br /&gt;
&lt;br /&gt;
:Note: Asking a human to use their browser to run the Moodle cron process every five or ten minutes,or when anybody on the site thinks it needs to be run is not a best practice.   The outside cron service provides a &amp;quot;heartbeat&amp;quot; so that the Moodle cron process can perform functions at periods defined for each module that needs it.&lt;br /&gt;
&lt;br /&gt;
==Starting cron==&lt;br /&gt;
There are a number of way to invoke Moodle cron process. Cron can be started from the address bar in a browser (For example http:demo.moodle.net/admin/cron.php), via a [[Daemon]], or wq1et, curl or some other code.&lt;br /&gt;
&lt;br /&gt;
===Cron service location and timing===&lt;br /&gt;
Note that the machine providing the cron service  &#039;&#039;&#039;does not need to be the same machine that is running Moodle&#039;&#039;&#039;. For example, if you have a limited web hosting service that does not have a cron service, then you might choose to run cron on another server or on your home computer. All that matters is that the Moodle cron process is run on a regular basis.&lt;br /&gt;
&lt;br /&gt;
The load of the Moodle cron process on the Moodle server is not very high, so 5 minutes is usually reasonable.  However if you&#039;re worried about it you can reduce the time period to something like 15 minutes or even 30 minutes. &lt;br /&gt;
:It&#039;s best not to make the time period too long.  For example delaying mail-outs can slow down activity within the course and create a large mail outbox to process.  Or student want to see their activity and course completions updated quickly.  &lt;br /&gt;
&lt;br /&gt;
===Testing cron and manual trigger===&lt;br /&gt;
On a new Moodle install or upgrade, it is a good idea to test the Moodle cron process directly from your browser: &#039;&#039;&amp;lt;nowiki&amp;gt;http://example.com/moodle/admin/cron.php&amp;lt;/nowiki&amp;gt;&#039;&#039;  (See [[Cron settings]] if this does not work).&lt;br /&gt;
&lt;br /&gt;
Next, you need to set up a way to manage an automatic scheduled process to run the script on a regular basis. This will depend upon the operating system and program you select.&lt;br /&gt;
&lt;br /&gt;
:Note: When the Moodle cron process is called from cron service, &#039;the command line&#039; trigger creates a temporary admin environment (similar to a login) in order to run and then deletes that environment. You can disable command line running of cron by disabling the appropriate section in the cron.php file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
::&#039;&#039;&#039;END OF DRAFT PAGE HERE&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Rcollman</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Talk:Cron&amp;diff=93912</id>
		<title>Talk:Cron</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Talk:Cron&amp;diff=93912"/>
		<updated>2011-11-19T14:55:28Z</updated>

		<summary type="html">&lt;p&gt;Rcollman: /* Will create change on this page later */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Comment from Eloy:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;If there is some template to mark one page as &amp;quot;require some love&amp;quot; I&#039;d say https://docs.moodle.org/en/Cron requires it. It talks 99% of the time to use web-browser cron. Only 1 line talks about cli cron.&amp;quot; --[[User:Helen Foster|Helen Foster]] 20:44, 9 November 2011 (WST)&lt;br /&gt;
:I just noticed this comment. Cron is not one of my special areas of knowledge but obviously use it. Did a quick &amp;quot;Cron CLI&amp;quot; on the web and got lost in how to program a php file to run cron jobs.   Saw the note about 2.0 and CLI on this page.   &lt;br /&gt;
&lt;br /&gt;
I think Eloy&#039;s comment is also saying that this page is too long and could be split up? For example use a navtrail and a Cron template.  Proposed pages:&lt;br /&gt;
*Cron page - Overview section   &lt;br /&gt;
*[[Cron with Windows OS]] page - move section.&lt;br /&gt;
*[[Cron with MAC OS X]] page - move section&lt;br /&gt;
*[[Cron with web hosting services]] page - move section&lt;br /&gt;
*[[Cron with UNIX]] page - move section&lt;br /&gt;
*[[Cron reports]]&lt;br /&gt;
Comments? --[[User:chris collman|chris collman]] 23:25, 12 November 2011 (WST)&lt;br /&gt;
&lt;br /&gt;
==Will create change on this page later==&lt;br /&gt;
Not hearing any immediate response to my proposals, I will wait a few days before I change things--[[User:chris collman|chris collman]] 22:58, 17 November 2011 (WST)&lt;br /&gt;
&lt;br /&gt;
Seems excessive to create a Cron settings page but why not, that is consistent with other functions --[[User:chris collman|chris collman]] 22:02, 19 November 2011 (WST)&lt;br /&gt;
&lt;br /&gt;
::&#039;&#039;&#039;DRAFT OF NEW CRON PAGE STARTS HERE&#039;&#039;&#039; (will remove later)&lt;br /&gt;
Cron is the name of a Unix program that runs predefined tasks on a computer at regular intervals. The cron process in Moodle assists some modules to perform tasks on a scheduled basis. For example, the cron process might tell Moodle to check all discussion forums so it can mail out copies of new posts to people who have subscribed to that forum. &lt;br /&gt;
&lt;br /&gt;
The Moodle cron process can not tell itself to run.  It is a best practice to set up a cron service either on the hosting web server, another server or on another computer that will tell the Moodle cron process to run.    &lt;br /&gt;
&lt;br /&gt;
:Note: Asking a human to use their browser to run the Moodle cron process every five or ten minutes,or when anybody on the site thinks it needs to be run is not a best practice.   The outside cron service provides a &amp;quot;heartbeat&amp;quot; so that the Moodle cron process can perform functions at periods defined for each module that needs it.&lt;br /&gt;
&lt;br /&gt;
==Starting cron==&lt;br /&gt;
There are a number of way to invoke cron.php. Cron can be started from the address bar in a browser (URL usually ending in admin/cron.php), via a [[Daemon]], or wq1et, curl or some other code.&lt;br /&gt;
&lt;br /&gt;
===Cron service location and timing===&lt;br /&gt;
Note that the machine performing the cron &#039;&#039;&#039;does not need to be the same machine that is running Moodle&#039;&#039;&#039;. For example, if you have a limited web hosting service that does not have a cron service, then you might choose to run cron on another server or on your home computer. All that matters is that the cron.php file is called regularly.&lt;br /&gt;
&lt;br /&gt;
The load of this script is not very high, so 5 minutes is usually reasonable, but if you&#039;re worried about it you can reduce the time period to something like 15 minutes or even 30 minutes. It&#039;s best not to make the time period too long, as delaying mail-outs can slow down activity within the course. Remember that mail-outs also wait for the editing time to expire before being queued for sending.&lt;br /&gt;
&lt;br /&gt;
===Testing cron and manual trigger===&lt;br /&gt;
First, test that the script works by running it directly from your browser: &#039;&#039;&amp;lt;nowiki&amp;gt;http://example.com/moodle/admin/cron.php&amp;lt;/nowiki&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If cron is called from the command line by any user logged in to your Moodle it will create a temporary admin environment in order to run and then log the user out. You can disable command line running of cron by disabling the appropriate section in the cron.php file.&lt;br /&gt;
&lt;br /&gt;
Next, you need to set up a way to manage an automatic scheduled process to run the script on a regular basis. This will depend upon the operating system and program you select.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
::&#039;&#039;&#039;END OF DRAFT PAGE HERE&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Rcollman</name></author>
	</entry>
</feed>