<?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=TimHunt</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=TimHunt"/>
	<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/Special:Contributions/TimHunt"/>
	<updated>2026-08-13T21:06:49Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Front_page_settings&amp;diff=96005</id>
		<title>Front page settings</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Front_page_settings&amp;diff=96005"/>
		<updated>2012-06-08T09:22:50Z</updated>

		<summary type="html">&lt;p&gt;TimHunt: Reverted edits by Fonzya (talk) to last revision by Marycooch&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Front page}}The site&#039;s [[Front page]] is similar to a course page. The front page settings, roles, filters, backup, restore and questions are currently duplicated in &#039;&#039;Settings &amp;gt; Front page settings&#039;&#039; AND &#039;&#039;Settings &amp;gt; Site administration &amp;gt; Front page&#039;&#039; (reported as MDL-26012).&lt;br /&gt;
&lt;br /&gt;
==Front page settings==&lt;br /&gt;
&lt;br /&gt;
The following settings may be changed by a site administrator in &#039;&#039;Settings &amp;gt; Front page settings &amp;gt; Edit settings&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
===Full site name===&lt;br /&gt;
This name appears at the top of every page above the navigation bar.&lt;br /&gt;
[[Image:demositefrontpage01.png|frame|center|Front page full site name]]&lt;br /&gt;
&lt;br /&gt;
===Short name for site===&lt;br /&gt;
The short name appears at the beginning of the navigation bar as a link back to your site front page.&lt;br /&gt;
&lt;br /&gt;
===Front page description===&lt;br /&gt;
An optional setting enabling you to add short message to your users in a block on the front page.&lt;br /&gt;
&lt;br /&gt;
===Front page and front page items when logged in===&lt;br /&gt;
The centre of the front page can display any combination of the following: news items, a list of courses, a list of course categories, a list of categories and courses or none.  The order is determined by a combination box. &lt;br /&gt;
&lt;br /&gt;
It is possible to create one setting for anyone who gets to the front page without logging in to the Moodle site, and another look for only those who have logged into the Moodle site.  There are two combination boxes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|Combination boxes&lt;br /&gt;
|-&lt;br /&gt;
|[[Image:FrontPage settings frontpage pd.png|thumb|left|frontpage showing pulldown]]&lt;br /&gt;
| The image on the left shows the first Front Page settings dialog - what visitors will see before they log in.&lt;br /&gt;
&lt;br /&gt;
The image on the right shows a second front Page settings dialog - what Authenticated Users will see when logged in. &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
:An alternative option for logged-in users is [[My Moodle]].&lt;br /&gt;
|[[Image:FrontPage_settings_frontpageloggedin.png|thumb|right|frontpage for login user box]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Maximum Category Depth===&lt;br /&gt;
Determines how many sub categories will be displayed on the front page for each category.&lt;br /&gt;
&lt;br /&gt;
===Include a topic section===&lt;br /&gt;
This adds a topic section to the centre-top of the front page. When editing is turned on, resources and/or activities can be added to the topic section using the dropdown menus, in the same way as on a course page.&lt;br /&gt;
&lt;br /&gt;
:Note: The label resource can be used to add text and/or an image to the centre-top of the front page.&lt;br /&gt;
&lt;br /&gt;
===News items to show===&lt;br /&gt;
This setting only applies if the front page is set to display news items or if you are using the [[Latest News block]].&lt;br /&gt;
&lt;br /&gt;
===Comments per page===&lt;br /&gt;
Each course may include a [[Comments block]] which allows the display of user comments. The number of comments displayed at any time is set here.&lt;br /&gt;
&lt;br /&gt;
===Courses per page===&lt;br /&gt;
Limits the number of courses which will display on a page.&lt;br /&gt;
&lt;br /&gt;
===Allow visible courses in hidden categories===&lt;br /&gt;
Do you want to display courses which are not hidden but placed in a category that is hidden?&lt;br /&gt;
&lt;br /&gt;
===Default front page role===&lt;br /&gt;
To enable logged-in users to participate in front page activities, a default front page role can be set. In Moodle 2, there is an Authenticated User on Front Page Role to which specific permissions can be granted for specific purposes. Alternatively, more than one  [[Create_custom_roles|Custom Role]] can be created to offer a number of different options for Admins to use in a variety of combinations that provide a great deal more flexibility on the Front Page. &lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;Note:&#039;&#039;&#039; The default Front Page role should &#039;&#039;never&#039;&#039; be set to [[Guest]]. Ostensibly, this implies that as few courses will allow Guest access, a user will try to log in, but as a Guest they cannot actually see courses.&lt;br /&gt;
&lt;br /&gt;
==Front Page roles==&lt;br /&gt;
As in a course, you can assign users [[Roles|roles]] just in the [[Context|context]] of this page.  Note this is different than the default Authenticated User on Front Page role found in front page settings. As a security issue, usually only admins can modify the front page, other users do not.&lt;br /&gt;
&lt;br /&gt;
==Front Page backup==&lt;br /&gt;
You can backup the front page, similar to a [[Course backup]].&lt;br /&gt;
&lt;br /&gt;
==Front Page restore==&lt;br /&gt;
As in a course, you can [[Restore]] a backed up version of the front page.&lt;br /&gt;
However, there are currently issues with front page restore, as outlined in MDL-31500 and MDL-30808&lt;br /&gt;
&lt;br /&gt;
==Front Page questions==&lt;br /&gt;
The [[Question bank]] is accessible from the Front Page. For example, if &amp;quot;topic&amp;quot; is checked in the front page settings, you can add a [[Quiz module]] activity.&lt;br /&gt;
&lt;br /&gt;
==Tips and Tricks==&lt;br /&gt;
&lt;br /&gt;
A Moodle site&#039;s front page can be reconfigured from the default standard to give it a different look and or change how it functions.  Depending upon the changes, this can be a simple or a more complex process. Of course a custom theme may have it&#039;s own unique front page format.   Here are some examples using the formal white standard theme:  &lt;br /&gt;
&lt;br /&gt;
====Visual examples====&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Guest view, same Theme- click on any to enlarge&amp;quot; widths=&amp;quot;150px&amp;quot; heights=&amp;quot;100px&amp;quot; perrow=&amp;quot;3&amp;quot;&amp;gt;&lt;br /&gt;
Image:fp013col.png|3 column Front Page, topic checked&lt;br /&gt;
Image:fp032colright.png|2 column Front Page, blocks right &lt;br /&gt;
Image:fp022colleft.png|2 column Front Page,  blocks left&lt;br /&gt;
Image:fp043coluser.png|3 column Front Page, Categories and courses&lt;br /&gt;
Image:fp052colright.png|2 column Front Page, Categories only&lt;br /&gt;
Image:fp021col.png|Clean look, topic checked, no blocks&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Central area, Courses or Categories?====&lt;br /&gt;
This is a major decision, what is it you want in the centre of your front page? You can have a list of categories, a list of categories and courses, or neither, a label with a table full of images works just as well. The issue is always the same, actually, what looks good.&lt;br /&gt;
&lt;br /&gt;
====Clean look, topic checked, no blocks====&lt;br /&gt;
The standard Moodle page format of [[Block]]s on the left and blocks on the right is not always appropriate or considered pretty. The [[Administrator|site administrator]] can change this basic format by simply deleting or hiding blocks that can be seen by users. Navigation can be placed on the dock.&lt;br /&gt;
&lt;br /&gt;
====The two column format====&lt;br /&gt;
The Administrator decides which blocks should appear on the front page and moves all of them to the left or right side. This format allows you to decide what you want in the centre, and where you want the blocks, left or right.  &lt;br /&gt;
:Tip: It is possible to force a block column to assume a specific width.  For example, placing an image of 400 px in a block will force that column to 400 px.&lt;br /&gt;
&lt;br /&gt;
====The clean look example====&lt;br /&gt;
Some sites want an uncluttered look. A site administrator or designer wants to start with the most basic look and then add features.&lt;br /&gt;
&lt;br /&gt;
# The site administrator will turn on editing and hide or delete all blocks that can be see by teachers or students on the front page.&lt;br /&gt;
# Then go to the Site administration block► Front Page ► Front Page settings and:&lt;br /&gt;
## Set the &amp;quot;Front page&amp;quot; list to None, None, None, None &lt;br /&gt;
## Set &amp;quot;Front page items when logged in&amp;quot; list to the same &lt;br /&gt;
## Check the box for &amp;quot;Include Topic section&amp;quot;&lt;br /&gt;
## Save &lt;br /&gt;
&lt;br /&gt;
All the above was done with 1 theme, and a simple front page.&lt;br /&gt;
&lt;br /&gt;
==Block settings==&lt;br /&gt;
[[Image:Editconfigblock.png|thumb|200px|right|Editing block settings]]&lt;br /&gt;
Each block has a number of configuration settings that you can change. See [[Managing blocks]] for more details.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[Front Page FAQ]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Site administration]]&lt;br /&gt;
&lt;br /&gt;
[[de:Einstellungen_f%C3%BCr_die_Startseite]]&lt;br /&gt;
[[eu:Hasiera-orriaren_ezarpenak]]&lt;br /&gt;
[[fr:Réglages page d&#039;accueil]]&lt;br /&gt;
[[pl:Ustawienia strony głównej]]&lt;/div&gt;</summary>
		<author><name>TimHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Talk:Question_categories&amp;diff=95853</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=95853"/>
		<updated>2012-05-04T18:31:39Z</updated>

		<summary type="html">&lt;p&gt;TimHunt: /* Using Arrow Icons for Moving Categories */&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;br /&gt;
&lt;br /&gt;
:: Arrow icons not working to move between contexts is a bug that will be fixed one day.--[[User:Tim Hunt|Tim Hunt]] 02:31, 5 May 2012 (WST)&lt;/div&gt;</summary>
		<author><name>TimHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=My_Moodle&amp;diff=95286</id>
		<title>My Moodle</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=My_Moodle&amp;diff=95286"/>
		<updated>2012-02-29T11:07:28Z</updated>

		<summary type="html">&lt;p&gt;TimHunt: Reverted edits by Dapeople300 (talk) to last revision by Tsala&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Site appearance}}&lt;br /&gt;
==My home==&lt;br /&gt;
&lt;br /&gt;
My Moodle or My home is a customisable &amp;quot;dashboard&amp;quot; page for providing users with links to their courses and activities within them, such as unread forum posts and upcoming assignments. (The name &#039;My Moodle&#039; was used in the admin menu in earlier versions of Moodle.)&lt;br /&gt;
&lt;br /&gt;
The navigation block includes a My home link directly above or below the Site home link.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
My Home in Moodle 2.0 video:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;mediaplayer&amp;gt;http://www.youtube.com/watch?v=un_pBYkeXXI&amp;lt;/mediaplayer&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Site administration settings==&lt;br /&gt;
&lt;br /&gt;
===Default home page===&lt;br /&gt;
&lt;br /&gt;
An administrator can set My home as the default home page for all logged-in users by selecting &#039;My Moodle&#039; as default home page in &#039;&#039;Settings &amp;gt; Site administration &amp;gt; Appearance &amp;gt; Navigation&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
If &#039;User preference&#039; is selected as default home page, each user needs to navigate to either the &#039;Home Page&#039; or the &#039;My home&#039; page then via the &#039;&#039;Settings &amp;gt; My profile settings&#039;&#039; click the &amp;quot;Make this my default home page&amp;quot; link. Note that this option only appears on the page that is not their current default home page.  Once selected, Moodle will remember which page to present them each time they log on.&lt;br /&gt;
&lt;br /&gt;
Note: Users with the Site administrator role cannot set My Moodle as their default home page.&lt;br /&gt;
&lt;br /&gt;
===Setting the default My Moodle page===&lt;br /&gt;
&lt;br /&gt;
An administrator or manager (or other user with the capability [[Capabilities/moodle/my:configsyspages|moodle/my:configsyspages]]) can set which content (course overview, calendar, blocks) appears on the My Moodle page for all users as follows:&lt;br /&gt;
&lt;br /&gt;
# Access &#039;&#039;Settings &amp;gt; Site administration &amp;gt; Appearance &amp;gt; Default My Moodle page&#039;&#039;.&lt;br /&gt;
# Select the required blocks from the &amp;quot;Add a block&amp;quot; drop-down menu. [[Block settings|Configure]] each block as desired.&lt;br /&gt;
# Reposition blocks using the arrow icons in the block headers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|[[Image:myMoodle02.png|thumb|250px|center|Accessing My Moodle page]]&lt;br /&gt;
|[[Image:myMoodle03.png|thumb|250px|center|Editing My Moodle page]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Managing blocks===&lt;br /&gt;
&lt;br /&gt;
By default, users are allowed to add blocks to their My Moodle page. This can be prevented by editing the [[Authenticated user|authenticated user]] role and changing the [[Capabilities/moodle/my:manageblocks|moodle/my:manageblocks]] capability from allow to not set.&lt;br /&gt;
&lt;br /&gt;
==My Moodle capabilities==&lt;br /&gt;
&lt;br /&gt;
* [[Capabilities/moodle/my:manageblocks|Manage My Moodle page blocks]] (see above)&lt;br /&gt;
* [[Capabilities/moodle/my:configsyspages|Configure system templates for My Moodle pages]]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* Using Moodle [http://moodle.org/mod/forum/view.php?id=7309 My Moodle forum]&lt;br /&gt;
&lt;br /&gt;
Using Moodle forum discussions:&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=168292 Latest news on My Moodle]&lt;br /&gt;
&lt;br /&gt;
[[eu:Nire_Moodle]]&lt;br /&gt;
[[fr:Mon Moodle]]&lt;br /&gt;
[[de:MyMoodle]]&lt;/div&gt;</summary>
		<author><name>TimHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Adding_a_new_course&amp;diff=94630</id>
		<title>Adding a new course</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Adding_a_new_course&amp;diff=94630"/>
		<updated>2011-12-12T12:20:09Z</updated>

		<summary type="html">&lt;p&gt;TimHunt: Reverted edits by Empowerbpo (talk) to last revision by Marycooch&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Courses}}&lt;br /&gt;
&lt;br /&gt;
By default a regular teacher can&#039;t add a new course. To add a new course to Moodle you need to have either [[Administrator|Adminstrator]], [[Course creator|Course Creator]] or [[Manager|Manager]] rights.&lt;br /&gt;
&lt;br /&gt;
==Adding a course==&lt;br /&gt;
To add a course:&lt;br /&gt;
*Go to &#039;&#039;Settings&amp;gt;Site Administration&amp;gt;Courses&amp;gt;Add/edit courses&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Addeditcourses.jpg]]&lt;br /&gt;
&lt;br /&gt;
*Choose the category where you want your course to be. For more information see [[Course categories|Course categories]]&lt;br /&gt;
*Click the &amp;quot;Add a new course&amp;quot; button&lt;br /&gt;
*Enter the [[Course settings|course settings]], then click the &amp;quot;Save changes&amp;quot; button.&lt;br /&gt;
*On the next screen, choose your students/teachers to assign to the course.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Deleting a course(s)==&lt;br /&gt;
A regular teacher can&#039;t delete a course. To delete a course you need to have either [[Administrator|Administrator]] or [[Manager|Manager]] rights. A [[Course creator|Course creator]] can delete courses they have created themselves.&lt;br /&gt;
&lt;br /&gt;
To delete a course:&lt;br /&gt;
*Go to &#039;&#039;Settings&amp;gt;Site Administration&amp;gt;Courses&amp;gt;Add/edit courses&#039;&#039;&lt;br /&gt;
*Click the course&#039;s category (to drill down the category tree) and find the course you wish to delete. Or use the &amp;quot;Search course&amp;quot; textbox at the bottom of the category list.&lt;br /&gt;
*Click the &amp;quot;X&amp;quot; icon to the right of the course&#039;s name. to delete it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can delete multiple courses by: &lt;br /&gt;
*Creating a new (temporary) category. You can name it &amp;quot;To be deleted&amp;quot;.&lt;br /&gt;
*Select and &#039;&#039;&#039;move&#039;&#039;&#039; the &amp;quot;About to be deleted&amp;quot; courses to that category (&amp;quot;To be deleted&amp;quot;).&lt;br /&gt;
*Delete the category (&amp;quot;To be deleted&amp;quot;) and choose &amp;quot;Delete ALL - cannot be undone&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Course requests==&lt;br /&gt;
&lt;br /&gt;
*There is a  course request feature which can be enabled by the administrator  in &#039;&#039;Settings &amp;gt; Site administration &amp;gt; Courses &amp;gt; Course request&#039;&#039;.&lt;br /&gt;
*The default category for new courses requested can be selected from this screen, and users who will be notified when courses are requested can also be selected here. (These are users with the capability &amp;quot;Approve course creation&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[File:Courserequest.png]]&lt;br /&gt;
&lt;br /&gt;
*A  button will then appear on the All courses page for users to request a new course.&lt;br /&gt;
&lt;br /&gt;
By default, all authenticated users can make course requests (after you have enabled it). It is controlled by the capability [[Capabilities/moodle/course:request|moodle/course:request]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*Using Moodle [http://moodle.org/mod/forum/discuss.php?d=83830 Hide Courses from some users or students] forum discussion&lt;br /&gt;
&lt;br /&gt;
[[es:Cursos_%28administrador%29]]&lt;br /&gt;
[[eu:Ikastaroak_%28Kudeatzaileak%29]]&lt;/div&gt;</summary>
		<author><name>TimHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Database_fields&amp;diff=94184</id>
		<title>Database fields</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Database_fields&amp;diff=94184"/>
		<updated>2011-11-29T11:41:54Z</updated>

		<summary type="html">&lt;p&gt;TimHunt: /* Number */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Database}}&lt;br /&gt;
A &#039;&#039;&#039;field&#039;&#039;&#039; is a named unit of information. Each entry in a [[Database activity module|database activity module]] can have multiple fields of multiple types e.g. a text field called &#039;favourite color&#039; which allows you to type in your favourite shade, or a menu called &#039;state&#039; that lets you choose one from a list of the 50 that make up the United States of America. By combining several fields with appropriate names and types you should be able to capture all the relevant information about the items in your database.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Field name and description ==&lt;br /&gt;
&lt;br /&gt;
*The name is what is shown when an entry is added. It must be unique and short. The description is for your benefit to help identify that field.&lt;br /&gt;
&lt;br /&gt;
== Field types ==&lt;br /&gt;
*The following screenshots show &amp;quot;before&amp;quot; and &amp;quot;afters&amp;quot; of setting up fields. The selection in orange shows the field as it is displayed for the user when they add an entry.&lt;br /&gt;
&lt;br /&gt;
=== Checkbox ===&lt;br /&gt;
&lt;br /&gt;
[[File:Checkboxfield1.png]]&lt;br /&gt;
&lt;br /&gt;
This allows you to offer checkboxes for the user to select. Add the options one under the other. The word will appear next to a checkbox when the user clicks to add an entry. They can check more than one box.&lt;br /&gt;
&lt;br /&gt;
=== Date ===&lt;br /&gt;
&lt;br /&gt;
[[File:Datefield1.png]]&lt;br /&gt;
&lt;br /&gt;
This allows a user to enter a date by picking a day, month and year from a drop down list.&lt;br /&gt;
&lt;br /&gt;
=== File ===&lt;br /&gt;
[[File:Filefield.png]]&lt;br /&gt;
&lt;br /&gt;
Users can upload a file from their computer. If it is an image file then the picture field may be a better choice.&lt;br /&gt;
&lt;br /&gt;
=== Latitude/longitude ===&lt;br /&gt;
&lt;br /&gt;
[[File:Latlongfield.png]]&lt;br /&gt;
&lt;br /&gt;
Users can enter a geographic location using latitude and longitude. For example, [http://moodle.com/hq/ Moodle HQ] is at latitude -31.9545, longitude 115.877. When viewing the record, links are automatically generated linking to geographic data services such as [http://earth.google.com Google Earth], [http://www.openstreetmap.org/ OpenStreetMap], [http://www.geabios.com/ GeaBios],[http://www.mapstars.com/extern/deltaworks-holland Mapstars] and more. (The teacher can choose which of those links appear, if any.)&lt;br /&gt;
&lt;br /&gt;
=== Menu ===&lt;br /&gt;
&lt;br /&gt;
[[File:Menufield.png]]&lt;br /&gt;
&lt;br /&gt;
The text entered in the &#039;&#039;options&#039;&#039; area will be presented as a drop-down list for the user to choose from. Each line become a different option.&lt;br /&gt;
&lt;br /&gt;
=== Menu (Multi-select) ===&lt;br /&gt;
&lt;br /&gt;
[[File:Multiselectfield.png]]&lt;br /&gt;
&lt;br /&gt;
The text entered in the &#039;&#039;options&#039;&#039; area will be presented as a list for the user to choose from and each line become a different option. By holding down control or shift as they click, users will be able to select multiple options. This is a fairly advanced computer skill so it may be wise to use multiple checkboxes instead.&lt;br /&gt;
&lt;br /&gt;
=== Number ===&lt;br /&gt;
&lt;br /&gt;
[[File:Numberfield.png]]&lt;br /&gt;
This allows users to enter any number. For example:&lt;br /&gt;
* 42&lt;br /&gt;
* -1000&lt;br /&gt;
* 0&lt;br /&gt;
* 0.123&lt;br /&gt;
* 3.0e8&lt;br /&gt;
(For those who care about the technical details, the field stores floating point numbers.)&lt;br /&gt;
&lt;br /&gt;
=== Picture ===&lt;br /&gt;
&lt;br /&gt;
[[File:Picturefield.png]]&lt;br /&gt;
&lt;br /&gt;
This allows a user to upload and display an image file. &amp;quot;Single view&amp;quot; is when the image is viewed on its own; &amp;quot;list view&amp;quot; is when it is viewed in with other images. Single view can be larger than list view.&lt;br /&gt;
&lt;br /&gt;
=== Radio buttons ===&lt;br /&gt;
&lt;br /&gt;
[[File:Radiofield.png]]&lt;br /&gt;
&lt;br /&gt;
The user gets radio buttons and can choose only one. They can only submit the entry when they have clicked on one button. &lt;br /&gt;
&lt;br /&gt;
(Note:If you only have two options and they are opposites (true/false, yes/no) then you could simply use a single checkbox instead. However checkboxes default to their unchecked status and so people could submit without actively selecting one of the options. This may not always be appropriate.)&lt;br /&gt;
&lt;br /&gt;
=== Text ===&lt;br /&gt;
[[File:Textfield.png]]&lt;br /&gt;
&lt;br /&gt;
Users can enter text up to 60 characters in length. For longer text, or for text that requires formatting such as headers and bullet points, you can use a textarea field.&lt;br /&gt;
&lt;br /&gt;
=== Textarea ===&lt;br /&gt;
&lt;br /&gt;
[[File:Textareafield.png]]&lt;br /&gt;
&lt;br /&gt;
This allows users to enter a long piece of text using the rich text editor (TinyMCE)&lt;br /&gt;
&lt;br /&gt;
=== URL ===&lt;br /&gt;
[[File:Urlfield.png]]&lt;br /&gt;
&lt;br /&gt;
The user can add a link to a website here. If you select &#039;&#039;autolink&#039;&#039; then the URL becomes clickable.. If you also enter a &#039;&#039;forced name for the link&#039;&#039; then that text will be used for the hyperlink. For example in a database of authors you may wish people to enter the author&#039;s website. If you enter the text &#039;homepage&#039; as a forced name then clicking on text &amp;quot;homepage&amp;quot; will take you to the entered URL.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*Using Moodle [http://moodle.org/mod/forum/discuss.php?d=86927 Time stamp for database entries?] forum discussion&lt;br /&gt;
&lt;br /&gt;
[[de:Datenbank-Felder]]&lt;br /&gt;
[[ru:Поля]]&lt;br /&gt;
[[fr:Champs]]&lt;br /&gt;
[[ja:データベースフィールド]]&lt;br /&gt;
[[nl:Databank velden]]&lt;/div&gt;</summary>
		<author><name>TimHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Upgrading_to_Moodle_2.1&amp;diff=94043</id>
		<title>Upgrading to Moodle 2.1</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Upgrading_to_Moodle_2.1&amp;diff=94043"/>
		<updated>2011-11-23T14:36:30Z</updated>

		<summary type="html">&lt;p&gt;TimHunt: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Installing Moodle}}&lt;br /&gt;
&lt;br /&gt;
You can upgrade to Moodle 2.1 from Moodle 2.0 or 1.9. If you are upgrading from 1.9, please read the [https://docs.moodle.org/20/en/Upgrading_to_Moodle_2.0 Upgrading to Moodle 2.0] page too. If you are using an earlier version of Moodle, you must upgrade to the latest Moodle 1.9.x first.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;We advise that you test the upgrade first on a COPY of your production site, to make sure it works as you expect.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
&lt;br /&gt;
* Moodle must be &#039;&#039;&#039;1.9&#039;&#039;&#039; or later (consider upgrading to 2.0 before upgrading to 2.1)&lt;br /&gt;
* PHP must be &#039;&#039;&#039;5.3.2&#039;&#039;&#039; or later&lt;br /&gt;
** Required PHP extensions: iconv, curl, ctype, zip, simplexml, spl, pcre, dom, xml, json&lt;br /&gt;
** Required PHP memory_limit at least 40MB (64MB or more recommended if you have a choice)&lt;br /&gt;
* Databases should be one of the following:&lt;br /&gt;
** MySQL 5.0.25 or later  (InnoDB storage engine highly recommended)&lt;br /&gt;
** PostgreSQL 8.3 or later&lt;br /&gt;
** Oracle 10.2 or later&lt;br /&gt;
** MS SQL 2005 or later&lt;br /&gt;
* Any standards-supporting browser from the past few years, for example:&lt;br /&gt;
** Firefox 3 or later &lt;br /&gt;
** Safari 3 or later &lt;br /&gt;
** Google Chrome 4 or later&lt;br /&gt;
** Opera 9 or later&lt;br /&gt;
** MS Internet Explorer 7 or later (Even [http://googleenterprise.blogspot.com/2010/01/modern-browsers-for-modern-applications.html Google does not support IE6 any more])&lt;br /&gt;
&lt;br /&gt;
==Moodle 2.1 planning==&lt;br /&gt;
&lt;br /&gt;
The biggest change in Moodle 2.1 that affects the upgrade is the new question engine. If you have lots of quiz attempts, you need to plan this upgrade carefully. If you don&#039;t have lots of quiz attempts, you don&#039;t have to worry.&lt;br /&gt;
&lt;br /&gt;
===Planning the question engine upgrade===&lt;br /&gt;
&lt;br /&gt;
The upgrade from Moodle 2.0 to 2.1 needs to do a major transformation of all the quiz attempt data. This is something you need to plan for if you have a lot of quiz attempts.&lt;br /&gt;
&lt;br /&gt;
To gauge whether this will be a problem for you, count the number of rows in the &amp;lt;tt&amp;gt;question_sessions&amp;lt;/tt&amp;gt; table:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code sql&amp;gt;&lt;br /&gt;
SELECT COUNT(1) FROM mdl_question_sessions;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If this number is less than something like 10,000 then you have nothing to worry about.&lt;br /&gt;
* If this number is greater than something like 1,000,000 then you have to plan.&lt;br /&gt;
&lt;br /&gt;
====A helpful plugin====&lt;br /&gt;
&lt;br /&gt;
There is a useful plugin you can install to help you plan the upgrade which you can install from https://github.com/timhunt/moodle-local_qeupgradehelper. If you have a significant number of you are strongly advised to install it.&lt;br /&gt;
&lt;br /&gt;
Once installed, you can access it using the &#039;&#039;&#039;Question engine upgrade helper&#039;&#039;&#039; link in the Site administration menu. This plugin has various features.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;List quizzes and attempts&#039;&#039;&#039; option will count the number of quiz attempts and question sessions (like the query above) but giving more detail. Again, this is a way to get an idea of the scope of the upgrade for you.&lt;br /&gt;
&lt;br /&gt;
====What to do if you have a lot of attempts====&lt;br /&gt;
&lt;br /&gt;
Here are some options to consider:&lt;br /&gt;
&lt;br /&gt;
; Think about whether you really need to keep them all.&lt;br /&gt;
: If you have not thought about your archiving strategy for old quiz attempts before, then this would be a really good time to do so. Do you really need to keep all the old data around? If not, deleting it before you upgrade to 2.1 would be a good idea.&lt;br /&gt;
: If you just need access to the old attempts for archival purposes, perhaps you could achieve that by keeping a copy of your old site from before the upgrade, and then only keeping and upgrading the current quiz attempts on your live system.&lt;br /&gt;
; Upgrade some of the attempts later&lt;br /&gt;
: The technical details for how to do this are in the script &amp;lt;tt&amp;gt;partialupgrade-example.php&amp;lt;/tt&amp;gt; which you will need to edit.&lt;br /&gt;
: After the upgrade, you can complete the upgrade in one of two ways:&lt;br /&gt;
:# You can manually use the &#039;&#039;&#039;Question engine upgrade helper&#039;&#039;&#039; to upgrade the attempt data for any quiz that has not already been done. Use the &#039;&#039;&#039;List quizzes still to upgrade&#039;&#039;&#039; option.&lt;br /&gt;
:# You can set up cron to automatically complete the upgrade using the &#039;&#039;&#039;Configure cron&#039;&#039;&#039; option.&lt;br /&gt;
&lt;br /&gt;
====How to check that the upgrade was successful====&lt;br /&gt;
&lt;br /&gt;
If you want to verify that the upgrade worked successfully, here are some things to check:&lt;br /&gt;
&lt;br /&gt;
* Obviously, look out for any error messages output, or written to the logs, during the upgrade.&lt;br /&gt;
* The upgrade also writes a file into &amp;lt;tt&amp;gt;moodledata/upgradelogs/upg_&#039;&#039;{timestamp}&#039;&#039;.html&amp;lt;/tt&amp;gt;. This lists any places where there were problems with the data in your database, and the upgrade code had to make an assumption about how to proceed. This log file should be self-explanatory, if a bit technical, and it most cases each problem report will include a link to the quiz review page, so you can easily see the result of the upgrade.&lt;br /&gt;
* Finally, if you are testing the upgrade on a copy of your site, you can pick some example quizzes, and open the quiz reports or review pages from before, and after, the upgrade in separate browser windows, and compare to make sure the data is the same. Of course, there will be some differences (we hope the new system is better!) but this does let you check the data.&lt;br /&gt;
&lt;br /&gt;
====What to do if something goes wrong during the upgrade====&lt;br /&gt;
&lt;br /&gt;
I am sure you started by testing the upgrade on a copy of your live site, so if anything goes wrong, you can report the bug, wait for it to be fixed, and then try again.&lt;br /&gt;
&lt;br /&gt;
If you wish to report a bug in the upgrade you may want to look at the instructions on [[dev:Question_Engine_2:Testing]] about how to make the bug report as useful as possible.&lt;br /&gt;
&lt;br /&gt;
After the upgrade, you can use the Question engine upgrade helper plugin to re-do the upgrade of the attempts at any particular quiz. This should let you fix problems, even if you only discover them later. You can do this by using the &#039;&#039;&#039;List already upgrade quizzes that can be reset&#039;&#039;&#039; and &#039;&#039;&#039;List quizzes still to upgrade&#039;&#039;&#039; options.&lt;br /&gt;
&lt;br /&gt;
==Before upgrading please... ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: The upgrade process will irreversibly modify the contents of your database &#039;&#039;&#039;and&#039;&#039;&#039; your moodledata file storage area. If something goes wrong you &#039;&#039;&#039;cannot&#039;&#039;&#039; go back. It is vital that you take good backups of both moodledata and the database in case you have problems with the upgrade. If you are not sure how see [[Site backup]] or ask in the moodle.org forums (explaining what your operating system is).  &lt;br /&gt;
&lt;br /&gt;
* It&#039;s a good idea to read the [[:dev:Moodle 2.1 release notes]]&lt;br /&gt;
* Always check your site to make sure it meets all system requirements for 2.1 in &#039;&#039;Administration &amp;gt; Server &amp;gt; [[Environment]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Do a full database backup!&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Do a full moodledata backup&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Check your backups carefully&#039;&#039;&#039;&lt;br /&gt;
* Remember to purge PHP cache if using any PHP accelerator&lt;br /&gt;
&lt;br /&gt;
==A word about optional plugins and themes==&lt;br /&gt;
&lt;br /&gt;
If you have added optional or customised plugins (whether your own custom developments or from the modules and plugins database) or are using a non-core theme then these will probably work in Moodle 2.1+ if they worked in Moodle 2.0 with the following exceptions:&lt;br /&gt;
* Question types.&lt;br /&gt;
* Activity modules that use the question bank. (There are hardly any of these.)&lt;br /&gt;
&lt;br /&gt;
Again, you are advised to test the upgrade on a copy of your Moodle site.&lt;br /&gt;
&lt;br /&gt;
==Checking database schema - old sites==&lt;br /&gt;
&lt;br /&gt;
If your 2.0 Moodle site has been upgraded through many prior versions it is possible that there will be some problems with the database schema (compared to a fresh 2.0 installation). This may cause the upgrade to fail. If your site started life prior to Moodle 2.0 it is a very good idea to check and correct the database schema before upgrading. See [[Verify Database Schema]]. You should also run the database integrity checks in the XMLDB editor, see the &#039;See also&#039; for a link to extra scripts to check for other discrepancies.&lt;br /&gt;
&lt;br /&gt;
==Now upgrade==&lt;br /&gt;
&lt;br /&gt;
Once you have satisfied the requirements for Moodle 2.1, follow the instructions on the [[Upgrading|upgrading]] page.&lt;br /&gt;
&lt;br /&gt;
On Linux servers, Moodle 2.1 supports running the [[CLI|upgrade from the command line]], rather than through a web browser. This is likely to be more reliable, particularly for large sites.&lt;br /&gt;
&lt;br /&gt;
==After upgrade==&lt;br /&gt;
&lt;br /&gt;
The config.php file from your 2.0 installation should work fine but if you take a look at config-dist.php that came with Moodle 2.0 there are more/different options available (e.g. database drivers and settings). It&#039;s a good idea to map your old config.php settings to a new one based on the 2.1 config-dist.php.&lt;br /&gt;
&lt;br /&gt;
== Known and Discovered Issues ==&lt;br /&gt;
&lt;br /&gt;
* If you get an error about &#039;handling of PHP float numbers&#039;, please see the FAQ about it in the [[Installation FAQ|Installation FAQ]].&lt;br /&gt;
* You now need some additional PHP modules installed (e.g. intl and the zip extension). If you do not have these, installation them depends entirely on how your PHP was first installed and your operating system.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [[dev:Moodle 2.1 release notes]]&lt;br /&gt;
&lt;br /&gt;
[[fr:Mise à jour à Moodle 2.1]]&lt;/div&gt;</summary>
		<author><name>TimHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Upgrading_to_Moodle_2.1&amp;diff=94040</id>
		<title>Upgrading to Moodle 2.1</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Upgrading_to_Moodle_2.1&amp;diff=94040"/>
		<updated>2011-11-23T14:35:23Z</updated>

		<summary type="html">&lt;p&gt;TimHunt: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Installing Moodle}}&lt;br /&gt;
&lt;br /&gt;
You can upgrade to Moodle 2.1 from Moodle 2.0 or 1.9. If you are using an earlier version of Moodle, you must upgrade to the latest Moodle 1.9.x first.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;We advise that you test the upgrade first on a COPY of your production site, to make sure it works as you expect.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
&lt;br /&gt;
* Moodle must be &#039;&#039;&#039;1.9&#039;&#039;&#039; or later (consider upgrading to 2.0 before upgrading to 2.1)&lt;br /&gt;
* PHP must be &#039;&#039;&#039;5.3.2&#039;&#039;&#039; or later&lt;br /&gt;
** Required PHP extensions: iconv, curl, ctype, zip, simplexml, spl, pcre, dom, xml, json&lt;br /&gt;
** Required PHP memory_limit at least 40MB (64MB or more recommended if you have a choice)&lt;br /&gt;
* Databases should be one of the following:&lt;br /&gt;
** MySQL 5.0.25 or later  (InnoDB storage engine highly recommended)&lt;br /&gt;
** PostgreSQL 8.3 or later&lt;br /&gt;
** Oracle 10.2 or later&lt;br /&gt;
** MS SQL 2005 or later&lt;br /&gt;
* Any standards-supporting browser from the past few years, for example:&lt;br /&gt;
** Firefox 3 or later &lt;br /&gt;
** Safari 3 or later &lt;br /&gt;
** Google Chrome 4 or later&lt;br /&gt;
** Opera 9 or later&lt;br /&gt;
** MS Internet Explorer 7 or later (Even [http://googleenterprise.blogspot.com/2010/01/modern-browsers-for-modern-applications.html Google does not support IE6 any more])&lt;br /&gt;
&lt;br /&gt;
==Moodle 2.1 planning==&lt;br /&gt;
&lt;br /&gt;
The biggest change in Moodle 2.1 that affects the upgrade is the new question engine. If you have lots of quiz attempts, you need to plan this upgrade carefully. If you don&#039;t have lots of quiz attempts, you don&#039;t have to worry.&lt;br /&gt;
&lt;br /&gt;
===Planning the question engine upgrade===&lt;br /&gt;
&lt;br /&gt;
The upgrade from Moodle 2.0 to 2.1 needs to do a major transformation of all the quiz attempt data. This is something you need to plan for if you have a lot of quiz attempts.&lt;br /&gt;
&lt;br /&gt;
To gauge whether this will be a problem for you, count the number of rows in the &amp;lt;tt&amp;gt;question_sessions&amp;lt;/tt&amp;gt; table:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code sql&amp;gt;&lt;br /&gt;
SELECT COUNT(1) FROM mdl_question_sessions;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If this number is less than something like 10,000 then you have nothing to worry about.&lt;br /&gt;
* If this number is greater than something like 1,000,000 then you have to plan.&lt;br /&gt;
&lt;br /&gt;
====A helpful plugin====&lt;br /&gt;
&lt;br /&gt;
There is a useful plugin you can install to help you plan the upgrade which you can install from https://github.com/timhunt/moodle-local_qeupgradehelper. If you have a significant number of you are strongly advised to install it.&lt;br /&gt;
&lt;br /&gt;
Once installed, you can access it using the &#039;&#039;&#039;Question engine upgrade helper&#039;&#039;&#039; link in the Site administration menu. This plugin has various features.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;List quizzes and attempts&#039;&#039;&#039; option will count the number of quiz attempts and question sessions (like the query above) but giving more detail. Again, this is a way to get an idea of the scope of the upgrade for you.&lt;br /&gt;
&lt;br /&gt;
====What to do if you have a lot of attempts====&lt;br /&gt;
&lt;br /&gt;
Here are some options to consider:&lt;br /&gt;
&lt;br /&gt;
; Think about whether you really need to keep them all.&lt;br /&gt;
: If you have not thought about your archiving strategy for old quiz attempts before, then this would be a really good time to do so. Do you really need to keep all the old data around? If not, deleting it before you upgrade to 2.1 would be a good idea.&lt;br /&gt;
: If you just need access to the old attempts for archival purposes, perhaps you could achieve that by keeping a copy of your old site from before the upgrade, and then only keeping and upgrading the current quiz attempts on your live system.&lt;br /&gt;
; Upgrade some of the attempts later&lt;br /&gt;
: The technical details for how to do this are in the script &amp;lt;tt&amp;gt;partialupgrade-example.php&amp;lt;/tt&amp;gt; which you will need to edit.&lt;br /&gt;
: After the upgrade, you can complete the upgrade in one of two ways:&lt;br /&gt;
:# You can manually use the &#039;&#039;&#039;Question engine upgrade helper&#039;&#039;&#039; to upgrade the attempt data for any quiz that has not already been done. Use the &#039;&#039;&#039;List quizzes still to upgrade&#039;&#039;&#039; option.&lt;br /&gt;
:# You can set up cron to automatically complete the upgrade using the &#039;&#039;&#039;Configure cron&#039;&#039;&#039; option.&lt;br /&gt;
&lt;br /&gt;
====How to check that the upgrade was successful====&lt;br /&gt;
&lt;br /&gt;
If you want to verify that the upgrade worked successfully, here are some things to check:&lt;br /&gt;
&lt;br /&gt;
* Obviously, look out for any error messages output, or written to the logs, during the upgrade.&lt;br /&gt;
* The upgrade also writes a file into &amp;lt;tt&amp;gt;moodledata/upgradelogs/upg_&#039;&#039;{timestamp}&#039;&#039;.html&amp;lt;/tt&amp;gt;. This lists any places where there were problems with the data in your database, and the upgrade code had to make an assumption about how to proceed. This log file should be self-explanatory, if a bit technical, and it most cases each problem report will include a link to the quiz review page, so you can easily see the result of the upgrade.&lt;br /&gt;
* Finally, if you are testing the upgrade on a copy of your site, you can pick some example quizzes, and open the quiz reports or review pages from before, and after, the upgrade in separate browser windows, and compare to make sure the data is the same. Of course, there will be some differences (we hope the new system is better!) but this does let you check the data.&lt;br /&gt;
&lt;br /&gt;
====What to do if something goes wrong during the upgrade====&lt;br /&gt;
&lt;br /&gt;
I am sure you started by testing the upgrade on a copy of your live site, so if anything goes wrong, you can report the bug, wait for it to be fixed, and then try again.&lt;br /&gt;
&lt;br /&gt;
If you wish to report a bug in the upgrade you may want to look at the instructions on [[dev:Question_Engine_2:Testing]] about how to make the bug report as useful as possible.&lt;br /&gt;
&lt;br /&gt;
After the upgrade, you can use the Question engine upgrade helper plugin to re-do the upgrade of the attempts at any particular quiz. This should let you fix problems, even if you only discover them later. You can do this by using the &#039;&#039;&#039;List already upgrade quizzes that can be reset&#039;&#039;&#039; and &#039;&#039;&#039;List quizzes still to upgrade&#039;&#039;&#039; options.&lt;br /&gt;
&lt;br /&gt;
==Before upgrading please... ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: The upgrade process will irreversibly modify the contents of your database &#039;&#039;&#039;and&#039;&#039;&#039; your moodledata file storage area. If something goes wrong you &#039;&#039;&#039;cannot&#039;&#039;&#039; go back. It is vital that you take good backups of both moodledata and the database in case you have problems with the upgrade. If you are not sure how see [[Site backup]] or ask in the moodle.org forums (explaining what your operating system is).  &lt;br /&gt;
&lt;br /&gt;
* It&#039;s a good idea to read the [[:dev:Moodle 2.1 release notes]]&lt;br /&gt;
* Always check your site to make sure it meets all system requirements for 2.1 in &#039;&#039;Administration &amp;gt; Server &amp;gt; [[Environment]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Do a full database backup!&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Do a full moodledata backup&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Check your backups carefully&#039;&#039;&#039;&lt;br /&gt;
* Remember to purge PHP cache if using any PHP accelerator&lt;br /&gt;
&lt;br /&gt;
==A word about optional plugins and themes==&lt;br /&gt;
&lt;br /&gt;
If you have added optional or customised plugins (whether your own custom developments or from the modules and plugins database) or are using a non-core theme then these will probably work in Moodle 2.1+ if they worked in Moodle 2.0 with the following exceptions:&lt;br /&gt;
* Question types.&lt;br /&gt;
* Activity modules that use the question bank. (There are hardly any of these.)&lt;br /&gt;
&lt;br /&gt;
Again, you are advised to test the upgrade on a copy of your Moodle site.&lt;br /&gt;
&lt;br /&gt;
==Checking database schema - old sites==&lt;br /&gt;
&lt;br /&gt;
If your 2.0 Moodle site has been upgraded through many prior versions it is possible that there will be some problems with the database schema (compared to a fresh 2.0 installation). This may cause the upgrade to fail. If your site started life prior to Moodle 2.0 it is a very good idea to check and correct the database schema before upgrading. See [[Verify Database Schema]]. You should also run the database integrity checks in the XMLDB editor, see the &#039;See also&#039; for a link to extra scripts to check for other discrepancies.&lt;br /&gt;
&lt;br /&gt;
==Now upgrade==&lt;br /&gt;
&lt;br /&gt;
Once you have satisfied the requirements for Moodle 2.1, follow the instructions on the [[Upgrading|upgrading]] page.&lt;br /&gt;
&lt;br /&gt;
On Linux servers, Moodle 2.1 supports running the [[CLI|upgrade from the command line]], rather than through a web browser. This is likely to be more reliable, particularly for large sites.&lt;br /&gt;
&lt;br /&gt;
==After upgrade==&lt;br /&gt;
&lt;br /&gt;
The config.php file from your 2.0 installation should work fine but if you take a look at config-dist.php that came with Moodle 2.0 there are more/different options available (e.g. database drivers and settings). It&#039;s a good idea to map your old config.php settings to a new one based on the 2.1 config-dist.php.&lt;br /&gt;
&lt;br /&gt;
== Known and Discovered Issues ==&lt;br /&gt;
&lt;br /&gt;
* If you get an error about &#039;handling of PHP float numbers&#039;, please see the FAQ about it in the [[Installation FAQ|Installation FAQ]].&lt;br /&gt;
* You now need some additional PHP modules installed (e.g. intl and the zip extension). If you do not have these, installation them depends entirely on how your PHP was first installed and your operating system.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [[dev:Moodle 2.1 release notes]]&lt;br /&gt;
&lt;br /&gt;
[[fr:Mise à jour à Moodle 2.1]]&lt;/div&gt;</summary>
		<author><name>TimHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Moodle_XML_format&amp;diff=93046</id>
		<title>Moodle XML format</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Moodle_XML_format&amp;diff=93046"/>
		<updated>2011-10-31T14:31:58Z</updated>

		<summary type="html">&lt;p&gt;TimHunt: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Export questions}}&lt;br /&gt;
The XML Format is a Moodle-specific format for importing and exporting questions to be used with the [[Quiz module]]. The format has been developed within the Moodle Community but other software may support it to a greater or lesser degree.&lt;br /&gt;
&lt;br /&gt;
==A word about validity (and CDATA)==&lt;br /&gt;
&lt;br /&gt;
The XML parser assumes that the XML file is well formed and does not detect or report errors. If it is not you are very likely to get unexpected errors. If you are hand-coding the XML file it is strongly recommended that you pass it through some sort of XML verifier before importing into Moodle. A simple way to do this is to open the XML file using Firefox or Internet Explorer. &lt;br /&gt;
&lt;br /&gt;
Note particularly that embedded HTML fragments should be within [http://en.wikipedia.org/wiki/CDATA CDATA sections]. CDATA example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code xml&amp;gt;&lt;br /&gt;
 &amp;lt;questiontext format=&amp;quot;html&amp;quot;&amp;gt;&lt;br /&gt;
       &amp;lt;text&amp;gt;&amp;lt;![CDATA[&lt;br /&gt;
              Now I can include &amp;lt;strong&amp;gt;any&amp;lt;/strong&amp;gt; HTML that I&amp;lt;br /&amp;gt;&lt;br /&gt;
              wish. Without the CDATA, the &amp;lt;i&amp;gt;HTML&amp;lt;/i&amp;gt; tags would break&lt;br /&gt;
              the XML!!&lt;br /&gt;
              ]]&amp;gt;&lt;br /&gt;
        &amp;lt;/text&amp;gt;&lt;br /&gt;
 &amp;lt;/questiontext&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Overall structure of XML file==&lt;br /&gt;
&lt;br /&gt;
The file is enclosed by tags as follows. It is &#039;&#039;&#039;important&#039;&#039;&#039; to make sure the xml-line is really the first line of the file. A blank first line turns your otherwise compliant file into a source of frustration. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code xml&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;quiz&amp;gt;&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
&amp;lt;/quiz&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Within the &amp;lt;quiz&amp;gt; tags are any number of &amp;lt;question&amp;gt; tags. One of these &amp;lt;question&amp;gt; tags can be a dummy question with a &#039;&#039;category&#039;&#039; type to specify a category for the import/export. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code xml&amp;gt;&lt;br /&gt;
&amp;lt;question type=&amp;quot;category&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;category&amp;gt;&lt;br /&gt;
        &amp;lt;text&amp;gt;$course$/XXXX&amp;lt;/text&amp;gt;&lt;br /&gt;
    &amp;lt;/category&amp;gt;&lt;br /&gt;
&amp;lt;/question&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where XXXX is the new category name. If the category exists, the question(s) will be added to the existing course; otherwise a new category will be created. This only works if you have &amp;quot;Get category from file&amp;quot; checked.&lt;br /&gt;
&lt;br /&gt;
Multiple categories can be specified in the same file. Just add another dummy &#039;category&#039; question each time you would like to establish a new category and the questions that follow it will be placed there.&lt;br /&gt;
&lt;br /&gt;
The file must be encoded in [[UTF8]]&lt;br /&gt;
&lt;br /&gt;
Moodle XML import and export are balanced in functionality, so if you need to understand the format you can simply create some questions and export them to see what it looks like.&lt;br /&gt;
&lt;br /&gt;
==Tags common to all question types==&lt;br /&gt;
&lt;br /&gt;
A question is written as follows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code xml&amp;gt;&lt;br /&gt;
&amp;lt;question type=&amp;quot;multichoice|truefalse|shortanswer|matching|cloze|essay|numerical|description&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;name&amp;gt;&lt;br /&gt;
         &amp;lt;text&amp;gt;Name of question&amp;lt;/text&amp;gt;&lt;br /&gt;
     &amp;lt;/name&amp;gt;&lt;br /&gt;
     &amp;lt;questiontext format=&amp;quot;html&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;text&amp;gt;What is the answer to this question?&amp;lt;/text&amp;gt;&lt;br /&gt;
     &amp;lt;/questiontext&amp;gt;&lt;br /&gt;
     .&lt;br /&gt;
     .&lt;br /&gt;
     .&lt;br /&gt;
&amp;lt;/question&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Format&amp;quot; selects the [[Formatting options]] for the question text. The options are &#039;&#039;&#039;html&#039;&#039;&#039; (the default), &#039;&#039;&#039;moodle_auto_format&#039;&#039;&#039;, &#039;&#039;&#039;plain_text&#039;&#039;&#039; and &#039;&#039;&#039;markdown&#039;&#039;&#039;. The choice effects the way in which the text will be displayed. &lt;br /&gt;
&lt;br /&gt;
Further tags, which usually include at least one &amp;lt;answer&amp;gt; tag, follow in the space marked with dots as child nodes to the &amp;lt;question&amp;gt; tag. The response-related tags are listed further down on this page. Various (optional?) tags are possible. &lt;br /&gt;
&lt;br /&gt;
* penalty&lt;br /&gt;
* generalfeedback&lt;br /&gt;
* defaultgrade&lt;br /&gt;
* hidden&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;image&amp;gt; tag contains the url of any included image. Nested within the &amp;lt;image&amp;gt; tag may be an &amp;lt;image_base64&amp;gt; tag which contains the actual image data encoded in base64 [http://www.php.net/manual/en/function.base64-encode.php].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;In the following question type examples the common parts of the question are not shown to improve clarity. It&#039;s a good idea to export some examples yourself to see a full example.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Multiple choice==&lt;br /&gt;
&lt;br /&gt;
MC questions have one &amp;lt;answer&amp;gt; tag for each choice. Each choice can carry feedback and score weighting (by using the fraction attribute). In addition, an MC question has the following tags:&lt;br /&gt;
&lt;br /&gt;
* single &#039;&#039;(values: true/false)&#039;&#039;&lt;br /&gt;
* shuffleanswers &#039;&#039;(values: 1/0)&#039;&#039;&lt;br /&gt;
* correctfeedback &lt;br /&gt;
* partiallycorrectfeedback &lt;br /&gt;
* incorrectfeedback&lt;br /&gt;
* answernumbering (allowed values: &#039;none&#039;, &#039;abc&#039;, &#039;ABCD&#039; or &#039;123&#039;)&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;single&amp;gt; tag is used to distinguish single response (radio button) and multiple response (checkbox) variants.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code xml&amp;gt;&lt;br /&gt;
&amp;lt;question type=&amp;quot;multichoice&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;answer fraction=&amp;quot;100&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;text&amp;gt;The correct answer&amp;lt;/text&amp;gt;&lt;br /&gt;
    &amp;lt;feedback&amp;gt;&amp;lt;text&amp;gt;Correct!&amp;lt;/text&amp;gt;&amp;lt;/feedback&amp;gt;&lt;br /&gt;
 &amp;lt;/answer&amp;gt;&lt;br /&gt;
 &amp;lt;answer fraction=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;text&amp;gt;A distractor&amp;lt;/text&amp;gt;&lt;br /&gt;
    &amp;lt;feedback&amp;gt;&amp;lt;text&amp;gt;Ooops!&amp;lt;/text&amp;gt;&amp;lt;/feedback&amp;gt;&lt;br /&gt;
 &amp;lt;/answer&amp;gt;&lt;br /&gt;
 &amp;lt;answer fraction=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;text&amp;gt;Another distractor&amp;lt;/text&amp;gt;&lt;br /&gt;
    &amp;lt;feedback&amp;gt;&amp;lt;text&amp;gt;Ooops!&amp;lt;/text&amp;gt;&amp;lt;/feedback&amp;gt;&lt;br /&gt;
 &amp;lt;/answer&amp;gt;&lt;br /&gt;
 &amp;lt;shuffleanswers&amp;gt;1&amp;lt;/shuffleanswers&amp;gt;&lt;br /&gt;
 &amp;lt;single&amp;gt;true&amp;lt;/single&amp;gt;&lt;br /&gt;
 &amp;lt;answernumbering&amp;gt;abc&amp;lt;/answernumbering&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== True/false ==&lt;br /&gt;
&lt;br /&gt;
Two answer tags are given, one which is true, and one which is false. The fraction attribute of the answer tag identifies which option is correct (100) and which is false (0). Feedback is supported. The following example shows the format when true is the correct answer and false is wrong.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code xml&amp;gt;&lt;br /&gt;
 &amp;lt;question type=&amp;quot;truefalse&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;answer fraction=&amp;quot;100&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;text&amp;gt;true&amp;lt;/text&amp;gt;&lt;br /&gt;
    &amp;lt;feedback&amp;gt;&amp;lt;text&amp;gt;Correct!&amp;lt;/text&amp;gt;&amp;lt;/feedback&amp;gt;&lt;br /&gt;
 &amp;lt;/answer&amp;gt;&lt;br /&gt;
 &amp;lt;answer fraction=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;text&amp;gt;false&amp;lt;/text&amp;gt;&lt;br /&gt;
    &amp;lt;feedback&amp;gt;&amp;lt;text&amp;gt;Ooops!&amp;lt;/text&amp;gt;&amp;lt;/feedback&amp;gt;&lt;br /&gt;
 &amp;lt;/answer&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Short answer  ==&lt;br /&gt;
&lt;br /&gt;
The short answer question type supports alternative correct responses, each with its own weighting and feedback.  The Moodle XML format uses one &amp;lt;answer&amp;gt; tag for each of the alternative correct answers.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;usecase&amp;gt; tag toggles case-sensitivity with the values 1/0. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code xml&amp;gt;&lt;br /&gt;
 &amp;lt;question type=&amp;quot;shortanswer&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;answer fraction=&amp;quot;100&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;text&amp;gt;The correct answer&amp;lt;/text&amp;gt;&lt;br /&gt;
     &amp;lt;feedback&amp;gt;&amp;lt;text&amp;gt;Correct!&amp;lt;/text&amp;gt;&amp;lt;/feedback&amp;gt;&lt;br /&gt;
 &amp;lt;/answer&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;question type=&amp;quot;shortanswer&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;answer fraction=&amp;quot;100&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;text&amp;gt;The correct answer&amp;lt;/text&amp;gt;&lt;br /&gt;
     &amp;lt;feedback&amp;gt;&amp;lt;text&amp;gt;Correct!&amp;lt;/text&amp;gt;&amp;lt;/feedback&amp;gt;&lt;br /&gt;
 &amp;lt;/answer&amp;gt;&lt;br /&gt;
 &amp;lt;answer fraction=&amp;quot;100&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;text&amp;gt;An alternative answer&amp;lt;/text&amp;gt;&lt;br /&gt;
     &amp;lt;feedback&amp;gt;&amp;lt;text&amp;gt;Correct!&amp;lt;/text&amp;gt;&amp;lt;/feedback&amp;gt;&lt;br /&gt;
 &amp;lt;/answer&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Numerical response ==&lt;br /&gt;
&lt;br /&gt;
The following is a simplified version of the Moodle XML format for numerical responses.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code xml&amp;gt;&lt;br /&gt;
 &amp;lt;question type=&amp;quot;numerical&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;answer fraction=&amp;quot;100&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;text&amp;gt;23&amp;lt;/text&amp;gt;&lt;br /&gt;
     &amp;lt;feedback&amp;gt;&amp;lt;text&amp;gt;Feedback&amp;lt;/text&amp;gt;&amp;lt;/feedback&amp;gt;&lt;br /&gt;
 &amp;lt;/answer&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moodle also supports a &amp;lt;tolerance&amp;gt; tag (how accurate must the number be?) and one or more &amp;lt;unit&amp;gt; tags. Unit tags have names and multipliers. E.g. if the main answer is in kilometres, an additional answer could be the equivalent in metres with a multiplier of 1000.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; prior to 1.7.2 the fraction was expressed as a value between 0 and 1 in a &amp;lt;fraction&amp;gt; element and the answer value was &#039;&#039;&#039;not&#039;&#039;&#039; enclosed in &amp;lt;text&amp;gt; tags. This format of the numerical question type is deprecated but will still be correctly imported if found (for now).&lt;br /&gt;
&lt;br /&gt;
== Matching ==&lt;br /&gt;
&lt;br /&gt;
Pair matching responses use the &amp;lt;shuffleanswers&amp;gt; tag to determine whether the order of the items should be randomized.&lt;br /&gt;
Each pair is contained inside a &amp;lt;subquestion&amp;gt; tag. The first item of each pair is contained with a &amp;lt;text&amp;gt; tag, while the second has an &amp;lt;answer&amp;gt; tag around it as well. Feedback and score weighting is not supported by Moodle for this response type.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code xml&amp;gt;&lt;br /&gt;
 &amp;lt;question type=&amp;quot;matching&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;subquestion&amp;gt;&lt;br /&gt;
     &amp;lt;text&amp;gt;This is the 1st item in the 1st pair.&amp;lt;/text&amp;gt;&lt;br /&gt;
     &amp;lt;answer&amp;gt;&lt;br /&gt;
         &amp;lt;text&amp;gt;This is the 2nd item in the 1st pair.&amp;lt;/text&amp;gt;&lt;br /&gt;
     &amp;lt;/answer&amp;gt;&lt;br /&gt;
 &amp;lt;/subquestion&amp;gt;&lt;br /&gt;
 &amp;lt;subquestion&amp;gt;&lt;br /&gt;
     &amp;lt;text&amp;gt;This is the 1st item in the 2nd pair.&amp;lt;/text&amp;gt;&lt;br /&gt;
     &amp;lt;answer&amp;gt;&lt;br /&gt;
         &amp;lt;text&amp;gt;This is the 2nd item in the 2nd pair.&amp;lt;/text&amp;gt;&lt;br /&gt;
     &amp;lt;/answer&amp;gt;&lt;br /&gt;
 &amp;lt;/subquestion&amp;gt;&lt;br /&gt;
 &amp;lt;shuffleanswers&amp;gt;true&amp;lt;/shuffleanswers&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Essay ==&lt;br /&gt;
&lt;br /&gt;
An example of the essay type question...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code xml&amp;gt;&lt;br /&gt;
  &amp;lt;question type=&amp;quot;essay&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;answer fraction=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;text&amp;gt;&amp;lt;/text&amp;gt;&lt;br /&gt;
    &amp;lt;/answer&amp;gt;&lt;br /&gt;
  &amp;lt;/question&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There isn&#039;t an answer and there isn&#039;t a grade in this case. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; prior to 1.7.2 the fraction was expressed as a value between 0 and 1 in a &amp;lt;fraction&amp;gt; element and the answer value was &#039;&#039;&#039;not&#039;&#039;&#039; enclosed in &amp;lt;text&amp;gt; tags. This format of the essay question type is deprecated but will still be correctly imported if found (for now).&lt;br /&gt;
&lt;br /&gt;
== Other question types ==&lt;br /&gt;
&lt;br /&gt;
=== Cloze ===&lt;br /&gt;
&lt;br /&gt;
It is supported, and depends on a special format for the &amp;lt;questiontext&amp;gt; tag.&lt;br /&gt;
&lt;br /&gt;
=== Description response type===&lt;br /&gt;
&lt;br /&gt;
This response type has no further tags other than those contained in the question header (such as &amp;lt;questiontext&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== Random matching ===&lt;br /&gt;
&lt;br /&gt;
Moodle has a question type which consists of taking short answer questions in the same quiz and displaying them as a pair matching exercise. However Moodle is neither able to export nor import this question type.&lt;br /&gt;
&lt;br /&gt;
==Text formats==&lt;br /&gt;
&lt;br /&gt;
Moodle XML files should explicity specify the text format (&#039;&#039;&#039;html&#039;&#039;&#039;, &#039;&#039;&#039;moodle_auto_format&#039;&#039;&#039;, &#039;&#039;&#039;plain_text&#039;&#039;&#039; and &#039;&#039;&#039;markdown&#039;&#039;&#039; - these correspond to the constants , FORMAT_HTML, FORMAT_MOODLE, etc used in the Moodle code) for each piece of content. Note that, by default, the format should be specified on the parent of the &amp;lt;text&amp;gt; element. This is slightly odd, but a remnant of history.&lt;br /&gt;
&lt;br /&gt;
If the format is not specified for the questiontext, then &#039;&#039;&#039;html&#039;&#039;&#039; is the default. If the format is not specified on any other part of the question, then the format of the questiontext is the default.&lt;br /&gt;
&lt;br /&gt;
(This default changed around November 2011. Before that, the default was &#039;&#039;&#039;moodle_auto_format&#039;&#039;&#039; whenever the format was not specified.)&lt;br /&gt;
&lt;br /&gt;
==Useful utilities==&lt;br /&gt;
*[http://vletools.com Online Moodle XML converter] Convert from existing text files glossaries and quizzes to Moodle XML format. Also can convert from Moodle XMl to text. &lt;br /&gt;
*[http://finemetronome.com/moodle/ Word Template for generating Moodle XML].&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [http://www.qedoc.org/en/index.php?title=Moodle_XML_format Quedoc&#039;s Moodle XML documentation]&lt;br /&gt;
*[[Aiken format]]&lt;br /&gt;
*[[XML FAQ]]&lt;br /&gt;
*[[Import and export FAQ]] &lt;br /&gt;
&lt;br /&gt;
[[ja:Moodle XMLフォーマット]]&lt;br /&gt;
[[de: Moodle XML-Format]]&lt;/div&gt;</summary>
		<author><name>TimHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Moodle_XML_format&amp;diff=93045</id>
		<title>Moodle XML format</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Moodle_XML_format&amp;diff=93045"/>
		<updated>2011-10-31T12:39:32Z</updated>

		<summary type="html">&lt;p&gt;TimHunt: /* Tags common to all question types */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Export questions}}&lt;br /&gt;
The XML Format is a Moodle-specific format for importing and exporting questions to be used with the [[Quiz module]]. The format has been developed within the Moodle Community but other software may support it to a greater or lesser degree.&lt;br /&gt;
&lt;br /&gt;
==A word about validity (and CDATA)==&lt;br /&gt;
&lt;br /&gt;
The XML parser assumes that the XML file is well formed and does not detect or report errors. If it is not you are very likely to get unexpected errors. If you are hand-coding the XML file it is strongly recommended that you pass it through some sort of XML verifier before importing into Moodle. A simple way to do this is to open the XML file using Firefox or Internet Explorer. &lt;br /&gt;
&lt;br /&gt;
Note particularly that embedded HTML fragments should be within [http://en.wikipedia.org/wiki/CDATA CDATA sections]. CDATA example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code xml&amp;gt;&lt;br /&gt;
 &amp;lt;questiontext format=&amp;quot;html&amp;quot;&amp;gt;&lt;br /&gt;
       &amp;lt;text&amp;gt;&amp;lt;![CDATA[&lt;br /&gt;
              Now I can include &amp;lt;strong&amp;gt;any&amp;lt;/strong&amp;gt; HTML that I&amp;lt;br /&amp;gt;&lt;br /&gt;
              wish. Without the CDATA, the &amp;lt;i&amp;gt;HTML&amp;lt;/i&amp;gt; tags would break&lt;br /&gt;
              the XML!!&lt;br /&gt;
              ]]&amp;gt;&lt;br /&gt;
        &amp;lt;/text&amp;gt;&lt;br /&gt;
 &amp;lt;/questiontext&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Overall structure of XML file==&lt;br /&gt;
&lt;br /&gt;
The file is enclosed by tags as follows. It is &#039;&#039;&#039;important&#039;&#039;&#039; to make sure the xml-line is really the first line of the file. A blank first line turns your otherwise compliant file into a source of frustration. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code xml&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;quiz&amp;gt;&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
&amp;lt;/quiz&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Within the &amp;lt;quiz&amp;gt; tags are any number of &amp;lt;question&amp;gt; tags. One of these &amp;lt;question&amp;gt; tags can be a dummy question with a &#039;&#039;category&#039;&#039; type to specify a category for the import/export. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code xml&amp;gt;&lt;br /&gt;
&amp;lt;question type=&amp;quot;category&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;category&amp;gt;&lt;br /&gt;
        &amp;lt;text&amp;gt;$course$/XXXX&amp;lt;/text&amp;gt;&lt;br /&gt;
    &amp;lt;/category&amp;gt;&lt;br /&gt;
&amp;lt;/question&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where XXXX is the new category name. If the category exists, the question(s) will be added to the existing course; otherwise a new category will be created. This only works if you have &amp;quot;Get category from file&amp;quot; checked.&lt;br /&gt;
&lt;br /&gt;
Multiple categories can be specified in the same file. Just add another dummy &#039;category&#039; question each time you would like to establish a new category and the questions that follow it will be placed there.&lt;br /&gt;
&lt;br /&gt;
The file must be encoded in [[UTF8]]&lt;br /&gt;
&lt;br /&gt;
Moodle XML import and export are balanced in functionality, so if you need to understand the format you can simply create some questions and export them to see what it looks like.&lt;br /&gt;
&lt;br /&gt;
==Tags common to all question types==&lt;br /&gt;
&lt;br /&gt;
A question is written as follows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code xml&amp;gt;&lt;br /&gt;
&amp;lt;question type=&amp;quot;multichoice|truefalse|shortanswer|matching|cloze|essay|numerical|description&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;name&amp;gt;&lt;br /&gt;
         &amp;lt;text&amp;gt;Name of question&amp;lt;/text&amp;gt;&lt;br /&gt;
     &amp;lt;/name&amp;gt;&lt;br /&gt;
     &amp;lt;questiontext format=&amp;quot;html&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;text&amp;gt;What is the answer to this question?&amp;lt;/text&amp;gt;&lt;br /&gt;
     &amp;lt;/questiontext&amp;gt;&lt;br /&gt;
     .&lt;br /&gt;
     .&lt;br /&gt;
     .&lt;br /&gt;
&amp;lt;/question&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Format&amp;quot; selects the [[Formatting options]] for the question text. The options are &#039;&#039;&#039;html&#039;&#039;&#039; (the default), &#039;&#039;&#039;moodle_auto_format&#039;&#039;&#039;, &#039;&#039;&#039;plain_text&#039;&#039;&#039; and &#039;&#039;&#039;markdown&#039;&#039;&#039;. The choice effects the way in which the text will be displayed. &lt;br /&gt;
&lt;br /&gt;
Further tags, which usually include at least one &amp;lt;answer&amp;gt; tag, follow in the space marked with dots as child nodes to the &amp;lt;question&amp;gt; tag. The response-related tags are listed further down on this page. Various (optional?) tags are possible. &lt;br /&gt;
&lt;br /&gt;
* penalty&lt;br /&gt;
* generalfeedback&lt;br /&gt;
* defaultgrade&lt;br /&gt;
* hidden&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;image&amp;gt; tag contains the url of any included image. Nested within the &amp;lt;image&amp;gt; tag may be an &amp;lt;image_base64&amp;gt; tag which contains the actual image data encoded in base64 [http://www.php.net/manual/en/function.base64-encode.php].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;In the following question type examples the common parts of the question are not shown to improve clarity. It&#039;s a good idea to export some examples yourself to see a full example.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Multiple choice==&lt;br /&gt;
&lt;br /&gt;
MC questions have one &amp;lt;answer&amp;gt; tag for each choice. Each choice can carry feedback and score weighting (by using the fraction attribute). In addition, an MC question has the following tags:&lt;br /&gt;
&lt;br /&gt;
* single &#039;&#039;(values: true/false)&#039;&#039;&lt;br /&gt;
* shuffleanswers &#039;&#039;(values: 1/0)&#039;&#039;&lt;br /&gt;
* correctfeedback &lt;br /&gt;
* partiallycorrectfeedback &lt;br /&gt;
* incorrectfeedback&lt;br /&gt;
* answernumbering (allowed values: &#039;none&#039;, &#039;abc&#039;, &#039;ABCD&#039; or &#039;123&#039;)&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;single&amp;gt; tag is used to distinguish single response (radio button) and multiple response (checkbox) variants.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code xml&amp;gt;&lt;br /&gt;
&amp;lt;question type=&amp;quot;multichoice&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;answer fraction=&amp;quot;100&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;text&amp;gt;The correct answer&amp;lt;/text&amp;gt;&lt;br /&gt;
    &amp;lt;feedback&amp;gt;&amp;lt;text&amp;gt;Correct!&amp;lt;/text&amp;gt;&amp;lt;/feedback&amp;gt;&lt;br /&gt;
 &amp;lt;/answer&amp;gt;&lt;br /&gt;
 &amp;lt;answer fraction=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;text&amp;gt;A distractor&amp;lt;/text&amp;gt;&lt;br /&gt;
    &amp;lt;feedback&amp;gt;&amp;lt;text&amp;gt;Ooops!&amp;lt;/text&amp;gt;&amp;lt;/feedback&amp;gt;&lt;br /&gt;
 &amp;lt;/answer&amp;gt;&lt;br /&gt;
 &amp;lt;answer fraction=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;text&amp;gt;Another distractor&amp;lt;/text&amp;gt;&lt;br /&gt;
    &amp;lt;feedback&amp;gt;&amp;lt;text&amp;gt;Ooops!&amp;lt;/text&amp;gt;&amp;lt;/feedback&amp;gt;&lt;br /&gt;
 &amp;lt;/answer&amp;gt;&lt;br /&gt;
 &amp;lt;shuffleanswers&amp;gt;1&amp;lt;/shuffleanswers&amp;gt;&lt;br /&gt;
 &amp;lt;single&amp;gt;true&amp;lt;/single&amp;gt;&lt;br /&gt;
 &amp;lt;answernumbering&amp;gt;abc&amp;lt;/answernumbering&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== True/false ==&lt;br /&gt;
&lt;br /&gt;
Two answer tags are given, one which is true, and one which is false. The fraction attribute of the answer tag identifies which option is correct (100) and which is false (0). Feedback is supported. The following example shows the format when true is the correct answer and false is wrong.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code xml&amp;gt;&lt;br /&gt;
 &amp;lt;question type=&amp;quot;truefalse&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;answer fraction=&amp;quot;100&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;text&amp;gt;true&amp;lt;/text&amp;gt;&lt;br /&gt;
    &amp;lt;feedback&amp;gt;&amp;lt;text&amp;gt;Correct!&amp;lt;/text&amp;gt;&amp;lt;/feedback&amp;gt;&lt;br /&gt;
 &amp;lt;/answer&amp;gt;&lt;br /&gt;
 &amp;lt;answer fraction=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;text&amp;gt;false&amp;lt;/text&amp;gt;&lt;br /&gt;
    &amp;lt;feedback&amp;gt;&amp;lt;text&amp;gt;Ooops!&amp;lt;/text&amp;gt;&amp;lt;/feedback&amp;gt;&lt;br /&gt;
 &amp;lt;/answer&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Short answer  ==&lt;br /&gt;
&lt;br /&gt;
The short answer question type supports alternative correct responses, each with its own weighting and feedback.  The Moodle XML format uses one &amp;lt;answer&amp;gt; tag for each of the alternative correct answers.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;usecase&amp;gt; tag toggles case-sensitivity with the values 1/0. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code xml&amp;gt;&lt;br /&gt;
 &amp;lt;question type=&amp;quot;shortanswer&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;answer fraction=&amp;quot;100&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;text&amp;gt;The correct answer&amp;lt;/text&amp;gt;&lt;br /&gt;
     &amp;lt;feedback&amp;gt;&amp;lt;text&amp;gt;Correct!&amp;lt;/text&amp;gt;&amp;lt;/feedback&amp;gt;&lt;br /&gt;
 &amp;lt;/answer&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;question type=&amp;quot;shortanswer&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;answer fraction=&amp;quot;100&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;text&amp;gt;The correct answer&amp;lt;/text&amp;gt;&lt;br /&gt;
     &amp;lt;feedback&amp;gt;&amp;lt;text&amp;gt;Correct!&amp;lt;/text&amp;gt;&amp;lt;/feedback&amp;gt;&lt;br /&gt;
 &amp;lt;/answer&amp;gt;&lt;br /&gt;
 &amp;lt;answer fraction=&amp;quot;100&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;text&amp;gt;An alternative answer&amp;lt;/text&amp;gt;&lt;br /&gt;
     &amp;lt;feedback&amp;gt;&amp;lt;text&amp;gt;Correct!&amp;lt;/text&amp;gt;&amp;lt;/feedback&amp;gt;&lt;br /&gt;
 &amp;lt;/answer&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Numerical response ==&lt;br /&gt;
&lt;br /&gt;
The following is a simplified version of the Moodle XML format for numerical responses.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code xml&amp;gt;&lt;br /&gt;
 &amp;lt;question type=&amp;quot;numerical&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;answer fraction=&amp;quot;100&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;text&amp;gt;23&amp;lt;/text&amp;gt;&lt;br /&gt;
     &amp;lt;feedback&amp;gt;&amp;lt;text&amp;gt;Feedback&amp;lt;/text&amp;gt;&amp;lt;/feedback&amp;gt;&lt;br /&gt;
 &amp;lt;/answer&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moodle also supports a &amp;lt;tolerance&amp;gt; tag (how accurate must the number be?) and one or more &amp;lt;unit&amp;gt; tags. Unit tags have names and multipliers. E.g. if the main answer is in kilometres, an additional answer could be the equivalent in metres with a multiplier of 1000.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; prior to 1.7.2 the fraction was expressed as a value between 0 and 1 in a &amp;lt;fraction&amp;gt; element and the answer value was &#039;&#039;&#039;not&#039;&#039;&#039; enclosed in &amp;lt;text&amp;gt; tags. This format of the numerical question type is deprecated but will still be correctly imported if found (for now).&lt;br /&gt;
&lt;br /&gt;
== Matching ==&lt;br /&gt;
&lt;br /&gt;
Pair matching responses use the &amp;lt;shuffleanswers&amp;gt; tag to determine whether the order of the items should be randomized.&lt;br /&gt;
Each pair is contained inside a &amp;lt;subquestion&amp;gt; tag. The first item of each pair is contained with a &amp;lt;text&amp;gt; tag, while the second has an &amp;lt;answer&amp;gt; tag around it as well. Feedback and score weighting is not supported by Moodle for this response type.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code xml&amp;gt;&lt;br /&gt;
 &amp;lt;question type=&amp;quot;matching&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;subquestion&amp;gt;&lt;br /&gt;
     &amp;lt;text&amp;gt;This is the 1st item in the 1st pair.&amp;lt;/text&amp;gt;&lt;br /&gt;
     &amp;lt;answer&amp;gt;&lt;br /&gt;
         &amp;lt;text&amp;gt;This is the 2nd item in the 1st pair.&amp;lt;/text&amp;gt;&lt;br /&gt;
     &amp;lt;/answer&amp;gt;&lt;br /&gt;
 &amp;lt;/subquestion&amp;gt;&lt;br /&gt;
 &amp;lt;subquestion&amp;gt;&lt;br /&gt;
     &amp;lt;text&amp;gt;This is the 1st item in the 2nd pair.&amp;lt;/text&amp;gt;&lt;br /&gt;
     &amp;lt;answer&amp;gt;&lt;br /&gt;
         &amp;lt;text&amp;gt;This is the 2nd item in the 2nd pair.&amp;lt;/text&amp;gt;&lt;br /&gt;
     &amp;lt;/answer&amp;gt;&lt;br /&gt;
 &amp;lt;/subquestion&amp;gt;&lt;br /&gt;
 &amp;lt;shuffleanswers&amp;gt;true&amp;lt;/shuffleanswers&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Essay ==&lt;br /&gt;
&lt;br /&gt;
An example of the essay type question...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code xml&amp;gt;&lt;br /&gt;
  &amp;lt;question type=&amp;quot;essay&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;answer fraction=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;text&amp;gt;&amp;lt;/text&amp;gt;&lt;br /&gt;
    &amp;lt;/answer&amp;gt;&lt;br /&gt;
  &amp;lt;/question&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There isn&#039;t an answer and there isn&#039;t a grade in this case. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; prior to 1.7.2 the fraction was expressed as a value between 0 and 1 in a &amp;lt;fraction&amp;gt; element and the answer value was &#039;&#039;&#039;not&#039;&#039;&#039; enclosed in &amp;lt;text&amp;gt; tags. This format of the essay question type is deprecated but will still be correctly imported if found (for now).&lt;br /&gt;
&lt;br /&gt;
== Other question types ==&lt;br /&gt;
&lt;br /&gt;
=== Cloze ===&lt;br /&gt;
&lt;br /&gt;
It is supported, and depends on a special format for the &amp;lt;questiontext&amp;gt; tag.&lt;br /&gt;
&lt;br /&gt;
=== Description response type===&lt;br /&gt;
&lt;br /&gt;
This response type has no further tags other than those contained in the question header (such as &amp;lt;questiontext&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== Random matching ===&lt;br /&gt;
&lt;br /&gt;
Moodle has a question type which consists of taking short answer questions in the same quiz and displaying them as a pair matching exercise. However Moodle is neither able to export nor import this question type.&lt;br /&gt;
&lt;br /&gt;
==Useful utilities==&lt;br /&gt;
*[http://vletools.com Online Moodle XML converter] Convert from existing text files glossaries and quizzes to Moodle XML format. Also can convert from Moodle XMl to text. &lt;br /&gt;
*[http://finemetronome.com/moodle/ Word Template for generating Moodle XML].&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [http://www.qedoc.org/en/index.php?title=Moodle_XML_format Quedoc&#039;s Moodle XML documentation]&lt;br /&gt;
*[[Aiken format]]&lt;br /&gt;
*[[XML FAQ]]&lt;br /&gt;
*[[Import and export FAQ]] &lt;br /&gt;
&lt;br /&gt;
[[ja:Moodle XMLフォーマット]]&lt;br /&gt;
[[de: Moodle XML-Format]]&lt;/div&gt;</summary>
		<author><name>TimHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Debugging&amp;diff=89963</id>
		<title>Debugging</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Debugging&amp;diff=89963"/>
		<updated>2011-09-20T08:26:53Z</updated>

		<summary type="html">&lt;p&gt;TimHunt: Reverted edits by Vicentina (talk) to last revision by Tsala&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Developer tools}}&lt;br /&gt;
&lt;br /&gt;
Location: &#039;&#039;Settings &amp;gt; Site administration &amp;gt; Development &amp;gt; Debugging&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Debugging messages are intended to help diagnose problems and/or help Moodle developers. If you have a problem with your Moodle site and ask for help in a Moodle.org forum, a developer may ask you to turn debug messages on, in order to locate the cause of the problem. By default Moodle does not show any error messages at all. If you are having problems (e.g. blank screens or incomplete screens) turning on debugging is usually the first thing to try. &lt;br /&gt;
&lt;br /&gt;
==Debugging settings==&lt;br /&gt;
Here are the settings on the Debugging page:&lt;br /&gt;
&lt;br /&gt;
===Debug messages===&lt;br /&gt;
The default is none, your choices are:&lt;br /&gt;
&lt;br /&gt;
;NONE : Do not show any errors or warnings (Default) &lt;br /&gt;
;ALL : Show all reasonable PHP debug messages&lt;br /&gt;
;MINIMAL : Show only fatal errors&lt;br /&gt;
;NORMAL : Show warnings, errors and notices&lt;br /&gt;
;DEVELOPER : extra Moodle debug messages for developers&lt;br /&gt;
&lt;br /&gt;
There is rarely any advantage in going to Developer level, unless you are a developer, in which case it is strongly recommended.&lt;br /&gt;
&lt;br /&gt;
Once you have got the error message, and copied and pasted it somewhere.  HIGHLY RECOMMENDED to turn Debug back to NONE. Debug messages can give clues to a hacker as to the setup of your site.&lt;br /&gt;
&lt;br /&gt;
===Display debug messages===&lt;br /&gt;
&lt;br /&gt;
There is an option to choose whether to display error messages or simply record them in the server logs.&lt;br /&gt;
&lt;br /&gt;
===Debug email sending===&lt;br /&gt;
&lt;br /&gt;
Determines whether or not to enable verbose debug information during sending of email messages to SMTP server.&lt;br /&gt;
&lt;br /&gt;
===Performance info===&lt;br /&gt;
&lt;br /&gt;
The Performance info option determines whether performance info will be included in the footer of the standard theme (and some other themes). Performance info includes the time for the page to load, the amount of memory used to generate the page, cpu usage, load, and the record cache hit/miss ration.&lt;br /&gt;
&lt;br /&gt;
If you add&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
define(&#039;MDL_PERF&#039;, true);&lt;br /&gt;
define(&#039;MDL_PERFDB&#039;, true);&lt;br /&gt;
define(&#039;MDL_PERFTOLOG&#039;, true);&lt;br /&gt;
define(&#039;MDL_PERFTOFOOT&#039;, true);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
to your config.php file, then it will also count database queries. (This has to be in config.php, because Moodle starts doing DB queries before it loads the config information in the database!&lt;br /&gt;
&lt;br /&gt;
===Show origin of language strings===&lt;br /&gt;
Helps translators.&lt;br /&gt;
&lt;br /&gt;
===Show validator links===&lt;br /&gt;
Be careful, read the warning.&lt;br /&gt;
&lt;br /&gt;
===Show page information===&lt;br /&gt;
To show page information printed in the page footer.&lt;br /&gt;
&lt;br /&gt;
==What to do if you cannot get to the admin screens==&lt;br /&gt;
&lt;br /&gt;
If the error is stopping you even getting to the admin screens to turn on debugging, then you can set the debugging setting manually.&lt;br /&gt;
&lt;br /&gt;
===Try typing the URL directly===&lt;br /&gt;
&lt;br /&gt;
The debug settings are at the URL &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;http://.../admin/settings.php?section=debugging&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; on your server. Sometimes that URL will work, even though the pages you need to go to to get there (for example the site front page) do not. So it is worth trying to enter that URL directly.&lt;br /&gt;
&lt;br /&gt;
===In config.php===&lt;br /&gt;
&lt;br /&gt;
In moodle/config.php you can add the lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$CFG-&amp;gt;debug = 2047; &lt;br /&gt;
$CFG-&amp;gt;debugdisplay = 1;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or even more debugging messages:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$CFG-&amp;gt;debug = 6143; &lt;br /&gt;
$CFG-&amp;gt;debugdisplay = 1;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For Moodle 2.0 the possible settings are as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
// Force a debugging mode regardless the settings in the site administration&lt;br /&gt;
// @error_reporting(1023);  // NOT FOR PRODUCTION SERVERS!&lt;br /&gt;
@ini_set(&#039;display_errors&#039;, &#039;1&#039;); // NOT FOR PRODUCTION SERVERS!&lt;br /&gt;
$CFG-&amp;gt;debug = 38911;  // DEBUG_DEVELOPER // NOT FOR PRODUCTION SERVERS!&lt;br /&gt;
$CFG-&amp;gt;debugdisplay = true;   // NOT FOR PRODUCTION SERVERS!&lt;br /&gt;
&lt;br /&gt;
// You can specify a comma separated list of user ids that that always see&lt;br /&gt;
// debug messages, this overrides the debug flag in $CFG-&amp;gt;debug and $CFG-&amp;gt;debugdisplay&lt;br /&gt;
// for these users only.&lt;br /&gt;
$CFG-&amp;gt;debugusers = &#039;2&#039;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remember to remove those lines again when you have finished diagnosing your problem.&lt;br /&gt;
&lt;br /&gt;
===In the database===&lt;br /&gt;
&lt;br /&gt;
Using a tool like phpMyAdmin, execute the following SQL commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code sql&amp;gt;&lt;br /&gt;
UPDATE mdl_config SET value = 2047 WHERE name = &#039;debug&#039;;&lt;br /&gt;
UPDATE mdl_config SET value = 1 WHERE name = &#039;debugdisplay&#039;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To turn it back off, use the admin screens, or the commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code sql&amp;gt;&lt;br /&gt;
UPDATE mdl_config SET value = 0 WHERE name = &#039;debug&#039;;&lt;br /&gt;
UPDATE mdl_config SET value = 0 WHERE name = &#039;debugdisplay&#039;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(If you use a different database prefix, you will need to adjust those commands accordingly.)&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* Using Moodle [http://moodle.org/mod/forum/discuss.php?d=91031 Debugging Turned on to Developer Mode on 1.8.2] forum discussion including instructions on how to turn debugging off&lt;br /&gt;
* Developers can also use [http://xdebug.org/ XDEBUG] (Installed as a module on the Apache server) to further dig into the code, step by step using an [http://xdebug.org/docs/remote XDEBUG client application]. Probably, as part of their favorite IDE. For example: [http://php.netbeans.org/ NetBeans], [http://www.jetbrains.com/phpstorm/ phpStorm] or...&lt;br /&gt;
&lt;br /&gt;
[[Category:Site administration]]&lt;br /&gt;
&lt;br /&gt;
[[fr:Débogage]]&lt;/div&gt;</summary>
		<author><name>TimHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=You_Might_Be_a_Moodler&amp;diff=88876</id>
		<title>You Might Be a Moodler</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=You_Might_Be_a_Moodler&amp;diff=88876"/>
		<updated>2011-08-29T16:50:33Z</updated>

		<summary type="html">&lt;p&gt;TimHunt: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In the spirit of Jeff Foxworthy&#039;s &#039;&#039;You Might be a Redneck&#039;&#039; - http://www.jefffoxworthy.com/comedy/jod/index.shtml &lt;br /&gt;
&lt;br /&gt;
*If you have ever turned on a football game and and the orange uniforms of one team caused you to leap up from the sofa and check out moodle.org, you might be a Moodler.&lt;br /&gt;
&lt;br /&gt;
*If you type &amp;quot;moodle.org&amp;quot; in your browser when you intend to type &amp;quot;google.com.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*If you look up recipes in moodle.org.&lt;br /&gt;
&lt;br /&gt;
*If you look up recipes in moodle.org... and [http://moodle.org/mod/forum/discuss.php?d=5395&amp;amp;parent=30227 find them]!&lt;br /&gt;
&lt;br /&gt;
*If you can spell &#039;&#039;&#039;Dougiamas&#039;&#039;&#039; without having to look it up.&lt;br /&gt;
&lt;br /&gt;
*If you can &#039;&#039;pronounce&#039;&#039; &#039;&#039;&#039;Dougiamas&#039;&#039;&#039; without having to look it up.&lt;br /&gt;
&lt;br /&gt;
*If you check the Moodle forums at 8:30 on a Saturday night.&lt;br /&gt;
&lt;br /&gt;
*If you find yourself heading to the bugtracker when the dishwasher is broken.&lt;br /&gt;
&lt;br /&gt;
*If you start seeing double square brackets around words you don&#039;t know the translation of.&lt;br /&gt;
&lt;br /&gt;
*If your neighbours wonder why you named your cats Helen and Howard.&lt;br /&gt;
&lt;br /&gt;
*Your spouse wants you to take up golf again because they hate being a &#039;moodle widow(er)&#039; more.&lt;br /&gt;
&lt;br /&gt;
*You describe the color of something as &amp;quot;Moodle&amp;quot; orange.&lt;br /&gt;
&lt;br /&gt;
*If you find yourself logging in to moodle.org during your summer holiday in Italy instead of enjoying the beautiful view or going to the beach. (Hi from Italy, Sigi)&lt;br /&gt;
&lt;br /&gt;
*If you come all the way from Germany to the US during your summer holiday and in addition to visiting lots of places you must absolutely go to a small town in South Carolina to find out about the latest Moodle tricks&lt;br /&gt;
&lt;br /&gt;
*You try to figure out how to grade e-mails from your friends without a drop down box&lt;br /&gt;
&lt;br /&gt;
*You find moodle.org is down for some reason and the first thing you want to do is post on moodle.org about it.&lt;br /&gt;
&lt;br /&gt;
*Every verb you use is &#039;to moodle&#039;.&lt;br /&gt;
&lt;br /&gt;
*You go into a Chinese restaurant and ask for a side order of Moodles with your Egg Foo Young.&lt;br /&gt;
&lt;br /&gt;
*You talk about Moodle so much that your non-Moodling, non-native English speaking husband asks if the noodles on the plate in front of him are moodles and when you ask him if that is what he meant to say he replies, &amp;quot;Yes, aren&#039;t they moodles?&amp;quot; (based on a true story)&lt;br /&gt;
&lt;br /&gt;
*You know that the course id for &#039;&#039;&#039;Using Moodle&#039;&#039;&#039; is 5.&lt;br /&gt;
&lt;br /&gt;
*And even if you drive a car, you always drive it in &#039;&#039;&#039;5&#039;&#039;&#039;th gear.&lt;br /&gt;
&lt;br /&gt;
*You throw away all but the orange M&amp;amp;amp;M&#039;s.&lt;br /&gt;
&lt;br /&gt;
*You eat all but the orange M&amp;amp;amp;M&#039;s (and keep it for good &#039;&#039;feng shui&#039;&#039; in your desktop).&lt;br /&gt;
&lt;br /&gt;
*You try to convince your wife and kids that there is a Disney Park in Perth.&lt;br /&gt;
&lt;br /&gt;
*The homepage of your computer is http://www.moodle.org.&lt;br /&gt;
&lt;br /&gt;
*The homepage of every computer you have ever laid hands on is http://www.moodle.org.&lt;br /&gt;
&lt;br /&gt;
*You only recently discovered that typing an address in your browser takes you to a page outside Moodle.org&lt;br /&gt;
 &lt;br /&gt;
*You sometimes refer to your third child as &#039;&#039;&#039;1.3&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Your default response to a rerun on TV is to fire up the laptop and check out moodle.org.&lt;br /&gt;
&lt;br /&gt;
*If you put little labels on your TV&#039;s remote control that say... view.php?id=1, view.php?id=2, etc ...&lt;br /&gt;
&lt;br /&gt;
*You have five browser windows open right now, four of which are Moodle sites.&lt;br /&gt;
&lt;br /&gt;
*Reading the moodle.org forums is part of the morning routine:  coffee, newspaper, wake up the children. . .&lt;br /&gt;
&lt;br /&gt;
*You find yourself adding items to a list that only the Moodle clique will understand.&lt;br /&gt;
&lt;br /&gt;
*You tell people to &amp;quot;Keep Moodling&amp;quot; and that they have been &amp;quot;Moodlised&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*If instead of saying &#039;&#039;Have a good day&#039;&#039; you begin greeting folks by saying &#039;&#039;Happy Moodling!&#039;&#039; and even worse when you actually believe that the two statements mean the same thing. {Based on a true story}&lt;br /&gt;
&lt;br /&gt;
*If normal words start being morphed into &#039;&#039;Moodle-isms&#039;&#039;. For example, when someone asks &#039;&#039;How are you?&#039;&#039; you begin to reply with words like Moodle-rrific and Moodle-tastic. Subsequently, you get confused when someone gives you a quizzical look because they do not understand what have just said. {Based on a true story}&lt;br /&gt;
&lt;br /&gt;
*If your students start showing up to the Friday night football games wanting to know when the Moodle chant is going to begin and students begin painting  &#039;&#039;MOODLE&#039;&#039; on their chests! {Based on a true story}&lt;br /&gt;
&lt;br /&gt;
*You get custom plates for your new car... [http://moodle.org/mod/forum/discuss.php?d=54899 Moodle Plate]&lt;br /&gt;
&lt;br /&gt;
*You get a quote on a custom paint job for your new car [http://classroomrevolution.com/jeff/moodleorange.jpg Moodle Orange Car]&lt;br /&gt;
&lt;br /&gt;
* You are looking forward to Christmas vacation so that you will have time to upgrade Moodle!&lt;br /&gt;
&lt;br /&gt;
* You read something interesting and your first thought is, &amp;quot;I have to post that at moodle.org.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* You forget that the comment you just ignored from a co-worker won&#039;t be retrievable later in a Recent Activities block.&lt;br /&gt;
&lt;br /&gt;
* When in the supermarket, you prefer to buy orange capsicums (peppers) rather than any other colour.&lt;/div&gt;</summary>
		<author><name>TimHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Quiz_statistics_report&amp;diff=88516</id>
		<title>Quiz statistics report</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Quiz_statistics_report&amp;diff=88516"/>
		<updated>2011-08-26T12:52:00Z</updated>

		<summary type="html">&lt;p&gt;TimHunt: /* Quiz structure analysis */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Improve}}&lt;br /&gt;
One of 4 [[Quiz reports]]&lt;br /&gt;
&lt;br /&gt;
This report gives a statistical (psychometric) analysis of the quiz, and the questions within it. The front page of this report gives a summary of the whole test. There are then links to drill down into a detailed analysis of a particular question.&lt;br /&gt;
&lt;br /&gt;
The full report (overview, and detailed analysis of all questions) can be downloaded in a variety of formats, as can the quiz structure analysis table.&lt;br /&gt;
&lt;br /&gt;
For a general introduction to psychometrics, this [http://www.youtube.com/watch?v=F5Lu3EdsXNo&amp;amp;NR=1 45-minute seminar] gives a very good an approachable introduction.&lt;br /&gt;
&lt;br /&gt;
===Overall quiz statistics===&lt;br /&gt;
&lt;br /&gt;
This is the first page of the report.&lt;br /&gt;
&lt;br /&gt;
====Quiz information====&lt;br /&gt;
&lt;br /&gt;
This table gives some basic information about the test as a whole, including some statistics for the total score:&lt;br /&gt;
* Quiz name&lt;br /&gt;
* Name of the course it is part of&lt;br /&gt;
* Open and close dates (if applicable)&lt;br /&gt;
* Total number of first/add attempts&lt;br /&gt;
* Average grade for first/all attempts&lt;br /&gt;
* Median grade&lt;br /&gt;
* Standard deviation of grades - how wide the spread of grades is&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Skewness Skewness] and [http://en.wikipedia.org/wiki/Kurtosis Kurtosis] of the grade distribution&lt;br /&gt;
* Coefficient of internal consistency (sometimes called [http://en.wikipedia.org/wiki/Cronbach%27s_alpha Cronbach Alpha]) - This is a measure of whether all the items in the quiz are testing basically the same thing. Thus it measures the consistency of the text, which is a lower bound for the validity. Higher numbers here are better.&lt;br /&gt;
* Error ratio - the variation in the grades comes from two sources. First some students are better than others at what is being tested, and second there is some random variation. We hope that the quiz grades will largely be determined by the student&#039;s ability, and that random variation will be minimised. The error ratio estimates how much of the variation is random, and so lower is better.&lt;br /&gt;
* Standard error - this is derived from the error ratio, and is a measure of how much random variation there is in each test grade. So, if the Standard error is 10%, and a student scored 60%, then their real ability probably lies somewhere between 50% and 70%.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Quiz structure analysis====&lt;br /&gt;
&lt;br /&gt;
This lists all the questions in the quiz with various statistics:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Q#&#039;&#039;&#039; - shows the question number, question type icon, and preview and edit icons&lt;br /&gt;
* &#039;&#039;&#039;Question name&#039;&#039;&#039; - the name is a link to the detailed analysis of this question.&lt;br /&gt;
* &#039;&#039;&#039;Attempts&#039;&#039;&#039; - how many attempts included this question&lt;br /&gt;
* &#039;&#039;&#039;Facility Index&#039;&#039;&#039; - a fancy name for the average score as a percentage. Higher score means easier question.&lt;br /&gt;
* &#039;&#039;&#039;Standard Deviation&#039;&#039;&#039; - how much variation there was in the scores for this question&lt;br /&gt;
* &#039;&#039;&#039;Random guess score&#039;&#039;&#039; - the score the student would get by guessing randomly&lt;br /&gt;
* &#039;&#039;&#039;Intended/Effective weight&#039;&#039;&#039; - Intended weight is simply what you set up when editing the quiz. If question 1 is worth 3 marks out of a total of 10 for the quiz, the the intended weight is 30%. The effective weight is an attempt to estimate, from the results, how much of the actual variation was due to this question. So, ideally the effective weights should be close to the intended weights.&lt;br /&gt;
* &#039;&#039;&#039;Discrimination index&#039;&#039;&#039; - this is the correlation between the score for this question and the score for the whole quiz. That is, for a good question, you hope that the students who score highly on this question are the same students who score highly on the whole quiz. Higher numbers are better.&lt;br /&gt;
* &#039;&#039;&#039;Discriminative efficiency&#039;&#039;&#039; - another measure that is similar to Discrimination index&lt;br /&gt;
&lt;br /&gt;
Where random questions are used, there is one row in the table for the random question, followed by further rows, one for each real question that was selected in place of this random question.&lt;br /&gt;
&lt;br /&gt;
[[:dev:Quiz_statistics_calculations|Quiz statistics calculations]] gives further details on all these quantities.&lt;br /&gt;
&lt;br /&gt;
===Quiz question statistics===&lt;br /&gt;
&lt;br /&gt;
You get to this page by clicking on the name of a question in the Quiz structure analysis.&lt;br /&gt;
&lt;br /&gt;
====Question information====&lt;br /&gt;
&lt;br /&gt;
Some basic information about the question.&lt;br /&gt;
&lt;br /&gt;
====Question statistics====&lt;br /&gt;
&lt;br /&gt;
This repeats the information from the table row from the Quiz structure analysis that relates to this question.&lt;br /&gt;
&lt;br /&gt;
====Analysis of responses====&lt;br /&gt;
&lt;br /&gt;
This gives a frequency analysis of the different responses that were given to each part of the question. The details of the analysis depends on the question type, and not all question types support this. For example, essay question responses cannot be analysed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Report options===&lt;br /&gt;
&lt;br /&gt;
You can choose whether to run the report on all attempts, or just the first attempt by each student. Some of the calculations used in the report are based on assumptions that may not apply to quizzes that allow more than one attempt.&lt;br /&gt;
&lt;br /&gt;
Also, because computing the statistics takes some time, the report will store the computed values and re-use them for up to 15 minutes. Therefore, there is a display of how recently the statistics were calculated, with a button to recalculate them immediately.&lt;/div&gt;</summary>
		<author><name>TimHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Quiz_responces_report&amp;diff=88514</id>
		<title>Quiz responces report</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Quiz_responces_report&amp;diff=88514"/>
		<updated>2011-08-26T12:46:52Z</updated>

		<summary type="html">&lt;p&gt;TimHunt: moved Quiz responces report to Quiz responses report: Fix type&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Quiz responses report]]&lt;/div&gt;</summary>
		<author><name>TimHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Quiz_responses_report&amp;diff=88513</id>
		<title>Quiz responses report</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Quiz_responses_report&amp;diff=88513"/>
		<updated>2011-08-26T12:46:52Z</updated>

		<summary type="html">&lt;p&gt;TimHunt: moved Quiz responces report to Quiz responses report: Fix type&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{stub}}&lt;br /&gt;
This is one of the Quiz Results reports.  See [[Quiz reports]].&lt;/div&gt;</summary>
		<author><name>TimHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Quiz_module&amp;diff=88512</id>
		<title>Quiz module</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Quiz_module&amp;diff=88512"/>
		<updated>2011-08-26T12:43:44Z</updated>

		<summary type="html">&lt;p&gt;TimHunt: /* Features */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Quiz}}&lt;br /&gt;
{{Questions}}&lt;br /&gt;
The &#039;&#039;&#039;Quiz&#039;&#039;&#039; activity module allows the teacher to design and build quizzes consisting of a large variety of [[Question types]], including multiple choice, true-false, and short answer questions. These questions are kept in the [[Question bank]] and can be re-used in different quizzes. &lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
* Quizzes can be [[Quiz settings|configured]] to allow multiple attempts. Each attempt at a question is automatically marked, and the teacher can choose whether to give feedback and/or show the correct answers. &lt;br /&gt;
There are many ways to [[Using Quiz|use a quiz]].&lt;br /&gt;
&lt;br /&gt;
* Feedback about performance and self-assessment are important parts of a learning environment. There are several ways to give feedback to students: on each question or overall. The quiz module can display feedback and scores at different times during the quiz, using the review options in the [[Quiz settings]].&lt;br /&gt;
&lt;br /&gt;
* A wide variety of [[Quiz reports]] (in addition to [[Grades]]) are available for use by the teacher. Quiz reports not only can focus on a single student&#039;s attempt to answer each question, but also can perform a robust item analysis of a question&#039;s validity based upon aggregated student responses. &lt;br /&gt;
&lt;br /&gt;
* A single quiz can automatic select random and/or specific questions from different [[Question bank|categories]] of questions. &lt;br /&gt;
&lt;br /&gt;
* There are different options for [[Editing a quiz|scoring (marks-grades)]] individual questions in a specific quiz, [[Adding/updating_a_quiz#Grades_section|grading attempts]] for a quiz and each [[Question bank|question type]]. &lt;br /&gt;
&lt;br /&gt;
* The quiz settings allow different [[Adding/updating_a_quiz#Display_section|display methods]]. They can randomize the questions for each student and or randomize the answers for each student.&lt;br /&gt;
&lt;br /&gt;
* The teacher can determine the number of questions on each page of questions the student sees.  The teacher can change the position of any question in the quiz. It is possible to put a label with information any place between questions.&lt;br /&gt;
&lt;br /&gt;
* The teacher can choose how questions behave during the quiz. It can be like a classic test, where the student gets no feedback while attempting the test, only later. Alternatively, Moodle can reveal the grades and/or feedback to the student during the quiz, and perhaps even give them another chance to answer the question (for fewer marks) having read the feedback.&lt;br /&gt;
&lt;br /&gt;
The about list only mentions a few features of the quiz module and how it works with the question bank. Please follow the links on this page to learn more.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
*[[Using Moodle book]] Chapter 6: Quizzes&lt;br /&gt;
*[[:Category:Questions]]&lt;br /&gt;
*[[Quiz tips and tricks]]&lt;br /&gt;
*[[Lesson#Types_of_questions_available_within_a_lesson|Questions available in a Lesson]]&lt;br /&gt;
*[http://www.youtube.com/watch?v=sfGlV5WaZE8 Quiz in Moodle 2.0 video]&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
*[http://en.wikiversity.org/wiki/User:Jtneill/Teaching/Online_Quizzes_and_Exams_with_Moodle Online Quizzes and Exams with Moodle] - reflections by [[User:James Neill|James Neill]]&lt;br /&gt;
*[http://moodle.org/mod/data/view.php?d=13&amp;amp;advanced=1&amp;amp;f_46=Quiz+Report&amp;amp;f_98=Third-Party Third-party quiz reports]&lt;br /&gt;
&lt;br /&gt;
[[es:Cuestionarios]]&lt;br /&gt;
[[eu:Galdetegiak]]&lt;br /&gt;
[[ja:小テストモジュール]]&lt;br /&gt;
[[ru:Тест]]&lt;br /&gt;
[[fr:Test]]&lt;br /&gt;
[[pl:Quizy]]&lt;br /&gt;
[[de:Test]]&lt;br /&gt;
[[zh:測驗卷]]&lt;/div&gt;</summary>
		<author><name>TimHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Debugging&amp;diff=88510</id>
		<title>Debugging</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Debugging&amp;diff=88510"/>
		<updated>2011-08-26T12:39:40Z</updated>

		<summary type="html">&lt;p&gt;TimHunt: /* Debug messages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Developer tools}}&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&#039;&#039;&#039;Please refer to [[Page_notes#Developer tools|these notes]] before editing this page.&#039;&#039;&#039;&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Location: &#039;&#039;Site administration &amp;gt; Development &amp;gt; Debugging&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Debugging messages are intended to help diagnose problems and/or help Moodle developers. If you have a problem with your Moodle site and ask for help in a Moodle.org forum, a developer may ask you to turn debug messages on, in order to locate the cause of the problem. By default Moodle does not show any error messages at all. If you are having problems (e.g. blank screens or incomplete screens) turning on debugging is usually the first thing to try. &lt;br /&gt;
&lt;br /&gt;
==Debugging settings==&lt;br /&gt;
Here are the settings on the Debugging page:&lt;br /&gt;
&lt;br /&gt;
===Debug messages===&lt;br /&gt;
The default is none, your choices are:&lt;br /&gt;
&lt;br /&gt;
;NONE : Do not show any errors or warnings (Default) &lt;br /&gt;
;ALL : Show all reasonable PHP debug messages&lt;br /&gt;
;MINIMAL : Show only fatal errors&lt;br /&gt;
;NORMAL : Show warnings, errors and notices&lt;br /&gt;
;DEVELOPER : extra Moodle debug messages for developers&lt;br /&gt;
&lt;br /&gt;
There is rarely any advantage in going to Developer level, unless you are a developer, in which case it is strongly recommended.&lt;br /&gt;
&lt;br /&gt;
Once you have got the error message, and copied and pasted it somewhere.  HIGHLY RECOMMENDED to turn Debug back to NONE. Debug messages can give clues to a hacker as to the setup of your site.&lt;br /&gt;
&lt;br /&gt;
===Display debug messages===&lt;br /&gt;
&lt;br /&gt;
There is an option to choose whether to display error messages or simply record them in the server logs.&lt;br /&gt;
&lt;br /&gt;
===Debug email sending===&lt;br /&gt;
&lt;br /&gt;
Determines whether or not to enable verbose debug information during sending of email messages to SMTP server.&lt;br /&gt;
&lt;br /&gt;
===Performance info===&lt;br /&gt;
&lt;br /&gt;
The Performance info option determines whether performance info will be included in the footer of the standard theme (and some other themes). Performance info includes the time for the page to load, the amount of memory used to generate the page, cpu usage, load, and the record cache hit/miss ration.&lt;br /&gt;
&lt;br /&gt;
If you add&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
define(&#039;MDL_PERF&#039;, true);&lt;br /&gt;
define(&#039;MDL_PERFDB&#039;, true);&lt;br /&gt;
define(&#039;MDL_PERFTOLOG&#039;, true);&lt;br /&gt;
define(&#039;MDL_PERFTOFOOT&#039;, true);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
to your config.php file, then it will also count database queries. (This has to be in config.php, because Moodle starts doing DB queries before it loads the config information in the database!&lt;br /&gt;
&lt;br /&gt;
===Show origin of language strings===&lt;br /&gt;
Helps translators.&lt;br /&gt;
&lt;br /&gt;
===Show validator links===&lt;br /&gt;
Be careful, read the warning.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Show page information===&lt;br /&gt;
To show page information printed in the page footer.&lt;br /&gt;
&lt;br /&gt;
==What to do if you cannot get to the admin screens==&lt;br /&gt;
&lt;br /&gt;
If the error is stopping you even getting to the admin screens to turn on debugging, then you can set the debugging setting manually.&lt;br /&gt;
&lt;br /&gt;
===Try typing the URL directly===&lt;br /&gt;
&lt;br /&gt;
The debug settings are at the URL &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;http://.../admin/settings.php?section=debugging&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; on your server. Sometimes that URL will work, even though the pages you need to go to to get there (for example the site front page) do not. So it is worth trying to enter that URL directly.&lt;br /&gt;
&lt;br /&gt;
===In config.php===&lt;br /&gt;
&lt;br /&gt;
In moodle/config.php you can add the lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$CFG-&amp;gt;debug = 2047; &lt;br /&gt;
$CFG-&amp;gt;debugdisplay = 1;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or even more debugging messages:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$CFG-&amp;gt;debug = 6143; &lt;br /&gt;
$CFG-&amp;gt;debugdisplay = 1;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For Moodle 2.0 the possible settings are as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
// Force a debugging mode regardless the settings in the site administration&lt;br /&gt;
// @error_reporting(1023);  // NOT FOR PRODUCTION SERVERS!&lt;br /&gt;
@ini_set(&#039;display_errors&#039;, &#039;1&#039;); // NOT FOR PRODUCTION SERVERS!&lt;br /&gt;
$CFG-&amp;gt;debug = 38911;  // DEBUG_DEVELOPER // NOT FOR PRODUCTION SERVERS!&lt;br /&gt;
$CFG-&amp;gt;debugdisplay = true;   // NOT FOR PRODUCTION SERVERS!&lt;br /&gt;
&lt;br /&gt;
// You can specify a comma separated list of user ids that that always see&lt;br /&gt;
// debug messages, this overrides the debug flag in $CFG-&amp;gt;debug and $CFG-&amp;gt;debugdisplay&lt;br /&gt;
// for these users only.&lt;br /&gt;
$CFG-&amp;gt;debugusers = &#039;2&#039;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remember to remove those lines again when you have finished diagnosing your problem.&lt;br /&gt;
&lt;br /&gt;
===In the database===&lt;br /&gt;
&lt;br /&gt;
Using a tool like phpMyAdmin, execute the following SQL commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code sql&amp;gt;&lt;br /&gt;
UPDATE mdl_config SET value = 2047 WHERE name = &#039;debug&#039;;&lt;br /&gt;
UPDATE mdl_config SET value = 1 WHERE name = &#039;debugdisplay&#039;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To turn it back off, use the admin screens, or the commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code sql&amp;gt;&lt;br /&gt;
UPDATE mdl_config SET value = 0 WHERE name = &#039;debug&#039;;&lt;br /&gt;
UPDATE mdl_config SET value = 0 WHERE name = &#039;debugdisplay&#039;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(If you use a different database prefix, you will need to adjust those commands accordingly.)&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* Using Moodle [http://moodle.org/mod/forum/discuss.php?d=91031 Debugging Turned on to Developer Mode on 1.8.2] forum discussion including instructions on how to turn debugging off&lt;br /&gt;
* Developers can also use [http://xdebug.org/ XDEBUG] (Installed as a module on the Apache server) to further dig into the code, step by step using an [http://xdebug.org/docs/remote XDEBUG client application]. Probably, as part of their favorite IDE. For example: [http://php.netbeans.org/ NetBeans], [http://www.jetbrains.com/phpstorm/ phpStorm] or...&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
&lt;br /&gt;
[[fr:Débogage]]&lt;/div&gt;</summary>
		<author><name>TimHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Preg_question_type&amp;diff=88437</id>
		<title>Preg question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Preg_question_type&amp;diff=88437"/>
		<updated>2011-08-25T21:33:11Z</updated>

		<summary type="html">&lt;p&gt;TimHunt: /* Subpattern capturing and feedback */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Preg question type is a question type using regular expression pattern matching to find if studen response is correct. It is use Perl-compatible regular expressions dialect. For detailed description of regular expression syntax see http://www.nusphere.com/kb/phpmanual/reference.pcre.pattern.syntax.htm&lt;br /&gt;
&lt;br /&gt;
Authors:&lt;br /&gt;
# idea, design, question type code, regex parsing and error reporting - Oleg Sychev;&lt;br /&gt;
# regex parsing, DFA regular expression matching engine - Dmitriy Kolesov.&lt;br /&gt;
We would gladly accept testers and contributors (see [[#Development plans|development plans]] section) - there is still more to be done than we have time.&lt;br /&gt;
&lt;br /&gt;
For now new code with all this functionality located in the HEAD branch of preg question type (you could also download it from the [http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=1901&amp;amp;filter=1 Modules and Plugins database] using &#039;latest version&#039; link. It is works with Moodle 2.0. The code considered BETA quality - use it with care! If you find any bugs please report them on the tracker.&lt;br /&gt;
&lt;br /&gt;
===Understanding expressions===&lt;br /&gt;
The regular expressions - as any &#039;&#039;&#039;expressions&#039;&#039;&#039; - are just a bunch of &#039;&#039;&#039;operators&#039;&#039;&#039; with their &#039;&#039;&#039;operands&#039;&#039;&#039;. Don&#039;t worry - you all learned to master arithmetic expressions from chilhood and regular ones are just as easy - if you look on them from the right angle. Learn (or recall) only 4 new words - and you are a master of regexes with very wide possibilities. Don&#039;t find that angle, and regular expressions could forever remain vast menace where only a few steps are sure. Let&#039;s go?&lt;br /&gt;
&lt;br /&gt;
Look at a simple math expression: &#039;&#039;&#039;x+y*2&#039;&#039;&#039;. There are two &#039;&#039;&#039;operators&#039;&#039;&#039; there: &#039;+&#039; and &#039;*&#039;. The &#039;&#039;&#039;operands&#039;&#039;&#039; of &#039;*&#039; is &#039;y&#039; and &#039;2&#039;. The &#039;&#039;&#039;operands&#039;&#039;&#039; of &#039;+&#039; is &#039;x&#039; and result of &#039;y*2&#039;. Easy?&lt;br /&gt;
&lt;br /&gt;
Thinking about that expression deeper we could found, that there is a definite &#039;&#039;&#039;order of evaluation&#039;&#039;&#039; there, governed by operator&#039;s &#039;&#039;&#039;precedence&#039;&#039;&#039;. &#039;*&#039; has a precedence over &#039;+&#039;, so it is evaluated first. You could change order of evaluation using brackets: &#039;&#039;&#039;(x+y)*2&#039;&#039;&#039; will evaluate &#039;+&#039; first and multiply it&#039;s results on the 2. Still easy?&lt;br /&gt;
&lt;br /&gt;
One more thing we should learn about operators: their &#039;&#039;&#039;arity&#039;&#039;&#039;, which is just the number of operands required. In example above &#039;+&#039; and &#039;*&#039; are &#039;&#039;&#039;binary&#039;&#039;&#039; operators - they both take two operands. Most arithmetic operators are binary, but minus has &#039;&#039;&#039;unary&#039;&#039;&#039; (single operand) form, like in this equation: &#039;&#039;&#039;y=-x&#039;&#039;&#039;. Note that unary and binary minuses work differently. &lt;br /&gt;
&lt;br /&gt;
Now any epxression are just lego game, where you set a sequence of &#039;&#039;&#039;operators&#039;&#039;&#039; with correct number of &#039;&#039;&#039;operands&#039;&#039;&#039; for each (&#039;&#039;&#039;arity&#039;&#039;&#039;), taking heed of their order of evaluation using their &#039;&#039;&#039;precedence&#039;&#039;&#039; and brackets. Arithmetics expressions are for evaluating numbers. Regular expressions are for finding pattern matches in the strings, so they naturally use another operands and operators - but they are governed by the same rules of precedence and arity.&lt;br /&gt;
&lt;br /&gt;
===Regular expressions===&lt;br /&gt;
The goal of a regular expressions is a pattern matching in the strings. So their &#039;&#039;&#039;operands&#039;&#039;&#039; are characters or characters set. &#039;&#039;&#039;A&#039;&#039;&#039; is a regular expressions too and it matches with single character &#039;A&#039;. There are several way to define a character set, described below. Special characters, used to write operators,must be &#039;&#039;&#039;escaped&#039;&#039;&#039; when used as operands - preceded by backslash. Math expressions never had escaping problems since their operands (numbers, variables) are constructed from different characters than operators (+,- etc), but setting pattern for matching you should be able to use any character as operand.&lt;br /&gt;
&lt;br /&gt;
Still, pattern that match only with one character isn&#039;t very useful. So there comes &#039;&#039;&#039;operators&#039;&#039;&#039; that allows us to define expression matching with string of a several characters.&lt;br /&gt;
&lt;br /&gt;
====Operands====&lt;br /&gt;
You could use those operands in you expressions:&lt;br /&gt;
# &#039;&#039;simple characters&#039;&#039; match with themselves&lt;br /&gt;
# &#039;&#039;escaped special characters&#039;&#039; if you need to use character with special meaning (like |, * or bracket) just as usual character to match you should preceed it by backslash: &#039;&#039;&#039;a\*&#039;&#039;&#039; matches with a* (while &#039;&#039;&#039;a*&#039;&#039;&#039; matches with a zero or more times), backslash is a special character too and should be escaped &#039;&#039;&#039;\\&#039;&#039;&#039; matches with \&lt;br /&gt;
# &#039;&#039;character classes&#039;&#039; you could specify a number of possible characters in one place in square brackets:&lt;br /&gt;
#* &#039;&#039;&#039;[ab,!]&#039;&#039;&#039; matches with a or b or , or !&lt;br /&gt;
#* &#039;&#039;ranges&#039;&#039;: &#039;&#039;&#039;[a-szC-F0-9]&#039;&#039;&#039; you could specify ranges for letters and digits in character classes, mixing them with single characters&lt;br /&gt;
#* &#039;&#039;negative character classes&#039;&#039; starts with ^ &#039;&#039;&#039;[^ab]&#039;&#039;&#039; means any characters except a and b&lt;br /&gt;
#* &#039;&#039;escaping inside character classes&#039;&#039;: &#039;&#039;&#039;[\-\]\\]&#039;&#039;&#039; match with - or ] or \, other characters lost their special meaning inside character class and shoudn&#039;t be escaped, but if you want to include ^ in the character class it should not be first&lt;br /&gt;
# &#039;&#039;dot meta-character&#039;&#039; &#039;&#039;&#039;.&#039;&#039;&#039; match with any possible character (except newline, but student coudn&#039;t enter it anywhere), you should escape dot &#039;&#039;&#039;\.&#039;&#039;&#039; if you need to match single dot.&lt;br /&gt;
&lt;br /&gt;
====Operators====&lt;br /&gt;
Most common regular expression operators used (could anyone help expand descriptions and examples please?):&lt;br /&gt;
# &#039;&#039;concatenation&#039;&#039; - so simple &#039;&#039;&#039;binary&#039;&#039;&#039; operator that is doesn&#039;t have any character at all. Still it is an operator and has it&#039;s precedence, which is important if you want to understand where to use brackets. Concatenation allows you to write several operands in sequence:&lt;br /&gt;
#* &#039;&#039;&#039;ab&#039;&#039;&#039; matches with ab&lt;br /&gt;
#* &#039;&#039;&#039;a[0-9]&#039;&#039;&#039; matches with a followed by any digit&lt;br /&gt;
# &#039;&#039;alternative&#039;&#039; - &#039;&#039;&#039;binary&#039;&#039;&#039; operator that lets you define a set of alternatives:&lt;br /&gt;
#* &#039;&#039;&#039;a|b&#039;&#039;&#039; mean a or b&lt;br /&gt;
#* &#039;&#039;&#039;ab|cd|de&#039;&#039;&#039; mean ab or cd or de&lt;br /&gt;
#* empty alternative: &#039;&#039;&#039;ab|cd|&#039;&#039;&#039; mean ab or cd or emptiness (useful as a part more complex expressions)&lt;br /&gt;
#* &#039;&#039;&#039;(aa|bb)c&#039;&#039;&#039; mean aac or bbc - use brackets to outline alternative set&lt;br /&gt;
#* &#039;&#039;&#039;(aa|bb|)c&#039;&#039;&#039; mean aac or bbc or c - typical use of emptiness&lt;br /&gt;
# &#039;&#039;quantifiers&#039;&#039; - &#039;&#039;&#039;unary&#039;&#039;&#039; operator that lets you define repetition of a character (or regular expression) used as it&#039;s operands:&lt;br /&gt;
#* &#039;&#039;&#039;x*&#039;&#039;&#039; mean x zero or more times&lt;br /&gt;
#* &#039;&#039;&#039;x+&#039;&#039;&#039; mean x one or more times&lt;br /&gt;
#* &#039;&#039;&#039;x?&#039;&#039;&#039; mean x zero or one times&lt;br /&gt;
#* &#039;&#039;&#039;x{2,4}&#039;&#039;&#039; mean x from 2 to 4 times&lt;br /&gt;
#* &#039;&#039;&#039;x{2,}&#039;&#039;&#039; mean x two or more times&lt;br /&gt;
#* &#039;&#039;&#039;x{,2}&#039;&#039;&#039; mean x from 0 to 2 times&lt;br /&gt;
#* &#039;&#039;&#039;x{2}&#039;&#039;&#039; mean x exactly 2 times&lt;br /&gt;
#* &#039;&#039;&#039;(ab)*&#039;&#039;&#039; mean ab zero or more times, i.e. if you want to use quantifier on more than one character, you should use brackets&lt;br /&gt;
#* &#039;&#039;&#039;(a|b){2}&#039;&#039;&#039; mean aa or ab or ba or bb, i.e. it is repeated alternative, not selection one alternative and repeating it&lt;br /&gt;
&lt;br /&gt;
====Precedence and order of evaluation====&lt;br /&gt;
&#039;&#039;&#039;Quantifier&#039;&#039;&#039; has precedence over &#039;&#039;&#039;concatenation&#039;&#039;&#039; and &#039;&#039;&#039;concatenation&#039;&#039;&#039; has precedence over &#039;&#039;&#039;alternative&#039;&#039;&#039;. Let&#039;s look what it means:&lt;br /&gt;
# &#039;&#039;quantifier over concatenation&#039;&#039; means quantifiers are executed first and without brackets would repeat only single character:&lt;br /&gt;
#* &#039;&#039;&#039;ab*&#039;&#039;&#039; matches with a followed with zero or more b&#039;s&lt;br /&gt;
#* changing this using brackets allows us define a string repetition: &#039;&#039;&#039;(ab)*&#039;&#039;&#039; matches with ab zero or more times&lt;br /&gt;
# &#039;&#039;concatenation over alternative&#039;&#039; means you could define multi-character alternatives without brackets (for single character alternatives use character classes, not alternative operators) but should use brackets when you need to add something to the alternative set:&lt;br /&gt;
#* &#039;&#039;&#039;ab|cd|de&#039;&#039;&#039; matches with ab or cd or de&lt;br /&gt;
#* &#039;&#039;&#039;(aa|bb)c&#039;&#039;&#039; matches with aac or bbc - use brackets to outline alternative set&lt;br /&gt;
#* &#039;&#039;&#039;(aa|bb|)c&#039;&#039;&#039; matches with aac or bbc or c - typical use of an empty alternative&lt;br /&gt;
# &#039;&#039;quantifier over alternative&#039;&#039; means you should use brackets to repeat an alternative set (not the last character in it):&lt;br /&gt;
#* &#039;&#039;&#039;ab|cd*&#039;&#039;&#039; matches with ab or c followed with zero or more d&#039;s&lt;br /&gt;
#* &#039;&#039;&#039;(ab|cd)*&#039;&#039;&#039; matches with ab or cd, repeated zero or more time in any order, like ababcdabcdcd etc&lt;br /&gt;
#* note that quantifiers repeats alternative, not the definite selection from it, i.e.:&lt;br /&gt;
#*# &#039;&#039;&#039;(a|b){2}&#039;&#039;&#039; matches with aa or ab or ba or bb, not just aa or bb&lt;br /&gt;
#*# use &#039;&#039;&#039;a{2}|b{2}&#039;&#039;&#039; to match aa or bb only&lt;br /&gt;
&lt;br /&gt;
====Assertions====&lt;br /&gt;
&#039;&#039;Assertions&#039;&#039; are assertions about some part of the string that doesn&#039;t actually goes into matching text, but affects whether matching occur or not.&lt;br /&gt;
* &#039;&#039;positive lookahead assert&#039;&#039; &#039;&#039;&#039;a+(?=b)&#039;&#039;&#039; matches with any number of a ending with b without including b in the match&lt;br /&gt;
* &#039;&#039;negative lookahead assert&#039;&#039; &#039;&#039;&#039;a+(?!b)&#039;&#039;&#039; matches with any number of a that is not followed by b&lt;br /&gt;
* &#039;&#039;positive lookbehind assert&#039;&#039; &#039;&#039;&#039;(?&amp;lt;=b)a+&#039;&#039;&#039; matches with any number of a preceeded by b&lt;br /&gt;
* &#039;&#039;negative lookbehind assert&#039;&#039; &#039;&#039;&#039;(?&amp;lt;!b)a+&#039;&#039;&#039; matches with any number of a that is not preceeded by b&lt;br /&gt;
&lt;br /&gt;
====Matching====&lt;br /&gt;
&#039;&#039;&#039;Matching&#039;&#039;&#039; means finding a part of the student answer (or a whole answer) that suited the regular expression. This part called a &#039;&#039;&#039;match&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
You should enter regular expressions as &#039;&#039;&#039;answers&#039;&#039;&#039; to the question without modifiers or enclosing characters (modifiers would be added for you by question - &#039;&#039;&#039;u&#039;&#039;&#039; added always and &#039;&#039;&#039;i&#039;&#039;&#039; in case-insensitive mode). You should also enter one  correct response (that matches at least one 100% grade regular expression) to be shown to the student as &#039;&#039;&#039;correct answer&#039;&#039;&#039;. The question would get use all regular expressions in order to find first full match (full for expression, but not necessary all response - see [[#Anchoring|anchoring]]) and give a grade from it. If there is no full match and engine supports partial matching (see [[#Hinting|hinting]]) than partial match that is shortest to complete would be choosen (for displaying a hint, zero grade is given) - or the longest one, if engine coudn&#039;t tell which one would be shortest to complete.&lt;br /&gt;
&lt;br /&gt;
====Anchoring====&lt;br /&gt;
Anchoring sets restrictions on the matching process:&lt;br /&gt;
* if a regular expression starts with &#039;&#039;&#039;^&#039;&#039;&#039; the match should start at the start of the student&#039;s response;&lt;br /&gt;
* if a regular exhression ends with &#039;&#039;&#039;$&#039;&#039;&#039; the match should ends at the end of the student&#039;s reponse;&lt;br /&gt;
* otherwise regular expression match could be contained anywhere inside student response.&lt;br /&gt;
&lt;br /&gt;
If you set &#039;&#039;&#039;exact matching&#039;&#039;&#039; options to yes (default setting), the question would add ^ and $ in each regular expression for you. However, you may prefer to use some non-anchored regexes to catch common errors and give feedback while using manually anchored expression for grading.&lt;br /&gt;
&lt;br /&gt;
===Hinting===&lt;br /&gt;
Some matching engines could support hinting (not easy thing to do on the PHP at all) in adaptive mode.&lt;br /&gt;
&lt;br /&gt;
Hinting starts with &#039;&#039;&#039;partial matching&#039;&#039;&#039;. When a student enters a partially correct answer, partial matching could find that response starts matching and on some character broke it. Consider you enter expression:&lt;br /&gt;
  &#039;&#039;&#039;are blue, white(,| and) red&#039;&#039;&#039;&lt;br /&gt;
and student answered&lt;br /&gt;
  they are blue, vhite and red&lt;br /&gt;
Partial matching will find that partial match is&lt;br /&gt;
  are blue, &lt;br /&gt;
Remember, the regular expresion in unanchored so the match shouldn&#039;t start with the start of the student response. While using just partial matching the student will be shown correct and incorrect parts:&lt;br /&gt;
  &amp;lt;span style=&amp;quot;text-decoration:line-through; color:#FF0000;&amp;quot;&amp;gt;they &amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#0000FF;&amp;quot;&amp;gt;are blue, &amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;text-decoration:line-through; color:#FF0000;&amp;quot;&amp;gt;vhite and red&amp;lt;/span&amp;gt;&lt;br /&gt;
When hinting is available, student will have &#039;&#039;&#039;hint&#039;&#039;&#039; button by pressing which he receive a hint with one next correct character, highlighted by background coloring:&lt;br /&gt;
  &amp;lt;span style=&amp;quot;text-decoration:line-through; color:#FF0000;&amp;quot;&amp;gt;they &amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#0000FF;&amp;quot;&amp;gt;are blue, &amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;background-color:#00FF00&amp;quot;&amp;gt;w&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;text-decoration:line-through; color:#FF0000;&amp;quot;&amp;gt;vhite and red&amp;lt;/span&amp;gt;&lt;br /&gt;
You should typically set hint &#039;&#039;&#039;penalty&#039;&#039;&#039; more than usual question &#039;&#039;&#039;penalty&#039;&#039;&#039;, because they are applied separately: usual penalty for an attempt without hinting, while hint penalty for an attempt with hinting.&lt;br /&gt;
Preg question doesn&#039;t add hint character to the student&#039;s response (like regex question do it), showing it separately instead for a number of reasons:&lt;br /&gt;
# it is student&#039;s responsibility whether he want to add hinted character to the his response (and some more possibly);&lt;br /&gt;
# it slightly facilitates thinking about hint, since when the response is modified it is too easy to repeatedly press &#039;&#039;&#039;hint&#039;&#039;&#039;, which is not a desirable behavour usually.&lt;br /&gt;
When possible (if question engine supports it), hinting choosing a character that leads to shortest path to complete a match. Consider this response to the previous regular expression:&lt;br /&gt;
  &amp;lt;span style=&amp;quot;color:#0000FF;&amp;quot;&amp;gt;are blue, white&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;text-decoration:line-through; color:#FF0000;&amp;quot;&amp;gt;; red&amp;lt;/span&amp;gt;&lt;br /&gt;
There are two possible hint characters: &#039;,&#039; or &#039; &#039;. The question will choose &#039;,&#039; since it leads to the shortest path to complete a match, while &#039; &#039; leads to a path 3 characters longer.&lt;br /&gt;
&lt;br /&gt;
It is possible that not all regular expressions will give 100% grade. Consider you add an expression for the students with bad memory:&lt;br /&gt;
  &#039;&#039;&#039;are white(,| and) red&#039;&#039;&#039;&lt;br /&gt;
with 60% grade and feedback about forgetting &#039;&#039;blue&#039;&#039;. You may not want hinting to lead student to the response&lt;br /&gt;
   are white, red&lt;br /&gt;
if he entered&lt;br /&gt;
   are white, oh I forgot other colors.&lt;br /&gt;
&#039;&#039;&#039;Hint grade border&#039;&#039;&#039; controls this. Only regular expressions with grade greater or equal than hint grade border would be used for partial matching and hinting. If you set hint grade border to 1, only 100% grade regular expression would be used to hinting, if you set it to 0,5 regular expressions with 50%-100% grades would be used and 0%-49% would not. Regular expressions not used for hinting works only when they have a full match in the student response.&lt;br /&gt;
&lt;br /&gt;
===Subpattern capturing and feedback===&lt;br /&gt;
Any pair of round brackets in the regular expressions are considered a &#039;&#039;&#039;subpattern&#039;&#039;&#039; and when doing matching engine (supporting subpatterns) remember (&#039;&#039;&#039;capture&#039;&#039;&#039;) not only whole match, but it&#039;s parts corresponding to all subpatterns. Subpatterns can be nested. If subpattern is repeated (i.e. have quantifier), than only last match of all repeats will be captured. If you want to change order of evaluation without defining a subpattern to capture (which will speed up processing), you should use (?:  ) instead of just (  ). Asserts don&#039;t create subpatterns.&lt;br /&gt;
&lt;br /&gt;
Subpatterns are counted from left to right by opening brackets. Precisely &#039;&#039;&#039;0&#039;&#039;&#039; is the whole match, &#039;&#039;&#039;1&#039;&#039;&#039; is first subpattern etc. You could insert them in the &#039;&#039;answer&#039;s feedback&#039;&#039; using simple placeholders: &#039;&#039;&#039;{$0}&#039;&#039;&#039; is replaced by the whole match, &#039;&#039;&#039;{$1}&#039;&#039;&#039; by first subpattern value etc. That can improve the quality of you feedback. Placeholders won&#039;t work on the &#039;&#039;general feedback&#039;&#039; because different answers could have different number of subpatterns.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PHP preg engine&#039;&#039;&#039; support full subpattern capturing. &#039;&#039;&#039;DFA&#039;&#039;&#039; engine coudn&#039;t do it, so you could use only {$0} placeholder working with DFA engine.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s look at regex defining an decimal number with optional integral part:&lt;br /&gt;
 [+\-]?([0-9]+)?\.([0-9]+)&lt;br /&gt;
It has two subpatterns: first capturing integral part, second - fractional part of the number.&lt;br /&gt;
You writed feedback:&lt;br /&gt;
 The number is: {$0} Integral part is {$1} and fractional part is {$2}&lt;br /&gt;
Then entering&lt;br /&gt;
 123.34&lt;br /&gt;
the student will see&lt;br /&gt;
 The number is: 123.34 Integral part is 123 and fractional part is 34&lt;br /&gt;
If no integral part is given, {$1} will be replaced by empty string. There is no way (for now) to erase &amp;quot;Integral part is&amp;quot; under that circumstances - the placeholder syntax may become complex and prone to errors.&lt;br /&gt;
&lt;br /&gt;
===Error reporting===&lt;br /&gt;
Native PHP preg extension functions only report if there error in regular expression or not, so &#039;&#039;&#039;PHP preg extension&#039;&#039;&#039; engine couldn&#039;t tell you much about what is error .&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFA&#039;&#039;&#039; engine use custom &#039;&#039;&#039;regular expression parser&#039;&#039;&#039;, so it supports advanced error reporting. The are several class of potential errors reported:&lt;br /&gt;
* unclosed square brackets of character class;&lt;br /&gt;
* unclosed opening parenthesis of any sort (different forms of subpatterns and assertions);&lt;br /&gt;
* unopened closing parenthesis;&lt;br /&gt;
* empty parenthesis of any sort (different forms of subpatterns and assertions);&lt;br /&gt;
* quantifiers without operand, i.e. at the start of (sub)expression with nothing to repeat;&lt;br /&gt;
* three or more top-level alternatives in the conditional subpattern.&lt;br /&gt;
PCRE (and preg functions) treat most of them as &#039;&#039;&#039;non-errors&#039;&#039;&#039;, making many characters meaning context-dependent. For example quantifier {2,4} placed at the start of regular expression lose it&#039;s meaning as quantifier and is treated as five-characters sequence instead (that matches with {2,4}). However such syntax is very prone to errors and make writing regular expression harder.&lt;br /&gt;
&lt;br /&gt;
For now I&#039;m vote for reporting errors instead of treating them as literals, even if it means incompatibility with PCRE/preg. If you are stand for or against this decision please write you positions and reasons on the page comments please. It may be best to have two modes, but this literally means two parsers and this is out of current scope of development. There are more pressing issues ahead.&lt;br /&gt;
&lt;br /&gt;
===Looking for missing things===&lt;br /&gt;
Joseph Rezeau REGEXP question type has a special syntax for &#039;&#039;&#039;missing words&#039;&#039;&#039; feature, allowing to define an answer that would work when something is absent in the answer (and give appropriate feedback to the student). So if you want to look out for the missing word &#039;&#039;&#039;necessary&#039;&#039;&#039; in the response, you&#039;ll add this answer (WARNING - REGEXP only syntax on the next line):&lt;br /&gt;
  --.*\bnecessary\b.*&lt;br /&gt;
where \b defines a word boundary, while .* ensures that this word could be anywhere in the response.&lt;br /&gt;
&lt;br /&gt;
There is no need to have such features in the PREG question type, since similar effect could be achieved with &#039;&#039;&#039;negative assertions&#039;&#039;&#039; combined with anchoring the matching start. Equivalent regular expression to look for the missing word &#039;&#039;&#039;necessary&#039;&#039;&#039; would be&lt;br /&gt;
  ^(?!.*\bnecessary\b.*)&lt;br /&gt;
where&lt;br /&gt;
* &#039;&#039;&#039;(?!.*\bnecessary\b.*)&#039;&#039;&#039; is a &#039;&#039;&#039;negative lookahead assertion&#039;&#039;&#039;, that allows matching only if there are no word &#039;&#039;&#039;necessary&#039;&#039;&#039; ahead of some point in the string;&lt;br /&gt;
* &#039;&#039;&#039;^&#039;&#039;&#039; is an assertion too, that anchoring the match to the start of response (otherwise there would be places in response after the word &amp;quot;necessary&amp;quot;, where matching is possible even if the word is present).&lt;br /&gt;
&lt;br /&gt;
In case the description is difficult to you, just surround regexp to be missing with &#039;&#039;&#039;^(?!&#039;&#039;&#039; and &#039;&#039;&#039;)&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===Matching engines===&lt;br /&gt;
Matching engines means different program code that do matching (either by different methods or written by different people). There are no single &#039;best&#039; matching engine - it depends on the features you want to use and regular expressions engine should handle. They have a different degree of stability and offer different features to use.&lt;br /&gt;
====PHP preg extension====&lt;br /&gt;
It is based on native PHP preg functions (which is in turn based on the PCRE library). It is supporting 100% perl-compatible regular expression features, been very stable and thoroughly tested. Sadly, PHP functions doesn&#039;t support partial matching (while PCRE could), so (unless we storm PHP developers to add support for partial matching) there is &#039;&#039;&#039;no hinting&#039;&#039;&#039; there. However it will support subpattern capturing. Choose it when you need complex regexp features other engines don&#039;t support, subpattern capturing or better performace.&lt;br /&gt;
&lt;br /&gt;
====Deterministic finite state automata (DFA)====&lt;br /&gt;
This is a custom PHP code using DFA matching algorithm. It is heavily unit-tested, but considered beta-quality for now. Not all PHP operands and operators are supported, and for some (more exotic) ones support could still differs from standard (especially for non-latin characters). On the bright side it is support &#039;&#039;&#039;hinting&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Currently supported operands (there would be more):&lt;br /&gt;
* single characters&lt;br /&gt;
* escaped special characters&lt;br /&gt;
* character classes, including ranges and negative classes&lt;br /&gt;
* escape sequences  \w\W\s\S\t\d\D (locale-aware, but not Unicode for performance reasons, as in standard regular expression functions)&lt;br /&gt;
* octal and hexadecimal character codes preceeded by \o and \x&lt;br /&gt;
* meta-character . (any character)&lt;br /&gt;
&lt;br /&gt;
Currently supported operators (there would be more):&lt;br /&gt;
* concatenation&lt;br /&gt;
* alternative |&lt;br /&gt;
* quantifiers * + ? {2,3} {2,} {,2} {2}&lt;br /&gt;
* positive lookahead assertions&lt;br /&gt;
* changing operator precedence (  )  (without subpattern capturing) or (?:  )&lt;br /&gt;
&lt;br /&gt;
Features that couldn&#039;t be supported by DFA matching at all:&lt;br /&gt;
* subpattern capturing&lt;br /&gt;
* backreferences&lt;br /&gt;
&lt;br /&gt;
===Development plans===&lt;br /&gt;
There is no definite shedule or order of development for those features - it depends on the available time and developers. Many features require complex code to achieve results. If you want to help us with specific feature, please contact question type maintainer (Oleg Sychev) using http://moodle.org messaging.&lt;br /&gt;
* Update DFA matching engine to support all operators DFA algorithm could&lt;br /&gt;
* Improve Unicode support of custom matching engines&lt;br /&gt;
* Add automatic generation of shortest possible correct answer in user-readable form&lt;br /&gt;
* Add generation of &#039;description&#039; for regular expression to facilitate it&#039;s editing&lt;br /&gt;
* Develop NFA and backtracking matching engines&lt;br /&gt;
* Develop more help and examples for the people that don&#039;t know much about regular expressions.&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributed code]]&lt;/div&gt;</summary>
		<author><name>TimHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Opaque_question_type&amp;diff=88090</id>
		<title>Opaque question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Opaque_question_type&amp;diff=88090"/>
		<updated>2011-08-19T15:30:12Z</updated>

		<summary type="html">&lt;p&gt;TimHunt: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Recent versions of the Opaque question type is compatible with Moodle 2.1 and later.&lt;br /&gt;
&lt;br /&gt;
The Opaque question type can be used to connect to [https://github.com/sangwinc/stack/wiki STACK] and [http://openmark.java.net/ OpenMark] question engines.&lt;br /&gt;
&lt;br /&gt;
==Installing the Opaque question type==&lt;br /&gt;
&lt;br /&gt;
The Opaque question type comes in two parts: a question type, that needs to be installed into the question/type/opaque folder, and a question behaviour that needs to be installed into the question/behaviour/opaque folder.&lt;br /&gt;
&lt;br /&gt;
The two projects on github:&lt;br /&gt;
* https://github.com/timhunt/moodle-qtype_opaque&lt;br /&gt;
* https://github.com/timhunt/moodle-qbehaviour_opaque&lt;br /&gt;
explain how to get the code using either git clone or by downloading a zip file.&lt;br /&gt;
&lt;br /&gt;
After getting the code, you need to visit the admin notification page of your Moodle to let the plugins install themselves.&lt;br /&gt;
&lt;br /&gt;
==Configuring the question type==&lt;br /&gt;
&lt;br /&gt;
After installing the plugins, go to Site administration / Plugins / Question types / Opaque and add an engine. This requires knowing the URL of the question engine you want to connect to.&lt;br /&gt;
&lt;br /&gt;
==Creating an Opaque question==&lt;br /&gt;
&lt;br /&gt;
This works just like any other question type - select &#039;Opaque&#039; from the Create new question dropdown on the question bank screen.&lt;br /&gt;
&lt;br /&gt;
The Opaque editing form has very few fields, since the question is mostly defined by the remote engine, we just have to say which engine to connect to, and the question id and version.&lt;br /&gt;
&lt;br /&gt;
Then you can add you new question to a quiz, and try it out. Or you could just preview it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [http://moodle.org/mod/forum/view.php?id=737 Quiz forum for discussions]&lt;br /&gt;
* [[:dev:Open_protocol_for_accessing_question_engines|Description of the Opaque protocol]]&lt;br /&gt;
* https://github.com/timhunt/moodle-qtype_opaque and https://github.com/timhunt/moodle-qbehaviour_opaque the code on github.&lt;/div&gt;</summary>
		<author><name>TimHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Opaque_question_type&amp;diff=88087</id>
		<title>Opaque question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Opaque_question_type&amp;diff=88087"/>
		<updated>2011-08-19T15:21:45Z</updated>

		<summary type="html">&lt;p&gt;TimHunt: /* See also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Installing the Opaque question type==&lt;br /&gt;
&lt;br /&gt;
# Download it from [http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=798 Opaque question type Plugin Database page].&lt;br /&gt;
# Unzip.&lt;br /&gt;
# Copy the opaque folder into the question/type folder of your Moodle install.&lt;br /&gt;
# Go to http://&#039;&#039;myserver&#039;&#039;/admin/index.php in your browser to complete the installation.&lt;br /&gt;
&lt;br /&gt;
==Configuring the question type==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;It would be good if there was a test Opaque question engine somewhere on the internet that people could use to try this out. Unfortunately, at the moment all the ones I know about are inside the OU&#039;s firewall. Drat!&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
#Visit http://&#039;&#039;myserver&#039;&#039;/question/type/opaque/engines.php.&lt;br /&gt;
#Click &#039;Add another engine&#039;.&lt;br /&gt;
#Enter the details of an Opaque engine.&lt;br /&gt;
&lt;br /&gt;
==Creating an Opaque question==&lt;br /&gt;
&lt;br /&gt;
This works just like any other question type - select &#039;Opaque&#039; from the Create new question dropdown on the question bank screen.&lt;br /&gt;
&lt;br /&gt;
The Opaque editing form has very few fields, since the question is mostly defined by the remote engine, we just have to say which engine to connect to, and the question id and version.&lt;br /&gt;
&lt;br /&gt;
Then you can add you new question to a quiz, and try it out. Or you could just preview it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [http://moodle.org/mod/forum/view.php?id=737 Quiz forum for discussions]&lt;br /&gt;
* [[:dev:Open_protocol_for_accessing_question_engines|Description of the Opaque protocol]]&lt;br /&gt;
* https://github.com/timhunt/moodle-qtype_opaque and https://github.com/timhunt/moodle-qbehaviour_opaque the code on github.&lt;/div&gt;</summary>
		<author><name>TimHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Quiz_reports&amp;diff=86744</id>
		<title>Quiz reports</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Quiz_reports&amp;diff=86744"/>
		<updated>2011-08-01T13:40:55Z</updated>

		<summary type="html">&lt;p&gt;TimHunt: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Quiz}}&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&#039;&#039;&#039;Please refer to [[TOC_with_notes#Quiz|these notes]] before editing this page.&#039;&#039;&#039;&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will find the quiz reports in &#039;&#039;&#039;the navigation menu&#039;&#039;&#039; under &#039;&#039;Quiz name&#039;&#039; -&amp;gt; Results. You can also get to the quiz reports where you see a summary of the number of attempts that have been made like &amp;quot;Attempts: 123&amp;quot;. That link also goes to the reports.&lt;br /&gt;
&lt;br /&gt;
[[File:Quiz results menu in a course navigation.png|center|2.1 navigation menu showing a Quiz&#039;s Result menu links]]&lt;br /&gt;
&lt;br /&gt;
==Grades report==&lt;br /&gt;
&lt;br /&gt;
This shows all the students&#039; quiz attempts, with the overall grade, and the grade for each question. There are links to review all the details of a student&#039;s attempt, just as the student would see it.&lt;br /&gt;
&lt;br /&gt;
The results can be downloaded in a variety of formats.&lt;br /&gt;
&lt;br /&gt;
There is a setting form at the top of the page that can be used to control what is displayed.&lt;br /&gt;
&lt;br /&gt;
At the bottom of the page is a graph showing the distribution of scores.&lt;br /&gt;
&lt;br /&gt;
===Deleting attempts===&lt;br /&gt;
&lt;br /&gt;
This report can be used to delete selected quiz attempts, which may sometimes be necessary.&lt;br /&gt;
&lt;br /&gt;
Note that you cannot edit the quiz after it has been attempted, so that is one reason you may wish to delete all attempts.&lt;br /&gt;
&lt;br /&gt;
===Re-grading attempts===&lt;br /&gt;
&lt;br /&gt;
The user-interface for re-grading all, or selected, attempts are also on this page.&lt;br /&gt;
&lt;br /&gt;
You can &#039;dry-run&#039; a regrade. That is, see which scores would change if you did a real re-grade, but without actually updating the grades yet.&lt;br /&gt;
&lt;br /&gt;
===Report options===&lt;br /&gt;
&lt;br /&gt;
* Which students/attempts&lt;br /&gt;
* Whether to show the individual question grades&lt;br /&gt;
* How many attempts per page&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Report columns===&lt;br /&gt;
&lt;br /&gt;
# First name / Surname -&lt;br /&gt;
# Started on - the date and time quiz was started&lt;br /&gt;
# Completed - the date and time completed&lt;br /&gt;
# Time taken - the amount of time it took the student to start and submit the quiz&lt;br /&gt;
# Grade/x - the number of points students scored; &#039;x&#039; is the maximum number of points &lt;br /&gt;
# Feedback - any feed back remarks&lt;br /&gt;
&lt;br /&gt;
[[File:Quiz_result_report_min_6_col_report.png|thumb|center|Report showing only basic information]]&lt;br /&gt;
&lt;br /&gt;
===Display options===&lt;br /&gt;
&lt;br /&gt;
Show / download options :&lt;br /&gt;
* Participants who have attempted the quiz&lt;br /&gt;
* Participants who have not attempted the quiz&lt;br /&gt;
* all attempts - list all the students on the course no matter if they did the test or not&lt;br /&gt;
* all Participants who have or have not attempted the quiz&lt;br /&gt;
&lt;br /&gt;
Only show / download attempts check boxes for:&lt;br /&gt;
* that are graded for each user (Highest grade)&lt;br /&gt;
* that have been regraded / are marked as needing regrading&lt;br /&gt;
&lt;br /&gt;
Report preferences&lt;br /&gt;
* Page size&lt;br /&gt;
* Show/download marks for each question&lt;br /&gt;
&lt;br /&gt;
Tip: To sort the results by two columns, first click on the column heading you want to be the &#039;&#039;&#039;second&#039;&#039;&#039; key, and then click on the column heading you want to be the &#039;&#039;&#039;primary&#039;&#039;&#039; key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Responses report==&lt;br /&gt;
&lt;br /&gt;
This is very similar to the Grades report, except that it shows the responses the students gave, rather than the marks they earned.&lt;br /&gt;
&lt;br /&gt;
It is also possible to show the question text or the right answer, to compare with the student&#039;s response. This is helpful when the question is randomised.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Statistics report==&lt;br /&gt;
&lt;br /&gt;
This report gives a statistical (psychometric) analysis of the quiz, and the questions within it. The front page of this report gives a summary of the whole test. There are then links to drill down into a detailed analysis of a particular question.&lt;br /&gt;
&lt;br /&gt;
The full report (overview, and detailed analysis of all questions) can be downloaded in a variety of formats, as can the quiz structure analysis table.&lt;br /&gt;
&lt;br /&gt;
For a general introduction to psychometrics, this [http://www.youtube.com/watch?v=F5Lu3EdsXNo&amp;amp;NR=1 45-minute seminar] gives a very good an approachable introduction.&lt;br /&gt;
&lt;br /&gt;
===Overall quiz statistics===&lt;br /&gt;
&lt;br /&gt;
This is the first page of the report.&lt;br /&gt;
&lt;br /&gt;
====Quiz information====&lt;br /&gt;
&lt;br /&gt;
This table gives some basic information about the test as a whole, including some statistics for the total score:&lt;br /&gt;
* Quiz name&lt;br /&gt;
* Name of the course it is part of&lt;br /&gt;
* Open and close dates (if applicable)&lt;br /&gt;
* Total number of first/add attempts&lt;br /&gt;
* Average grade for first/all attempts&lt;br /&gt;
* Median grade&lt;br /&gt;
* Standard deviation of grades - how wide the spread of grades is&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Skewness Skewness] and [http://en.wikipedia.org/wiki/Kurtosis Kurtosis] of the grade distribution&lt;br /&gt;
* Coefficient of internal consistency (sometimes called [http://en.wikipedia.org/wiki/Cronbach%27s_alpha Cronbach Alpha]) - This is a measure of whether all the items in the quiz are testing basically the same thing. Thus it measures the consistency of the text, which is a lower bound for the validity. Higher numbers here are better.&lt;br /&gt;
* Error ratio - the variation in the grades comes from two sources. First some students are better than others at what is being tested, and second there is some random variation. We hope that the quiz grades will largely be determined by the student&#039;s ability, and that random variation will be minimised. The error ratio estimates how much of the variation is random, and so lower is better.&lt;br /&gt;
* Standard error - this is derived from the error ratio, and is a measure of how much random variation there is in each test grade. So, if the Standard error is 10%, and a student scored 60%, then their real ability probably lies somewhere between 50% and 70%.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Quiz structure analysis====&lt;br /&gt;
&lt;br /&gt;
This lists all the questions in the quiz with various statistics:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Q#&#039;&#039;&#039; - shows the question number, question type icon, and preview and edit icons&lt;br /&gt;
* &#039;&#039;&#039;Question name&#039;&#039;&#039; - the name is a link to the detailed analysis of this question.&lt;br /&gt;
* &#039;&#039;&#039;Attempts&#039;&#039;&#039; - how many attempts included this question&lt;br /&gt;
* &#039;&#039;&#039;Facility Index&#039;&#039;&#039; - a fancy name for the average score as a percentage. Higher score means easier question.&lt;br /&gt;
* &#039;&#039;&#039;Standard Deviation&#039;&#039;&#039; - how much variation there was in the scores for this question&lt;br /&gt;
* &#039;&#039;&#039;Random guess score&#039;&#039;&#039; - the score the student would get by guessing randomly&lt;br /&gt;
* &#039;&#039;&#039;Intended/Effective weight&#039;&#039;&#039; - Intended weight is simply what you set up when editing the quiz. If question 1 is worth 3 marks out of a total of 10 for the quiz, the the intended weight is 30%. The effective weight is an attempt to estimate, from the results, how much of the actual variation was due to this question. So, ideally the effective weights should be close to the intended weights.&lt;br /&gt;
* &#039;&#039;&#039;Discrimination index&#039;&#039;&#039; - this is the correlation between the score for this question and the score for the whole quiz. That is, for a good question, you hope that the students who score highly on this question are the same students who score highly on the whole quiz. Higher numbers are better.&lt;br /&gt;
* &#039;&#039;&#039;Discriminative efficiency&#039;&#039;&#039; - another measure that is similar to Discrimination index&lt;br /&gt;
&lt;br /&gt;
Where random questions are used, there is one row in the table for the random question, followed by further rows, one for each real question that was selected in place of this random question.&lt;br /&gt;
&lt;br /&gt;
[[:dev/Quiz_statistics_calculations|Quiz statistics calculations]] gives further details on all these quantities.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Quiz question statistics===&lt;br /&gt;
&lt;br /&gt;
You get to this page by clicking on the name of a question in the Quiz structure analysis.&lt;br /&gt;
&lt;br /&gt;
====Question information====&lt;br /&gt;
&lt;br /&gt;
Some basic information about the question.&lt;br /&gt;
&lt;br /&gt;
====Question statistics====&lt;br /&gt;
&lt;br /&gt;
This repeats the information from the table row from the Quiz structure analysis that relates to this question.&lt;br /&gt;
&lt;br /&gt;
====Analysis of responses====&lt;br /&gt;
&lt;br /&gt;
This gives a frequency analysis of the different responses that were given to each part of the question. The details of the analysis depends on the question type, and not all question types support this. For example, essay question responses cannot be analysed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Report options===&lt;br /&gt;
&lt;br /&gt;
You can choose whether to run the report on all attempts, or just the first attempt by each student. Some of the calculations used in the report are based on assumptions that may not apply to quizzes that allow more than one attempt.&lt;br /&gt;
&lt;br /&gt;
Also, because computing the statistics takes some time, the report will store the computed values and re-use them for up to 15 minutes. Therefore, there is a display of how recently the statistics were calculated, with a button to recalculate them immediately.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Manual grading report==&lt;br /&gt;
&lt;br /&gt;
This page makes it easy to manually grade questions in the quiz.&lt;br /&gt;
&lt;br /&gt;
The first screen of the report lists all the questions in the quiz that need to be, or have been, manually graded (for example essay questions) with the number of attempts. There is an option to also show the questions that have been automatically graded, which if useful if you ever need to edit the grades by hand.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Grading a question===&lt;br /&gt;
&lt;br /&gt;
In the summary table, there are links you can use to grade all attempts at a question that need grading. There is also the option to edit the grades that have already been awarded.&lt;br /&gt;
&lt;br /&gt;
You can choose how many question attempts are shown on each page, and what order they are shown in.&lt;br /&gt;
&lt;br /&gt;
If you need to grade anonymously, the go to Settings -&amp;gt; Quiz administration -&amp;gt; Permissions, and remove the permissions &#039;See student idnumbers while grading&#039; and/or &#039;See student names while grading&#039;.&lt;br /&gt;
&lt;br /&gt;
Note that you can also manually grade student&#039;s attempts on the attempt review page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* Details of the [[:dev/Quiz_statistics_calculations|Quiz statistics calculations]]&lt;br /&gt;
* [http://www.youtube.com/watch?v=F5Lu3EdsXNo&amp;amp;NR=1 presentation about test psychometrics (statistics)]&lt;br /&gt;
* [http://moodle.org/mod/data/view.php?d=13&amp;amp;perpage=10&amp;amp;search=Quiz+report&amp;amp;sort=46&amp;amp;order=ASC Additional contributed code report plugins] your Moodle administrator has installed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[de:Test-Berichte]]&lt;/div&gt;</summary>
		<author><name>TimHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Template:Quiz&amp;diff=86727</id>
		<title>Template:Quiz</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Template:Quiz&amp;diff=86727"/>
		<updated>2011-08-01T11:45:55Z</updated>

		<summary type="html">&lt;p&gt;TimHunt: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;sideblock right&amp;quot; style=&amp;quot;width: 14em;&amp;quot;&amp;gt;	&lt;br /&gt;
&amp;lt;div class=&amp;quot;header&amp;quot;&amp;gt;[[Quiz]]&amp;lt;/div&amp;gt;	&lt;br /&gt;
&amp;lt;div class=&amp;quot;content&amp;quot;&amp;gt;&lt;br /&gt;
* [[Quiz settings]]&lt;br /&gt;
* [[Building Quiz]]&lt;br /&gt;
* [[Using Quiz]]&lt;br /&gt;
* [[Quiz reports]]&lt;br /&gt;
* [[Quiz FAQ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Activity|Other Activities]]&#039;&#039;&#039;&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:Quiz]]&amp;lt;/includeonly&amp;gt;&lt;br /&gt;
&amp;lt;noinclude&amp;gt;This template will categorize articles that include it into [[:Category:Quiz]].&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>TimHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Building_Database&amp;diff=86719</id>
		<title>Building Database</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Building_Database&amp;diff=86719"/>
		<updated>2011-08-01T10:09:55Z</updated>

		<summary type="html">&lt;p&gt;TimHunt: Reverted edits by Suryadihadi11 (talk) to last revision by Lasko&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Database}}&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&#039;&#039;&#039;Please refer to [[Page_notes#Database|these notes]] before editing this page.&#039;&#039;&#039;&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>TimHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Git&amp;diff=86284</id>
		<title>Git</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Git&amp;diff=86284"/>
		<updated>2011-07-22T10:06:00Z</updated>

		<summary type="html">&lt;p&gt;TimHunt: Reverted edits by Nakohdo (talk) to last revision by Aborrow&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://git-scm.com/ Git] is a free and open source version control system. Git is a more sophisticated replacement for [[CVS]]. You can find the official Git Moodle repository at http://git.moodle.org/ or mirror at https://github.com/moodle/moodle. The particular advantage of Git is its distributed model, making it ideal for managing local customisations to Moodle. It is also suitable for development of contrib plugins for Moodle.&lt;br /&gt;
&lt;br /&gt;
Use the &#039;&#039;Git&#039;&#039; category link at the end of this page to get a list of all Git related pages.&lt;br /&gt;
&lt;br /&gt;
==Books and tutorials==&lt;br /&gt;
* [http://progit.org/ Pro Git Book]&lt;br /&gt;
* [http://book.git-scm.com/ Git Community Book]&lt;br /&gt;
* [http://www.kernel.org/pub/software/scm/git/docs/gittutorial.html Official Git tutorial]&lt;br /&gt;
* [http://help.github.com/ GitHub Help]&lt;br /&gt;
&lt;br /&gt;
==Moodle specific guides==&lt;br /&gt;
* [[Installing Moodle from Git repository]] - WIP&lt;br /&gt;
* [[Maintaining Moodle customisations with Git]] - WIP&lt;br /&gt;
* Submitting patches and pull requests - TODO&lt;br /&gt;
* [[Git repositories for contrib modules]] - WIP&lt;br /&gt;
&lt;br /&gt;
==Tools==&lt;br /&gt;
The most powerful tool you can git is probably command line git. If you prefer clicking you can try one of the following, more information at [http://git-scm.com/tools http://git-scm.com/tools].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IDE integrations&#039;&#039;&#039;&lt;br /&gt;
* [http://www.eclipse.org/egit/ EGit plugin for Eclipse IDE]&lt;br /&gt;
* [http://netbeans.org/projects/versioncontrol/pages/Git_main Netbeans] - early access official Git plugin for Netbeans&lt;br /&gt;
* [http://www.jetbrains.com/phpstorm/ PHPStorm] - commercial IDE with Git support&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Frontends&#039;&#039;&#039;&lt;br /&gt;
* [http://code.google.com/p/tortoisegit/ TortoiseGit] - Windows only UI&lt;br /&gt;
* [http://gitx.frim.nl/ GitX] - OS X only UI&lt;br /&gt;
* [http://www.syntevo.com/smartgit/index.html SmartGit] - feature rich multiplatform UI (free for non-commercial use)&lt;br /&gt;
&lt;br /&gt;
==Hosting==&lt;br /&gt;
* [http://github.com/ GitHub] - probably the best hosting choice for beginners&lt;br /&gt;
* [http://gitorious.org/ Gitorious] - free hosting running on open source code&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [[Development:Git Migration]]&lt;br /&gt;
* Using Moodle [http://moodle.org/mod/forum/discuss.php?d=162723 Moving from CVS to git in November 2010] forum discussion&lt;br /&gt;
&lt;br /&gt;
[[Category:Git]]&lt;br /&gt;
[[Category:Administrator]]&lt;/div&gt;</summary>
		<author><name>TimHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=File_system_repository&amp;diff=85559</id>
		<title>File system repository</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=File_system_repository&amp;diff=85559"/>
		<updated>2011-06-30T10:19:18Z</updated>

		<summary type="html">&lt;p&gt;TimHunt: /* How do the files get into the File system repository? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Repositories}}&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&#039;&#039;&#039;Please refer to [[Page_notes#File system repository configuration|these notes]] before editing this page.&#039;&#039;&#039;&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==How to use the filesystem as a repository==&lt;br /&gt;
&lt;br /&gt;
This module allows you to share any of the sub-directories found in $CFG-&amp;gt;dataroot/repository as a browseable repository inside Moodle.&lt;br /&gt;
&lt;br /&gt;
It needs to be configured by a system administrator, because it requires write access to the system disk.&lt;br /&gt;
&lt;br /&gt;
Here is [http://moodle.drupalgardens.com/article/tue-06152010-1918/ftp-files-moodle-20-repository-api a video] that may be helpful.&lt;br /&gt;
&lt;br /&gt;
===1. Create some folders to be repositories===&lt;br /&gt;
&lt;br /&gt;
Inside your &amp;quot;Moodledata&amp;quot; directory (the one where all your data is stored), create one called &amp;quot;repository&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Inside that, make one folder for each repository you want to create.  Short, simple, one-word names are best, I&#039;m going to use &amp;quot;clipart&amp;quot; as my example.&lt;br /&gt;
&lt;br /&gt;
Inside your &amp;quot;clipart&amp;quot; folder put your files (in this example it could be hundreds of useful images that you got from [http://www.openclipart.org/ openclipart.org]).&lt;br /&gt;
&lt;br /&gt;
Note that these directories can be ANYTHING your operating system supports.  You could mount a whole hard drive there, or mount a shared Windows network drive via SAMBA.  You could have a symbolic link to a directory that allows FTP access.  The sky is the limit here for a creative Moodle admin!!&lt;br /&gt;
&lt;br /&gt;
===2. Enable the File System repository plugin===&lt;br /&gt;
&lt;br /&gt;
You do this in the Settings block, under Site Administration &amp;gt; Plugins &amp;gt; Repositories &amp;gt; Manage repositories &amp;gt;File system. &lt;br /&gt;
&lt;br /&gt;
Once enabled, click on the &amp;quot;Settings&amp;quot; link beside it.&lt;br /&gt;
&lt;br /&gt;
Alternatively, you will now see &amp;quot;File system&amp;quot; in the list of links in Plugins &amp;gt; Repositories.  Click on this link, will also take you to the settings page.&lt;br /&gt;
&lt;br /&gt;
===3. (Optional) Set up the personal repositories===&lt;br /&gt;
Still in the File system settings page:&lt;br /&gt;
You can safely ignore the settings at the top.  These are for rare cases where you want to allow users to create their own virtual repositories from the filesystem, either for themselves or a course.&lt;br /&gt;
&lt;br /&gt;
===4. Create some actual usable repositories (instances)===&lt;br /&gt;
In settings at the bottom of the page&lt;br /&gt;
# Click on &amp;quot;Add a repository instance&amp;quot;.&lt;br /&gt;
# Give it a name.  The name will display in the [[File picker]] interface  with the other repository areas.&lt;br /&gt;
# Choose the appropriate subdirectory from the list.&lt;br /&gt;
# Click save&lt;br /&gt;
&lt;br /&gt;
===5. Check permissions===&lt;br /&gt;
&lt;br /&gt;
Although permissions should be on by default, you may have to check the roles and make sure that the &amp;quot;Authenticated User&amp;quot; role (or some other role, if you have set up a special one) has the &amp;quot;repository/filesystem:view&amp;quot; capability allowed.  &lt;br /&gt;
&lt;br /&gt;
(If you are using 2.0 Preview 1 then this was not on by default)&lt;br /&gt;
&lt;br /&gt;
===6. Use it!===&lt;br /&gt;
&lt;br /&gt;
Everything should be working.  If you try to add a file in Moodle, then the File Picker should show you your new file system repository, and you should be able to browse it and select files to use.  &lt;br /&gt;
&lt;br /&gt;
Note that file types are respected (based on file extensions), so if you are adding an image in the editor, then you won&#039;t see Office docs (for example) appear in the File Picker.&lt;br /&gt;
&lt;br /&gt;
[[Image:Repository-filesystem-filepicker.png]]&lt;br /&gt;
&lt;br /&gt;
==FAQ==&lt;br /&gt;
===How do the files get into the File system repository?===&lt;br /&gt;
#Get your person with server access to copy them in&lt;br /&gt;
#Set up FTP&lt;br /&gt;
#Set up access to that folder as a Windows share&lt;br /&gt;
&lt;br /&gt;
===Is there a way to upload files to a File system repository from inside Moodle?===&lt;br /&gt;
If you are talking about core (vanilla) Moodle: not at the moment&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* Overview of [[Repositories|Repositories]]&lt;br /&gt;
* [http://moodle.drupalgardens.com/article/tue-06152010-1918/ftp-files-moodle-20-repository-api FTP files into Moodle 2.0 with the repository API article from moodle.drupalgardens.com] including screencast&lt;br /&gt;
&lt;br /&gt;
[[Category:Repositories]]&lt;br /&gt;
[[de:Dateisystem-Repository]]&lt;/div&gt;</summary>
		<author><name>TimHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Section_summary&amp;diff=85493</id>
		<title>Section summary</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Section_summary&amp;diff=85493"/>
		<updated>2011-06-27T10:52:12Z</updated>

		<summary type="html">&lt;p&gt;TimHunt: Reverted edits by Kitt197 (talk) to last revision by Sfielder&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This section allows you to place information about the topic or week.  It could be an introduction to the unit of study or a short summary of the weekly plan.  Activities and resources are listed below this section.&lt;br /&gt;
&lt;br /&gt;
Each summary should be very short so that the course page doesn&#039;t become too long. If you find yourself wanting to say more than a sentence or two then consider adding a resource to this topic instead (for example, the first activity might be a page called About This Topic).&lt;br /&gt;
&lt;br /&gt;
Caution:  Use only a few very descriptive words in a summary so that the Jump To menu is meaningful and clean.  Use a label to write a longer summary/description.&lt;br /&gt;
&lt;br /&gt;
[[Category:Course]]&lt;/div&gt;</summary>
		<author><name>TimHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=About_Moodle&amp;diff=85479</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=85479"/>
		<updated>2011-06-24T10:36:18Z</updated>

		<summary type="html">&lt;p&gt;TimHunt: Reverted edits by Alba70 (talk) to last revision by Tsala&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{About Moodle}}&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 [[License|license]] for full details and please contact the [http://moodle.org/user/view.php?id=1&amp;amp;course=1 copyright holder] directly if you have any questions.&lt;br /&gt;
&lt;br /&gt;
Moodle can be [[Installing Moodle|installed]] on any computer that can run [http://www.php.net/ PHP], and can support an SQL type database (for example [http://www.mysql.com/ 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;
==See also==&lt;br /&gt;
*[http://moodle.org/course/view.php?id=17223 Teaching and Learning with Moodle] - Entry point for educators, new and experienced. See what Moodle is, view and contribute real life examples of using various features, and follow useful links to resources and places you can share, seek help and connect with fellow educators using Moodle.&lt;br /&gt;
*[[Teacher documentation |What does a teacher need to know?]] A good starting place to learn about the robust features in a Moodle course.&lt;br /&gt;
*[http://demo.moodle.org/ Moodle Demonstration Site]. Here you can play on a Moodle site as a teacher, administrator or student. &lt;br /&gt;
*[http://en.wikipedia.org/wiki/Moodle The Moodle page at Wikipedia]. MoodleDocs and Wikipedia both use [[MediaWiki]].&lt;br /&gt;
*[http://en.wikiversity.org/wiki/Moodle Moodle page at Wikiversity] &lt;br /&gt;
*[http://www.infonary.com/moodle Moodle News at Infonary]  &lt;br /&gt;
*[[Moodle_manuals]] has many links or there is the [[Using Moodle book]] for those who must have an Adobe document to read or print.&lt;br /&gt;
*[[Moodle presentations| Here is where Moodlers]] share their &amp;quot;This is Moodle&amp;quot; presentations.&lt;br /&gt;
*[http://www.google.com/search?hl=en&amp;amp;q=moodlemoot Moodlemoots] are exciting Moodle conferences all over the world, with both face to face and virtual components.&lt;br /&gt;
*[[Documents useful for decision makers|Which course management software ?]] - Documents useful for decision makers&lt;br /&gt;
*Each of the links below will take you to a different alphabetical index of topics, such as the Administrator index or Teacher index.   &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>TimHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Category:Contributed_code&amp;diff=84941</id>
		<title>Category:Contributed code</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Category:Contributed_code&amp;diff=84941"/>
		<updated>2011-06-12T15:30:13Z</updated>

		<summary type="html">&lt;p&gt;TimHunt: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;An index of documentation pages about contributed code.&lt;br /&gt;
&lt;br /&gt;
Contributed code, or &amp;quot;contrib&amp;quot; for short, is understood to be all code contributed to Moodle which is not included in the standard Moodle distribution.&lt;br /&gt;
&lt;br /&gt;
The standard Moodle distribution, sometimes known as &amp;quot;Core&amp;quot; code is the code stored and developed at [http://git.moodle.org/gw?p=moodle.git;a=summary git.moodle.org].&lt;br /&gt;
&lt;br /&gt;
Contributed code is managed by whoever developed that plug-in. Common options include:&lt;br /&gt;
* a publicly accessibly git repository containing the code. For example https://github.com/moodlehq/&lt;br /&gt;
* the old [http://cvs.moodle.org/contrib/ contrib cvs folder].&lt;br /&gt;
&lt;br /&gt;
All contrib code (and core code) should be indexed in the [http://moodle.org/mod/data/view.php?id=6009 Modules and plugins database].&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*[[Installing contributed modules or plugins]]&lt;br /&gt;
*[[Contributed code FAQ]]&lt;br /&gt;
*[[Development:Guidelines for contributed code]]&lt;br /&gt;
*[[Development:contrib]]&lt;br /&gt;
*[http://moodle.org/mod/data/view.php?id=6009 Modules and plugins database]&lt;br /&gt;
&lt;br /&gt;
[[Category:Teacher]]&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
&lt;br /&gt;
[[eu:Kategoria:Kode ezestandarra]]&lt;br /&gt;
[[ja:Category:ブロック ( 非標準 )]]&lt;/div&gt;</summary>
		<author><name>TimHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Custom_SQL_queries_report&amp;diff=84758</id>
		<title>Custom SQL queries report</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Custom_SQL_queries_report&amp;diff=84758"/>
		<updated>2011-06-09T15:47:28Z</updated>

		<summary type="html">&lt;p&gt;TimHunt: /* See also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Moodle 1.9}}&lt;br /&gt;
Created by The Open University&lt;br /&gt;
&lt;br /&gt;
This admin report plugin allows Administrators to set up arbitrary database queries to act as ad-hoc reports. Reports can be of two types: either run on demand, or scheduled to run automatically. Other users with the right capability can go in and see a list of queries that they have access to. Results can be viewed on-screen or downloaded as CSV.&lt;br /&gt;
&lt;br /&gt;
==Installing this report==&lt;br /&gt;
&lt;br /&gt;
Follow the generic [[Installing contributed modules or plugins]] documentation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Screen shots==&lt;br /&gt;
&lt;br /&gt;
Here are two example screen shots, showing the two main screens.&lt;br /&gt;
&lt;br /&gt;
[[Image:Custom_report_list.png|thumb|none|600px|The list of available reports]]&lt;br /&gt;
[[Image:Custom_report.png|thumb|none|600px|The results of running one of the reports]]&lt;br /&gt;
&lt;br /&gt;
(Note, these screen shots are in the OU theme, not the standard Moodle theme, and iCMA is OU-jargon for quiz.)&lt;br /&gt;
&lt;br /&gt;
==Interface for normal users==&lt;br /&gt;
&lt;br /&gt;
===List of available queries===&lt;br /&gt;
&lt;br /&gt;
Users with the report/customsql:view capability can access the list of reports in the admin block. Each query is accessible only to a certain people. There are three levels of access:&lt;br /&gt;
* Available to any one who can access the report at all (those with report/customsql:view).&lt;br /&gt;
* Available to people who are able to see other system reports (those with moodle/site:viewreports)&lt;br /&gt;
* Available to administrators only (those with moodle/site:config)&lt;br /&gt;
&lt;br /&gt;
When you go to the list, it will only show the queries you have access to. There is a note beside each query saying when it was last run, and how long it took to generate.&lt;br /&gt;
&lt;br /&gt;
The list shows on-demand and scheduled queries separately.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Running an on-demand query===&lt;br /&gt;
&lt;br /&gt;
To run an on-demand query, click on its name in the list of queries.&lt;br /&gt;
&lt;br /&gt;
The query will be run, and the results will be displayed as a table. Any URLs in the table will automatically be made into hyperlinks.&lt;br /&gt;
&lt;br /&gt;
A description of the query may appear above the table.&lt;br /&gt;
&lt;br /&gt;
The summary of when the query was run and how long it took is shown at the bottom, along with a link to download the CSV file (for example to get the data into Excel) and a link back to the list of all available queries.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Viewing the results of scheduled queries===&lt;br /&gt;
&lt;br /&gt;
Scheduled queries can work in one of two ways. Either each run of the report generates and entire table of reasults, or each run just creates one line of results, and the report builds up a row at a time.&lt;br /&gt;
&lt;br /&gt;
When you click the name in the list of queries, you get taken to a display of the latest results, just like in the on-demand case.&lt;br /&gt;
&lt;br /&gt;
However, if each scheduled run generates a complete report, then at the bottom of a page there will be a list of all the previous runs of the report, so that you can go and see how the report changed over time.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Interface for administrators==&lt;br /&gt;
&lt;br /&gt;
Administrators (that is, users with report/customsql:definequeries) see everything that other users see, but with some additions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Additional controls in the staff interface===&lt;br /&gt;
&lt;br /&gt;
Administrators get shown who each report in the list is available to.&lt;br /&gt;
&lt;br /&gt;
They also get an edit and a delete icon next to each query.&lt;br /&gt;
&lt;br /&gt;
There is an &#039;&#039;&#039;Add new query button&#039;&#039;&#039; at the end of the list of queries.&lt;br /&gt;
&lt;br /&gt;
When viewing a particular query, Administrators get an edit and a delete link underneath the table of results.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Adding or editing a query===&lt;br /&gt;
&lt;br /&gt;
When you click the &#039;&#039;&#039;Add new query button&#039;&#039;&#039;, you get taken to an editing form that lets you define the query.&lt;br /&gt;
&lt;br /&gt;
You must give the query a name.&lt;br /&gt;
&lt;br /&gt;
You can optionally enter a description that is displayed above the results table. You should use this to explain what the results of the query mean.&lt;br /&gt;
&lt;br /&gt;
You must enter the SQL to generate the results you want displayed. This must be an SQL select statement. You must use the prefix prefix_ for table names. It should not be possible to enter any SQL that would alter the contents of the database.&lt;br /&gt;
&lt;br /&gt;
You choose who you want the query to be accessible to.&lt;br /&gt;
&lt;br /&gt;
You choose whether the query should be run on-demand or scheduled weekly or monthly. If the report is scheduled, you can say whether the each run returns one row to be added to a single table, or whether each run generates a separate table.&lt;br /&gt;
&lt;br /&gt;
When you save the new query, the SQL is checked to make sure that it will execute without errors. If you have said that the report will only return a single row, this is also checked.&lt;br /&gt;
After saving the query, if this was a manual query, you are taken to the query results page, so you can see what the results look like. If it was an automatic query or if you cancel the form, you are taken to the list of available queries.&lt;br /&gt;
&lt;br /&gt;
Editing an existing query uses the same form as for adding a new query, but to change the properties of an existing query.&lt;br /&gt;
&lt;br /&gt;
Note that at the OU, weeks start on Saturday. If you don&#039;t like that, there is a fairly obvious constant to hack at the top of locallib.php.&lt;br /&gt;
&lt;br /&gt;
===Deleting a query===&lt;br /&gt;
&lt;br /&gt;
When you click the delete icon or link for a query, you are taken to a confirmation page that shows you SQL of the query you are about to delete. The query is only deleted if you click Yes on the confirmation page.&lt;br /&gt;
&lt;br /&gt;
After deleting a query, you are taken back to the list of queries.&lt;br /&gt;
&lt;br /&gt;
==Share your interesting queries here==&lt;br /&gt;
&lt;br /&gt;
If you come up with any interesting SQL to custom reports, you can share it here.&lt;br /&gt;
&lt;br /&gt;
===Quiz attempts in the last week/month===&lt;br /&gt;
&lt;br /&gt;
Set this up as a scheduled report:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code sql&amp;gt;&lt;br /&gt;
SELECT COUNT(*)&lt;br /&gt;
FROM prefix_quiz_attempts&lt;br /&gt;
WHERE timefinish &amp;gt; %%STARTTIME%%&lt;br /&gt;
    AND timefinish &amp;lt;= %%ENDTIME%%&lt;br /&gt;
    AND preview = 0&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This &#039;&#039;&#039;must&#039;&#039;&#039; be set up as a &#039;&#039;&#039;Scheduled, on the first day of each week&#039;&#039;&#039; or &#039;&#039;&#039;Scheduled, on the first day of each month&#039;&#039;&#039; report, or it will not work.&lt;br /&gt;
&lt;br /&gt;
===Usage summary===&lt;br /&gt;
&lt;br /&gt;
This report shows roughly the same usage statistics that are sent to moodle.org when you register your site. The ones that are aggregated at http://moodle.org/stats/. (The only difference is that the registration form does not do AND confirmed = 1 for some reason.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code sql&amp;gt;&lt;br /&gt;
SELECT&lt;br /&gt;
(SELECT COUNT(id) FROM prefix_course) - 1 AS courses,&lt;br /&gt;
(SELECT COUNT(id) FROM prefix_user WHERE deleted = 0 AND confirmed = 1) AS users,&lt;br /&gt;
(SELECT COUNT(DISTINCT ra.userid)&lt;br /&gt;
 FROM prefix_role_capabilities rc&lt;br /&gt;
 JOIN prefix_role_assignments ra ON ra.roleid = rc.roleid&lt;br /&gt;
 WHERE rc.capability IN (&#039;moodle/course:upd&#039; || &#039;ate&#039;, &#039;moodle/site:doanything&#039;)) AS teachers,&lt;br /&gt;
(SELECT COUNT(id) FROM prefix_role_assignments) AS enrolments,&lt;br /&gt;
(SELECT COUNT(id) FROM prefix_forum_posts) AS forum_posts,&lt;br /&gt;
(SELECT COUNT(id) FROM prefix_resource) AS resources,&lt;br /&gt;
(SELECT COUNT(id) FROM prefix_question) AS questions&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are two interesting queries in this blog post [http://tjhunt.blogspot.com/2010/03/when-do-students-submit-their-online.html When do students submit their online tests?].&lt;br /&gt;
&lt;br /&gt;
===Monthly Usage by Role===&lt;br /&gt;
&lt;br /&gt;
This report shows a distinct count of users by their role, accessing your site.  Each instance of user and role is counted once per month, no matter how many courses they access.  We use this to show the total number of students and teachers accessing our site.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code sql&amp;gt;&lt;br /&gt;
SELECT &lt;br /&gt;
month(from_unixtime(`prefix_stats_user_monthly`.`timeend`)) AS calendar_month,&lt;br /&gt;
year(from_unixtime(`prefix_stats_user_monthly`.`timeend`)) AS calendar_year,&lt;br /&gt;
prefix_role.name as user_role,&lt;br /&gt;
COUNT(DISTINCT prefix_stats_user_monthly.userid) AS total_users&lt;br /&gt;
FROM&lt;br /&gt;
prefix_stats_user_monthly&lt;br /&gt;
Inner Join prefix_role_assignments ON prefix_stats_user_monthly.userid = prefix_role_assignments.userid&lt;br /&gt;
Inner Join prefix_context ON prefix_role_assignments.contextid = prefix_context.id&lt;br /&gt;
Inner Join prefix_role ON prefix_role_assignments.roleid = prefix_role.id&lt;br /&gt;
WHERE prefix_context.contextlevel = 50&lt;br /&gt;
AND `prefix_stats_user_monthly`.`stattype` = &#039;activity&#039;&lt;br /&gt;
AND prefix_stats_user_monthly.courseid &amp;lt;&amp;gt;1&lt;br /&gt;
GROUP BY month(from_unixtime(`prefix_stats_user_monthly`.`timeend`)),&lt;br /&gt;
year(from_unixtime(`prefix_stats_user_monthly`.`timeend`)),&lt;br /&gt;
prefix_stats_user_monthly.stattype,&lt;br /&gt;
prefix_role.name&lt;br /&gt;
ORDER BY &lt;br /&gt;
year(from_unixtime(`prefix_stats_user_monthly`.`timeend`)), month(from_unixtime(`prefix_stats_user_monthly`.`timeend`)),&lt;br /&gt;
prefix_role.name&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You must have Statistics turned on to be able to generate any data with this report.&lt;br /&gt;
&lt;br /&gt;
===Show all Quiz results across a site===&lt;br /&gt;
I&#039;m sure someone will be able to improve upon this, but this is a query that will show Quiz results across a site. --[[User:Stuart Mealor|Stuart Mealor]] 22:07, 9 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code sql&amp;gt;&lt;br /&gt;
SELECT &lt;br /&gt;
     prefix_grade_items.itemname,&lt;br /&gt;
     prefix_grade_items.grademax,&lt;br /&gt;
     ROUND(prefix_grade_grades.finalgrade, 0) AS finalgrade,&lt;br /&gt;
     prefix_user.firstname,&lt;br /&gt;
     prefix_user.lastname,&lt;br /&gt;
     prefix_user.username&lt;br /&gt;
FROM&lt;br /&gt;
     prefix_grade_grades&lt;br /&gt;
     INNER JOIN prefix_user ON prefix_grade_grades.userid = prefix_user.id&lt;br /&gt;
     INNER JOIN prefix_grade_items ON prefix_grade_grades.itemid = prefix_grade_items.id&lt;br /&gt;
WHERE (prefix_grade_items.itemname IS NOT NULL)&lt;br /&gt;
AND (prefix_grade_items.itemtype = &#039;mod&#039; OR prefix_grade_items.itemtype = &#039;manual&#039;)&lt;br /&gt;
AND (prefix_grade_items.itemmodule = &#039;quiz&#039; OR prefix_grade_items.itemmodule IS NULL)&lt;br /&gt;
AND (prefix_grade_grades.timemodified IS NOT NULL)&lt;br /&gt;
AND (prefix_grade_grades.finalgrade &amp;gt; 0)&lt;br /&gt;
AND (prefix_user.deleted = 0)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [[Reports_(administrator)]] for other admin reports&lt;br /&gt;
* [[Installing contributed modules or plugins]]&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=136484 Custom SQL queries report] forum announcement&lt;br /&gt;
* list of [[ad-hoc contributed reports]]&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=153059 Forum post] with some more useful queries.&lt;br /&gt;
* [http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=2884 Modules and plugins database entry]&lt;br /&gt;
&lt;br /&gt;
[[Category: Administrator]]&lt;br /&gt;
[[Category:Report]]&lt;br /&gt;
[[Category:Contributed_code]]&lt;br /&gt;
&lt;br /&gt;
[[fr:admin/report/customsql/index]]&lt;/div&gt;</summary>
		<author><name>TimHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Lesson_Pages&amp;diff=84356</id>
		<title>Lesson Pages</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Lesson_Pages&amp;diff=84356"/>
		<updated>2011-06-06T12:53:33Z</updated>

		<summary type="html">&lt;p&gt;TimHunt: Reverted edits by Btuncay (talk) to last revision by Lasko&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Lesson}}&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&#039;&#039;&#039;Please refer to [[TOC_with_notes#Lesson|these notes]] before editing this page.&#039;&#039;&#039;&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The intent of this page is to give a slightly different context for teachers concerning lesson pages. Teachers can add 10 different types of pages to a Lesson. 6 basic question types and a Content page (before Moodle version 2.0 these were called a Branch Table page).  There are 3 navigation &amp;quot;pages&amp;quot; called Cluster, End of Cluster, and End of Branch which give special attributes to a series of pages.   Students will only see Question and Content page types.&lt;br /&gt;
&lt;br /&gt;
The unique feature in the Lesson module a jump which determines what happens when the student makes a choice.&lt;br /&gt;
&lt;br /&gt;
== Overview Lesson Pages ==&lt;br /&gt;
{{Moodle 1.8}}&lt;br /&gt;
There are two basic types of Lesson pages: Choice and Navigation.  Most pages offer the student choices, &amp;quot;question pages&amp;quot; (related to  [[Quizzes]]) are the most common. Moodle calls another type of choice page a &amp;quot;Content page&amp;quot;.  Navigation pages create additional robust features that impact a student&#039;s choices and might be considered more advanced features.   &amp;quot;End of Branch&amp;quot;, &amp;quot;Cluster&amp;quot; and &amp;quot;End Cluster&amp;quot; are the Navigational pages  seen by the teacher but can not be seen by the student.&lt;br /&gt;
&lt;br /&gt;
This article will cover the generic format for these types. We will focus upon the Choice pages format as seen by the teacher in edit mode. A Question page has all the elements of a Content page, plus a few more features.  &lt;br /&gt;
&lt;br /&gt;
*Choice pages could also be called a: &amp;quot;View page&amp;quot;, &amp;quot;Student page&amp;quot;, or &amp;quot;Seen page&amp;quot;.  Generally we will refer to the specific page type, like &amp;quot;True/False question&amp;quot;.   &lt;br /&gt;
*Navigation pages are not seen by the student, including anything in the content area..  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Content Pages (Branch tables) ==&lt;br /&gt;
Content pages (Pre 2.0 Moodle they were called Branch pages) have content and buttons at the bottom that students can select.  Content pages can serve as neutral pages that are never scored for grade or lesson completion calculations.  &lt;br /&gt;
&lt;br /&gt;
The basic parts of a Content page are: Page Title, Page Content, Description(#) and Jump(#). In the edit mode there is an edit toolbar filled with icons directly below the Page Title.  At the bottom of the edit mode screen are buttons to redisplay, save or cancel.  Small yellow buttons with question marks are help links.   &lt;br /&gt;
&lt;br /&gt;
The number of choices (descriptions or answers) can be changed in edit mode as needed by the &amp;quot;Updating the Lesson&amp;quot; button in edit mode. The Maximum number of answers/jumps default is 4, but can range from 2 to 20.  &lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;TIP:&#039;&#039;Teachers may discover that they can not edit a 10 answer question they created, because they changed the lesson setting back to a smaller number. &lt;br /&gt;
&lt;br /&gt;
::&#039;&#039;&#039;NOTE: In Moodle 2.0, &amp;quot;Branch Table&amp;quot; pages are renamed &amp;quot;Content Pages&amp;quot;.&#039;&#039;&#039;   &lt;br /&gt;
&lt;br /&gt;
[[Image:Lesson Branch Table Edit expanded 1.png|thumb|center|600px|Content page, Teacher in edit tab, expanded view]]&lt;br /&gt;
&lt;br /&gt;
==== Page Title ====&lt;br /&gt;
In general, the Page Title is used to locate the page.  For example, it can be used in jumps or seen in edit modes by the teacher. The title can also be seen by the student in any choice page.&lt;br /&gt;
&lt;br /&gt;
==== Page Content ====&lt;br /&gt;
Page Content is where material is going to be presented to the student.  [[Page content]] offers a editor tool bar with basic formatting icons.   Please review the [[HTML editor]] for all the features you can add as content in a Content or Question page with this toolbar.&lt;br /&gt;
&lt;br /&gt;
In other pages you will read that Content pages can serve as an initial Table of Contents.   You will read more about that in Descriptions and Jumps below.&lt;br /&gt;
&lt;br /&gt;
==== Descriptions ====&lt;br /&gt;
Descriptions are the choices the student must make.  In a content page these show up as buttons below the page.  They can be arranged vertically or horizontally in any content page.  While you can turn on the HTML editor, you will not be able to insert a picture in a button description or make the text bold.&lt;br /&gt;
&lt;br /&gt;
Leaving  description 1 blank, will automatically give the student one choice: &amp;quot;continue&amp;quot; with the flow set to next page.  This is a Moodle default setting.&lt;br /&gt;
&lt;br /&gt;
==== Jumps in General====&lt;br /&gt;
[[Jumps]] determine what happens after a student makes a choice.  &lt;br /&gt;
&lt;br /&gt;
Jumps can be divided into two types - Relative Jumps and Absolute Jumps. The default navigation using the relative jumps is Next Page and This Page. The destination of the Next Page jump is the next page in the logical order of the lesson. Absolute jumps specify the actual page to show next by specifying of the page&#039;s Title.&lt;br /&gt;
&lt;br /&gt;
There is a pull down menu which lists the relative jumps like &amp;quot;next page&amp;quot;, &amp;quot;this page&amp;quot; &amp;quot;previous page&amp;quot; and some special navigation pages we will discuss later. There will probably be many absolute page jumps listed in a nearly completed lesson.  The teacher selects the page listed in the pull down menu that the student will jump to after their choice, and after seeing the response.  See  [[Jumps]] for more details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Lesson Branch Table student view 2m.png|thumb|center|500px|Content (Branch Table) page, Student view, showing parts]]&lt;br /&gt;
&lt;br /&gt;
== Questions - Choice Pages ==&lt;br /&gt;
Question pages have content and something for the student to answer or select. There can be a specific text response for each specific answer. Question pages can be scored/graded  [[Lesson_module#Grading|(see lesson grading)]] in several ways. These last two features make them different from Branch pages.&lt;br /&gt;
&lt;br /&gt;
There are many [[Lesson question types|types of questions]] the teacher can select in a Lesson. The help button next to Question type gives a good description of each.  The question types are on tabs. &lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;TIP:&#039;&#039; Be sure to select the question type before starting your question or you could lose your work when you try to change it later.  &lt;br /&gt;
:&#039;&#039;TIP:&#039;&#039; Often you can start a question, save it, then change it&#039;s type without losing your content section. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Lesson Question MC Edit expanded 1.png|thumb|center|500px|Multiple Choice question, Edit view, expanded, custom scoring on]]&lt;br /&gt;
&lt;br /&gt;
==== Title &amp;amp; Content ====&lt;br /&gt;
The title and content sections are the same as for a branch page.  Again, the page title can be important, don&#039;t give away the answer!&lt;br /&gt;
&lt;br /&gt;
In some learning situations, the teacher will put lesson material in the [[Page content| page content]].  At the bottom of the content section, they put the question the student must answer.   In other lessons, the question will be the content.&lt;br /&gt;
&lt;br /&gt;
==== Answer ====&lt;br /&gt;
Answers are the choices the student must make.  In a question, these can take different forms and show up below the content section page. Each of the question types has its own type of answer.   The help button next to Answer offers a good description of each type. The most common is multiple choice. We will use this type in our examples.  &lt;br /&gt;
&lt;br /&gt;
The order of the answers will appear to be random to the students. In other words, two students looking at the same question, will see the answers in a different order. Unlike a Quiz, there is no Lesson setting to turn off the &amp;quot;shuffle&amp;quot;.   &lt;br /&gt;
&lt;br /&gt;
When form permits, a good practice is to always enter the correct answer(s) first.  Moodle does not like skipped answers.&lt;br /&gt;
&lt;br /&gt;
There is also the ability to use all the content editing tools in each of the answers.   For example, one answer could be a picture, another text.  Normally it is turned off, but checking the box and pressing the redisplay button at the bottom of the page in edit mode, will turn it on. &lt;br /&gt;
&lt;br /&gt;
The default answer for a question when answer 1 is blank is &amp;quot;continue&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====Responses in Questions====&lt;br /&gt;
Every question can have a default or teacher designed response for an answer. Different types of questions use the response field differently.  There is a Lesson setting that can turn off the [[Adding/editing_a_lesson#Display_default_feedback|default response]].  &lt;br /&gt;
&lt;br /&gt;
Each answer can have a unique response in a multiple choice, short answer, numeric question.  There can only be a  correct and wrong answer response for multianswer and matching question types. Teachers can create individualized responses when they grade essay questions.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;TIP&#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, then in the Lesson Settings, set [[Adding/editing_a_lesson#The_Maximum_Number_of_Attempts_.28by_a_Student.29|Maximum number of attempts]] to &amp;quot;1&amp;quot; and [[Adding/editing_a_lesson#Display_default_feedback|Display default feedback]] to &amp;quot;no&amp;quot;.  &lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;TIP:&#039;&#039; This task is a little easier for those who import questions, just enter the &amp;amp;amp;nbsp; as the response  and you will achieve the desired effect in the Lesson.&lt;br /&gt;
&lt;br /&gt;
*In earlier versions without the display feedback option, a default response message will  still be displayed to the student upon answering each question. Of course you can always enter your own response for every or any answer.  However if you want no visible message displayed after the answer, then make sure your enter the special character called a non-breaking space as response in text mode. You will type this in text mode:  &amp;amp;amp;nbsp; (Ampersand nbsp semicolon).&lt;br /&gt;
&lt;br /&gt;
==== Jumps in Questions ====&lt;br /&gt;
Jumps determine what happens after a student makes a choice. See [[Jumps]] for more details.  Their use is the same as the Branch page jump.   Make sure you check lesson settings and flow control to see what will happen if you don&#039;t put in an answer or jump for a correct answer.&lt;br /&gt;
&lt;br /&gt;
Usually the presentation mode default for a question with all blank answers is &amp;quot;Next Page&amp;quot;. The default for Correct answer is &amp;quot;Next Page. For a wrong answer the default is &amp;quot;This Page.&amp;quot;  Each answer can have a unique jump in all question types, except for multianswer and matching question  that only allow single jump for a correct answer and one for any wrong answer.&lt;br /&gt;
&lt;br /&gt;
See [[Lesson_module#The_Flash_card_lesson| Lesson Flash Card]] or [[Clusters]] for features that create random navigational orders for the student.&lt;br /&gt;
&lt;br /&gt;
==== Score ====&lt;br /&gt;
The score is used with &amp;quot;custom scoring&amp;quot;.  It serves as the basis for grading each specific answer.  It can be a positive or negative number.  The default is 1 for a correct answer and 0 for a wrong answer.  It is possible to use other scoring methods which ignore this value.  See - link- for a better description of grading and scoring a lesson.&lt;br /&gt;
&lt;br /&gt;
==== Other ====&lt;br /&gt;
There are several buttons at the bottom.  Save and Cancel should explain themselves.  Redisplay is used after the &amp;quot;use HTML Editor&amp;quot; box is checked on the answer.&lt;br /&gt;
[[Image:Lesson Question MC student view 1.png|thumb|center|400px|Multiple Choice question, student view]]&lt;br /&gt;
&lt;br /&gt;
= Navigation Pages =&lt;br /&gt;
There are 3 navigational pages which can be added by the teacher.  These provide special special effects and might be considered advanced features.  They are not seen by the students and are only used by the teacher.&lt;br /&gt;
&lt;br /&gt;
==Branches and clusters overview==&lt;br /&gt;
A teacher may think of a single lesson as being made up of a series of ideas.  For example, a lesson of 40 pages might have 4 different parts to it. These parts are generally referred to as branches or [[Clusters|clusters]].   These parts are a series of pages in the logical (edit) order. In their simplest form, they do not overlap one another in the lesson.   &lt;br /&gt;
&lt;br /&gt;
The term &amp;quot;branch&amp;quot; that refers to a series of pages can be confusing.  For the sake of discussion, there are two types.  The ordered branch sends the student to a specific page every time.   The classic branch uses the more advanced navigation page called &amp;quot;End of Branch&amp;quot;.  The classic branch offers the teacher a way to randomize what the student sees next in a series of pages.      &lt;br /&gt;
&lt;br /&gt;
A &amp;quot;cluster&amp;quot; is a group of pages, similar to a classic branch and could also be considered an advanced feature.  A cluster group starts with a &amp;quot;cluster&amp;quot; page and ends with a &amp;quot;end cluster&amp;quot; page.&lt;br /&gt;
* For example, either a cluster or classic branch might be used for a mini quiz to reinforce other lesson segments.&lt;br /&gt;
&lt;br /&gt;
==Cluster Pages - Start and End ==&lt;br /&gt;
Clusters are a series of question or branch pages used by relative jumps for special effects.   For example, the teacher can send a student to a question they have not seen before.   &amp;quot;A cluster&amp;quot; is defined by the pages that appear between the Start Cluster page and End Cluster page in the logical order.  Typically, the pages in &amp;quot;a cluster&amp;quot; are question pages.   The page content for a Start and End Cluster are not visible to the student.   Using an End Cluster page by itself can act as a hidden redirect page from the students perspective.  &lt;br /&gt;
&lt;br /&gt;
See also the MoodleDoc page on [[Clusters]].&lt;br /&gt;
&lt;br /&gt;
==End of Branch Page ==&lt;br /&gt;
This special navigation page only has 1 jump and the page content is not seen by the student. Inserting an &amp;quot;End of Branch&amp;quot; page creates some new relative jumps for the teacher to use in a series of Lesson pages. These relative jumps are &amp;quot;Random Branch&amp;quot;, &amp;quot;Unseen question within a branch&amp;quot; and &amp;quot;Random question within a branch&amp;quot;. The series is defined by a Content page and an End of Branch page that follows it someplace in the logical order. &lt;br /&gt;
&lt;br /&gt;
Usually the single jump in the End of Branch links to the start of the series. If Lesson expects to find an End of Branch and does not, then it will use all the pages in the logical order to the end of the Lesson.  &lt;br /&gt;
&lt;br /&gt;
Please note that Content (Branch Table) pages do not require an End of Branch page. See also [[Adding_a_content_page| adding content page]].  &lt;br /&gt;
&lt;br /&gt;
[[Image:Lesson End of Branch Edit expanded 1.png|thumb|center|300px|End of Branch example, Teacher in edit, expanded mode]]&lt;br /&gt;
&lt;br /&gt;
==End of Lesson Page==&lt;br /&gt;
This page is created by the Lesson Module and can not be edited by the teacher. It is seen by the student when they finish the lesson.   This is also the page where a button linking to the [[Adding/editing_a_lesson#Link_to_activity|next activity]] will appear.   &lt;br /&gt;
&lt;br /&gt;
[[Image:End of Lesson page student 1.png|center|thumb|200px|Example End of Lesson page, student view, with link to next activity]]&lt;br /&gt;
&lt;br /&gt;
The teacher can send a student to this page by using a &amp;quot;end of lesson&amp;quot; jump.&lt;br /&gt;
[[Image:Lesson Jump pulldown end of lesson 2.png|thumb|center|Jump pull down menu]]&lt;br /&gt;
&lt;br /&gt;
= Tips &amp;amp; Suggestions =&lt;br /&gt;
*Planning is important, in presenting a classroom lesson or in Moodle lesson. We suggest to check your work from the students perspective available in Moodle.  There are several ways to do this [[Viewing_a_lesson]]. For those new to Moodle, we strongly suggest to learn the way you teach.  Start simple and build upon your successes.&lt;br /&gt;
*Looking for title page, a static page, description page  or page that just holds information?  Use a Branch table page and only add content.  Or use a Multiple Choice question page and only add content with no answers.  Lesson will automatically place a continue button at the bottom of the page when the student views this kind of question page.&lt;br /&gt;
*Continue button.  Some sites like to modify this button. It is possible to change the word &amp;quot;Continue&amp;quot; to another word by [[Language editing|editing the local language]].  However it will take an [http://moodle.org/mod/forum/discuss.php?d=52338#p449760 adjustment in the code] to change the speed of the automatic advance past the continue or to visually skip it.&lt;br /&gt;
*In more complicated lessons, use boxes and arrows to map out the lesson.&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
*[[Jumps]] More details&lt;br /&gt;
*[[Lesson_module]] &lt;br /&gt;
*[http://moodle.org/mod/lesson/view.php?id=2321 Demo Lesson] - One demonstration of a Moodle Course, all about Moodle of course&lt;br /&gt;
*[http://download.moodle.org/docs/using_moodle/ch10_lessons.pdf Using Moodle Chapter 10: Lessons] - a PDF document which could be a little outdated but still useful&lt;br /&gt;
*[https://docs.moodle.org/en/Adding_a_question_page Adding a question page]&lt;br /&gt;
*[http://moodle.org/help.php?file=index.html Index of Help Files] - Very Useful, organized by grouping topics with similar uses.  For example &amp;quot;Reading and Writing&amp;quot; contains text formatting.&lt;br /&gt;
&lt;br /&gt;
[[Category:Teacher]]&lt;br /&gt;
[[Category:Lesson]]&lt;br /&gt;
&lt;br /&gt;
[[fr:Pages d&#039;une leçon]]&lt;br /&gt;
[[de:Lektionsseiten]]&lt;/div&gt;</summary>
		<author><name>TimHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=MoodleDocs:Special_pages&amp;diff=84355</id>
		<title>MoodleDocs:Special pages</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=MoodleDocs:Special_pages&amp;diff=84355"/>
		<updated>2011-06-06T12:47:36Z</updated>

		<summary type="html">&lt;p&gt;TimHunt: Reverted edits by Kingjohnjones (talk) to last revision by Mits&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The [[Special:Specialpages|Special pages]] link the the MoodleDocs Toolbox (usually found on the left) contain a list of page links.&lt;br /&gt;
&lt;br /&gt;
==Special pages list==&lt;br /&gt;
* [[Special:Allpages|All pages]] : All the pages in MoodleDocs in alphabetical order, including redirects.&lt;br /&gt;
* [[Special:Booksources|Book sources]] : ISBN Book Sources.&lt;br /&gt;
* [[Special:BrokenRedirects|Broken Redirects]] : A list of redirects to pages that do not currently exist in MoodleDocs.&lt;br /&gt;
* [[Special:Categories|Categories]] : A list of categories currently used in MoodleDocs.&lt;br /&gt;
* [[Special:Deadendpages|Dead-end pages]] : Pages without any outgoing links.&lt;br /&gt;
* [[Special:Disambiguations|Disambiguation pages]] : List of pages linked to a disambiguation page (indicating a word, phrase or term with more than one meaning). A page is put on the list when a disambiguation template &amp;lt;nowiki&amp;gt;{{Template:Disambiguation}}&amp;lt;/nowiki&amp;gt; is included. &lt;br /&gt;
* [[Special:DoubleRedirects|Double redirects]] : a list of redirect pages that lead to another redirect page.&lt;br /&gt;
* [[Special:Export|Export pages ]] : Produces an XML file containing the wikitext and metadata of either the current version only, or all revisions, of one or more pages, specified in the form of a list; the XML file is in the format required for Special:Import; exporting is typically done either in preparation of applying the latter at another MediaWiki project, or for searching within old page revisions. &lt;br /&gt;
* [[Special:Imagelist|File list]] : List of images uploaded that can be sorted by size or date.&lt;br /&gt;
* [[Special:Newimages|Gallery of new files]] : Gallery of new files, usually images. &lt;br /&gt;
* [[Special:Ipblocklist|List of blocked IP addresses and usernames]] : Blocked IPs and usernames.&lt;br /&gt;
* [[Special:Userlogin|Login]] : Creates a new login cookie for a user.&lt;br /&gt;
* [[Special:Log|Logs]]:List of all recent activity in MoodleDocs.&lt;br /&gt;
* [[Special:Longpages|Long pages]] : Pages in the MoodleDocs, with size in bytes, in order of decreasing size.&lt;br /&gt;
&lt;br /&gt;
[[Category:MoodleDocs|Toolbox]]&lt;br /&gt;
* [[Special:Mostlinked|Most linked to pages]]  :  Pages with most links to. Pages, includes talk and page comment pages.&lt;br /&gt;
* [[Special:Watchlist|My watchlist]] : Show the pages you are watching. &lt;br /&gt;
* [[Special:Newpages|New pages]] : Newest pages with creation date and time, current size, user who created the page, and first edit summary, in reverse order of creation.&lt;br /&gt;
* [[Special:Ancientpages|Oldest pages]] - pages in MoodleDocs, with date and time of last edit, in order of last edit.&lt;br /&gt;
* [[Special:Lonelypages|Orphaned pages]] : Articles with no links to them in MoodleDocs. &lt;br /&gt;
* [[Special:Popularpages|Popular pages]] : Pages listed my number of total views since MoodleDocs was created.&lt;br /&gt;
* [[Special:Preferences|Preferences]] : Select preferences to customize the appearance and behaviour of the software. &lt;br /&gt;
* [[Special:Randompage|Random page]] : redirects to a random page from MoodleDocs &lt;br /&gt;
* [[Special:Recentchanges| Recent changes]] : The latest edits in the project.&lt;br /&gt;
* [[Special:Shortpages|Short pages]] : List of pages showing size in bytes, in order of increasing size.&lt;br /&gt;
* [[Special:Statistics|Statistics]] : total number of pages and users.&lt;br /&gt;
*  [[Special:Allmessages|System messages]] : Displays messages available in MoodleDocs (technical).&lt;br /&gt;
* [[Special:Uncategorizedcategories|Uncategorized categories]]  : &lt;br /&gt;
* [[Special:Uncategorizedpages|Uncategorized pages]] : Pages without category tags at the bottom.&lt;br /&gt;
* [[Special:Unusedcategories|Unused categories]]  : Categories that are no longer used in MoodleDocs.&lt;br /&gt;
* [[Special:Unusedimages|Unused files]] : A list of unused image files.&lt;br /&gt;
* [[Special:Upload|Upload file]] : Upload an image or file to MoodleDocs.&lt;br /&gt;
* [[Special:Listusers|User list]] : A list of all registered users.&lt;br /&gt;
* [[Special:Version|Version]] : Shows the version of the MediaWiki software that MoodleDocs currently running, and a listing of extensions installed.&lt;br /&gt;
* [[Special:Wantedpages|Wanted pages]] : Broken links, or pages which have been requested. Specifically those pages that have at least 2 incoming links, but do not exist.&lt;br /&gt;
&lt;br /&gt;
==Toolbox links==&lt;br /&gt;
*[[Special:Whatlinkshere/MoodleDocs:Special_pages|What links here]]  : how to find all links to the page&lt;br /&gt;
*[[Special:Recentchangeslinked/MoodleDocs:Special_pages|Related changes]]   :  &lt;br /&gt;
*[[Special:Upload|Upload file]]   :  &lt;br /&gt;
*[[Special:Specialpages|Special pages]] See the list above.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
http://en.wikipedia.org/wiki/Wikipedia:Special_pages&lt;br /&gt;
&lt;br /&gt;
[[ja:MoodleDocs:特別ページ]]&lt;/div&gt;</summary>
		<author><name>TimHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Lesson_settings&amp;diff=84354</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=84354"/>
		<updated>2011-06-06T12:45:33Z</updated>

		<summary type="html">&lt;p&gt;TimHunt: Reverted edits by Btuncay (talk) to last revision by Lasko&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Lesson}}&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&#039;&#039;&#039;Please refer to [[TOC_with_notes#Lesson|these notes]] before editing this page.&#039;&#039;&#039;&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page is about lesson settings that can be changed by the teacher. These settings can be found when in a lesson by clicking the &amp;quot;Update the Lesson&amp;quot; button, or in  2.0 in the [[Settings block]]&amp;gt;Lesson administration&amp;gt;settings.  There are excellent help files once Lesson settings window has been open. &lt;br /&gt;
&lt;br /&gt;
After selecting lesson with the &amp;quot;Add activity&amp;quot; pull down menu, Moodle will first show the lesson settings page.  At any point in the design or compilation of the lesson, it is possible (almost desirable in some cases) to edit the lesson settings.&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.   &lt;br /&gt;
&lt;br /&gt;
There are differences between various Moodle versions. We will try to show these settings in 1.9 order, and are starting to make notes about the new 2.0 order, sections and functions.    &lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
In later versions of Moodle there is a &amp;quot;Show or Hide Advanced&amp;quot; toggle button(s).   This is meant to reduced the amount of shown features for most teachers.  &lt;br /&gt;
&lt;br /&gt;
===Name===&lt;br /&gt;
Lesson name. HTML code will not work in 1.9 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;
===Advanced general options===&lt;br /&gt;
Password protecting a lesson is an advanced option in Moodle 2.0 (Moved from Flow control  or Access control section in earlier version).&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. 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;
===Maximum Grade===&lt;br /&gt;
This value determines the percentage of the score of this lesson which will be used to calculate the overall score in the gradebook. The range is 0 to 100%. This value can be changed at any time during the lesson. Any change has an immediate effect in the Grades page and on the grades shown to the students in various lists. &lt;br /&gt;
*When the grade is set to 0 the Lesson does not appear in any of the Grades pages.  Also at end of the lesson, the student will see their score (#y of #x) and that they received a grade of 0%.  This should be a clue that the lesson is not part of their grade for the course.&lt;br /&gt;
&lt;br /&gt;
===User can re-take===&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;
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;
By default this option is Yes, meaning that students are allowed to re-take the lesson. It is expected that only in exceptional circumstances will this option be set to No.&lt;br /&gt;
&lt;br /&gt;
===Handling of Re-takes===&lt;br /&gt;
When students are allowed to re-take the lesson, this option allows the teacher to show the grade for the lesson in, for example, the Grades page, as either the mean, this is average, of the grades over the first and subsequent tries or as the grade from the students&#039; best tries.&lt;br /&gt;
&lt;br /&gt;
This option can be changed at any time.&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;
&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 to student 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 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;
{{Moodle 1.7}}&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 MoodleSite.&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;
===The Minimum Number of Questions in a Lesson===&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;
===Some Flow control scenarios &amp;amp; their implications===&lt;br /&gt;
;General Note:In the &#039;&#039;Flow control&#039;&#039; settings section of a Lesson, please note that the &#039;&#039;Allow student review&#039;&#039; setting applies to the review of a whole &#039;&#039;&#039;&#039;&#039;lesson&#039;&#039;&#039;&#039;&#039;, whereas the &#039;&#039;Display review button&#039;&#039; setting applies to the review of an individual &#039;&#039;&#039;&#039;&#039;question&#039;&#039;&#039;&#039;&#039;. The &#039;&#039;Display review button&#039;&#039; setting will display, if a question is wrongly answered, the 2 buttons: &#039;&#039;&#039;&#039;&#039;Yes, I&#039;d like to try again&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;No, I just want to go on to the next question&#039;&#039;&#039;&#039;&#039;.&lt;br /&gt;
*&#039;&#039;&#039;case #1&#039;&#039;&#039;&lt;br /&gt;
:Flow control&lt;br /&gt;
::Display review button &#039;&#039;&#039;Yes&#039;&#039;&#039;&lt;br /&gt;
::Maximum number of attempts &#039;&#039;&#039;1&#039;&#039;&#039;&lt;br /&gt;
:wrong choice-&amp;gt;&lt;br /&gt;
::&#039;&#039;Not quite. Would you like to try again?&#039;&#039;&lt;br /&gt;
::&#039;&#039;&#039;&#039;&#039;Yes, I&#039;d like to try again&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
::&#039;&#039;&#039;&#039;&#039;No, I just want to go on to the next question&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
::negative feedback not displayed&lt;br /&gt;
:correct choice-&amp;gt; positive feedback displayed&lt;br /&gt;
:;Note:There is a bug here: it should not be possible for the student to re-try a question when &#039;&#039;Maximum number of attempts&#039;&#039; has been set to &#039;&#039;&#039;1&#039;&#039;&#039;. &lt;br /&gt;
*&#039;&#039;&#039;case #2&#039;&#039;&#039;&lt;br /&gt;
:Flow control&lt;br /&gt;
::Display review button &#039;&#039;&#039;Yes&#039;&#039;&#039;&lt;br /&gt;
::Maximum number of attempts &amp;gt; 1 (e.g. &#039;&#039;&#039;5&#039;&#039;&#039;)&lt;br /&gt;
:wrong choice -&amp;gt; &lt;br /&gt;
::&#039;&#039;You have 4 attempt(s) remaining&#039;&#039;&lt;br /&gt;
::&#039;&#039;Unfortunately you cannot earn this one point, because your response was not correct. Would you like to keep guessing, just for the sheer joy of learning (but for no point credit)?&#039;&#039;&lt;br /&gt;
::&#039;&#039;&#039;&#039;&#039;Yes, I&#039;d like to try again&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
::&#039;&#039;&#039;&#039;&#039;No, I just want to go on to the next question&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
:correct choice-&amp;gt; positive feedback displayed&lt;br /&gt;
;Note for #1 and #2:Setting &#039;&#039;Display review button&#039;&#039; to &#039;&#039;&#039;Yes&#039;&#039;&#039; means that a student will never be able to score points on a question &#039;&#039;after an initial wrong choice has been made&#039;&#039;.&lt;br /&gt;
*&#039;&#039;&#039;case #3&#039;&#039;&#039;&lt;br /&gt;
:Flow control&lt;br /&gt;
::Display review button &#039;&#039;&#039;No&#039;&#039;&#039;&lt;br /&gt;
::Maximum number of attempts &#039;&#039;&#039;1&#039;&#039;&#039;&lt;br /&gt;
:wrong choice-&amp;gt;&lt;br /&gt;
::negative feedback displayed&lt;br /&gt;
::student can &#039;&#039;&#039;&#039;&#039;only&#039;&#039;&#039;&#039;&#039; move on to next page/question&lt;br /&gt;
::&#039;&#039;&#039;&#039;&#039;Continue&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
:correct choice-&amp;gt;&lt;br /&gt;
::positive feedback displayed&lt;br /&gt;
::student moves on to next page/question&lt;br /&gt;
::&#039;&#039;&#039;&#039;&#039;Continue&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
*&#039;&#039;&#039;case #4&#039;&#039;&#039;&lt;br /&gt;
:Flow control&lt;br /&gt;
::Display review button &#039;&#039;&#039;No&#039;&#039;&#039;&lt;br /&gt;
::Maximum number of attempts &amp;gt; 1 (e.g. &#039;&#039;&#039;5&#039;&#039;&#039;)&lt;br /&gt;
:wrong choice-&amp;gt;&lt;br /&gt;
::&#039;&#039;You have 4 attempt(s) remaining&#039;&#039;&lt;br /&gt;
::negative feedback displayed&lt;br /&gt;
::student can retry question &#039;&#039;and score points&#039;&#039;&lt;br /&gt;
::&#039;&#039;&#039;&#039;&#039;Continue&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
:correct choice-&amp;gt;&lt;br /&gt;
::positive feedback displayed&lt;br /&gt;
::student moves on to next page/question&lt;br /&gt;
::&#039;&#039;&#039;&#039;&#039;Continue&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
===Advanced flow control options===&lt;br /&gt;
In Moodle 2.0 some existing features settings were moved to &amp;quot;Advance features&amp;quot;.&lt;br /&gt;
*Action after correct answer - &amp;quot;Normal&amp;quot;, &amp;quot;Show unseen&amp;quot;, &amp;quot;Show unanswered&amp;quot;&lt;br /&gt;
*Display left menu only if grade greater than - select number from 0% - 100% (Note: moved from &amp;quot;Lesson formatting&amp;quot;)&lt;br /&gt;
*Number of pages to show-  Number of pages to show when slideshow is enabled&lt;br /&gt;
*Slideshow  - Yes/No  (Note: moved from &amp;quot;Lesson formatting&amp;quot;)&lt;br /&gt;
*Link to and activity - pull down list with all course activities (Mote: moved from &amp;quot;Other&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
== Lesson formatting ==&lt;br /&gt;
&lt;br /&gt;
===Slide Show===&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. (In 2.0 moved to Advanced flow control options, with width, height and backgrounds part of [[Lesson defaults]])&lt;br /&gt;
&lt;br /&gt;
===Display Left Menu===&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 specifying 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;
===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;
== Access control ==&lt;br /&gt;
This section features have been moved to other sections in 2.0.&lt;br /&gt;
&lt;br /&gt;
===Password Protected Lesson===&lt;br /&gt;
This will not allow a student to access the lesson unless they type the password. (See Advanced general options in 2.0)&lt;br /&gt;
&lt;br /&gt;
=== Dependent on ===&lt;br /&gt;
In Moodle 1.6 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;
:&#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;
(Note: &amp;quot;Dependent on&amp;quot; has it&#039;s own section in 2.0)&lt;br /&gt;
&lt;br /&gt;
===Available from &amp;amp; deadline dates===&lt;br /&gt;
Determine the dates for the opening and closing of the lesson.  For example in Moodle 1.7 it is possible to close the course in the year 2020. (Note: in 2.0 this is part of &amp;quot;General options&amp;quot; section).&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
This section is not found in 2.0 and settings moved to other sections.&lt;br /&gt;
&lt;br /&gt;
===Link to activity===&lt;br /&gt;
A pull down menu will allow the teacher to create a link to another activity when the lesson is finished.  This link will appear as a button on the [[Lesson_Pages#End_of_Lesson_Page|&amp;quot;end of lesson page&amp;quot;]], with links to grades or back to the homepage of the course. (Note: in 2.0 this is part of &amp;quot;Flow Control&amp;quot; section.)&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. (Note: in 2.0 this has it&#039;s own section, width and height are site administration settings [[Lesson defaults]] in 2.0)&lt;br /&gt;
&lt;br /&gt;
===Number of High Scores Displayed===&lt;br /&gt;
Type a number to limit how many of the top scores are displayed .A list of the high scores for the lesson will be shown. Students who get a high score can choose a custom name to list their score by.  High scores do not display if the &amp;quot;Practice lesson&amp;quot; option is turned On. (This setting discontinued in 2.0)&lt;br /&gt;
&lt;br /&gt;
===Use this lesson&#039;s settings as defaults===&lt;br /&gt;
Select yes before Saving the lesson, and the settings you have chosen for this lesson will be the default settings for the next time you create a lesson for this course. In 2.0 see [[Lesson defaults]]&lt;br /&gt;
&lt;br /&gt;
===Visible to users===&lt;br /&gt;
Allows you to show or to hide the lesson from students. This can also be done from the course home page by the hide/unhide icon next to the Lesson&#039;s name, when editing is turned on. (Moved to &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;
==Save the settings and add the the first page in a Lesson==&lt;br /&gt;
&lt;br /&gt;
After you decide on the lesson settings (above), you are taken to the lesson and you are asked which of the following you want to do now: import questions, add a Content (Branch Table) page or add a Question Page. To read more about adding pages go to: [[Viewing_a_lesson]].  If you would like more information about lesson pages in general go to [[Lesson Pages]] or select something from the index at the top of this page or one of the overall indexes below.&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>TimHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Moodle_2.0.3_release_notes&amp;diff=83289</id>
		<title>Moodle 2.0.3 release notes</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Moodle_2.0.3_release_notes&amp;diff=83289"/>
		<updated>2011-05-06T06:16:29Z</updated>

		<summary type="html">&lt;p&gt;TimHunt: /* Fixes and improvements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Release date: Not yet released&lt;br /&gt;
 &lt;br /&gt;
===Highlights===&lt;br /&gt;
 &lt;br /&gt;
* MDL-9376 - [[Forum_module#Question_and_Answer_forum|Q and A forum]] editing time allows students to see other posts and modify their own&lt;br /&gt;
* MDL-4633 - The description field is now a required [[User_profile_fields|user profile field]]&lt;br /&gt;
* MDL-26697 - Multiple [[Multimedia plugins|multimedia plugin filter]] fixes and improvements&lt;br /&gt;
* MDL-24724 - There is now a link to send [[Messaging_2.0|messages]] on basic profile pages&lt;br /&gt;
&lt;br /&gt;
===User interface changes===&lt;br /&gt;
 &lt;br /&gt;
* MDL-26388 - Duplicate files uploaded through the [[File_picker|file picker]] are now handled&lt;br /&gt;
* MDL-26535 - New capability [[Capabilities/mod/workshop:viewauthorpublished|mod/workshop:viewauthorpublished]] for controlling visibility of workshop published submission authors&lt;br /&gt;
* MDL-25834 - Fixes to [[Themes|themes]] for IE&lt;br /&gt;
 &lt;br /&gt;
===Security issues===&lt;br /&gt;
 &lt;br /&gt;
A number of security issues were resolved, including changes to APIs. Administrators are advised to update before details of security issues are revealed, which will happen one week after release.&lt;br /&gt;
&lt;br /&gt;
===Changes to APIs===&lt;br /&gt;
* Multiple fixes to [[Ratings 2.0|ratings]]&lt;br /&gt;
:Modules etc wanting to make use of ratings are now required to implement two callback functions, modname_rating_permissions() and modname_rating_validate(). Full details of the callbacks are available in the [[Development:Ratings 2.0#Module callbacks|rating 2.0 documentation]]&lt;br /&gt;
&lt;br /&gt;
* [[Development:Comments 2.0|Comments API]] improvements&lt;br /&gt;
:Plugins intending to use comments are required to implement two callback functions: pluginname_comment_validate(), and pluginname_comment_permissions. Please read full details in [[Development:Comments 2.0#Moodle modules callback|Comments documentation]].&lt;br /&gt;
&lt;br /&gt;
===Fixes and improvements===&lt;br /&gt;
&lt;br /&gt;
* MDL-26643 - Fixed blog visibility issue after update&lt;br /&gt;
* MDL-26768 - Grades from Lessons are now correctly set to null on non-attempt&lt;br /&gt;
* MDL-26798 - Fixes to Dropbox repository integration&lt;br /&gt;
* MDL-27116 - Fixed theme directory linking&lt;br /&gt;
* MDL-27246 - Able to checkout strings in the language customisation tool&lt;br /&gt;
* MDL-27251 - Added optional timeout estimation to file downloads based on file size as it can blocks upgrade&lt;br /&gt;
* MDL-27394 - Backup and restore might sometimes have scrambled the order of choices in question types.&lt;br /&gt;
&lt;br /&gt;
A total of over 200 changes were made. See the [http://tracker.moodle.org/secure/ReleaseNote.jspa?projectId=10011&amp;amp;version=10537 full list of fixed issues in 2.0.3].&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;noinclude&amp;gt;==See also==&lt;br /&gt;
*[[Moodle 2.0.2 release notes]]&lt;br /&gt;
 &lt;br /&gt;
[[Category:Release notes]]&lt;br /&gt;
[[Category:Moodle 2.0]]&lt;br /&gt;
 &lt;br /&gt;
[[de:Moodle 2.0.3 Versionsinformationen]]&lt;br /&gt;
[[es:Notas de Moodle 2.0.3]]&lt;br /&gt;
[[fr:Notes de mise à jour de Moodle 2.0.3]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>TimHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Create_your_own_course&amp;diff=83225</id>
		<title>Create your own course</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Create_your_own_course&amp;diff=83225"/>
		<updated>2011-05-04T19:17:02Z</updated>

		<summary type="html">&lt;p&gt;TimHunt: Reverted edits by Wpmsc (talk) to last revision by TimHunt&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;To create a new course you will need to have the role assigned as a Course Creator by a Moodle administrator.  However, if you are an assigned teacher of the course you can edit the existing course settings.&lt;br /&gt;
__TOC__&lt;br /&gt;
[[Image:Course edit on new 4.JPG|thumb|350px|center|A new empty course homepage (click on image enlarge)]]&lt;br /&gt;
&lt;br /&gt;
==Starting out==&lt;br /&gt;
Log in to Moodle and go to the category you would like the new course to appear in.&lt;br /&gt;
In the Course categories section choose the &#039;Add a new course&#039; button.  If you do not see this button this means that you do not have the role as Course Creator.   &lt;br /&gt;
&lt;br /&gt;
==Settings new/edit==&lt;br /&gt;
As a teacher with editing privileges, you can always change your course&#039;s settings in the administration block.&lt;br /&gt;
Give your course a title.&lt;br /&gt;
Give your course a short name. This will be the name that appears on the button to bring students back to your course main page. It will also appear in the [[Navigation bar|navigation bar]] at the top of the page.&lt;br /&gt;
The summary appears on the list of courses.&lt;br /&gt;
[[Image:Course top mu1.jpg]]&lt;br /&gt;
&lt;br /&gt;
===Dates &amp;amp; Times===&lt;br /&gt;
You can select the start date for a course&lt;br /&gt;
By default, the course start is the day after you create the course.&lt;br /&gt;
You can also select the period of time you would like to allow students to enroll in this course. Note that if you set this to 14 days; students will be removed from the course 14 days after they enroll.&lt;br /&gt;
&lt;br /&gt;
===Access Control===&lt;br /&gt;
Group mode&lt;br /&gt;
Here you can define the group mode at the course level. This will be the default group mode for all activities defined within that course. Learn more about Groups &lt;br /&gt;
Note that you don&#039;t need to change this setting to enable groups. The default setting of this and &#039;Force&#039; enables each activity to have its group mode set individually. &lt;br /&gt;
Force&lt;br /&gt;
If the group mode is &amp;quot;forced&amp;quot; at a course-level, then this particular group mode will be applied to every activity in that course. Individual group settings in each activity are then ignored. &lt;br /&gt;
This is useful when, for example, one wants to set up a course for a number of completely separate cohorts. &lt;br /&gt;
Because it will take a week or two to get all the resources and activities set up, it is worth hiding it from students until it is ready.&lt;br /&gt;
The [[Enrolment key]] is given to control access to courses. It is a onetime password given to students. If you use Groups in a course, you will also need to set a different Enrolment key for each of the groups. There is more information in the Groups information about this.&lt;br /&gt;
If your students are being automatically enrolled onto courses using the correct course number they will not need to be given the Enrolment key, although it is still set to keep the &#039;lost&#039; out of your course.&lt;br /&gt;
Allowing [[Guest access]] will let people come in and view your course.  You could allow guest access using the Enrolment key, but generally, we would expect to restrict guest access.&lt;br /&gt;
&lt;br /&gt;
==Other Settings==&lt;br /&gt;
&lt;br /&gt;
There are a number of other options you can choose.&lt;br /&gt;
&lt;br /&gt;
You can hide sections from students, this option defines how they appear.&lt;br /&gt;
&lt;br /&gt;
You can choose to show or hide grades from students.&lt;br /&gt;
&lt;br /&gt;
There is also the option of showing reports of all Activity in the course.&lt;br /&gt;
&lt;br /&gt;
You can define the words you use in the course for teachers and students&lt;br /&gt;
&lt;br /&gt;
When you have set the options, clicking &#039;Save changes&#039; will create your new course.&lt;br /&gt;
&lt;br /&gt;
Remember that you can access all these setting again from your course administration panel.&lt;br /&gt;
&lt;br /&gt;
==Your course &amp;amp; Default Blocks==&lt;br /&gt;
[[image:Course11.gif|thumb|350px|left|Example shows blocks]]&lt;br /&gt;
This is a new blank course as seen by a teacher with editing on.&lt;br /&gt;
&lt;br /&gt;
This course has 4 empty topics.&lt;br /&gt;
&lt;br /&gt;
You get a [[Latest News block]]. These are items from the [[News forum]] of your course&lt;br /&gt;
&lt;br /&gt;
You also get [[Upcoming Events block]], with a link to the [[Calendar]]&lt;br /&gt;
&lt;br /&gt;
The &#039;[[Recent Activity] block]&#039; is a list of changes and additions to the course&lt;br /&gt;
&lt;br /&gt;
Clicking on &#039;Paricipants&#039; will show a list of participants.&lt;br /&gt;
&lt;br /&gt;
Remember, this link could be called [[Students]] if you did not change it in your course settings.&lt;br /&gt;
&lt;br /&gt;
There is also a tool to search messages in forums within your course.&lt;br /&gt;
&lt;br /&gt;
The [[Course administration block]] contains a number of tools for making the most of your course.&lt;br /&gt;
&lt;br /&gt;
Administration tools are covered in a separate topic.&lt;br /&gt;
&lt;br /&gt;
This is the button to [[turn editing on]] in your course. You need to be in &#039;edit mode&#039; to change  or added activities and resources in your course.&lt;br /&gt;
&lt;br /&gt;
There is a separate topic covering editing your course.&lt;br /&gt;
&lt;br /&gt;
By default, courses are created with a list of the course categories.&lt;br /&gt;
&lt;br /&gt;
Students will see a list of the other courses they are enrolled in.&lt;br /&gt;
&lt;br /&gt;
This concludes the overview of setting up a course. &lt;br /&gt;
&lt;br /&gt;
It is easy and safe to do.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
[[Course settings]] for adding/editing a course.&lt;br /&gt;
&lt;br /&gt;
External links:&lt;br /&gt;
*Video Tutorial : [http://www.idwebsitedesigner.com/moodle How to create a course in Moodle]&lt;br /&gt;
*Create courses on a spreadsheet: [http://keelandownton.blogspot.com/2009/02/create-moodle-courses-easily-with.html Moodle Course Creator (offered under Creative Common license)] which uses EditGrid templates to create a zipped xml file.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Teacher]]&lt;br /&gt;
[[Category:Administrator]]&lt;/div&gt;</summary>
		<author><name>TimHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Development:Restore_2.0_for_developers&amp;diff=83223</id>
		<title>Development:Restore 2.0 for developers</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Development:Restore_2.0_for_developers&amp;diff=83223"/>
		<updated>2011-05-04T15:59:45Z</updated>

		<summary type="html">&lt;p&gt;TimHunt: /* Automatically triggering restore in code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Development:Backup 2.0}}{{Moodle_2.0}}{{Work in progress}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page tries to explain, from a development perspective, &#039;&#039;&#039;how to implement&#039;&#039;&#039; the restore feature for various Moodle 2.x plugins, mainly, modules and blocks. &lt;br /&gt;
&lt;br /&gt;
In order to work with Restore 2.0 you must read the [https://docs.moodle.org/en/Development:Backup_2.0_for_developers Backup 2.0 documentation]. Everything will be crystal clear once you have read it. &lt;br /&gt;
&lt;br /&gt;
In this documentation you will learn about some points that you can not easily deduce from [https://docs.moodle.org/en/Development:Backup_2.0_for_developers Backup 2.0 documentation] concerning the Choice module.&lt;br /&gt;
&lt;br /&gt;
== Coding ==&lt;br /&gt;
the restore is composed by two main php files: restore_choice_stepslib.php and restore_choice_activity_task.class.php&lt;br /&gt;
=== restore_choice_stepslib.php ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
/**&lt;br /&gt;
 * Structure step to restore one choice activity&lt;br /&gt;
 */&lt;br /&gt;
class restore_choice_activity_structure_step extends restore_activity_structure_step {&lt;br /&gt;
&lt;br /&gt;
    protected function define_structure() {&lt;br /&gt;
&lt;br /&gt;
        $paths = array();&lt;br /&gt;
        $userinfo = $this-&amp;gt;get_setting_value(&#039;userinfo&#039;);&lt;br /&gt;
&lt;br /&gt;
        $paths[] = new restore_path_element(&#039;choice&#039;, &#039;/activity/choice&#039;);&lt;br /&gt;
        $paths[] = new restore_path_element(&#039;choice_option&#039;, &#039;/activity/choice/options/option&#039;);&lt;br /&gt;
        if ($userinfo) {&lt;br /&gt;
            $paths[] = new restore_path_element(&#039;choice_answer&#039;, &#039;/activity/choice/answers/answer&#039;);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        // Return the paths wrapped into standard activity structure&lt;br /&gt;
        return $this-&amp;gt;prepare_activity_structure($paths);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    protected function process_choice($data) {&lt;br /&gt;
        global $DB;&lt;br /&gt;
&lt;br /&gt;
        $data = (object)$data;&lt;br /&gt;
        $oldid = $data-&amp;gt;id;&lt;br /&gt;
        $data-&amp;gt;course = $this-&amp;gt;get_courseid();&lt;br /&gt;
&lt;br /&gt;
        $data-&amp;gt;timeopen = $this-&amp;gt;apply_date_offset($data-&amp;gt;timeopen);&lt;br /&gt;
        $data-&amp;gt;timeclose = $this-&amp;gt;apply_date_offset($data-&amp;gt;timeclose);&lt;br /&gt;
        $data-&amp;gt;timemodified = $this-&amp;gt;apply_date_offset($data-&amp;gt;timemodified);&lt;br /&gt;
&lt;br /&gt;
        // insert the choice record&lt;br /&gt;
        $newitemid = $DB-&amp;gt;insert_record(&#039;choice&#039;, $data);&lt;br /&gt;
        // immediately after inserting &amp;quot;activity&amp;quot; record, call this&lt;br /&gt;
        $this-&amp;gt;apply_activity_instance($newitemid);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    protected function process_choice_option($data) {&lt;br /&gt;
        global $DB;&lt;br /&gt;
&lt;br /&gt;
        $data = (object)$data;&lt;br /&gt;
        $oldid = $data-&amp;gt;id;&lt;br /&gt;
&lt;br /&gt;
        $data-&amp;gt;choiceid = $this-&amp;gt;get_new_parentid(&#039;choice&#039;);&lt;br /&gt;
        $data-&amp;gt;timemodified = $this-&amp;gt;apply_date_offset($data-&amp;gt;timemodified);&lt;br /&gt;
&lt;br /&gt;
        $newitemid = $DB-&amp;gt;insert_record(&#039;choice_options&#039;, $data);&lt;br /&gt;
        $this-&amp;gt;set_mapping(&#039;choice_option&#039;, $oldid, $newitemid);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    protected function process_choice_answer($data) {&lt;br /&gt;
        global $DB;&lt;br /&gt;
&lt;br /&gt;
        $data = (object)$data;&lt;br /&gt;
        $oldid = $data-&amp;gt;id;&lt;br /&gt;
&lt;br /&gt;
        $data-&amp;gt;choiceid = $this-&amp;gt;get_new_parentid(&#039;choice&#039;);&lt;br /&gt;
        $data-&amp;gt;optionid = $this-&amp;gt;get_mappingid(&#039;choice_option&#039;, $oldid);&lt;br /&gt;
        $data-&amp;gt;userid = $this-&amp;gt;get_mappingid(&#039;user&#039;, $data-&amp;gt;userid);&lt;br /&gt;
        $data-&amp;gt;timemodified = $this-&amp;gt;apply_date_offset($data-&amp;gt;timemodified);&lt;br /&gt;
&lt;br /&gt;
        $newitemid = $DB-&amp;gt;insert_record(&#039;choice_answers&#039;, $data);&lt;br /&gt;
        // No need to save this mapping as far as nothing depend on it&lt;br /&gt;
        // (child paths, file areas nor links decoder)&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    protected function after_execute() {&lt;br /&gt;
        // Add choice related files, no need to match by itemname (just internally handled context)&lt;br /&gt;
        $this-&amp;gt;add_related_files(&#039;mod_choice&#039;, &#039;intro&#039;, null);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== restore_choice_activity_task.class.php ===&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
/**&lt;br /&gt;
 * choice restore task that provides all the settings and steps to perform one&lt;br /&gt;
 * complete restore of the activity&lt;br /&gt;
 */&lt;br /&gt;
class restore_choice_activity_task extends restore_activity_task {&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Define (add) particular settings this activity can have&lt;br /&gt;
     */&lt;br /&gt;
    protected function define_my_settings() {&lt;br /&gt;
        // No particular settings for this activity&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Define (add) particular steps this activity can have&lt;br /&gt;
     */&lt;br /&gt;
    protected function define_my_steps() {&lt;br /&gt;
        // Choice only has one structure step&lt;br /&gt;
        $this-&amp;gt;add_step(new restore_choice_activity_structure_step(&#039;choice_structure&#039;, &#039;choice.xml&#039;));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Define the contents in the activity that must be&lt;br /&gt;
     * processed by the link decoder&lt;br /&gt;
     */&lt;br /&gt;
    static public function define_decode_contents() {&lt;br /&gt;
        $contents = array();&lt;br /&gt;
&lt;br /&gt;
        $contents[] = new restore_decode_content(&#039;choice&#039;, array(&#039;intro&#039;), &#039;choice&#039;);&lt;br /&gt;
&lt;br /&gt;
        return $contents;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Define the decoding rules for links belonging&lt;br /&gt;
     * to the activity to be executed by the link decoder&lt;br /&gt;
     */&lt;br /&gt;
    static public function define_decode_rules() {&lt;br /&gt;
        $rules = array();&lt;br /&gt;
&lt;br /&gt;
        $rules[] = new restore_decode_rule(&#039;CHOICEVIEWBYID&#039;, &#039;/mod/choice/view.php?id=$1&#039;, &#039;course_module&#039;);&lt;br /&gt;
        $rules[] = new restore_decode_rule(&#039;CHOICEINDEX&#039;, &#039;/mod/choice/index.php?id=$1&#039;, &#039;course&#039;);&lt;br /&gt;
&lt;br /&gt;
        return $rules;&lt;br /&gt;
&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Define the restore log rules that will be applied&lt;br /&gt;
     * by the {@link restore_logs_processor} when restoring&lt;br /&gt;
     * choice logs. It must return one array&lt;br /&gt;
     * of {@link restore_log_rule} objects&lt;br /&gt;
     */&lt;br /&gt;
    static public function define_restore_log_rules() {&lt;br /&gt;
        $rules = array();&lt;br /&gt;
&lt;br /&gt;
        $rules[] = new restore_log_rule(&#039;choice&#039;, &#039;add&#039;, &#039;view.php?id={course_module}&#039;, &#039;{choice}&#039;);&lt;br /&gt;
        $rules[] = new restore_log_rule(&#039;choice&#039;, &#039;update&#039;, &#039;view.php?id={course_module}&#039;, &#039;{choice}&#039;);&lt;br /&gt;
        $rules[] = new restore_log_rule(&#039;choice&#039;, &#039;view&#039;, &#039;view.php?id={course_module}&#039;, &#039;{choice}&#039;);&lt;br /&gt;
        $rules[] = new restore_log_rule(&#039;choice&#039;, &#039;choose&#039;, &#039;view.php?id={course_module}&#039;, &#039;{choice}&#039;);&lt;br /&gt;
        $rules[] = new restore_log_rule(&#039;choice&#039;, &#039;choose again&#039;, &#039;view.php?id={course_module}&#039;, &#039;{choice}&#039;);&lt;br /&gt;
        $rules[] = new restore_log_rule(&#039;choice&#039;, &#039;report&#039;, &#039;report.php?id={course_module}&#039;, &#039;{choice}&#039;);&lt;br /&gt;
&lt;br /&gt;
        return $rules;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Define the restore log rules that will be applied&lt;br /&gt;
     * by the {@link restore_logs_processor} when restoring&lt;br /&gt;
     * course logs. It must return one array&lt;br /&gt;
     * of {@link restore_log_rule} objects&lt;br /&gt;
     *&lt;br /&gt;
     * Note this rules are applied when restoring course logs&lt;br /&gt;
     * by the restore final task, but are defined here at&lt;br /&gt;
     * activity level. All them are rules not linked to any module instance (cmid = 0)&lt;br /&gt;
     */&lt;br /&gt;
    static public function define_restore_log_rules_for_course() {&lt;br /&gt;
        $rules = array();&lt;br /&gt;
&lt;br /&gt;
        // Fix old wrong uses (missing extension)&lt;br /&gt;
        $rules[] = new restore_log_rule(&#039;choice&#039;, &#039;view all&#039;, &#039;index?id={course}&#039;, null,&lt;br /&gt;
                                        null, null, &#039;index.php?id={course}&#039;);&lt;br /&gt;
        $rules[] = new restore_log_rule(&#039;choice&#039;, &#039;view all&#039;, &#039;index.php?id={course}&#039;, null);&lt;br /&gt;
&lt;br /&gt;
        return $rules;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;define_restore_log_rules&#039;&#039;&#039;: it covers all the &amp;quot;mandatory&amp;quot; log actions, performing {course_module} and {choice} mappings properly. Note that names between curly brackets instruct the log processor to look in the mapping tables for item = name between brackets. Of course, other modules like forum, has a lot of rules, with more complex mappings and so on. Choice is pretty basic.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;define_restore_log_rules_for_course&#039;&#039;&#039;: choice module has the 1st rule because, while implementing restore, we discovered one bug causing URLs to be written in the logs table WITHOUT the .php in the URL, hence choice has that extra rule (that uses the 5-8 params, to REWRITE the URL to be inserted on restore). But that was one problem with choices only, afaik, so you probably would not need it in your own module.&lt;br /&gt;
&lt;br /&gt;
== Automatically triggering restore in code ==&lt;br /&gt;
&lt;br /&gt;
As with backup it is possible to automatically trigger a restore for a course (or activity or anything else you can back up). Here is how to restore a course backup into a new course:&lt;br /&gt;
&lt;br /&gt;
# Put the backup files in a specific folder: $CFG-&amp;gt;dataroot/temp/backup/$folder, where $folder is a random or unused unique id.&lt;br /&gt;
# Decide on the course shortname, fullname, and category id for restore (course must not already exist).&lt;br /&gt;
# Run the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
        // Transaction&lt;br /&gt;
        $transaction = $DB-&amp;gt;start_delegated_transaction();&lt;br /&gt;
 &lt;br /&gt;
        // Create new course&lt;br /&gt;
        $courseid = restore_dbops::create_new_course($fullname, $shortname, $categoryid);&lt;br /&gt;
 &lt;br /&gt;
        // Restore backup into course&lt;br /&gt;
        $controller = new restore_controller($folder, $courseid, &lt;br /&gt;
                backup::INTERACTIVE_NO, backup::MODE_SAMESITE, $USER-&amp;gt;id,&lt;br /&gt;
                backup::TARGET_NEW_COURSE);&lt;br /&gt;
        $controller-&amp;gt;execute_precheck();&lt;br /&gt;
        $controller-&amp;gt;execute_plan();&lt;br /&gt;
 &lt;br /&gt;
        // Commit&lt;br /&gt;
        $transaction-&amp;gt;allow_commit();&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
&lt;br /&gt;
* The transaction is used so that if backup fails, the course isn&#039;t created.&lt;br /&gt;
* The MODE_SAMESITE option is used if restoring a backup which comes from the same site, otherwise MODE_GENERAL might be used.&lt;br /&gt;
&lt;br /&gt;
== Code that runs after restore ==&lt;br /&gt;
&lt;br /&gt;
If you are writing a restore task for an activity module, your code is all executed while the system is restoring that module. For example, the &amp;lt;tt&amp;gt;after_execute&amp;lt;/tt&amp;gt;  method in your &amp;lt;tt&amp;gt;restore_mymodule_activity_structure_step&amp;lt;/tt&amp;gt; class is called immediately after all the other restore functions in that step are finished.&lt;br /&gt;
&lt;br /&gt;
=== The problem ===&lt;br /&gt;
&lt;br /&gt;
Usually this is correct, but in some situations you may need to have an activity module restore that depends in some way on another activity module or on a course section other than the one the module belongs to. Depending on the order within the course, in some cases the other module or section has not yet been restored, so this is a problem.&lt;br /&gt;
&lt;br /&gt;
The code that may not work as a result is code that tries to convert from an &#039;old&#039; course-module ID or section ID into a &#039;new&#039; one:&lt;br /&gt;
&lt;br /&gt;
 $newcmid = $this-&amp;gt;get_mappingid(&#039;course_module&#039;, $oldcmid);&lt;br /&gt;
 $newsectionid = $this-&amp;gt;get_mappingid(&#039;course_section&#039;, $oldsectionid);&lt;br /&gt;
&lt;br /&gt;
These functions will return false if the relevant course-module or section has not yet been restored.&lt;br /&gt;
&lt;br /&gt;
=== The solution ===&lt;br /&gt;
&lt;br /&gt;
You can have a method called &amp;lt;tt&amp;gt;after_restore&amp;lt;/tt&amp;gt; inside your TASK (not step) class, &amp;lt;tt&amp;gt;restore_mymodule_activity_task&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 public function after_restore() {&lt;br /&gt;
     // Do something at end of restore&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
In this method you can carry out necessary finishing tasks such as updating course-module and section IDs (using code like the above).&lt;br /&gt;
&lt;br /&gt;
=== Warning ===&lt;br /&gt;
&lt;br /&gt;
You should do as little as possible in this method, and be aware that using it may mean your activity module does not function correctly in some cases.&lt;br /&gt;
&lt;br /&gt;
* It is possible to backup and restore a single module, or a section, rather than a whole course. &lt;br /&gt;
* This function (backing up a single module) may also be used to support other upcoming features such as the &#039;copy activity&#039; feature.&lt;br /&gt;
&lt;br /&gt;
If somebody backs up your activity as a single activity, then obviously any such dependencies will not be included. There is currently no way to indicate that your module has any dependencies. So the backup and restore will go ahead but, once again, the &amp;lt;tt&amp;gt;get_mappingid&amp;lt;/tt&amp;gt; function will return false.&lt;br /&gt;
&lt;br /&gt;
At present the best way to handle this is to add a message to the restore log (which will not currently be displayed anywhere, but this might change):&lt;br /&gt;
&lt;br /&gt;
 $this-&amp;gt;get_logger()-&amp;gt;process(&amp;quot;Failed to restore dependency in mymodule &#039;$name&#039;. &amp;quot; .&lt;br /&gt;
         &amp;quot;Backup and restore will not work correctly unless you include the dependent module.&amp;quot;,&lt;br /&gt;
         backup::LOG_ERROR);&lt;/div&gt;</summary>
		<author><name>TimHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Development:DML_functions&amp;diff=83222</id>
		<title>Development:DML functions</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Development:DML_functions&amp;diff=83222"/>
		<updated>2011-05-04T15:09:49Z</updated>

		<summary type="html">&lt;p&gt;TimHunt: Correct error in the last changes.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Moodle_2.0}}This page describes the functions available to access data in the Moodle database. You should &#039;&#039;&#039;exclusively&#039;&#039;&#039; use these functions in order to retrieve or modify database content because these functions provide a high level of abstraction and guarantee that your database manipulation will work against different RDBMSes.&lt;br /&gt;
&lt;br /&gt;
Where possible, tricks and examples will be documented here in order to make developers&#039; lives a bit easier. Of course, feel free to clarify, complete and add more information to  this documentation. It will be welcome, absolutely!&lt;br /&gt;
&lt;br /&gt;
== Main info ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important note:&#039;&#039;&#039; All the functions shown on this page are for use in &#039;&#039;&#039;Moodle 2.0 upwards&#039;&#039;&#039;, where we changed the [[Development:DB layer 2.0|DB layer]] to support some new features. If you need information for previous Moodle version, take a look to the [[Development:DML functions - pre 2.0|DML functions - pre 2.0]] page. For a detailed reference of changes, see the [[Development:DB layer 2.0 migration docs|migration docs]].&lt;br /&gt;
&lt;br /&gt;
* All the function calls on this page are public methods of the $DB global object, so you&#039;ll need to &amp;quot;import&amp;quot; it within your functions (not needed in global scripts) with one simple:&lt;br /&gt;
&amp;lt;code php&amp;gt;global $DB;&amp;lt;/code&amp;gt;&lt;br /&gt;
* All the $table parameters in the functions are meant to be the table name &#039;&#039;without&#039;&#039; prefixes.&lt;br /&gt;
&amp;lt;code php&amp;gt;$user = $DB-&amp;gt;get_record(&#039;user&#039;, array(&#039;id&#039;=&amp;gt;&#039;1&#039;);&amp;lt;/code&amp;gt;&lt;br /&gt;
* When using the xxx_sql() functions, table names must be enclosed between curly braces.&lt;br /&gt;
&amp;lt;code php&amp;gt;$user = $DB-&amp;gt;get_record_sql(&#039;SELECT * FROM {user} WHERE id = ?&#039;, array(1));&amp;lt;/code&amp;gt;&lt;br /&gt;
* All the $conditions parameters in the functions are arrays of fieldname=&amp;gt;fieldvalue elements.&lt;br /&gt;
&amp;lt;code php&amp;gt;$user = $DB-&amp;gt;get_record(&#039;user&#039;, array(&#039;firstname&#039;=&amp;gt;&#039;Martin&#039;, &#039;lastname&#039;=&amp;gt;&#039;Dougiamas&#039;));&amp;lt;/code&amp;gt;&lt;br /&gt;
* All the $params parameters in the functions are arrays of values used to fill placeholders in SQL statements. Both the question mark and named placeholders can be used. Note that named params &#039;&#039;&#039;must be unique&#039;&#039;&#039; even if the value passed is the same.&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
/// Question mark placeholders:&lt;br /&gt;
   $DB-&amp;gt;get_record_sql(&#039;SELECT * FROM {user} WHERE firstname = ? AND lastname = ?&#039;, &lt;br /&gt;
                       array(&#039;Martin&#039;, &#039;Dougiamas&#039;));&lt;br /&gt;
&lt;br /&gt;
/// Named placeholders:&lt;br /&gt;
   $DB-&amp;gt;get_record_sql(&#039;SELECT * FROM {user} WHERE firstname = :firstname AND lastname = :lastname&#039;,&lt;br /&gt;
                       array(&#039;firstname&#039;=&amp;gt;&#039;Martin&#039;, &#039;lastname&#039;=&amp;gt;&#039;Dougiamas&#039;));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The functions ==&lt;br /&gt;
&lt;br /&gt;
===Seeing how many records match a given criteria===&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
o $DB-&amp;gt;count_records($table, array $conditions=null) &lt;br /&gt;
  /// Count the records in a table where all the given conditions met.&lt;br /&gt;
o $DB-&amp;gt;count_records_select($table, $select, array $params=null, $countitem=&amp;quot;COUNT(&#039;x&#039;)&amp;quot;) &lt;br /&gt;
  /// Count the records in a table which match a particular WHERE clause.&lt;br /&gt;
o $DB-&amp;gt;count_records_sql($sql, array $params=null) &lt;br /&gt;
  /// Get the result of a SQL SELECT COUNT(...) query.&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Seeing if one record exists===&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
o $DB-&amp;gt;record_exists($table, array $conditions=null) &lt;br /&gt;
  /// Test whether a record exists in a table where all the given conditions met.&lt;br /&gt;
o $DB-&amp;gt;record_exists_select($table, $select, array $params=null) &lt;br /&gt;
  /// Test whether any records exists in a table which match a particular WHERE clause.&lt;br /&gt;
o $DB-&amp;gt;record_exists_sql($sql, array $params=null) &lt;br /&gt;
  /// Test whether a SQL SELECT statement returns any records.&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Getting a single record===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
o $DB-&amp;gt;get_record($table, array $conditions, $fields=&#039;*&#039;, $ignoremultiple=false) &lt;br /&gt;
  /// Get a single database record as an object where all the given conditions met.&lt;br /&gt;
o $DB-&amp;gt;get_record_select($table, $select, array $params=null, $fields=&#039;*&#039;, $ignoremultiple=false)&lt;br /&gt;
  /// Get a single database record as an object which match a particular WHERE clause.&lt;br /&gt;
o $DB-&amp;gt;get_record_sql($sql, array $params=null)&lt;br /&gt;
  /// Get a single database record as an object using a SQL statement.&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Getting an array of records===&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
o $DB-&amp;gt;get_records($table, array $conditions=null, $sort=&#039;&#039;, $fields=&#039;*&#039;, $limitfrom=0, $limitnum=0) &lt;br /&gt;
  /// Get a number of records as an array of objects where all the given conditions met.&lt;br /&gt;
o $DB-&amp;gt;get_record_select($table, $select, array $params=null, $sort=&#039;&#039;, $fields=&#039;*&#039;, $limitfrom=0, $limitnum=0) &lt;br /&gt;
  /// Get a number of records as an array of objects which match a particular WHERE clause.&lt;br /&gt;
o $DB-&amp;gt;get_records_sql($sql, array $params=null, $limitfrom=0, $limitnum=0)&lt;br /&gt;
  /// Get a number of records as an array of objects using a SQL statement.&lt;br /&gt;
o $DB-&amp;gt;get_records_menu($table, array $conditions=null, $sort=&#039;&#039;, $fields=&#039;*&#039;, $limitfrom=0, $limitnum=0) &lt;br /&gt;
  /// Get the first two columns from a number of records as an associative array where all the given conditions met.&lt;br /&gt;
o $DB-&amp;gt;get_records_select_menu($table, $select, array $params=null, $sort=&#039;&#039;, $fields=&#039;*&#039;, $limitfrom=0, $limitnum=0)&lt;br /&gt;
  /// Get the first two columns from a number of records as an associative array which match a particular WHERE clause.&lt;br /&gt;
o $DB-&amp;gt;get_records_sql_menu($sql, array $params=null, $limitfrom=0, $limitnum=0)&lt;br /&gt;
  /// Get the first two columns from a number of records as an associative array using a SQL statement.&lt;br /&gt;
o $DB-&amp;gt;get_records_list($table, $field, array $values, $sort=&#039;&#039;, $fields=&#039;*&#039;, $limitfrom=&#039;&#039;, $limitnum=&#039;&#039;) &lt;br /&gt;
  /// Get a number of records as an array of objects where one field match one list of values.&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Getting a particular field value from one record===&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
o $DB-&amp;gt;get_field($table, $return, array $conditions)&lt;br /&gt;
  /// Get a single field value from a table record where all the given conditions met.&lt;br /&gt;
o $DB-&amp;gt;get_field_select($table, $return, $select, array $params=null)&lt;br /&gt;
  /// Get a single field value from a table record which match a particular WHERE clause.&lt;br /&gt;
o $DB-&amp;gt;get_field_sql($sql, array $params=null)&lt;br /&gt;
  /// Get a single field value (first field) using a SQL statement.&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Getting a particular field value from various records===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
o $DB-&amp;gt;get_fieldset_select($table, $return, $select, array $params=null)&lt;br /&gt;
  /// Selects records and return values of chosen field as an array which match a particular WHERE clause.&lt;br /&gt;
o $DB-&amp;gt;get_fieldset_sql($sql, array $params=null)&lt;br /&gt;
  /// Selects records and return values (first field) as an array using a SQL statement.&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Setting a particular field in the database===&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
o $DB-&amp;gt;set_field($table, $newfield, $newvalue, array $conditions=null)&lt;br /&gt;
  /// Set a single field in every table record where all the given conditions met.&lt;br /&gt;
o $DB-&amp;gt;set_field_select($table, $newfield, $newvalue, $select, array $params=null)&lt;br /&gt;
  /// Set a single field in every table record which match a particular WHERE clause.&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Deleting Records===&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
o $DB-&amp;gt;delete_records($table, array $conditions=null) &lt;br /&gt;
  /// Delete the records from a table where all the given conditions met.&lt;br /&gt;
o $DB-&amp;gt;delete_records_select($table, $select, array $params=null)&lt;br /&gt;
  /// Delete one or more records from a table which match a particular WHERE clause.&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Inserting Records===&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
o $DB-&amp;gt;insert_record($table, $dataobject, $returnid=true, $bulk=false) &lt;br /&gt;
  /// Insert a record into a table and return the &amp;quot;id&amp;quot; field if required.&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
====Example(s)====&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$record = new stdClass();&lt;br /&gt;
$record-&amp;gt;name         = &#039;overview&#039;;&lt;br /&gt;
$record-&amp;gt;displayorder = &#039;10000&#039;;&lt;br /&gt;
$DB-&amp;gt;insert_record(&#039;quiz_report&#039;, $record, false);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$record = new stdClass();&lt;br /&gt;
$record-&amp;gt;name         = &#039;overview&#039;;&lt;br /&gt;
$record-&amp;gt;displayorder = &#039;10000&#039;;&lt;br /&gt;
$lastinsertid = $DB-&amp;gt;insert_record(&#039;quiz_report&#039;, $record);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Updating Records===&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
o $DB-&amp;gt;update_record($table, $dataobject, $bulk=false)&lt;br /&gt;
  /// Update a record in a table.&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using Recordsets===&lt;br /&gt;
&lt;br /&gt;
Where the number of records to be retrieved from DB is high, the &#039;&#039;&#039;get_records_xxx()&#039;&#039;&#039; functions above are far from optimal, because they load all the records in memory at the same time. Under those circumstances, it is highly recommended to use these &#039;&#039;&#039;get_recordset_xxx()&#039;&#039;&#039; functions instead, which use one nice mechanism to iterate over all the target records and save a lot of memory.&lt;br /&gt;
&lt;br /&gt;
Only one thing is &#039;&#039;&#039;absolutely important&#039;&#039;&#039;: Don&#039;t forget to close the recordsets after using them! (This will free up a lot of resources in the RDBMS).&lt;br /&gt;
&lt;br /&gt;
Here is the general way to iterate over records using the &#039;&#039;&#039;get_recordset_xxx()&#039;&#039;&#039; functions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
if ($rs = $DB-&amp;gt;get_recordset(....) {&lt;br /&gt;
    foreach ($rs as $record) {&lt;br /&gt;
        // Do whatever you want with this record&lt;br /&gt;
    }&lt;br /&gt;
    $rs-&amp;gt;close(); // Don&#039;t forget to close the recordset!&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And this is the list of available functions (100% paired with the get_records_xxx() above):&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
o $DB-&amp;gt;get_recordset($table, array $conditions=null, $sort=&#039;&#039;, $fields=&#039;*&#039;, $limitfrom=0, $limitnum=0) &lt;br /&gt;
  /// Get a number of records as a moodle_recordset where all the given conditions met.&lt;br /&gt;
o $DB-&amp;gt;get_recordset_select($table, $select, array $params=null, $sort=&#039;&#039;, $fields=&#039;*&#039;, $limitfrom=0, $limitnum=0) &lt;br /&gt;
  /// Get a number of records as a moodle_recordset which match a particular WHERE clause.&lt;br /&gt;
o $DB-&amp;gt;get_recordset_sql($sql, array $params=null, $limitfrom=0, $limitnum=0);&lt;br /&gt;
  /// Get a number of records as a moodle_recordset using a SQL statement.&lt;br /&gt;
 &lt;br /&gt;
o $DB-&amp;gt;get_recordset_list($table, $field=&#039;&#039;, $values=&#039;&#039;, $sort=&#039;&#039;, $fields=&#039;*&#039;, $limitfrom=&#039;&#039;, $limitnum=&#039;&#039;) &lt;br /&gt;
  /// Get a number of records as a moodle_recordset where one field matches one list of values.&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Delegated transactions===&lt;br /&gt;
&lt;br /&gt;
* Please note some databases do not support transactions (such as the MyISAM MySQL database engine), however all server administrators are strongly encouraged to migrate to databases that support transactions (such as the InnoDB MySQL database engine).&lt;br /&gt;
* Previous versions supported only one level of transaction. Since Moodle 2.0, the DML layer emulates delegated transactions that allow nesting of transactions.&lt;br /&gt;
* Transactions should not be used much in Moodle core; they are intended for various plugins such as web services, enrol and auth plugins.&lt;br /&gt;
* Some subsystems (such as messaging) do not support transactions because is it is not possible to rollback in external systems.&lt;br /&gt;
&lt;br /&gt;
A transaction is started by:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$transaction = $DB-&amp;gt;start_delegated_transaction();&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and finished by:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$transaction-&amp;gt;allow_commit();&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Usually a transaction is rolled back when an exception is thrown. &amp;lt;code&amp;gt;$transaction-&amp;gt;rollback($ex);&amp;lt;/code&amp;gt; must be used very carefully because it might break compatibility with databases that do not support transactions. Transactions cannot be used as part of expected code flow; they can be used only as an emergency protection of data consistency.&lt;br /&gt;
&lt;br /&gt;
See more details in [[Development:DB layer 2.0 delegated transactions]] or MDL-20625.&lt;br /&gt;
&lt;br /&gt;
====Example(s)====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
global $DB;&lt;br /&gt;
try {&lt;br /&gt;
     $transaction = $DB-&amp;gt;start_delegated_transaction();&lt;br /&gt;
     // Insert a record&lt;br /&gt;
     $DB-&amp;gt;insert(&#039;foo&#039;, $object);&lt;br /&gt;
     $DB-&amp;gt;insert(&#039;bar&#039;, $otherobject);&lt;br /&gt;
&lt;br /&gt;
     // Assuming the both inserts work, we get to the following line.&lt;br /&gt;
     $transaction-&amp;gt;allow_commit();&lt;br /&gt;
} catch(Exception $e) {&lt;br /&gt;
     $transaction-&amp;gt;rollback($e);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Helper Functions===&lt;br /&gt;
&lt;br /&gt;
In order have real cross-db compatibility, there are some helper functions used to build SQL fragments based on the DB Moodle is running. Using them we&#039;ll avoid conditional queries here and there and have those &amp;quot;incompatibilities&amp;quot; fixed once and for ever.&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
o $DB-&amp;gt;sql_bitand($int1, $int2) &lt;br /&gt;
  /// Returns the SQL text to be used in order to perform one bitwise AND &lt;br /&gt;
  /// operation between 2 integers.&lt;br /&gt;
o $DB-&amp;gt;sql_bitnot($int1) &lt;br /&gt;
  /// Returns the SQL text to be used in order to perform one bitwise NOT &lt;br /&gt;
  /// operation with 1 integer.&lt;br /&gt;
o $DB-&amp;gt;sql_bitor($int1, $int2)&lt;br /&gt;
  /// Returns the SQL text to be used in order to perform one bitwise OR &lt;br /&gt;
  /// operation between 2 integers.&lt;br /&gt;
o $DB-&amp;gt;sql_bitxor($int1, $int2) &lt;br /&gt;
  /// Returns the SQL text to be used in order to perform one bitwise XOR &lt;br /&gt;
  /// operation between 2 integers.&lt;br /&gt;
 &lt;br /&gt;
o $DB-&amp;gt;sql_null_from_clause()&lt;br /&gt;
  /// Returns the FROM clause required by some DBs in all SELECT statements.&lt;br /&gt;
 &lt;br /&gt;
o $DB-&amp;gt;sql_ceil($fieldname)&lt;br /&gt;
  /// Returns the correct CEIL expression applied to fieldname.&lt;br /&gt;
o $DB-&amp;gt;sql_ilike()&lt;br /&gt;
  /// Returns the proper SQL to do LIKE in a case-insensitive way.&lt;br /&gt;
o $DB-&amp;gt;sql_length($fieldname)&lt;br /&gt;
  /// Returns the SQL text to be used to calculate the length in characters of one expression.&lt;br /&gt;
o $DB-&amp;gt;sql_modulo($int1, $int2)&lt;br /&gt;
  /// Returns the SQL text to be used in order to calculate module - remainder after division&lt;br /&gt;
o $DB-&amp;gt;sql_position($needle, $haystack)&lt;br /&gt;
  /// Returns the SQL for returning searching one string for the location of another.&lt;br /&gt;
  /// Note: If using placeholders BOTH in $needle and $haystack, they MUST be named placeholders.&lt;br /&gt;
o $DB-&amp;gt;sql_substr($expr, $start, $length=false)&lt;br /&gt;
  /// Returns the proper substr() SQL text used to extract substrings from DB.&lt;br /&gt;
  /// Note: This fuction has changed in Moodle 2.0 and now at least 2 params are mandatory.&lt;br /&gt;
  /// Note: Now it returns the whole SQL text to be used instead of only the function name.&lt;br /&gt;
 &lt;br /&gt;
o $DB-&amp;gt;sql_cast_char2int($fieldname, $text=false)&lt;br /&gt;
  /// Returns the SQL to be used in order to CAST one CHAR column to INTEGER.&lt;br /&gt;
o $DB-&amp;gt;sql_cast_char2real($fieldname, $text=false)&lt;br /&gt;
  /// Returns the SQL to be used in order to CAST one CHAR column to REAL number.&lt;br /&gt;
 &lt;br /&gt;
o $DB-&amp;gt;sql_compare_text($fieldname, $numchars=32) &lt;br /&gt;
  /// Returns the SQL text to be used to compare one TEXT (clob) column.&lt;br /&gt;
  /// with one VARCHAR column.&lt;br /&gt;
o $DB-&amp;gt;sql_order_by_text($fieldname, $numchars=32)&lt;br /&gt;
  /// Returns the SQL text to be used to order by one TEXT (clob) column.&lt;br /&gt;
 &lt;br /&gt;
o $DB-&amp;gt;sql_concat()&lt;br /&gt;
  /// Returns the proper SQL to do CONCAT between the elements passed.&lt;br /&gt;
o $DB-&amp;gt;sql_concat_join($separator=&amp;quot;&#039; &#039;&amp;quot;, $elements=array())&lt;br /&gt;
  /// Returns the proper SQL to do CONCAT between the elements passed using one separator.&lt;br /&gt;
o $DB-&amp;gt;sql_fullname($first=&#039;firstname&#039;, $last=&#039;lastname&#039;)&lt;br /&gt;
  /// Returns the proper SQL to concatenate $firstname and $lastname.&lt;br /&gt;
 &lt;br /&gt;
o $DB-&amp;gt;sql_isempty($tablename, $fieldname, $nullablefield, $textfield)&lt;br /&gt;
  /// Returns the proper SQL to know if one field is empty.&lt;br /&gt;
o $DB-&amp;gt;sql_isnotempty($tablename, $fieldname, $nullablefield, $textfield)&lt;br /&gt;
  /// Returns the proper SQL to know if one field is not empty.&lt;br /&gt;
o $DB-&amp;gt;sql_empty()&lt;br /&gt;
  /// Returns the empty string char used by every supported DB.&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [[Development:DML exceptions|DML exceptions]]: New DML code is throwing exceptions instead of returning false if anything goes wrong&lt;br /&gt;
* [[Development:DML drivers|DML drivers]]: Database drivers for new DML layer&lt;br /&gt;
* [[Development:DML functions - pre 2.0|DML functions - pre 2.0]]: &#039;&#039;&#039;(deprecated!)&#039;&#039;&#039; For information valid before Moodle 2.0.&lt;br /&gt;
* [[Development:DDL functions|DDL functions]]: Where all the functions used to handle DB objects ([[wikipedia:Data_Definition_Language|DDL]]) are defined.&lt;br /&gt;
* [[Development:DB layer 2.0 examples|DB layer 2.0 examples]]: To see some code examples using various DML functions.&lt;br /&gt;
* [[Development:DB layer 2.0 migration docs|DB layer 2.0 migration docs]]: Information about how to modify your code to work with the new Moodle 2.0 DB layer.&lt;br /&gt;
* [[Development:DTL functions|DTL functions]]: Exporting, importing and moving of data stored in SQL databases&lt;br /&gt;
&lt;br /&gt;
[[Category:DB]]&lt;br /&gt;
[[Category:XMLDB]]&lt;/div&gt;</summary>
		<author><name>TimHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Triage&amp;diff=83182</id>
		<title>Triage</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Triage&amp;diff=83182"/>
		<updated>2011-05-02T15:17:02Z</updated>

		<summary type="html">&lt;p&gt;TimHunt: Redirected page to Development:Bug triage&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Development:Bug_triage]]&lt;/div&gt;</summary>
		<author><name>TimHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Triage&amp;diff=83181</id>
		<title>Triage</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Triage&amp;diff=83181"/>
		<updated>2011-05-02T15:14:30Z</updated>

		<summary type="html">&lt;p&gt;TimHunt: Created page with &amp;quot;REDIRECT Development:Bug_triage&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;REDIRECT [[Development:Bug_triage]]&lt;/div&gt;</summary>
		<author><name>TimHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Development:Using_the_question_engine_from_module&amp;diff=83146</id>
		<title>Development:Using the question engine from module</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Development:Using_the_question_engine_from_module&amp;diff=83146"/>
		<updated>2011-05-01T06:58:07Z</updated>

		<summary type="html">&lt;p&gt;TimHunt: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Question_engine_2}}&lt;br /&gt;
This page explains how to use the new Moodle [[Development:Question Engine 2|question engine]] in an activity module you are developing.&lt;br /&gt;
&lt;br /&gt;
Previous section: [[Development:Developing_a_Question_Type|Developing a Question Type]]&lt;br /&gt;
&lt;br /&gt;
The first example of a module that uses the question engine is the quiz module. Looking at how the quiz code works will let you see a real working example of what explained on this page. Another, much simpler example to look at is &amp;lt;tt&amp;gt;question/preview.php&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Note that all the question engine code has extensive PHP documentor comments that should explain the purpose of every class and method. This document is supposed to provide an overview of the key points to get you started. It does not attempt to duplicate all the details in the PHPdocs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
The key class you will be working with is &amp;lt;tt&amp;gt;question_usage_by_activity&amp;lt;/tt&amp;gt;. This tracks an attempt at some questions, for example a quiz attempt. The usage should provide all the interface methods you need to do things with the question engine. You should rarely need to dive deeper into the inner workings of the question engine than this.&lt;br /&gt;
&lt;br /&gt;
A usage is a collection of &amp;lt;tt&amp;gt;question_attempt&amp;lt;/tt&amp;gt; objects. A question attempt represents the state of the user&#039;s attempt at one question within the usage. When you add a question to the usage, you get back a &#039;&#039;&#039;slot&#039;&#039;&#039; number. This serves to index that question within the attempt. Using slot numbers like this means that the same question can be added more than once to the same usage. A lot of the usage API calls take this slot number to indicate which question attempt to operate on. Other API methods let you perform batch actions on all the question attempts within the usage.&lt;br /&gt;
&lt;br /&gt;
==Starting an attempt at some questions==&lt;br /&gt;
&lt;br /&gt;
The example code in this section all came from &amp;lt;tt&amp;gt;mod/quiz/startattempt.php&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Creating the usage===&lt;br /&gt;
&lt;br /&gt;
To create a new usage, ask the question engine:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$quba = question_engine::make_questions_usage_by_activity(&#039;mod_quiz&#039;, $quizobj-&amp;gt;get_context());&lt;br /&gt;
$quba-&amp;gt;set_preferred_behaviour($quiz-&amp;gt;preferredbehaviour);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will see that the constructor takes the plugin name (using the Moodle 2.0 &#039;frankenstyle&#039; naming convention) and the context that owns the usage. Usages should be cleaned up automatically when a context is deleted or a plugin un-installed. You also have to tell the usage which behaviour should be used when creating the attempt at each question.&lt;br /&gt;
&lt;br /&gt;
===Adding questions===&lt;br /&gt;
&lt;br /&gt;
Having got a usage, you will probably then want to add some questions to it. The question data you loaded from the database (probably using the &amp;lt;tt&amp;gt;get_question_options&amp;lt;/tt&amp;gt; function) come in a form suitable for data handling like import/export, backup/restore, and so on. We need to convert that to an &amp;lt;tt&amp;gt;question_definition&amp;lt;/tt&amp;gt; object. That can be done using the &amp;lt;tt&amp;gt;question_bank::make_question&amp;lt;/tt&amp;gt; method. Alternatively, you could just use the &amp;lt;tt&amp;gt;question_bank::load_question&amp;lt;/tt&amp;gt; method, but that can only load one question at a time.&lt;br /&gt;
&lt;br /&gt;
Once you have a &amp;lt;tt&amp;gt;question_definition&amp;lt;/tt&amp;gt; object, you add it to the usage by calling the &amp;lt;tt&amp;gt;add_question&amp;lt;/tt&amp;gt; method passing the question definition, and also the score you want this question marked out of. You get back the slot number that has been assigned to this question. The slot numbers are allocated in order, starting from 1. You can rely on that numbering convention. For example, the quiz module uses the slot numbers to make sure the grade for each question lines up properly in the reports.&lt;br /&gt;
&lt;br /&gt;
Here is the applicable code from the quiz module&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
foreach ($quizobj-&amp;gt;get_questions() as $i =&amp;gt; $questiondata) {&lt;br /&gt;
    $question = question_bank::make_question($questiondata);&lt;br /&gt;
    $idstoslots[$i] = $quba-&amp;gt;add_question($question, $questiondata-&amp;gt;maxmark);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Starting the question attempts===&lt;br /&gt;
&lt;br /&gt;
The usage does not do much when the question is added. Before the user can start interacting with the question, you have to start it. You can either do that in bulk:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$quba-&amp;gt;start_all_questions();&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
or you can start just one particular question using the &amp;lt;tt&amp;gt;start_question($slot)&amp;lt;/tt&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
===Saving the usage===&lt;br /&gt;
&lt;br /&gt;
So far, all these method calls have just built up a data structure in memory. If you want to keep it, you have to save it in the database. Fortunately, that is easy:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
question_engine::save_questions_usage_by_activity($quba);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The usage is stored as a row in the &amp;lt;tt&amp;gt;question_usages&amp;lt;/tt&amp;gt; table (plus rows in other tables). To get the id of the usage, call &amp;lt;tt&amp;gt;$quba-&amp;gt;get_id()&amp;lt;/tt&amp;gt; after you have saved it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Displaying questions==&lt;br /&gt;
&lt;br /&gt;
Suppose that you wish to display a page that contains several questions from the usage. The questions to display will be the ones whose slot numbers are in an array called &amp;lt;tt&amp;gt;$slotsonpage&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The example code in this section is derived from code used by &amp;lt;tt&amp;gt;mod/quiz/attempt.php&amp;lt;/tt&amp;gt;. However, the quiz code is split between &amp;lt;tt&amp;gt;mod/quiz/attempt.php&amp;lt;/tt&amp;gt; and the &amp;lt;tt&amp;gt;quiz_attempt&amp;lt;/tt&amp;gt; class in &amp;lt;tt&amp;gt;mod/quiz/attemptlib.php&amp;lt;/tt&amp;gt;. That separation means that if I used the real quiz code in this tutorial, it would be unnecessarily hard to understand. Instead, I have simplified the examples below. If you are interested, you should be able to match up what you see below with the real quiz code.&lt;br /&gt;
&lt;br /&gt;
===Loading the usage===&lt;br /&gt;
&lt;br /&gt;
At the end of the last section, you had just saved the usage to the database. To display the questions as part of a different script, they must be loaded from the database again. Once again you ask the question engine to do this:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$quba = question_engine::load_questions_usage_by_activity($usageid);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The id that you pass to this method is the id you got from &amp;lt;tt&amp;gt;$quba-&amp;gt;get_id()&amp;lt;/tt&amp;gt; after saving the usage.&lt;br /&gt;
&lt;br /&gt;
===Before print_header===&lt;br /&gt;
&lt;br /&gt;
One subtlety is that different question types may rely on JavaScript and CSS to work. In order for this, particularly the links to the CSS, to be included in the page you are outputting, you must call the &amp;lt;tt&amp;gt;render_question_head_html&amp;lt;/tt&amp;gt; method for each question you will be outputting on this page. You need to collect all the HTML returned, and also the return value from &amp;lt;tt&amp;gt;question_engine::initialise_js()&amp;lt;/tt&amp;gt; method, and pass all that as the $meta parameter to print_header.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$meta = &#039;&#039;;&lt;br /&gt;
foreach ($slotsonpage as $slot) {&lt;br /&gt;
    $meta .= $quba-&amp;gt;render_question_head_html($slot);&lt;br /&gt;
}&lt;br /&gt;
$meta .= question_engine::initialise_js();&lt;br /&gt;
print_header(/* ... lots of args ... */, $meta);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The question form===&lt;br /&gt;
&lt;br /&gt;
Within the page, all the questions have to be wrapped in a HTML &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;form&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt; tag. This form needs to POST to a scripts that processes the submitted data ([[#Processing_responses|see below]]).&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
echo &#039;&amp;lt;form id=&amp;quot;responseform&amp;quot; method=&amp;quot;post&amp;quot; action=&amp;quot;&#039; . $processurl .&lt;br /&gt;
        &#039;&amp;quot; enctype=&amp;quot;multipart/form-data&amp;quot; accept-charset=&amp;quot;utf-8&amp;quot;&amp;gt;&#039;, &amp;quot;\n&amp;lt;div&amp;gt;\n&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$PAGE-&amp;gt;requires-&amp;gt;js_init_call(&#039;M.core_question_engine.init_form&#039;,&lt;br /&gt;
        array(&#039;#responseform&#039;), false, &#039;core_question_engine&#039;);&lt;br /&gt;
&lt;br /&gt;
echo &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;slots&amp;quot; value=&amp;quot;&#039; . implode(&#039;,&#039;, $slotsonpage) . &amp;quot;\&amp;quot; /&amp;gt;\n&amp;quot;;&lt;br /&gt;
echo &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;scrollpos&amp;quot; value=&amp;quot;&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;enctype&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;accept-charset&amp;lt;/tt&amp;gt; parameters are important. Please copy them. The form must have an id, and you must then write some JavaScript that passes that id to to the &amp;lt;tt&amp;gt;question_init_form&amp;lt;/tt&amp;gt; function. That function is defined in &amp;lt;tt&amp;gt;question/qengine.js&amp;lt;/tt&amp;gt; if you want to find out what it does and why it is important.&lt;br /&gt;
&lt;br /&gt;
You should output a hidden form field &amp;lt;tt&amp;gt;slots&amp;lt;/tt&amp;gt; that contains a comma-separated list of the slot numbers that appear on this page. That is not absolutely necessary, but it will make processing the form submission much more efficient.&lt;br /&gt;
&lt;br /&gt;
Another nicety is the &amp;lt;tt&amp;gt;scrollpos&amp;lt;/tt&amp;gt; hidden field. Some question behaviours, for example the interactive behaviour, have submit buttons that do something to the question. When the user clicks this button, it is nice if when the page re-displays, it is scrolled to exactly the same place where it was. The question engine has JavaScript which, if it finds a &amp;lt;tt&amp;gt;scrollpos&amp;lt;/tt&amp;gt; hidden field, will automatically save the scroll position to it when a button is clicked, and cause the page to scroll to that position when it reloads.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Outputting the questions===&lt;br /&gt;
&lt;br /&gt;
Finally, you can actually print the questions. Well, there is one more thing to take care of first. To control how the question appears, you must prepare a &amp;lt;tt&amp;gt;question_display_options&amp;lt;/tt&amp;gt; object that describes what should be visible. For example:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$options = new question_display_options();&lt;br /&gt;
$options-&amp;gt;marks = question_display_options::MAX_ONLY;&lt;br /&gt;
$options-&amp;gt;markdp = 2; // Display marks to 2 decimal places.&lt;br /&gt;
$options-&amp;gt;feedback = question_display_options::VISIBLE;&lt;br /&gt;
$options-&amp;gt;generalfeedback = question_display_options::HIDDEN;&lt;br /&gt;
// etc.&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(In the quiz code, the display options actually come from the quiz settings.) Then you really are ready to output the questions&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
foreach ($slotsonpage as $displaynumber =&amp;gt; $slot) {&lt;br /&gt;
    echo $quba-&amp;gt;render_question($slot, $options, $displaynumber);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here &amp;lt;tt&amp;gt;$displaynumber&amp;lt;/tt&amp;gt; is the &#039;question number&#039; you want printed next to each question. This is not necessarily the same as the slot number. For example, in the quiz, Description &#039;questions&#039; are not numbered, although they take up a slot. If you don&#039;t pass in a number to display, then the question is just printed without one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Processing responses==&lt;br /&gt;
&lt;br /&gt;
Once again, the example here are inspired by real code from the quiz module, in this case &amp;lt;tt&amp;gt;mod/quiz/processattempt.php&amp;lt;/tt&amp;gt;, but simplified to remove mention of the &amp;lt;tt&amp;gt;quiz_attempt&amp;lt;/tt&amp;gt; class.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===The simple case===&lt;br /&gt;
&lt;br /&gt;
Normally, you just need to do something like:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$timenow = time();&lt;br /&gt;
$transaction = $DB-&amp;gt;start_delegated_transaction();&lt;br /&gt;
&lt;br /&gt;
$quba = question_engine::load_questions_usage_by_activity($usageid);&lt;br /&gt;
$quba-&amp;gt;process_all_actions($timenow);&lt;br /&gt;
question_engine::save_questions_usage_by_activity($quba);&lt;br /&gt;
&lt;br /&gt;
$transaction-&amp;gt;allow_commit();&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Behind the scenes there is, of course, a lot going on, including the use of the &amp;lt;tt&amp;gt;slots&amp;lt;/tt&amp;gt; parameter to control which questions are processed.&lt;br /&gt;
&lt;br /&gt;
There may also be additional work you need to do. For example, in the quiz (before the &amp;lt;tt&amp;gt;commit_sql()&amp;lt;/tt&amp;gt; line) there is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
if ($attempt-&amp;gt;timefinish) {&lt;br /&gt;
    $attempt-&amp;gt;sumgrades = $quba-&amp;gt;get_total_mark();&lt;br /&gt;
}&lt;br /&gt;
$attempt-&amp;gt;timemodified = $timenow;&lt;br /&gt;
$DB-&amp;gt;update_record(&#039;quiz_attempts&#039;, $attempt);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===More selective processing===&lt;br /&gt;
&lt;br /&gt;
If you want something other than the default processing, you can use code like &amp;lt;tt&amp;gt;$submitteddata = $quba-&amp;gt;extract_responses($slot); $quba-&amp;gt;process_action($slot, $submitteddata);&amp;lt;/tt&amp;gt; or something similar.&lt;br /&gt;
&lt;br /&gt;
===Handling scrollpos===&lt;br /&gt;
&lt;br /&gt;
You will remember that when we printed the questions, we created a &amp;lt;tt&amp;gt;scrollpos&amp;lt;/tt&amp;gt; hidden field. Presumably, after you have processed the submission, you will redirect the user back to a page to display the questions again. In that case, you need to get the &amp;lt;tt&amp;gt;scrollpos&amp;lt;/tt&amp;gt; parameter, and add it on to the URL you redirect to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
// With the other required/optional_param calls at the start of processattempt.php.&lt;br /&gt;
$scrollpos = optional_param(&#039;scrollpos&#039;, &#039;&#039;, PARAM_RAW);&lt;br /&gt;
&lt;br /&gt;
// ... a bit later in the file&lt;br /&gt;
$nexturl = /* something */;&lt;br /&gt;
if ($scrollpos !== &#039;&#039;) {&lt;br /&gt;
    $nexturl .= &#039;&amp;amp;scrollpos=&#039; . ((int) $scrollpos);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// ... after all the processing is done.&lt;br /&gt;
redirect($nexturl);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Reports==&lt;br /&gt;
&lt;br /&gt;
Places like the quiz reports, we need to get data about a lot of usages at the same time. There are methods on the &amp;lt;tt&amp;gt;question_engine_data_mapper&amp;lt;/tt&amp;gt; to do this. You should never access the data in the question engine tables directly.&lt;br /&gt;
&lt;br /&gt;
For example from the quiz grades report. (Again the example code has been simplified.)&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
// $qubaids is an array of integer ids.&lt;br /&gt;
$qubaidscondition = new qubaid_list($qubaids);&lt;br /&gt;
&lt;br /&gt;
$dm = new question_engine_data_mapper();&lt;br /&gt;
$latesstepdata = $dm-&amp;gt;load_questions_usages_latest_steps(&lt;br /&gt;
        $qubaidscondition, $slots);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;qubaid_list&amp;lt;/tt&amp;gt; is a subclass of the &amp;lt;tt&amp;gt;qubaid_condition&amp;lt;/tt&amp;gt; class. This is an efficient way to represent a set of usage ids in a way that can be used in database queries. The other main subclass is &amp;lt;tt&amp;gt;qubaid_join&amp;lt;/tt&amp;gt;. That could be used like this:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$qubaidscondition = new qubaid_join(&#039;{quiz_attempts} quiza&#039;, &#039;quiza.uniqueid&#039;,&lt;br /&gt;
        &#039;quiza.quiz = :quizaquiz&#039;, array(&#039;quizaquiz&#039; =&amp;gt; $quizid))&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another example, from the quiz manual grading report is&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$dm = new question_engine_data_mapper();&lt;br /&gt;
$statesummary = $dm-&amp;gt;load_questions_usages_question_state_summary(&lt;br /&gt;
        $qubaidscondition, $slots);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Perhaps the use of the class &amp;lt;tt&amp;gt;question_engine_data_mapper&amp;lt;/tt&amp;gt; should be hidden inside a helper class &amp;lt;tt&amp;gt;question_engine_reporter&amp;lt;/tt&amp;gt;?)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Other methods==&lt;br /&gt;
&lt;br /&gt;
===Methods to help with settings UI===&lt;br /&gt;
&lt;br /&gt;
When you want to present users with a choice of question behaviour (for example, the quiz How questions behave option) use&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$options = question_engine::get_behaviour_options();&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Question marks are stored in the database to a fixed number of decimal places. To get a list of possible decimal place display options, use&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$options = question_engine::get_dp_options();&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Clean-up methods===&lt;br /&gt;
&lt;br /&gt;
To delete usages you no longer need:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
// A single usage ...&lt;br /&gt;
question_engine::delete_questions_usage_by_activity($qubaid);&lt;br /&gt;
&lt;br /&gt;
// ... or many.&lt;br /&gt;
question_engine::delete_questions_usage_by_activity(&lt;br /&gt;
        new qubaid_join(&#039;{quiz_attempts} quiza&#039;, &#039;quiza.uniqueid&#039;,&lt;br /&gt;
        &#039;quiza.quiz = :quizaquiz&#039;, array(&#039;quizaquiz&#039; =&amp;gt; $quizid)));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Changing the score of a question in all attempts===&lt;br /&gt;
&lt;br /&gt;
Suppose you change the number of marks awarded to question 2 in the quiz, you need to change that information in every attempt at that quiz, you can do that with a call like&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
question_engine::set_max_mark_in_attempts($qubaids, $slot, $newmaxmark);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Re-grading a question===&lt;br /&gt;
&lt;br /&gt;
You only need to re-grade a question when the question definition id edited, for example to change the scoring rules. If you are just changing the maximum possible score for a question, see the previous sub-section.&lt;br /&gt;
&lt;br /&gt;
This code example is adapted from &amp;lt;tt&amp;gt;mod/quiz/report/overview/report.php&amp;lt;/tt&amp;gt;. It re-grades selected slots within a quiz attempt.&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$transaction = $DB-&amp;gt;start_delegated_transaction();&lt;br /&gt;
$quba = question_engine::load_questions_usage_by_activity($attempt-&amp;gt;uniqueid);&lt;br /&gt;
&lt;br /&gt;
foreach ($slots as $slot) {&lt;br /&gt;
    $oldfraction[$slot] = $quba-&amp;gt;get_question_fraction($slot);&lt;br /&gt;
    $quba-&amp;gt;regrade_question($slot);&lt;br /&gt;
    $newfraction[$slot] = $quba-&amp;gt;get_question_fraction($slot);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
question_engine::save_questions_usage_by_activity($quba);&lt;br /&gt;
$attempt-&amp;gt;sumgrades = $quba-&amp;gt;get_total_mark();&lt;br /&gt;
update_record(&#039;quiz_attempts&#039;, $attempt);&lt;br /&gt;
$transaction-&amp;gt;allow_commit();&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
In the next section, [[Development:Question Engine 2:Implementation plan|Implementation plan]] outlines how I will implement this proposal.&lt;br /&gt;
&lt;br /&gt;
* The PHP documenter comments that explain the purposes of every method in the question engine code.&lt;br /&gt;
* Back to [[Development:Question_Engine_2|Question Engine 2]]&lt;/div&gt;</summary>
		<author><name>TimHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Development:CodeSniffer&amp;diff=83118</id>
		<title>Development:CodeSniffer</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Development:CodeSniffer&amp;diff=83118"/>
		<updated>2011-04-29T18:02:17Z</updated>

		<summary type="html">&lt;p&gt;TimHunt: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Moodle 2.0}}&lt;br /&gt;
&lt;br /&gt;
==Note that code-sniffer is currently out of date with the the Moodle coding guidelines==&lt;br /&gt;
&lt;br /&gt;
Also, at the moment the code is horribly mixed up with /lib/pear/PHP/CodeSniffer. Someone should:&lt;br /&gt;
&lt;br /&gt;
A better alternative is: https://github.com/timhunt/moodle-local_codechecker&lt;br /&gt;
&lt;br /&gt;
This is an entirely self-contained plug-in with a nice web-interface. It does not check all of the coding style, but it covers a lot of the most important points. The things it does check are all in the coding rules. There should not be any false positives.&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
===Scope===&lt;br /&gt;
This document describes the CodeSniffer tool added in Moodle 2.0, its purpose and usage.&lt;br /&gt;
&lt;br /&gt;
===Function===&lt;br /&gt;
The function of the CodeSniffer tool is to analyse PHP5 (only) code, apply a set of rules that match the [[Development:Coding_style | Moodle Coding Style]], and output a report showing which parts of the code do not conform to this style.&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
===Simple example===&lt;br /&gt;
The script is located in lib/pear/PHP and is called runsniffer. To check the syntax of a given file (e.g. index.php), run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
lib/pear/PHP/runsniffer index.php&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will get a report that looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  --------------------------------------------------------------------------------&lt;br /&gt;
  FOUND 139 ERROR(S) AND 24 WARNING(S) AFFECTING 130 LINE(S)&lt;br /&gt;
  --------------------------------------------------------------------------------&lt;br /&gt;
     1 | WARNING | $Id$ tag is no longer required, please remove.&lt;br /&gt;
    28 | ERROR   | line indented incorrectly; expected 0 spaces, found 4&lt;br /&gt;
    50 | ERROR   | line indented incorrectly; expected 0 spaces, found 4&lt;br /&gt;
    50 | ERROR   | A cast statement must be followed by a single space&lt;br /&gt;
    55 | ERROR   | line indented incorrectly; expected 0 spaces, found 4&lt;br /&gt;
  ....&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first column shows the line at which the ERROR or WARNING was found. The CodeSniffer uses a set of rules which are still being defined, so that what is currently defined as ERROR or WARNING is likely to change in the near future. &lt;br /&gt;
&lt;br /&gt;
You should fix all ERRORs, but may safely ignore the WARNINGs. Fixing warnings will help your code be even more readable and consistent with other code that follow this standard.&lt;br /&gt;
&lt;br /&gt;
===Advanced Usage===&lt;br /&gt;
====Ignoring warnings====&lt;br /&gt;
You can run the CodeSniffer with the -n flag to ignore warnings:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
lib/pear/PHP/runsniffer -n index.php&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Resulting output:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  --------------------------------------------------------------------------------&lt;br /&gt;
  FOUND 139 ERROR(S) AFFECTING 125 LINE(S)&lt;br /&gt;
  --------------------------------------------------------------------------------&lt;br /&gt;
    28 | ERROR | line indented incorrectly; expected 0 spaces, found 4&lt;br /&gt;
    50 | ERROR | line indented incorrectly; expected 0 spaces, found 4&lt;br /&gt;
  ...&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Recursive analysis====&lt;br /&gt;
If you give the name of a folder instead of a file, it will search, analyse and report on all PHP files found in this folder and all its subfolders. This will produce a full report for each PHP file. Since this is likely to be too much information, you may want to print only a summary report, by using the following syntax (search the files/ folder as an example):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
lib/pear/PHP/runsniffer --report=summary files&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Report:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  PHP CODE SNIFFER REPORT SUMMARY&lt;br /&gt;
  --------------------------------------------------------------------------------&lt;br /&gt;
  FILE                                                            ERRORS  WARNINGS&lt;br /&gt;
  --------------------------------------------------------------------------------&lt;br /&gt;
  /web/htdocs/moodle_blog2/files/index.php                        11      58&lt;br /&gt;
  /web/htdocs/moodle_blog2/files/draftfiles.php                   6       22&lt;br /&gt;
  --------------------------------------------------------------------------------&lt;br /&gt;
  A TOTAL OF 17 ERROR(S) AND 80 WARNING(S) WERE FOUND IN 2 FILE(S)&lt;br /&gt;
  --------------------------------------------------------------------------------&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use the -n flag to ignore warnings.&lt;br /&gt;
&lt;br /&gt;
====Several files in one folder====&lt;br /&gt;
If you want to search all files under a folder, but not recurse through the subfolders, you can use the -l flag (local files only):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
lib/pear/PHP/runsniffer --report=summary -l grade&lt;br /&gt;
&lt;br /&gt;
  PHP CODE SNIFFER REPORT SUMMARY&lt;br /&gt;
  --------------------------------------------------------------------------------&lt;br /&gt;
  FILE                                                            ERRORS  WARNINGS&lt;br /&gt;
  --------------------------------------------------------------------------------&lt;br /&gt;
  /web/htdocs/moodle_blog2/grade/index.php                        0       2&lt;br /&gt;
  /web/htdocs/moodle_blog2/grade/lib.php                          6       210&lt;br /&gt;
  /web/htdocs/moodle_blog2/grade/querylib.php                     5       39&lt;br /&gt;
  --------------------------------------------------------------------------------&lt;br /&gt;
  A TOTAL OF 11 ERROR(S) AND 251 WARNING(S) WERE FOUND IN 3 FILE(S)&lt;br /&gt;
  --------------------------------------------------------------------------------&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can pass as many files and folders to the script as you want, the analysis and flags will apply to all of them.&lt;br /&gt;
&lt;br /&gt;
===Special rules===&lt;br /&gt;
When recursing through folders, the CodeSniffer script looks for a file called thirdpartylibs.xml. Currently there is only one, found under lib/. It lists directories and files which are meant to stay &#039;as-is&#039; in Moodle, in order to ensure minimum hassle when upgrading these libraries. You can use this file as a template to create your own list of exceptions.&lt;br /&gt;
&lt;br /&gt;
===Other report formats===&lt;br /&gt;
CodeSniffer can export its reports in the following formats:&lt;br /&gt;
#full: default, shown first above&lt;br /&gt;
#summary: also shown above&lt;br /&gt;
#xml: Simple XML format&lt;br /&gt;
#csv: Comma-separated list&lt;br /&gt;
#checkstyle: XML format intended for use with CruiseControl&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
#[[Development:Coding]]&lt;br /&gt;
#[[Development:Coding style]]&lt;/div&gt;</summary>
		<author><name>TimHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=About_Moodle&amp;diff=83045</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=83045"/>
		<updated>2011-04-26T21:33:10Z</updated>

		<summary type="html">&lt;p&gt;TimHunt: Reverted edits by Speakinginenglish (talk) to last revision by Dheerajsl&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{About Moodle}}&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 [[License|license]] for full details and please contact the [http://moodle.org/user/view.php?id=1&amp;amp;course=1 copyright holder] directly if you have any questions.&lt;br /&gt;
&lt;br /&gt;
Moodle can be [[Installing Moodle|installed]] on any computer that can run [http://www.php.net/ PHP], and can support an SQL type database (for example [http://www.mysql.com/ 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;
==See also==&lt;br /&gt;
*[http://moodle.org/course/view.php?id=17223 Teaching and Learning with Moodle] - Entry point for educators, new and experienced. See what Moodle is, view and contribute real life examples of using various features, and follow useful links to resources and places you can share, seek help and connect with fellow educators using Moodle.&lt;br /&gt;
*[[Teacher documentation |What does a teacher need to know?]] A good starting place to learn about the robust features in a Moodle course.&lt;br /&gt;
*[http://demo.moodle.org/ Moodle Demonstration Site]. Here you can play on a Moodle site as a teacher, administrator or student. &lt;br /&gt;
*[http://en.wikipedia.org/wiki/Moodle The Moodle page at Wikipedia]. MoodleDocs and Wikipedia both use [[MediaWiki]].&lt;br /&gt;
*[http://en.wikiversity.org/wiki/Moodle Moodle page at Wikiversity] &lt;br /&gt;
*[http://www.infonary.com/moodle Moodle News at Infonary]  &lt;br /&gt;
*[[Moodle_manuals]] has many links or there is the [[Using Moodle book]] for those who must have an Adobe document to read or print.&lt;br /&gt;
*[[Moodle presentations| Here is where Moodlers]] share their &amp;quot;This is Moodle&amp;quot; presentations.&lt;br /&gt;
*[http://www.google.com/search?hl=en&amp;amp;q=moodlemoot Moodlemoots] are exciting Moodle conferences all over the world, with both face to face and virtual components.&lt;br /&gt;
*[[Documents useful for decision makers|Which course management software ?]] - Documents useful for decision makers&lt;br /&gt;
*Each of the links below will take you to a different alphabetical index of topics, such as the Administrator index or Teacher index.   &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;br /&gt;
&lt;br /&gt;
[[Category:Moodle]]&lt;/div&gt;</summary>
		<author><name>TimHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Development:Developer_documentation&amp;diff=83044</id>
		<title>Development:Developer documentation</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Development:Developer_documentation&amp;diff=83044"/>
		<updated>2011-04-26T21:33:02Z</updated>

		<summary type="html">&lt;p&gt;TimHunt: Reverted edits by Speakinginenglish (talk) to last revision by TimHunt&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[image:moodle-development-logo.jpg|right|400px]]&lt;br /&gt;
&lt;br /&gt;
This [[:Category:Developer|Developer]] section of Moodle Docs is aimed at developers who contribute to the Moodle code, plugins, themes, and so on.&lt;br /&gt;
&lt;br /&gt;
* If you manage a Moodle site, [[Administrator documentation]] may suit your needs better. &lt;br /&gt;
* If you teach using Moodle, try [[Teacher documentation]].&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&#039;&#039;&#039;Note:&#039;&#039;&#039; New developer documentation pages should be added to the &#039;&#039;Development namespace&#039;&#039; by typing &amp;lt;code&amp;gt;Development:&amp;lt;/code&amp;gt; before the new page name i.e. &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[[Development:New page name]]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;. If you are a developer, you probably want to change your [[Special:Preferences|preferences]] to include the Development namespace in searches.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A page may be added to the Developer category by adding the template &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{CategoryDeveloper}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; to the bottom of the page. - If required, you can use &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[[Category:Developer|Sort key]]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; to provide a sort key other than the default page name.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==How Moodle development works==&lt;br /&gt;
&lt;br /&gt;
The [[Development:Overview|overview of the Moodle development process]] explains how Moodle development occurs and how people become Moodle developers. Current plans are listed on the [[Roadmap]].&lt;br /&gt;
&lt;br /&gt;
You can also enrol in one of the [http://dev.moodle.org Moodle Developer Courses].&lt;br /&gt;
&lt;br /&gt;
==Guidelines==&lt;br /&gt;
&lt;br /&gt;
The following guidelines are crucial reading for anyone wanting to contribute to the Moodle code base:&lt;br /&gt;
*[[Development:Coding|Coding guidelines]] have to be followed by all Moodle developers&lt;br /&gt;
*[[Moodle architecture]] gives an overview of how the Moodle code works&lt;br /&gt;
*[[Development:Process]] explains how changes are incorporated into Moodle&lt;br /&gt;
*[[Tracker]] explains the Moodle Tracker for keeping track of bugs, issues, feature requests etc&lt;br /&gt;
*[[Development:Working with the Community|Working with the Community]] explains how to engage with the dev community and discuss changes&lt;br /&gt;
*[[Development:Unit tests|Unit tests]] explains how to run the unit tests, and how to write new test cases.&lt;br /&gt;
*[[Development:Profiling PHP|Profiling PHP]] how to analyse your code to find out why it is slow.&lt;br /&gt;
*[[Development:Fast portable SQL]] shows SQL techniques that are fast, efficient, and known to work on all supported DBs.&lt;br /&gt;
*[[Development:Development hints and tips]] a (developing) list of general wisdom to help with your Moodle projects.&lt;br /&gt;
&lt;br /&gt;
==Documentation for core components==&lt;br /&gt;
&lt;br /&gt;
This section is for documentation of specific components of the existing core Moodle code. Discussion of components that are under discussion or in development can be found in the [[Development:Developer notes|developer notes]] or on the [[Roadmap|roadmap]].&lt;br /&gt;
&lt;br /&gt;
The documents below give a general overview. For detailed function-by-function documentation, see the [http://phpdocs.moodle.org/ phpDocumentor] documentation that is automatically generated from the comments in the code. &lt;br /&gt;
&lt;br /&gt;
And don&#039;t forget that the most up-to-date and detailed description of how the code works is the code itself, and you can [http://xref.moodle.org/nav.html?index.html browse the code online] using [[Development:PHPXref|PHPXref]].&lt;br /&gt;
&lt;br /&gt;
===Core components ===&lt;br /&gt;
&lt;br /&gt;
*[[Development:XMLDB_Documentation|Database abstraction layer]] @ v[[1.7]]&lt;br /&gt;
*[[Development:Roles|Roles and Capabilities system]] @ v[[1.7]] for controlling who can do what&lt;br /&gt;
*[[Development:lib/formslib.php|Forms library]] @ v[[1.8]] for creating accessible and secure HTML forms that let users edit things&lt;br /&gt;
*[[Development:Using_the_file_API|File API]] @ v[[2.0]] for managing files stored by Moodle&lt;br /&gt;
*[[Development:Database schema introduction|The database schema]]&lt;br /&gt;
*[[Development:What happens when you require config.php|What happens when you require config.php]]&lt;br /&gt;
*[[Development:lib/moodlelib.php|lib/moodlelib.php]]&lt;br /&gt;
*[[Development:lib/weblib.php|lib/weblib.php]] for outputting stuff&lt;br /&gt;
&lt;br /&gt;
===Core libraries with a more specific uses===&lt;br /&gt;
&lt;br /&gt;
*[[Authentication API]]&lt;br /&gt;
*[[Cookieless Sessions]]&lt;br /&gt;
*[[Email processing]]&lt;br /&gt;
*[[Development:Environment checking|Environment checking]] before install, check the user&#039;s server to ensure Moodle will work there.&lt;br /&gt;
*[[Development:Groups|Groups system]]&lt;br /&gt;
*[[Development:Grades|Gradebook]]&lt;br /&gt;
*[[Development:Moodle Network|Moodle Network]]&lt;br /&gt;
*[[Question engine]]&lt;br /&gt;
*[[Stats package]]&lt;br /&gt;
*[[UTF-8 migration|Migration to UTF-8]] @ v[[:Category:Moodle 1.6|1.6]]&lt;br /&gt;
*[http://developer.yahoo.com/yui YUI JavaScript library] - YUI was selected as the official AJAX library for Moodle.&lt;br /&gt;
*[[Development:lib/graphlib|lib/graphlib]]&lt;br /&gt;
*[[Development:Admin settings|Admin settings]]&lt;br /&gt;
&lt;br /&gt;
===Modules included in the standard distribution===&lt;br /&gt;
&lt;br /&gt;
*[[Development:Lesson Specification|Lesson Specification]]&lt;br /&gt;
*[[Quiz developer docs|Quiz module]]&lt;br /&gt;
*[[SCORM schema|SCORM module 1.5 schema]]&lt;br /&gt;
&lt;br /&gt;
==How you can contribute==&lt;br /&gt;
&lt;br /&gt;
===Make a new plugin===&lt;br /&gt;
&lt;br /&gt;
The M in Moodle stands for modular, and the easiest, most maintainable way to add new functionality to Moodle is by using one of the many plugin APIs. There are many types of plugin you can write:&lt;br /&gt;
*[[Development:Modules|Activity modules]], see also [[Development:NEWMODULE Documentation]] (work in progress)&lt;br /&gt;
**and [[Development:Subplugins|Sub-Plugins]] (2.0 Onwards)&lt;br /&gt;
*[[Development:Admin reports|Admin reports]]&lt;br /&gt;
*[[Development:Assignment types|Assignment types]]&lt;br /&gt;
*[[Development:Authentication plugins|Authentication plugins]]&lt;br /&gt;
*[[Development:Blocks|Blocks]]&lt;br /&gt;
*Content editors (2.0 onwards)&lt;br /&gt;
*[[Course formats]]&lt;br /&gt;
*[[Development:Course Report Plugins|Course reports]]&lt;br /&gt;
*Course importers (2.0 onwards)&lt;br /&gt;
*[[Development:Database fields|Database fields]]&lt;br /&gt;
*[[Development:Database presets|Database presets]]&lt;br /&gt;
*[[Development:Enrolment plugins|Enrolment plugins]]&lt;br /&gt;
*[[Development:Filters|Filters]]&lt;br /&gt;
*[[Development:Gradebook_Report_Tutorial|Gradebook report]]&lt;br /&gt;
*[[Development:Gradebook export|Gradebook export]]&lt;br /&gt;
*[[Development:Gradebook import|Gradebook import]]&lt;br /&gt;
*Message senders (2.0 onwards)&lt;br /&gt;
*Mnet services&lt;br /&gt;
*Plagiarism detection plugins (2.0 onwards)&lt;br /&gt;
*[[Development:Writing_a_Portfolio_Plugin|Portfolio plugins]] (2.0 onwards)&lt;br /&gt;
*[[Development:Question_type_plugin_how_to|Question types]]&lt;br /&gt;
*[[Development:Question import/export formats|Question import/export formats]]&lt;br /&gt;
*[[Development:How to write a quiz report plugin|Quiz reports]]&lt;br /&gt;
*[[Development:Repository plugins|Repository plugins]] (2.0 onwards)&lt;br /&gt;
*[[Development:Resource types|Resource types]]&lt;br /&gt;
*[[Development:Search engine adapters|Search engine adapters]]&lt;br /&gt;
*Themes which are different in [[Development:Themes_2.0|Moodle 2.0]], and [[Theme_basics|earlier versions]].&lt;br /&gt;
*User profile fields&lt;br /&gt;
*[[Development:Web services (2.0 onwards)|Web services (2.0 onwards)]]&lt;br /&gt;
*Workshop allocators (2.0 onwards)&lt;br /&gt;
*Workshop forms (2.0 onwards)&lt;br /&gt;
*Workshop evaluators (2.0 onwards)&lt;br /&gt;
&lt;br /&gt;
General information that applies to all types of plugins&lt;br /&gt;
*[[Development:Places to search for lang strings|Where to put language strings for your plugin]]&lt;br /&gt;
*[[Development:Installing and upgrading plugin database tables|Defining the database tables for your plugin]]&lt;br /&gt;
&lt;br /&gt;
Please see the [[Development:Guidelines for contributed code|Guidelines for contributed code]] for an overview of how to contribute to the Moodle code.&lt;br /&gt;
&lt;br /&gt;
Sometimes it is not possible to write a proper plugin for what you want to do, in which case you may have to resort to using the [[Development:Local_customisation|local customisations]] hook.&lt;br /&gt;
&lt;br /&gt;
===Change core code===&lt;br /&gt;
&lt;br /&gt;
Some types of change can only be made by editing the core Moodle code. Such changes are much harder to maintain than plugins. If you want your core change to be considered for inclusion in the official Moodle release, you need to create an issue in the [[Tracker|tracker]], and attach your change as a [[Development:How_to_create_a_patch|patch]]. It is also a good idea to discuss your ideas in the forums first.  See [[Development:Overview#Major_Development]] for more details.&lt;br /&gt;
&lt;br /&gt;
===Ways to contribute that do not involve PHP programming===&lt;br /&gt;
&lt;br /&gt;
*[[Themes|Create Moodle themes]]&lt;br /&gt;
*[[Translation|Translate Moodle into other languages]]&lt;br /&gt;
*[[MoodleDocs:Guidelines for contributors|Help document Moodle]]&lt;br /&gt;
*[[Development:Tests|Join the testing effort]], which involves [[Tracker|participating in the bug tracker]]&lt;br /&gt;
&lt;br /&gt;
==Plans for the future==&lt;br /&gt;
&lt;br /&gt;
Ideas for and details of planned future features of Moodle are initially discussed on the forums in the [http://moodle.org/course/view.php?id=5 Using Moodle] course at moodle.org. That developer discussions are intermixed with user discussions in the same forums may seem strange at first but is one of the reasons for the success of Moodle. It is important that both end-users and developers discuss the future features together.&lt;br /&gt;
&lt;br /&gt;
Once ideas begin to crystallize on the forums they can be summarized in this wiki, either as part of the [[Roadmap|roadmap]] or in the form of [[Development:Developer notes|developer notes]]. These pages then form the basis for further discussion in the forums.&lt;br /&gt;
&lt;br /&gt;
*[[Roadmap]]&lt;br /&gt;
*[[Development:Developer notes|Developer notes]]&lt;br /&gt;
*[[Student projects]]&lt;br /&gt;
*[[Developer meetings]]&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
&lt;br /&gt;
*[[Developer FAQ]] - frequently asked questions, especially useful for newcomers to Moodle&lt;br /&gt;
*[[Development:Finding_your_way_into_the_Moodle_code|Finding your way into the Moodle code]] - also aimed at newcomers&lt;br /&gt;
*[http://tracker.moodle.org/ Moodle tracker] - bug reports, feature requests and other tracked issues&lt;br /&gt;
**[[Firefox tracker search]] - How to setup a firefox quicksearch to easily navigate to moodle bugs&lt;br /&gt;
**[[Firefox tracker search#Firefox Search Plugins|Firefox Search Plugins]] - Find tracked issues even more easily&lt;br /&gt;
*[[Unmerged files]] - changes on the stable branch in CVS that have not been merged to [[HEAD]]&lt;br /&gt;
*Browse the code online:&lt;br /&gt;
**[http://cvs.moodle.org/moodle/ the code with a complete change history from CVS]&lt;br /&gt;
**[http://xref.moodle.org/index.html the code, with links generated by PHPXref]&lt;br /&gt;
*[http://phpdocs.moodle.org/ Moodle PHP doc reference] - compiled nightly from the comment attached to each class and function in the code.  &lt;br /&gt;
*[[Development:Database Schema|Database Schema]] - for recent releases&lt;br /&gt;
*[http://moodle.org/course/view.php?id=5#4 Development news and discussion] section of Using Moodle course&lt;br /&gt;
**especially the [http://moodle.org/mod/forum/view.php?id=55 General developer forum]&lt;br /&gt;
**[[Filters used on the Moodle.org forums|cool tricks you can use in the moodle.org forums]]&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
Some tools people use when working on Moodle code:&lt;br /&gt;
&lt;br /&gt;
=== IDEs ===&lt;br /&gt;
&lt;br /&gt;
* [[Development:Setting_up_Netbeans|Setting up NetBeans for Moodle development]] - NetBeans for PHP is a great out-of-the-box editor.&lt;br /&gt;
* [[Development:Setting_up_Eclipse|Setting up Eclipse for Moodle development]] - Eclipse is a great editor to use for php development, if you can work out how to set it up.&lt;br /&gt;
* [[Development:vim|Setting up Vim for Moodle development]]&lt;br /&gt;
* [http://www.aptana.com/ Aptana Studio 2]&lt;br /&gt;
&lt;br /&gt;
=== Browser add-ons ===&lt;br /&gt;
*[http://getfirebug.com Firebug], see [[Firebug]] for details.&lt;br /&gt;
* [[Web developer extension]]&lt;br /&gt;
* [https://addons.mozilla.org/en-US/firefox/addon/394 ViewSourceWith] - The main goal is to view page source with external applications, but you can do a lot of other things as well.&lt;br /&gt;
&lt;br /&gt;
=== Miscellaneous === &lt;br /&gt;
*[[Development:ctags|Ctags]] - Using a tags file to navigate code&lt;br /&gt;
*[[W3C_validation|W3C HTML validator]] - Moodle has built in support to make using it easier.&lt;br /&gt;
*[[Development:Windows Installer|Windows Installer]] - Windows Installer documentation for developer.&lt;br /&gt;
&lt;br /&gt;
See also: [http://dev.moodle.org/mod/forum/view.php?id=18 Useful Development Tools forum]in the [http://dev.moodle.org/course/view.php?id=2 Introduction to Moodle Programming course]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*[http://moodle.org/security/ Moodle Security Announcements]&lt;br /&gt;
*[http://moodle.com/partners/ Moodle Partners] - providers of custom Moodle development services&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
[[Category:Developer tools]]&lt;br /&gt;
&lt;br /&gt;
[[ru:Development:Краткий обзор]]&lt;br /&gt;
[[es:Documentación para Desarrolladores]]&lt;br /&gt;
[[fr:Documentation développeur]]&lt;br /&gt;
[[pt:Desenvolvimento:Documentação para programadores]]&lt;br /&gt;
[[zh:开发者文档]]&lt;br /&gt;
[[ja:開発者ドキュメント]]&lt;br /&gt;
[[fi:Ohjelmoijan opas]]&lt;/div&gt;</summary>
		<author><name>TimHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Administrator_documentation&amp;diff=83041</id>
		<title>Administrator documentation</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Administrator_documentation&amp;diff=83041"/>
		<updated>2011-04-26T21:32:37Z</updated>

		<summary type="html">&lt;p&gt;TimHunt: Reverted edits by Speakinginenglish (talk) to last revision by Tsala&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The purpose of this page is to list useful links by general topics for administrators of a Moodle site.&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Installation &amp;amp; Upgrading ==&lt;br /&gt;
&lt;br /&gt;
*[[Installation Quickstart]] for an overview of the installation steps&lt;br /&gt;
*[[Installing Moodle]] for detailed installation instructions&lt;br /&gt;
*[[Installation FAQ]]&lt;br /&gt;
*[[Installing AMP|Options for installing Apache, MySQL and PHP]]&lt;br /&gt;
*[[Upgrading|Upgrading Moodle]]&lt;br /&gt;
*[[Installing contributed modules or plugins]]&lt;br /&gt;
&lt;br /&gt;
== System-specific Instructions &amp;amp; Packages ==&lt;br /&gt;
&lt;br /&gt;
===Unix/Linux-based===&lt;br /&gt;
* [[SUSE Linux Server 10|Automated Installation Guide for SUSE Linux Enterprise Server 10]] operating system&lt;br /&gt;
* [[RedHat Linux installation|Step-by-step Installation Guide for RedHat]] operating system&lt;br /&gt;
* [[Debian GNU/Linux installation|Step-by-step Installation Guide for Debian GNU/Linux]] operating system&lt;br /&gt;
* [[Step-by-step Installation Guide for Ubuntu]]&lt;br /&gt;
* [[Manual installation of Moodle 2.0 on Mythbuntu using Git]]&lt;br /&gt;
* [[Manual_installation_on_Ubuntu|Manual Installation on Ubuntu]]&lt;br /&gt;
* [[Step-by-step Install Guide for Zenwalk-5.0|Step-by-step Installation Guide for Zenwalk-5.0]]&lt;br /&gt;
* [[OLPC XS installation|Step-by-step Installation Guide for the One Laptop per Child XS Server (Beta)]]&lt;br /&gt;
* [[Step-by-step Install Guide for Solaris 10 with Oracle 10|Step-by-step Installation Guide for Solaris 10 with Oracle 10]]&lt;br /&gt;
* [[Installation Guide for Installing on Amazon EC2]]&lt;br /&gt;
&lt;br /&gt;
===Windows===&lt;br /&gt;
* [[Windows installation|Windows installations with instructions for Windows NT/2000/2003 servers]]&lt;br /&gt;
* [[Windows installation using XAMPP|Windows installation using XAMPP: Apache, MySQL and PHP]]&lt;br /&gt;
* [[Development:Windows_Installer_anywhere|MoodleAnywhere]] another Windows installation package&lt;br /&gt;
* [[Installing Moodle on Windows Vista]] - how to&lt;br /&gt;
* [http://www.bfcnetworks.com/whitepapers/installing-moodle-on-windows-server-iis-sql/ Installing Moodle on Windows Server 2008 x86]&lt;br /&gt;
* [http://www.bfcnetworks.com/whitepapers/installing-moodle-on-windows-server-2008-r2-x64-sql-iis/ Installing Moodle on Windows Server 2008 R2]&lt;br /&gt;
* [http://www.bfcnetworks.com/whitepapers/implementing-moodle-on-a-windows-high-availability-environment// Implementing Moodle on a Windows High Availability Environment] Implementing Moodle 1.9 on 2 Microsoft Load Balanced Web Front End Server and a Microsoft SQL Server 2008 R2 Cluster environment&lt;br /&gt;
&lt;br /&gt;
Moodle 2&lt;br /&gt;
* [http://www.bfcnetworks.com/whitepapers/installing-moodle-2-on-windows-server-mysql-php-and-iis7/ Installing Moodle 2 on Windows Server, MySQL, PHP and IIS7]&lt;br /&gt;
* [http://www.bfcnetworks.com/whitepapers/installing-moodle-2-on-windows-server-2008-r2-x64-sql-iis/ Installing Moodle 2 on Windows Server, Microsoft SQL Server, PHP and IIS7]&lt;br /&gt;
&lt;br /&gt;
===Mac===&lt;br /&gt;
* [[Step by Step Installation on a Mac OS X Server|Step by step Installation on a Mac OS X Server 10.5/10.6]]&lt;br /&gt;
* [[Complete Install Packages for Mac OS X | Complete Install Packages for Mac OS X Clients 10.4/10.5/10.6]]&lt;br /&gt;
* [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client|Step by Step Installation on a Mac OS X 10.4 Client using the internal web server]]&lt;br /&gt;
&lt;br /&gt;
===Web Hosts===&lt;br /&gt;
* [[1and1_MySQL_installation | Installation on &#039;&#039;&#039;1and1&#039;&#039;&#039; web hosting]]&lt;br /&gt;
* [[powweb_MySQL_installation | Step-by-step Installation on &#039;&#039;&#039;Powweb&#039;&#039;&#039; web hosting]]&lt;br /&gt;
* [[Step-by-step Installation using the old version of CPanel]]&lt;br /&gt;
* [[Step-by-step Installation using the new version of CPanel]]&lt;br /&gt;
&lt;br /&gt;
===Appliances===&lt;br /&gt;
Some users may prefer to skip manual installation by using a pre-integrated [[Moodle appliance]].&lt;br /&gt;
&lt;br /&gt;
===Database===&lt;br /&gt;
* [[Installing Oracle for PHP]]&lt;br /&gt;
* [[Installing MSSQL for PHP]]&lt;br /&gt;
* [[Installing Postgres for PHP]]&lt;br /&gt;
&lt;br /&gt;
===Plugins===&lt;br /&gt;
* [[Installing contributed modules or plugins]]&lt;br /&gt;
&lt;br /&gt;
==Security, Performance and Roles==&lt;br /&gt;
&lt;br /&gt;
*[[Security]] contains important security procedures for a production site&lt;br /&gt;
*[[Performance]] for ideas on improving the speed of your installation&lt;br /&gt;
*[[Manage roles]] For Moodle 1.7 and later.&lt;br /&gt;
*[[Reducing spam in Moodle]]&lt;br /&gt;
*[[suhosin]] is an advanced protection system for PHP installation. It was designed to protect servers and users from known and unknown flaws in PHP applications and the PHP core.&lt;br /&gt;
*[[nagios]] Open source software to monitor servers&lt;br /&gt;
&lt;br /&gt;
== FAQs ==&lt;br /&gt;
&lt;br /&gt;
*[[Installation FAQ]]&lt;br /&gt;
*[[Beginning Administration FAQ]]&lt;br /&gt;
*[[Administration FAQ]]&lt;br /&gt;
*[[Performance FAQ]]&lt;br /&gt;
*[[Backup and restore FAQ]]&lt;br /&gt;
*[[Errors FAQ]]&lt;br /&gt;
*[[:Category:FAQ|List of FAQs]]&lt;br /&gt;
&lt;br /&gt;
== Configuration Settings ==&lt;br /&gt;
=== Site administration setting===&lt;br /&gt;
[[Site administration block]] contains most site configuration settings including:&lt;br /&gt;
*[[Front Page settings]]- initial or home page of a Moodle site&lt;br /&gt;
*[[Themes]] - user interface packages of XHTML and CSS controls&lt;br /&gt;
*[[Language]] - default and additional language packs&lt;br /&gt;
*[[Activity modules administration]]&lt;br /&gt;
*[[Blocks administration]]&lt;br /&gt;
*[[Filters]] - Text and Multimedea plugins &lt;br /&gt;
*[[Backup settings]]&lt;br /&gt;
*[[HTML editor settings]]&lt;br /&gt;
*[[Calendar settings]]&lt;br /&gt;
*[[Maintenance mode]]&lt;br /&gt;
*[[Notification page]] used to update versions&lt;br /&gt;
*[[Settings block]] Moodle 2.0 site settings location&lt;br /&gt;
&lt;br /&gt;
===Other settings===&lt;br /&gt;
*[[Course settings]] for course home page configuration&lt;br /&gt;
**Each type of [[Activities|activity]], [[resource]] and [[:Category:Block|block]] has their own settings&lt;br /&gt;
*Older versions settings&lt;br /&gt;
**[[Site settings]] pre 1.7&lt;br /&gt;
**[[Variables]] pre 1.6 &lt;br /&gt;
**[[Location of admin settings in 1.7|Comparison between configuration settings in Moodle 1.6 &amp;amp; 1.7]]&lt;br /&gt;
&lt;br /&gt;
==User Management==&lt;br /&gt;
&lt;br /&gt;
*[[Authentication]] of user on a site&lt;br /&gt;
*[[Add new user|Add a new user]] - on a site&lt;br /&gt;
*[[Upload users]] - from a file to a site, and into existing course and group, some existing user global updates&lt;br /&gt;
*[[User_profile_fields]]&lt;br /&gt;
*[[Enrolment plugins]]&lt;br /&gt;
**[[Flat file]] - enrol existing users in a course&lt;br /&gt;
*[[Roles and capabilities|Assigning user a role]] - typical assignments include:&lt;br /&gt;
**[[Students|Enrol students in a course]]&lt;br /&gt;
**[[Unenrolment]] Student&lt;br /&gt;
**[[Courses (administrator)|Assign teachers]] - to a course&lt;br /&gt;
**[[Assign creators|Assign course creators]] - in a site&lt;br /&gt;
**[[Assign administrators]] - in a site&lt;br /&gt;
&lt;br /&gt;
==Other==&lt;br /&gt;
&lt;br /&gt;
*[[Courses (administrator)|Courses]] and [[Course formats|course formats]]&lt;br /&gt;
*[[Reports (administrator)]] and [[Logs]]&lt;br /&gt;
*[[Site files]]&lt;br /&gt;
*[[Moodle database|Moodle site database]] &lt;br /&gt;
*[[Environment]]&lt;br /&gt;
*[[MNet|Moodle Network]] and Moodle [[Community hub]]&lt;br /&gt;
*[[Streaming Media]]&lt;br /&gt;
*[[Case studies (administrator)]]&lt;br /&gt;
*[[Anti-virus]]&lt;br /&gt;
*[[System Monitoring and Server Statistic Software]]&lt;br /&gt;
*[[Integrate Moodle, LDAP and SIMS.net]]&lt;br /&gt;
*[[How to rebuild context paths]]&lt;br /&gt;
*[[Hacking the Moodle 2.0 database transfer script to convert a Moodle 1.9 site]]&lt;br /&gt;
*[[Category:ProxyProblems]]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*[[:Category:Administrator | Index of all Administrator-related pages]]&lt;br /&gt;
*[[Integrations]]&lt;br /&gt;
*[[CVS for Administrators]]&lt;br /&gt;
*[[Email processing]]&lt;br /&gt;
*[[Search engine optimization]]&lt;br /&gt;
*[[Messaging]]&lt;br /&gt;
*[[Migration]]&lt;br /&gt;
*[[Metacourses]]&lt;br /&gt;
*[[Block layout]]&lt;br /&gt;
*[[Customizing Moodle]]&lt;br /&gt;
*[[Administrator do&#039;s and don&#039;ts]]&lt;br /&gt;
*[[Using Moodle book]] Chapter 16: Moodle Administration&lt;br /&gt;
*[[Administration hacks]]&lt;br /&gt;
*[[Git]] Version control, upgrading &lt;br /&gt;
&lt;br /&gt;
[[Category: Administrator]]&lt;br /&gt;
[[cs:Rukověť správce]]&lt;br /&gt;
[[es:Documentación para Administradores]]&lt;br /&gt;
[[eu:Kudeatzaileentzako dokumentazioa]]&lt;br /&gt;
[[fr:Documentation administrateur]]&lt;br /&gt;
[[ja:管理者ドキュメント]]&lt;br /&gt;
[[ko:관리자 문서]]&lt;br /&gt;
[[nl:Documentatie voor beheerders]]&lt;br /&gt;
[[pt:Documentação para administradores]]&lt;br /&gt;
[[ru:Администраторам]]&lt;br /&gt;
[[sk:Dokumentácia pre správcov]]&lt;br /&gt;
[[zh:管理员文档]]&lt;br /&gt;
[[pl:Administrator documentation]]&lt;br /&gt;
[[fi:Ylläpitäjän opas]]&lt;br /&gt;
[[de:Dokumentation für Administratoren]]&lt;/div&gt;</summary>
		<author><name>TimHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Moodle_in_education&amp;diff=83040</id>
		<title>Moodle in education</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Moodle_in_education&amp;diff=83040"/>
		<updated>2011-04-26T21:32:31Z</updated>

		<summary type="html">&lt;p&gt;TimHunt: Reverted edits by Speakinginenglish (talk) to last revision by Tsala&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Teacher documentation}}&lt;br /&gt;
Welcome!  The purpose of this page is to provide educators with a brief overview of teaching and learning with Moodle and useful links by general topics.&lt;br /&gt;
&lt;br /&gt;
==Moodle principles==  &lt;br /&gt;
&lt;br /&gt;
The design and development of Moodle has been guided by a [https://docs.moodle.org/en/Philosophy social constructionist] theory and practice of teaching and learning. While Moodle can be and is used to support a number of other pedagogical and andragogical approaches, the core Moodle package will continue to be built with these [[five key principles]] in mind.&lt;br /&gt;
&lt;br /&gt;
*[[Pedagogy|Moodle Pedagogy]]&lt;br /&gt;
&lt;br /&gt;
==Moodle in education and training==&lt;br /&gt;
&lt;br /&gt;
Although initially designed for higher education environment (university), Moodle has quickly become used across a broad range of organisations worldwide to conduct courses fully online or support face-to-face teaching and learning. &lt;br /&gt;
&lt;br /&gt;
Its modularity, flexibility, security and free availability have attracted learning communities ranging from single primary school classrooms to large universities, businesses, government departments and other places where people learn. &lt;br /&gt;
&lt;br /&gt;
* [[Primary education]] - Common uses of Moodle in primary education settings.&lt;br /&gt;
&lt;br /&gt;
* [[Secondary education]] - Common uses of Moodle in secondary education settings.&lt;br /&gt;
&lt;br /&gt;
* [[Tertiary education]] - Common uses of Moodle in tertiary education settings.&lt;br /&gt;
&lt;br /&gt;
* [[Adult education and training]] - Common uses of Moodle in adult education and business/government training.&lt;br /&gt;
&lt;br /&gt;
==Versions of Moodle== &lt;br /&gt;
[[Moodle_version_history|Since 2002]], Moodle has undergone many changes and updated versions. Currently, the most widely used stable version of Moodle is 1.9.x&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Moodle 2.0&#039;&#039;&#039; is a major new stable version released in November 2010. It contains a [[Moodle_2.0_release_notes|many improvements and new features]]. Users will be able import and export content in and out Moodle easier, [[Course completion|scaffold courses]] and [[Activity completion|activities]] by using conditions for entry, improved evaluations with re-designed Quiz and Workshop activities, search, enrol in and share courses via [[Community hub]], enter comments in a range of places, navigate easier, integrate better with other systems, mobile devices, customise their [[My Moodle|personal home page]] and more. Check this [http://www.youtube.com/view_play_list?p=5F39867B1037BA89 playlist of short clips] for the new and redesigned features in Moodle 2.0.&lt;br /&gt;
&lt;br /&gt;
==Starting with Moodle==&lt;br /&gt;
&lt;br /&gt;
Countless anecdotes from Moodle users suggest that the best way to learn Moodle is by simply trying and using it in ways you find it creative and useful - like a [http://www.slideshare.net/moodlefan/what-is-moodle-explained-with-lego-presentation box of Lego].   &lt;br /&gt;
&lt;br /&gt;
* [[Getting started for teachers|Getting started for teachers]] - general overview of technical features of a course with links to expand your knowledge of the how to make different features work, currently for Moodle 1.x.&lt;br /&gt;
* [http://moodle.org/course/view.php?id=17223  moodle.org/educators] – a course with explanations, FAQ, examples of use, useful links, tips, strategies and resources to help educators make the most of Moodle&lt;br /&gt;
* [[Mt Orange School Demo]] -  A demo site in Moodle 2.0, fully populated with accounts and examples to see and play with. Great way to explore the features of Moodle and many ways they could be used in places where people teach and learn. Site link - [http://school.demo.moodle.net  Mt Orange School Demo]&lt;br /&gt;
* [[Teaching with Moodle]] - a wiki on common approaches, strategies (needs updating).&lt;br /&gt;
* [http://download.moodle.org Download Moodle] – Choose from the official Moodle packages to install on your own server.&lt;br /&gt;
&lt;br /&gt;
==Moodle community==&lt;br /&gt;
&lt;br /&gt;
Moodle has been made and improved with participation, mutual help from software developers, educators, translators and many others worldwide. There are many ways to participate in Moodle community, regardless of your background and interest.&lt;br /&gt;
&lt;br /&gt;
* [http://moodle.org Moodle.org] - The multilingual &#039;&#039;alma mater&#039;&#039; of moodlers worldwide! Forums, documents, users, activities, demos, history, Particularly Helpful Moodlers and more. You can see and contribute to the good will and effort of thousands over the years.&lt;br /&gt;
* [https://docs.moodle.org Moodle Docs] - A wikipedia-style documentation about Moodle that we all write. This document is part of Moodle Docs and anyone can contribute, easily.&lt;br /&gt;
* [http://moodle.com/partners/ Moodle Partners] – Optional commercial services for Moodle users, including fully-serviced Moodle hosting, remote support contracts, custom code development and consulting. &lt;br /&gt;
* [http://tracker.moodle.org/ Moodle Tracker] – Community database for recording and managing bugs, improvements and feature requests for Moodle. &lt;br /&gt;
* [http://moodle.org/course/view.php?id=33 MoodleMoots] - List of famously named gatherings of Moodle users, developers and enthusiasts around the world! Other events included.&lt;br /&gt;
* [http://moodle.org/mod/page/view.php?id=7750 Moodle on social networks] – Connect with fellow moodlers.&lt;br /&gt;
* [http://moodle.org/mod/page/view.php?id=7748 Getting help] – There are many ways in which you can ask for and get help.&lt;br /&gt;
* [[Teaching FAQ]] - Commonly asked questions about Moodle and its use&lt;br /&gt;
&lt;br /&gt;
==Reference==&lt;br /&gt;
*[[:Category:Teacher]] - List of links to &amp;quot;Teacher&amp;quot; related pages.&lt;br /&gt;
*[[Moodle manuals]] - List of links to manuals in different languages. &lt;br /&gt;
*[http://moodle.org/mod/data/view.php?id=7246 Moodle Books] - List of Moodle books in different languages.&lt;br /&gt;
*[http://moodle.org/mod/page/view.php?id=7745 Tutorials] - Links to manuals and popular video tutorials &lt;br /&gt;
*[[Using Moodle book]] - A real book you can reprint!&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=150830 Moodle Tool Guide for Teachers] - Great printable poster of Moodle tools and their suitability for different learning tasks.&lt;br /&gt;
*[https://docs.moodle.org/en/Moodle_Teacher_Certificate Course Creator Certificate] - Get certified by demonstrating your skills in using Moodle as a teacher.&lt;br /&gt;
&lt;br /&gt;
==Useful links==&lt;br /&gt;
*[http://moodle.org/mod/page/view.php?id=7743 Teaching Do and Donts] - A poster with explanatory links.&lt;br /&gt;
*[[Student documentation examples]] - Useful documents for students, multi-language.&lt;br /&gt;
*[[Student FAQ]] - Questions that students may have about Moodle.&lt;br /&gt;
*[[Trainer]] - Useful links for Trainers&lt;br /&gt;
*Non Internet Moodles - Information for small installations and sandboxes&lt;br /&gt;
:[[Complete install packages]] - for installing Moodle on a small server or a standalone computer&lt;br /&gt;
:[[Installation guide - Moodle for Windows on a USB Memory Stick]]&lt;br /&gt;
:[[Development:Windows_Installer_anywhere]] &lt;br /&gt;
&lt;br /&gt;
[[Category:Teacher]]&lt;br /&gt;
[[cs:Rukověť učitele]]&lt;br /&gt;
[[de:Dokumentation für Trainer]]&lt;br /&gt;
[[es:Documentación para Profesores]]&lt;br /&gt;
[[eu:Irakasleentzako dokumentazioa]]&lt;br /&gt;
[[fi:Opettajan opas]]&lt;br /&gt;
[[fr:Documentation enseignant]]&lt;br /&gt;
[[it:Documentazione per Docenti]]&lt;br /&gt;
[[ja:教師ドキュメント]]&lt;br /&gt;
[[nl:Documentatie voor leraren]]&lt;br /&gt;
[[ru:Учителям]]&lt;br /&gt;
[[zh:教师文档]]&lt;/div&gt;</summary>
		<author><name>TimHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Development:Future_question_bank/sharing/versioning_requirements&amp;diff=82935</id>
		<title>Development:Future question bank/sharing/versioning requirements</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Development:Future_question_bank/sharing/versioning_requirements&amp;diff=82935"/>
		<updated>2011-04-23T11:14:03Z</updated>

		<summary type="html">&lt;p&gt;TimHunt: /* Question-bank interface requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In my [[Development:Goals_of_an_online_assessment_system#A_roadmap_for_computer-marked_assessment_in_Moodle|overview roadmap of things that needed to be improved in related to Moodle&#039;s question code]], one item was that we needed to improve the sharing model in Moodle&#039;s question bank, and introduce question versioning.&lt;br /&gt;
&lt;br /&gt;
These are significant changes that will need to be carefully thought out. We have to make possible all the different types of sharing that people want, without making the question bank any more complicated. In fact, there is ample evidence in the quiz forum that the sharing in the question bank in Moodle 1.9 is already too complicated for most people to understand fully.&lt;br /&gt;
&lt;br /&gt;
But, before we can design a solution, we need to make sure we know what the problem is.&lt;br /&gt;
* Please list any related requirements you have on this page.&lt;br /&gt;
* Please try to express your requirements from the user&#039;s point of view, not a developer&#039;s point of view.&lt;br /&gt;
* Describe thing that the are currently possible, that we must keep,&lt;br /&gt;
* and also things that are not currently possible, but which should be.&lt;br /&gt;
&lt;br /&gt;
==Question organisation requirements==&lt;br /&gt;
&lt;br /&gt;
===Questions in hierarchical cateogies===&lt;br /&gt;
&lt;br /&gt;
(existing feature).&lt;br /&gt;
&lt;br /&gt;
===Question tagging===&lt;br /&gt;
&lt;br /&gt;
(existing feature, since 2.0).&lt;br /&gt;
&lt;br /&gt;
===Thread of comments for each question===&lt;br /&gt;
&lt;br /&gt;
Helps teachers collaborate about the question. In some activities, perhaps students could be allowed to comment too.&lt;br /&gt;
&lt;br /&gt;
(What about ratings?)&lt;br /&gt;
&lt;br /&gt;
===Clear which question a particular quiz uses===&lt;br /&gt;
&lt;br /&gt;
(Otherwise, as a present, backup and restore is a nightmare.) Would also apply to any other activity that used questions (e.g. Lesson, Self-test.)&lt;br /&gt;
&lt;br /&gt;
===Shared question banks===&lt;br /&gt;
&lt;br /&gt;
It is probably enough just to have question banks at course level. The admin can always make a separate &amp;quot;Physics questions&amp;quot; course, and enrol the people who should have access as teachers there.&lt;br /&gt;
&lt;br /&gt;
===Question bank for each user===&lt;br /&gt;
&lt;br /&gt;
Where they can build up a private collection of questions.&lt;br /&gt;
&lt;br /&gt;
===Question versioning===&lt;br /&gt;
&lt;br /&gt;
Gives undo. Also makes sharing safer. The kind of model I am thinking of is similar to a wikipedia page (or Moodle Docs page!)&lt;br /&gt;
&lt;br /&gt;
Except that once a question is shared in different places, this can lead to branching, and a desire to merge. So, I am also looking enviously at some of the git features, but I don&#039;t want to over-complicate things.&lt;br /&gt;
&lt;br /&gt;
===License information attached to each question===&lt;br /&gt;
&lt;br /&gt;
Like when you upload a file. Helps with sharing.&lt;br /&gt;
&lt;br /&gt;
===Import/export scriptable by web services===&lt;br /&gt;
&lt;br /&gt;
This would let a remote question editing tool&lt;br /&gt;
# retrieve a question directly from Moodle&#039;s question,&lt;br /&gt;
# present it to the user to be edited, and then&lt;br /&gt;
# when the user saves, the edited question is written directly back into the Moodle question bank.&lt;br /&gt;
&lt;br /&gt;
===Import/export to update existing questions, not just add new ones===&lt;br /&gt;
&lt;br /&gt;
This enables the following workflow:&lt;br /&gt;
# Export all the questions in a category to Moodle XML.&lt;br /&gt;
# Load in your text editor, and to a search-and-replace to fix some problem that affects a lot of the questions.&lt;br /&gt;
# Re-import to replace the existing questions.&lt;br /&gt;
&lt;br /&gt;
===Integration with community hubs===&lt;br /&gt;
&lt;br /&gt;
A way to push and pull question banks to and from community hubs.&lt;br /&gt;
&lt;br /&gt;
===Please add more...===&lt;br /&gt;
&lt;br /&gt;
==Question-bank interface requirements==&lt;br /&gt;
&lt;br /&gt;
===Question bank should be made up of separate plugins===&lt;br /&gt;
&lt;br /&gt;
The existing code should be split into plugins:&lt;br /&gt;
* Question bank view&lt;br /&gt;
* Manage categories&lt;br /&gt;
* Import&lt;br /&gt;
* Export&lt;br /&gt;
* Preview question&lt;br /&gt;
* Edit question&lt;br /&gt;
&lt;br /&gt;
If these are plugins, then it other people can add new custom features easily. Some ideas would be:&lt;br /&gt;
* Joseph Rezeau&#039;s create questions from Glossary block&lt;br /&gt;
* Edit question by editing the GIFT source&lt;br /&gt;
* Views of question statistics in all the places they are used (not just one quiz)&lt;br /&gt;
&lt;br /&gt;
===Easy but powerful searching===&lt;br /&gt;
&lt;br /&gt;
===Customisable views?===&lt;br /&gt;
&lt;br /&gt;
Users can choose which columns they want to see.&lt;br /&gt;
&lt;br /&gt;
===Easy organisation===&lt;br /&gt;
&lt;br /&gt;
* Ways to reorganise the categories, move questions between them, etc.&lt;br /&gt;
* Ways to tag questions easily.&lt;br /&gt;
&lt;br /&gt;
===Please add more...===&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [[Development:Goals_of_an_online_assessment_system]]&lt;/div&gt;</summary>
		<author><name>TimHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Development:Developer_documentation&amp;diff=82921</id>
		<title>Development:Developer documentation</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Development:Developer_documentation&amp;diff=82921"/>
		<updated>2011-04-21T20:53:26Z</updated>

		<summary type="html">&lt;p&gt;TimHunt: Reverted edits by Ms thum (talk) to last revision by Marxjohnson&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[image:moodle-development-logo.jpg|right|400px]]&lt;br /&gt;
&lt;br /&gt;
This [[:Category:Developer|Developer]] section of Moodle Docs is aimed at developers who contribute to the Moodle code, plugins, themes, and so on.&lt;br /&gt;
&lt;br /&gt;
* If you manage a Moodle site, [[Administrator documentation]] may suit your needs better. &lt;br /&gt;
* If you teach using Moodle, try [[Teacher documentation]].&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&#039;&#039;&#039;Note:&#039;&#039;&#039; New developer documentation pages should be added to the &#039;&#039;Development namespace&#039;&#039; by typing &amp;lt;code&amp;gt;Development:&amp;lt;/code&amp;gt; before the new page name i.e. &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[[Development:New page name]]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;. If you are a developer, you probably want to change your [[Special:Preferences|preferences]] to include the Development namespace in searches.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A page may be added to the Developer category by adding the template &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{CategoryDeveloper}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; to the bottom of the page. - If required, you can use &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[[Category:Developer|Sort key]]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; to provide a sort key other than the default page name.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==How Moodle development works==&lt;br /&gt;
&lt;br /&gt;
The [[Development:Overview|overview of the Moodle development process]] explains how Moodle development occurs and how people become Moodle developers. Current plans are listed on the [[Roadmap]].&lt;br /&gt;
&lt;br /&gt;
You can also enrol in one of the [http://dev.moodle.org Moodle Developer Courses].&lt;br /&gt;
&lt;br /&gt;
==Guidelines==&lt;br /&gt;
&lt;br /&gt;
The following guidelines are crucial reading for anyone wanting to contribute to the Moodle code base:&lt;br /&gt;
*[[Development:Coding|Coding guidelines]] have to be followed by all Moodle developers&lt;br /&gt;
*[[Moodle architecture]] gives an overview of how the Moodle code works&lt;br /&gt;
*[[Development:Process]] explains how changes are incorporated into Moodle&lt;br /&gt;
*[[Tracker]] explains the Moodle Tracker for keeping track of bugs, issues, feature requests etc&lt;br /&gt;
*[[Development:Working with the Community|Working with the Community]] explains how to engage with the dev community and discuss changes&lt;br /&gt;
*[[Development:Unit tests|Unit tests]] explains how to run the unit tests, and how to write new test cases.&lt;br /&gt;
*[[Development:Profiling PHP|Profiling PHP]] how to analyse your code to find out why it is slow.&lt;br /&gt;
*[[Development:Fast portable SQL]] shows SQL techniques that are fast, efficient, and known to work on all supported DBs.&lt;br /&gt;
*[[Development:Development hints and tips]] a (developing) list of general wisdom to help with your Moodle projects.&lt;br /&gt;
&lt;br /&gt;
==Documentation for core components==&lt;br /&gt;
&lt;br /&gt;
This section is for documentation of specific components of the existing core Moodle code. Discussion of components that are under discussion or in development can be found in the [[Development:Developer notes|developer notes]] or on the [[Roadmap|roadmap]].&lt;br /&gt;
&lt;br /&gt;
The documents below give a general overview. For detailed function-by-function documentation, see the [http://phpdocs.moodle.org/ phpDocumentor] documentation that is automatically generated from the comments in the code. &lt;br /&gt;
&lt;br /&gt;
And don&#039;t forget that the most up-to-date and detailed description of how the code works is the code itself, and you can [http://xref.moodle.org/nav.html?index.html browse the code online] using [[Development:PHPXref|PHPXref]].&lt;br /&gt;
&lt;br /&gt;
===Core components ===&lt;br /&gt;
&lt;br /&gt;
*[[Development:XMLDB_Documentation|Database abstraction layer]] @ v[[1.7]]&lt;br /&gt;
*[[Development:Roles|Roles and Capabilities system]] @ v[[1.7]] for controlling who can do what&lt;br /&gt;
*[[Development:lib/formslib.php|Forms library]] @ v[[1.8]] for creating accessible and secure HTML forms that let users edit things&lt;br /&gt;
*[[Development:Using_the_file_API|File API]] @ v[[2.0]] for managing files stored by Moodle&lt;br /&gt;
*[[Development:Database schema introduction|The database schema]]&lt;br /&gt;
*[[Development:What happens when you require config.php|What happens when you require config.php]]&lt;br /&gt;
*[[Development:lib/moodlelib.php|lib/moodlelib.php]]&lt;br /&gt;
*[[Development:lib/weblib.php|lib/weblib.php]] for outputting stuff&lt;br /&gt;
&lt;br /&gt;
===Core libraries with a more specific uses===&lt;br /&gt;
&lt;br /&gt;
*[[Authentication API]]&lt;br /&gt;
*[[Cookieless Sessions]]&lt;br /&gt;
*[[Email processing]]&lt;br /&gt;
*[[Development:Environment checking|Environment checking]] before install, check the user&#039;s server to ensure Moodle will work there.&lt;br /&gt;
*[[Development:Groups|Groups system]]&lt;br /&gt;
*[[Development:Grades|Gradebook]]&lt;br /&gt;
*[[Development:Moodle Network|Moodle Network]]&lt;br /&gt;
*[[Question engine]]&lt;br /&gt;
*[[Stats package]]&lt;br /&gt;
*[[UTF-8 migration|Migration to UTF-8]] @ v[[:Category:Moodle 1.6|1.6]]&lt;br /&gt;
*[http://developer.yahoo.com/yui YUI JavaScript library] - YUI was selected as the official AJAX library for Moodle.&lt;br /&gt;
*[[Development:lib/graphlib|lib/graphlib]]&lt;br /&gt;
*[[Development:Admin settings|Admin settings]]&lt;br /&gt;
&lt;br /&gt;
===Modules included in the standard distribution===&lt;br /&gt;
&lt;br /&gt;
*[[Development:Lesson Specification|Lesson Specification]]&lt;br /&gt;
*[[Quiz developer docs|Quiz module]]&lt;br /&gt;
*[[SCORM schema|SCORM module 1.5 schema]]&lt;br /&gt;
&lt;br /&gt;
==How you can contribute==&lt;br /&gt;
&lt;br /&gt;
===Make a new plugin===&lt;br /&gt;
&lt;br /&gt;
The M in Moodle stands for modular, and the easiest, most maintainable way to add new functionality to Moodle is by using one of the many plugin APIs. There are many types of plugin you can write:&lt;br /&gt;
*[[Development:Modules|Activity modules]], see also [[Development:NEWMODULE Documentation]] (work in progress)&lt;br /&gt;
**and [[Development:Subplugins|Sub-Plugins]] (2.0 Onwards)&lt;br /&gt;
*[[Development:Admin reports|Admin reports]]&lt;br /&gt;
*[[Development:Assignment types|Assignment types]]&lt;br /&gt;
*[[Development:Authentication plugins|Authentication plugins]]&lt;br /&gt;
*[[Development:Blocks|Blocks]]&lt;br /&gt;
*Content editors (2.0 onwards)&lt;br /&gt;
*[[Course formats]]&lt;br /&gt;
*[[Development:Course Report Plugins|Course reports]]&lt;br /&gt;
*Course importers (2.0 onwards)&lt;br /&gt;
*[[Development:Database fields|Database fields]]&lt;br /&gt;
*[[Development:Database presets|Database presets]]&lt;br /&gt;
*[[Development:Enrolment plugins|Enrolment plugins]]&lt;br /&gt;
*[[Development:Filters|Filters]]&lt;br /&gt;
*[[Development:Gradebook_Report_Tutorial|Gradebook report]]&lt;br /&gt;
*[[Development:Gradebook export|Gradebook export]]&lt;br /&gt;
*[[Development:Gradebook import|Gradebook import]]&lt;br /&gt;
*Message senders (2.0 onwards)&lt;br /&gt;
*Mnet services&lt;br /&gt;
*Plagiarism detection plugins (2.0 onwards)&lt;br /&gt;
*[[Development:Writing_a_Portfolio_Plugin|Portfolio plugins]] (2.0 onwards)&lt;br /&gt;
*[[Development:Question_type_plugin_how_to|Question types]]&lt;br /&gt;
*[[Development:Question import/export formats|Question import/export formats]]&lt;br /&gt;
*[[Development:How to write a quiz report plugin|Quiz reports]]&lt;br /&gt;
*[[Development:Repository plugins|Repository plugins]] (2.0 onwards)&lt;br /&gt;
*[[Development:Resource types|Resource types]]&lt;br /&gt;
*[[Development:Search engine adapters|Search engine adapters]]&lt;br /&gt;
*Themes which are different in [[Development:Themes_2.0|Moodle 2.0]], and [[Theme_basics|earlier versions]].&lt;br /&gt;
*User profile fields&lt;br /&gt;
*[[Development:Web services (2.0 onwards)|Web services (2.0 onwards)]]&lt;br /&gt;
*Workshop allocators (2.0 onwards)&lt;br /&gt;
*Workshop forms (2.0 onwards)&lt;br /&gt;
*Workshop evaluators (2.0 onwards)&lt;br /&gt;
&lt;br /&gt;
General information that applies to all types of plugins&lt;br /&gt;
*[[Development:Places to search for lang strings|Where to put language strings for your plugin]]&lt;br /&gt;
*[[Development:Installing and upgrading plugin database tables|Defining the database tables for your plugin]]&lt;br /&gt;
&lt;br /&gt;
Please see the [[Development:Guidelines for contributed code|Guidelines for contributed code]] for an overview of how to contribute to the Moodle code.&lt;br /&gt;
&lt;br /&gt;
Sometimes it is not possible to write a proper plugin for what you want to do, in which case you may have to resort to using the [[Development:Local_customisation|local customisations]] hook.&lt;br /&gt;
&lt;br /&gt;
===Change core code===&lt;br /&gt;
&lt;br /&gt;
Some types of change can only be made by editing the core Moodle code. Such changes are much harder to maintain than plugins. If you want your core change to be considered for inclusion in the official Moodle release, you need to create an issue in the [[Tracker|tracker]], and attach your change as a [[Development:How_to_create_a_patch|patch]]. It is also a good idea to discuss your ideas in the forums first.  See [[Development:Overview#Major_Development]] for more details.&lt;br /&gt;
&lt;br /&gt;
===Ways to contribute that do not involve PHP programming===&lt;br /&gt;
&lt;br /&gt;
*[[Themes|Create Moodle themes]]&lt;br /&gt;
*[[Translation|Translate Moodle into other languages]]&lt;br /&gt;
*[[MoodleDocs:Guidelines for contributors|Help document Moodle]]&lt;br /&gt;
*[[Development:Tests|Join the testing effort]], which involves [[Tracker|participating in the bug tracker]]&lt;br /&gt;
&lt;br /&gt;
==Plans for the future==&lt;br /&gt;
&lt;br /&gt;
Ideas for and details of planned future features of Moodle are initially discussed on the forums in the [http://moodle.org/course/view.php?id=5 Using Moodle] course at moodle.org. That developer discussions are intermixed with user discussions in the same forums may seem strange at first but is one of the reasons for the success of Moodle. It is important that both end-users and developers discuss the future features together.&lt;br /&gt;
&lt;br /&gt;
Once ideas begin to crystallize on the forums they can be summarized in this wiki, either as part of the [[Roadmap|roadmap]] or in the form of [[Development:Developer notes|developer notes]]. These pages then form the basis for further discussion in the forums.&lt;br /&gt;
&lt;br /&gt;
*[[Roadmap]]&lt;br /&gt;
*[[Development:Developer notes|Developer notes]]&lt;br /&gt;
*[[Student projects]]&lt;br /&gt;
*[[Developer meetings]]&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
&lt;br /&gt;
*[[Developer FAQ]] - frequently asked questions, especially useful for newcomers to Moodle&lt;br /&gt;
*[[Development:Finding_your_way_into_the_Moodle_code|Finding your way into the Moodle code]] - also aimed at newcomers&lt;br /&gt;
*[http://tracker.moodle.org/ Moodle tracker] - bug reports, feature requests and other tracked issues&lt;br /&gt;
**[[Firefox tracker search]] - How to setup a firefox quicksearch to easily navigate to moodle bugs&lt;br /&gt;
**[[Firefox tracker search#Firefox Search Plugins|Firefox Search Plugins]] - Find tracked issues even more easily&lt;br /&gt;
*[[Unmerged files]] - changes on the stable branch in CVS that have not been merged to [[HEAD]]&lt;br /&gt;
*Browse the code online:&lt;br /&gt;
**[http://cvs.moodle.org/moodle/ the code with a complete change history from CVS]&lt;br /&gt;
**[http://xref.moodle.org/index.html the code, with links generated by PHPXref]&lt;br /&gt;
*[http://phpdocs.moodle.org/ Moodle PHP doc reference] - compiled nightly from the comment attached to each class and function in the code.  &lt;br /&gt;
*[[Development:Database Schema|Database Schema]] - for recent releases&lt;br /&gt;
*[http://moodle.org/course/view.php?id=5#4 Development news and discussion] section of Using Moodle course&lt;br /&gt;
**especially the [http://moodle.org/mod/forum/view.php?id=55 General developer forum]&lt;br /&gt;
**[[Filters used on the Moodle.org forums|cool tricks you can use in the moodle.org forums]]&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
Some tools people use when working on Moodle code:&lt;br /&gt;
&lt;br /&gt;
=== IDEs ===&lt;br /&gt;
&lt;br /&gt;
* [[Development:Setting_up_Netbeans|Setting up NetBeans for Moodle development]] - NetBeans for PHP is a great out-of-the-box editor.&lt;br /&gt;
* [[Development:Setting_up_Eclipse|Setting up Eclipse for Moodle development]] - Eclipse is a great editor to use for php development, if you can work out how to set it up.&lt;br /&gt;
* [[Development:vim|Setting up Vim for Moodle development]]&lt;br /&gt;
* [http://www.aptana.com/ Aptana Studio 2]&lt;br /&gt;
&lt;br /&gt;
=== Browser add-ons ===&lt;br /&gt;
*[http://getfirebug.com Firebug], see [[Firebug]] for details.&lt;br /&gt;
* [[Web developer extension]]&lt;br /&gt;
* [https://addons.mozilla.org/en-US/firefox/addon/394 ViewSourceWith] - The main goal is to view page source with external applications, but you can do a lot of other things as well.&lt;br /&gt;
&lt;br /&gt;
=== Miscellaneous === &lt;br /&gt;
*[[Development:ctags|Ctags]] - Using a tags file to navigate code&lt;br /&gt;
*[[W3C_validation|W3C HTML validator]] - Moodle has built in support to make using it easier.&lt;br /&gt;
*[[Development:Windows Installer|Windows Installer]] - Windows Installer documentation for developer.&lt;br /&gt;
&lt;br /&gt;
See also: [http://dev.moodle.org/mod/forum/view.php?id=18 Useful Development Tools forum]in the [http://dev.moodle.org/course/view.php?id=2 Introduction to Moodle Programming course]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*[http://moodle.org/security/ Moodle Security Announcements]&lt;br /&gt;
*[http://moodle.com/partners/ Moodle Partners] - providers of custom Moodle development services&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
[[Category:Developer tools]]&lt;br /&gt;
&lt;br /&gt;
[[ru:Development:Краткий обзор]]&lt;br /&gt;
[[es:Documentación para Desarrolladores]]&lt;br /&gt;
[[fr:Documentation développeur]]&lt;br /&gt;
[[pt:Desenvolvimento:Documentação para programadores]]&lt;br /&gt;
[[zh:开发者文档]]&lt;br /&gt;
[[ja:開発者ドキュメント]]&lt;br /&gt;
[[fi:Ohjelmoijan opas]]&lt;/div&gt;</summary>
		<author><name>TimHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=View_profile&amp;diff=82733</id>
		<title>View profile</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=View_profile&amp;diff=82733"/>
		<updated>2011-04-13T06:16:48Z</updated>

		<summary type="html">&lt;p&gt;TimHunt: Reverted edits by Melissaponce (talk) to last revision by Tsala&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Location:  Administration &amp;gt; Browse list of Users &amp;gt; View or Edit&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
For users with appropriate access rights within the Browse list of users area, clicking on the name of user will take you to a tab based summary view of a user&#039;s profile information. The user profile page gathers together all the known information about a particular user including detailed reports and logs regarding the activity of that user.&lt;br /&gt;
&lt;br /&gt;
You may also see a link for each course you or the user belongs to.  If you are viewing your profile or are an administrator clicking on these links keeps you on the user&#039;s profile but alters the breadcrumb menu so you can quickly jump to that course.&lt;br /&gt;
&lt;br /&gt;
== Change Password and Messages ==&lt;br /&gt;
&lt;br /&gt;
Depending on your access rights there may also be buttons at the bottom of the view profile page:&lt;br /&gt;
&lt;br /&gt;
;Change password&lt;br /&gt;
:This takes you to a form for changing your/another user&#039;s password.&lt;br /&gt;
&lt;br /&gt;
;Messages&lt;br /&gt;
:This opens the Messaging pop-up. It only shows when viewing your profile.&lt;br /&gt;
&lt;br /&gt;
;Send message&lt;br /&gt;
:This takes you to the Messaging pop-up and opens a messaging session with the user whose profile you were using. It only shows when viewing someone else&#039;s profile and if messaging is switched on by the administrator.&lt;br /&gt;
&lt;br /&gt;
== Login As ==&lt;br /&gt;
&lt;br /&gt;
The Login as tool allows users with appropriate access rights to log in as another user and view the site as this user would. This is particularly useful for troubleshooting any access problems or for checking configuration options.&lt;br /&gt;
&lt;br /&gt;
To Login as another user navigate to their profile view and click the Login as button. When you will be advised You are logged in as [person] press the Continue button.&lt;br /&gt;
&lt;br /&gt;
The site will display your logged in status as [Your name] You are logged in as [Other user name] (Logout). To return to your own login click your name or select Logout to log out of the site entirely.&lt;br /&gt;
&lt;br /&gt;
It is important to note that the system Logs still record any action you undertake when loggedin as another user, under your account.&lt;br /&gt;
&lt;br /&gt;
== Profile Tab ==&lt;br /&gt;
&lt;br /&gt;
The Profile tab displays the general information regarding a user and reflects the profile details a standard (e.g. student) can access. If the user has entered in any additional information within their profile (such as MSN ID, phone number etc), this will be displayed on this page/tab.&lt;br /&gt;
&lt;br /&gt;
The Profile tab also provides those users with appropriate access rights the Loginas and Send Message buttons.&lt;br /&gt;
&lt;br /&gt;
== Edit Profile ==&lt;br /&gt;
&lt;br /&gt;
The [[Edit profile|Edit Profile]] tab provides administrators etc with ability to update any (non-locked) profile information previously entered against the user. This includes the option to change or reset a user&#039;s password. It is recommended the Force password change option is used when resetting a password for a user.&lt;br /&gt;
&lt;br /&gt;
== Forum Posts ==&lt;br /&gt;
&lt;br /&gt;
The Forum Posts tab lists all Forum Posts (replies) and Discussions (threads) created by the user.&lt;br /&gt;
&lt;br /&gt;
== Blog ==&lt;br /&gt;
&lt;br /&gt;
The Blog tab within the Profile view lists all Blog entries created by the user.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
The Notes tab provides users with appropriate access rights with the ability to create Notes about specific users. A note&#039;s status determines who can see the &lt;br /&gt;
&lt;br /&gt;
* Personal - The note will be visible only to you (as the admin/teacher)&lt;br /&gt;
* Course - The note will be visible to other teachers in this course&lt;br /&gt;
* Site - The note will be visible to other teachers in all courses&lt;br /&gt;
&lt;br /&gt;
Please note, the Notes area can also be accessed via the Participants page within a course&lt;br /&gt;
&lt;br /&gt;
== Activity reports ==&lt;br /&gt;
&lt;br /&gt;
The Activity reports tab provides all access to all reporting data for an individual user. This includes the following reports:&lt;br /&gt;
&lt;br /&gt;
=== Outline report ===&lt;br /&gt;
&lt;br /&gt;
The Outline report is a general summary of those non-course areas of the site the user has viewed/visited.&lt;br /&gt;
&lt;br /&gt;
===Complete Report===&lt;br /&gt;
&lt;br /&gt;
The Complete Report shows all of those areas of the site the user has viewed/visited and what action (if any) they have undertaken within these areas.&lt;br /&gt;
&lt;br /&gt;
===Today&#039;s logs===&lt;br /&gt;
&lt;br /&gt;
The Today&#039;s logs report lists all areas of the site the user has visited in the last 24 hours and any information available regarding their activity within that area (such as viewing a specific assignment activity or accessing a particular course). A hourly hit counter bar graph is also provided for comparative reporting across a single day.&lt;br /&gt;
&lt;br /&gt;
===All logs===&lt;br /&gt;
&lt;br /&gt;
The All logs report lists all areas of the site the user has visited since their account was created and any information available regarding their activity within that area. Depending on the amount of data available a hit counter bar graph is also provided for comparative reporting across a day, week, fortnight or month.&lt;br /&gt;
&lt;br /&gt;
===Statistics===&lt;br /&gt;
&lt;br /&gt;
The Statistics report gives comparative reporting across (weekly) periods of Views (accesses) and Posts (updates) for a user.&lt;br /&gt;
&lt;br /&gt;
=== Grade ===&lt;br /&gt;
&lt;br /&gt;
The user report lists grades in any front page activities. To obtain grades in a particular course, the course should be selected on the user&#039;s profile page before accessing the grade report.&lt;br /&gt;
&lt;br /&gt;
=== Roles ===&lt;br /&gt;
&lt;br /&gt;
The Roles tab gives a summary of all Roles currently assigned to the user and the ability to create new overrides or assign new roles at the user context&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [[Update profile]]&lt;br /&gt;
*The capability [[Capabilities/moodle/user:viewdetails|moodle/user:viewdetails]]&lt;br /&gt;
&lt;br /&gt;
[[cs:Profil uživatele]]&lt;br /&gt;
[[de:Nutzerprofil ansehen]]&lt;br /&gt;
[[eu:Informazio_pertsonala]]&lt;br /&gt;
[[fr:Voir le profil]]&lt;/div&gt;</summary>
		<author><name>TimHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=About_Moodle&amp;diff=82673</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=82673"/>
		<updated>2011-04-08T21:05:13Z</updated>

		<summary type="html">&lt;p&gt;TimHunt: Reverted edits by Speakinginenglish (talk) to last revision by TimHunt&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{About Moodle}}&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 [[License|license]] for full details and please contact the [http://moodle.org/user/view.php?id=1&amp;amp;course=1 copyright holder] directly if you have any questions.&lt;br /&gt;
&lt;br /&gt;
Moodle can be [[Installing Moodle|installed]] on any computer that can run [http://www.php.net/ PHP], and can support an SQL type database (for example [http://www.mysql.com/ 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;
==See also==&lt;br /&gt;
*[http://moodle.org/course/view.php?id=17223 Teaching and Learning with Moodle] - Entry point for educators, new and experienced. See what Moodle is, view and contribute real life examples of using various features, and follow useful links to resources and places you can share, seek help and connect with fellow educators using Moodle.&lt;br /&gt;
*[[Teacher documentation |What does a teacher need to know?]] A good starting place to learn about the robust features in a Moodle course.&lt;br /&gt;
*[http://demo.moodle.org/ Moodle Demonstration Site]. Here you can play on a Moodle site as a teacher, administrator or student. &lt;br /&gt;
*[http://en.wikipedia.org/wiki/Moodle The Moodle page at Wikipedia]. MoodleDocs and Wikipedia both use [[MediaWiki]].&lt;br /&gt;
*[http://en.wikiversity.org/wiki/Moodle Moodle page at Wikiversity]  &lt;br /&gt;
*[[Moodle_manuals]] has many links or there is the [[Using Moodle book]] for those who must have an Adobe document to read or print.&lt;br /&gt;
*[[Moodle presentations| Here is where Moodlers]] share their &amp;quot;This is Moodle&amp;quot; presentations.&lt;br /&gt;
*[http://www.google.com/search?hl=en&amp;amp;q=moodlemoot Moodlemoots] are exciting Moodle conferences all over the world, with both face to face and virtual components.&lt;br /&gt;
*[[Documents useful for decision makers|Which course management software ?]] - Documents useful for decision makers&lt;br /&gt;
*Each of the links below will take you to a different alphabetical index of topics, such as the Administrator index or Teacher index.   &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;br /&gt;
&lt;br /&gt;
[[Category:Moodle]]&lt;/div&gt;</summary>
		<author><name>TimHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Development_talk:Gradebook_2.x_architecture&amp;diff=82652</id>
		<title>Development talk:Gradebook 2.x architecture</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Development_talk:Gradebook_2.x_architecture&amp;diff=82652"/>
		<updated>2011-04-08T11:39:03Z</updated>

		<summary type="html">&lt;p&gt;TimHunt: /* More feedback from Tim */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;May I commend to you the wise words:&lt;br /&gt;
: “Show me your flowcharts and conceal your tables, and I shall continue to be mystified. Show me your tables, and I won’t usually need your flowcharts; they’ll be obvious.” — Fred Brooks in “The Mythical Man-Month” 1975&lt;br /&gt;
&lt;br /&gt;
The point is, we need to work out exactly what data we will be storing, and more importantly, what the meaning of what we store is. If we get that right, then the rest should be obvious. Of course, it is not at all clear what data structure, solves all the problems. Getting that right will take a lot of thought.--[[User:Tim Hunt|Tim Hunt]] 22:46, 30 March 2011 (UTC)&lt;br /&gt;
&lt;br /&gt;
== More feedback from Tim ==&lt;br /&gt;
&lt;br /&gt;
Moodle developers&#039; chat about this: http://moodle.org/mod/cvsadmin/view.php?conversationid=7174#c266669&lt;br /&gt;
&lt;br /&gt;
From there, I am a bit worried about how the following scenarios are handled:&lt;br /&gt;
&lt;br /&gt;
Scenario 1:&lt;br /&gt;
* We have a course with a formative assessment that is open throughout the length of the course.&lt;br /&gt;
* Students can attempt the quiz at any time, and they can make multiple attempts.&lt;br /&gt;
* The grades for this formative quiz should appear in the gradebook the moment the student has finished an attempt, and should be visible to both students and teachers. (Although these grades do not affect the total course grade.)&lt;br /&gt;
&lt;br /&gt;
Scenario 2:&lt;br /&gt;
* Summative test with a deadline.&lt;br /&gt;
* Students should only see their grades in the gradebook after the deadline as passed, and then the teacher has approved the grades.&lt;br /&gt;
* Before the deadline, teachers must be able to see the grades for their students (think Separate groups) in the gradebook, to monitor progress.&lt;br /&gt;
&lt;br /&gt;
--[[User:Tim Hunt|Tim Hunt]] 06:39, 8 April 2011 (CDT)&lt;/div&gt;</summary>
		<author><name>TimHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Development:Overview_of_the_Moodle_question_engine&amp;diff=82589</id>
		<title>Development:Overview of the Moodle question engine</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Development:Overview_of_the_Moodle_question_engine&amp;diff=82589"/>
		<updated>2011-04-06T11:01:34Z</updated>

		<summary type="html">&lt;p&gt;TimHunt: /* Detailed data about an attempt */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Question_engine_2}}&lt;br /&gt;
This page summarises how the new question engine works.&lt;br /&gt;
&lt;br /&gt;
Previous section: [[Development:Question Engine 2:Overview|Design]]&lt;br /&gt;
&lt;br /&gt;
{{Work in progress}}&lt;br /&gt;
&lt;br /&gt;
==What does a question engine have to do?==&lt;br /&gt;
&lt;br /&gt;
We are in a question engine for online assessment. Clearly, we have questions, but we don&#039;t need to worry about them much here, they come from the question bank. We can take them as given.&lt;br /&gt;
&lt;br /&gt;
We are really interested in what happens when a student attempts some questions (for example, when they attempt a quiz). We can handle this by thinking about the student&#039;s attempt at each question separately, and then aggregate those separate question attempts into the set of those that comprise the student&#039;s attempt at a particular activity.&lt;br /&gt;
&lt;br /&gt;
For each question attempt, we need some notion of what state it is currently in (in-progress, completed correctly, ...) whether it has been graded, and if so, what mark was awarded. Also, there may be some state private to the question when it is started. For example the calculated question assigns random values to each variable when the question is attempted, and the choices for a multiple choice question may be shuffled.&lt;br /&gt;
&lt;br /&gt;
Given the current state of a question, we need to be able to display it in HTML. The question may need to be displayed in various ways. For example, perhaps students are not allowed to see the information about the grades awarded yet, but if a teacher reviews it they should see the grades. Teachers may also need to see other bits of interface, like edit links. There may be one or more questions displayed embedded in a particular HTML page, for example a page of a quiz attempt.&lt;br /&gt;
&lt;br /&gt;
Finally, the question needs to move from one state to another. There two sorts of way that can happen. First, the student may have interacted with some questions that have been displayed as part of a HTML page, and then submitted that page. That is, the question engine needs to directly process data submitted as part of a HTTP POST request. Second, the student may have performed some other action (for example clicked the Start attempt or Submit all and finish buttons in the quiz), and as a result, some other part of the Moodle code may wish to cause some questions to change state.&lt;br /&gt;
&lt;br /&gt;
Not only to we need to consider the current state of each question. We also need a record of the whole history of what happened. For example a teacher may wish to review everything the student did. Or, when we regrade an interactive question, we need to play back the entire sequence of what the student did.&lt;br /&gt;
&lt;br /&gt;
To be flexible, the question engine needs to cope with any question-type plug-in. It also needs to be flexible in the ways questions behave. For example some questions can only be graded manually by a teacher. Automatically graded questions can be configured to behave in different ways, for example in interactively with immediate feedback and multiple tries during a single question attempt, or with deferred feedback, where the questions are only graded when the student does submit all and finish.&lt;br /&gt;
&lt;br /&gt;
==The state of a question==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;sideblock right&amp;quot; style=&amp;quot;width: 18em;&amp;quot;&amp;gt;&amp;lt;div class=&amp;quot;content&amp;quot;&amp;gt;&#039;&#039;Show me your flowcharts and conceal your tables, and I shall continue to be mystified. Show me your tables, and I won&#039;t usually need your flowcharts; they&#039;ll be obvious.&#039;&#039;&#039;&#039; -- Fred Brooks, [http://en.wikipedia.org/wiki/The_Mythical_Man-Month The Mythical Man Month]&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As noted above, a key issues is representing the state of a question that is being attempted, and, indeed, the complete history of the states it has passed through. This is the responsibility of the &#039;&#039;&#039;question_attempt&#039;&#039;&#039; class. As we have noted, we are not just interested in the current state of the question, but the complete history of states a question has been through. Therefore, a question_attempt, largely consists of a list of &#039;&#039;&#039;question_attempt_step&#039;&#039;&#039;s. &lt;br /&gt;
&lt;br /&gt;
===Attempt steps===&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;question_attempt_step&#039;&#039;&#039; has the following fields:&lt;br /&gt;
; state : The state the question is at this step. This will be a &#039;&#039;&#039;question_state&#039;&#039;&#039; like question_state::$correct.&lt;br /&gt;
; fraction : The score the student got for this question so far. This will start off null, and later change. See the note about scores below.&lt;br /&gt;
; timecreated : The timestamp of when the action that created this state happened.&lt;br /&gt;
; userid : The user whose action created this state. During the attempt, this will be the id of the user who attempted the question, but suppose a teacher manually grades the finished question later, then it will be the id of the teacher.&lt;br /&gt;
&lt;br /&gt;
In addition to these fields, each step has an associative array (that is, name =&amp;gt; value pairs) of extra data. We noted above that the most common cause of a question moving from one state to another was as the result of a HTTP POST request. Well, a POST request basically comprises a set of name =&amp;gt; value pairs. For a typical step, the data array will hold those parts of the post data that belong to this question.&lt;br /&gt;
&lt;br /&gt;
Not all state changes are caused by a POST request. Some are caused by API calls like $quba-&amp;gt;finish_question(...). Internally, all these API calls are handled by converting them to special sets of name =&amp;gt; value pairs. This means that every action is represented in the same way, which makes it much easier to implement processing like re-grading. Internally, every change of action is caused by a call to the $questionattempt-&amp;gt;process_action($dataarray, ...) method. As an example, $quba-&amp;gt;finish_question(...) gets handled by calling $questionattempt-&amp;gt;process_action(array(&#039;!finish&#039; =&amp;gt; 1)).&lt;br /&gt;
&lt;br /&gt;
===A note about scores===&lt;br /&gt;
&lt;br /&gt;
The question engine stores scores in two different ways.&lt;br /&gt;
&lt;br /&gt;
Normally, each question in a, say, quiz attempt, will be worth a certain number of marks. For example, question 1 may be worth 5 marks, question 2 worth 3 marks, and so on.&lt;br /&gt;
&lt;br /&gt;
However, sometimes these marks have to change. For example, perhaps question 2 is now thought to be unsound, and so we want to change the scoring of the quiz so that it now is worth zero marks. But then later we may re-consider, and want to set it back to being worth 3 marks again.&lt;br /&gt;
&lt;br /&gt;
In order to make it easy to handle this sort of change, almost all scores are internally stored on a scale of 0 to 1. Then there is a field $questionattempt-&amp;gt;maxmark. To get the actual mark for a question you need to compute $fraction * $questionattempt-&amp;gt;maxmark.&lt;br /&gt;
&lt;br /&gt;
In the code, things called &#039;&#039;&#039;fraction&#039;&#039;&#039; are always on the 0 to 1 scale; things called &#039;&#039;&#039;mark&#039;&#039;&#039; are always on the scale of fraction * maxmark. Marks are what is displayed to users in the UI.&lt;br /&gt;
&lt;br /&gt;
===More about question attempts===&lt;br /&gt;
&lt;br /&gt;
As mentioned before, a &#039;&#039;&#039;question_attempt&#039;&#039;&#039; is mainly a list of question_attempt_steps. However, it also stores some other important information.&lt;br /&gt;
&lt;br /&gt;
First, we need to know what this attempt is, so there are some links to other objects. There is a link to the &#039;&#039;&#039;question_definition&#039;&#039;&#039; of the question being attempted. There is a link to the &#039;&#039;&#039;question_behaviour&#039;&#039;&#039; that controls how the question behaves. Also, the question_attempt will be part of some student&#039;s work for some activity. For example, it may be part of a quiz attempt. The collection of all question_attempts that make up that quiz attempt (or whatever) is represented by a class called &#039;&#039;&#039;question_usage_by_activity&#039;&#039;&#039;, of which more in a moment. We store the id of this $quba, and the index number of this question within the usage.&lt;br /&gt;
&lt;br /&gt;
Second, there is some metadata, stored in the following fields:&lt;br /&gt;
; maxmark : How many marks this question is worth. All scores that are stored as fractions need to be multiplied by this before being displayed.&lt;br /&gt;
; minfraction : I said above that fraction scores were stored on a scale of 0 to 1. That was a lie. Some questions can return negative marks. For example, a multiple choice question with 5 choices may return +1 for right, and -0.25 for wrong, so that the average score for guessing is 0. Or, if certainty based marking is used, and the student is confident but wrong, they may be awarded a negative mark. The correct statement is that fraction scores are on a scale of minfraction to 1.&lt;br /&gt;
; flagged : Questions can be flagged. This is an on/off boolean that can be toggled by the student. Think of this as a simple form of bookmarking. That is stored here. (The history of changes to the flagged state are not considered important. That is why toggling the flag does not create a new step.)&lt;br /&gt;
&lt;br /&gt;
Thirdly, and finally, some information is recorded to make ti easier to run reports efficiently.&lt;br /&gt;
; questionsummary : This is a plain-text summary of the question the student was asked. (This makes most sense if you think of a question with randomisation like calculated questions. This field sumarieses the specific question the student was asked.)&lt;br /&gt;
; responsesummary : This is a plain-text summary of the response the student gave.&lt;br /&gt;
; rightanswer : This is a plain-text summary of what the right answer is.&lt;br /&gt;
&lt;br /&gt;
===Question usages===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;question_usage_by_activity&#039;&#039;&#039; class, in terms of data storage, is really little more than a list of question attempts.&lt;br /&gt;
&lt;br /&gt;
The little extra comprises:&lt;br /&gt;
; owningplugin : the part of Moodle that this usage belongs to. For example &#039;mod_quiz&#039; or &#039;core_question_preview&#039;.&lt;br /&gt;
; context : the context that the usage belongs to. For a quiz attempt, this will be the quiz context.&lt;br /&gt;
; preferredbehaviour : The behaviour that should be used, where possible, when a question is added to this usage.&lt;br /&gt;
&lt;br /&gt;
===Question behaviours===&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
===More on question states===&lt;br /&gt;
&lt;br /&gt;
[[Image:Question_state_diagram.png|right|400px]]&lt;br /&gt;
As above, question_attempt_steps::state field is one of the question_state constants. There are quite a lot of these states (about 16) and the state diagram here may help to understand them.&lt;br /&gt;
&lt;br /&gt;
However, please by aware that although this diagram only shows particular state transitions, it is really up to the behaviour to decide how the question attempt moves from one state to another. Anything is possible, at least in theory. The diagram tried to show what might be sensible.&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Database tables==&lt;br /&gt;
&lt;br /&gt;
[[Image:Question engine 2 database.png|right|400px]]&lt;br /&gt;
&lt;br /&gt;
As explained above, all the state is represented by the classes question_useage_by_activity, which is a list of question_attempts, each of which is a list of question_attempt_steps. This is naturally stored in three linked database tables, except that because each step can contain an arbitrary list of name =&amp;gt; value pairs, we get a fourth question_attempt_step_data table. This is shown in the diagram.&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Detailed data about an attempt===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code sql&amp;gt;&lt;br /&gt;
SELECT&lt;br /&gt;
    quiza.userid,&lt;br /&gt;
    quiza.quiz,&lt;br /&gt;
    quiza.attempt,&lt;br /&gt;
    quiza.sumgrades,&lt;br /&gt;
    qu.preferredbehaviour,&lt;br /&gt;
    qa.slot,&lt;br /&gt;
    qa.behaviour,&lt;br /&gt;
    qa.questionid,&lt;br /&gt;
    qa.maxmark,&lt;br /&gt;
    qa.minfraction,&lt;br /&gt;
    qa.flagged,&lt;br /&gt;
    qas.sequencenumber,&lt;br /&gt;
    qas.state,&lt;br /&gt;
    qas.fraction,&lt;br /&gt;
    timestamptz &#039;epoch&#039; + qas.timecreated * interval &#039;1 second&#039;,&lt;br /&gt;
    qas.userid,&lt;br /&gt;
    qasd.name,&lt;br /&gt;
    qasd.value,&lt;br /&gt;
    qa.questionsummary,&lt;br /&gt;
    qa.rightanswer,&lt;br /&gt;
    qa.responsesummary&lt;br /&gt;
FROM mdl_quiz_attempts quiza&lt;br /&gt;
JOIN mdl_question_usages qu ON qu.id = quiza.uniqueid&lt;br /&gt;
JOIN mdl_question_attempts qa ON qa.questionusageid = qu.id&lt;br /&gt;
JOIN mdl_question_attempt_steps qas ON qas.questionattemptid = qa.id&lt;br /&gt;
JOIN mdl_question_attempt_step_data qasd ON qasd.attemptstepid = qas.id&lt;br /&gt;
WHERE quiza.id = 675767&lt;br /&gt;
ORDER BY qas.timecreated, qu.id, qa.slot, qas.sequencenumber, qasd.name&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Key processes==&lt;br /&gt;
&lt;br /&gt;
These two sequence diagrams summarise what happens during the two key operations, displaying a page of the quiz, and processing the student&#039;s responses.&lt;br /&gt;
&lt;br /&gt;
[[Image:Question_processing.png|800px]]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
In the next section, [[Development:Developing a Question Behaviour|Developing a Question Behaviour]] I describe what a developer will need to do to create a Question behaviour plugin for the new system.&lt;br /&gt;
&lt;br /&gt;
* Back to [[Development:Question_Engine_2|Question Engine 2]]&lt;/div&gt;</summary>
		<author><name>TimHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Development:Overview_of_the_Moodle_question_engine&amp;diff=82588</id>
		<title>Development:Overview of the Moodle question engine</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Development:Overview_of_the_Moodle_question_engine&amp;diff=82588"/>
		<updated>2011-04-06T11:01:17Z</updated>

		<summary type="html">&lt;p&gt;TimHunt: /* Database tables */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Question_engine_2}}&lt;br /&gt;
This page summarises how the new question engine works.&lt;br /&gt;
&lt;br /&gt;
Previous section: [[Development:Question Engine 2:Overview|Design]]&lt;br /&gt;
&lt;br /&gt;
{{Work in progress}}&lt;br /&gt;
&lt;br /&gt;
==What does a question engine have to do?==&lt;br /&gt;
&lt;br /&gt;
We are in a question engine for online assessment. Clearly, we have questions, but we don&#039;t need to worry about them much here, they come from the question bank. We can take them as given.&lt;br /&gt;
&lt;br /&gt;
We are really interested in what happens when a student attempts some questions (for example, when they attempt a quiz). We can handle this by thinking about the student&#039;s attempt at each question separately, and then aggregate those separate question attempts into the set of those that comprise the student&#039;s attempt at a particular activity.&lt;br /&gt;
&lt;br /&gt;
For each question attempt, we need some notion of what state it is currently in (in-progress, completed correctly, ...) whether it has been graded, and if so, what mark was awarded. Also, there may be some state private to the question when it is started. For example the calculated question assigns random values to each variable when the question is attempted, and the choices for a multiple choice question may be shuffled.&lt;br /&gt;
&lt;br /&gt;
Given the current state of a question, we need to be able to display it in HTML. The question may need to be displayed in various ways. For example, perhaps students are not allowed to see the information about the grades awarded yet, but if a teacher reviews it they should see the grades. Teachers may also need to see other bits of interface, like edit links. There may be one or more questions displayed embedded in a particular HTML page, for example a page of a quiz attempt.&lt;br /&gt;
&lt;br /&gt;
Finally, the question needs to move from one state to another. There two sorts of way that can happen. First, the student may have interacted with some questions that have been displayed as part of a HTML page, and then submitted that page. That is, the question engine needs to directly process data submitted as part of a HTTP POST request. Second, the student may have performed some other action (for example clicked the Start attempt or Submit all and finish buttons in the quiz), and as a result, some other part of the Moodle code may wish to cause some questions to change state.&lt;br /&gt;
&lt;br /&gt;
Not only to we need to consider the current state of each question. We also need a record of the whole history of what happened. For example a teacher may wish to review everything the student did. Or, when we regrade an interactive question, we need to play back the entire sequence of what the student did.&lt;br /&gt;
&lt;br /&gt;
To be flexible, the question engine needs to cope with any question-type plug-in. It also needs to be flexible in the ways questions behave. For example some questions can only be graded manually by a teacher. Automatically graded questions can be configured to behave in different ways, for example in interactively with immediate feedback and multiple tries during a single question attempt, or with deferred feedback, where the questions are only graded when the student does submit all and finish.&lt;br /&gt;
&lt;br /&gt;
==The state of a question==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;sideblock right&amp;quot; style=&amp;quot;width: 18em;&amp;quot;&amp;gt;&amp;lt;div class=&amp;quot;content&amp;quot;&amp;gt;&#039;&#039;Show me your flowcharts and conceal your tables, and I shall continue to be mystified. Show me your tables, and I won&#039;t usually need your flowcharts; they&#039;ll be obvious.&#039;&#039;&#039;&#039; -- Fred Brooks, [http://en.wikipedia.org/wiki/The_Mythical_Man-Month The Mythical Man Month]&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As noted above, a key issues is representing the state of a question that is being attempted, and, indeed, the complete history of the states it has passed through. This is the responsibility of the &#039;&#039;&#039;question_attempt&#039;&#039;&#039; class. As we have noted, we are not just interested in the current state of the question, but the complete history of states a question has been through. Therefore, a question_attempt, largely consists of a list of &#039;&#039;&#039;question_attempt_step&#039;&#039;&#039;s. &lt;br /&gt;
&lt;br /&gt;
===Attempt steps===&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;question_attempt_step&#039;&#039;&#039; has the following fields:&lt;br /&gt;
; state : The state the question is at this step. This will be a &#039;&#039;&#039;question_state&#039;&#039;&#039; like question_state::$correct.&lt;br /&gt;
; fraction : The score the student got for this question so far. This will start off null, and later change. See the note about scores below.&lt;br /&gt;
; timecreated : The timestamp of when the action that created this state happened.&lt;br /&gt;
; userid : The user whose action created this state. During the attempt, this will be the id of the user who attempted the question, but suppose a teacher manually grades the finished question later, then it will be the id of the teacher.&lt;br /&gt;
&lt;br /&gt;
In addition to these fields, each step has an associative array (that is, name =&amp;gt; value pairs) of extra data. We noted above that the most common cause of a question moving from one state to another was as the result of a HTTP POST request. Well, a POST request basically comprises a set of name =&amp;gt; value pairs. For a typical step, the data array will hold those parts of the post data that belong to this question.&lt;br /&gt;
&lt;br /&gt;
Not all state changes are caused by a POST request. Some are caused by API calls like $quba-&amp;gt;finish_question(...). Internally, all these API calls are handled by converting them to special sets of name =&amp;gt; value pairs. This means that every action is represented in the same way, which makes it much easier to implement processing like re-grading. Internally, every change of action is caused by a call to the $questionattempt-&amp;gt;process_action($dataarray, ...) method. As an example, $quba-&amp;gt;finish_question(...) gets handled by calling $questionattempt-&amp;gt;process_action(array(&#039;!finish&#039; =&amp;gt; 1)).&lt;br /&gt;
&lt;br /&gt;
===A note about scores===&lt;br /&gt;
&lt;br /&gt;
The question engine stores scores in two different ways.&lt;br /&gt;
&lt;br /&gt;
Normally, each question in a, say, quiz attempt, will be worth a certain number of marks. For example, question 1 may be worth 5 marks, question 2 worth 3 marks, and so on.&lt;br /&gt;
&lt;br /&gt;
However, sometimes these marks have to change. For example, perhaps question 2 is now thought to be unsound, and so we want to change the scoring of the quiz so that it now is worth zero marks. But then later we may re-consider, and want to set it back to being worth 3 marks again.&lt;br /&gt;
&lt;br /&gt;
In order to make it easy to handle this sort of change, almost all scores are internally stored on a scale of 0 to 1. Then there is a field $questionattempt-&amp;gt;maxmark. To get the actual mark for a question you need to compute $fraction * $questionattempt-&amp;gt;maxmark.&lt;br /&gt;
&lt;br /&gt;
In the code, things called &#039;&#039;&#039;fraction&#039;&#039;&#039; are always on the 0 to 1 scale; things called &#039;&#039;&#039;mark&#039;&#039;&#039; are always on the scale of fraction * maxmark. Marks are what is displayed to users in the UI.&lt;br /&gt;
&lt;br /&gt;
===More about question attempts===&lt;br /&gt;
&lt;br /&gt;
As mentioned before, a &#039;&#039;&#039;question_attempt&#039;&#039;&#039; is mainly a list of question_attempt_steps. However, it also stores some other important information.&lt;br /&gt;
&lt;br /&gt;
First, we need to know what this attempt is, so there are some links to other objects. There is a link to the &#039;&#039;&#039;question_definition&#039;&#039;&#039; of the question being attempted. There is a link to the &#039;&#039;&#039;question_behaviour&#039;&#039;&#039; that controls how the question behaves. Also, the question_attempt will be part of some student&#039;s work for some activity. For example, it may be part of a quiz attempt. The collection of all question_attempts that make up that quiz attempt (or whatever) is represented by a class called &#039;&#039;&#039;question_usage_by_activity&#039;&#039;&#039;, of which more in a moment. We store the id of this $quba, and the index number of this question within the usage.&lt;br /&gt;
&lt;br /&gt;
Second, there is some metadata, stored in the following fields:&lt;br /&gt;
; maxmark : How many marks this question is worth. All scores that are stored as fractions need to be multiplied by this before being displayed.&lt;br /&gt;
; minfraction : I said above that fraction scores were stored on a scale of 0 to 1. That was a lie. Some questions can return negative marks. For example, a multiple choice question with 5 choices may return +1 for right, and -0.25 for wrong, so that the average score for guessing is 0. Or, if certainty based marking is used, and the student is confident but wrong, they may be awarded a negative mark. The correct statement is that fraction scores are on a scale of minfraction to 1.&lt;br /&gt;
; flagged : Questions can be flagged. This is an on/off boolean that can be toggled by the student. Think of this as a simple form of bookmarking. That is stored here. (The history of changes to the flagged state are not considered important. That is why toggling the flag does not create a new step.)&lt;br /&gt;
&lt;br /&gt;
Thirdly, and finally, some information is recorded to make ti easier to run reports efficiently.&lt;br /&gt;
; questionsummary : This is a plain-text summary of the question the student was asked. (This makes most sense if you think of a question with randomisation like calculated questions. This field sumarieses the specific question the student was asked.)&lt;br /&gt;
; responsesummary : This is a plain-text summary of the response the student gave.&lt;br /&gt;
; rightanswer : This is a plain-text summary of what the right answer is.&lt;br /&gt;
&lt;br /&gt;
===Question usages===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;question_usage_by_activity&#039;&#039;&#039; class, in terms of data storage, is really little more than a list of question attempts.&lt;br /&gt;
&lt;br /&gt;
The little extra comprises:&lt;br /&gt;
; owningplugin : the part of Moodle that this usage belongs to. For example &#039;mod_quiz&#039; or &#039;core_question_preview&#039;.&lt;br /&gt;
; context : the context that the usage belongs to. For a quiz attempt, this will be the quiz context.&lt;br /&gt;
; preferredbehaviour : The behaviour that should be used, where possible, when a question is added to this usage.&lt;br /&gt;
&lt;br /&gt;
===Question behaviours===&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
===More on question states===&lt;br /&gt;
&lt;br /&gt;
[[Image:Question_state_diagram.png|right|400px]]&lt;br /&gt;
As above, question_attempt_steps::state field is one of the question_state constants. There are quite a lot of these states (about 16) and the state diagram here may help to understand them.&lt;br /&gt;
&lt;br /&gt;
However, please by aware that although this diagram only shows particular state transitions, it is really up to the behaviour to decide how the question attempt moves from one state to another. Anything is possible, at least in theory. The diagram tried to show what might be sensible.&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Database tables==&lt;br /&gt;
&lt;br /&gt;
[[Image:Question engine 2 database.png|right|400px]]&lt;br /&gt;
&lt;br /&gt;
As explained above, all the state is represented by the classes question_useage_by_activity, which is a list of question_attempts, each of which is a list of question_attempt_steps. This is naturally stored in three linked database tables, except that because each step can contain an arbitrary list of name =&amp;gt; value pairs, we get a fourth question_attempt_step_data table. This is shown in the diagram.&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Detailed data about an attempt===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
SELECT&lt;br /&gt;
    quiza.userid,&lt;br /&gt;
    quiza.quiz,&lt;br /&gt;
    quiza.attempt,&lt;br /&gt;
    quiza.sumgrades,&lt;br /&gt;
    qu.preferredbehaviour,&lt;br /&gt;
    qa.slot,&lt;br /&gt;
    qa.behaviour,&lt;br /&gt;
    qa.questionid,&lt;br /&gt;
    qa.maxmark,&lt;br /&gt;
    qa.minfraction,&lt;br /&gt;
    qa.flagged,&lt;br /&gt;
    qas.sequencenumber,&lt;br /&gt;
    qas.state,&lt;br /&gt;
    qas.fraction,&lt;br /&gt;
    timestamptz &#039;epoch&#039; + qas.timecreated * interval &#039;1 second&#039;,&lt;br /&gt;
    qas.userid,&lt;br /&gt;
    qasd.name,&lt;br /&gt;
    qasd.value,&lt;br /&gt;
    qa.questionsummary,&lt;br /&gt;
    qa.rightanswer,&lt;br /&gt;
    qa.responsesummary&lt;br /&gt;
FROM mdl_quiz_attempts quiza&lt;br /&gt;
JOIN mdl_question_usages qu ON qu.id = quiza.uniqueid&lt;br /&gt;
JOIN mdl_question_attempts qa ON qa.questionusageid = qu.id&lt;br /&gt;
JOIN mdl_question_attempt_steps qas ON qas.questionattemptid = qa.id&lt;br /&gt;
JOIN mdl_question_attempt_step_data qasd ON qasd.attemptstepid = qas.id&lt;br /&gt;
WHERE quiza.id = 675767&lt;br /&gt;
ORDER BY qas.timecreated, qu.id, qa.slot, qas.sequencenumber, qasd.name&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Key processes==&lt;br /&gt;
&lt;br /&gt;
These two sequence diagrams summarise what happens during the two key operations, displaying a page of the quiz, and processing the student&#039;s responses.&lt;br /&gt;
&lt;br /&gt;
[[Image:Question_processing.png|800px]]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
In the next section, [[Development:Developing a Question Behaviour|Developing a Question Behaviour]] I describe what a developer will need to do to create a Question behaviour plugin for the new system.&lt;br /&gt;
&lt;br /&gt;
* Back to [[Development:Question_Engine_2|Question Engine 2]]&lt;/div&gt;</summary>
		<author><name>TimHunt</name></author>
	</entry>
</feed>