<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.moodle.org/402/en/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mudrd8mz</id>
	<title>MoodleDocs - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://docs.moodle.org/402/en/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mudrd8mz"/>
	<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/Special:Contributions/Mudrd8mz"/>
	<updated>2026-04-17T11:59:05Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=File:sites-deployment.png&amp;diff=141727</id>
		<title>File:sites-deployment.png</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=File:sites-deployment.png&amp;diff=141727"/>
		<updated>2021-09-20T18:03:00Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;asdfasd&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=User:Chris_collman/handyformats&amp;diff=141471</id>
		<title>User:Chris collman/handyformats</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=User:Chris_collman/handyformats&amp;diff=141471"/>
		<updated>2021-08-09T12:58:48Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: MDLSITE-6551 Fix table class&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is for handy formats I use in MoodleDocs.  Either I need a place to put links to what I think are successful formats and/or put examples here.  In Wikimedia I use a subpage to format my library books.  In MoodleDocs I want &lt;br /&gt;
 &lt;br /&gt;
==A table==&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width:75%; height:200px&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
| abc || def || ghi&lt;br /&gt;
|- style=&amp;quot;height:100px&amp;quot; &lt;br /&gt;
| jkl || style=&amp;quot;width:200px&amp;quot; |mno || pqr&lt;br /&gt;
|-&lt;br /&gt;
| stu || vwx || yz&lt;br /&gt;
|}&lt;br /&gt;
==A nice table==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!What it looks like&lt;br /&gt;
!What you type&lt;br /&gt;
|-&lt;br /&gt;
| A table:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! header 1&lt;br /&gt;
! header 2&lt;br /&gt;
! header 3&lt;br /&gt;
|-&lt;br /&gt;
| row 1, cell 1&lt;br /&gt;
| row 1, cell 2&lt;br /&gt;
| row 1, cell 3&lt;br /&gt;
|-&lt;br /&gt;
| row 2, cell 1&lt;br /&gt;
| row 2, cell 2&lt;br /&gt;
| row 2, cell 3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
| &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;A table:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! header 1&lt;br /&gt;
! header 2&lt;br /&gt;
! header 3&lt;br /&gt;
|-&lt;br /&gt;
| row 1, cell 1&lt;br /&gt;
| row 1, cell 2&lt;br /&gt;
| row 1, cell 3&lt;br /&gt;
|-&lt;br /&gt;
| row 2, cell 1&lt;br /&gt;
| row 2, cell 2&lt;br /&gt;
| row 2, cell 3&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note, the class=&amp;quot;wikitable&amp;quot; is our local hack for Moodledocs.  You can leave it out to get a table without borders.&lt;br /&gt;
&lt;br /&gt;
==A table with picture==&lt;br /&gt;
&lt;br /&gt;
{|  border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
!width=&amp;quot;30&amp;quot;|Icon&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Effect&lt;br /&gt;
!width=&amp;quot;30&amp;quot;|Icon&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Effect&lt;br /&gt;
!width=&amp;quot;30&amp;quot;|Icon&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Effect&lt;br /&gt;
!width=&amp;quot;30&amp;quot;|Icon&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Effect&lt;br /&gt;
|-&lt;br /&gt;
|[[Image:Edit.gif]]|| Edit text ||[[Image:Open.gif]] || Open ||[[Image:Delete.gif]] || Delete  ||[[Image:Move.gif]] ||Move&lt;br /&gt;
|-&lt;br /&gt;
||[[Image:All.gif]] ||See all topics||[[Image:Closed.gif]] ||Close||[[Image:Right.gif]] || Indent  ||[[Image:Movehere.gif]] || Move here &lt;br /&gt;
|-&lt;br /&gt;
||[[Image:One.gif]] || See one topic||[[Image:Help.gif]] ||Help ||  ||   ||[[Image:Marker.gif]] ||Make Current&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Picture formats==&lt;br /&gt;
frame&lt;br /&gt;
[[Image:Course_section_formats_1.JPG|frame|left|format frame, left, this label]]&lt;br /&gt;
&amp;lt;nowiki&amp;gt;[[Image:Course_section_formats_1.JPG|frame|left|format frame, left, this label]]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
thumb example resized&lt;br /&gt;
[[Image:Course_section_formats_1.JPG|thumb|100px|center|format thumb, 100px, center, this label]]&lt;br /&gt;
&amp;lt;nowiki&amp;gt;[[Image:Course_section_formats_1.JPG|thumb|100px|center|format thumb, 100px, center, this label]]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Modules and plugins ==&lt;br /&gt;
 ==See also==&lt;br /&gt;
 *[Place http address for M&amp;amp;P entry here  Name of Entry here] is a Modules and plugins database page that has downloads and more information.&lt;br /&gt;
 *Discussions: [Place http address for moodle forum or forum thread]&lt;br /&gt;
 **Please create or find a discussion topic in the &amp;lt;nowiki&amp;gt;[http://moodle.org/mod/forum/view.php?id=44  Contributed Code forum]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 **The contributor also maintains a Moodle site that contains one or more [Place http address forums using and supporting xxx], outside of Moodle.org .&lt;br /&gt;
 *Additional documentation&lt;br /&gt;
 **[Place http address outside page Moodle] (outside of Moodle.org)&lt;br /&gt;
 * [Place http address for M&amp;amp;P download put name here] for Moodle 2.0&lt;br /&gt;
&lt;br /&gt;
==Forgotten templates ==&lt;br /&gt;
*Note format &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&#039;&#039;&#039;Note:&#039;&#039;&#039; Moodle 2.0 has a new HTML editor. For details of the HTML editor in Moodle prior to 2.0, see [[HTML editor]].&amp;lt;/p&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Update template &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;{{Update}}&amp;lt;/nowiki&amp;gt; &lt;br /&gt;
&lt;br /&gt;
*Gallery format&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;gallery&amp;gt;&amp;lt;/nowiki&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;Image:Moodle.logo&amp;lt;/nowiki&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;Image:Moodle.logo|This is the a Moodle logo&amp;lt;/nowiki&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/gallery&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Gallery - fancy &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;gallery caption=&amp;quot;Possible screenshots&amp;quot; widths=&amp;quot;225px&amp;quot; heights=&amp;quot;120px&amp;quot; perrow=&amp;quot;3&amp;quot;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Other wiki codes==&lt;br /&gt;
&amp;lt;strike&amp;gt;Strikeout&amp;lt;/strike&amp;gt; can be achieved by &amp;lt;nowiki&amp;gt;&amp;lt;strike&amp;gt;Strikeout &amp;lt;/strike&amp;gt;&amp;lt;/nowiki&amp;gt;.  I find this useful as a tool for visually marking text to be moved or changed.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;#redirect [[Adding a content page]]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*&amp;lt;u&amp;gt;underline&amp;lt;/u&amp;gt; -- No! No! No! underline is an evil abomination on the web, for anything other than links. People expect online text with an underline t be click-able. If you want to emphasise something, use bold or italic.--[[User:Tim Hunt|Tim Hunt]] 20:15, 9 December 2010 (UTC) -- Sorry for the interruption.&lt;br /&gt;
:Evil abomination for all those who color blind and bald headed? Point noted and taken.   However, I saw &amp;quot;Moodle &#039;&#039;&#039;IS&#039;&#039;&#039; an online..&amp;quot; and all I could think of was &amp;quot;Moodle Information Systems&amp;quot; and my brain froze :) Interrupt any time.--[[User:chris collman|chris collman]] 17:32, 10 December 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
==Wiki TOC codes==&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;__TOC__&amp;lt;/nowiki&amp;gt; forces placement of Table of Contents at this spot&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;{{TOCright}}&amp;lt;/nowiki&amp;gt; interesting, sort of in the template postion.&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;[[#toc|Top]]&amp;lt;/nowiki&amp;gt; - Links back to Table of Contents, says &amp;quot;Top&amp;quot;&lt;br /&gt;
*&amp;lt;nowiki&amp;gt;__FORCETOC__&amp;lt;/nowiki&amp;gt; = for less than 4 entries to create toc&lt;br /&gt;
*&amp;lt;nowiki&amp;gt;__NOTOC__&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Note to self==&lt;br /&gt;
Template for update section as a special page?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;{{Update_section}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These templates work &lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;{{stub}}&amp;lt;/nowiki&amp;gt; Listed on special pages&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;{{Update}}&amp;lt;/nowiki&amp;gt;  Not listed on special pages&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=New_features&amp;diff=140856</id>
		<title>New features</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=New_features&amp;diff=140856"/>
		<updated>2021-07-14T14:44:33Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: New card-deck based layout&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{About Moodle}}&lt;br /&gt;
Read on for an overview of the key features and improvements in Moodle 3.11, or watch our [https://www.youtube.com/playlist?list=PLxcO_MFWQBDdG1jK_Eu_D4GC-AOGBEXh6 YouTube playlist of 3.11 New features].&lt;br /&gt;
&lt;br /&gt;
For role-specific information, see [[New for teachers]], [[New for students]] and [[New for administrators]].&lt;br /&gt;
&lt;br /&gt;
The list of major features and improvements can be found in the [[:dev:Moodle 3.11 release notes|Moodle 3.11 release notes]].	&lt;br /&gt;
__NOTOC__&lt;br /&gt;
===Student activity completion (MUA)===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;card-deck mt-3&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;div class=&amp;quot;card&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;card-body&amp;quot;&amp;gt;&lt;br /&gt;
[[File:ActivityCompletion311.png|class=img-fluid]]&lt;br /&gt;
      &amp;lt;h4 class=&amp;quot;card-title&amp;quot;&amp;gt;&lt;br /&gt;
Improved learner experience&lt;br /&gt;
      &amp;lt;/h4&amp;gt;&lt;br /&gt;
      &amp;lt;p class=&amp;quot;card-text&amp;quot;&amp;gt;&lt;br /&gt;
Activity dates and [[Activity completion]] conditions may be shown on the course page.&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;div class=&amp;quot;card&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;card-body&amp;quot;&amp;gt;&lt;br /&gt;
[[File:311CompletionWithinActivity.png|class=img-fluid]]&lt;br /&gt;
      &amp;lt;h4 class=&amp;quot;card-title&amp;quot;&amp;gt;&lt;br /&gt;
Dates and completion conditions within activities&lt;br /&gt;
      &amp;lt;/h4&amp;gt;&lt;br /&gt;
      &amp;lt;p class=&amp;quot;card-text&amp;quot;&amp;gt;&lt;br /&gt;
Activity dates and [[Activity completion]] conditions are shown at the top of the activity page.&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;card-deck mt-3&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;div class=&amp;quot;card&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;card-body&amp;quot;&amp;gt;&lt;br /&gt;
[[File:StudentManualCompletion.png|class=img-fluid]]&lt;br /&gt;
      &amp;lt;h4 class=&amp;quot;card-title&amp;quot;&amp;gt;&lt;br /&gt;
Manual completion&lt;br /&gt;
      &amp;lt;/h4&amp;gt;&lt;br /&gt;
      &amp;lt;p class=&amp;quot;card-text&amp;quot;&amp;gt;&lt;br /&gt;
Students can mark an activity as complete from within the activity itself.&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;div class=&amp;quot;card&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;card-body&amp;quot;&amp;gt;&lt;br /&gt;
[[File:TeacherCompletionSettings.png|class=img-fluid]]&lt;br /&gt;
      &amp;lt;h4 class=&amp;quot;card-title&amp;quot;&amp;gt;&lt;br /&gt;
New display settings&lt;br /&gt;
      &amp;lt;/h4&amp;gt;&lt;br /&gt;
      &amp;lt;p class=&amp;quot;card-text&amp;quot;&amp;gt;&lt;br /&gt;
New settings allow teachers to hide or show activity dates and completion conditions on the course page.&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Accessibility toolkit===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;card-deck mt-3&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;div class=&amp;quot;card&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;card-body&amp;quot;&amp;gt;&lt;br /&gt;
[[File:BrickfieldAdmin1.png|class=img-fluid]]&lt;br /&gt;
      &amp;lt;h4 class=&amp;quot;card-title&amp;quot;&amp;gt;&lt;br /&gt;
Free starter toolkit&lt;br /&gt;
      &amp;lt;/h4&amp;gt;&lt;br /&gt;
      &amp;lt;p class=&amp;quot;card-text&amp;quot;&amp;gt;&lt;br /&gt;
An [[Accessibility toolkit]] (from Brickfield Education Labs) identifies course accessibility issues.&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;div class=&amp;quot;card&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;card-body&amp;quot;&amp;gt;&lt;br /&gt;
[[File:AccessiblityBlock.png|class=img-fluid]]&lt;br /&gt;
      &amp;lt;h4 class=&amp;quot;card-title&amp;quot;&amp;gt;&lt;br /&gt;
Course accessibility review&lt;br /&gt;
      &amp;lt;/h4&amp;gt;&lt;br /&gt;
      &amp;lt;p class=&amp;quot;card-text&amp;quot;&amp;gt;&lt;br /&gt;
Course content is analysed so teachers can identify and fix accessibility errors.&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;card-deck mt-3&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;div class=&amp;quot;card&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;card-body&amp;quot;&amp;gt;&lt;br /&gt;
[[File:BrickfieldTeacher.png|class=img-fluid]]&lt;br /&gt;
      &amp;lt;h4 class=&amp;quot;card-title&amp;quot;&amp;gt;&lt;br /&gt;
Heatmap of errors&lt;br /&gt;
      &amp;lt;/h4&amp;gt;&lt;br /&gt;
      &amp;lt;p class=&amp;quot;card-text&amp;quot;&amp;gt;&lt;br /&gt;
A heatmap offers a coloured and contextual view of the areas of concern.&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;div class=&amp;quot;card&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;card-body&amp;quot;&amp;gt;&lt;br /&gt;
[[File:SummaryReport.png|class=img-fluid]]&lt;br /&gt;
      &amp;lt;h4 class=&amp;quot;card-title&amp;quot;&amp;gt;&lt;br /&gt;
Range of reports and graphs&lt;br /&gt;
      &amp;lt;/h4&amp;gt;&lt;br /&gt;
      &amp;lt;p class=&amp;quot;card-text&amp;quot;&amp;gt;&lt;br /&gt;
Errors can be viewed in graphic form, or as a list with a downloadable report.&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===H5P and content  bank===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;card-deck mt-3&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;div class=&amp;quot;card&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;card-body&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DisableH5Pcontent.png|class=img-fluid]]&lt;br /&gt;
      &amp;lt;h4 class=&amp;quot;card-title&amp;quot;&amp;gt;&lt;br /&gt;
Disable selected H5P content types&lt;br /&gt;
      &amp;lt;/h4&amp;gt;&lt;br /&gt;
      &amp;lt;p class=&amp;quot;card-text&amp;quot;&amp;gt;&lt;br /&gt;
Admins can disable selected [[H5P|H5P content types]] from the admin settings.&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;div class=&amp;quot;card&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;card-body&amp;quot;&amp;gt;&lt;br /&gt;
[[File:MakeUnlisted.png|class=img-fluid]]&lt;br /&gt;
      &amp;lt;h4 class=&amp;quot;card-title&amp;quot;&amp;gt;&lt;br /&gt;
Mark content as unlisted&lt;br /&gt;
      &amp;lt;/h4&amp;gt;&lt;br /&gt;
      &amp;lt;p class=&amp;quot;card-text&amp;quot;&amp;gt;&lt;br /&gt;
Teachers can hide content in the [[Content bank|content bank]] by marking it as unlisted.&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;card-deck mt-3&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;div class=&amp;quot;card&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;card-body&amp;quot;&amp;gt;&lt;br /&gt;
[[File:LinkedContent.png|class=img-fluid]]&lt;br /&gt;
      &amp;lt;h4 class=&amp;quot;card-title&amp;quot;&amp;gt;&lt;br /&gt;
See which content is linked&lt;br /&gt;
      &amp;lt;/h4&amp;gt;&lt;br /&gt;
      &amp;lt;p class=&amp;quot;card-text&amp;quot;&amp;gt;&lt;br /&gt;
A new column in the [[Content bank|content bank]] displays the number of times an item is linked.&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;div class=&amp;quot;card&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;card-body&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DeleteAlert.png|class=img-fluid]]&lt;br /&gt;
      &amp;lt;h4 class=&amp;quot;card-title&amp;quot;&amp;gt;&lt;br /&gt;
Alert when deleting linked content&lt;br /&gt;
      &amp;lt;/h4&amp;gt;&lt;br /&gt;
      &amp;lt;p class=&amp;quot;card-text&amp;quot;&amp;gt;&lt;br /&gt;
An alert is displayed when linked content is about to be deleted, explaining what will happen&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Quiz and question types===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;card-deck mt-3&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;div class=&amp;quot;card&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;card-body&amp;quot;&amp;gt;&lt;br /&gt;
[[File:QuizOverridePassGrade.png|class=img-fluid]]&lt;br /&gt;
      &amp;lt;h4 class=&amp;quot;card-title&amp;quot;&amp;gt;&lt;br /&gt;
View overrides and pass grades&lt;br /&gt;
      &amp;lt;/h4&amp;gt;&lt;br /&gt;
      &amp;lt;p class=&amp;quot;card-text&amp;quot;&amp;gt;&lt;br /&gt;
Teachers can view overrides and students can view pass grades directly on the Quiz page.&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;div class=&amp;quot;card&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;card-body&amp;quot;&amp;gt;&lt;br /&gt;
[[File:RetainedQuestionSettings.png|class=img-fluid]]&lt;br /&gt;
      &amp;lt;h4 class=&amp;quot;card-title&amp;quot;&amp;gt;&lt;br /&gt;
Preferred question settings retained&lt;br /&gt;
      &amp;lt;/h4&amp;gt;&lt;br /&gt;
      &amp;lt;p class=&amp;quot;card-text&amp;quot;&amp;gt;&lt;br /&gt;
Changes from the default settings of a question type are retained for the next time a teacher creates a question.&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;card-deck mt-3&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;div class=&amp;quot;card&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;card-body&amp;quot;&amp;gt;&lt;br /&gt;
[[File:QuizMinMaxStudent.png|class=img-fluid]]&lt;br /&gt;
      &amp;lt;h4 class=&amp;quot;card-title&amp;quot;&amp;gt;&lt;br /&gt;
Essay question word limits&lt;br /&gt;
      &amp;lt;/h4&amp;gt;&lt;br /&gt;
      &amp;lt;p class=&amp;quot;card-text&amp;quot;&amp;gt;&lt;br /&gt;
A minimum and maximum word limit can be specified for [[Essay question type|Essay questions]].&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;div class=&amp;quot;card&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;card-body&amp;quot;&amp;gt;&lt;br /&gt;
[[File:PlagiarismSupport.png|class=img-fluid]]&lt;br /&gt;
      &amp;lt;h4 class=&amp;quot;card-title&amp;quot;&amp;gt;&lt;br /&gt;
Essay plagiarism support&lt;br /&gt;
      &amp;lt;/h4&amp;gt;&lt;br /&gt;
      &amp;lt;p class=&amp;quot;card-text&amp;quot;&amp;gt;&lt;br /&gt;
If a plagiarism checker is installed, it now supports the [[Essay question type]].&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Badges===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;card-deck mt-3&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;div class=&amp;quot;card&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;card-body&amp;quot;&amp;gt;&lt;br /&gt;
[[File:ManageBackPacks.png|class=img-fluid]]&lt;br /&gt;
      &amp;lt;h4 class=&amp;quot;card-title&amp;quot;&amp;gt;&lt;br /&gt;
Better backpack management&lt;br /&gt;
      &amp;lt;/h4&amp;gt;&lt;br /&gt;
      &amp;lt;p class=&amp;quot;card-text&amp;quot;&amp;gt;&lt;br /&gt;
Admins can set the order in which [[Backpacks|backpacks]] are listed for users.&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;div class=&amp;quot;card&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;card-body&amp;quot;&amp;gt;&lt;br /&gt;
[[File:BadgesAPI.png|class=img-fluid]]&lt;br /&gt;
      &amp;lt;h4 class=&amp;quot;card-title&amp;quot;&amp;gt;&lt;br /&gt;
Open Badges v 2.1 compliant&lt;br /&gt;
      &amp;lt;/h4&amp;gt;&lt;br /&gt;
      &amp;lt;p class=&amp;quot;card-text&amp;quot;&amp;gt;&lt;br /&gt;
Moodle 3.11 is Open Badges v 2.1 compliant and a new [[OAuth 2 Open Badges service]] enables users to connect to their OB v 2.1 compliant backpack without having to enter their credentials into Moodle.&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===User profile fields===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;card-deck mt-3&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;div class=&amp;quot;card&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;card-body&amp;quot;&amp;gt;&lt;br /&gt;
[[File:SocialField.png|class=img-fluid]]&lt;br /&gt;
      &amp;lt;h4 class=&amp;quot;card-title&amp;quot;&amp;gt;&lt;br /&gt;
New Social profile field&lt;br /&gt;
      &amp;lt;/h4&amp;gt;&lt;br /&gt;
      &amp;lt;p class=&amp;quot;card-text&amp;quot;&amp;gt;&lt;br /&gt;
A new [[User profile fields#Overview| Social profile field]] replaces the hard-coded fields in the user profile.&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;div class=&amp;quot;card&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;card-body&amp;quot;&amp;gt;&lt;br /&gt;
[[File:UserProfileUserIdentity.png|class=img-fluid]]&lt;br /&gt;
      &amp;lt;h4 class=&amp;quot;card-title&amp;quot;&amp;gt;&lt;br /&gt;
Custom profile fields selectable in Show user identity&lt;br /&gt;
      &amp;lt;/h4&amp;gt;&lt;br /&gt;
      &amp;lt;p class=&amp;quot;card-text&amp;quot;&amp;gt;&lt;br /&gt;
Custom profile fields may be selected in User polices &amp;gt; Show user identity so they display in participant lists.&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Other features and improvements===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;card-deck mt-3&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;div class=&amp;quot;card&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;card-body&amp;quot;&amp;gt;&lt;br /&gt;
[[File:PlayRate.png|class=img-fluid]]&lt;br /&gt;
      &amp;lt;h4 class=&amp;quot;card-title&amp;quot;&amp;gt;&lt;br /&gt;
Control audio / video playback rates&lt;br /&gt;
      &amp;lt;/h4&amp;gt;&lt;br /&gt;
      &amp;lt;p class=&amp;quot;card-text&amp;quot;&amp;gt;&lt;br /&gt;
Students can control the speed at which [[Audio]] and [[Video]] files will play.&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;div class=&amp;quot;card&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;card-body&amp;quot;&amp;gt;&lt;br /&gt;
[[File:ActivityCompletionreport.png|class=img-fluid]]&lt;br /&gt;
      &amp;lt;h4 class=&amp;quot;card-title&amp;quot;&amp;gt;&lt;br /&gt;
Improved activity completion report&lt;br /&gt;
      &amp;lt;/h4&amp;gt;&lt;br /&gt;
      &amp;lt;p class=&amp;quot;card-text&amp;quot;&amp;gt;&lt;br /&gt;
The activity completion report may be filtered by activity and activity order.&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;card-deck mt-3&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;div class=&amp;quot;card&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;card-body&amp;quot;&amp;gt;&lt;br /&gt;
[[File:SearchLangPacks.png|class=img-fluid]]&lt;br /&gt;
      &amp;lt;h4 class=&amp;quot;card-title&amp;quot;&amp;gt;&lt;br /&gt;
Search language packs&lt;br /&gt;
      &amp;lt;/h4&amp;gt;&lt;br /&gt;
      &amp;lt;p class=&amp;quot;card-text&amp;quot;&amp;gt;&lt;br /&gt;
The list of languages may be searched when installing new [[Language packs]].&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;div class=&amp;quot;card&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;card-body&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Poppler.png|class=img-fluid]]&lt;br /&gt;
      &amp;lt;h4 class=&amp;quot;card-title&amp;quot;&amp;gt;&lt;br /&gt;
New PDF to PNG converter&lt;br /&gt;
      &amp;lt;/h4&amp;gt;&lt;br /&gt;
      &amp;lt;p class=&amp;quot;card-text&amp;quot;&amp;gt;&lt;br /&gt;
For assignment submission annotations, a new converter, Poppler is available instead of Ghostscript.&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;card-deck mt-3&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;div class=&amp;quot;card&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;card-body&amp;quot;&amp;gt;&lt;br /&gt;
[[File:SectionNameLinks.png|class=img-fluid]]&lt;br /&gt;
      &amp;lt;h4 class=&amp;quot;card-title&amp;quot;&amp;gt;&lt;br /&gt;
Section links block&lt;br /&gt;
      &amp;lt;/h4&amp;gt;&lt;br /&gt;
      &amp;lt;p class=&amp;quot;card-text&amp;quot;&amp;gt;&lt;br /&gt;
Titles may now be displayed in the Section links block.&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;div class=&amp;quot;card&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;card-body&amp;quot;&amp;gt;&lt;br /&gt;
[[File:OverridePermissions.png|class=img-fluid]]&lt;br /&gt;
      &amp;lt;h4 class=&amp;quot;card-title&amp;quot;&amp;gt;&lt;br /&gt;
Restore/import role permissions&lt;br /&gt;
      &amp;lt;/h4&amp;gt;&lt;br /&gt;
      &amp;lt;p class=&amp;quot;card-text&amp;quot;&amp;gt;&lt;br /&gt;
Enable or disable role permission overrides when restoring or importing a course.&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:New features]]&lt;br /&gt;
&lt;br /&gt;
 [[de:Neue Funktionalitäten]]&lt;br /&gt;
 [[es:Nuevas características de Moodle 3.11]]&lt;br /&gt;
 [[fr:Nouveautés de Moodle 3.11]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Course_contents_block&amp;diff=140854</id>
		<title>Course contents block</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Course_contents_block&amp;diff=140854"/>
		<updated>2021-07-14T13:24:46Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Text replacement - &amp;quot;class=&amp;quot;nicetable&amp;quot;&amp;quot; to &amp;quot;class=&amp;quot;wikitable&amp;quot;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Course contents block&#039;&#039;&#039; produces a table of contents for the course - ie a list of all visible topics/weeks in your course. Clicking at one of these links will display that particular section (topic or week).&lt;br /&gt;
&lt;br /&gt;
If the section has its name defined, the block uses it as the title for that section.&lt;br /&gt;
&lt;br /&gt;
If the section name is not defined but there is the section summary (description) available, the block automatically extracts a suitable title from that summary. If you start summary with a heading (H1, H2, H3, etc), it will use such heading text. If your summary starts with a bold text, it will be used as a section title. If the summary consists of several paragraphs, the first one will be used.  Technically spoken, the plain text content of the first non-empty HTML DOM node from the section summary is used as the summary title.&lt;br /&gt;
&lt;br /&gt;
If the summary is empty, a customizable text &amp;quot;Unit X&amp;quot; (where X is the number) is displayed.&lt;br /&gt;
&lt;br /&gt;
You can combine this feature with the multi-language filter to generate course contents in the user&#039;s language.&lt;br /&gt;
&lt;br /&gt;
The block was written and is currently maintained by [[User:David Mudrak|David Mudrak]]&lt;br /&gt;
&lt;br /&gt;
[[Image:course-contents-block-screenshot.png|thumb|The topic title is automatically extracted from the section summary|400px|left]]&lt;br /&gt;
&amp;lt;br clear=&amp;quot;both&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
&lt;br /&gt;
There is a public source code repository for the block at [https://github.com/mudrd8mz/moodle-block_course_contents github.com]. You can either clone that repository or just download the latest package there. Follow the instructions provided by Github or see [[Git for Administrators]] for details. This may be what you want:&lt;br /&gt;
&lt;br /&gt;
 # cd /var/www/moodlesite/htdocs/blocks&lt;br /&gt;
 # git clone git://github.com/mudrd8mz/moodle-block_course_contents.git course_contents&lt;br /&gt;
 # cd course_contents&lt;br /&gt;
 # git checkout -b local_22_STABLE origin/MOODLE_22_STABLE&lt;br /&gt;
&lt;br /&gt;
If your Moodle dirroot is git checkout too, you may want to add the block directory into the list of ignored files:&lt;br /&gt;
&lt;br /&gt;
 # cd /var/www/moodlesite/htdocs&lt;br /&gt;
 # echo /blocks/course_contents/ &amp;gt;&amp;gt; .git/info/exclude&lt;br /&gt;
&lt;br /&gt;
To download the block in ZIP or TAR.GZ packages, follow [https://github.com/mudrd8mz/moodle-block_course_contents/tags this page]&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! &amp;lt;center&amp;gt;Start of the section summary HTML&amp;lt;/center&amp;gt;&lt;br /&gt;
! &amp;lt;center&amp;gt;Automatic course contents line&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;Welcome!&amp;lt;br /&amp;gt;In this course, you will ...&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| Welcome!&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;&amp;lt;h1&amp;gt;Introduction&amp;lt;/h1&amp;gt;&amp;lt;p&amp;gt;In this course ...&amp;lt;/p&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| Introduction&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;&amp;lt;h1&amp;gt;&amp;lt;span&amp;gt;Lesson 1&amp;lt;/span&amp;gt;: Introduction&amp;lt;/h1&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| Lesson 1&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [http://moodle.org/plugins/pluginversions.php?plugin=block_course_contents Plugins database record]&lt;br /&gt;
&lt;br /&gt;
[[Category:Block]]&lt;br /&gt;
[[Category:Contributed code]]&lt;br /&gt;
&lt;br /&gt;
[[es:Bloque de contenidos del curso]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Development:Dialogue_2.0_specification&amp;diff=140853</id>
		<title>Development:Dialogue 2.0 specification</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Development:Dialogue_2.0_specification&amp;diff=140853"/>
		<updated>2021-07-14T13:24:39Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Text replacement - &amp;quot;class=&amp;quot;nicetable&amp;quot;&amp;quot; to &amp;quot;class=&amp;quot;wikitable&amp;quot;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page tracks and summarises the progress of rewrite of the [[Dialogue]] module for Moodle 2.0. {{Moodle 2.0}}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;float: right;&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Dialogue 2.0 specification&lt;br /&gt;
|-&lt;br /&gt;
| Status&lt;br /&gt;
| &#039;&#039;&#039;Draft&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Tracker&lt;br /&gt;
| http://tracker.moodle.org/browse/CONTRIB-2059 | CONTRIB-2059&lt;br /&gt;
|-&lt;br /&gt;
| Discussion&lt;br /&gt;
| [http://moodle.org/mod/forum/discuss.php?d=157941 Review and comments]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
The Dialogue module  allows students or teachers to start a two-way conversation with another person. The Dialogue is a course activity that can be useful when the teacher wants a place to give private feedback to a student on their online activity. For example, if a student is participating in a language forum and made a grammatical error that the teacher wants to point out without embarrassing the student, a dialogue is the perfect place. A dialogue activity would also be an excellent way for counselors within an institution to interact with students - all activities are logged and email is available but not necessarily required.  The Dialogue is also a useful alternative to email or private Messages as the conversations are located within a course.  The Dialogue module can be backed up with other course activities.&lt;br /&gt;
=== Usage scenarios ===&lt;br /&gt;
* Teacher posts the same message to all students in ‘Course A’, future enrolled students also receive the same message.  Individual conversation created between teacher and each student.  Multiple replies are allowed.&lt;br /&gt;
* Teacher posts the same message to all members of ‘Group A’, future group members also receive the same message.  Individual conversation created between teacher and each user (any role) in ‘Group A’.  Multiple replies are allowed.&lt;br /&gt;
* Teacher posts the same message to specific students in ‘Course A’.  Individual conversation created between teacher and each student.  Multiple replies are allowed.&lt;br /&gt;
* Teacher posts a message to a specific student in ‘Course A’.  Individual conversation created between teacher and specific student .  Student can view but not reply.  Multiple followup replies are allowed for teacher.&lt;br /&gt;
* Student posts a message to a specific teacher in ‘Course A’.  Individual conversation created between teacher and student.  Multiple followup replies are allowed.&lt;br /&gt;
* Teacher A leaves, Teacher B needs to manage all conversations to allow followup replies, close and delete.&lt;br /&gt;
* Specific Student (eg Class Rep with own role) posts a message to all students in ‘Course A’.  Individual conversation created between Class Rep and each student.  Multiple followup replies are allowed.&lt;br /&gt;
* Specific Student (eg Class Rep with own role) posts a message to a specific student in ‘Course A’.  Individual conversation created between Class Rep and specific student.  Multiple followup replies are allowed.&lt;br /&gt;
* Specific Student posts a message into a specific role (eg Class Rep role).  Individual conversation created between specific student and Class Rep.  Multiple followup replies are allowed.&lt;br /&gt;
* All Teachers can view and participate in any existing conversation in a shared teaching situation.&lt;br /&gt;
&lt;br /&gt;
=== Design goals ===&lt;br /&gt;
# Retain existing functionality.&lt;br /&gt;
# Enhance usage scenarios, flexibility and control.&lt;br /&gt;
# Enhance user interface.&lt;br /&gt;
&lt;br /&gt;
== Glossary ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Term&lt;br /&gt;
! Definition&lt;br /&gt;
|-&lt;br /&gt;
| Dialogue&lt;br /&gt;
| An instance of a dialogue activity module. &lt;br /&gt;
|-&lt;br /&gt;
| Conversation&lt;br /&gt;
| An instance of communication between two users within a dialogue activity. Follow vertical linear pattern.&lt;br /&gt;
|-&lt;br /&gt;
| Reply&lt;br /&gt;
| A message posted in reply to conversational text.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== User interface mock-ups ==&lt;br /&gt;
=== Dialogue listing ===&lt;br /&gt;
[[Image:DRAFT dialogue2.0 mockup-mainindex.png | sample | 600px]]&lt;br /&gt;
&lt;br /&gt;
=== Dialogue view ===&lt;br /&gt;
[[Image:DRAFT dialogue2.0 mockup-readnpost.png | sample | 600px]]&lt;br /&gt;
&lt;br /&gt;
[[Image:DRAFT dialogue2.0 mockup-closed.png | sample | 600px]]&lt;br /&gt;
&lt;br /&gt;
=== Dialogue new ===&lt;br /&gt;
==== Recipient picker ====&lt;br /&gt;
&#039;&#039;&#039;Basic features&#039;&#039;&#039;&lt;br /&gt;
Use a standard drop down for single recipient selection.&lt;br /&gt;
&lt;br /&gt;
[[Image:DRAFT dialogue2.0 mockup-recipentpicker.png]]&lt;br /&gt;
&lt;br /&gt;
Multiple user selection&lt;br /&gt;
&lt;br /&gt;
[[Image:DRAFT dialogue2.0 mockup-standardmultirecipentpicker.png | sample | 600px]]&lt;br /&gt;
&lt;br /&gt;
Use standard multiple user selection interface as found in enrol users, groups e.t.c&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Advanced features&#039;&#039;&#039;&lt;br /&gt;
Ajax recipient picker, must be able to handle both single and multiple recipient selection.&lt;br /&gt;
&lt;br /&gt;
[[Image: DRAFT_dialogue2.0_mockup-ajaxrecipentpicker.png | sample | 300px ]]&lt;br /&gt;
&lt;br /&gt;
== Implementation plan ==&lt;br /&gt;
=== Multiple dialogue open ===&lt;br /&gt;
If user has capability mod/dialogue:openmultiple with permission set to allow, they can select multiple users to open a conversation with that will contain the same subject, body, attachment(s).&lt;br /&gt;
&lt;br /&gt;
=== Auto open multiple ===&lt;br /&gt;
If a user has the capability mod/dialogue:autoopenmultiple with permission set to allow, they can open a automated conversation that will contain the same subject, body, attachment(s) with:&lt;br /&gt;
* &amp;quot;All Participants&amp;quot; -&amp;gt; All course members&lt;br /&gt;
Any newly enrolled users will receive dialogue. &lt;br /&gt;
&lt;br /&gt;
If in group mode&lt;br /&gt;
* &amp;quot;A Group&amp;quot; -&amp;gt; All members in that group.&lt;br /&gt;
* &amp;quot;Multiple Groups&amp;quot; -&amp;gt; e.g Group A, Group C will open with any member of a selected group.&lt;br /&gt;
Any new group member will receive dialogue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&#039;&#039;&#039;Note:&#039;&#039;&#039; New capability mod/dialogue:receive will also determine what roles (student, teacher e.t.c) a user can open a dialogue with.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This information will be stored to a new table &#039;&#039;&#039;mdl_dialogue_automated&#039;&#039;&#039; this will allow user to delete conversation at anytime if they want to stop opening conversations with newly enrolled users or group members. Depending on time, could also add a date range option to control opening.&lt;br /&gt;
&lt;br /&gt;
=== Group support ===&lt;br /&gt;
==== Visible groups mode ====&lt;br /&gt;
User will see all groups listed in the recipient picker.  User can open a conversation with any user or group of users.&lt;br /&gt;
&lt;br /&gt;
==== Separate groups mode ====&lt;br /&gt;
User will see groups they are a member of listed in the recipient picker.  User can open a conversation with any user in a group they are a member of.&lt;br /&gt;
&lt;br /&gt;
User with capability moodle/site:accessallgroups with permission allow will see all groups listed in the recipient picker and can open a conversation with any user regardless of group membership.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&#039;&#039;&#039;Note:&#039;&#039;&#039; New capability mod/dialogue:receive will also determine what roles (student, teacher e.t.c) a user can open a conversation with.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== File attachments ===&lt;br /&gt;
==== File API ====&lt;br /&gt;
Use filemanager element in the formslib to get one or more file from user for each post, file(s) stored permanently for future viewing.&lt;br /&gt;
&lt;br /&gt;
=== Notifications ===&lt;br /&gt;
==== Messaging API ====&lt;br /&gt;
Setup messageprovider for routing notifications.&lt;br /&gt;
&lt;br /&gt;
==== Dialogue module instance options ====&lt;br /&gt;
The following options can be configured when creating a new dialogue module instance or updating/editing a dialogue module instance.&lt;br /&gt;
*Enable notifications&lt;br /&gt;
:Allow notifications, passed on to Messaging API.&lt;br /&gt;
*Include post content in notification&lt;br /&gt;
:If enabled notification will include post content and a link to specific dialogue conversation.  If not enabled notification will include post title and a link to specific dialogue conversation.&lt;br /&gt;
&lt;br /&gt;
=== Event API ===&lt;br /&gt;
&#039;&#039;&#039;user_enrolled()&#039;&#039;&#039;&lt;br /&gt;
:Can be used for any automated opening of dialogues for new course participants when all participants were selected in a multi-open dialogue.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;groups_member_added()&#039;&#039;&#039;&lt;br /&gt;
:Can be used for any automated opening of dialogues for new group members when group(s) were elected in a multi-open dialogue.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;user_unenrolled()&#039;&#039;&#039;&lt;br /&gt;
:Cleanup function, delete any dialogues that user is a recipient.&lt;br /&gt;
&lt;br /&gt;
=== Navigation functions ===&lt;br /&gt;
&#039;&#039;&#039;dialogue_extend_navigation($navref, $course, $module, $cm)&#039;&#039;&#039;&lt;br /&gt;
:Can use for dialogue unread count, filters(All, Unread, Read e.t.c) providing direct linking.&lt;br /&gt;
&#039;&#039;&#039;dialogue_extend_settings_navigation(settings_navigation $settingsnav, navigation_node $dialoguenode)&#039;&#039;&#039;&lt;br /&gt;
:Can use for showing automated open conversations&lt;br /&gt;
&lt;br /&gt;
=== Logging ===&lt;br /&gt;
Dialogue events that will be logged.&lt;br /&gt;
* open&lt;br /&gt;
* view&lt;br /&gt;
* viewall - index&lt;br /&gt;
* reply&lt;br /&gt;
* edit&lt;br /&gt;
* close&lt;br /&gt;
* delete&lt;br /&gt;
&lt;br /&gt;
=== Database structures ===&lt;br /&gt;
[[Image:dialogue2.0_schema.png | sample | 600px ]]&lt;br /&gt;
==== dialogue ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Default&lt;br /&gt;
! Description&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;id&#039;&#039;&#039;&lt;br /&gt;
| int (10)&lt;br /&gt;
| &lt;br /&gt;
| auto-numbered &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| course&lt;br /&gt;
| int (10)&lt;br /&gt;
| 0&lt;br /&gt;
| the course id of this dialogue&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| intro&lt;br /&gt;
| text (medium)&lt;br /&gt;
| &lt;br /&gt;
| the description/assignment of the dialogue &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| introformat &lt;br /&gt;
| int (3)&lt;br /&gt;
| 0&lt;br /&gt;
| the format of the intro field &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int (10)&lt;br /&gt;
| 0&lt;br /&gt;
| the timestamp when the module was modified &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| edittime&lt;br /&gt;
| int (10)&lt;br /&gt;
| 0&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| maxattachments &lt;br /&gt;
| int (3)&lt;br /&gt;
| 1&lt;br /&gt;
| number of attachments &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| maxbytes &lt;br /&gt;
| int (10) &lt;br /&gt;
| 100000&lt;br /&gt;
| maximum size of the one attached file &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| notifications&lt;br /&gt;
| int (2)&lt;br /&gt;
| 1&lt;br /&gt;
| allow post notifications, will use MessagingAPI&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| notificationcontent&lt;br /&gt;
| int (2)&lt;br /&gt;
| 0&lt;br /&gt;
| include post content in notification&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dialogue_conversations ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Default&lt;br /&gt;
! Description&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;id&#039;&#039;&#039;&lt;br /&gt;
| int (10)&lt;br /&gt;
| &lt;br /&gt;
| auto-numbered &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| course&lt;br /&gt;
| int (10)&lt;br /&gt;
| 0&lt;br /&gt;
| the course id this dialogue&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| dialogueid&lt;br /&gt;
| int (10)&lt;br /&gt;
| 0&lt;br /&gt;
| the dialogue instance id&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| subject&lt;br /&gt;
| varchar (255)&lt;br /&gt;
| &#039;&#039;&lt;br /&gt;
| brief summary of message&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| ownerid&lt;br /&gt;
| int (10)&lt;br /&gt;
| 0&lt;br /&gt;
| user id of person who started conversation&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| recipientid&lt;br /&gt;
| int (10)&lt;br /&gt;
| 0&lt;br /&gt;
| user id of person who is to receive conversation&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| message&lt;br /&gt;
| text (medium)&lt;br /&gt;
| &#039;&#039;&lt;br /&gt;
| message text&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| format&lt;br /&gt;
| int (3)&lt;br /&gt;
| 0&lt;br /&gt;
| the format type of message&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| attachment&lt;br /&gt;
| int (2)&lt;br /&gt;
| 0&lt;br /&gt;
| if post contains attachment(s)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| lastreply&lt;br /&gt;
| int (2)&lt;br /&gt;
| 0&lt;br /&gt;
| reply id of last post in the conversation&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| sent&lt;br /&gt;
| int (10)&lt;br /&gt;
| 0&lt;br /&gt;
| flag to indicate if message has been sent to recipient, date sent&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| closed&lt;br /&gt;
| int (10)&lt;br /&gt;
| 0&lt;br /&gt;
| flag to indicate if conversation has been closed, date closed&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int (10)&lt;br /&gt;
| 0&lt;br /&gt;
| flag to indicate conversation as deleted&lt;br /&gt;
| Keep, retrieve only conversations not marked as deleted? date deleted&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int (10)&lt;br /&gt;
| 0&lt;br /&gt;
| the timestamp when the module was modified &lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dialogue_replies ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Default&lt;br /&gt;
! Description&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;id&#039;&#039;&#039;&lt;br /&gt;
| int (10)&lt;br /&gt;
| &lt;br /&gt;
| auto-numbered &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| conversationid&lt;br /&gt;
| int (10)&lt;br /&gt;
| 0&lt;br /&gt;
| the conversation id that reply relates to.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| parentid&lt;br /&gt;
| int (10)&lt;br /&gt;
| 0&lt;br /&gt;
| the previous reply if exists, else if 0 directly follows conversation&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| ownerid&lt;br /&gt;
| int (10)&lt;br /&gt;
| 0&lt;br /&gt;
| user id of person who posted reply&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| message&lt;br /&gt;
| text (medium)&lt;br /&gt;
| &#039;&#039;&lt;br /&gt;
| message text &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| format&lt;br /&gt;
| int (3)&lt;br /&gt;
| 0&lt;br /&gt;
| the format type of message &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| attachment&lt;br /&gt;
| int (2)&lt;br /&gt;
| 0&lt;br /&gt;
| if post contains attachment(s) &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| sent&lt;br /&gt;
| int (2)&lt;br /&gt;
| 0&lt;br /&gt;
| flag to indicate if message has been sent to recipient&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int (10)&lt;br /&gt;
| 0&lt;br /&gt;
| the timestamp when the module was modified&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dialogue_read ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Default&lt;br /&gt;
! Description&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;id&#039;&#039;&#039;&lt;br /&gt;
| int (10)&lt;br /&gt;
| &lt;br /&gt;
| auto-numbered &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int (10)&lt;br /&gt;
| 0&lt;br /&gt;
| user id of person who viewed conversation or reply&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| dialogueid&lt;br /&gt;
| int (10)&lt;br /&gt;
| 0&lt;br /&gt;
| the dialogue id that the conversation relates to.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| conversationid&lt;br /&gt;
| int (10)&lt;br /&gt;
| 0&lt;br /&gt;
| the conversation id that reply relates to&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| replyid&lt;br /&gt;
| int (10)&lt;br /&gt;
| 0&lt;br /&gt;
| the reply id, can be 0 if user has just viewed start of conversation&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| firstread&lt;br /&gt;
| int (10)&lt;br /&gt;
| 0&lt;br /&gt;
| datetime first read&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| lastread&lt;br /&gt;
| int (10)&lt;br /&gt;
| 0&lt;br /&gt;
| datetime last read&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dialogue_automated ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Default&lt;br /&gt;
! Description&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;id&#039;&#039;&#039;&lt;br /&gt;
| int (10)&lt;br /&gt;
| &lt;br /&gt;
| auto-numbered &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| course&lt;br /&gt;
| int (10)&lt;br /&gt;
| 0&lt;br /&gt;
| the course id this dialogue&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| dialogueid&lt;br /&gt;
| int (10)&lt;br /&gt;
| 0&lt;br /&gt;
| the dialogue instance id &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| subject&lt;br /&gt;
| varchar (255)&lt;br /&gt;
| &#039;&#039;&lt;br /&gt;
| brief summary of message &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| ownerid&lt;br /&gt;
| int (10)&lt;br /&gt;
| 0&lt;br /&gt;
| user id of person who started conversation &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| recipients&lt;br /&gt;
| text (small)&lt;br /&gt;
| 0&lt;br /&gt;
| indicators for &amp;quot;All participants&amp;quot; or selected groups&lt;br /&gt;
| serialised array or object&lt;br /&gt;
|-&lt;br /&gt;
| message&lt;br /&gt;
| text (medium)&lt;br /&gt;
| &#039;&#039;&lt;br /&gt;
| message text&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| format&lt;br /&gt;
| int (3)&lt;br /&gt;
| 0&lt;br /&gt;
| the format type of message &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| timestart&lt;br /&gt;
| int (10)&lt;br /&gt;
| 0&lt;br /&gt;
| the datetime start range, users enrolled after will receive&lt;br /&gt;
| later implementation&lt;br /&gt;
|-&lt;br /&gt;
| timeend&lt;br /&gt;
| int (10)&lt;br /&gt;
| 0&lt;br /&gt;
| the datetime end range, users enrolled before will receive&lt;br /&gt;
| later implementation&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int (10)&lt;br /&gt;
| 0&lt;br /&gt;
| the timestamp when the module was modified&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Capabilities and Permissions ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Capability&lt;br /&gt;
! Description&lt;br /&gt;
! Role permissions(defaults)&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| mod/dialogue:open&lt;br /&gt;
| Open a dialogue with single recipient &lt;br /&gt;
| teacher&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| mod/dialogue:receive&lt;br /&gt;
| Can receive a dialogue&lt;br /&gt;
| student&lt;br /&gt;
| Can be used to control what roles are displayed in the recipient picker&lt;br /&gt;
|-&lt;br /&gt;
| mod/dialogue:reply&lt;br /&gt;
| Can reply to a dialogue&lt;br /&gt;
| teacher, student&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| mod/dialogue:closeown&lt;br /&gt;
| Can close a dialogue if have ownership&lt;br /&gt;
| teacher, student&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| mod/dialogue:deleteown&lt;br /&gt;
| Can delete a dialogue if have ownership&lt;br /&gt;
| teacher, student&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| mod/dialogue:deleteownreply&lt;br /&gt;
| Can delete own reply&lt;br /&gt;
| teacher, student&lt;br /&gt;
| Add ability to delete last reply in dialogue thread. &#039;&#039;&#039;Maybe/Maybe not?&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| mod/dialogue:openmultiple&lt;br /&gt;
| Can start a dialogue with multiple recipients&lt;br /&gt;
| teacher&lt;br /&gt;
| For sending the same dialogue to multiple recipients. Used for targeting particular group(s) of users or whole class. &lt;br /&gt;
|- &lt;br /&gt;
| mod/dialogue:autoopenmultiple&lt;br /&gt;
| Can start a automated dialogue with course participants or group members which includes future members.&lt;br /&gt;
| teacher&lt;br /&gt;
|&lt;br /&gt;
|- &lt;br /&gt;
| mod/dialogue:viewany&lt;br /&gt;
| view any conversation, reply&lt;br /&gt;
| administrator&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| mod/dialogue:replyany&lt;br /&gt;
| can reply in any conversation to any reply &lt;br /&gt;
| administrator&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| mod/dialogue:closeany&lt;br /&gt;
| can close any conversation&lt;br /&gt;
| administrator&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| mod/dialogue:deleteany&lt;br /&gt;
| can delete any conversation &lt;br /&gt;
| administrator&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Backup and Restore ===&lt;br /&gt;
Create backup and restore functions under 2.0&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1.9x&#039;&#039;&#039;&lt;br /&gt;
Restoring a 1.9x backup into a 2.0 Moodle? TO-DO&lt;br /&gt;
&lt;br /&gt;
=== Upgrade Process ===&lt;br /&gt;
Will need to map existing table structure to new table structure once finalised.&lt;br /&gt;
&lt;br /&gt;
===  Translations ===&lt;br /&gt;
Current 1.9x translations&lt;br /&gt;
* en English&lt;br /&gt;
* de Deutsch German&lt;br /&gt;
* es Español Spanish&lt;br /&gt;
* it Italiano Italian&lt;br /&gt;
&lt;br /&gt;
== Project schedule ==&lt;br /&gt;
=== Milestone 1 ===&lt;br /&gt;
Date: 08/10/2010&lt;br /&gt;
&lt;br /&gt;
Goal: The specification is reviewed and agreed on by the community. The implementation plan is transferred into sub-tasks in the tracker&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributed code]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Development:Google_Gears_integration&amp;diff=140852</id>
		<title>Development:Google Gears integration</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Development:Google_Gears_integration&amp;diff=140852"/>
		<updated>2021-07-14T13:24:39Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Text replacement - &amp;quot;class=&amp;quot;nicetable&amp;quot;&amp;quot; to &amp;quot;class=&amp;quot;wikitable&amp;quot;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{GSOC 09}}&lt;br /&gt;
Project specification, Google Summer of Code 2009 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Executive Summary:&#039;&#039;&#039; This project is based on the idea of [http://moodle.org/mod/forum/discuss.php?d=118015 integrating Google Gears to Moodle]. An offline mode will allow people with limited Internet connection to browse activities and other resources, take notes and store them locally, save assignments even if the user is not connected and then upload/synchronize when the user is online. Moreover, the plan is to create a working base/architecture and then make it easier to add offline functionality to any kind of Moodle activity.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Motivation ==&lt;br /&gt;
&lt;br /&gt;
Integrating Google Gears to Moodle would allow to browse the homepage and the course site while offline, and speed up the loading process while online: it stores files on the end user&#039;s computer therefore enhancing local access. It also let webs applications interact naturally with the user&#039;s desktop by storing data locally (in a database) and improving performance by running JavaScript in the background. And last but not least, it is open source.&lt;br /&gt;
&lt;br /&gt;
I find this project particularly useful for communities with a slow bandwidth or where students can get online only a few times a week, download a lesson, and upload what they have worked on while offline. Other potential users would be people who travel and do not want to pay for getting online at an airport, but still continue following a course. The ability to keep learning from useful resources, even if we are not connected to the Internet, was one of my major motivations for this project. This, together with the speeding up advantage, will help Moodle&#039;s performance and usability.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Implementation details ==&lt;br /&gt;
&lt;br /&gt;
Most of the &amp;quot;offline&amp;quot; integration will be done using HTML5, as this is the long term target. At each important step, a translation to Google Gears will be created to make it  accessible for users whose browsers have not implemented HTML5 yet. &lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
* Be able to switch to &amp;quot;Offline mode&amp;quot; at any point &lt;br /&gt;
** Be able to display the homepage, the course pages, course formats, and some modules (to be specified)&lt;br /&gt;
** Be able to follow most of the internal links&lt;br /&gt;
* Be able to reconnect and synchronize back to &amp;quot;Online mode&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Glossary ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Term&lt;br /&gt;
!Definition&lt;br /&gt;
|-&lt;br /&gt;
|Application cache&lt;br /&gt;
|A set of cached resources consisting of one or more resources, identified by URLs&lt;br /&gt;
|-&lt;br /&gt;
|Manifest&lt;br /&gt;
|A list of all the URLs to be captured. It can also contain the version for the manifest file format, the version of the contents of the manifest, and an optional redirection URL.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== To-do list ===&lt;br /&gt;
&lt;br /&gt;
* Start a working flexible base/architecture for Google Gears in Moodle. Define the architecture for the web application: isolate de data layers (local and server), and the incorporation of a data switch and synchronization engine. Begin with the homepage and course page to make sure that we can handle logs and then continue with mod/resource:&lt;br /&gt;
** Store the HTML, CSS and Javascript in the SQLite DB provided by Gears. Use the Database class to store the data.&lt;br /&gt;
** Code and edit a dynamic manifest to include the resource available offline&lt;br /&gt;
** Make use of the LocalServer class to store an initial sample of the Moodle application on the local server. Make sure the application starts offline.&lt;br /&gt;
** Add the WorkerPool class to run the Javascript code in Moodle&lt;br /&gt;
* Submit initial code for evaluation. A student should be able to access resources offline at this point. &lt;br /&gt;
* Based on feedback: debug, clean code, perform more extensive tests on this base architecture.&lt;br /&gt;
* Add a more versatile functionality for other kinds of modules:  database, choice, assignment  (suggested), lesson if possible.&lt;br /&gt;
* Test the functionality above with a limited sample of activities. A student should be able to make changes at this point. For example:&lt;br /&gt;
** Download all the interface for offline visualization&lt;br /&gt;
** Make changes offline in a choice module&lt;br /&gt;
** Save changes&lt;br /&gt;
** Synchronize when back online and upload the choice&lt;br /&gt;
* Revise security holes and permissions.&lt;br /&gt;
* Clean code, perform final tests, and finish documentation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Future Work ===&lt;br /&gt;
&lt;br /&gt;
* Try the functionality to work with all other kinds of activities and a full offline Moodle.&lt;br /&gt;
* Allow for more flexibility when going offline: caching only by week or topic if there is limited memory &lt;br /&gt;
* Use the WorkerPool class to download static files in the background and speed up the user experience&lt;br /&gt;
* Store a local copy of the  database for faster performance&lt;br /&gt;
* Full integration and translation between HTML5 and Google Gears&lt;br /&gt;
* Backward compatibility with Moodle 1.9 and earlier&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
For more information, please visit the following links:&lt;br /&gt;
&lt;br /&gt;
* [http://gears.google.com/ Google Gears]&lt;br /&gt;
* [http://tracker.moodle.org/browse/MDL-18444 Tracker issue]&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=118015 Main forum discussion]&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=107920 About OLPC and GG-based offline-moodle]&lt;br /&gt;
* [https://docs.moodle.org/en/GSOC/2009 Overview of the Google Summer of Code 2009 projects for Moodle]&lt;br /&gt;
&lt;br /&gt;
==Screenshots==&lt;br /&gt;
&lt;br /&gt;
Going offline UI: [[Image:offline-moodle-progress-bar.png]]&lt;br /&gt;
&lt;br /&gt;
Offline forum: [[Image: Offline-forum-module.png]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Development:Quiz_report_statistics&amp;diff=140851</id>
		<title>Development:Quiz report statistics</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Development:Quiz_report_statistics&amp;diff=140851"/>
		<updated>2021-07-14T13:24:39Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Text replacement - &amp;quot;class=&amp;quot;nicetable&amp;quot;&amp;quot; to &amp;quot;class=&amp;quot;wikitable&amp;quot;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;These statistics are designed for use with summative tests where students have just one attempt and complete that attempt.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Test statistics ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Average grade&#039;&#039;: For discriminating, deferred feedback, tests aim for between 50% and 75%. Values outside&lt;br /&gt;
these limits need thinking about. Interactive tests with multiple tries invariably lead to higher averages.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Median grade&#039;&#039;: Half the students score less than this figure.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Standard deviation&#039;&#039;: A measure of the spread of scores about the mean. Aim for values between 12% and&lt;br /&gt;
18%. A smaller value suggests that scores are too bunched up.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Skewness&#039;&#039;: A measure of the asymmetry of the distribution of scores. Zero implies a perfectly symmetrical&lt;br /&gt;
distribution, positive values a ‘tail’ to the right and negative values a ‘tail’ to the left.&lt;br /&gt;
&lt;br /&gt;
[[Image:Skewness.jpg]]&lt;br /&gt;
&lt;br /&gt;
Aim for a value of -1.0. If it is too negative, it may indicate lack of discrimination between students who do better than average. Similarly, a large positive value (greater than 1.0) may indicate a lack of discrimination near the pass fail border.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Kurtosis&#039;&#039;: Kurtosis is a measure of the flatness of the distribution.&lt;br /&gt;
&lt;br /&gt;
A normal, bell shaped, distribution has a kurtosis of zero. The greater the kurtosis, the more peaked is the&lt;br /&gt;
distribution, without much of a tail on either side.&lt;br /&gt;
&lt;br /&gt;
Aim for a value in the range 0-1. A value greater than 1 may indicate that the test is not discriminating&lt;br /&gt;
very well between very good or very bad students and those who are average.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Coefficient of internal consistency (CIC)&#039;&#039;: It is impossible to get internal consistency much above 90%.&lt;br /&gt;
Anything above 75% is satisfactory. If the value is below 64%, the test as a whole is unsatisfactory and&lt;br /&gt;
remedial measures should be considered.&lt;br /&gt;
&lt;br /&gt;
A low value indicates either that some of the questions are not very good at discriminating between&lt;br /&gt;
students of different ability and hence that the differences between total scores owe a good deal to chance&lt;br /&gt;
or that some of the questions are testing a different quality from the rest and that these two qualities do not&lt;br /&gt;
correlate well – i.e. the test as a whole is inhomogeneous.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Error ratio (ER)&#039;&#039;: This is related to CIC according to the following table: it estimates the percentage of the&lt;br /&gt;
standard deviation which is due to chance effects rather than to genuine differences of ability between&lt;br /&gt;
students. Values of ER in excess of 50% cannot be regarded as satisfactory: they imply that less than half&lt;br /&gt;
the standard deviation is due to differences in ability and the rest to chance effects.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! CIC&lt;br /&gt;
! ER&lt;br /&gt;
|-&lt;br /&gt;
| 100&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| 99&lt;br /&gt;
| 10&lt;br /&gt;
|-&lt;br /&gt;
| 96&lt;br /&gt;
| 20&lt;br /&gt;
|-&lt;br /&gt;
| 91&lt;br /&gt;
| 30&lt;br /&gt;
|-&lt;br /&gt;
| 84&lt;br /&gt;
| 40&lt;br /&gt;
|-&lt;br /&gt;
| 75&lt;br /&gt;
| 50&lt;br /&gt;
|-&lt;br /&gt;
| 64&lt;br /&gt;
| 60&lt;br /&gt;
|-&lt;br /&gt;
| 51&lt;br /&gt;
| 700&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Standard error (SE)&#039;&#039;: This is SD x ER/100. It estimates how much of the SD is due to chance effects and is a&lt;br /&gt;
measure of the uncertainty in any given student’s score. If the same student took an equivalent test, his&lt;br /&gt;
or her score could be expected to lie within ±SE of the previous score. The smaller the value of SE the&lt;br /&gt;
better the test, but it is difficult to get it below 5% or 6%. A value of 8% corresponds to half a grade&lt;br /&gt;
difference on a typical scale – if the SE exceeds this, it is likely that a substantial proportion of the&lt;br /&gt;
students will be wrongly graded in the sense that the grades awarded do not accurately indicate their true&lt;br /&gt;
abilities.&lt;br /&gt;
&lt;br /&gt;
== Question statistics ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Facility index (F)&#039;&#039;: The mean score of students on the item.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! F&lt;br /&gt;
! Interpretation&lt;br /&gt;
|-&lt;br /&gt;
| 5 or less&lt;br /&gt;
| Extremely difficult or something wrong with the question.&lt;br /&gt;
|-&lt;br /&gt;
| 6-10&lt;br /&gt;
| Very difficult.&lt;br /&gt;
|-&lt;br /&gt;
| 11-20&lt;br /&gt;
| Difficult.&lt;br /&gt;
|-&lt;br /&gt;
| 20-34&lt;br /&gt;
| Moderately difficult.&lt;br /&gt;
|-&lt;br /&gt;
| 35-64&lt;br /&gt;
| About right for the average student.&lt;br /&gt;
|-&lt;br /&gt;
| 66-80&lt;br /&gt;
| Fairly easy.&lt;br /&gt;
|-&lt;br /&gt;
| 81-89&lt;br /&gt;
| Easy.&lt;br /&gt;
|-&lt;br /&gt;
| 90-94&lt;br /&gt;
| Very easy.&lt;br /&gt;
|-&lt;br /&gt;
| 95-100&lt;br /&gt;
| Extremely easy.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Standard deviation (SD)&#039;&#039;: A measure of the spread of scores about the mean and hence the extent to which&lt;br /&gt;
the question might discriminate. If F is very high or very low it is impossible for the spread to be large.&lt;br /&gt;
Note however that a good SD does not automatically ensure good discrimination. A value of SD less than&lt;br /&gt;
about a third of the question maximum (i.e. 33%) in the table is not generally satisfactory.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Random guess score (RGS)&#039;&#039;: This is the mean score students would be expected to get for a random guess at&lt;br /&gt;
the question. Random guess scores are only available for questions that use some form of multiple choice.&lt;br /&gt;
All random guess scores are for deferred feedback only and assume the simplest situation e.g. for multiple&lt;br /&gt;
response questions students will be told how many answers are correct.&lt;br /&gt;
&lt;br /&gt;
Values above 40% are unsatisfactory – and show that True/False questions must be used sparsely in summative tests.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Intended weight&#039;&#039;: The question weight expressed as a percentage of the overall test score.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Effective weight&#039;&#039;: An estimate of the weight the question actually has in contributing to the overall spread of&lt;br /&gt;
scores. The effective weights should add to 100% - but read on.&lt;br /&gt;
&lt;br /&gt;
The intended weight and effective weight are intended to be compared. If the effective weight is greater&lt;br /&gt;
than the intended weight it shows the question has a greater share in the spread of scores than may have&lt;br /&gt;
been intended. If it is less than the intended weight it shows that it is not having as much effect in&lt;br /&gt;
spreading out the scores as was intended.&lt;br /&gt;
&lt;br /&gt;
The calculation of the effective weight relies on taking the square root of the covariance of the question&lt;br /&gt;
scores with overall performance. If a question’s scores vary in the opposite way to the overall score, this&lt;br /&gt;
would indicate that this is a very odd question which is testing something different from the rest. And the&lt;br /&gt;
computer cannot calculate the effective weights of such questions resulting in warning message boxes&lt;br /&gt;
being displayed.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Discrimination index&#039;&#039;: This is the correlation between the weighted scores on the question and those on the&lt;br /&gt;
rest of the test. It indicates how effective the question is at sorting out able students from those who are&lt;br /&gt;
less able. The results should be interpreted as follows&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Index&lt;br /&gt;
! Interpretation&lt;br /&gt;
|-&lt;br /&gt;
| 50 and above&lt;br /&gt;
| Very good discrimination&lt;br /&gt;
|-&lt;br /&gt;
| 30 – 50&lt;br /&gt;
| Adequate discrimination&lt;br /&gt;
|-&lt;br /&gt;
| 20 - 29&lt;br /&gt;
| Weak discrimination&lt;br /&gt;
|-&lt;br /&gt;
| 0 - 19&lt;br /&gt;
| Very weak discrimination&lt;br /&gt;
|-&lt;br /&gt;
| -ve&lt;br /&gt;
| Question probably invalid&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Discrimination efficiency&#039;&#039;: This statistic attempts to estimate how good the discrimination index is relative&lt;br /&gt;
to the difficulty of the question.&lt;br /&gt;
&lt;br /&gt;
An item which is very easy or very difficult cannot discriminate between students of different ability,&lt;br /&gt;
because most of them get the same score on that question. Maximum discrimination requires a facility&lt;br /&gt;
index in the range 30% - 70% (although such a value is no guarantee of a high discrimination index).&lt;br /&gt;
&lt;br /&gt;
The discrimination efficiency will very rarely approach 100%, but values in excess of 50% should be&lt;br /&gt;
achievable. Lower values indicate that the question is not nearly as effective at discriminating between&lt;br /&gt;
students of different ability as it might be and therefore is not a particularly good question.&lt;br /&gt;
&lt;br /&gt;
--[[User:Phil Butcher|Phil Butcher]] 15:53, 27 September 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Grade_hiding&amp;diff=140850</id>
		<title>Grade hiding</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Grade_hiding&amp;diff=140850"/>
		<updated>2021-07-14T13:24:38Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Text replacement - &amp;quot;class=&amp;quot;nicetable&amp;quot;&amp;quot; to &amp;quot;class=&amp;quot;wikitable&amp;quot;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Grades}}&lt;br /&gt;
==Introduction==&lt;br /&gt;
Assessors often decide to hide grades and feedback until marking is complete and finalised, and then release them all at once. &lt;br /&gt;
&lt;br /&gt;
Although Workflow allows this (and is particularly helpful where there are several multiple markers) it is sometimes quicker to simply hide the grades in the Grader Report until it is time to release them. This page explains how to do that.&lt;br /&gt;
{{Note|Using Show/Hide for an Assignment on the course front page has &#039;&#039;&#039;no effect&#039;&#039;&#039; on whether its grades are shown or hidden for students. The assignment and its grades are entirely independent from each other, so the grades must be show or hidden independently.}}&lt;br /&gt;
&lt;br /&gt;
{{Note|If you are using the Grader Report to calculate final grades, do ensure those activities are not hidden when you carry out the calculation.}}&lt;br /&gt;
&lt;br /&gt;
{{Note|Newly created activities &#039;&#039;&#039;do not&#039;&#039;&#039; inherit visibility from the grade category.}}&lt;br /&gt;
&lt;br /&gt;
==Automatically hide grades and feedback until a set date==&lt;br /&gt;
This is useful if you have agreed a fixed date to reveal marks and feedback to students. It saves you needing to remember to do this manually (though you can manually change the date if you need to).&lt;br /&gt;
#In the Grader Report, turn editing on; further settings and controls display.&lt;br /&gt;
#In the activity&#039;s column, in its &#039;&#039;&#039;Controls&#039;&#039;&#039; row, click the &#039;&#039;&#039;Edit&#039;&#039;&#039; icon; a settings page displays.&lt;br /&gt;
#To reveal the settings for dates setting, click the link to &#039;&#039;&#039;Show more&#039;&#039;&#039;; further settings display.&lt;br /&gt;
#For the &#039;&#039;&#039;Hidden until&#039;&#039;&#039; setting, click its Enable checkbox; it becomes editable.&lt;br /&gt;
#Type in the date and time to reveal the marks and feedback.&lt;br /&gt;
#Save.&lt;br /&gt;
&lt;br /&gt;
==Manually hide grades and feedback==&lt;br /&gt;
This is best used if you never want students to see the grades or feedback, or if you are unsure of the date on which they need to be revealed.&lt;br /&gt;
#To get to the Grader Report go to your Moodle course front page and in its Settings click Grades; the Grader Report displays.&lt;br /&gt;
#&#039;&#039;&#039;Turn editing on&#039;&#039;&#039;; further settings and controls display.&lt;br /&gt;
# Note that columns correspond to activities, and each column has &#039;&#039;&#039;Controls&#039;&#039;&#039; (just below the column title) which act on that entire activity.&lt;br /&gt;
#To hide grades and feedback for an assignment, find its column and click the &#039;&#039;&#039;Show/Hide&#039;&#039;&#039; icon in the &#039;&#039;&#039;Controls&#039;&#039;&#039; row.&lt;br /&gt;
#In this case there is no need to Save - the effects are immediate.&lt;br /&gt;
&lt;br /&gt;
==An example of how hiding grades might be used==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Phase&lt;br /&gt;
!Hidden&lt;br /&gt;
![[Grade locking|Locked]]&lt;br /&gt;
|-&lt;br /&gt;
|Before the due date; participant submissions&lt;br /&gt;
|Yes&lt;br /&gt;
|No&lt;br /&gt;
|-&lt;br /&gt;
|Due date and beginning of grading/feedback&lt;br /&gt;
|Yes&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|End of grading/feedback, release of grades&lt;br /&gt;
|No&lt;br /&gt;
|Yes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[ca:Ocultació_de_qualificacions]]&lt;br /&gt;
[[es:Ocultamiento de calificación]]&lt;br /&gt;
[[fr:Note cachée]]&lt;br /&gt;
[[ja:評定非表示]]&lt;br /&gt;
[[de:Bewertungen verbergen]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Outcomes&amp;diff=140849</id>
		<title>Outcomes</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Outcomes&amp;diff=140849"/>
		<updated>2021-07-14T13:24:38Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Text replacement - &amp;quot;class=&amp;quot;nicetable&amp;quot;&amp;quot; to &amp;quot;class=&amp;quot;wikitable&amp;quot;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Grades}}&lt;br /&gt;
==What are outcomes?==&lt;br /&gt;
&lt;br /&gt;
Outcomes are specific descriptions of what a student has demonstrated and understood at the completion of an activity or course. Each outcome is rated by some sort of [[Scales|scale]]. Other terms for outcomes are &#039;Competencies&#039; and &#039;Goals&#039;. &lt;br /&gt;
&lt;br /&gt;
In simple terms outcomes are similar to sub components of a grade.  A grade is an assessment of overall performance that may include tests, participation, attendance and projects. Outcomes assess specific levels of knowledge through a series of statements, that maybe coded with numbers or letters.   Thus an overall grade can be given for a course, along with statements about specific competencies in the form of outcomes.  &lt;br /&gt;
&lt;br /&gt;
{{Note|Moodle 3.1 includes a new feature, [[Competencies]], which enables [[Learning plans]] to be set up. It provides an alternative to outcomes.}}&lt;br /&gt;
&lt;br /&gt;
==Enabling outcomes==&lt;br /&gt;
&lt;br /&gt;
To enable outcomes to be used in any course on the site&lt;br /&gt;
&lt;br /&gt;
# Go to &#039;&#039;Site administration &amp;gt; Advanced features&#039;&#039;&lt;br /&gt;
# Tick the &#039;&#039;Enable outcomes&#039;&#039; checkbox&lt;br /&gt;
# Save changes&lt;br /&gt;
&lt;br /&gt;
==Adding course-level outcomes==&lt;br /&gt;
&lt;br /&gt;
[[Image:addnewoutcome.png|thumb|Adding an outcome]]&lt;br /&gt;
To add a course-level outcome:&lt;br /&gt;
&lt;br /&gt;
# Click the &#039;Edit outcomes&#039; link in &#039;&#039;Course administration &amp;gt; Outcomes&#039;&#039;&lt;br /&gt;
# Click the &#039;Add a new outcome&#039; button&lt;br /&gt;
# Complete the form then click the &#039;Save changes&#039; button.&lt;br /&gt;
&lt;br /&gt;
==Adding standard outcomes==&lt;br /&gt;
&lt;br /&gt;
An administrator can add standard outcomes, which are available site-wide, in &#039;&#039;Site administration &amp;gt; Grades &amp;gt; Outcomes&#039;&#039;. Multiple standard outcomes can be added using the import outcomes functionality (see below).&lt;br /&gt;
&lt;br /&gt;
==Using outcomes==&lt;br /&gt;
&lt;br /&gt;
# Choose or define some outcomes for your course (as described above).&lt;br /&gt;
# For each activity, choose which of these outcomes apply using the checkbox in the activity&#039;s settings page.&lt;br /&gt;
# When grading that activity, grade each student using the Outcome scales. Note: You can also edit the grades in the [[Grader report]] (useful for modules that don&#039;t feature inbuilt grading).&lt;br /&gt;
# Use the outcomes as part of the assessment for students, or look at the Outcomes report for some useful feedback on how students in the class in general are performing.&lt;br /&gt;
&lt;br /&gt;
==How do I remove a selected outcome from an activity?==&lt;br /&gt;
&lt;br /&gt;
Previously selected outcomes are greyed out on the update activity page. To remove an outcome&lt;br /&gt;
&lt;br /&gt;
# Go to &#039;&#039;Course administration &amp;gt; Gradebook setup&#039;&#039;&lt;br /&gt;
# Locate the outcome (below or above the activity they have been enabled in) then in the actions column click edit and then delete.&lt;br /&gt;
&lt;br /&gt;
Deleting the outcome will result in the outcome being deselected on the update activity page.&lt;br /&gt;
&lt;br /&gt;
==How do I change the scale associated with an outcome?==&lt;br /&gt;
&lt;br /&gt;
The scale associated with an outcome can only be changed if the outcome is not selected for use with an activity.&lt;br /&gt;
&lt;br /&gt;
# Go to &#039;&#039;Course administration &amp;gt; Outcomes&#039;&#039;&lt;br /&gt;
# Check that the outcome has zero in the items column i.e. it is not used in any activity. If not, go to &#039;&#039;Course administration &amp;gt; Gradebook setup&#039;&#039; and delete all instances of the outcome.&lt;br /&gt;
# Return to &#039;&#039;Course administration &amp;gt; Outcomes&#039;&#039; and click the edit icon opposite the outcome&lt;br /&gt;
# Change the scale&lt;br /&gt;
# Click the &#039;Save changes&#039; button.&lt;br /&gt;
&lt;br /&gt;
==Outcomes report==&lt;br /&gt;
&lt;br /&gt;
The outcomes report in &#039;&#039;Course administration &amp;gt; Grades &amp;gt; Outcomes report&#039;&#039; helps teachers monitor their students&#039; progress using outcomes.  It lists site-wide outcomes and custom outcomes used in the current course, their overall average (each outcome can be measured through many [[Grade items|grade items]]).  It will show the name, course and site wide average, the activity, the average values and the number of &amp;quot;grades&amp;quot; given.&lt;br /&gt;
&lt;br /&gt;
The outcomes report is a table with 6 columns:&lt;br /&gt;
&lt;br /&gt;
*Short name - the short name of the outcome used in this course.&lt;br /&gt;
*Course average -shows two values representing the average scores given to students for each outcome used in this course.&lt;br /&gt;
*Site-wide - Whether the outcome is a site-wide outcome or not.&lt;br /&gt;
*Activities - This lists the activities that use this outcome in this course. A new row is created for each activity, and the activity name is linked to the activity&#039;s page.&lt;br /&gt;
*Average - the average score for each activity using the outcome in this course.&lt;br /&gt;
*Number of Grades - The number of grades given to students for each activity using the outcome.&lt;br /&gt;
&lt;br /&gt;
==Outcomes used in course==&lt;br /&gt;
&lt;br /&gt;
Outcomes may be set at site and/or course level. To choose outcomes for use in your course:&lt;br /&gt;
&lt;br /&gt;
# View available standard outcomes in &#039;&#039;Course administration &amp;gt; Outcomes&#039;&#039; or via the gradebook Outcomes tab&lt;br /&gt;
# Add outcomes from the standard available list (right side), and use the left-facing arrow button to add them to outcomes used list (left side). Multiple outcomes may be selected by holding down the Apple or Ctrl key whilst clicking on the individual outcomes.&lt;br /&gt;
&lt;br /&gt;
==Exporting outcomes==&lt;br /&gt;
&lt;br /&gt;
Outcomes (and their associated scales) can be exported by clicking the &amp;quot;Export all outcomes&amp;quot; button.  This will send a file (in .csv format) that can be read by Excel, OpenOffice.org or by any text editor.&lt;br /&gt;
&lt;br /&gt;
==Importing outcomes==&lt;br /&gt;
&lt;br /&gt;
Outcomes (and associated scales) may be imported by submitting a csv file. The format should be as follows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field name&lt;br /&gt;
! Description&lt;br /&gt;
! Required&lt;br /&gt;
! Format&lt;br /&gt;
|-&lt;br /&gt;
| outcome_name&lt;br /&gt;
| The full name of the outcome&lt;br /&gt;
| Yes&lt;br /&gt;
| String&lt;br /&gt;
|-&lt;br /&gt;
| outcome_shortname&lt;br /&gt;
| The short name of the outcome&lt;br /&gt;
| Yes&lt;br /&gt;
| String&lt;br /&gt;
|-&lt;br /&gt;
| outcome_description&lt;br /&gt;
| The description of the outcome&lt;br /&gt;
| No&lt;br /&gt;
| String&lt;br /&gt;
|-&lt;br /&gt;
| scale_name&lt;br /&gt;
| The name of the scale used&lt;br /&gt;
| Yes&lt;br /&gt;
| String&lt;br /&gt;
|-&lt;br /&gt;
| scale_items&lt;br /&gt;
| A comma-separated list of scale items&lt;br /&gt;
| Yes&lt;br /&gt;
| String&lt;br /&gt;
|-&lt;br /&gt;
| scale_description&lt;br /&gt;
| The description of the scale&lt;br /&gt;
| No&lt;br /&gt;
| String&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Here is an example:&lt;br /&gt;
&lt;br /&gt;
 outcome_name;outcome_shortname;outcome_description;scale_name;scale_items;scale_description&lt;br /&gt;
 Participation;participation;;Participation scale;&amp;quot;Little or no participation, Satisfactory participation, Full participation&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
To import outcomes:&lt;br /&gt;
&lt;br /&gt;
# Click the &#039;Import outcomes&#039; link in &#039;&#039;Course administration &amp;gt; Outcomes&#039;&#039;&lt;br /&gt;
# Choose &#039;Import as custom outcomes (only this course)&#039; or &#039;Import as standard outcomes&#039; as required&lt;br /&gt;
# Upload the csv file&lt;br /&gt;
&lt;br /&gt;
Note that while importing: &lt;br /&gt;
*Existing outcomes and scale will be used if available (no overwriting is done by the script)&lt;br /&gt;
*The script will stop if it detects that the file contains invalid data&lt;br /&gt;
&lt;br /&gt;
==Outcomes capabilities==&lt;br /&gt;
&lt;br /&gt;
* [[Capabilities/gradereport/outcomes:view|View the outcomes report]]&lt;br /&gt;
* [[Capabilities/moodle/grade:manageoutcomes|Manage grade outcomes]]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* The section &#039;Outcome items&#039; in [[Grade items]]&lt;br /&gt;
* [[Competencies]] - a new feature in 3.1 onwards&lt;br /&gt;
* [http://school.moodledemo.net/mod/assign/view.php?id=190&amp;amp;action=grade&amp;amp;rownum=1&amp;amp;useridlistid=0 See how a teacher selects Outcomes when grading a student] on the Mount Orange School demo site. (Log in with username &#039;&#039;&#039;teacher&#039;&#039;&#039;; password &#039;&#039;&#039;moodle&#039;&#039;&#039;)&lt;br /&gt;
* [[Differentiator local plugin]] - A tool to efficiently formulate and save learning goals based on the Differentiator by Ian Byrd. Learning goal are persisted for every user in your Moodle installation.&lt;br /&gt;
&lt;br /&gt;
[[Category:Report]]&lt;br /&gt;
&lt;br /&gt;
[[es:Resultados]]&lt;br /&gt;
[[fr:Objectifs]]&lt;br /&gt;
[[ja:アウトカム]]&lt;br /&gt;
[[de:Lernziele]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Development:Automatic_Course_Archival&amp;diff=140848</id>
		<title>Development:Automatic Course Archival</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Development:Automatic_Course_Archival&amp;diff=140848"/>
		<updated>2021-07-14T13:24:38Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Text replacement - &amp;quot;class=&amp;quot;nicetable&amp;quot;&amp;quot; to &amp;quot;class=&amp;quot;wikitable&amp;quot;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Executive Summary ==&lt;br /&gt;
&lt;br /&gt;
In order to meet various data retention policies and regulations, it would be helpful if Moodle could automatically &amp;quot;archive&amp;quot; and/or delete courses after a certain amount of time. &lt;br /&gt;
&lt;br /&gt;
The goal with these changes is to allow administrators maximum flexibility (being able to set archival options on a course-by-course basis), while maintaining a good amount of simplicity (being able to set default archival options on a category-by-category basis).&lt;br /&gt;
&lt;br /&gt;
== Glossary ==&lt;br /&gt;
&lt;br /&gt;
To reduce confusion, some terms and definitions are presented below:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Term&lt;br /&gt;
!Definition&lt;br /&gt;
|-&lt;br /&gt;
|Archived Course&lt;br /&gt;
|A course that has been made read-only to all but course and site administrators.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Database Structures ==&lt;br /&gt;
=== archive_courses ===&lt;br /&gt;
&lt;br /&gt;
This table keeps information about when specific courses should be archived. If a course appears in this table and enabled is set to 1, it means it should be archived or deleted automatically after the specified date is reached. If not, then no automatic archiving should occur. &lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Type&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Default&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Info&#039;&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;id&amp;quot;&lt;br /&gt;
|int(10)&lt;br /&gt;
|&lt;br /&gt;
|autoincrementing&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;courseid&amp;quot;&lt;br /&gt;
|int(10)&lt;br /&gt;
|&lt;br /&gt;
|unique; The course that should be archived or deleted.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;archive_enabled&amp;quot;&lt;br /&gt;
|tinyint(1)&lt;br /&gt;
|&amp;lt;center&amp;gt;1&amp;lt;/center&amp;gt;&lt;br /&gt;
|If automatic archiving should be enabled for this course.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;archive_date_point&amp;quot;&lt;br /&gt;
|varchar(10)&lt;br /&gt;
|&amp;lt;center&amp;gt;&amp;quot;epoch&amp;quot;&amp;lt;/center&amp;gt;&lt;br /&gt;
|Can be &#039;epoch&#039;, &#039;course_end&#039;, and in the future, some other values. Stores the point from which archive_date should be compared. E.g., if &#039;epoch&#039;, the course should be archived &amp;lt;i&amp;gt;archive_date&amp;lt;/i&amp;gt; seconds after the Unix epoch. If &#039;course_end&#039;, the course should be archived &amp;lt;i&amp;gt;archive_date&amp;lt;/i&amp;gt; seconds after the end of the course.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;archive_date&amp;quot;&lt;br /&gt;
|int(10)&lt;br /&gt;
|&amp;lt;center&amp;gt;0&amp;lt;/center&amp;gt;&lt;br /&gt;
|When the course should be archived. Is expressed as the number of seconds after archive_date_point. (If archive_date_point is set to &#039;epoch&#039;, this is effectively a Unix timestamp.)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;delete_enabled&amp;quot;&lt;br /&gt;
|tinyint(1)&lt;br /&gt;
|&amp;lt;center&amp;gt;1&amp;lt;/center&amp;gt;&lt;br /&gt;
|If automatic deleting should be enabled for this course.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;delete_date_point&amp;quot;&lt;br /&gt;
|varchar(10)&lt;br /&gt;
|&amp;lt;center&amp;gt;&amp;quot;epoch&amp;quot;&amp;lt;/center&amp;gt;&lt;br /&gt;
|Can be &#039;epoch&#039;, &#039;course_end&#039;, and in the future, some other values. Stores the point from which delete_date should be compared. E.g., if &#039;epoch&#039;, the course should be deleted &amp;lt;i&amp;gt;delete_date&amp;lt;/i&amp;gt; seconds after the Unix epoch. If &#039;course_end&#039;, the course should be deleted &amp;lt;i&amp;gt;delete_date&amp;lt;/i&amp;gt; seconds after the end of the course.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;delete_date&amp;quot;&lt;br /&gt;
|int(10)&lt;br /&gt;
|&amp;lt;center&amp;gt;0&amp;lt;/center&amp;gt;&lt;br /&gt;
|When the course should be deleted. Is expressed as the number of seconds after delete_date_point. (If delete_date_point is set to &#039;epoch&#039;, this is effectively a Unix timestamp.)&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== archive_category_settings ===&lt;br /&gt;
&lt;br /&gt;
This table keeps information about default settings for each category. This determines what settings a course should have when it&#039;s first created in a particular category. If a category doesn&#039;t have any settings, site-wide defaults are used instead.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Type&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Default&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Info&#039;&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;id&amp;quot;	&lt;br /&gt;
|int(10)&lt;br /&gt;
|&lt;br /&gt;
|autoincrementing&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;categoryid&amp;quot;&lt;br /&gt;
|int(10)&lt;br /&gt;
|&lt;br /&gt;
|unique; The category&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;archive_enabled&amp;quot;&lt;br /&gt;
|int(1)&lt;br /&gt;
|&amp;lt;center&amp;gt;1&amp;lt;/center&amp;gt;&lt;br /&gt;
|If automatic archiving should be enabled by default for these courses.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;archive_date_point&amp;quot;&lt;br /&gt;
|varchar(10)&lt;br /&gt;
|&amp;lt;center&amp;gt;&amp;quot;epoch&amp;quot;&amp;lt;/center&amp;gt;&lt;br /&gt;
|Can be &#039;epoch&#039;, &#039;course_end&#039;, and in the future, some other values. Stores the point from which archive_date should be compared. E.g., if &#039;epoch&#039;, courses should be archived &amp;lt;i&amp;gt;archive_date&amp;lt;/i&amp;gt; seconds after the Unix epoch. If &#039;course_end&#039;, courses should be archived &amp;lt;i&amp;gt;archive_date&amp;lt;/i&amp;gt; seconds after the end of the course.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;archive_date&amp;quot;&lt;br /&gt;
|int(10)&lt;br /&gt;
|&amp;lt;center&amp;gt;0&amp;lt;/center&amp;gt;&lt;br /&gt;
|When courses should be archived. Is expressed as the number of seconds after archive_date_point. (If archive_date_point is set to &#039;epoch&#039;, this is effectively a Unix timestamp.)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;delete_enabled&amp;quot;&lt;br /&gt;
|int(1)&lt;br /&gt;
|&amp;lt;center&amp;gt;1&amp;lt;/center&amp;gt;&lt;br /&gt;
|If automatic deleting should be enabled by default for these courses.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;delete_date_point&amp;quot;&lt;br /&gt;
|varchar(10)&lt;br /&gt;
|&amp;lt;center&amp;gt;&amp;quot;epoch&amp;quot;&amp;lt;/center&amp;gt;&lt;br /&gt;
|Can be &#039;epoch&#039;, &#039;course_end&#039;, and in the future, some other values. Stores the point from which delete_date should be compared. E.g., if &#039;epoch&#039;, courses should be deleted &amp;lt;i&amp;gt;delete_date&amp;lt;/i&amp;gt; seconds after the Unix epoch. If &#039;course_end&#039;, courses should be deleted &amp;lt;i&amp;gt;delete_date&amp;lt;/i&amp;gt; seconds after the end of the course.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;delete_date&amp;quot;&lt;br /&gt;
|int(10)&lt;br /&gt;
|&amp;lt;center&amp;gt;0&amp;lt;/center&amp;gt;&lt;br /&gt;
|When courses should be deleted. Is expressed as the number of seconds after delete_date_point. (If delete_date_point is set to &#039;epoch&#039;, this is effectively a Unix timestamp.)&lt;br /&gt;
&lt;br /&gt;
|}										&lt;br /&gt;
&lt;br /&gt;
== Archival ==&lt;br /&gt;
&lt;br /&gt;
The permissions system would be modified to perform an extra check when determining if a user had access to perform an action on a course. If a user tried to perform an action that could update or change a course after the date at which it was archived, and that user did not have the (newly created) permission to &#039;Update Archived Courses&#039;, they would be denied access.&lt;br /&gt;
&lt;br /&gt;
== Deletion ==&lt;br /&gt;
&lt;br /&gt;
The cron job would be modified to check the archive_courses table and perform a final backup of and then delete any courses after they have reached their delete_date.&lt;br /&gt;
&lt;br /&gt;
== Public API ==&lt;br /&gt;
&lt;br /&gt;
Modules may use only functions from lib/archivelib.php which are marked as public.&lt;br /&gt;
&lt;br /&gt;
===ArchiveCourse::course_is_archived($courseid)===&lt;br /&gt;
Returns boolean value: true if the courseid exists in the archive_courses table, that row is enabled, and the archive_date is in the past.&lt;br /&gt;
&lt;br /&gt;
===ArchiveCourse::get_course_info($courseid)===&lt;br /&gt;
Returns associative array of archive/delete dates, whether the course is or will be archived, whether the course will be deleted, and whether the archiving is enabled for a particular course. Returns NULL if the course doesn&#039;t exist in the table, false on failure.&lt;br /&gt;
&lt;br /&gt;
===ArchiveCourse::get_course_archive_date($courseid)===&lt;br /&gt;
Returns the archive date (as a Unix timestamp) for a particular course, NULL if the course doesn&#039;t exist in the table, false on failure. This method converts any relative archive dates to their absolute value.&lt;br /&gt;
&lt;br /&gt;
===ArchiveCourse::get_course_delete_date($courseid)===&lt;br /&gt;
Returns the delete date (as a Unix timestamp) for a particular course, NULL if the course doesn&#039;t exist in the table, false on failure. This method converts any relative delete dates to their absolute value.&lt;br /&gt;
&lt;br /&gt;
===ArchiveCourse::set_archive_options($courseid, $options_array)===&lt;br /&gt;
Sets archive options for a particular course (all options are not required&amp;amp;#8212;if not present, defaults will be used). Returns true on success, false on failure. The $option_array should have the following format:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Array(&lt;br /&gt;
        &#039;archive_enabled&#039;=&amp;gt;[true|false] &lt;br /&gt;
	&#039;archive_date_point&#039;=&amp;gt;&#039;[epoch|course_end|...]&#039;,&lt;br /&gt;
	&#039;archive_date&#039;=&amp;gt;[int], &lt;br /&gt;
        &#039;delete_enabled&#039;=&amp;gt;[true|false]&lt;br /&gt;
	&#039;delete_date_type&#039;=&amp;gt;&#039;[epoch|course_end|...]&#039;, &lt;br /&gt;
	&#039;delete_date&#039;=&amp;gt;[int],&lt;br /&gt;
)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===ArchiveCourse::unarchive_course($courseid)===&lt;br /&gt;
Sets the enabled column to false for an archived course. Returns true if the course was successfully unarchived, or if the course wasn&#039;t archived to begin with, false on failure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===ArchiveCategory::get_defaults($categoryid)===&lt;br /&gt;
Returns associative array of defaults, including archive/delete dates, whether courses will be archived, and whether courses will be deleted. Returns site-wide defaults if the category doesn&#039;t have any defaults of its own, false on failure.&lt;br /&gt;
&lt;br /&gt;
===ArchiveCategory::set_defaults($categoryid, $options_array)===&lt;br /&gt;
Sets archive defaults for a particular category (all options are not required&amp;amp;#8212;if not present, site-wide defaults will be used). Returns true on success, false on failure. The $option_array should have the following format:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Array(&lt;br /&gt;
        &#039;archive_enabled&#039;=&amp;gt;[true|false] &lt;br /&gt;
	&#039;archive_date_point&#039;=&amp;gt;&#039;[epoch|course_end|...]&#039;,&lt;br /&gt;
	&#039;archive_date&#039;=&amp;gt;[int], &lt;br /&gt;
        &#039;delete_enabled&#039;=&amp;gt;[true|false]&lt;br /&gt;
	&#039;delete_date_type&#039;=&amp;gt;&#039;[epoch|course_end|...]&#039;, &lt;br /&gt;
	&#039;delete_date&#039;=&amp;gt;[int],&lt;br /&gt;
)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===ArchiveCategory::remove_defaults($categoryid)===&lt;br /&gt;
Removes category defaults (site-wide defaults will be used instead for that category)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Capabilities and Permissions==&lt;br /&gt;
* archive/settings:managesite - manage site-wide default settings&lt;br /&gt;
&lt;br /&gt;
* archive/settings:managecategory - manage category-level default settings&lt;br /&gt;
&lt;br /&gt;
* archive/settings:managecourse - manage course-level settings&lt;br /&gt;
&lt;br /&gt;
* archive/courses:update - update courses even when they&#039;re archived&amp;amp;#8212;intended for administrators.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Ideas for the Future==&lt;br /&gt;
* add a new archive/courses:view permission to determine if a user should be able to view archived courses&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Analytics_plugins&amp;diff=140847</id>
		<title>Analytics plugins</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Analytics_plugins&amp;diff=140847"/>
		<updated>2021-07-14T13:24:37Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Text replacement - &amp;quot;class=&amp;quot;nicetable&amp;quot;&amp;quot; to &amp;quot;class=&amp;quot;wikitable&amp;quot;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Tracking progress}}&lt;br /&gt;
{{Template:Update}}&lt;br /&gt;
Learning Analytics are any piece of information that can help an LMS user improve learning outcomes. Users include students, teachers, administrators and decision-makers.&lt;br /&gt;
&lt;br /&gt;
== Moodle Plugins ==&lt;br /&gt;
&lt;br /&gt;
There are a number of reports, blocks and other plugins for Moodle that provide learning analytics.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Plugin &lt;br /&gt;
! Plugin type&lt;br /&gt;
! Standard / Additional&lt;br /&gt;
! Useful for&lt;br /&gt;
! Description&lt;br /&gt;
! Reported usage*&lt;br /&gt;
|-&lt;br /&gt;
| [[:en:Logs|Logs]]&lt;br /&gt;
| Report&lt;br /&gt;
| Standard&lt;br /&gt;
| Teachers, Admins, Decision-makers&lt;br /&gt;
| Filterable log of events&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 71.4%&lt;br /&gt;
|-&lt;br /&gt;
| [[:en:Activity_report|Activity]]&lt;br /&gt;
| Report&lt;br /&gt;
| Standard&lt;br /&gt;
| Teachers&lt;br /&gt;
| View count of activities in course&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 69.1%&lt;br /&gt;
|-&lt;br /&gt;
| [[:en:Using_Activity_completion|Activity completion]], see also [[:en:Using_Course_completion|Course completion]]&lt;br /&gt;
| Report&lt;br /&gt;
| Standard&lt;br /&gt;
| Teachers&lt;br /&gt;
| Completion matrix of students and activities&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 66.3%&lt;br /&gt;
|-&lt;br /&gt;
| [[:en:Logs|Live logs]]&lt;br /&gt;
| Report&lt;br /&gt;
| Standard&lt;br /&gt;
| Teachers, Admins&lt;br /&gt;
| Automatically refreshing log of events&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 55.2% &lt;br /&gt;
|-&lt;br /&gt;
| [[:en:Feedback_activity|Feedback]]&lt;br /&gt;
| Activity&lt;br /&gt;
| Standard&lt;br /&gt;
| Teachers, Researchers&lt;br /&gt;
| Configurable survey tool&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 59.5% &lt;br /&gt;
|-&lt;br /&gt;
| [[:en:Quiz_statistics_report|(Quiz) Statistics]]&lt;br /&gt;
| Report&lt;br /&gt;
| Standard&lt;br /&gt;
| Teachers&lt;br /&gt;
| Student quiz performance report&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 53.0%&lt;br /&gt;
|-&lt;br /&gt;
| [[:en:Participation_report|(Course) Participation]]&lt;br /&gt;
| Report&lt;br /&gt;
| Standard&lt;br /&gt;
| Teachers&lt;br /&gt;
| Single student&#039;s participation in course&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 49.9%&lt;br /&gt;
|-&lt;br /&gt;
| [[:en:Survey_module|Survey]]&lt;br /&gt;
| Activity&lt;br /&gt;
| Standard&lt;br /&gt;
| Teachers, Researchers&lt;br /&gt;
| Set of standardised educational surveys&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 45.6%&lt;br /&gt;
|-&lt;br /&gt;
| [[:en:Inspire|Inspire]]&lt;br /&gt;
| Administrative Tool&lt;br /&gt;
| Additional migrating to Standard&lt;br /&gt;
| Teachers, Researchers&lt;br /&gt;
| Moodle native descriptive and predictive learning analytics&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | n/a&lt;br /&gt;
|-&lt;br /&gt;
| [http://moodle.org/plugins/view.php?plugin=mod_questionnaire Questionnaire]&lt;br /&gt;
| Activity&lt;br /&gt;
| Additional&lt;br /&gt;
| Teachers, Researchers&lt;br /&gt;
| Configurable survey tool&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 45.3%&lt;br /&gt;
|-&lt;br /&gt;
| [[:en:Course_overview_report|Course overview]]&lt;br /&gt;
| Report&lt;br /&gt;
| Standard&lt;br /&gt;
| Admins, Decision-makers&lt;br /&gt;
| Comparison of participation across multiple courses&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 45.0%&lt;br /&gt;
|-&lt;br /&gt;
| [[:en:Course_completion_status_block|Course completion status]]&lt;br /&gt;
| Block&lt;br /&gt;
| Standard&lt;br /&gt;
| Students&lt;br /&gt;
| View of student&#039;s own completion of activities&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 41.4%&lt;br /&gt;
|-&lt;br /&gt;
| [http://moodle.org/plugins/view.php?plugin=block_progress Progress Bar]&lt;br /&gt;
| Block&lt;br /&gt;
| Additional&lt;br /&gt;
| Students, Teachers&lt;br /&gt;
| Time management tool for students with overview for teachers&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 32.0%&lt;br /&gt;
|-&lt;br /&gt;
| [[:en:Events_list_report|Events list]]&lt;br /&gt;
| Report&lt;br /&gt;
| Standard&lt;br /&gt;
| Teachers, Admins&lt;br /&gt;
| Events that can be monitored/searched in logs&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 28.6%&lt;br /&gt;
|-&lt;br /&gt;
| [[:en:Activity_results_block|Activity results block]]&lt;br /&gt;
| Block&lt;br /&gt;
| Standard&lt;br /&gt;
| Students&lt;br /&gt;
| Leader-board of results in single activity&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 26.1%&lt;br /&gt;
|-&lt;br /&gt;
| [http://moodle.org/plugins/view.php?id=82 Configurable Reports] &lt;br /&gt;
([https://docs.moodle.org/29/en/ad-hoc_contributed_reports A list of contributed reports])&lt;br /&gt;
| Block ([https://github.com/nadavkav/moodle-report_configurablereports Report] [https://github.com/nadavkav/moodle-filter_crgraph Graphs filter])&lt;br /&gt;
| Additional&lt;br /&gt;
| Teachers, Admins, Decision-makers&lt;br /&gt;
| Report generation and viewing&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 22.7%&lt;br /&gt;
|-&lt;br /&gt;
| [[Overview_report|(Gradebook) Overview]]&lt;br /&gt;
| Report&lt;br /&gt;
| Standard&lt;br /&gt;
| Teachers, Students&lt;br /&gt;
| View of student grades across activites&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | N/A&lt;br /&gt;
|-&lt;br /&gt;
| [[Statistics]]&lt;br /&gt;
| Report&lt;br /&gt;
| Standard&lt;br /&gt;
| Admins, Decision-makers&lt;br /&gt;
| Daily activity across site&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | N/A&lt;br /&gt;
|-&lt;br /&gt;
| [[:en:Event_monitoring|Event monitor]]&lt;br /&gt;
| Report&lt;br /&gt;
| Standard&lt;br /&gt;
| Teachers, Admins, Decision-makers&lt;br /&gt;
| Proactive, focussed monitor tool&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | N/A&lt;br /&gt;
|-&lt;br /&gt;
| [http://moodle.org/plugins/view/report_customsql Ad-hoc database queries]&lt;br /&gt;
| Report&lt;br /&gt;
| Additional&lt;br /&gt;
| Teachers, Admins, Decision-makers&lt;br /&gt;
| SQL-based report generation and viewing&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | N/A&lt;br /&gt;
|-&lt;br /&gt;
| [http://moodle.org/plugins/browse.php?list=set&amp;amp;id=20 Engagement Analytics]&lt;br /&gt;
| Block, Report, Activity module&lt;br /&gt;
| Additional&lt;br /&gt;
| Teachers&lt;br /&gt;
| Configurable engagement measurement report and block&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | N/A&lt;br /&gt;
|-&lt;br /&gt;
| [http://moodle.org/plugins/view/block_dedication Course Dedication]&lt;br /&gt;
| Block&lt;br /&gt;
| Additional&lt;br /&gt;
| Students, Teachers&lt;br /&gt;
| Estimated time online for students&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | N/A&lt;br /&gt;
|-&lt;br /&gt;
| [http://moodle.org/plugins/view.php?plugin=block_graph_stats Graph Stats]&lt;br /&gt;
| Block&lt;br /&gt;
| Additional&lt;br /&gt;
| Teachers, Admins&lt;br /&gt;
| Daily visits to site or course&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | N/A&lt;br /&gt;
|-&lt;br /&gt;
| [http://moodle.org/plugins/view/block_gismo GISMO]&lt;br /&gt;
| Block&lt;br /&gt;
| Additional&lt;br /&gt;
| Teachers&lt;br /&gt;
| Numerous charts of student activity participation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | N/A&lt;br /&gt;
|-&lt;br /&gt;
| [http://moodle.org/plugins/view/block_xp Level Up!]&lt;br /&gt;
| Block&lt;br /&gt;
| Additional&lt;br /&gt;
| Students, Teachers&lt;br /&gt;
| Incentive-drive participation meter&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | N/A&lt;br /&gt;
|-&lt;br /&gt;
| [http://moodle.org/plugins/report_forumgraph Forum Graph]&lt;br /&gt;
| Report&lt;br /&gt;
| Additional&lt;br /&gt;
| Teachers&lt;br /&gt;
| Graph of forum interactions&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | N/A&lt;br /&gt;
|-&lt;br /&gt;
| [https://moodle.org/plugins/block_analytics_graphs Analytics Graphs]&lt;br /&gt;
| Block&lt;br /&gt;
| Additional&lt;br /&gt;
| Teachers&lt;br /&gt;
| Visualisation of student participation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | N/A&lt;br /&gt;
|-&lt;br /&gt;
| [https://moodle.org/plugins/block_heatmap Heatmap]&lt;br /&gt;
| Block&lt;br /&gt;
| Additional&lt;br /&gt;
| Teachers&lt;br /&gt;
| Colour-coded indication of activity views on course page&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | N/A&lt;br /&gt;
|-&lt;br /&gt;
| [https://moodle.org/plugins/local_analytics Analytics]&lt;br /&gt;
| Local&lt;br /&gt;
| Additional&lt;br /&gt;
| Admins, Decision-makers&lt;br /&gt;
| Enriched feed to Google Analytics and Pywick&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | N/A&lt;br /&gt;
|-&lt;br /&gt;
| [https://moodle.org/plugins/gradereport_gradedist Grade distribution]&lt;br /&gt;
| report&lt;br /&gt;
| Additional&lt;br /&gt;
| Teachers&lt;br /&gt;
| Visualizes the grades of students in a course&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | N/A&lt;br /&gt;
|-&lt;br /&gt;
| [https://moodle.org/plugins/logstore_xapi Logstore xAPI]&lt;br /&gt;
| Logstore&lt;br /&gt;
| Additional&lt;br /&gt;
| Admins, Decision-makers, Researchers&lt;br /&gt;
| xAPI event stream output&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | N/A&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; Reported usage is drawn from the [http://research.moodle.net/71/1/Plugins%20Usage%20Survey%202015%20Report.pdf Plugins Usage Survey from 2015].&lt;br /&gt;
&lt;br /&gt;
== Integrations with Moodle ==&lt;br /&gt;
&lt;br /&gt;
A number of systems integrate with Moodle to provide learning analytics information externally.&lt;br /&gt;
&lt;br /&gt;
* [http://damos.world/2013/08/30/the-moodle-activity-viewer-mav-heatmaps-of-student-activity/ Moodle Activity Viewer] (MAV) ([https://github.com/damoclark/mav-enterprise Git]), consider [https://moodle.org/plugins/block_heatmap Heatmap] as an alternative&lt;br /&gt;
* [http://www.intelliboard.net/ Intelliboard]&lt;br /&gt;
* [http://www.lambdasolutions.net/products/lmsreporting/ Zoola (was Analytika)]&lt;br /&gt;
* [https://learninglocker.net/ Learning Locker], can be used with [https://moodle.org/plugins/logstore_xapi Logstore xAPI]&lt;br /&gt;
* [http://klassdata.com/smartklass-learning-analytics-plugin/learning-analytics-moodle-smartklass/ SmartKlass]&lt;br /&gt;
* [http://www.blackboard.com/education-analytics/blackboard-predict.aspx Blackboard Predict]&lt;br /&gt;
* [http://melbourne-cshe.unimelb.edu.au/research/edutech/completing-the-loop Completing the loop]&lt;br /&gt;
* [https://www.iadlearning.com/ IADlearning] offers institutions and educators a rich set of analytics allowing them to understand the quality of their training content, as well as the quality of the ongoing learning processes.&lt;br /&gt;
&lt;br /&gt;
== Dimensions of Analytics ==&lt;br /&gt;
&lt;br /&gt;
Learning analytics are a concept that has been emerging under a number of different names through the past decades. Its origins lie in research in data mining and intelligent tutoring systems. LA tools can be categorised in a number of ways:&lt;br /&gt;
&lt;br /&gt;
* Descriptive&lt;br /&gt;
* Predictive&lt;br /&gt;
* Diagnostic&lt;br /&gt;
* Prescriptive&lt;br /&gt;
&lt;br /&gt;
== See also... ==&lt;br /&gt;
* [https://moodle.org/mod/forum/view.php?id=8044 Analytics and reporting forum]&lt;br /&gt;
* [https://moodle.org/mod/forum/view.php?id=8205 Moodle Research forum]&lt;br /&gt;
* [[:dev:Moodle_research|Moodle research page]]&lt;br /&gt;
* [[Logging]]&lt;br /&gt;
* [[:en:Events_list_report|Events list]]&lt;br /&gt;
* [[:dev:Learning_Analytics_Specification|Learning Analytics API specification]]&lt;br /&gt;
* [[:dev:Working_Groups#Assessment_Analytics|Assessment Analytics working group details and issues]]&lt;br /&gt;
* [[:dev:Event_2|Events specification]]&lt;br /&gt;
* [[:dev:Logging_2|Logging specification]]&lt;br /&gt;
* [[:dev:reportbuilder/API|Report Builder API specification]]&lt;br /&gt;
* Use [https://moodle.org/plugins/filter_generico Generico filter] to display custom DB reports with graphs [https://moodle.org/mod/forum/discuss.php?d=324771#p1334032 Demo / Forums]&lt;br /&gt;
* [https://www.jisc.ac.uk/blog/solving-the-ethical-and-legal-issues-around-learning-analytics-a-series-of-podcasts-11-mar-2016 Solving the ethical and legal issues around learning analytics: a series of podcasts]&lt;br /&gt;
&lt;br /&gt;
== Presentations ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=MHv4vp1hxQc&amp;amp;index=5&amp;amp;list=TLGCVIc9g1-qUMUxOTEwMjAxNg Moodle Analytics Plans I Elizabeth Dalton at MoodleMoot Australia 2016] (video 24m)&lt;br /&gt;
&lt;br /&gt;
[[Category:Report]]&lt;br /&gt;
[[Category:Analytics]]&lt;br /&gt;
&lt;br /&gt;
[[es:Análisis del aprendizaje]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Emoticon_images&amp;diff=140846</id>
		<title>Emoticon images</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Emoticon_images&amp;diff=140846"/>
		<updated>2021-07-14T13:24:37Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Text replacement - &amp;quot;class=&amp;quot;nicetable&amp;quot;&amp;quot; to &amp;quot;class=&amp;quot;wikitable&amp;quot;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The list of images that will be used to replace the emoticon text can be defined by a site administrator in &#039;&#039;Settings &amp;gt; Site administration &amp;gt; Appearance &amp;gt; HTML settings&#039;&#039;. The images defined here are used by [[Display emoticons as images]] filter and TinyMCE HTML editor&#039;s Insert emoticon popup menu.&lt;br /&gt;
[[Image:emoticon-setting.png|thumb|Emoticon setting page]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Form table fields ==&lt;br /&gt;
&lt;br /&gt;
The form table maps the emoticon characters like &amp;lt;code&amp;gt;:-)&amp;lt;/code&amp;gt; to an image that will be used to display that emoticon. Images can be provided either by the Moodle core itself or by any other installed plugin (like an activity module, block, theme or your plocal plugin). For accessibility reasons, alternative texts for these images should be defined, too.&lt;br /&gt;
&lt;br /&gt;
=== Emoticon text ===&lt;br /&gt;
&lt;br /&gt;
Into the first column, insert the text representation of the emoticon. The emoticon filter converts these texts into images. The text must pass the following constraints:&lt;br /&gt;
&lt;br /&gt;
* It must be at least two characters long&lt;br /&gt;
* It can not contain &amp;lt;code&amp;gt;:/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;//&amp;lt;/code&amp;gt; substring to avoid accidental breaking of URL addresses&lt;br /&gt;
* It must contain some non-alphanumeric character to prevent from breaking HTML tags in the text&lt;br /&gt;
&lt;br /&gt;
=== Image name and component ===&lt;br /&gt;
&lt;br /&gt;
The default set of emoticons are provided by Moodle core itself. In that case, the image component is set to &#039;&#039;core&#039;&#039;. The image name is a relative path to a file without the trailing slash and without the file extension. The image must be located in the &amp;lt;code&amp;gt;/pix&amp;lt;/code&amp;gt; folder of the given component.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Example:&#039;&#039; if the image name is set to &amp;lt;code&amp;gt;s/smiley&amp;lt;/code&amp;gt; and the image component is set to &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt;, the image file &amp;lt;code&amp;gt;{dirroot}/pix/s/smiley.gif&amp;lt;/code&amp;gt; from your Moodle installation folder is used to display that emoticon.&lt;br /&gt;
&lt;br /&gt;
=== Alternative text ===&lt;br /&gt;
&lt;br /&gt;
Alternative texts are taken from [[Language packs|language packs]] that can be again provided by either the core or a plugin. The first field value is the string identifier and the second field value is the name of the component providing that string (see the language packs documentation for details).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Example:&#039;&#039; if the emoticon has the alternative text set to &amp;lt;code&amp;gt;smiley&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;core_pix&amp;lt;/code&amp;gt;, then the localized text will be obtained from the file &amp;lt;code&amp;gt;{dataroot}/lang/XX/pix.php&amp;lt;/code&amp;gt; where XX is the current language code. If that translation is available, the value from the English pack &amp;lt;code&amp;gt;{dirroot}/lang/en/pix.php&amp;lt;/code&amp;gt; will be used.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Technical note:&#039;&#039; these two values are passed as the parameters to the &amp;lt;code&amp;gt;get_string()&amp;lt;/code&amp;gt; function to obtain the alternative text&lt;br /&gt;
&lt;br /&gt;
== Custom emoticons ==&lt;br /&gt;
&lt;br /&gt;
To support your own emoticons, just add another row into the form table. However, if the images and their alternative texts are not available in the Moodle yet, you will have to add them in a form of an installed plugin, typically together with a theme or via your local plugin. The following section illustrates some options how to register emoticons provided by various types of plugins.&lt;br /&gt;
&lt;br /&gt;
=== Emoticon provided by activity module ===&lt;br /&gt;
&lt;br /&gt;
Let us say we want to use the emoticons system to display [[Workshop module]] icon instead of &amp;lt;code&amp;gt;(workshopicon)&amp;lt;/code&amp;gt; text. As you can see, the icon is located in &amp;lt;code&amp;gt;{dirroot}/mod/workshop/pix/icon.gif&amp;lt;/code&amp;gt;. Just add the following row into the emoticons form table:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Text&lt;br /&gt;
! Image name&lt;br /&gt;
! Image component&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Alternative text&lt;br /&gt;
|-&lt;br /&gt;
| (workshopicon)&lt;br /&gt;
| icon&lt;br /&gt;
| mod_workshop&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Save changes in the form and the icon should appear at the end of the row. If you have the emoticon filter enabled, whenever you or your users type &amp;lt;code&amp;gt;(workshopicon)&amp;lt;/code&amp;gt; in the text, it will be replaced with the image.&lt;br /&gt;
&lt;br /&gt;
You may want to use the localized term for the Workshop module as the alternative text for that image. Because the Workshop module already contains a string that we can use, just add the following values into the last two columns of the table and save the changes again:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Text&lt;br /&gt;
! Image name&lt;br /&gt;
! Image component&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Alternative text&lt;br /&gt;
|-&lt;br /&gt;
| (workshopicon)&lt;br /&gt;
| icon&lt;br /&gt;
| mod_workshop&lt;br /&gt;
| modulename&lt;br /&gt;
| mod_workshop&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Emoticon provided by installed theme ===&lt;br /&gt;
&lt;br /&gt;
[[Development:Themes 2.0|Themes in Moodle 2.0]] are able to override any standard image provided by the Moodle core by default. So if a file &amp;lt;code&amp;gt;{themedir}/pix_core/s/biggrin.*&amp;lt;/code&amp;gt; exists it is automatically used instead of standard &amp;lt;code&amp;gt;{dirroot}/pix/s/biggrin.*&amp;lt;/code&amp;gt;. Themes like any other plugins are also able to extend the standard emoticon set or change the file names or their directories.&lt;br /&gt;
&lt;br /&gt;
Let us say you have installed a theme named &amp;lt;code&amp;gt;mychool&amp;lt;/code&amp;gt; that comes with its own set of standard emoticons. Those emoticons must be located in the &amp;lt;code&amp;gt;/pix&amp;lt;/code&amp;gt; subfolder of that theme, for example in &amp;lt;code&amp;gt;{themedir}/pix/smilies/happy.png&amp;lt;/code&amp;gt;. Now you want to use the emoticons provided by this theme instead of the default Moodle emoticon set. Just replace the relevant rows in the table with the new values:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Text&lt;br /&gt;
! Image name&lt;br /&gt;
! Image component&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Alternative text&lt;br /&gt;
|-&lt;br /&gt;
| :-)&lt;br /&gt;
| smilies/happy&lt;br /&gt;
| theme_myschool&lt;br /&gt;
| smiley&lt;br /&gt;
| core_pix&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note that we replaced just the image name and component. So the alternative text will be taken from the core language pack which is probably already localized into many languages.&lt;br /&gt;
&lt;br /&gt;
=== Preparing own set of emoticons ===&lt;br /&gt;
&lt;br /&gt;
If you have a set of images you would like to use as emoticons at your site, we recommend you to prepare a local plugin that will just provided these emoticons, without any other functionality. Even though this way involves a bit more work at the beginning, it is preferable over direct modification of the standard Moodle files. By encapsulating your emoticon with a local plugin, you can safely upgrade your site without the risk of overwriting your modifications, deploy the local plugin at multiple servers and share your work easily with the others.&lt;br /&gt;
&lt;br /&gt;
Writing a local plugin that provides a set of emoticons is not hard even if you are not experienced PHP developers. You can use a [http://github.com/mudrd8mz/moodle-local_aliens published example] as a scaffold for your own work.&lt;br /&gt;
&lt;br /&gt;
[[Category:Site administration]]&lt;br /&gt;
[[Category:Filter]]&lt;br /&gt;
&lt;br /&gt;
[[es:Imágenes de emoticones]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Development:Gradebook_settings_review&amp;diff=140845</id>
		<title>Development:Gradebook settings review</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Development:Gradebook_settings_review&amp;diff=140845"/>
		<updated>2021-07-14T13:24:36Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Text replacement - &amp;quot;class=&amp;quot;nicetable&amp;quot;&amp;quot; to &amp;quot;class=&amp;quot;wikitable&amp;quot;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! Setting&lt;br /&gt;
! Site&lt;br /&gt;
! Course&lt;br /&gt;
! User&lt;br /&gt;
! Comments&lt;br /&gt;
|-&lt;br /&gt;
| Graded roles || General settings || - || - || &lt;br /&gt;
|-&lt;br /&gt;
| Enable outcomes || General settings || - || - || &lt;br /&gt;
|-&lt;br /&gt;
| User profile report || General settings || - || - || A confusing setting when there is only one item in the dropdown menu&lt;br /&gt;
|-&lt;br /&gt;
| Aggregation position || General settings || Course settings || My report preferences || &lt;br /&gt;
|-&lt;br /&gt;
| Include scales in aggregation || General settings || - || - || &lt;br /&gt;
|-&lt;br /&gt;
| Show submitted date for hidden grades || General settings || - || - || &lt;br /&gt;
|-&lt;br /&gt;
| Enable publishing || General settings || - || - || &lt;br /&gt;
|-&lt;br /&gt;
| Grade export display type || General settings || Grade export || - || &lt;br /&gt;
|-&lt;br /&gt;
| Grade export decimal points || General settings || Grade export || - || &lt;br /&gt;
|-&lt;br /&gt;
| Primary grade export methods || General settings || - || - ||&lt;br /&gt;
|-&lt;br /&gt;
| Hide forced settings || Grade category settings || - || - ||  &lt;br /&gt;
|-&lt;br /&gt;
| Aggregation || Grade category settings || - || - || Force and advanced setting options &lt;br /&gt;
|-&lt;br /&gt;
| Aggregate only non-empty grades || Grade category settings || - || - || Force and advanced setting options &lt;br /&gt;
|-&lt;br /&gt;
| Include outcomes in aggregation || Grade category settings || - || - || Force and advanced setting options &lt;br /&gt;
|-&lt;br /&gt;
| Aggregate including subcategories || Grade category settings || - || - || Force and advanced setting options &lt;br /&gt;
|-&lt;br /&gt;
| Keep the highest || Grade category settings || - || - || Force and advanced setting options&lt;br /&gt;
|-&lt;br /&gt;
| Drop the lowest || Grade category settings || - || - || Force and advanced setting options&lt;br /&gt;
|-&lt;br /&gt;
| Grade display type || Grade item settings || Course settings || - || &lt;br /&gt;
|-&lt;br /&gt;
| Overall decimal points || Grade item settings || Course settings || - || Setting is for display purposes only&lt;br /&gt;
|-&lt;br /&gt;
| Advanced grade item options || Grade item settings || - || - || For selecting which elements should be displayed as advanced when editing grade items&lt;br /&gt;
|-&lt;br /&gt;
| Students per page || Grader report settings || - || My report preferences ||&lt;br /&gt;
|-&lt;br /&gt;
| Quick Grading || Grader report settings || - || My report preferences || &lt;br /&gt;
|-&lt;br /&gt;
| Quick Feedback || Grader report settings || - || My report preferences || &lt;br /&gt;
|-&lt;br /&gt;
| Aggregation view || Grader report settings || - || My report preferences || &lt;br /&gt;
|-&lt;br /&gt;
| Grades selected for column averages || Grader report settings || - || My report preferences ||  &lt;br /&gt;
|-&lt;br /&gt;
| Show calculations || Grader report settings || - || My report preferences || &lt;br /&gt;
|-&lt;br /&gt;
| Show show/hide icons || Grader report settings || - || My report preferences || &lt;br /&gt;
|-&lt;br /&gt;
| Show column averages || Grader report settings || - || My report preferences || &lt;br /&gt;
|-&lt;br /&gt;
| Show groups || Grader report settings || - || My report preferences || &lt;br /&gt;
|-&lt;br /&gt;
| Show locks || Grader report settings || - || My report preferences || &lt;br /&gt;
|-&lt;br /&gt;
| Show ranges || Grader report settings || - || My report preferences || &lt;br /&gt;
|-&lt;br /&gt;
| Show user profile images || Grader report settings || - || My report preferences || &lt;br /&gt;
|-&lt;br /&gt;
| Show user idnumber || Grader report settings || - || My report preferences || &lt;br /&gt;
|-&lt;br /&gt;
| Show activity icons || Grader report settings || - || My report preferences || &lt;br /&gt;
|-&lt;br /&gt;
| Show number of grades in averages || Grader report settings || - || My report preferences || &lt;br /&gt;
|-&lt;br /&gt;
| Column averages display type || Grader report settings || - || My report preferences || &lt;br /&gt;
|-&lt;br /&gt;
| Range display type || Grader report settings || - || My report preferences || &lt;br /&gt;
|-&lt;br /&gt;
| Decimals in column averages || Grader report settings || - || My report preferences || &lt;br /&gt;
|-&lt;br /&gt;
| Decimals shown in ranges || Grader report settings || - || My report preferences || Setting may be overridden per grading item&lt;br /&gt;
|-&lt;br /&gt;
| Show rank || Overview report settings || Course settings  || - || &lt;br /&gt;
|-&lt;br /&gt;
| Show rank || User report settings || Course settings || - || &lt;br /&gt;
|-&lt;br /&gt;
| Show percentage || User report settings || Course settings || - || In Moodle 1.9.3 onwards&lt;br /&gt;
|-&lt;br /&gt;
| Show hidden items || User report settings || Course settings || - || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Grades]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Event_monitoring&amp;diff=140843</id>
		<title>Event monitoring</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Event_monitoring&amp;diff=140843"/>
		<updated>2021-07-14T13:24:35Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Text replacement - &amp;quot;class=&amp;quot;nicetable&amp;quot;&amp;quot; to &amp;quot;class=&amp;quot;wikitable&amp;quot;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Course reports}}&lt;br /&gt;
&lt;br /&gt;
==What is event monitoring?==&lt;br /&gt;
*Event monitoring allows admins and teachers to receive notification when certain events happen in Moodle. See [[Events list]] for examples of events and their levels. Note that students may also be allowed to subscribe to rules if they are given the capability &#039;&#039;tool/monitor:subscribe&#039;&#039;. It is not recommended that they be allowed to create or manage rules.&lt;br /&gt;
*To do this, a &#039;rule&#039; needs to be created for the event to be monitored and then a user, such as the admin or teacher will need to subscribe to it to be notified.&lt;br /&gt;
*The rule will specify what the event is and how often it must happen before notification is sent to the subscriber. The notification may be pop-up, email or other chosen methods.&lt;br /&gt;
*A teacher can create a rule from &#039;&#039;Course administration &amp;gt; Reports &amp;gt; Event monitoring rules&#039;&#039; and an administrator can, additionally, create a rule from &#039;&#039;Site administration &amp;gt; Reports &amp;gt; Event monitoring rules.&#039;&#039;&lt;br /&gt;
*You can subscribe to available rules via the user menu &#039;&#039;Preferences &amp;gt; Event monitoring&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
{{MediaPlayer | url = https://youtu.be/YkuK2w1lJnk}}&lt;br /&gt;
&lt;br /&gt;
==Enabling event monitoring==&lt;br /&gt;
&lt;br /&gt;
Event monitoring is disabled by default because of performance issues. An administrator can enable it from &#039;&#039;Site administration &amp;gt; Reports &amp;gt; Event monitoring rules&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==How to create or manage  a rule==&lt;br /&gt;
&lt;br /&gt;
As a course teacher, go to &#039;&#039;Course administration &amp;gt; Reports &amp;gt; Event monitoring rules&#039;&#039;, or as an admin go to &#039;&#039;Site administration &amp;gt; Reports &amp;gt; Event monitoring rules&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===Rule name===&lt;br /&gt;
&lt;br /&gt;
You can call the rule what you like but it should be something others will understand as they may wish to subscribe to the rule you created.&lt;br /&gt;
&lt;br /&gt;
===Area to monitor===&lt;br /&gt;
&lt;br /&gt;
When you select an area to monitor, for example, &#039;&#039;Forum&#039;&#039;, the &#039;Event&#039; drop down menu below will then display the events you can select from.&lt;br /&gt;
&lt;br /&gt;
===Event===&lt;br /&gt;
&lt;br /&gt;
Once an area has been chosen, the events for that area will display here.&lt;br /&gt;
&lt;br /&gt;
===Description===&lt;br /&gt;
&lt;br /&gt;
You don&#039;t have to use a description but if you do, it should be something meaningful to others as they may wish to subscribe to the rule you created.&lt;br /&gt;
&lt;br /&gt;
===Notification threshold===&lt;br /&gt;
&lt;br /&gt;
*This means: &#039;&#039;how many times should this event happen before I get notified?&#039;&#039; &lt;br /&gt;
*For example the following setting would mean that if an event happens five times in 30 minutes then Moodle will send you an alert:&lt;br /&gt;
[[File:notificationthreshold.png|center]]&lt;br /&gt;
&lt;br /&gt;
===Notification message===&lt;br /&gt;
&lt;br /&gt;
When creating or editing a rule, you can embed placeholders to add details to notification messages. The use of placeholders is optional; you can use any personalised message, but if you wish to use placeholders, there are examples of use below:&lt;br /&gt;
&lt;br /&gt;
The placeholders that can be used in a message template are as follows:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Placeholder&lt;br /&gt;
! What it does&lt;br /&gt;
! Example&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;{link}&#039;&#039;&#039;&lt;br /&gt;
| Direct link to the actual event, eg a forum discussion.&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;http://YourMoodle.com/mod/forum/discuss.php?d=2&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;{modulelink}&#039;&#039;&#039;&lt;br /&gt;
| Link to the module where the event has happened, eg a forum&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;http://YourMoodle.com/mod/forum/view.php?id=8&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;{rulename}&#039;&#039;&#039;&lt;br /&gt;
| A name for the rule.&lt;br /&gt;
| Student discussions&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;{description}&#039;&#039;&#039;&lt;br /&gt;
| A description of the rule.&lt;br /&gt;
| I want to receive notifications when there is a large volume of student posts in a discussion.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;{eventname}&#039;&#039;&#039;&lt;br /&gt;
| The name of the event being monitored.&lt;br /&gt;
| Forum post created.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Example 1====&lt;br /&gt;
&lt;br /&gt;
The above example shows the placeholders for a rule to monitor the &#039;&#039;&#039;Forum post created&#039;&#039;&#039; event. The  notification message using these placeholders would  be as follows:&lt;br /&gt;
&lt;br /&gt;
 The rule &#039;&#039;&#039;{rulename}&#039;&#039;&#039;, monitoring the event &#039;&#039;&#039;{eventname}&#039;&#039;&#039;, has just been fulfilled. &lt;br /&gt;
 Click the following link to go to the forum discussion: &#039;&#039;&#039;{link}&#039;&#039;&#039;&lt;br /&gt;
 Rule description: &#039;&#039;&#039;{description}&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The result would display like this:&lt;br /&gt;
&lt;br /&gt;
 The rule Student discussions, monitoring the event Forum post created, has just been fulfilled. &lt;br /&gt;
 Click on the following link to go to the forum discussion: http://YourMoodle.com/mod/forum/discuss.php?d=2 .&lt;br /&gt;
 Rule description: I want to receive notifications when there are a large volume of student posts in a discussion.&lt;br /&gt;
&lt;br /&gt;
====Example 2====&lt;br /&gt;
&lt;br /&gt;
Let&#039;s create a rule called &#039;&#039;&#039;Glossary entries&#039;&#039;&#039; to monitor when a new glossary entry is created:&lt;br /&gt;
&lt;br /&gt;
 The rule &#039;&#039;&#039;{rulename}&#039;&#039;&#039;, monitoring the event &#039;&#039;&#039;{eventname}&#039;&#039;&#039;, has just been fulfilled. &lt;br /&gt;
 Click the following link to go to see the new entry created: &#039;&#039;&#039;{link}&#039;&#039;&#039;&lt;br /&gt;
 Rule description: &#039;&#039;&#039;{description}&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The result would display like this:&lt;br /&gt;
&lt;br /&gt;
 The rule Glossary entries, monitoring the event Entry has been created, has just been fulfilled. &lt;br /&gt;
 Click on the following link to go to see the new entry created: http://YourMoodle.com/mod/glossary/view.php?id=5&amp;amp;mode=entry&amp;amp;hook=1.&lt;br /&gt;
 Rule description: I want to receive notifications when a new glossary entry is created.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Some events do not have a link.  &#039;&#039;&#039;Course deleted&#039;&#039;&#039; and &#039;&#039;&#039;Course module deleted&#039;&#039;&#039; for example, would not display any link if &#039;&#039;&#039;{link}&#039;&#039;&#039;  or &#039;&#039;&#039;{modulelink}&#039;&#039;&#039; is used.&lt;br /&gt;
&lt;br /&gt;
==How to subscribe to a rule==&lt;br /&gt;
&lt;br /&gt;
*When events are created from &#039;&#039;Site&#039;&#039; or &#039;&#039;Course administration &amp;gt; Reports &amp;gt; Event monitoring rules&#039;&#039;, users who have permission to subscribe to rules have an &#039;Event monitoring&#039; link on their preferences page &lt;br /&gt;
*From here, you can unsubscribe to  any events you are subscribed to already and you can subscribe to new events created by you or others.&lt;br /&gt;
&lt;br /&gt;
[[File:EMSubscriptions.png|thumb|center|500px]]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [[Events list report]]&lt;br /&gt;
&lt;br /&gt;
[[es:Monitoreo de eventos]]&lt;br /&gt;
[[de:Event-Beobachtung]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=ownCloud_Repository&amp;diff=140842</id>
		<title>ownCloud Repository</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=ownCloud_Repository&amp;diff=140842"/>
		<updated>2021-07-14T13:24:35Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Text replacement - &amp;quot;class=&amp;quot;nicetable&amp;quot;&amp;quot; to &amp;quot;class=&amp;quot;wikitable&amp;quot;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox plugin&lt;br /&gt;
|type = Repository&lt;br /&gt;
|entry = https://moodle.org/plugins/repository_owncloud&lt;br /&gt;
|tracker = https://github.com/learnweb/moodle-repository_owncloud&lt;br /&gt;
|discussion =&lt;br /&gt;
|maintainer = [[User:University of Münster|University of Münster]]&lt;br /&gt;
|float = right&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Repositories]]&lt;br /&gt;
[[Category:OAuth 2]]&lt;br /&gt;
	&lt;br /&gt;
&amp;lt;!--Repository Plugin for Moodle--&amp;gt;&lt;br /&gt;
=General=&lt;br /&gt;
This repository enables Moodle users to have direct access to their private files from ownCloud in the &#039;&#039;Moodle file picker&#039;&#039; and the &#039;&#039;URL resource module&#039;&#039;,&lt;br /&gt;
enabling to upload files into Moodle directly from their ownCloud,&lt;br /&gt;
without having to download it to their local machine first.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Is your institution using multiple ownCloud servers? Don&#039;t worry, a Moodle administrator can connect multiple ownCloud servers that are then presented separately to the users. Tech-savvy users are not able to add their own ownCloud servers, though, so the Moodle admin is always in control which servers are connected.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Are you using Nextcloud?&#039;&#039;&#039; ownCloud and Nextcloud share the same history. As a consequence, they work quite similar. This repository was developed with ownCloud in mind, but it actually works with Nextcloud as well. Remaining limitations have been resolved with Nextcloud 13.0.1 (see [[#Nextcloud_Limitations|Nextcloud Limitations]] for details).&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
&lt;br /&gt;
This plugin requires configuration in ownCloud (add Moodle as an allowed client) as well as in Moodle (add ownCloud servers to which users will be able to connect). Fair warning: The configuration might become very technical. We collect a list of [[#Troubleshooting|known problems and hints at their resolution]] below.&lt;br /&gt;
&lt;br /&gt;
== Add Moodle as a client to ownCloud ==&lt;br /&gt;
&#039;&#039;Prerequisites: Current ownCloud installation (recommended: version 10.0.1+) with enabled HTTPS and the [https://marketplace.owncloud.com/apps/oauth2 ownCloud OAuth 2 app].&lt;br /&gt;
Alternatively, a current Nextcloud installation (recommended: version 13.0.1+) on HTTPS.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Log in as an administrator. Go to &#039;&#039;&#039;&#039;&#039;Settings ► User authentication&#039;&#039;&#039;&#039;&#039; and add your Moodle installation as a client:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:middle;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name             &lt;br /&gt;
! Redirection URI &lt;br /&gt;
|- style=&amp;quot;vertical-align:middle;&amp;quot;&lt;br /&gt;
| Your Moodle name &lt;br /&gt;
| Your Moodle URL + &#039;&#039;&#039;/admin/oauth2callback.php&#039;&#039;&#039;&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
For example, if your users reach Moodle at &amp;lt;nowiki&amp;gt;https://moodle.example.com&amp;lt;/nowiki&amp;gt;,&lt;br /&gt;
your redirection URI would be &amp;lt;nowiki&amp;gt;https://moodle.example.com/admin/oauth2callback.php&amp;lt;/nowiki&amp;gt;. &lt;br /&gt;
The name can be chosen freely, but note that it will presented to ownCloud users,&lt;br /&gt;
so the name should be self-explanatory to them.&lt;br /&gt;
&lt;br /&gt;
After adding the client, the table displays a corresponding Client Identifier and a secret.&lt;br /&gt;
Those will be required for the configuration in Moodle, so keep them at hand.&lt;br /&gt;
For example, if your users reach Moodle at &amp;lt;nowiki&amp;gt;https://moodle.example.com&amp;lt;/nowiki&amp;gt;,&lt;br /&gt;
your redirection URI would be &amp;lt;nowiki&amp;gt;https://moodle.example.com/admin/oauth2callback.php&amp;lt;/nowiki&amp;gt;. &lt;br /&gt;
The name can be chosen freely, but note that it will presented to ownCloud users,&lt;br /&gt;
so the name should be self-explanatory to them.&lt;br /&gt;
After adding the client, the table displays a corresponding Client Identifier and a secret.&lt;br /&gt;
Those will be required for the configuration in Moodle, so keep them at hand.&lt;br /&gt;
&lt;br /&gt;
== Install this plugin to Moodle ==&lt;br /&gt;
Copy the content of this repository to &#039;&#039;&#039;&#039;&#039;repository/owncloud&#039;&#039;&#039;&#039;&#039;.&lt;br /&gt;
No additional settings are displayed to the admin when installing the plugin. &lt;br /&gt;
However, when the repository is enabled, the admin has to select an issuer which defines the ownCloud server.&lt;br /&gt;
The next steps describe how the necessary issuer is created in Moodle&#039;s central OAuth 2 services settings.&lt;br /&gt;
Afterwards, an ownCloud repository instance is created using that issuer.&lt;br /&gt;
==Create OAuth 2 Issuer==&lt;br /&gt;
You need to configure Moodle so that it knows how to talk to your ownCloud server.&lt;br /&gt;
For this, a so-called OAuth 2 issuer has to be registered in the admin menu &#039;&#039;&#039;&#039;&#039;Site administration ► Server ► OAuth 2 services&#039;&#039;&#039;&#039;&#039;.&lt;br /&gt;
There, select &#039;&#039;&#039;&#039;&#039;Create custom service&#039;&#039;&#039;&#039;&#039;.&lt;br /&gt;
Choose the name freely; it will only be shown to you.&lt;br /&gt;
Enter ClientID and Secret from the ownCloud settings of [[#Add_Moodle_as_a_client_to_ownCloud|Add Moodle as a client to ownCloud]].&lt;br /&gt;
Enable the &amp;quot;Authenticate token requests via HTTP headers&amp;quot; checkbox.&lt;br /&gt;
As Service base URL, enter the full URL to your ownCloud installation, including a custom port (if any).&lt;br /&gt;
For example, if the ownCloud installation is at &amp;lt;nowiki&amp;gt;https://owncloud.example.com:8000/oc/&amp;lt;/nowiki&amp;gt;, then this is the base URL.&lt;br /&gt;
Ignore the other settings and click &#039;&#039;&#039;&#039;&#039;Save changes&#039;&#039;&#039;&#039;&#039;.&lt;br /&gt;
Afterwards, your issuer is listed in a table.&lt;br /&gt;
There, click &#039;&#039;&#039;&#039;&#039;Configure endpoints&#039;&#039;&#039;&#039;&#039; to configure the services that we want to use, as ownCloud does not support auto discovery.&lt;br /&gt;
For the ownCloud Repository plugin four endpoints have to be registered that are ownCloud-specific: &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Endpoint name            &lt;br /&gt;
!Endpoint URL    &lt;br /&gt;
|-  &lt;br /&gt;
| token_endpoint         &lt;br /&gt;
| Base URL + &#039;&#039;&#039;/index.php/apps/oauth2/api/v1/token&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| authorization_endpoint&lt;br /&gt;
| Base URL + &#039;&#039;&#039;/index.php/apps/oauth2/authorize&#039;&#039;&#039;             &lt;br /&gt;
|-&lt;br /&gt;
| webdav_endpoint        &lt;br /&gt;
| Base URL + &#039;&#039;&#039;/remote.php/webdav/&#039;&#039;&#039;                   &lt;br /&gt;
|-&lt;br /&gt;
| ocs_endpoint            &lt;br /&gt;
| Base URL + &#039;&#039;&#039;/ocs/v1.php/apps/files_sharing/api/v1/shares&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| userinfo_endpoint     &lt;br /&gt;
| Base URL + &#039;&#039;&#039;/ocs/v2.php/cloud/user?format=json&#039;&#039;&#039;&lt;br /&gt;
|} &lt;br /&gt;
{{Note|Previously, an additional parameter in the ocs_endpoint URL was listed &amp;lt;nowiki&amp;gt;(?format=xml).&amp;lt;/nowiki&amp;gt; This is no longer necessary, however, having the parameter set would not result in any problems either.}}&lt;br /&gt;
Given the Base URL example above, an exemplary &#039;&#039;token_endpoint&#039;&#039; URL is 	&lt;br /&gt;
&amp;lt;nowiki&amp;gt;https://owncloud.example.com:8000/oc/index.php/apps/oauth2/api/v1/token&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
Return to the issuer overview and click on &#039;&#039;&#039;&#039;&#039;Configure user field mappings&#039;&#039;&#039;&#039;&#039;. Enter the following mappings:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! External field name &lt;br /&gt;
! Internal field name &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;ocs-data-email&#039;&#039;&#039;   &lt;br /&gt;
| &#039;&#039;&#039;email&#039;&#039;&#039;          &lt;br /&gt;
|- &lt;br /&gt;
| &#039;&#039;&#039;ocs-data-id&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;username&#039;&#039;&#039;     &lt;br /&gt;
|} &lt;br /&gt;
This is sufficient to use basic functionality of the ownCloud repository!&lt;br /&gt;
&lt;br /&gt;
Optional: If you want to use access controlled links, you also need to [[OAuth_2_services#Connecting_a_system_account|connect a system account]].&lt;br /&gt;
This must be an ownCloud account that does &#039;&#039;not&#039;&#039; belong to a particular person. Instead, it should be owned by Moodle.&lt;br /&gt;
First, create such an account in ownCloud or ask your ownCloud administrator to do so.&lt;br /&gt;
Choose a strong, ideally random password and do not give it to someone else who is not an administrator of your Moodle.&lt;br /&gt;
Afterwards, in the issuer overview, click on &#039;&#039;&#039;Connect to a system account&#039;&#039;&#039;.&lt;br /&gt;
Make sure that you are logged in to ownCloud &#039;&#039;with that account&#039;&#039; and &#039;&#039;&#039;Authorize&#039;&#039;&#039; Moodle.&lt;br /&gt;
You should then be back in the issuer overview, where you can verify that you connected the right account by checking its username.&lt;br /&gt;
(In your browser, log out of ownCloud now to avoid using the system account by accident.)&lt;br /&gt;
Also, &#039;&#039;do not change the system account&#039;&#039; after the plugin has been used. This will break all access controlled links that were created prior to a change.&lt;br /&gt;
&lt;br /&gt;
For further information on configuring OAuth 2 clients visit the [[OAuth_2_services|Moodle documentation on OAuth 2]] and the [[dev:OAuth_2_API|Developer documentation on OAuth 2]].&lt;br /&gt;
&lt;br /&gt;
== Create a repository instance ==&lt;br /&gt;
Now that the ownCloud issuer is configured, it can be associated with an instance of the repository. &lt;br /&gt;
Go to the repository settings &#039;&#039;&#039;&#039;&#039;Site administration ► Plugins ► Repositories ► Manage repositories&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
and enable the ownCloud respository (&#039;&#039;&#039;&#039;&#039;Enabled and visible&#039;&#039;&#039;&#039;&#039;). &lt;br /&gt;
When asked for special user permissions, do not check any boxes. As they may not configure OAuth 2 issuers, these permissions are not that useful.&lt;br /&gt;
Then, open the &#039;&#039;&#039;&#039;&#039;Settings&#039;&#039;&#039;&#039;&#039; of the ownCloud repository and click &#039;&#039;&#039;&#039;&#039;Create a repository instance&#039;&#039;&#039;&#039;&#039;.&lt;br /&gt;
Enter a name that will be displayed to Moodle users and select the configured issuer.&lt;br /&gt;
A text underneath the select box tells you which issuers are suited for use with this repository.&lt;br /&gt;
If your issuer does not show up, double-check the issuer settings; particularly all URLs (base URL and endpoints) and the names of the endpoints.&lt;br /&gt;
 [[Image:owncloudconfig.png|frame|center|Issuer instance configuration]]&lt;br /&gt;
&lt;br /&gt;
You can also define the &#039;&#039;&#039;Name of folder&#039;&#039;&#039; that will show up in users&#039; private file storage once they open access controlled links:&lt;br /&gt;
A share in ownCloud will always result in a file showing up at the user, so this is where that file will go in order to avoid cluttering their document root.&lt;br /&gt;
The dropdowns allow you to define how the repository may interact with files:&lt;br /&gt;
&#039;&#039;&#039;Supported files&#039;&#039;&#039; allows you to restrict usage of the repository, i.e., to allow linking (&amp;quot;external&amp;quot;) only or upload (&amp;quot;internal&amp;quot;) only, but you can also allow unrestricted usage.&lt;br /&gt;
If &#039;&#039;&#039;Internal and external&#039;&#039;&#039; is selected, you can define the default type presented to users.&lt;br /&gt;
&lt;br /&gt;
Afterwards, everything is configured and ready to go! Let&#039;s see what this looks like for your users:&lt;br /&gt;
&lt;br /&gt;
=Usage=&lt;br /&gt;
The repository is available in all activities where the file picker is used.&lt;br /&gt;
However, course admins can disable it in the &#039;&#039;&#039;&#039;&#039;Course Administration ► Repositories&#039;&#039;&#039;&#039;&#039; menu.&lt;br /&gt;
In the file picker a login button is displayed (assuming that the user is not authenticated yet):&lt;br /&gt;
 [[Image:filepickerlogin.png|frame|center|File Picker Login]]&lt;br /&gt;
When the button is clicked a pop-up window or a new tab is opened and the user will be requested to login at the ownCloud instance and authorise access from Moodle.&lt;br /&gt;
If authorisation is granted, the user sees a tabular listing of the files available:&lt;br /&gt;
 [[Image:filepickerlisting.png|frame|center|File Picker Listing]]&lt;br /&gt;
Here the user can select files, reload the content and logout. The settings button opens the ownCloud web interface in a new window so that you can manage your files easily&lt;br /&gt;
&lt;br /&gt;
==Access controlled links==&lt;br /&gt;
&lt;br /&gt;
Students may submit files from ownCloud/Nextcloud as &#039;access controlled links&#039; in [[Using Assignment|assignments]]. Once submitted, the student may no longer change them, but the teacher is allowed to edit them.&lt;br /&gt;
&lt;br /&gt;
Teachers may display files from ownCloud/Nextcloud as &#039;access controlled links&#039;. The teacher can then continue updating the files, but students can only view them.&lt;br /&gt;
&lt;br /&gt;
To enable this feature, ensure that:&lt;br /&gt;
&lt;br /&gt;
# A system account has been connected in [[OAuth 2 services]] in Site administration. This account will own and control access to files submitted by students and teachers. Teachers will be able to edit the files but students will not. This should be a dedicated account for this purpose.&lt;br /&gt;
# &amp;quot;Supported files&amp;quot; is set  to &amp;quot;Internal and External&amp;quot;. &lt;br /&gt;
# Optional: &amp;quot;Default return type&amp;quot; is set  to &amp;quot;External (only links stored in Moodle)&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Nextcloud Limitations=&lt;br /&gt;
&lt;br /&gt;
In 2018, Nextcloud created and published a set of fixes that resolve all known limitations. Before that, Nextcloud (up to and including version 12) had a limitation that prevented the use of file links. That means, files could only be uploaded from Nextcloud into Moodle, but you could not use the alternative, i.e. creating a file link, because the Nextcloud server would block you from doing so. Should you run into this issue, make sure that you are working with the latest version of Nextcloud (definitely not older than 13.0.1!). If that does not help, please check the [[#Troubleshooting]] section below.&lt;br /&gt;
&lt;br /&gt;
With the introduction of Access Controlled Links (similar to the functionality of the [[Google_Drive_repository#Access_controlled_links|Google Drive repository]] and  [[OneDrive_repository#Access_controlled_links|OneDrive repository]] plugins) in v3.5-r2 of this plugin, Nextcloud poses a new limitation. Whenever you authorise Moodle to access your Nextcloud, you log out at the browser at the same time. To access an access controlled link file you first have to authorise Moodle, then re-login in to Nextcloud in the browser. Then you can access the file from Moodle.&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
&lt;br /&gt;
Installing and configuring this plugin is a rather technical endeavour, given that making two machines speak to each other is a very technical topic. If something goes wrong, it may be hard to find out the root cause. Nevertheless, so far we have been able to resolve all issues and, once the plugin is installed and configured correctly, it runs smoothly and very stable. The following is a list of issues that were encountered during configuration, and hints at how to proceed. &lt;br /&gt;
&lt;br /&gt;
; I cannot connect a system account. : Make sure the system account is different from all personal accounts. It has to be an account that belongs to Moodle, not to a person. Look at the issuer settings. The checkbox &#039;&#039;&#039;Authenticate token requests via HTTP headers&#039;&#039;&#039; must be enabled!&lt;br /&gt;
; Authentication seems to have succeeded, but the filepicker shows &amp;quot;There are no files&amp;quot;. : The Apache server that hosts your ownCloud may be misconfigured. Its Apache logs may show a 401 error as well if you try to see the files in Moodle. Please have a look at the comments following https://github.com/learnweb/moodle-repository_owncloud/issues/26#issuecomment-343521986 to get ideas on how to solve this. &#039;&#039;&#039;Alternatively&#039;&#039;&#039;, it is possible that HTTPS is not configured correctly on the Nextcloud end. You need a valid and trusted certificate for your Nextcloud server. It is not possible to manually define exceptions, unlike in the browser. &lt;br /&gt;
; I can only upload files, not link to files. : Are you using Nextcloud? In that case, upgrade Nextcloud to version 13.0.1 or later. Prior to that, Nextcloud suffered from technical limitations that prevented file linking.&lt;br /&gt;
; If I link to files in Nextcloud I get &amp;quot;A request to ownCloud has failed&amp;lt;nowiki&amp;gt;:&amp;lt;/nowiki&amp;gt; Invalid response&amp;quot;. : Please double-check the URL that you entered for &#039;&#039;&#039;ocs_endpoint&#039;&#039;&#039;. Until repository_owncloud v3.5-r1 it was essential that &#039;&#039;&#039;?format=xml&#039;&#039;&#039; was specified at the end of the URL.&lt;br /&gt;
; After signing in with ownCloud I get an error that says &amp;quot;This request is not valid. Please contact the administrator of [your Moodle Name] if this error persists.&amp;quot;. : You might have entered the wrong &#039;&#039;Redirect URI&#039;&#039; in ownCloud. It is important that it has &#039;&#039;&#039;/admin/oauth2callback.php&#039;&#039;&#039; at the end, and that it corresponds &#039;&#039;&#039;exactly&#039;&#039;&#039; with what Moodle is going to send to ownCloud when attempting to authenticate!&lt;br /&gt;
; When I access an access controlled link I authorise Moodle but then cannot see the file. : In Nextcloud before 14.0.1, when you authorise Moodle, your Nextcloud browser session ends. This is a special limitation of Nextcloud. You have to re-login in the browser to access the file. Starting with Nextcloud 14.0.1, this issue is resolved.&lt;br /&gt;
; Since I installed the plugin and connected a system account, Moodle is very slow : Nextcloud has a brute-force protection that is somewhat naïve. When enabled, it slows down some Moodle requests in some cases (even though the Moodle plugin is definitely not going to brute-force your Nextcloud!), but you can change this. First, update to the newest version of the repository plugin, as it reduces the number of requests to Nextcloud. Second, download the [https://apps.nextcloud.com/apps/bruteforcesettings &amp;quot;Brute-force settings&amp;quot; app in Nextcloud]. After installation, add the IP of your Moodle server to the whitelist.&lt;br /&gt;
&lt;br /&gt;
Please add to this list if you were able to solve another issue, this will help others greatly! Thanks!&lt;br /&gt;
&lt;br /&gt;
= Acknowledgement =&lt;br /&gt;
This plugin was originally created by Information Systems students in the project seminar sciebo@Learnweb &lt;br /&gt;
at the University of Münster in 2016/17. See [https://github.com/pssl16 their github page] for an archive(!) of their great work. They also [https://owncloud.org/blog/introducing-oauth2-secure-authorization-flow/ created the OAuth 2 interface for ownCloud] (featured on [https://www.heise.de/security/meldung/Sichere-Anwendungsautorisierung-ownCloud-fuehrt-OAuth-2-0-ein-3874871.html heise Security (German)]); otherwise all this wouldn&#039;t have been possible.&lt;br /&gt;
Learnweb (University of Münster) is maintaining the Moodle plugins since 2017.&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Development:Grading_interface_2.0&amp;diff=140841</id>
		<title>Development:Grading interface 2.0</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Development:Grading_interface_2.0&amp;diff=140841"/>
		<updated>2021-07-14T13:24:34Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Text replacement - &amp;quot;class=&amp;quot;nicetable&amp;quot;&amp;quot; to &amp;quot;class=&amp;quot;wikitable&amp;quot;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Work in progress}}&lt;br /&gt;
{{Moodle 2.0}}&lt;br /&gt;
&lt;br /&gt;
==Objectives==&lt;br /&gt;
&lt;br /&gt;
The goals of Grading Interface 2.0:&lt;br /&gt;
&lt;br /&gt;
* Remove redundant per module grading interfaces.&lt;br /&gt;
* Use a consistent approach for all grading throughout Moodle&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
The Grading Interface 2.0 provides a user interface to add and edit grades. It will consist of a single page within /grade (the gradebook) to which all modules direct the user to perform grading.&lt;br /&gt;
&lt;br /&gt;
==Interface==&lt;br /&gt;
The interface will be similar to mod/assignment/submissions.php Further UI improvements can be made once the underlying architecture has been implemented.&lt;br /&gt;
&lt;br /&gt;
The new grading interface will replace each module&#039;s internal grading interface. For example within the assignment module on mod/assignment/view.php?id=9 (for example) there is a link that says &amp;quot;View N submitted assignments&amp;quot; that links to mod/assignment/submissions.php?id=9 where 9 is the PK of a row in the course_modules table. This would be replaced with a link to grade/submissions.php?id=9.&lt;br /&gt;
&lt;br /&gt;
[[Image:GradingUI.gif]]&lt;br /&gt;
&lt;br /&gt;
When the teacher clicks on &amp;quot;Grade&amp;quot; to grade an individual submission no popups should be required. If Javascript is available, use a lightbox to display the submission grading interface. If Javascript is not available replace the whole page. Adding new questions already behaves this way so for example of how this is implemented look at /question/editlib.php function create_new_question_button() and question/qbank.js init_container().&lt;br /&gt;
&lt;br /&gt;
[[Image:GradingUIIndividual.gif]]&lt;br /&gt;
&lt;br /&gt;
==Code Structures==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Database Structures==&lt;br /&gt;
New tables to be created&lt;br /&gt;
===Grade===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Default&lt;br /&gt;
! Info&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10)&lt;br /&gt;
| auto-incrementing&lt;br /&gt;
| The unique ID for this grade.&lt;br /&gt;
|-&lt;br /&gt;
| contextid&lt;br /&gt;
| int(10)&lt;br /&gt;
|&lt;br /&gt;
| The context id defined in context table. Is this the correct way to join the grade with the assignment/quiz?&lt;br /&gt;
|-&lt;br /&gt;
| grade&lt;br /&gt;
| int(10)&lt;br /&gt;
|&lt;br /&gt;
| The grade&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10)&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The following tables need to be migrated then removed:&lt;br /&gt;
* quiz_grades&lt;br /&gt;
&lt;br /&gt;
The following fields need to be migrated then removed:&lt;br /&gt;
* assignment_submission.grade&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Installation_FAQ&amp;diff=140840</id>
		<title>Installation FAQ</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Installation_FAQ&amp;diff=140840"/>
		<updated>2021-07-14T13:24:34Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Text replacement - &amp;quot;class=&amp;quot;nicetable&amp;quot;&amp;quot; to &amp;quot;class=&amp;quot;wikitable&amp;quot;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Installing Moodle}}&lt;br /&gt;
== System information needed for Installation problems forum ==&lt;br /&gt;
When posting questions to the [http://moodle.org/mod/forum/view.php?id=28 Installation problems forum], try to provide as much background information as possible about your Moodle system. Consider providing some or all of the following:&lt;br /&gt;
* Server Operating System name (version also if possible): &lt;br /&gt;
* PHP version (e.g. PHP 5.4.4)&lt;br /&gt;
* Database server type and version (e.g. MySQL 5.5.18)&lt;br /&gt;
* Browser and version (e.g. Firefox, IE8):&lt;br /&gt;
* Moodle version (e.g. 3.0):&lt;br /&gt;
* Moodle install type? (New/Upgrade):&lt;br /&gt;
* Moodle config.php attached (please remove passwords):&lt;br /&gt;
* Phpinfo attached?:&lt;br /&gt;
&lt;br /&gt;
Make sure you provide a sensible description (never HELP! or URGENT!) and a full description of what you did and what happened. Copy and paste any error messages accurately in full. &#039;Nothing&#039; is not a symptom, even a blank page is something!&lt;br /&gt;
&lt;br /&gt;
[[#top|Top]]&lt;br /&gt;
&lt;br /&gt;
==PHP - is it installed and what version do I have?==&lt;br /&gt;
&lt;br /&gt;
Make a new file on your web site called &#039;&#039;info.php&#039;&#039;, containing the following text, and call it from your browser:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
&amp;lt;?PHP phpinfo() ?&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If nothing happens then you don&#039;t have PHP installed or your webserver is not configured to handle .php files properly. See the installation docs for some information about where to download it for your computer. See the [[phpinfo]] page for details about the content of this page.&lt;br /&gt;
&lt;br /&gt;
[[#top|Top]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==I am being told that I need the &#039;&#039;&#039;intl php plugin&#039;&#039;&#039; to continue to install Moodle 2.x==&lt;br /&gt;
The intl.dll from Zend is part of the PHP 5.2.8 release and later. It is aimed at improving the internationalization of php pages and Moodle 2.x uses it as part of this process. If your install is on a local machine or network, then you can download the latest version of PHP and update your PHP. You then have to uncomment all the required dynamic extensions you need, including the php_intl.dll extension. The problem is then solved. If the install is on a host server, then you need to contact your host and ask them to do the same. As an alternative, you can unzip/untar the download file, copy and paste the intl.dll file to your php/ext folder and include the line:&lt;br /&gt;
  extension=php_intl.dll&lt;br /&gt;
in the Dynamic Extensions section of your php.ini file.&lt;br /&gt;
&lt;br /&gt;
You can also set the error level using:&lt;br /&gt;
  intl.error_level = E_WARNING &lt;br /&gt;
but this is not essential&lt;br /&gt;
&lt;br /&gt;
If you are using a Linux install, use your system package manager or specify compilation flag.&lt;br /&gt;
    * Debian 5.0 (&amp;amp; Ubuntu) use: apt-get install php-intl or apt-get install php5-intl &lt;br /&gt;
    * CentOS 5.5 (&amp;amp; RedHat) you should (probably) be using php 5.3 from remi and then use: yum install php-intl&lt;br /&gt;
&lt;br /&gt;
This technique can be applied to any updated dynamic extension from Zend. You may want to use later dll files in your php/ext folder, you can do so by doing the same as above, but be careful, your version may not be able to take full advantage of the extension, or some very new extensions may cause an unexpected instability. The best option is still to update on a regular basis, perhaps once a year or so for the PHP.&lt;br /&gt;
&lt;br /&gt;
[[#top|Top]]&lt;br /&gt;
&lt;br /&gt;
===What Dynamic Extensions do I really need uncommented in my php.ini file? What else do I need to change?===&lt;br /&gt;
This assumes you have complete control over the installation and running of your server, if your Moodle is hosted, you need to do something different, which is also discussed below. In the php.ini you need to delete the semi-colon, the ;, from the start of any line to uncomment it. For Moodle, you really should only need to change some values, and make sure the extensions you require are available. These are:&lt;br /&gt;
&lt;br /&gt;
Resource Limits&lt;br /&gt;
  memory_limit = 128M     //This is the maximum it requires and on a shared server you may get much less. &lt;br /&gt;
&lt;br /&gt;
Data Handling &lt;br /&gt;
  post_max_size = 512M    //This allows postings of up to 512MB, but set it to suit yourself and your circumstances&lt;br /&gt;
&lt;br /&gt;
Paths and Directories&lt;br /&gt;
  doc_root =&amp;quot;driveletter:\path\to\server\active\web\directory&amp;quot;  (e.g. d:\Apache\htdocs or e:\iis\wwwroot )&lt;br /&gt;
  and&lt;br /&gt;
  extension_dir = &amp;quot;driveletter:\path\to\php\ext&amp;quot; (e.g. d:\php\ext or e:\iis\php\ext)&lt;br /&gt;
&lt;br /&gt;
File Uploads&lt;br /&gt;
  upload_max_filesize = 512M    (This is different from the post_max_size this is for file uploads.)&lt;br /&gt;
&lt;br /&gt;
Dynamic Extensions (&#039;&#039;&#039;Windows Only&#039;&#039;&#039;)&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! PHP 5.3.x&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
  extension=php_curl.dll&lt;br /&gt;
  extension=php_gd2.dll&lt;br /&gt;
  extension=php_gettext.dll&lt;br /&gt;
  extension=php_intl.dll&lt;br /&gt;
  extension=php_imap.dll&lt;br /&gt;
  extension=php_ldap.dll&lt;br /&gt;
  extension=php_mbstring.dll&lt;br /&gt;
  extension=php_exif.dll      ; Must be after mbstring as it depends on it&lt;br /&gt;
  extension=php_mysql.dll&lt;br /&gt;
  extension=php_mysqli.dll&lt;br /&gt;
  extension=php_openssl.dll&lt;br /&gt;
  extension=php_pdo_mssql.dll&lt;br /&gt;
  extension=php_pdo_mysql.dll&lt;br /&gt;
  extension=php_soap.dll&lt;br /&gt;
  extension=php_sockets.dll&lt;br /&gt;
  extension=php_sqlite.dll&lt;br /&gt;
  extension=php_xmlrpc.dll&lt;br /&gt;
  extension=php_zip.dll&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These edits and Dynamic extensions cover a range of options here, there are a number of other possibilities, but these listed are the most common ones. Unless you have a specific need, there may not be any reason to deviate from these settings, but if you do, make sure you know what is going to happen. These extensions will also allow you to successfully install and run many other PHP applications. &lt;br /&gt;
&lt;br /&gt;
One example is the Oracle extensions are not shown here, but Oracle can be used for the Moodle database. Another area people often get themselves into trouble is using &amp;quot;Magic quotes&amp;quot;. Magic quotes really should be set to off, they were only introduced early in the use of PHP to allow for some inexperienced scripting practices, (read poor, shoddy or dodgy here). If someone is still writing poor scripts, then they deserve to draw attention to themselves and their scripts deleted.&lt;br /&gt;
&lt;br /&gt;
[[#top|Top]]&lt;br /&gt;
&lt;br /&gt;
==What &amp;amp; where are Moodle&#039;s configuration settings stored?==&lt;br /&gt;
Configuration settings are stored in the config.php file stored in your moodle folder. This file is created during the installation process. If there is a problem and the installation cannot create the file, you can try creating it manually from the [[Configuration file]] docs. &lt;br /&gt;
[[#top|Top]]&lt;br /&gt;
&lt;br /&gt;
==Downloading previous releases of Moodle==&lt;br /&gt;
&lt;br /&gt;
Previous versions of Moodle that are not found on [http://download.moodle.org Moodle downloads] may be downloaded from &amp;lt;nowiki&amp;gt;http://download.moodle.org/stable[version_number]/&amp;lt;/nowiki&amp;gt; where [version_number] is the number without a point. For example http://download.moodle.org/stable22/ or http://download.moodle.org/stable27/&lt;br /&gt;
&lt;br /&gt;
You&#039;ll see a directory tree with the files displayed. Click on the one you want and download as normal. If you require the latest update of the version, scroll to the end of the list and download the &amp;quot;moodle-latest&amp;quot; file.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Windows Packages&#039;&#039;&#039;: To download other releases not found in [http://download.moodle.org/windows/ Moodle packages for Windows], use this URL:&lt;br /&gt;
:&amp;lt;nowiki&amp;gt;http://download.moodle.org/windows/MoodleWindowsInstaller-latest-[version_number].zip&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Mac Packages&#039;&#039;&#039;: To download other releases not found in [http://download.moodle.org/macosx/ Mac packages], use either of these URLs (depending on whether you need the Intel or PPC package):&lt;br /&gt;
:&amp;lt;nowiki&amp;gt;http://download.moodle.org/macosx/Moodle4Mac-Intel-[version_number].dmg&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
:&amp;lt;nowiki&amp;gt;http://download.moodle.org/macosx/Moodle4Mac-PPC-[version_number}.dmg&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For details of how to download a particular weekly version, see the post [https://moodle.org/mod/forum/discuss.php?d=346698#p1398162 Looking for VERY specific release of older Moodle].&lt;br /&gt;
&lt;br /&gt;
[[#top|Top]]&lt;br /&gt;
&lt;br /&gt;
== How to enable and check PHP error logs==&lt;br /&gt;
PHP can be set up to log errors in a variety of different ways: two of these involve the use of the php.ini file and the ini_set command.  See [[dev:PHP error logs|PHP_error_logs]].&lt;br /&gt;
&lt;br /&gt;
== &amp;quot;Could not find a top level course&amp;quot; ==&lt;br /&gt;
If this appears immediately after you have attempted to install Moodle it almost certainly means that the installation did not complete. A complete installation will ask you for the administrator profile and to name the site just before it completes. Check your logs for errors. Then drop the database and start again. If you used the web-based installer try the command line one. Does your computer definitely have sufficient resource to run Moodle?&lt;br /&gt;
&lt;br /&gt;
==Email copies are not being sent from my forums==&lt;br /&gt;
&lt;br /&gt;
You &#039;&#039;must&#039;&#039; set up cron properly if you want Moodle to send out automatic email from forums, assignments etc. This same process also performs a number of clean-up tasks such as deleting old unconfirmed users, unenrolling old students and so on. Please refer to the [[Cron|cron instructions]].&lt;br /&gt;
&lt;br /&gt;
Tips:&lt;br /&gt;
* Try the default settings in &#039;&#039; Site administration &amp;gt; Server &amp;gt; Email&#039;&#039;. This generally works. Except...&lt;br /&gt;
* On a Windows server you *must* supply the address of an SMTP server (Windows, unlike Unix, does not have a build in mail server) in the above settings page&lt;br /&gt;
* Make sure that &#039;&#039;allowuseremailcharset&#039;&#039; in &#039;&#039;Site administration &amp;gt; Server &amp;gt; Email &amp;gt; Outgoing mail configuration&#039;&#039; is set to No unless you really know what you are doing. Setting this to Yes can cause a problem in some versions of Moodle.&lt;br /&gt;
* Check your firewall or ask your network administrator. Many mail servers are heavily locked down and you may need permission to send mail through them.&lt;br /&gt;
&lt;br /&gt;
[[#top|Top]]&lt;br /&gt;
&lt;br /&gt;
==I can&#039;t log in - I just stay stuck on the login screen==&lt;br /&gt;
&lt;br /&gt;
This may also apply if you are seeing  “Your session has timed out. Please login again” or &amp;quot;A server error that affects your login session was detected. Please login again or restart your browser&amp;quot; and cannot log in.&lt;br /&gt;
&lt;br /&gt;
The following are possible causes and actions you can take (in no particular order):&lt;br /&gt;
&lt;br /&gt;
* Check first that your main admin account (which will be a manual account) is also a problem. If your users are using an external authentication method (e.g. LDAP) that could be the problem. Isolate the fault and make sure it really is Moodle before going any further.&lt;br /&gt;
* Check that your hard disk is not full or if your server is on shared hosting check that you have not reached your disk space quota. This will prevent new sessions being created and nobody will be able to log in. &lt;br /&gt;
* Carefully check the permissions in your &#039;moodledata&#039; area. The web server needs to be able to write to the &#039;sessions&#039; subdirectory. &lt;br /&gt;
* Your own computer (not your Moodle server) may have a firewall that is stripping referrer information from the browser. Here are some instructions for fixing [http://service1.symantec.com/SUPPORT/nip.nsf/46f26a2d6dafb0a788256bc7005c3fa3/b9b47ad7eddd343b88256c6b006a85a8?OpenDocument&amp;amp;src=bar_sch_nam Norton firewall products].&lt;br /&gt;
* Try deleting the &#039;&#039;sessions&#039;&#039; folder in your moodledata directory (anybody currently logged in will be thrown out)&lt;br /&gt;
* Try deleting cookies on your computer and/or try another browser or another client computer&lt;br /&gt;
* In &#039;&#039;Settings &amp;gt; Site administration &amp;gt; Server &amp;gt; Session Handling&#039;&#039;, try setting a value for &#039;Cookie prefix&#039;. You can also do this by setting &amp;lt;code&amp;gt;$CFG-&amp;gt;sessioncookie=&#039;something&#039;;&amp;lt;/code&amp;gt; in config.php. This is especially true if you are using multiple Moodles on the same browser. &lt;br /&gt;
* Make sure you have not removed or changed the [[Password salting|Password Salt]] value(s) in config.php. If passwords were created using a salt the correct salt must be in config.php for those passwords to continue to work. This is easily done if you recreate config.php while performing an upgrade and forget to transfer the salt values. &lt;br /&gt;
* Do you have a .htaccess file in your Moodle folder (or its parent directories). If so, is there anything in there that might be causing trouble (strange redirects, access restrictions etc.)?&lt;br /&gt;
* Check the value of &#039;&#039;&#039;mnet_localhost_id&#039;&#039;&#039; in the mdl_config database table. It&#039;s normally 1 but must match the &#039;&#039;&#039;mnet_hostid&#039;&#039;&#039; field in your user records in the mdl_user table for the user to be recognised. It can sometimes get changed spuriously during upgrades or site migrations. &lt;br /&gt;
* Check config.php - it should NOT have any spaces/new lines at the end of code.&lt;br /&gt;
* You are using the correct username and password, yes?&lt;br /&gt;
&lt;br /&gt;
If you are still having problems, read the [[Can_not_log_in | Cannot log in]] page. You &#039;&#039;&#039;could&#039;&#039;&#039; also try changing the admin password. Proceed as if you have lost it - see [[Administration FAQ]].&lt;br /&gt;
&lt;br /&gt;
[[#top|Top]]&lt;br /&gt;
&lt;br /&gt;
==I log in but the login link doesn&#039;t change. I am logged in and can navigate freely.==&lt;br /&gt;
&lt;br /&gt;
Make sure the URL in your &amp;lt;code&amp;gt;$CFG-&amp;gt;wwwroot&amp;lt;/code&amp;gt; setting is exactly the same as the one you are actually using to access the site.&lt;br /&gt;
&lt;br /&gt;
[[#top|Top]]&lt;br /&gt;
==Uploaded files give &amp;quot;File not found&amp;quot;==&lt;br /&gt;
&lt;br /&gt;
For example: Not Found: The requested URL /moodle/file.php/2/myfile.jpg was not found on this server.&lt;br /&gt;
&lt;br /&gt;
This indicates that slash arguments are not enabled on your web server. Please see [[Using slash arguments]] for details.&lt;br /&gt;
&lt;br /&gt;
[[#top|Top]]&lt;br /&gt;
&lt;br /&gt;
==Why are all my pages blank?==&lt;br /&gt;
&lt;br /&gt;
Check the dirroot variable in &#039;&#039;config.php&#039;&#039;. You must use complete, absolute pathnames (e.g.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$CFG-&amp;gt;dirroot = &amp;quot;/var/www/moodle&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another reason might be that PHP has not been configured to support MySQL (or whatever other database you are using). This is common on RedHat and OpenBSD installations. In this case, an error is generated, but since error displays are often disabled by default, all that is seen on the browser is a blank screen. To enable PHP error displays see [[Installation_FAQ#How_to_enable_and_check_PHP_error_logs | How to enable and check PHP error logs]].&lt;br /&gt;
&lt;br /&gt;
To determine if database support is your problem, insert this as the second line in your &#039;&#039;config.php&#039;&#039; file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
phpinfo();&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then reload the web page. Examine the output closely to see if you chosen database is supported. If not, look for a package you are missing.&lt;br /&gt;
&lt;br /&gt;
[[#top|Top]]&lt;br /&gt;
&lt;br /&gt;
== Why is a particular page blank or incomplete? ==&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Check your web server log files!!&#039;&#039;&#039; &lt;br /&gt;
:If a particular page is blank or incomplete (it doesn&#039;t display the footer), before you do anything else switch on [[Debugging]] and  [[Installation_FAQ#How_to_enable_and_check_PHP_error_logs | check your PHP error logs]]. Having established that PHP error logging is working, reproduce the error. Immediately check the error log file right at the end. Hopefully you will see a PHP error message at or very near the end of the file. This may solve your problem directly or makes it a lot easier to diagnose the problem in the Moodle forums.&lt;br /&gt;
&lt;br /&gt;
*If you are &#039;&#039;&#039;upgrading to a new version of Moodle&#039;&#039;&#039;, check that you do not have an old version of a non-standard block or module installed. Remove any such blocks or modules installed using the admin settings page and start the install process again. However, do also make sure that you have included all optional plugins that were required by your courses. This is particularly common with &amp;quot;editing on&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
*If you &#039;&#039;&#039;do not see any blocks listed&#039;&#039;&#039;, turn editing on and remove any blocks that you have added to that page and try reloading.&lt;br /&gt;
&lt;br /&gt;
*You may get this error immediately after &#039;&#039;&#039;selecting a language&#039;&#039;&#039;. At this stage of the installation process your Moodle computer may need to connect to the Internet and download a language pack, so check that the computer can access the Internet by using a browser. Check also that your PHP settings are as given in the Moodle [[Installing_Moodle#Requirements | Moodle Requirements]] page.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;See also&#039;&#039;&#039;:&lt;br /&gt;
*Using Moodle [http://moodle.org/mod/forum/discuss.php?d=97734 PHP configuration error] forum discussion&lt;br /&gt;
&lt;br /&gt;
==Installation hangs when setting-up database tables==&lt;br /&gt;
Sometimes the installation will hang when setting up tables, where only half the page displayed in the browser and/or other outputs are removed.  You may see truncated MySQL statements, or the “Scroll to continue” link is displayed but no “Continue” button is there. &lt;br /&gt;
&lt;br /&gt;
See [[Unexpected installation halts]] for more about solutions that involve:&lt;br /&gt;
*Checking for MySQL limits&lt;br /&gt;
*Checking the .htaccess files &lt;br /&gt;
*Code customizations issues&lt;br /&gt;
*Checking memory limit &lt;br /&gt;
*Upgrade incrementally&lt;br /&gt;
*Fix fopen function&lt;br /&gt;
&lt;br /&gt;
[[#top|Top]]&lt;br /&gt;
&lt;br /&gt;
==Why can&#039;t I upload a new image into my profile?==&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t see anything on your user profile pages to let you upload user images then it&#039;s usually one of the following:&lt;br /&gt;
*The permissions associated with the role you are using are preventing you from changing your profile picture.&lt;br /&gt;
* GD is not installed, or is not enabled on your server. Make sure &#039;&#039;&#039;GD has been included in your PHP installation&#039;&#039;&#039;. You can check this by going to &#039;&#039;Site Administration &amp;gt; Server &amp;gt; PHP info&#039;&#039; and looking for the gdversion setting. This setting is chosen automatically every time you visit that page. If it shows GD version 1 or version 2 then everything should be fine. Save that configuration page and go back to your user profile.&lt;br /&gt;
* GD is installed, but is in some way corrupt. For instance, [http://moodle.org/mod/forum/discuss.php?d=44271#p386194 see this discussion on empty lines or white spaces in config files.]&lt;br /&gt;
GD is a library that allows image processing. For example, when all is well with your system, and you upload a new profile image, GD compresses the image and produces two thumbnails, one is 100x100 pixels, and the other is 35x35 pixels.&lt;br /&gt;
&lt;br /&gt;
If Moodle thinks GD is not installed, then you will need to &#039;&#039;&#039;install the GD library&#039;&#039;&#039;. &lt;br /&gt;
*On Unix you may need to re-compile PHP with arguments something like this:&lt;br /&gt;
&lt;br /&gt;
 ./configure --with-apxs=/usr/local/apache/bin/apxs --with-xml --with-gd &lt;br /&gt;
 --with-jpeg-dir=/usr/local --with-png-dir=/usr --with-ttf --enable-gd-native-ttf &lt;br /&gt;
 --enable-magic-quotes --with-mysql --enable-sockets --enable-track-vars &lt;br /&gt;
 --enable-versioning --with-zlib&lt;br /&gt;
&lt;br /&gt;
* On Windows this is usually a matter of &amp;quot;turning on&amp;quot; the extension in PHP by editing your php.ini file. To do this remove the semicolon for the php_gd2.dll extension - check that this file is actually present in your php extensions  folder first (search your php.ini for extension_dir to determine where this points to on your hard disk). You should then have a line that looks like this:&lt;br /&gt;
 extension=php_gd2.dll&lt;br /&gt;
&lt;br /&gt;
:Windows users should see the [[Installing AMP|installation instructions]] for further help. &lt;br /&gt;
&lt;br /&gt;
3. Remember to &#039;&#039;&#039;restart your webserver&#039;&#039;&#039; (if possible) and re-visit the Moodle configuration page after making any changes to PHP so it can pick up the correct version of GD.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;See also&#039;&#039;&#039;: Using Moodle forum discussion [http://moodle.org/mod/forum/discuss.php?d=44271 Profile pictures] for additional information.&lt;br /&gt;
&lt;br /&gt;
== Why doesn&#039;t my Moodle site display the time and date correctly? ==&lt;br /&gt;
&lt;br /&gt;
Please check the timezone settings in settings in &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Location &amp;gt; Location settings&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== How do I uninstall Moodle?==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Webhost/manual installation&#039;&#039;&#039;: If you have installed Moodle manually or have installed onto a webhost, follow these steps:&lt;br /&gt;
*Delete the moodle database using this mysql command (or delete using your mysql client, e.g. PHPMyAdmin):&lt;br /&gt;
&amp;lt;pre&amp;gt;sql&amp;gt;DROP DATABASE moodle;&amp;lt;/pre&amp;gt;&lt;br /&gt;
:In the above example replace &#039;moodle&#039; with the name of the moodle database you created when installing.&lt;br /&gt;
*Delete the moodledata directory. If you, or your users, have uploaded materials into this directory take a copy of these before deleting this directory.&lt;br /&gt;
*Delete the moodle directory itself. This will delete all of the moodle PHP script files.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;XAMPP windows installation&#039;&#039;&#039;: If you have installed Moodle on windows through the XAMPP package, follow these steps:&lt;br /&gt;
*Open cmd.exe and navigate to this directory within your installation directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;server/mysql/bin&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Run this command, replacing USERNAME with your database username (the default is &amp;quot;root&amp;quot;) and DATABASE with your database name (the default is &amp;quot;moodle&amp;quot;):&lt;br /&gt;
&amp;lt;pre&amp;gt;mysqladmin.exe -u USERNAME -p drop DATABASE&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Enter your database password at the prompt (the default is &amp;quot;&amp;quot; [blank]).&lt;br /&gt;
*Enter &amp;quot;y&amp;quot; to confirm the database drop.&lt;br /&gt;
*Delete the moodledata directory. If you, or your users, have uploaded materials into this directory take a copy of these before deleting this directory.&lt;br /&gt;
*Delete the moodle directory itself. This will delete all of the moodle PHP script files.&lt;br /&gt;
&lt;br /&gt;
==Migrating Moodle to a new site or server==&lt;br /&gt;
Migrating Moodle means that you have to move the current installation to a new server, and so may have to change IP addresses or DNS entries. To do this you will need to change the $CFG-&amp;gt;wwwroot value in the config.php on the new server. You will also have to change any absolute links stored in the database backup file (before restoring the file on the new server) either using the [[Search and replace tool]], your text editor or another &amp;quot;search and replace&amp;quot; tool, e.g. sed. For more details see the [[Moodle_migration | Moodle Migration]] page.&lt;br /&gt;
&lt;br /&gt;
[[#top|Top]]&lt;br /&gt;
&lt;br /&gt;
==Why does my new installation display correctly on the server, but when I view it from a different machine, styles and images are missing?==&lt;br /&gt;
In the installation instructions, one of the suggested settings for &#039;webroot&#039; is &#039;localhost&#039;. This is fine if all you want to do is some local testing of your new Moodle installation. If, however, you want to view your new installation from another machine on the same local area network, or view your site on the internet, you will have to change this setting:&lt;br /&gt;
*For local testing, &#039;localhost&#039; is fine for the webroot ($CFG-&amp;gt;wwwroot in config.php). &lt;br /&gt;
*If you want to test your site from other machines on the same local area network (LAN), then you will have to use the private ip address of the serving machine, (e.g. 192.168.1.2/moodle) or the network name of the serving computer (e.g. network_name_of_serving_machine/moodle) as the web root. Depending on your LAN setup, it may be better to use the network name of the computer rather than its (private) ip address, because the ip address can and will change from time to time. If you don&#039;t want to use the network name, then you will have to speak to your network administrator and have them assign a permanent ip address to the serving machine.&lt;br /&gt;
*Finally, if you want to test your new installation across the internet, you will have to use either a domain name or a permanent (public) ip address/moodle as your web root. To handle both types of access, see [https://docs.moodle.org/en/masquerading masquerading].&lt;br /&gt;
&lt;br /&gt;
[[#top|Top]]&lt;br /&gt;
==Maximum upload file size - how to change it?==&lt;br /&gt;
There are several places to change the maximum file upload size. The first place to check is in Site administration &amp;gt; Security &amp;gt; Site security settings and look for &amp;quot;Maximum uploaded file size&amp;quot;.  This is the &amp;quot;maxbyte&amp;quot; variable found in older versions of Moodle (under Admin &amp;gt; Variables). Teachers may also set the maximum file size by the [[Course_settings#Maximum_upload_size|course administration block]].&lt;br /&gt;
&lt;br /&gt;
If the above does not provide a large enough figure you will need to make changes in your server settings. The usual place is in your php.ini file (go to Site administration &amp;gt; Server &amp;gt; PHPinfo and check a few lines down for its location). Look for settings &#039;&#039;&#039;upload_max_filesize&#039;&#039;&#039; and &#039;&#039;&#039;post_max_size&#039;&#039;&#039;, setting them both to your desired new value (e.g. &#039;64MB&#039;). You will need to restart the web server for these changes to take effect - e.g. on Linux, &#039;&#039;&#039;/etc/init.d/apache2 force-reload&#039;&#039;&#039;. Check your documentation or just reboot the server. [http://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size NGINX] system administrators should also add client_max_body_size=XXX to the &amp;quot;http&amp;quot; section of their nginx main configuration file. ([https://rtcamp.com/tutorials/php/increase-file-upload-size-limit/#change-in-nginx-config see more info])&lt;br /&gt;
&lt;br /&gt;
For more help see:&lt;br /&gt;
*[[Administration_FAQ#How_do_the_limits_on_uploaded_files_work.3F]]&lt;br /&gt;
*[[Installing_Moodle#Recheck_PHP_settings]]&lt;br /&gt;
*[[Installing_Moodle#Using_a_.htaccess_file_for_webserver_and_PHP_settings]]&lt;br /&gt;
*[[Site_policies#Maximum_uploaded_file_size]]&lt;br /&gt;
*These forum posts: http://moodle.org/mod/forum/discuss.php?d=63840#287960 and http://moodle.org/mod/forum/discuss.php?d=93882#p414650&lt;br /&gt;
&lt;br /&gt;
[[#top|Top]]&lt;br /&gt;
&lt;br /&gt;
==Moodle claims PHP float handling is not compatible==&lt;br /&gt;
&lt;br /&gt;
The symptom is that when you try to install or upgrade your Moodle, you get a message &amp;quot;Detected unexpected problem in handling of PHP float numbers&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[http://moodle.org/mod/forum/discuss.php?d=114945 This forum thread] and MDL-18253 have more information. In short, this problem should not happen, you can help us by telling posting information about exactly which version of PHP, and OS you are using. That may let us find a way to work around this problem.&lt;br /&gt;
&lt;br /&gt;
You may be able to solve this issue by installing a more recent PHP versions. If you compile PHP yourself from source, changing the compilation options may help. However, since we don&#039;t understand the cause, we don&#039;t really know. If you do find a solution that works for you, please do tell us about it.&lt;br /&gt;
&lt;br /&gt;
Update: we have a guess that the problem may be the [http://au2.php.net/manual/en/ini.core.php#ini.precision &#039;precision&#039; setting in your php.ini file]. In a default PHP install this is set of 14. On at least one server that exhibited this problem it had been changed to a smaller value. So, if you see this problem, please try adding &lt;br /&gt;
 ini_set(&#039;precision&#039;, 14);&lt;br /&gt;
to your config.php file, and report your success in MDL-18253.&lt;br /&gt;
&lt;br /&gt;
== How do I run multiple instances of Moodle without duplicating base code? ==&lt;br /&gt;
&lt;br /&gt;
See [http://moodle.org/mod/forum/discuss.php?d=13211 this thread] for a detailed explanation by [[User:Martin_Langhoff| Martin Langhoff]].&lt;br /&gt;
&lt;br /&gt;
== How do I install a plugin? ==&lt;br /&gt;
&lt;br /&gt;
Please see [[Installing plugins]].&lt;br /&gt;
&lt;br /&gt;
==I can&#039;t enable a plugin on the Plugins overview page because the icon is not clickable==&lt;br /&gt;
The open and closed eye icon on the Plugins overview page is simply there to show whether or not a plugin is enabled. You can&#039;t edit plugins from this screen. If you wish to enable a plugin, go to the appropriate page for managing the type of plugin you need, for instance &#039;&#039;Settings&amp;gt;Site administration&amp;gt;Plugins&amp;gt;Repositories&amp;gt;Manage repositories&#039;&#039; or &#039;&#039;Settings&amp;gt;Site administration&amp;gt;Plugins&amp;gt;Activity modules&amp;gt;Manage activities.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Errors FAQ]]&lt;br /&gt;
* [http://moodle.org/mod/forum/view.php?id=28 Installing and upgrading help forum] on moodle.org&lt;br /&gt;
&lt;br /&gt;
Installing Moodle in a shared web hosting environment:&lt;br /&gt;
* [[Finding_and_Selecting_A_Web_Host|Finding and Selecting a web host]]&lt;br /&gt;
&lt;br /&gt;
[[Category:FAQ]]&lt;br /&gt;
&lt;br /&gt;
[[es:FAQ Instalación]]&lt;br /&gt;
[[fr:FAQ d&#039;installation]]&lt;br /&gt;
[[ja:インストールFAQ]]&lt;br /&gt;
[[de:Installation FAQ]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Development:Question_Engine_2:How_the_question_engine_currently_works&amp;diff=140839</id>
		<title>Development:Question Engine 2:How the question engine currently works</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Development:Question_Engine_2:How_the_question_engine_currently_works&amp;diff=140839"/>
		<updated>2021-07-14T13:24:33Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Text replacement - &amp;quot;class=&amp;quot;nicetable&amp;quot;&amp;quot; to &amp;quot;class=&amp;quot;wikitable&amp;quot;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Question_engine_2}}&lt;br /&gt;
This page gives and overview of how the question engine works in Moodle 1.9, and some of the problems inherent in that.&lt;br /&gt;
&lt;br /&gt;
Previous section: [[Development:Question Engine 2:Rationale|Rationale]]&lt;br /&gt;
&lt;br /&gt;
==How this part of the quiz currently works==&lt;br /&gt;
&lt;br /&gt;
Before saying what I would like to change, I think it is best to summarise how the question engine currently works.&lt;br /&gt;
&lt;br /&gt;
===Database tables===&lt;br /&gt;
&lt;br /&gt;
There are three database tables that store data about students&#039; attempts at questions.&lt;br /&gt;
&lt;br /&gt;
====question_attempts====&lt;br /&gt;
&lt;br /&gt;
This table is basically used to generate unique ids for the other tables relating to question attempts, and allow one to link the data in those tables to the other parts of Moodle that use the question bank, for example from a quiz attempt.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Column !! Type !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| id || INT(10) NOT NULL AUTO INCREMENT || Unique id used to link attempt question data to other things, e.g. quiz_attempts.uniqueid&lt;br /&gt;
|-&lt;br /&gt;
| modulename || NOT NULL VARCHAR(20) || e.g. &#039;quiz&#039; the thing linked to.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====question_sessions====&lt;br /&gt;
&lt;br /&gt;
There is one row in this table for each question in an attempt.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Column !! Type !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| id || INT(10) NOT NULL AUTO INCREMENT || Unique id. Not used much.&lt;br /&gt;
|-&lt;br /&gt;
| attemptid || INT(10) NOT NULL REFERENCES question_attempts.id || Which attempt this data belongs to.&lt;br /&gt;
|-&lt;br /&gt;
| questionid || INT(10) NOT NULL REFERENCES question.id || Which question this is the attempt data for.&lt;br /&gt;
|-&lt;br /&gt;
| newest || INT(10) NOT NULL REFERENCES question_states.id || The latest state of this question in this attempt.&lt;br /&gt;
|-&lt;br /&gt;
| newgraded || INT(10) NOT NULL REFERENCES question_states.id || The latest graded state of this question in this attempt.&lt;br /&gt;
|-&lt;br /&gt;
| sumpenalty || NUMBER(12,7) NOT NULL || Used for adaptive mode scoring.&lt;br /&gt;
|-&lt;br /&gt;
| manualcomment || TEXT || A teacher&#039;s manual comment.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
(attemptid, questionid) is an alternate key, but that makes MDL-15596 impossible to satisfy.&lt;br /&gt;
&lt;br /&gt;
====question_states====&lt;br /&gt;
&lt;br /&gt;
There are several rows here for each question session, recording the different states that the question went through as the student attempted it. For example open, save, submit, manual_grade.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Column !! Type !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| id || INT(10) NOT NULL AUTO INCREMENT || Unique id. Not used much.&lt;br /&gt;
|-&lt;br /&gt;
| attempt || INT(10) NOT NULL REFERENCES question_attempts.id || Which attempt this data belongs to.&lt;br /&gt;
|-&lt;br /&gt;
| question || INT(10) NOT NULL REFERENCES question.id || Which question this is the attempt data for.&lt;br /&gt;
|-&lt;br /&gt;
| seq_number || INT(10) NOT NULL || Numbers the states within this question attempt.&lt;br /&gt;
|-&lt;br /&gt;
| answer || TEXT NOT NULL || A representation of the student&#039;s response.&lt;br /&gt;
|-&lt;br /&gt;
| timestamp || INT(10) NOT NULL || Timestamp of the event that lead to this state.&lt;br /&gt;
|-&lt;br /&gt;
| event || INT(4) NOT NULL || The type of state this is. One of the QUESTION_EVENTXXX constants from the top of questionlib.php.&lt;br /&gt;
|-&lt;br /&gt;
| grade || NUMBER(12,7) NOT NULL || The grade that had been earned by this point, after penalties had been taken into account.&lt;br /&gt;
|-&lt;br /&gt;
| raw_grade || NUMBER(12,7) NOT NULL || The grade that had been earned by this point, before penalties had been taken into account.&lt;br /&gt;
|-&lt;br /&gt;
| penalty || NUMBER(12,7) NOT NULL || Used by the adaptive mode scoring.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
(attempt, question, seq_number) is an alternate key (see the remark in the previous sub-section).&lt;br /&gt;
&lt;br /&gt;
The student&#039;s response is stored in the answer column. It is up to each question type to convert the data received from the student into a single string in whatever format seems best, even though the response come from a HTTP post, and so is just an array of key =&amp;gt; value pairs, which could easily be stored directly in the database without each question type having to write some nasty string concatenation/parsing code. &lt;br /&gt;
&lt;br /&gt;
===Code flow===&lt;br /&gt;
&lt;br /&gt;
A part of Moodle, for example the Quiz module, wishes to use questions. First, mod/quiz/attempt.php will render a page of questions by calling&lt;br /&gt;
# load_questions,&lt;br /&gt;
# load_question_states, and&lt;br /&gt;
# print_question one or more times.&lt;br /&gt;
All three of these functions delegate part of the work to the appropriate question type.&lt;br /&gt;
&lt;br /&gt;
This outputs each question in its current state. Any form controls that are output have a name=&amp;quot;&amp;quot; attribute that is a combination of a prefix determined by the question engine (e.q. q123_), and a main part determined by the question type.&lt;br /&gt;
&lt;br /&gt;
When this page is submitted, the response goes to whichever script the question using code designate. In the case of the quiz it is mod/quiz/processattemptattempt.php. This calls&lt;br /&gt;
# load_questions,&lt;br /&gt;
# load_question_states,&lt;br /&gt;
# question_extract_responses,&lt;br /&gt;
# question_process_responses, and&lt;br /&gt;
# save_question_state.&lt;br /&gt;
# In the case of the quiz, it then saves the quiz_attempts row, which has been updated by some of the above methods.&lt;br /&gt;
Again, steps 1., 2., 4. and 5. delegate part of the work to the question types.&lt;br /&gt;
&lt;br /&gt;
Processing manual grading by the teacher is similar. The sequence of calls is:&lt;br /&gt;
# load_questions,&lt;br /&gt;
# load_question_states,&lt;br /&gt;
# question_process_comment, and&lt;br /&gt;
# save_question_state.&lt;br /&gt;
# In the case of the quiz, it then saves the quiz_attempts row, which has been updated by some of the above methods.&lt;br /&gt;
&lt;br /&gt;
One thing to note here is that a lot of processing is done before any data can be stored in the database.&lt;br /&gt;
&lt;br /&gt;
Another point to note is that the question type classes are singleton classes. That is, only one instance of each question type is created. All the methods used by the question engine are passed a $question and possibly a $state object to tell the question type which question instance they should be processing. This is good design from several points of view. It works well with batch database queries (efficiency) and the question types to not have state, which might become inconsistent (robustness). However, there is a slight price here, since very rich question types cannot cache state in memory, so they may have to repeat processing (richness &amp;amp;lt;-&amp;gt; efficiency trade off) however, they can store state in the database since they can put whatever they like in the question_states.answer field.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
In the next section, [[Development:Question Engine 2:Overview|Overview]], I give the broad outline of how I think this should work in future.&lt;br /&gt;
&lt;br /&gt;
* Back to [[Development:Question_Engine_2|Question Engine 2]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Filters_used_on_the_Moodle.org_forums&amp;diff=140838</id>
		<title>Filters used on the Moodle.org forums</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Filters_used_on_the_Moodle.org_forums&amp;diff=140838"/>
		<updated>2021-07-14T13:24:33Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Text replacement - &amp;quot;class=&amp;quot;nicetable&amp;quot;&amp;quot; to &amp;quot;class=&amp;quot;wikitable&amp;quot;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Filters}}&lt;br /&gt;
The [http://moodle.org/mod/forum/index.php?id=5 Moodle.org forums] have a number of [[Filters|filters]] to make it easier to talk about Moodle. This page lists them.&lt;br /&gt;
&lt;br /&gt;
==Standard filters==&lt;br /&gt;
&lt;br /&gt;
* [[Email protection filter|Email protection]]&lt;br /&gt;
* [[Display emoticons as images filter|Display emoticons as images]]&lt;br /&gt;
* [[Convert URLs into links filter|Convert URLs into links]]&lt;br /&gt;
* [[Glossary auto-linking filter|Glossary auto-linking]] - Automatically links to things defined in the [http://moodle.org/mod/glossary/view.php?id=851 Glossary of common terms] when the term is mentioned.&lt;br /&gt;
*[[Multi language content]]&lt;br /&gt;
*[[Multimedia plugins]] (with default settings i.e. all media format filters except .swf are enabled).&lt;br /&gt;
*[[MathJax filter|MathJax]]&lt;br /&gt;
&lt;br /&gt;
Filters which are off, but available&lt;br /&gt;
* [[Activity names auto-linking filter|Activity names auto-linking]]&lt;br /&gt;
* [[Database auto-linking filter|Database auto-linking]]&lt;br /&gt;
&lt;br /&gt;
==Contributed filters==&lt;br /&gt;
&lt;br /&gt;
===Tracker issue auto-linking===&lt;br /&gt;
&lt;br /&gt;
Automatically links to [http://tracker.moodle.org/ tracker] issues when you type the issue number e.g. MDL-1234.&lt;br /&gt;
&lt;br /&gt;
===Moodle Docs auto-linking===&lt;br /&gt;
&lt;br /&gt;
Automatically links to a page in the user documentation wiki (most recent version) when you type the page title enclosed in double square brackets.&lt;br /&gt;
&lt;br /&gt;
For example, to link to https://docs.moodle.org/en/Philosophy type&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;[[Philosophy]]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To link to a page in the developer docs, add an extra pipe &amp;quot;|&amp;quot; divider followed by dev.&lt;br /&gt;
&lt;br /&gt;
For example, to link to https://docs.moodle.org/dev/Plugins type&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;[[Plugins||dev]]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;[[Plugins|Plugins developer documentation|dev]]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To link to a page in a documentation wiki in another language, add an extra pipe &amp;quot;|&amp;quot; divider followed by the language code.&lt;br /&gt;
&lt;br /&gt;
For example, to link to https://docs.moodle.org/es/Los_10_mitos_de_Moodle type&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;[[Los 10 mitos de Moodle||es]]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;[[Los 10 mitos de Moodle|Top 10 Moodle Myths in Spanish|es]]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Auto-linking phrases===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Phrase&lt;br /&gt;
! Link&lt;br /&gt;
|-&lt;br /&gt;
| Moodle Roadmap&lt;br /&gt;
| https://docs.moodle.org/dev/Roadmap&lt;br /&gt;
|- &lt;br /&gt;
| Moodle Themes&lt;br /&gt;
| http://moodle.org/themes&lt;br /&gt;
|-&lt;br /&gt;
| Moodle Tracker&lt;br /&gt;
| http://tracker.moodle.org/&lt;br /&gt;
|-&lt;br /&gt;
| Moodle jobs&lt;br /&gt;
| http://moodle.org/jobs&lt;br /&gt;
|-&lt;br /&gt;
| Moodle books&lt;br /&gt;
| http://moodle.org/books&lt;br /&gt;
|-&lt;br /&gt;
| Plugins directory&lt;br /&gt;
| http://moodle.org/plugins/&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===More contrib filters===&lt;br /&gt;
&lt;br /&gt;
*[[Code syntax highlighting]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Moodle.org]]&lt;br /&gt;
&lt;br /&gt;
[[ja:Moodle.orgフォーラムで使用されているフィルタ]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Development:Question_Engine_2:Design&amp;diff=140837</id>
		<title>Development:Question Engine 2:Design</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Development:Question_Engine_2:Design&amp;diff=140837"/>
		<updated>2021-07-14T13:24:32Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Text replacement - &amp;quot;class=&amp;quot;nicetable&amp;quot;&amp;quot; to &amp;quot;class=&amp;quot;wikitable&amp;quot;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Question_engine_2}}&lt;br /&gt;
This page explains how I think the question engine should work in Moodle 2.0 or 2.1.&lt;br /&gt;
&lt;br /&gt;
Previous section: [[Development:Question Engine 2:Overview|Overview]]&lt;br /&gt;
&lt;br /&gt;
{{Work in progress}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Words related to grades==&lt;br /&gt;
&lt;br /&gt;
Within the quiz/question engine system we have to deal with three different types of grade/score/mark/whatever.&lt;br /&gt;
&lt;br /&gt;
For any activity, say a quiz, it will eventually calculate a grade that is passed to the gradebook. For example, the quiz grade may be out of 100.&lt;br /&gt;
&lt;br /&gt;
Within the quiz, there will be a number of questions. Let us suppose there are 6 questions each worth 3 marks, and 1 question worth 2 marks. Therefore, the quiz is out of 20 marks, and the student&#039;s mark is multiplied by 5 to get a grade out of 100 that is sent to the gradebook.&lt;br /&gt;
&lt;br /&gt;
Finally, at the lowest level of the quiz, grades are stored on a scale of 0..1. We call this a fraction. So the student&#039;s mark for a question is their fraction, multiplied by the maxmark for the question. We do this so that it is easy to do things like change how many marks a question is worth within a quiz.&lt;br /&gt;
&lt;br /&gt;
Therefore, we have the three words fraction, mark and grade that should be used consistently throughout the question engine code. Fractions are rarely shown in the user interface*, while I believe the quiz UI already uses the marks/grades terminology consistently.&lt;br /&gt;
&lt;br /&gt;
When used as a verb - to assign a grade/mark/fraction - as in grade_response, regrade or manual_grade, the work grade is always used.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; the one place where fraction is displayed in the UI is on the question editing screens, where you set the &#039;grade&#039; for a particular answer on a scale of 0 to 100%.&lt;br /&gt;
&lt;br /&gt;
==New database structure==&lt;br /&gt;
&lt;br /&gt;
[[Image:Question engine 2 database.png]]&lt;br /&gt;
&lt;br /&gt;
===question_usages===&lt;br /&gt;
&lt;br /&gt;
This is a rename of question_attempts.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Column !! Type !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| id || INT(10) NOT NULL AUTO INCREMENT || Unique id used to link attempt question data to other things, for example a quiz_attempt.&lt;br /&gt;
|-&lt;br /&gt;
| contextid || INT(10) NOT NULL || The context that this question attempt is associated with. For example the quiz context.&lt;br /&gt;
|-&lt;br /&gt;
| owningplugin || NOT NULL VARCHAR(255) || The plugin this attempt belongs to, e.g. &#039;mod_quiz&#039;, &#039;block_questionoftheday&#039;, &#039;filter_embedquestion&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| preferredbehaviour || NOT NULL VARCHAR(255) || The the archetypal behaviour that should be used for new questions added to this usage.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===question_attempts===&lt;br /&gt;
&lt;br /&gt;
This replaces question_sessions. Question sessions is not a great name because session has other connotations in the context of web applications. I think it is right to use the question_attempt name here, because this tables has one row for each attempt at each question.&lt;br /&gt;
&lt;br /&gt;
There is now no requirement for (attemptid, questionid) to be unique.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Column !! Type !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| id || INT(10) NOT NULL AUTO INCREMENT || Unique id. Linked to from question_states.attemptid.&lt;br /&gt;
|-&lt;br /&gt;
| questionusageid || INT(10) NOT NULL REFERENCES question_usages.id || Which attempt this data belongs to.&lt;br /&gt;
|-&lt;br /&gt;
| slot || INT(10) NOT NULL || As questions are added to a usage, they are numbered sequentially.&lt;br /&gt;
|-&lt;br /&gt;
| behaviour || VARCHAR(32) NOT NULL || The question behaviour that is managing this question attempt.&lt;br /&gt;
|-&lt;br /&gt;
| questionid || INT(10) NOT NULL REFERENCES question.id || Which question this is the attempt data for.&lt;br /&gt;
|-&lt;br /&gt;
| maxmark || NUMBER(12,7) NOT NULL || The grade this question is marked out of in this attempt.&lt;br /&gt;
|-&lt;br /&gt;
| minfraction || NUMBER(12,7) NOT NULL DEFAULT 0 || Some questions can award negative marks. This indicates the most negative mark that can be awarded, on the faction scale where the maximum positive mark is 1.&lt;br /&gt;
|-&lt;br /&gt;
| flagged || INT(1) NOT NULL DEFAULT 0 || Whether this question has been flagged within the attempt.&lt;br /&gt;
|-&lt;br /&gt;
| questionsummary || TEXT || If this question uses randomisation, it should set this field to summarise what random version the student actually saw. This is a human-readable textual summary of the student&#039;s response which might, for example, be used in a report.&lt;br /&gt;
|-&lt;br /&gt;
| rightanswer || TEXT || This is a human-readable textual summary of the right answer to this question. Might be used, for example on the quiz preview, to help people who are testing the question. Or might be used in reports.&lt;br /&gt;
|-&lt;br /&gt;
| responsesummary || TEXT || This is a textual summary of the student&#039;s response (basically what you would expect to in the Quiz responses report).&lt;br /&gt;
|-&lt;br /&gt;
| timemodified || INT(10) NOT NULL || The time this record was last changed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Need to store maxmark because it could come from anywhere, (e.g. quiz_question_instances, question.defaultgrade, ...). We need it available at various times (e.g. when displaying a question) so it is better to store it explicitly here.&lt;br /&gt;
&lt;br /&gt;
===question_attempt_step===&lt;br /&gt;
&lt;br /&gt;
Same purpose as the old question_states table, but simplified.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Column !! Type !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| id || INT(10) NOT NULL AUTO INCREMENT || Unique id. Linked to from question_states.stateid.&lt;br /&gt;
|-&lt;br /&gt;
| questionattemptid || INT(10) NOT NULL REFERENCES question_attempts.id || Which question attempt this data belongs to.&lt;br /&gt;
|-&lt;br /&gt;
| sequencenumber || INT(4) NOT NULL || Numbers the steps in a question attempt sequentially.&lt;br /&gt;
|-&lt;br /&gt;
| state || INT(4) NOT NULL || The type of state this is. One of the constants defined by the question_state class.&lt;br /&gt;
|-&lt;br /&gt;
| fraction || NUMBER(12,7) || The grade the student has earned for this question, on a scale of 0..1. Needs to be multiplied by question_attempts.maxgrade to get the true grade.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated || INT(10) NOT NULL || Time-stamp of the event that lead to this state.&lt;br /&gt;
|-&lt;br /&gt;
| userid || INT(10) NOT NULL || The user who created this state. For states created during the attempt, this would be the student id. For a state for adding a comment or manually grading, this would be the teacher id.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* We store grade unscaled (as a value between 0.0 and 1.0) because that makes regrading easier. (You might think that you can adjust scaled grades later, and that is almost true, but if maxgrade used to be 0, then you can&#039;t change it to anything else.)&lt;br /&gt;
&lt;br /&gt;
===question_attempt_step_data===&lt;br /&gt;
&lt;br /&gt;
This stores the data submitted by the student (a list of name =&amp;gt; value pairs) that lead to the state stateid. This replaces the old question_states.answer field.&lt;br /&gt;
&lt;br /&gt;
There will be a convention that ordinary names like &#039;myvariable&#039; should be used for submitted data belonging to the question type; names prefixed with a :, like &#039;:myaction&#039; should be used for data belonging to the question behaviour; and names prefixed with a _ can be used for internal things, for example, the random question might store &#039;_realquestionid&#039; attached to the &#039;open&#039; state, or a question type that does a lot of expensive processing might store a &#039;_cachedresult&#039; value, so the expensive calculation does not need to be repeated when reviewing the attempt.&lt;br /&gt;
&lt;br /&gt;
Note that, the old question_states.answer field used to save a lot of repetitive information from one state to the next, for example the other questionid for random questions, and the choices order for multiple-choice questions with shuffle-answers on. In future, this sort of repetitive information will not be saved. Instead, during question processing, the question types will be given access to the full state history.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Column !! Type !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| id || INT(10) NOT NULL AUTO INCREMENT || Unique id. Not used much.&lt;br /&gt;
|-&lt;br /&gt;
| attemptstepid || INT(10) NOT NULL REFERENCES question_attempt_steps.id || Which state the submission of this data lead to.&lt;br /&gt;
|-&lt;br /&gt;
| name || VARCHAR(32) NOT NULL || The name of the parameter received from the student.&lt;br /&gt;
|-&lt;br /&gt;
| value || TEXT || The value of the parameter.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Upgrading the database==&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==New list of states that a question may be in==&lt;br /&gt;
&lt;br /&gt;
The aim here is to have as few states as necessary. What is necessary? To make it clear what is going on, for example in the quiz navigation. Of course, that is only one case to consider.&lt;br /&gt;
&lt;br /&gt;
; Incomplete&lt;br /&gt;
: This is the state that questions start in. They stay in this state as long as the student still needs to give this question attention. In deferred feedback (non-adaptive) mode, that is until the student has entered an answer. (For a short-answer question, any answer in the input box moves you out of this state; for a matching question, you only move out of this state when you have answered all the sub-questions.) In adaptive mode, the question stays in this state until either you have got it right, or you have run out of tries.&lt;br /&gt;
: In the state, the student can enter or change their answer.&lt;br /&gt;
; Complete&lt;br /&gt;
: This state is for questions where the student have done enough, but the attempt is still open, so they could change their answer if they wanted to. For example, this happens in deferred feedback mode when the student has entered a complete answer, and before they do submit all and finish. Also, a Description, after the student has seen it.&lt;br /&gt;
: In the state, the student can enter or change their answer.&lt;br /&gt;
; Graded(Correct/PartiallyCorrect/Incorrect)&lt;br /&gt;
: For computer-graded questions, once the student can no longer interact with the question, it goes to one of the sub-states of the graded state. &lt;br /&gt;
; Finished&lt;br /&gt;
: For questions that do not have a grade, for example descriptions, after the attempt is over, they go into this state.&lt;br /&gt;
; GaveUp&lt;br /&gt;
: This state is used for questions where it is impossible to assign a grade because the student did submit all and finish when the question was in the incomplete state. However, this does not necessarily happen, for example, we may choose to grade an incomplete matching question if the student has completed at least one sub-question.&lt;br /&gt;
; ManuallyGraded(Correct/PartiallyCorrect/Incorrect)&lt;br /&gt;
; Commented&lt;br /&gt;
; GaveUpCommented&lt;br /&gt;
: These three states correspond the the previous three states after the teacher has added a comment and/or manually graded.&lt;br /&gt;
&lt;br /&gt;
[[Image:Question_state_diagram.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==API for modules using the question engine==&lt;br /&gt;
&lt;br /&gt;
Here is some proposed code from an integration test method. It creates an attempt containing one true/false question and walks through a student getting it right, and then at teacher overriding the grade.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
    public function test_delayed_feedback_truefalse() {&lt;br /&gt;
        // Create a true-false question with correct answer true.&lt;br /&gt;
        $tf = $this-&amp;gt;make_a_truefalse_question();&lt;br /&gt;
        $displayoptions = new question_display_options();&lt;br /&gt;
&lt;br /&gt;
        // Start a delayed feedback attempt and add the question to it.&lt;br /&gt;
        $tf-&amp;gt;maxgrade = 2;&lt;br /&gt;
        $quba = question_engine::make_questions_usage_by_activity(&#039;unit_test&#039;);&lt;br /&gt;
        $quba-&amp;gt;set_preferred_behaviour(&#039;delayedfeedback&#039;);&lt;br /&gt;
        $qnumber = $quba-&amp;gt;add_question($tf);&lt;br /&gt;
        // Different from $tf-&amp;gt;id since the same question may be used twice in&lt;br /&gt;
        // the same attempt.&lt;br /&gt;
&lt;br /&gt;
        // Verify.&lt;br /&gt;
        $this-&amp;gt;assertEqual($qnumber, 1);&lt;br /&gt;
        $this-&amp;gt;assertEqual($quba-&amp;gt;question_count(), 1);&lt;br /&gt;
        $this-&amp;gt;assertEqual($quba-&amp;gt;get_question_state($qnumber), question_state::NOT_STARTED);&lt;br /&gt;
&lt;br /&gt;
        // Begin the attempt. Creates an initial state for each question.&lt;br /&gt;
        $quba-&amp;gt;start_all_questions();&lt;br /&gt;
&lt;br /&gt;
        // Output the question in the initial state.&lt;br /&gt;
        $html = $quba-&amp;gt;render_question($qnumber, $displayoptions);&lt;br /&gt;
&lt;br /&gt;
        // Verify.&lt;br /&gt;
        $this-&amp;gt;assertEqual($quba-&amp;gt;get_question_state($qnumber), question_state::INCOMPLETE);&lt;br /&gt;
        $this-&amp;gt;assertNull($quba-&amp;gt;get_question_grade($qnumber));&lt;br /&gt;
        $this-&amp;gt;assertPattern(&#039;/&#039; . preg_quote($tf-&amp;gt;questiontext) . &#039;/&#039;, $html);&lt;br /&gt;
&lt;br /&gt;
        // Simulate some data submitted by the student.&lt;br /&gt;
        $prefix = $quba-&amp;gt;get_field_prefix($qnumber);&lt;br /&gt;
        $answername = $prefix . &#039;true&#039;;&lt;br /&gt;
        $getdata = array(&lt;br /&gt;
            $answername =&amp;gt; 1,&lt;br /&gt;
            &#039;irrelevant&#039; =&amp;gt; &#039;should be ignored&#039;,&lt;br /&gt;
        );&lt;br /&gt;
        $submitteddata = $quba-&amp;gt;extract_responses($qnumber, $getdata);&lt;br /&gt;
&lt;br /&gt;
        // Verify.&lt;br /&gt;
        $this-&amp;gt;assertEqual(array(&#039;true&#039; =&amp;gt; 1), $submitteddata);&lt;br /&gt;
&lt;br /&gt;
        // Process the data extracted for this question.&lt;br /&gt;
        $quba-&amp;gt;process_action($qnumber, $submitteddata);&lt;br /&gt;
        $html = $quba-&amp;gt;render_question($qnumber, $displayoptions);&lt;br /&gt;
&lt;br /&gt;
        // Verify.&lt;br /&gt;
        $this-&amp;gt;assertEqual($quba-&amp;gt;get_question_state($qnumber), question_state::COMPLETE);&lt;br /&gt;
        $this-&amp;gt;assertNull($quba-&amp;gt;get_question_grade($qnumber));&lt;br /&gt;
        $this-&amp;gt;assert(new ContainsTagWithAttributes(&#039;input&#039;,&lt;br /&gt;
                array(&#039;name&#039; =&amp;gt; $answername, &#039;value&#039; =&amp;gt; 1)), $html);&lt;br /&gt;
        $this-&amp;gt;assertNoPattern(&#039;/class=\&amp;quot;correctness/&#039;, $html);&lt;br /&gt;
&lt;br /&gt;
        // Finish the attempt.&lt;br /&gt;
        $quba-&amp;gt;finish_all_questions();&lt;br /&gt;
        $html = $quba-&amp;gt;render_question($qnumber, $displayoptions);&lt;br /&gt;
&lt;br /&gt;
        // Verify.&lt;br /&gt;
        $this-&amp;gt;assertEqual($quba-&amp;gt;get_question_state($qnumber), question_state::GRADED_CORRECT);&lt;br /&gt;
        $this-&amp;gt;assertEqual($quba-&amp;gt;get_question_grade($qnumber), 2);&lt;br /&gt;
        $this-&amp;gt;assertPattern(&lt;br /&gt;
                &#039;/&#039; . preg_quote(get_string(&#039;correct&#039;, &#039;question&#039;)) . &#039;/&#039;,&lt;br /&gt;
                $html);&lt;br /&gt;
&lt;br /&gt;
        // Process a manual comment.&lt;br /&gt;
        $quba-&amp;gt;manual_grade($qnumber, 1, &#039;Not good enough!&#039;);&lt;br /&gt;
        $html = $quba-&amp;gt;render_question($qnumber, $displayoptions);&lt;br /&gt;
&lt;br /&gt;
        // Verify.&lt;br /&gt;
        $this-&amp;gt;assertEqual($quba-&amp;gt;get_question_state($qnumber), question_state::MANUALLY_GRADED_PARTCORRECT);&lt;br /&gt;
        $this-&amp;gt;assertEqual($quba-&amp;gt;get_question_grade($qnumber), 1);&lt;br /&gt;
        $this-&amp;gt;assertPattern(&#039;/&#039; . preg_quote(&#039;Not good enough!&#039;) . &#039;/&#039;, $html);&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that this code does not interact with the database at all. Data is only stored to or loaded from the database if you call $qag-&amp;gt;load_... or $qag_save... methods.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==New classes==&lt;br /&gt;
&lt;br /&gt;
===question_engine===&lt;br /&gt;
&lt;br /&gt;
This is a static factory class that provides an entry point to all the other question engine classes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===question_state===&lt;br /&gt;
&lt;br /&gt;
An enumeration that defines constants the various states a question can be in, with some helper methods:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
abstract class question_state {&lt;br /&gt;
    const NOT_STARTED = -1;&lt;br /&gt;
    const UNPROCESSED = 0;&lt;br /&gt;
    const INCOMPLETE = 1;&lt;br /&gt;
    const COMPLETE = 2;&lt;br /&gt;
    const NEEDS_GRADING = 16;&lt;br /&gt;
    const FINISHED = 17;&lt;br /&gt;
    const GAVE_UP = 18;&lt;br /&gt;
    const GRADED_INCORRECT = 24;&lt;br /&gt;
    const GRADED_PARTCORRECT = 25;&lt;br /&gt;
    const GRADED_CORRECT = 26;&lt;br /&gt;
    const FINISHED_COMMENTED = 49;&lt;br /&gt;
    const GAVE_UP_COMMENTED = 50;&lt;br /&gt;
    const MANUALLY_GRADED_INCORRECT = 56;&lt;br /&gt;
    const MANUALLY_GRADED_PARTCORRECT = 57;&lt;br /&gt;
    const MANUALLY_GRADED_CORRECT = 58;&lt;br /&gt;
&lt;br /&gt;
    public static function is_active($state) { ... }&lt;br /&gt;
    public static function is_finished($state) { ... }&lt;br /&gt;
    // ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===question_display_option===&lt;br /&gt;
&lt;br /&gt;
This class contains all the options for what may, or may not, be visible when a question is rendered.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
class question_display_options {&lt;br /&gt;
    public $flags = QUESTION_FLAGSSHOWN;&lt;br /&gt;
    public $readonly = false;&lt;br /&gt;
    public $feedback = false;&lt;br /&gt;
    // ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===question_definition===&lt;br /&gt;
&lt;br /&gt;
This class encapsulates the question definition. This used to be passed round in $question stdClass objects. Now we have a real class. &lt;br /&gt;
&lt;br /&gt;
There will be subclasses like&lt;br /&gt;
* question_truefalse&lt;br /&gt;
* question_multichoice&lt;br /&gt;
* ...&lt;br /&gt;
&lt;br /&gt;
I think some behaviour (e.g. grade_responses, get_renderer) will be in this class.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===question_usage_by_activity===&lt;br /&gt;
&lt;br /&gt;
Related to the question_usages table in the DB.&lt;br /&gt;
&lt;br /&gt;
This is the main class that activity modules will use. For example, there might be a question_usage_by_activity for a quiz attempt or a lesson attempt.&lt;br /&gt;
&lt;br /&gt;
There are methods to add questions to the attempt, start and finish the attempt, and submit data to a particular question. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===question_attempt===&lt;br /&gt;
&lt;br /&gt;
Related to the question_attempts table in the DB.&lt;br /&gt;
&lt;br /&gt;
Stores all the information about the student&#039;s attempt at one particular question as part of a question_usage_by_activity.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===question_attempt_step===&lt;br /&gt;
&lt;br /&gt;
Related to the question_attempts_step and question_attempts_data table in the DB.&lt;br /&gt;
&lt;br /&gt;
A question_attempt comprises a sequence of steps. Each step has an associative array of submission data, that is, principally the data that was submitted in the HTTP request that created the new step.&lt;br /&gt;
&lt;br /&gt;
Each step also has a state. That is, one of the question_state constants, and optionally a grade.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are two helper classes question_attempt_step_iterator and question_attempt_reverse_step_iterator which let you write code like&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
foreach ($qa-&amp;gt;get_iterator() as $stepindex =&amp;gt; $step) {&lt;br /&gt;
    // Do something with each step of the question attempt in order.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===question_behaviour===&lt;br /&gt;
&lt;br /&gt;
Will have subclasses like&lt;br /&gt;
* qbehaviour_delayedfeedback&lt;br /&gt;
* qbehaviour_interactive&lt;br /&gt;
* ...&lt;br /&gt;
&lt;br /&gt;
Question behaviours control exactly what happens when as a question_attempt is started, a submission is processed, or finished, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===core_question_renderer===&lt;br /&gt;
&lt;br /&gt;
Renderers are responsible for generating the HTML to display a question in a particular state. The core_question_renderer it responsible for all the bits that do not depend on the current question type or behaviour.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===qtype_renderer===&lt;br /&gt;
&lt;br /&gt;
Base class for&lt;br /&gt;
* qtype_truefalse_renderer&lt;br /&gt;
* qtype_multichoice_renderer - and possibly also qtype_multichoice_horizontal_renderer&lt;br /&gt;
* ...&lt;br /&gt;
&lt;br /&gt;
Responsible for generating the bits of HTML that depend on the question type. For example the question text, and input elements.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===qbehaviour_renderer===&lt;br /&gt;
&lt;br /&gt;
Base class for&lt;br /&gt;
* qbehaviour_delayedfeedback_renderer&lt;br /&gt;
* qbehaviour _interactive_renderer&lt;br /&gt;
* ...&lt;br /&gt;
&lt;br /&gt;
Responsible for generating the bits of HTML that depend on the behaviour. For example the submit button in adaptive mode.&lt;br /&gt;
&lt;br /&gt;
==Changes to the question type API==&lt;br /&gt;
&lt;br /&gt;
Can this be backwards compatible? It is looking like it will be better to break backwards compatibility - or at least to introduce new API methods. It may prove possible to keep old question types mostly working by providing implementations of the new API in terms of the old API methods.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed robustness and performance testing system==&lt;br /&gt;
&lt;br /&gt;
A major change to the question engine should really only be contemplated in combination with the introduction of a test harness that makes it easy to run correctness, performance and reliability tests.&lt;br /&gt;
&lt;br /&gt;
One advantage of the way data will be stored in the new system is that everything originally submitted by the user will be stored in the database in a format very close to the one in which it was originally received by the web server. Therefore, it should be easy to write a script that replays saved quiz attempts. This is the basis of a test harness. I will create such a test script as part of this work.&lt;br /&gt;
&lt;br /&gt;
==Huge class diagram==&lt;br /&gt;
&lt;br /&gt;
This diagram shows all the classes in the question code (no including specific plugins), with most of the core of my new proposal implemented.&lt;br /&gt;
&lt;br /&gt;
[[Image:Question_classes.png]]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
In the next section, [[Development:Overview_of_the_Moodle_question_engine|Overview_of_the_Moodle_question_engine]] summarises the new system. It is intended to be the developer documentation for the new system once it is finished.&lt;br /&gt;
&lt;br /&gt;
* Back to [[Development:Question_Engine_2|Question Engine 2]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=report/myfeedback/index&amp;diff=140836</id>
		<title>report/myfeedback/index</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=report/myfeedback/index&amp;diff=140836"/>
		<updated>2021-07-14T13:24:31Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Text replacement - &amp;quot;class=&amp;quot;nicetable&amp;quot;&amp;quot; to &amp;quot;class=&amp;quot;wikitable&amp;quot;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Moodle My Feedback=&lt;br /&gt;
When installed, the Moodle My Feedback report appears in the My Profile &amp;gt; Activity Reports menu and allows students to see an overview of all their grades and feedback for assessment activities such as Moodle Assignments, Turnitin Assignments (v1 &amp;amp; v2), Workshops and Quizzes. It provides their visible grades and a link to their submission and any feedback that has been released to them.&lt;br /&gt;
&lt;br /&gt;
The report can be accessed via the user profile (Activity Reports &amp;gt; My Feedback report). Access is controlled by the user context, teacher will be able to see this user&#039;s grades for the courses that they are teacher in Users can only see their own grades Admin and manager can see all grades for all users (unless permissions prohibit this)&lt;br /&gt;
&lt;br /&gt;
The report is intended to help students understand the variety of feedback they receive. It can also be used to identify similarities between feedback received from across modules and years to help students see how they can improve their work in future assessments.]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==What is My Feedback?==&lt;br /&gt;
My Feedback is a single-view report that enables different staff and student roles to view a report of grades and feedback recorded in Moodle, across modules. The report includes Moodle Assignments, Turnitin Assignments, Workshops, Quizzes and Grade items entered directly in the Moodle course Gradebook.&lt;br /&gt;
The report provides links to submissions and any feedback that has been released to students.&lt;br /&gt;
Watch the video on how students can use the My Feedback report: &lt;br /&gt;
&lt;br /&gt;
{{MediaPlayer | url = https://www.youtube.com/watch?v=gI9Mq4qsFPs}}&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
&lt;br /&gt;
The plugin is available for download from: https://moodle.org/plugins/view.php?plugin=report_MyFeedback and the installation guide is available at: https://docs.moodle.org/33/en/report/myfeedback/install&lt;br /&gt;
&lt;br /&gt;
==Who can use it?==&lt;br /&gt;
When installed and enabled, My Feedback is available to students, personal tutors, teachers and departmental administrators.&lt;br /&gt;
&lt;br /&gt;
Students can view feedback and grades from their assessments across all their UCL Moodle courses.&lt;br /&gt;
* Personal tutors can see their tutees&#039; full My Feedback reports across all the modules their students are studying. Note: personal tutors will not be able to link through to assessments on courses they do not have tutor access to. Personal tutors are assigned to students using the Moodle Parent role functionality.&lt;br /&gt;
* Teachers can see M yFeedback reports for their students containing assessment information for any modules they teach and/or assess. They will not see any assessments for modules they do not teach (unless they have been granted teacher access to those Moodle courses).&lt;br /&gt;
* Departmental administrators can see My Feedback reports for all the Moodle courses within categories where they have been assigned departmental administrator access in Moodle. Categories in Moodle will either be for the entire  department, or might be broken down further into undergraduate and postgraduate modules. This feature assumes your Moodle installation makes use of category enrolments.&lt;br /&gt;
&lt;br /&gt;
==How can staff give feedback that is visible in the report?==&lt;br /&gt;
To make the most of My Feedback, teachers and markers need to use Moodle in ways that makes the information visible within the report. Many of these suggestions also make assessment feedback more visible to students generally. &lt;br /&gt;
Note: If deciding between Moodle Assignments and Turnitin Assignment, be aware that Turnitin feedback cannot be shown directly in the My Feedback report and requires the student to copy and paste this in, so Moodle Assignment feedback is more visible in the report.&lt;br /&gt;
&lt;br /&gt;
Below are some tips for how to make feedback visible within each type of assessment&lt;br /&gt;
shown within the report.&lt;br /&gt;
&lt;br /&gt;
===Moodle Assignments===&lt;br /&gt;
- Grades must be entered in the grade box (as opposed to being embedded within a document, or the feedback comments area). Otherwise it won&#039;t be shown in the grade column in the report. Moodle Assignments support numeric, letter and scale grades.&lt;br /&gt;
- General feedback should be entered into the feedback comments area, rather than embedded in a document, as only feedback added in this box will be visible within the &#039;feedback comments&#039; section of the report.&lt;br /&gt;
- Rubric or marking guide comments should be entered directly into the Advanced Grading section of the Moodle Assignment (rather than being attached in a separate document) in order for this feedback to display in the &#039;feedback comments&#039; section of the report.&lt;br /&gt;
- If you provide inline comments / tracked changes within the paper via feedback files, tell students this in the feedback comments, so they know to look for it.&lt;br /&gt;
- Students who are granted extensions need to have this set up within the Assignment&#039;s &#039;view submissions&#039; page, otherwise their submission will display in the report as late.&lt;br /&gt;
&lt;br /&gt;
===Turnitin Assignments===&lt;br /&gt;
 Grades must be entered in the grade (/100) area (in the top, right corner) in order to appear&lt;br /&gt;
in the grade column of the report. That means if you are using letter grades written directly&lt;br /&gt;
into the general comments area, these will not show in the report and will only be visible to&lt;br /&gt;
students when they click through to the Turnitin assignment via the &#039;view feedback&#039; link.&lt;br /&gt;
 All other feedback (inline &#039;QuickMark&#039; comments, general &#039;text comments&#039; and&lt;br /&gt;
&#039;rubrics&#039;/&#039;grading forms&#039;) will only be visible to students when they click on the &#039;view&lt;br /&gt;
feedback&#039; link. If they want to see any of this directly in the &#039;feedback comments&#039; section of&lt;br /&gt;
the report, they will need to copy and paste this in manually.&lt;br /&gt;
&lt;br /&gt;
===Quizzes===&lt;br /&gt;
 Provide overall feedback in the quiz settings, that points students to reviewing each quiz&lt;br /&gt;
question for detailed feedback relating to that question. You can provide feedback within&lt;br /&gt;
certain grade boundaries by adding more feedback fields and entering the percentages in&lt;br /&gt;
the grade boundary boxes. E.g. If they pass the quiz with a high score you might want to add&lt;br /&gt;
some positive comments and if they fail the quiz, point them to further readings or&lt;br /&gt;
resources.&lt;br /&gt;
 Provide detailed feedback for each quiz question in the general feedback section, rather&lt;br /&gt;
than the incorrect or correct sections, as someone who got a question right may not fully&lt;br /&gt;
understand why and may want to review this.&lt;br /&gt;
 Students who are granted extensions for quizzes with a deadline need to have this set up&lt;br /&gt;
within the group or user overrides section of the quiz, otherwise their attempt will display in&lt;br /&gt;
the report as late.&lt;br /&gt;
&lt;br /&gt;
===Workshops===&lt;br /&gt;
 Provide overall feedback for the group in the Workshop settings, under Feedback, in&lt;br /&gt;
the conclusion area. This will appear for all students in the &#039;feedback comments&#039; section of&lt;br /&gt;
the report.&lt;br /&gt;
&lt;br /&gt;
===Manual grade items===&lt;br /&gt;
 If you add grades directly to the Moodle Gradebook (for example to provide feedback for an oral presentation) you should ideally upload a single grade for the entire assessment, rather&lt;br /&gt;
than uploading a grade for each criterion. Uploading a separate grade for each criterion will&lt;br /&gt;
result in students having to sift through many grade entries for a single assessment.&lt;br /&gt;
&lt;br /&gt;
===Grades entered directly in Gradebook===&lt;br /&gt;
 Grades that are entered or overridden directly in the Moodle Gradebook for an existing activity, will appear in the report, overwriting the grade within the assignment, workshop or quiz.&lt;br /&gt;
&lt;br /&gt;
==How do I access and use the report?==&lt;br /&gt;
The Moodle My Feedback report can be accessed from the My Profile &amp;gt; Activity Reports menu. You can access your profile by clicking on your name, in the top, right corner of Moodle.&lt;br /&gt;
&lt;br /&gt;
If you are both a student and a teacher, you can view your own report as well as the reports of those you teach.&lt;br /&gt;
&lt;br /&gt;
 [[Image:3. MyFeedbackLinkfromProfile.png|800px|center|My Feedback link from Moodle Profile|link=https://docs.moodle.org/31/en/images_en/a/a9/3._MyFeedbackLinkfromProfile.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Overview tab===&lt;br /&gt;
The &#039;&#039;&#039;overview tab&#039;&#039;&#039; lists all feedback and/or grades a student has received from any Moodle Assignments, Turnitin Assignments, Workshops and Quizzes within a particular academic year. &lt;br /&gt;
As seen in the screenshot below, the My Feedback report table can be filtered, exported to excel and the current view printed.&lt;br /&gt;
However, please note that assessments without a grade or feedback will neither be displayed on the dashboard nor the exported excel report. &lt;br /&gt;
The assessment table shown lists the following:&lt;br /&gt;
* Module that the assessment belongs to&lt;br /&gt;
* Name of the assessment&lt;br /&gt;
* Assessment type&lt;br /&gt;
* Assessment due date&lt;br /&gt;
* Submission date&lt;br /&gt;
* Full feedback (a link is provided, which presents the Student&#039;s submitted assessment with feedback attached)&lt;br /&gt;
* Assessment grade&lt;br /&gt;
* Range (the number of marks available for the assessment)&lt;br /&gt;
* A bar graph indicating how close the Student was to achieving the highest mark for the assessment&lt;br /&gt;
&lt;br /&gt;
[[File:1.My_feedback_v2.7_overview.png|800px|center|My Feedback overview tab|link=https://docs.moodle.org/31/en/images_en/3/3f/1.My_feedback_v2.7_overview.png]]&lt;br /&gt;
&lt;br /&gt;
===Feedback Comments tab===&lt;br /&gt;
The Feedback comments tab shows general feedback* from a student&#039;s Module Tutors for each assessment, as well as selected grading rubric levels and marking guide comments from Moodle Assignments.&lt;br /&gt;
Overall feedback from Moodle quizzes is also provided. In depth quiz feedback will usually be found within the attempt alongside each question. To see this click the &#039;View last attempt&#039; link in the Full Feedback column. For other assessment types click the &#039;View feedback&#039; link in the Full Feedback column to see contextualised feedback for the assessment. E.g. the level you obtained alongside other grading levels within a rubric, in text comments added directly to your assessment etc.&lt;br /&gt;
&lt;br /&gt;
Students can add self-reflective notes against your graded assessments, which can be viewed by your Personal Tutor and Departmental Administrator.&lt;br /&gt;
&lt;br /&gt;
The date students viewed the feedback from an assessment is also displayed, allowing tutors to easily determine whether their comments are being read. Feedback that has not been viewed by the student will have a cross displayed beside it.&lt;br /&gt;
 &lt;br /&gt;
*If the assessment is a Turnitin assignment, general feedback cannot be displayed automatically, however you can copy and paste comments from the original feedback provided on your Turnitin assignment if you would find it useful to view this feedback alongside other assessments.&lt;br /&gt;
&lt;br /&gt;
[[File:Moodle31-MyFeedback-FeedbackComments.PNG|800px|center|My Feedback Feedback Comments tab|link=https://docs.moodle.org/31/en/images_en/9/97/Moodle31-MyFeedback-FeedbackComments.PNG]]&lt;br /&gt;
&lt;br /&gt;
===Personal Tutor tab===&lt;br /&gt;
The Personal tutor tab holds the contact information for the Personal Tutor assigned to a Student.&lt;br /&gt;
&lt;br /&gt;
===My students tab ===&lt;br /&gt;
This tab is visible to anyone who is a teacher on a Moodle course, who has been assigned as a Personal Tutor to a student using Moodle parent roles, or who has departmental administrator access to My Feedback.&lt;br /&gt;
&lt;br /&gt;
The My students tab lists all of the student&#039;s linked to the modules assigned to a teacher. You will need to click the &#039;Show all students checkbox&#039; to see the students you teach. By default only those students you are a Personal Tutor for will display. You can search for a student by name in the Search box.&lt;br /&gt;
Assessment information for a particular student can be viewed by clicking on the student&#039;s name.&lt;br /&gt;
&lt;br /&gt;
 [[Image:MyStudents.PNG|800px|center|My Feedback My students tab|link=https://docs.moodle.org/31/en/images_en/9/9b/MyStudents.PNG]]&lt;br /&gt;
&lt;br /&gt;
===Personal Tutor dashboard===&lt;br /&gt;
&lt;br /&gt;
The Personal Tutor dashboard is visible to anyone who has been granted the Personal Tutor parent role to one or more students in Moodle.&lt;br /&gt;
&lt;br /&gt;
The Personal tutor dashboard displays all of a students assigned to a personal tutor. From this screen, personal tutors are able to send multiple (blind) emails to their tutees.&lt;br /&gt;
The summary table shown in the image above lists the following:&lt;br /&gt;
Personal tutee/ module names&lt;br /&gt;
The number of assessments submitted by the tutee for the module (to date)&lt;br /&gt;
The number of non-submissions by the tutee&lt;br /&gt;
The number of late submissions by the tutee&lt;br /&gt;
The number of graded assessments for the tutee&lt;br /&gt;
The number of assessments that the tutee has received low grades for (less than 50%) of the total mark&lt;br /&gt;
&lt;br /&gt;
Clicking on a student&#039;s name will lead to their respective Overview page, providing a summary of their performance in the modules they are studying. The Feedback comments tab will also become available &lt;br /&gt;
Note: To return to your own My Feedback dashboard after viewing a student report, click on the View own dashboard button.&lt;br /&gt;
&lt;br /&gt;
 [[Image:Personal_tutor_dashboard.PNG|800px|center|My Feedback Personal Tutor Dashboard|link=https://docs.moodle.org/31/en/images_en/5/51/Personal_tutor_dashboard.PNG]]&lt;br /&gt;
&lt;br /&gt;
===Module Tutor dashboard===&lt;br /&gt;
The Module tutor dashboard is visible to anyone who is a teacher on a moodle course.&lt;br /&gt;
&lt;br /&gt;
* The Module tutor (aka Teacher) dashboard provides a breakdown of students&#039; performance in the modules assigned to a teacher. This view can be toggled between an Assessment breakdown and a Student breakdown.&lt;br /&gt;
* The Assessment breakdown organises student grades according to their module of study, while the Student breakdown lists each student by name and the number of assessments they have been given. &lt;br /&gt;
* Teachers can gain further insight into the assessment information of individual students by clicking on the student&#039;s name. They will then see the My Feedback report for that student.&lt;br /&gt;
&lt;br /&gt;
Note: To return to your own My Feedback dashboard after viewing a student report, click on the View own dashboard button.&lt;br /&gt;
&lt;br /&gt;
[[File:Module tutor dashboard.PNG|800px|center|My Feedback Module Tutor Dashboard tab|link=https://docs.moodle.org/31/en/images_en/b/b1/Module_tutor_dashboard.PNG]]&lt;br /&gt;
&lt;br /&gt;
===Departmental Admin Dashboard===&lt;br /&gt;
For those institutions using category level enrolments you may have access to the My Feedback Department Admin Dashboard.&lt;br /&gt;
&lt;br /&gt;
* The Departmental admin dashboard displays assessment statistics for the courses and modules linked to a Departmental admin, depending on the course level filter selected.&lt;br /&gt;
* The report view can also be toggled to show statistics per assessment, module or module tutor. &lt;br /&gt;
* The Assessment breakdown organises student grades according to their module of study, while the Student breakdown lists each student by name and the number of assessments they have been given. &lt;br /&gt;
* Staff can gain further insight into the assessment information of individual students by clicking on the student&#039;s name.&lt;br /&gt;
* The Module tutor stats toggle allows Departmental admins to view the performance of Module tutors for each of their tutor groups.&lt;br /&gt;
&lt;br /&gt;
Note: To return to your own My Feedback dashboard after viewing a student report, click on the View own dashboard button.&lt;br /&gt;
&lt;br /&gt;
 [[Image:Departmental_Admin_dashboard.PNG|800px|center|My Feedback Departmental Administrator Dashboard|link=https://docs.moodle.org/31/en/images_en/2/21/Departmental_Admin_dashboard.PNG]]&lt;br /&gt;
&lt;br /&gt;
===Usage dashboard===&lt;br /&gt;
The usage reports shows how students and staff have been using the My Feedback usage reports. The data can be printed and exported to excel for further analysis.&lt;br /&gt;
&lt;br /&gt;
There are a number of reports that can be run.&lt;br /&gt;
* Category students overview: This report shows an overview of student usage within a category.&lt;br /&gt;
* Category staff overview: This report shows an overview of staff usage within a category.&lt;br /&gt;
* Category students: This report shows a list of students and their individual usage within a category.&lt;br /&gt;
* Category staff: This report shows a list of staff and their individual usage within a category.&lt;br /&gt;
* Course students overview: This report shows an overview of student usage within each course within a particular Category.&lt;br /&gt;
* Course staff overview: This report shows an overview of staff usage within each course within a particular category.&lt;br /&gt;
* Course students: This report shows a list of students and their individual usage within a course.&lt;br /&gt;
* Course staff: This report shows a list of staff and their individual usage within a course.&lt;br /&gt;
* Student: This report shows the usage of an individual student across all their courses.&lt;br /&gt;
* Staff member: This report shows the usage of an individual staff member across all their courses.&lt;br /&gt;
* Personal tutees: This report shows an overview of a tutor\&#039;s personal tutees and their My Feedback activity.&lt;br /&gt;
&lt;br /&gt;
==Frequently Asked Questions==&lt;br /&gt;
&lt;br /&gt;
===Q. Why can&#039;t students see their grades and feedback in the My Feedback report?===&lt;br /&gt;
A. There are a number of reasons grades and feedback might not be showing in the My Feedback report. The easiest way to check what should be seen in the report is to ask students what they see in the course gradebook (Settings block &amp;gt; Course Administration &amp;gt; Grades). The same grades should also display in My Feedback. &lt;br /&gt;
If the grades are not showing in the Gradebook, they will not show in My Feedback either. There are several reasons why they may not be visible:&lt;br /&gt;
The Moodle course has been hidden from students.&lt;br /&gt;
The students are no longer enrolled on the course.&lt;br /&gt;
The ‘Show gradebook to students’ has been set to ‘No’ in the course settings, which means the course Gradebook is hidden from students and no grades or feedback will appear for this course in the My Feedback report.&lt;br /&gt;
The grade item (or category it sits within) has been hidden manually, or until a certain date in the Gradebook.The Moodle course section where the assessment item is located has been hidden, or access has been restricted to particular students.&lt;br /&gt;
The assessment item (assignment, quiz etc.) has been hidden from students.&lt;br /&gt;
The grades have not yet been revealed to students (check the Turnitin Assignment post date; quiz review options; Moodle Assignment with marking workflow is set to &#039;released&#039;).&lt;br /&gt;
&lt;br /&gt;
Additionally, Turnitin feedback cannot be seen directly in the &#039;Feedback comments&#039; tab of the report unless student&#039;s copy it in manually from their Turnitin assignment.&lt;br /&gt;
&lt;br /&gt;
Note: Only those with edit access to the Moodle courses in question will be able to check why the grades aren&#039;t displaying. This means if you are a personal tutor and don&#039;t have access to the Moodle courses in question you will need to speak to the teacher of the course, or to a Moodle Administrator.&lt;br /&gt;
&lt;br /&gt;
===Q. How do I obtain Departmental Administrator access to the My Feedback report?===&lt;br /&gt;
Please speak to your Moodle Administrator about whether your institution uses Moodle category level enrolments and if so, how you can get access as a departmental administrator to the report.&lt;br /&gt;
&lt;br /&gt;
==Glossary of terms used in My Feedback==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Term&lt;br /&gt;
! Definition&lt;br /&gt;
! Visible to&lt;br /&gt;
|-&lt;br /&gt;
| Assessment&lt;br /&gt;
| A set piece of assigned work or an item for which a student is given a grade and/or feedback with a Moodle course. Types of assessment are:&lt;br /&gt;
* Moodle assignment (including offline assignments)&lt;br /&gt;
* Turnitin assignment&lt;br /&gt;
* Workshop (for peer assessment)&lt;br /&gt;
* Quiz&lt;br /&gt;
* Manual item (grade entered into gradebook for in-class activities, such as presentations)&lt;br /&gt;
Staff are provided a total number of assessments a student should have submitted thus far on the Personal tutor, Module tutor and Departmental Administrator dashboards.&lt;br /&gt;
| Students &amp;amp; staff&lt;br /&gt;
|-&lt;br /&gt;
| Course&lt;br /&gt;
| The Moodle course that contains each assessment that appears in the My Feedback report. A course is an area in Moodle, often used to share module information, however it can also be used for other purposes (e.g to represent a programme, project, prelab activity or professional development course). The report will show the course name with a link to the course, but only those with access to the course will be able to view the course itself and the actual assessment pages it contains. Personal Tutors and Departmental Admins will see all course information in the report, but module tutors (or teachers) are restricted to only seeing courses in the report that they teach upon.&lt;br /&gt;
| Students and any enrolled staff&lt;br /&gt;
|-&lt;br /&gt;
| Departmental administrator&lt;br /&gt;
| A member of staff  who has oversight for a particular department or programme in an administrative, senior teaching or management capacity (e.g. programme administrator, departmental/teaching administrator, module leader, departmental tutor, faculty tutor, programme tutor, programme director, head of department, director of studies or programme leader).&lt;br /&gt;
| n/a&lt;br /&gt;
|-&lt;br /&gt;
| Formative and summative assessment&lt;br /&gt;
| Formative assessment takes place throughout the course. It has a developmental purpose and is designed to help students to learn more effectively via set pieces of work and giving students feedback on their performance and how it can be improved and/or maintained. Formative assessment is reflective practice and does not usually contribute to the course grade at the end of the year. Any coursework that counts towards the final grade is known as &#039;summative&#039; feedback.&lt;br /&gt;
| Staff and students&lt;br /&gt;
|-&lt;br /&gt;
| Graded assessments&lt;br /&gt;
| The number of assessments graded thus far, with feedback visible to students.&lt;br /&gt;
| Staff via dashboards&lt;br /&gt;
|-&lt;br /&gt;
| Late submissions&lt;br /&gt;
| The number of assignments that have been submitted after the deadline.&lt;br /&gt;
Note: assignment and quiz deadlines can be amended to give individuals extensions. If this is done, the report takes this into account when determining the number of late submissions. However, not all departments use this feature in Moodle, so this should kept in mind when viewing this data.&lt;br /&gt;
| Staff via dashboards&lt;br /&gt;
|-&lt;br /&gt;
| Low graded assessments&lt;br /&gt;
| The number of assessments (where the grades have been released to students) with a score below 50%.&lt;br /&gt;
| Staff via dashboards&lt;br /&gt;
|-&lt;br /&gt;
| Non-submissions&lt;br /&gt;
| The number of missed submissions for due assessments.&lt;br /&gt;
| Staff via dashboards&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Report]]&lt;br /&gt;
&lt;br /&gt;
[[es:report/myfeedback/index]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Development:File_API&amp;diff=140835</id>
		<title>Development:File API</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Development:File_API&amp;diff=140835"/>
		<updated>2021-07-14T13:24:31Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Text replacement - &amp;quot;class=&amp;quot;nicetable&amp;quot;&amp;quot; to &amp;quot;class=&amp;quot;wikitable&amp;quot;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Work in progress}}&lt;br /&gt;
{{Infobox Project&lt;br /&gt;
|name = File API&lt;br /&gt;
|state = Implemented&lt;br /&gt;
|tracker = MDL-14589&lt;br /&gt;
|discussion = n/a&lt;br /&gt;
|assignee = [[User:Petr Škoda (škoďák)|Petr Škoda (škoďák)]]&lt;br /&gt;
}}&lt;br /&gt;
{{Moodle 2.0}}&lt;br /&gt;
&lt;br /&gt;
==Objectives==&lt;br /&gt;
&lt;br /&gt;
The goals of the new File API are: &lt;br /&gt;
&lt;br /&gt;
* allow files to be stored within Moodle, as part of the content (as we do now).&lt;br /&gt;
* use a consistent and flexible approach for all file handling throughout Moodle.&lt;br /&gt;
* give modules control over which users can access a file, using capabilities and other local rules.&lt;br /&gt;
* make it easy to determine which parts of Moodle use which files, to simplify operations like backup and restore.&lt;br /&gt;
* track where files originally came from.&lt;br /&gt;
* avoid redundant storage, when the same file is used twice.&lt;br /&gt;
* fully support Unicode file names, irrespective of the capabilities of the underlying file system.&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
The File API is a set of core interfaces to allow the rest of Moodle to store, serve and manage files. It applies only to files that are part of the Moodle site&#039;s content. It is not used for internal files, such as those in the following subdirectories of dataroot: temp, lang, cache, environment, filter, search, sessions, upgradelogs, ...&lt;br /&gt;
&lt;br /&gt;
The API can be subdivided into the following parts:&lt;br /&gt;
; File storage&lt;br /&gt;
: Low level file storage without access control information. Stores the content of files on disc, with metadata in associated database tables. &lt;br /&gt;
; File serving&lt;br /&gt;
: Lets users accessing a Moodle site get the files (file.php, draftfile.php, pluginfile.php, userfile.php, etc.)&lt;br /&gt;
:* Serve the files on request&lt;br /&gt;
:* with appropriate security checks&lt;br /&gt;
; File related user interfaces&lt;br /&gt;
: Provides the interface for (lib/form/file.php, filemanager.php, filepicker.php and files/index.php, draftfiles.php)&lt;br /&gt;
:* Form elements allowing users to select a file using the Repository API, and have it stored within Moodle.&lt;br /&gt;
:* UI for users to manage their files, replacing the old course files UI&lt;br /&gt;
; File browsing API&lt;br /&gt;
: Allows code to browse and optionally manipulate the file areas&lt;br /&gt;
:* find information about available files in each area.&lt;br /&gt;
:* print links to files.&lt;br /&gt;
:* optionally move/rename/copy/delete/etc.&lt;br /&gt;
&lt;br /&gt;
== File API internals ==&lt;br /&gt;
&lt;br /&gt;
=== File storage on disk ===&lt;br /&gt;
&lt;br /&gt;
Files are stored in $CFG-&amp;gt;dataroot (also known as moodledata) in the filedir subfolder.&lt;br /&gt;
&lt;br /&gt;
Files are stored according to the SHA1 hash of their content. This means each file with particular contents is stored once, irrespective of how many times it is included in different places, even if it is referred to by different names. (This idea comes from the git version control system.) To relate a file on disc to a user-comprehensible path or filename, you need to use the &#039;&#039;files&#039;&#039; database table. See the next section.&lt;br /&gt;
&lt;br /&gt;
Suppose a file has SHA1 hash 081371cb102fa559e81993fddc230c79205232ce. Then it will be stored in on disc as moodledata/filedir/08/13/71/081371cb102fa559e81993fddc230c79205232ce.&lt;br /&gt;
&lt;br /&gt;
This means Moodle can not store two files with the same SHA1 hash, luckily it is extremely unlikely that this would ever happen. Technically it is also possible to implement reliable collision tests (with some performance cost), for now we just test file lengths in addition to SHA1 hash.&lt;br /&gt;
&lt;br /&gt;
=== Files table ===&lt;br /&gt;
&lt;br /&gt;
This table contains one entry for each usage of a file. Enough information is kept here so that the file can be fully identified and retrieved again if necessary. It is necessary because some databases have hard limit on index size.&lt;br /&gt;
&lt;br /&gt;
If, for example, the same image is used in a user&#039;s profile, and a forum post, then there will be two rows in this table, one for each use of the file, and Moodle will treat the two as separate files, even though the file is only stored once on disc.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Default&lt;br /&gt;
! Info&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;id&#039;&#039;&#039; &lt;br /&gt;
| int(10)  &lt;br /&gt;
| auto-incrementing&lt;br /&gt;
| The unique ID for this file.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;contenthash&#039;&#039;&#039;&lt;br /&gt;
| varchar(40)&lt;br /&gt;
|  &lt;br /&gt;
| The sha1 hash of content.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;pathnamehash&#039;&#039;&#039;&lt;br /&gt;
| varchar(40)&lt;br /&gt;
| &lt;br /&gt;
| The sha1 hash of &amp;quot;/contextid/component/filearea/itemid/filepath/filename.ext&amp;quot; - prevents file duplicates and allows fast lookup.  It is necessary because some databases have hard limit on index size.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;contextid&#039;&#039;&#039; &lt;br /&gt;
| int(10)&lt;br /&gt;
| &lt;br /&gt;
| The context id defined in context table - identifies the instance of plugin owning the file.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;component&#039;&#039;&#039;&lt;br /&gt;
| varchar(50)&lt;br /&gt;
|&lt;br /&gt;
| Like &amp;quot;mod_forum&amp;quot;, &amp;quot;course&amp;quot;, &amp;quot;mod_assignment&amp;quot;, &amp;quot;backup&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;filearea&#039;&#039;&#039;&lt;br /&gt;
| varchar(50)&lt;br /&gt;
|&lt;br /&gt;
| Like &amp;quot;submissions&amp;quot;, &amp;quot;intro&amp;quot; and &amp;quot;content&amp;quot; (images and swf linked from summaries), etc.; &amp;quot;blogs&amp;quot; and &amp;quot;userfiles&amp;quot; are special case that live at the system context.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;itemid&#039;&#039;&#039;&lt;br /&gt;
| int(10)&lt;br /&gt;
| &lt;br /&gt;
| Some plugin specific item id (eg. forum post, blog entry or assignment submission or user id for user files)&lt;br /&gt;
|-&lt;br /&gt;
| filepath&lt;br /&gt;
| text&lt;br /&gt;
| &lt;br /&gt;
| relative path to file from module content root, useful in Scorm and Resource mod - most of the mods do not need this&lt;br /&gt;
|-&lt;br /&gt;
| filename&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| &lt;br /&gt;
| The full Unicode name of this file (case sensitive)&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;userid&#039;&#039;&#039;&lt;br /&gt;
| int(10)  &lt;br /&gt;
| NULL&lt;br /&gt;
| Optional - general user id field - meaning depending on plugin&lt;br /&gt;
|-&lt;br /&gt;
| filesize&lt;br /&gt;
| int(10)&lt;br /&gt;
| &lt;br /&gt;
| size of file - bytes&lt;br /&gt;
|-&lt;br /&gt;
| mimetype&lt;br /&gt;
| varchar(100)&lt;br /&gt;
| NULL&lt;br /&gt;
| type of file&lt;br /&gt;
|-&lt;br /&gt;
| status&lt;br /&gt;
| int(10)&lt;br /&gt;
| &lt;br /&gt;
| general file status flag - will be used for lost or infected files&lt;br /&gt;
|-&lt;br /&gt;
| source&lt;br /&gt;
| text&lt;br /&gt;
| &lt;br /&gt;
| file source - usually url&lt;br /&gt;
|-&lt;br /&gt;
| author&lt;br /&gt;
| varchar(255)&lt;br /&gt;
|&lt;br /&gt;
| original author of file, used when importing from other systems&lt;br /&gt;
|-&lt;br /&gt;
| license&lt;br /&gt;
| varchar(255)&lt;br /&gt;
|&lt;br /&gt;
| license type, empty means site default&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| &lt;br /&gt;
| The time this file was created&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| &lt;br /&gt;
| The last time the file was last modified&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Indexes:&lt;br /&gt;
* non-unique index on (contextid, component, filearea, itemid)&lt;br /&gt;
* non-unique index on (contenthash)&lt;br /&gt;
* unique index on (pathnamehash).&lt;br /&gt;
&lt;br /&gt;
The plugin type does not need to be specified because it can be derived from the context. Items like blog that do not have their own context will use their own file area inside a suitable context. In this case, the user context.&lt;br /&gt;
&lt;br /&gt;
Entries with filename = &#039;.&#039; represent directories. Directory entries like this are created automatically when a file is added within them.&lt;br /&gt;
&lt;br /&gt;
Note: &#039;files&#039; plural is used even thought that goes against the [[Development:Database|coding guidelines]] because &#039;file&#039; is a reserved word in some SQL dialects.&lt;br /&gt;
&lt;br /&gt;
===Implementation of basic operations===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Each plugin may directly access only files in own context and areas!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Low level access API is defined in &#039;&#039;file_storage&#039;&#039; class which is obtained from &amp;lt;code&amp;gt;get_file_storage()&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====Storing a file====&lt;br /&gt;
&lt;br /&gt;
# Calculate the SHA1 hash of the file contents.&lt;br /&gt;
# Check if a file with this SHA1 hash already exists on disc in file directory or file trash. If not, store the file there.&lt;br /&gt;
# Add the record for this file to the files table using the low level address&lt;br /&gt;
&lt;br /&gt;
====Reading a file====&lt;br /&gt;
&lt;br /&gt;
# Fetch the record (which includes the SHA1 hash) for the file you want from the files table. You can fetch either all area files or quickly get one file with a specific contenthash.&lt;br /&gt;
# Retrieve the contents using the SHA1 hash from the file directory.&lt;br /&gt;
&lt;br /&gt;
====Deleting a file====&lt;br /&gt;
&lt;br /&gt;
# Delete the record from the files table.&lt;br /&gt;
# Verify if some other file is still needing the content, if not move the content file into file trash&lt;br /&gt;
# Later, admin/cron.php deletes content files from trash directory&lt;br /&gt;
&lt;br /&gt;
== File serving ==&lt;br /&gt;
&lt;br /&gt;
Deals with serving of files - browser requests file, Moodle sends it back. We have three main files. It is important to setup slasharguments on server properly (file.php/some/thing/xxx.jpg), any content that relies on relative links can not work without it (scorm, uploaded html pages, etc.).&lt;br /&gt;
&lt;br /&gt;
=== legacy file.php ===&lt;br /&gt;
&lt;br /&gt;
Serves legacy course files, the file name and parameter structure is critical for backwards compatibility of existing course content.&lt;br /&gt;
&lt;br /&gt;
 /file.php/courseid/dir/dir/filename.ext&lt;br /&gt;
&lt;br /&gt;
Internally the files are stored in &amp;lt;code&amp;gt;array(&#039;contextid&#039;=&amp;gt;$coursecontextid, &#039;component;=&amp;gt;&#039;course&#039;, &#039;filearea&#039;=&amp;gt;&#039;legacy&#039;, &#039;itemid&#039;=&amp;gt;0)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The legacy course files are completely disabled in all new courses created in 2.0. The major problem here is to how to educate our users that they can not make huge piles of files in each course any more.&lt;br /&gt;
&lt;br /&gt;
=== pluginfile.php ===&lt;br /&gt;
All plugins should use this script to serve all files.&lt;br /&gt;
* plugins decide about access control&lt;br /&gt;
* optional XSS protection - student submitted files must not be served with normal headers, we have to force download instead; ideally there should be second wwwroot for serving of untrusted files&lt;br /&gt;
* links to these files are constructed on the fly from the relative links stored in database, this means that plugin may link only own files&lt;br /&gt;
&lt;br /&gt;
Absolute file links need to be rewritten if html editing allowed in plugin. The links are stored internally as relative links. Before editing or display the internal link representation is converted to absolute links using simple str_replace() @@thipluginlink/summary@@/image.jpg --&amp;gt; /pluginfile.php/assignmentcontextid/intro/image.jpg, it is converted back to internal links before saving.&lt;br /&gt;
&lt;br /&gt;
Script parameters are virtual file names, in most cases the parameters match the low level file storage, but they do not have to:&lt;br /&gt;
&lt;br /&gt;
 /pluginfile.php/contextid/areaname/arbitrary/params/or/dirs/filename.ext&lt;br /&gt;
&lt;br /&gt;
pluginfile.php detects the type of plugin from context table, fetches basic info (like $course or $cm if appropriate) and calls plugin function (or later method) which does the access control and finally sends the file to user. &#039;&#039;areaname&#039;&#039; separates files by type and divides the context into several subtrees - for example &#039;&#039;summary&#039;&#039; files (images used in module intros), post attachments, etc.&lt;br /&gt;
&lt;br /&gt;
==== Assignment example ====&lt;br /&gt;
&lt;br /&gt;
 /pluginfile.php/assignmentcontextid/mod_assignment/intro/someimage.jpg&lt;br /&gt;
 /pluginfile.php/assignmentcontextid/mod_assignment/submission/submissionid/attachmentname.ext&lt;br /&gt;
 /pluginfile.php/assignmentcontextid/mod_assignment/allsubmissions/groupid/allsubmissionfiles.zip&lt;br /&gt;
&lt;br /&gt;
The last line example of virtual file that should created on the fly, it is not implemented yet.&lt;br /&gt;
&lt;br /&gt;
====scorm example====&lt;br /&gt;
&lt;br /&gt;
 /pluginfile.php/scormcontextid/mod_scorm/intro/someimage.jpg&lt;br /&gt;
 /pluginfile.php/scormcontextid/mod_scorm/content/revisionnumber/dir/somescormfile.js&lt;br /&gt;
&lt;br /&gt;
The revision counter is incremented when any file changes in order to prevent caching problems.&lt;br /&gt;
&lt;br /&gt;
====quiz example====&lt;br /&gt;
&lt;br /&gt;
 pluginfile.php/quizcontextid/mod_quiz/intro/niceimage.jpg&lt;br /&gt;
&lt;br /&gt;
====questions example====&lt;br /&gt;
&lt;br /&gt;
This section was out of date. See [[Development:File_storage_conversion_Quiz_and_Questions]] for the latest thinking.&lt;br /&gt;
&lt;br /&gt;
====blog example====&lt;br /&gt;
Blog entries or notes in general do not have context id (because they live in system context, SYSCONTEXTID below is the id of system context).&lt;br /&gt;
The note attachments are always served with XSS protection on, ideally we should use separate wwwroot for this. Access control can be hardcoded.&lt;br /&gt;
&lt;br /&gt;
 /pluginfile.php/SYSCONTEXTID/blog/attachment/blogentryid/attachmentname.ext&lt;br /&gt;
&lt;br /&gt;
Internally stored in &amp;lt;code&amp;gt;array(&#039;contextid&#039;=&amp;gt;SYSCONTEXTID, &#039;component&#039;=&amp;gt;&#039;blog&#039;, &#039;filearea&#039;=&amp;gt;&#039;attachment&#039;, &#039;itemid&#039;=&amp;gt;$blogentryid)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 /pluginfile.php/SYSCONTEXTID/blog/post/blogentryid/embeddedimage.ext&lt;br /&gt;
&lt;br /&gt;
Internally stored in &amp;lt;code&amp;gt;array(&#039;contextid&#039;=&amp;gt;SYSCONTEXTID, &#039;component&#039;=&amp;gt;&#039;blog&#039;, &#039;filearea&#039;=&amp;gt;&#039;post&#039;, &#039;itemid&#039;=&amp;gt;$blogentryid)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Temporary files ===&lt;br /&gt;
Temporary files are usually used during the lifetime of one script only.&lt;br /&gt;
uses:&lt;br /&gt;
* exports&lt;br /&gt;
* imports&lt;br /&gt;
* processing by executable files (latex, mimetex)&lt;br /&gt;
&lt;br /&gt;
These files should never use utf-8 file names.&lt;br /&gt;
&lt;br /&gt;
=== Legacy file storage and serving ===&lt;br /&gt;
Going to use good-old separate directories in $CFG-&amp;gt;dataroot.&lt;br /&gt;
&lt;br /&gt;
file serving and storage:&lt;br /&gt;
# user avatars - user/pix.php&lt;br /&gt;
# group avatars - user/pixgroup.php&lt;br /&gt;
# tex, algebra - filter/tex/* and filter/algebra/*&lt;br /&gt;
# rss cache (?full rss rewrite soon?) - backwards compatibility only rss/file.php&lt;br /&gt;
&lt;br /&gt;
only storage:&lt;br /&gt;
#sessions&lt;br /&gt;
&lt;br /&gt;
== File browsing API ==&lt;br /&gt;
&lt;br /&gt;
This is what other parts of Moodle use to access files that they do not own.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Class: file_browser ===&lt;br /&gt;
&lt;br /&gt;
=== Class: file_info and subclasses ===&lt;br /&gt;
&lt;br /&gt;
== File related user interfaces ==&lt;br /&gt;
&lt;br /&gt;
All files are obtained through from the file repositories.&lt;br /&gt;
&lt;br /&gt;
=== Formslib fields ===&lt;br /&gt;
* file picker&lt;br /&gt;
* file manager&lt;br /&gt;
* file upload (obsolete, do not use)&lt;br /&gt;
&lt;br /&gt;
=== Integration with the HTML editor ===&lt;br /&gt;
&lt;br /&gt;
Each instance of the HTML editor can be told to store related files in a particular file area.&lt;br /&gt;
&lt;br /&gt;
During editing, files are stored in a draft files area. Then when the form is submitted they are moved into the real file area.&lt;br /&gt;
&lt;br /&gt;
Files are selected using the repository file picker.&lt;br /&gt;
&lt;br /&gt;
=== Legacy file manager ===&lt;br /&gt;
&lt;br /&gt;
Available only for legacy reasons. It is not supposed to be used.&lt;br /&gt;
&lt;br /&gt;
All the contexts, file areas and files now form a single huge tree structure, although each user only has access to certain parts of that tree. The file manager (files/index.php) allow users to browse this tree, and manage files within it, according to the level of permissions they have.&lt;br /&gt;
&lt;br /&gt;
Single pane file manager is hard to implement without drag &amp;amp; drop which is notoriously problematic in web based applications. I propose to implement a two pane commander-style file manager. Two pane manager allows you to easily copy/move files between two different contexts (ex: courses).&lt;br /&gt;
&lt;br /&gt;
File manager must not interact directly with filesystem API, instead each module should return traversable tree of files and directories with both real and localised names (localised names are needed for dirs like backupdata).&lt;br /&gt;
&lt;br /&gt;
== Backwards compatibility ==&lt;br /&gt;
&lt;br /&gt;
=== Content backwards compatibility ===&lt;br /&gt;
&lt;br /&gt;
This should be preserved as much as possible. This will involve rewriting links in content during the upgrade to 2.0. &lt;br /&gt;
&lt;br /&gt;
Some new features (like resource sharing - if implemented) may not work with existing data that still uses files from course files area.&lt;br /&gt;
&lt;br /&gt;
There might be a breakage of links due to special characters stripping in uploaded files which will not match the links in uploaded html files any more. This should not be very common I hope.&lt;br /&gt;
&lt;br /&gt;
===Code backwards compatibility===&lt;br /&gt;
&lt;br /&gt;
Other Moodle code (for example plugins) will have to be converted to the new APIs. See [[Development:Using_the_file_API]] for guidance.&lt;br /&gt;
&lt;br /&gt;
It is not possible to provide backwards-compatibility here. For example, the old $CFG-&amp;gt;dataroot/$courseid/ will no longer exist, and there is no way to emulate that, so we won&#039;t try.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Upgrade and migration ==&lt;br /&gt;
&lt;br /&gt;
When a site is upgraded to Moodle 2.0, all the files in moodledata will have to be migrated. This is going to be a pain, like DML/DDL was :-(&lt;br /&gt;
&lt;br /&gt;
The upgrade process should be interruptible (like the Unicode upgrade was) so it can be stopped/restarted any time.&lt;br /&gt;
&lt;br /&gt;
=== Migration of content ===&lt;br /&gt;
&lt;br /&gt;
* resources - move files to new resource content file area; can be done automatically for pdf, image resources; definitely not accurate for uploaded web pages&lt;br /&gt;
* questions - image file moved to new area, image tag appended to questions&lt;br /&gt;
* moddata files - the easiest part, just move to new storage&lt;br /&gt;
* coursefiles - there might be many outdated files :-( :-(&lt;br /&gt;
* rss feeds links in readers - will be broken, the new security related code would break it anyway&lt;br /&gt;
&lt;br /&gt;
=== Moving files to files table and file pool ===&lt;br /&gt;
&lt;br /&gt;
The migration process must be interruptable because it might take a very long time. The files would be moved from old location, the restarting would be straightforward.&lt;br /&gt;
&lt;br /&gt;
Proposed stages:&lt;br /&gt;
#migration of all course files except moddata - finish marked by some $CFG-&amp;gt;files_migrated=true; - this step breaks the old file manager and html editor integration&lt;br /&gt;
#migration of blog attachments&lt;br /&gt;
#migration of question files&lt;br /&gt;
#migration of moddata files - each module is responsible to copy data from converted coursefiles or directly from moddata which is not converted automatically&lt;br /&gt;
&lt;br /&gt;
Some people use symbolic links in coursefiles - we must make sure that those will be copied to new storage in both places, though they can not be linked any more - anybody wanting to have content synced will need to move the files to some repository and set up the sync again.&lt;br /&gt;
&lt;br /&gt;
::Talked about a double task here, when migrating course files to module areas:&lt;br /&gt;
::# Parse html files to detect all the dependencies and move them together.&lt;br /&gt;
::# Fallback in pluginfile.php so, if something isn&#039;t found in module filearea, search for it in course filearea, copying it and finally, serving it.&lt;br /&gt;
&lt;br /&gt;
:: Also we talked about the possibility of add a new setting to resource in order to define if it should work against old coursefiles or new autocontained file areas. Migrated resources will point to old coursefiles while new ones will enforce autocontained file areas.&lt;br /&gt;
&lt;br /&gt;
:: it seems that only resource files will be really complex (because allow arbitrary HTML inclusion). The rest (labels, intros... doesn&#039;t) and should be easier to parse.&lt;br /&gt;
&lt;br /&gt;
::[[User:Eloy Lafuente (stronk7)|Eloy Lafuente (stronk7)]] 19:00, 29 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Other issues ==&lt;br /&gt;
&lt;br /&gt;
=== Unicode support in zip format ===&lt;br /&gt;
&lt;br /&gt;
Zip format is an old standard for compressing files. It was created long before Unicode existed, and Unicode support was only recently added. There are several ways used for encoding of non-ASCII characters in path names, but unfortunately it is not very standardised. Most Windows packers use DOS encoding.&lt;br /&gt;
&lt;br /&gt;
Client software:&lt;br /&gt;
* Windows built-in compression - bundled with Windows, non-standard DOS encoding only&lt;br /&gt;
* WinZip - shareware, Unicode option (since v11.2)&lt;br /&gt;
* TotalCommander - shareware, single byte(DOS) encoding only&lt;br /&gt;
* 7-Zip - free, Unicode or DOS encoding depending on characters used in file name (since v4.58beta)&lt;br /&gt;
* Info-ZIP - free, uses some weird character set conversions&lt;br /&gt;
&lt;br /&gt;
PHP extraction:&lt;br /&gt;
* Info-ZIP binary execution - no Unicode support at all, mangles character sets in file names (depends on OS, see docs), files must be copied to temp directory before compression and after extraction&lt;br /&gt;
* PclZip PHP library - reads single byte encoded names only, problems with random problems and higher memory usage.&lt;br /&gt;
* Zip PHP extension - kind of works in latest PHP versions&lt;br /&gt;
&lt;br /&gt;
Large file support:&lt;br /&gt;
PHP running under 32bit operating systems does not support files &amp;gt;2GB (do not expect fix before PHP 6). This might be a potential problem for larger backups.&lt;br /&gt;
&lt;br /&gt;
Tar Alternative:&lt;br /&gt;
* tar with gzip compression - easy to implement in PHP + zlib extension (PclTar, Tar from PEAR or custom code)&lt;br /&gt;
* no problem with unicode in *nix, Windows again expects DOS encoding :-(&lt;br /&gt;
* seems suitable for backup/restore - yay!&lt;br /&gt;
&lt;br /&gt;
Summary:&lt;br /&gt;
# added zip processing class that fully hides the underlying library&lt;br /&gt;
# using single byte encoding &amp;quot;garbage in/garbage out&amp;quot; approach for encoding of files in zip archives; add new &#039;zipencoding&#039; string into lang packs (ex: cp852 DOS charset for Czech locale) and use it during extraction (we might support true unicode later when PHP Zip extension does that)&lt;br /&gt;
&lt;br /&gt;
== Not implemented yet ==&lt;br /&gt;
* antivirus scanning - this needs a different api because the upload of files is now handled via repository plugins&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Development:Using the file API]]&lt;br /&gt;
* [[Development:Repository API]]&lt;br /&gt;
* [[Development:Portfolio API]]&lt;br /&gt;
* [[Development:Resource module file API migration]]&lt;br /&gt;
* MDL-14589 - File API Meta issue&lt;br /&gt;
&lt;br /&gt;
{{CategoryDeveloper}}&lt;br /&gt;
[[Category:Files]]&lt;br /&gt;
&lt;br /&gt;
[[ja:開発:ファイルAPI]]&lt;br /&gt;
[[ru:Development:File_API]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Development:Matrix_Question_Type_Specification&amp;diff=140834</id>
		<title>Development:Matrix Question Type Specification</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Development:Matrix_Question_Type_Specification&amp;diff=140834"/>
		<updated>2021-07-14T13:24:31Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Text replacement - &amp;quot;class=&amp;quot;nicetable&amp;quot;&amp;quot; to &amp;quot;class=&amp;quot;wikitable&amp;quot;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
I need to develop a n:n matching type of question that is suited to a matrix.&lt;br /&gt;
The teacher should be able to define the matrix and the various grading options.&lt;br /&gt;
&lt;br /&gt;
The follow serves as my very high level (mostly technical) specification.&lt;br /&gt;
&lt;br /&gt;
===Some examples===&lt;br /&gt;
&lt;br /&gt;
Here are three simple examples of the way this question type could be used. ( ) is mean to be a radio button. [ ] is a checkbox.&lt;br /&gt;
&lt;br /&gt;
-----&lt;br /&gt;
&lt;br /&gt;
Evaluate the following statements:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!  !! True !! False&lt;br /&gt;
|-&lt;br /&gt;
| Moodle is a learning management system || (*) || ( )&lt;br /&gt;
|-&lt;br /&gt;
| Mahara is an ePortfolio system || (*) || ( )&lt;br /&gt;
|-&lt;br /&gt;
| Moodle has no bugs || ( ) || (*)&lt;br /&gt;
|-&lt;br /&gt;
| This proposal is a good idea || (*) || ( )&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
-----&lt;br /&gt;
&lt;br /&gt;
Which colours are mixed on your computer&#039;s monitor to make each of the listed colours:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!  !! Red !! Green !! Blue&lt;br /&gt;
|-&lt;br /&gt;
| Red || [*] || [ ] || [ ]&lt;br /&gt;
|-&lt;br /&gt;
| Magenta || [*] || [ ] || [*]&lt;br /&gt;
|-&lt;br /&gt;
| Cyan || [ ] || [*] || [*]&lt;br /&gt;
|-&lt;br /&gt;
| Black || [ ] || [ ] || [ ]&lt;br /&gt;
|-&lt;br /&gt;
| White || [*] || [*] || [*]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
-----&lt;br /&gt;
&lt;br /&gt;
Match the adult to their young:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!  !! Tadpole !! Joey !! Foal !! Puppy&lt;br /&gt;
|-&lt;br /&gt;
| Poney || ( ) || ( ) || (*) || ( )&lt;br /&gt;
|-&lt;br /&gt;
| Frog || (*) || ( ) || ( ) || ( )&lt;br /&gt;
|-&lt;br /&gt;
| Kangaroo || ( ) || (*) || ( ) || ( )&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But the most useful example is probably the Likert Scale:&lt;br /&gt;
&lt;br /&gt;
How often do you do the following?&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!  !! Never !! Very rarely !! Rarely !! Occasionally !! Frequently !! Very Frequently&lt;br /&gt;
|-&lt;br /&gt;
| Brush your teeth || [] || [ ] || [ ] || [*] || [ ] || []&lt;br /&gt;
|-&lt;br /&gt;
| Cook your own dinner || [*] || [ ] || [] || [] || [ ] || []&lt;br /&gt;
|- &lt;br /&gt;
| Make your bed || [ ] || [] || [] || [] || [ ] || [*]&lt;br /&gt;
|-&lt;br /&gt;
| Dye your hair || [ ] || [ ] || [ ] || [*] || [ ] || []&lt;br /&gt;
|-&lt;br /&gt;
| Pick your nose || [] || [] || [*] || [] || [ ] || []&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Database Tables==&lt;br /&gt;
&lt;br /&gt;
===Question Definition Tables===&lt;br /&gt;
&lt;br /&gt;
====question_matrix====&lt;br /&gt;
Contains basic information about the matrix - what the grading method and&lt;br /&gt;
whether multiple checks per row are supported(eg checkboxes vs radio buttons)&lt;br /&gt;
The grading methods translate to:&lt;br /&gt;
&lt;br /&gt;
* ALL - the student must select ALL correct answers and get 100%, else 0%.&lt;br /&gt;
* ANY - the student must select at least one of the correct answers, and get 100% else 0%.&lt;br /&gt;
* WEIGHTED - each cell has a weighting from -100% to 100%.  The &amp;quot;correct&amp;quot; answers must add up to 100%, but the 0 and negative ones don&#039;t have any constraint on them.&lt;br /&gt;
* NONE - this could be used for example for Likert scales.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!field&lt;br /&gt;
!notes&lt;br /&gt;
|-&lt;br /&gt;
|id&lt;br /&gt;
|sequence&lt;br /&gt;
|-&lt;br /&gt;
|questionid&lt;br /&gt;
|fk to mdl_question &lt;br /&gt;
|-&lt;br /&gt;
|multiple&lt;br /&gt;
|boolean&lt;br /&gt;
|-&lt;br /&gt;
|grading&lt;br /&gt;
|(ALL or ANY of WEIGHTED or NONE) enum or fk to another table containing these values.&lt;br /&gt;
|-&lt;br /&gt;
|roundzero&lt;br /&gt;
|If the total for the question is less than 0, set it to 0. (This can be triggered by highly negative weights)&lt;br /&gt;
|-&lt;br /&gt;
|renderer&lt;br /&gt;
|&#039;matrix&#039; hardcoded at the moment (see implementation notes)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====question_matrix_cols====&lt;br /&gt;
Contains the definition of the matrix columns&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!field&lt;br /&gt;
!notes&lt;br /&gt;
|-&lt;br /&gt;
|id&lt;br /&gt;
|sequence&lt;br /&gt;
|-&lt;br /&gt;
|matrixid&lt;br /&gt;
|fk to question_matrix&lt;br /&gt;
|-&lt;br /&gt;
|shorttext&lt;br /&gt;
|short word to fit in&lt;br /&gt;
|-&lt;br /&gt;
|longtext&lt;br /&gt;
|title or hover or something&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====question_matrix_rows====&lt;br /&gt;
Contains the definition of the matrix rows&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!field&lt;br /&gt;
!notes&lt;br /&gt;
|-&lt;br /&gt;
|id&lt;br /&gt;
|sequence&lt;br /&gt;
|-&lt;br /&gt;
|matrixid&lt;br /&gt;
|fk to question_matrix&lt;br /&gt;
|-&lt;br /&gt;
|shorttext&lt;br /&gt;
|short word to fit in&lt;br /&gt;
|-&lt;br /&gt;
|longtext&lt;br /&gt;
|title or hover or something&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====question_matrix_weights====&lt;br /&gt;
Contains more information about how each cell should be graded.&lt;br /&gt;
EVERY cell should have an entry in this table.  When the grading method is&lt;br /&gt;
&#039;all&#039; or &#039;any&#039;, the &#039;correct&#039; answers will be stored here as a non-zero&lt;br /&gt;
percentage automatically and the non-correct answers will be zero.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!field&lt;br /&gt;
!notes&lt;br /&gt;
|-&lt;br /&gt;
|id&lt;br /&gt;
|sequence&lt;br /&gt;
|-&lt;br /&gt;
|rowid&lt;br /&gt;
|fk to question_matrix_rows&lt;br /&gt;
|-&lt;br /&gt;
|colid&lt;br /&gt;
|fk to question_matrix_cols&lt;br /&gt;
|-&lt;br /&gt;
|weight&lt;br /&gt;
|percentage value&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Student Answer Tables===&lt;br /&gt;
&lt;br /&gt;
====question_matrix_answers====&lt;br /&gt;
This table contains a list of all the cells that the student has selected.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!field&lt;br /&gt;
!notes&lt;br /&gt;
|-&lt;br /&gt;
|id&lt;br /&gt;
|sequence&lt;br /&gt;
|-&lt;br /&gt;
|rowid&lt;br /&gt;
|fk to question_matrix_rows&lt;br /&gt;
|-&lt;br /&gt;
|colid&lt;br /&gt;
|fk to question_matrix_cols&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Implementation notes==&lt;br /&gt;
&lt;br /&gt;
===Grading===&lt;br /&gt;
There should be classes to match the grading types (all or any or weighted) so&lt;br /&gt;
that new options could be written.&lt;br /&gt;
&lt;br /&gt;
===Renderers===&lt;br /&gt;
It may make sense for some point for some different method to be used to render&lt;br /&gt;
this to the user, so we can start with a matrix class and maybe add more later&lt;br /&gt;
if necessary.&lt;br /&gt;
&lt;br /&gt;
==Penny&#039;s TODO==&lt;br /&gt;
&lt;br /&gt;
* Find out about roundzero&lt;br /&gt;
* Find out about constant namespacing in qtypes.&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Development:Filter_enable/disable_by_context&amp;diff=140833</id>
		<title>Development:Filter enable/disable by context</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Development:Filter_enable/disable_by_context&amp;diff=140833"/>
		<updated>2021-07-14T13:24:30Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Text replacement - &amp;quot;class=&amp;quot;nicetable&amp;quot;&amp;quot; to &amp;quot;class=&amp;quot;wikitable&amp;quot;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Moodle 2.0}}&lt;br /&gt;
&lt;br /&gt;
We want to make configuration of filters more flexible, so, for example, you can do things like&lt;br /&gt;
* Disable the glossary auto-linking filter in a quiz.&lt;br /&gt;
* Enable the TeX filter only in the Maths course category.&lt;br /&gt;
* Have the glossary auto-linking filter link words from glossary A in forum A, and from glossary B in forum B.&lt;br /&gt;
&lt;br /&gt;
Please discuss this proposal in [http://moodle.org/mod/forum/discuss.php?d=118580 this General Developer Forum thread].&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
Most filter settings will still be controlled at the system level. Administrators will still choose which filters enabled for the whole site, and, more importantly, which ones are not available at all. Also, most filter settings (for example which media types for the multimedia filter, and the paths for the TeX filter) will also still be set globally for the whole site by the administrator.&lt;br /&gt;
&lt;br /&gt;
However, in addition to the overall on/off switch for each filter, we will store a separate active/inactive state for each filter in each context. (Don&#039;t worry, we don&#039;t actually store a row in the database for each context, mostly we use inheritance.) It will also be possible for a filter to have a settings screen for each context, and offer per-context settings, if it chooses to.&lt;br /&gt;
&lt;br /&gt;
This proposal relies on some of the proposed navigation changes for Moodle 2.0, to give us a place to add a new &#039;Text filtering&#039; setting link for each context.&lt;br /&gt;
&lt;br /&gt;
==Detailed design==&lt;br /&gt;
&lt;br /&gt;
===Changes to the filter admin screen===&lt;br /&gt;
&lt;br /&gt;
On Administration ► Plugins ► Filters ► Manage filters, the existing Disable/Enable column will be changed to a column called &#039;&#039;&#039;Enabled?&#039;&#039;&#039;. For each filter there will be a dropdown with three choices:&lt;br /&gt;
* &#039;&#039;&#039;Disabled&#039;&#039;&#039; - not used at all on this site.&lt;br /&gt;
* &#039;&#039;&#039;Off, but available&#039;&#039;&#039; - available for use, but not turned on in the system context.&lt;br /&gt;
* &#039;&#039;&#039;On&#039;&#039;&#039; - available, and on in the system context, and elsewhere by default.&lt;br /&gt;
&lt;br /&gt;
(A filter may need to be enabled, but not active globally, for example in the &amp;quot;TeX filter only in the maths course&amp;quot; use case.)&lt;br /&gt;
&lt;br /&gt;
We will also add a Delete column to this table, to let administrators delete all the related configuration from the database if they uninstall a plugin.&lt;br /&gt;
&lt;br /&gt;
====Add UI for $CFG-&amp;gt;stringfilters====&lt;br /&gt;
&lt;br /&gt;
At the moment, this setting is used in code, but there is no way to define it other than by writing directly to the config table in the database. We should add UI to it, probably at site level.&lt;br /&gt;
&lt;br /&gt;
UI mockup on MDL-7336. Note, we will set both $CFG-&amp;gt;filterallstrings and $CFG-&amp;gt;stringfilters from the Apply to dropdowns. There will be now way to override those locally, but $CFG-&amp;gt;stringfilters will be merged will the list of enabled filters in the context.&lt;br /&gt;
&lt;br /&gt;
===New settings page in each context===&lt;br /&gt;
&lt;br /&gt;
There will be a &amp;quot;Text filtering&amp;quot; settings page for each context (apart from block contexts), just like there are Assign roles and Override permissions pages.&lt;br /&gt;
&lt;br /&gt;
The page will have a title something like &amp;quot;Text filtering in Course: Maths 101&amp;quot;. It will contain a table with one row for each filter that the administrator has enabled. For each filter, there will be a drop-down with three choices: &#039;&#039;&#039;Default&#039;&#039;&#039;, &#039;&#039;&#039;On&#039;&#039;&#039; and &#039;&#039;&#039;Off&#039;&#039;&#039;. For the default choice, it will display the value that would be inherited in brackets, for example &amp;quot;Default (on)&amp;quot;. There will be a Save changes button at the bottom.&lt;br /&gt;
&lt;br /&gt;
[[Image:Per-context_filter_settings_page.png]]&lt;br /&gt;
&lt;br /&gt;
===Make possible per-filter settings page in each context===&lt;br /&gt;
&lt;br /&gt;
Filters may create a file filterlocal.php in their plugin folder, and define a function has_local_config() in their filter.php file that returns true, if they want to offer different configuration options in different contexts.&lt;br /&gt;
&lt;br /&gt;
This configuration is stored in in the filter_config table (see below).&lt;br /&gt;
&lt;br /&gt;
Filter configuration does not inherit, and even if a filter has local configuration, it must be able to operate (perhaps by just doing nothing, or doing something default) if the local configuration variables are not set in the database.&lt;br /&gt;
&lt;br /&gt;
(For example, the Glossary auto-linking filter might link to words from the course&#039;s primary glossary by default, but have a local settings page where a teacher can choose to link words from another glossary in this context.)&lt;br /&gt;
&lt;br /&gt;
===New capability moodle/filter:manage===&lt;br /&gt;
&lt;br /&gt;
Access to the global filter settings will still be controlled by moodle/site:config, becuase this is potentially risky.&lt;br /&gt;
&lt;br /&gt;
Access to local override settings will be controlled by a new setting moodle/filter:manage. This capability has no associated risks, assuming that the admin has been sensible.&lt;br /&gt;
&lt;br /&gt;
By default Administrators, Course creators and Teachers will have teh moodle/filter:manage capability.&lt;br /&gt;
&lt;br /&gt;
===New database table filter_active===&lt;br /&gt;
&lt;br /&gt;
This table replaces $CFG-&amp;gt;textfilters.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Column !! Type !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| id || INT(10) AUTO-INCREMENT || Unique id&lt;br /&gt;
|-&lt;br /&gt;
| filter || VARCHAR(32) || e.g. &#039;filter/tex&#039; or &#039;mod/glossary&#039;&lt;br /&gt;
|-&lt;br /&gt;
| contextid || INT(10) || Foreign key references context.id&lt;br /&gt;
|-&lt;br /&gt;
| active || INT(4) || 1 = active, -1 = inactive. As a special case, if contextid == $systemcontext-&amp;gt;id, then -9999 is used to mean that the administrator has disabled this filter.&lt;br /&gt;
|- &lt;br /&gt;
| sortorder || INT(10) || This is only used when contextid == $systemcontext-&amp;gt;id. It stores the filter sort-order, numbering from 1. In other contexts, this column should contain 0.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Whenever a context is deleted, we must delete the corresponding rows from this table.&lt;br /&gt;
&lt;br /&gt;
We will not delete data from here when a filter is disabled globally, so that if the administrator disables then re-enables the filter, the setting in all the different contexts are not lost.&lt;br /&gt;
&lt;br /&gt;
===New database table filter_config===&lt;br /&gt;
&lt;br /&gt;
This stores filter configuration, as a set of name-&amp;gt;value pairs, for each filter in each context. (By default, there will be 0 rows per filter per context.)&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Column !! Type !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| id || INT(10) AUTO-INCREMENT || Unique id&lt;br /&gt;
|-&lt;br /&gt;
| filter || VARCHAR(32) || e.g. &#039;filter/tex&#039; or &#039;mod/glossary&#039;&lt;br /&gt;
|-&lt;br /&gt;
| contextid || INT(10) || Foreign key references context.id&lt;br /&gt;
|-&lt;br /&gt;
| name || VARCHAR(255) || The name of a setting variable&lt;br /&gt;
|- &lt;br /&gt;
| value || TEXT || The corresponding value&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Whenever a context is deleted, we must delete the corresponding rows from this table.&lt;br /&gt;
&lt;br /&gt;
We will not delete data from here when a filter is disabled globally, so that if the administrator disables then re-enables the filter, the setting in all the different contexts are not lost.&lt;br /&gt;
&lt;br /&gt;
===Retrieving the active filters for a page===&lt;br /&gt;
&lt;br /&gt;
One of the Navigation 2.0 changes is that each page will be linked to a specific context. (That is, $PAGE-&amp;gt;context will always to set to something sensible.)&lt;br /&gt;
&lt;br /&gt;
Text will be filtered according to the page it appears on, not the context it belongs to. This is normally fine. For example, we want question text to be filtered according to the quiz that the question appears in.&lt;br /&gt;
&lt;br /&gt;
With that in mind, suppose $contextids is the list of ids of this context and all its parents. Then the list of active filters is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code sql&amp;gt;&lt;br /&gt;
SELECT f.filter&lt;br /&gt;
FROM filter_active f&lt;br /&gt;
JOIN context ctx ON f.contextid = ctx.id&lt;br /&gt;
WHERE ctx.id IN ($contextids)&lt;br /&gt;
GROUP BY filter&lt;br /&gt;
HAVING MAX(f.active * ctx.depth) &amp;gt; -MIN(f.active * ctx.depth)&lt;br /&gt;
ORDER BY MAX(f.sortorder)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Why does this work?====&lt;br /&gt;
&lt;br /&gt;
To understand what that query is doing, you need to look at the results of&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code sql&amp;gt;&lt;br /&gt;
SELECT f.filter, f.contextid, ctx.depth, f.active, ctx.depth * f.active AS active_x_depth, f.sortorder&lt;br /&gt;
FROM filter_active f&lt;br /&gt;
JOIN context ctx ON f.contextid = ctx.id&lt;br /&gt;
WHERE ctx.id IN ($contextids)&lt;br /&gt;
ORDER BY f.filter, ctx.depth&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That shows the data that is being aggregated by the GROUP BY and HAVING clauses. I will explain with reference to a specific example:&lt;br /&gt;
&lt;br /&gt;
Suppose we are in a Quiz in the Maths 101 course in the Maths category in the system. $contextids = 1,3,10,22 (order reversed relative to the previous sentence - system context first). Then suppose that the above query returns&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! filter !! contextid !! depth !! active !! active_x_depth !! f.sortorder&lt;br /&gt;
|-&lt;br /&gt;
| filter/mediaplugin ||  1 || 1 ||     1 ||     1 || 1&lt;br /&gt;
|-&lt;br /&gt;
| filter/multilang   ||  1 || 1 ||    -1 ||    -1 || 1&lt;br /&gt;
|-&lt;br /&gt;
| filter/tex         ||  1 || 1 ||    -1 ||    -1 || 3&lt;br /&gt;
|-&lt;br /&gt;
| filter/tex         ||  3 || 2 ||     1 ||     2 || 0&lt;br /&gt;
|-&lt;br /&gt;
| filter/tidy        ||  1 || 1 || -9999 || -9999 || 4&lt;br /&gt;
|-&lt;br /&gt;
| filter/tidy        || 22 || 4 ||     1 ||     4 || 0&lt;br /&gt;
|-&lt;br /&gt;
| mod/glossary       ||  1 || 1 ||     1 ||     1 || 2&lt;br /&gt;
|-&lt;br /&gt;
| mod/glossary       ||  3 || 2 ||    -1 ||    -2 || 0&lt;br /&gt;
|-&lt;br /&gt;
| mod/glossary       || 10 || 3 ||     1 ||     3 || 0&lt;br /&gt;
|-&lt;br /&gt;
| mod/glossary       || 22 || 4 ||    -1 ||    -4 || 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
; filter/mediaplugin&lt;br /&gt;
: This is enabled, and active globally, and there are no overrides.&lt;br /&gt;
:* MAX(f.active * ctx.depth) = 1&lt;br /&gt;
:* MIN(f.active * ctx.depth) = 1&lt;br /&gt;
: 1 &amp;gt; -1, so this filter will be returned by the get active filters query.&lt;br /&gt;
&lt;br /&gt;
; filter/multilang&lt;br /&gt;
: This is enabled, but not active globally, and there are no overrides.&lt;br /&gt;
:* MAX(f.active * ctx.depth) = -1&lt;br /&gt;
:* MIN(f.active * ctx.depth) = -1&lt;br /&gt;
: -1 ≯ 1, so this filter will &#039;&#039;&#039;not&#039;&#039;&#039; be returned by the get active filters query.&lt;br /&gt;
&lt;br /&gt;
; filter/tex&lt;br /&gt;
: This is enabled, but not active globally. However, it has been activated in the Maths category.&lt;br /&gt;
:* MAX(f.active * ctx.depth) = 2&lt;br /&gt;
:* MIN(f.active * ctx.depth) = -1&lt;br /&gt;
: 2 &amp;gt; 1, so this filter will be returned by the get active filters query.&lt;br /&gt;
&lt;br /&gt;
; filter/tidy&lt;br /&gt;
: This is &#039;&#039;&#039;not&#039;&#039;&#039; enabled, but there is an old override in the database&lt;br /&gt;
:* MAX(f.active * ctx.depth) = 4&lt;br /&gt;
:* MIN(f.active * ctx.depth) = -9999&lt;br /&gt;
: 4 ≯ 9999, so this filter will &#039;&#039;&#039;not&#039;&#039;&#039; be returned by the get active filters query.&lt;br /&gt;
&lt;br /&gt;
; filter/glossary&lt;br /&gt;
: A slightly silly example with the maximum number of overrides possible. The most specific override is the one that says that the filter is not active in the quiz.&lt;br /&gt;
:* MAX(f.active * ctx.depth) = 3&lt;br /&gt;
:* MIN(f.active * ctx.depth) = -4&lt;br /&gt;
: 3 ≯ 4, so this filter will &#039;&#039;&#039;not&#039;&#039;&#039; be returned by the get active filters query.&lt;br /&gt;
&lt;br /&gt;
; filter/myfilter&lt;br /&gt;
: What! there is no filter/myfilter in the data above. What is going on? This is the situation when the administrator has just installed the myfilter plugin, but has not yet been to the manage filters administration page to update the filter settings. What happens?&lt;br /&gt;
: Since there is nothing in the database, this filter is &#039;&#039;&#039;not&#039;&#039;&#039; returned by the get active filters query. That is, a newly installed filter is not active until the administrator explicitly activates it. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Sort order&#039;&#039;&#039;: Note that sortorder is zero except when contextid = 1. So MAX(f.sortorder) is just a clever trick to pull out the sortorder from the system context, ignoring all the zeros. There are other tricks that could be used instead, but this one is probably quite efficient.&lt;br /&gt;
&lt;br /&gt;
===Getting filter configuration===&lt;br /&gt;
&lt;br /&gt;
Actually, we will get the filter configuration in the same database query that we get the list of active filters. So the actual query used will be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code sql&amp;gt;&lt;br /&gt;
SELECT active.filter, fc.name, fc.value&lt;br /&gt;
FROM (SELECT f.filter&lt;br /&gt;
    FROM filter_active f&lt;br /&gt;
    JOIN context ctx ON f.contextid = ctx.id&lt;br /&gt;
    WHERE ctx.id IN ($contextids)&lt;br /&gt;
    GROUP BY filter&lt;br /&gt;
    HAVING MAX(f.active * ctx.depth) &amp;gt; -MIN(f.active * ctx.depth)&lt;br /&gt;
    ORDER BY MAX(f.sortorder)) active&lt;br /&gt;
LEFT JOIN filter_config fc ON fc.filter = active.filter AND fc.contextid = $contextid&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will be done in a function get_active_filters that looks like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
/**&lt;br /&gt;
 * Get the list of active filters, in the order that they should be used&lt;br /&gt;
 * for a particular context.&lt;br /&gt;
 *&lt;br /&gt;
 * @param object $context a context&lt;br /&gt;
 *&lt;br /&gt;
 * @return array an array where the keys are the filter names, for example&lt;br /&gt;
 *      &#039;filter/tex&#039; or &#039;mod/glossary&#039; and the values are any local&lt;br /&gt;
 *      configuration for that filter, as an array of name =&amp;gt; value pairs&lt;br /&gt;
 *      from the filter_config table. In a lot of cases, this will be an&lt;br /&gt;
 *      empty array. So, an example return value for this function might be&lt;br /&gt;
 *      array(&#039;filter/tex&#039; =&amp;gt; array(), &#039;mod/glossary&#039; =&amp;gt; array(&#039;glossaryid&#039;, 123))&lt;br /&gt;
 */&lt;br /&gt;
function get_active_filters($context) {&lt;br /&gt;
    // ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Changes to text caching===&lt;br /&gt;
&lt;br /&gt;
The md5key used in the cache_text table will be changed to user the contextid, rather than the courseid, in $hashstr. See format_text in weblib.php.&lt;br /&gt;
&lt;br /&gt;
===Backup and restore===&lt;br /&gt;
&lt;br /&gt;
This will be similar in some ways to the roles backup and restore code, in that it needs to do work for every context in the backup file.&lt;br /&gt;
&lt;br /&gt;
On backup (in lib/backuplib.php), everywhere it does write_role_overrides_xml and write_role_assignments_xml we need to add a call to a new function write_filter_actives_xml. (I think we need a write_context_data_xml function to avoid duplicating the calls to those three functions in lots of places.) That function can write XML like&lt;br /&gt;
&amp;lt;code xml&amp;gt;&lt;br /&gt;
&amp;lt;FILTERACTIVES&amp;gt;&lt;br /&gt;
    &amp;lt;FILTERACTIVE&amp;gt;&lt;br /&gt;
        &amp;lt;FILTER&amp;gt;filter/tex&amp;lt;/FILTER&amp;gt;&lt;br /&gt;
        &amp;lt;ACTIVE&amp;gt;+1&amp;lt;/ACTIVE&amp;gt;&lt;br /&gt;
    &amp;lt;FILTERACTIVE&amp;gt;&lt;br /&gt;
    &amp;lt;FILTERACTIVE&amp;gt;&lt;br /&gt;
        &amp;lt;FILTER&amp;gt;mod/glossary&amp;lt;/FILTER&amp;gt;&lt;br /&gt;
        &amp;lt;ACTIVE&amp;gt;-1&amp;lt;/ACTIVE&amp;gt;                &lt;br /&gt;
    &amp;lt;FILTERACTIVE&amp;gt;&lt;br /&gt;
&amp;lt;/FILTERACTIVES&amp;gt;&lt;br /&gt;
&amp;lt;FILTERCONFIGS&amp;gt;&lt;br /&gt;
    &amp;lt;FILTERCONFIG&amp;gt;&lt;br /&gt;
        &amp;lt;FILTER&amp;gt;filter/tex&amp;lt;/FILTER&amp;gt;&lt;br /&gt;
        &amp;lt;NAME&amp;gt;glossaryid&amp;lt;/NAME&amp;gt;&lt;br /&gt;
        &amp;lt;VALUE&amp;gt;123&amp;lt;/VALUE&amp;gt;&lt;br /&gt;
    &amp;lt;FILTERCONFIG&amp;gt;&lt;br /&gt;
&amp;lt;FILTERCONFIGS&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the function restore_execute in backup/restorelib.php, probably just after the bit that calls restore_roles_settings, add a call to restore_filter_actives. This needs to read each FILTERACTIVE record from the backup file, check whether the corresponding filters in installed on this Moodle site, and if it is, write the record to the filter_active table using the recoded contextid.&lt;br /&gt;
&lt;br /&gt;
==Possible problems==&lt;br /&gt;
&lt;br /&gt;
===Is filtering by page context really the right thing?===&lt;br /&gt;
&lt;br /&gt;
Filtering according to page context might cause strange results on pages that aggregate content from different contexts. &lt;br /&gt;
&lt;br /&gt;
For example, we normally think that the user&#039;s profile page is in the user context. That would mean that the Recent activity report there will be filtered according to the filter settings for the user context. (These will almost certainly inherit unmodified from the System context.) That would be strange if the TeX filter was only enabled in the Maths course. However, it may work better (both here and elsewhere) if we set $PAGE-&amp;gt;context to the course context for profile pages like this.&lt;br /&gt;
&lt;br /&gt;
On the other hand, if the parent looking at their child&#039;s recent activity does not have access to the course, it is good that they do not see the effects of the glossary auto-linking filter, which would like them to glossary entries they do not have permission to see.&lt;br /&gt;
&lt;br /&gt;
The real problem page, would, of course, be the My Moodle page. That could aggregate content from any number of different contexts.&lt;br /&gt;
&lt;br /&gt;
Or, we may find that we have to add a $contextid parameter to the format_text function, and find some way to avoid the performance problems that causes. (It would be really bad to query the database with a query like the one above for each call to format_text. Or even for each context that contributes content to the My Moodle page.)&lt;br /&gt;
&lt;br /&gt;
At the moment, the plan is to ignore this problem. This proposal adds a significant new functionality, and this one problem does not stop it from being very useful in most cases.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [[Development:Navigation_2.0]]&lt;br /&gt;
* MDL-7336&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=118580 this General Developer Forum thread].&lt;br /&gt;
* [[Development:Filters]] - the documentation that will need to be updated.&lt;br /&gt;
&lt;br /&gt;
{{CategoryDeveloper}}&lt;br /&gt;
[[Category:Filter]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Using_TeX_Notation&amp;diff=140832</id>
		<title>Using TeX Notation</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Using_TeX_Notation&amp;diff=140832"/>
		<updated>2021-07-14T13:24:23Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Text replacement - &amp;quot;class=&amp;quot;nicetable&amp;quot;&amp;quot; to &amp;quot;class=&amp;quot;wikitable&amp;quot;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Filters}}&lt;br /&gt;
{{Work in progress}}&lt;br /&gt;
TeX (&#039;&#039;&#039;/&#039;tɛx/tekh&#039;&#039;&#039;, often pronounced TeK in English)  is a very widespread and popular way of representing Mathematics notation using only characters that you can type on a keyboard (see [https://en.wikipedia.org/wiki/TeX Wikipedia]).  This makes it a useful format to use in Moodle, since it can be entered anywhere you can type text, from forum posts to quiz questions.&lt;br /&gt;
&lt;br /&gt;
TeX expressions can be entered in multiple ways:&lt;br /&gt;
* typing them directly into texts.&lt;br /&gt;
* using the Java-based Dragmath editor in Moodle&#039;s TinyMCE editor.&lt;br /&gt;
* using the HTML-based equation editor in Moodle&#039;s Atto editor (since Moodle 2.7).&lt;br /&gt;
&lt;br /&gt;
Afterwards, TeX expressions are rendered into Mathematics notation:&lt;br /&gt;
* using the TeX filter in Moodle, which uses a TeX binary installed on the server to convert expressions into .gif images (or if that is not available, it falls back to a simple built-in mimetex binary).&lt;br /&gt;
* using the [[MathJax_filter]] which identifies TeX expressions and uses the Mathjax JS library to render them in browsers at display time (since Moodle 2.7).&lt;br /&gt;
* using other third-party solutions.&lt;br /&gt;
&lt;br /&gt;
As you can imagine, the whole field is not as simple as we would like, especially because there are many flavours of TeX and slight variations between tools.&lt;br /&gt;
&lt;br /&gt;
This page focusses only on using TeX in core Moodle.  See the links at the bottom of this page for more information on setting up TeX editors and filters, including other tools from the Moodle community that may be suitable for advanced users.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WARNING:&#039;&#039;&#039; This Wiki environment uses a DIFFERENT TeX renderer to Moodle, especially when it comes to control sequences.  For this reason images are sometimes used to represent what it should look like in Moodle.   YMMV.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Language Conventions== &lt;br /&gt;
&lt;br /&gt;
To identify a TeX sequence in your text, surround it with $$ markers. To invoke a particular command or control sequence, use the backslash, \. A typical control sequence looks like: &lt;br /&gt;
&lt;br /&gt;
  $$ x\ =\ \frac{\sqrt{144}}{2}\ \times\ (y\ +\ 12) $$  &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| [[Image: cfmimetex10.gif|frame|center]]&lt;br /&gt;
|-&lt;br /&gt;
|Fraction and square root.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Additional spaces can be placed into the equation using the \ without a trailing character.&lt;br /&gt;
&lt;br /&gt;
==Equation displayed on its own line== &lt;br /&gt;
When an equation is surrounded by a pair of  $$ markers, it is displayed centered on its own line. The $$’s are primitive TeX markers. With LaTeX, it is often recommended to use the pair \[ and \] to enclose equations, rather than the $$ markers, because the newer syntax checks for mistyped equations and better adjusts vertical spacing. If the TeX Notation filter is activated, which set a LaTeX renderer, the same equation as above is obtained with the following control sequence:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;span style=&amp;quot;background-color:yellow;&amp;quot;&amp;gt;\[&amp;lt;/span&amp;gt; x\ =\ \frac{\sqrt{144}}{2}\ \times\ (y\ +\ 12) &amp;lt;span style=&amp;quot;background-color:yellow;&amp;quot;&amp;gt;\]&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, if the equation is mistyped, it will be displayed enclosed in a box to signal the mistake and if the equation appears in a new paragraph, the vertical space above the equation will adjust correctly.&lt;br /&gt;
&lt;br /&gt;
Using \[ … \] instead of $$ … $$ may have other advantages. For example, with the Wiris equation editor installed, the Atto editor undesirably transforms the TeX code of equations enclosed with $$ into XML code, whereas it does not do so when the equations are enclosed with \[ and \].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Equation displayed within text== &lt;br /&gt;
With the TeX notation filter activated, an equation is displayed within the text when it is surrounded by the pair \( and \). For example, the following:&lt;br /&gt;
&lt;br /&gt;
  The point &amp;lt;span style=&amp;quot;background-color:yellow;&amp;quot;&amp;gt;\(&amp;lt;/span&amp;gt; \left( {{x}_{0}}+\frac{1}{p\left( {{x}_{0}} \right)}\ ,\ \frac{q\left( {{x}_{0}} \right)}{p\left( {{x}_{0}} \right)} \right) &amp;lt;span style=&amp;quot;background-color:yellow;&amp;quot;&amp;gt;\)&amp;lt;/span&amp;gt; is located...&lt;br /&gt;
&lt;br /&gt;
will display as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:TeXEquationWithinText.png|320px]]&lt;br /&gt;
&lt;br /&gt;
Note that the single $ marks may not work for this purpose.&lt;br /&gt;
&lt;br /&gt;
==Reserved Characters and Keywords==&lt;br /&gt;
&lt;br /&gt;
Most characters and numbers on the keyboard can be used at their default value. As with any computing language, though, there are a set of reserved characters and keywords that are used by the program for its own purposes. TeX Notation is no different, but it does have a very small set of Reserved Characters. This will not be a complete list of reserved characters, but some of these are: &lt;br /&gt;
&lt;br /&gt;
  @ # $ % ^ &amp;amp; * ( ) . &lt;br /&gt;
&lt;br /&gt;
To use these characters in an equation just place the \ in front of them like \$ or \%. If you want to use the backslash, just use \backslash. The only exception here seems to be the &amp;amp;, ampersand. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Superscripts, Subscripts and Roots==&lt;br /&gt;
&lt;br /&gt;
Superscripts are recorded using the caret, ^, symbol. An example for a Maths class might be: &lt;br /&gt;
&lt;br /&gt;
  $$ 4^2 \ \times \ 4^3 \ = 4^5 $$&lt;br /&gt;
  This is a shorthand way of saying: &lt;br /&gt;
  (4 x 4) x (4 x 4 x 4) = (4 x 4 x 4 x 4 x 4)&lt;br /&gt;
  or&lt;br /&gt;
  16 x 64 = 1024.&lt;br /&gt;
  &lt;br /&gt;
  &amp;lt;math&amp;gt;4^2 \ \times \ 4^3 \ = 4^5&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Subscripts are similar, but use the underscore character. &lt;br /&gt;
&lt;br /&gt;
  $$ 3x_2 \ \times \ 2x_3 $$&lt;br /&gt;
  &lt;br /&gt;
  &amp;lt;math&amp;gt;3x_2 \ \times \ 2x_3&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is OK if you want superscripts or subscripts, but square roots are a little different. This uses a control sequence. &lt;br /&gt;
&lt;br /&gt;
  $$ \sqrt{64} \ = \ 8 $$&lt;br /&gt;
  &lt;br /&gt;
  &amp;lt;math&amp;gt;\sqrt{64} \ = \ 8&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also take this a little further, but adding in a control character. You may ask a question like: &lt;br /&gt;
&lt;br /&gt;
  $$ If \ \sqrt[n]{1024} \ = \ 4, \ what \ is \ the \ value \ of \ n? $$  &lt;br /&gt;
  &lt;br /&gt;
  &amp;lt;math&amp;gt;If \ \sqrt[n]{1024} \ = \ 4, \ what \ is \ the \ value \ of \ n?&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Using these different commands allows you to develop equations like: &lt;br /&gt;
&lt;br /&gt;
  $$ The \sqrt{64} \ \times \ 2 \ \times \ 4^3 \ = \ 1024 $$&lt;br /&gt;
  &lt;br /&gt;
  &amp;lt;math&amp;gt;The \sqrt{64} \ \times \ 2 \ \times \ 4^3 \ = \ 1024&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Superscripts, Subscripts and roots can also be noted in [[Using TeX Notation 4 | Matrices]].&lt;br /&gt;
&lt;br /&gt;
==Fractions==&lt;br /&gt;
&lt;br /&gt;
Fractions in TeX are actually simple, as long as you remember the rules.&lt;br /&gt;
&lt;br /&gt;
  $$ \frac{numerator}{denominator} $$ which produces &amp;lt;math&amp;gt;\frac{numerator}{denominator}&amp;lt;/math&amp;gt; .&lt;br /&gt;
&lt;br /&gt;
This can be given as:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;math&amp;gt;\frac{5}{10} \ is \ equal \ to \ \frac{1}{2}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This is entered as:&lt;br /&gt;
&lt;br /&gt;
  $$ \frac{5}{10} \ is \ equal \ to \ \frac{1}{2}.$$&lt;br /&gt;
&lt;br /&gt;
With fractions (as with other commands) the curly brackets can be nested so that for example you can implement negative exponents in fractions.  As you can see,&lt;br /&gt;
	&lt;br /&gt;
  $$\frac {5^{-2}}{3}$$ will produce &amp;lt;math&amp;gt;\frac {5^{-2}}{3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  $$\left(\frac{3}{4}\right)^{-3}$$ will produce &amp;lt;math&amp;gt;\left(\frac{3}{4}\right)^{-3}&amp;lt;/math&amp;gt;  and&lt;br /&gt;
&lt;br /&gt;
  $$\frac{3}{4^{-3}}$$ will produce &amp;lt;math&amp;gt; \frac{3}{4^{-3}} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  You likely do not want to use $$\frac{3}{4}^{-3}$$ as it produces &amp;lt;math&amp;gt;\frac{3}{4}^{-3}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use fractions and negative exponents in [[Using TeX Notation 4 | Matrices]].&lt;br /&gt;
&lt;br /&gt;
==Brackets==&lt;br /&gt;
&lt;br /&gt;
As students advance through Maths, they come into contact with brackets. Algebraic notation depends heavily on brackets. The usual keyboard values of ( and ) are useful, for example:&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;math&amp;gt;d = 2 \ \times \ (4 \ - \ j)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is written as:&lt;br /&gt;
&lt;br /&gt;
  $$ d = 2 \ \times \ (4 \ - \ j) $$&lt;br /&gt;
&lt;br /&gt;
Usually, these brackets are enough for most formulae but they will not be in some circumstances. Consider this:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;math&amp;gt;4x^3 \ + \ (x \ + \ \frac{42}{1 + x^4})&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Is OK, but try it this way:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;math&amp;gt;4x^3 \ + \ \left(x \ + \ \frac{42}{1 + x^4}\right)&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
This can be achieved by:&lt;br /&gt;
&lt;br /&gt;
  $$ 4x^3 \ + \ \left(x \ + \ \frac{42}{1 + x^4}\right) $$&lt;br /&gt;
&lt;br /&gt;
A simple change using the \left( and \right) symbols instead. Note the actual bracket is both named and presented. Brackets are almost essential in [[Using TeX Notation 4 | Matrices]].&lt;br /&gt;
&lt;br /&gt;
==Ellipsis==&lt;br /&gt;
&lt;br /&gt;
The Ellipsis is a simple code:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;math&amp;gt;x_1, \ x_2, \ \ldots, \ x_n&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Written like:&lt;br /&gt;
&lt;br /&gt;
  $$ x_1, \ x_2, \ \ldots, \ x_n  $$&lt;br /&gt;
&lt;br /&gt;
A more practical application could be:&lt;br /&gt;
&lt;br /&gt;
Question:&lt;br /&gt;
  &amp;quot;Add together all the numbers from 1 &amp;lt;math&amp;gt;\ldots&amp;lt;/math&amp;gt; 38.&lt;br /&gt;
  What is an elegant and simple solution to this problem?&lt;br /&gt;
  Can you create an algebraic function to explain this solution?&lt;br /&gt;
  Will your solution work for all numbers?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Answer:&lt;br /&gt;
The question uses an even number to demonstrate a mathematical process and generate an algebraic formula.&lt;br /&gt;
&lt;br /&gt;
{| class = &amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Part 1:&lt;br /&gt;
| Part 2.&lt;br /&gt;
| Part 3.&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
&amp;lt;math&amp;gt;1. \ 1 \ + \ 38 \ = \ 39&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;2. \ 2 \ + \ 37 \ = \ 39&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;3. \ 3 \ + \ 36 \ = \ 39&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\ldots&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;19. 19 \ + \ 20 \ = \ 39 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\therefore x \ = \ 39 \ \times \ 19 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\therefore x \ = \ 741 &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|An algebraic function might read something like:&lt;br /&gt;
&amp;lt;math&amp;gt;t = (1 + n) \times n/2 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where t = total and n = the last number.&lt;br /&gt;
&lt;br /&gt;
|The solution is that, using the largest and the smallest numbers, the numbers are added and then multiplied by the number of different combinations to produce the same result adding the first and last numbers.&lt;br /&gt;
The answer must depend on the number, &amp;lt;math&amp;gt;\frac{n}{2}&amp;lt;/math&amp;gt; being a whole number. Therefore, the solution will not work for an odd range of numbers, only an even range.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Symbols==&lt;br /&gt;
&lt;br /&gt;
These are not all the symbols that may be available in TeX Notation for Moodle, just the ones that I have found to work in Moodle.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
| \amalg &lt;br /&gt;
| &amp;lt;math&amp;gt;\amalg&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \cup&lt;br /&gt;
| &amp;lt;math&amp;gt;\cup&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \oplus&lt;br /&gt;
| &amp;lt;math&amp;gt;\oplus&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \times&lt;br /&gt;
| &amp;lt;math&amp;gt;\times&amp;lt;/math&amp;gt;   &lt;br /&gt;
|-&lt;br /&gt;
|\ast&lt;br /&gt;
|&amp;lt;math&amp;gt;\ast&amp;lt;/math&amp;gt;  &lt;br /&gt;
|\dagger&lt;br /&gt;
|&amp;lt;math&amp;gt;\dagger&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \oslash&lt;br /&gt;
| &amp;lt;math&amp;gt;\oslash&amp;lt;/math&amp;gt;   &lt;br /&gt;
| \triangleleft&lt;br /&gt;
| &amp;lt;math&amp;gt;\triangleleft&amp;lt;/math&amp;gt;   &lt;br /&gt;
|-&lt;br /&gt;
| \bigcirc&lt;br /&gt;
| &amp;lt;math&amp;gt;\bigcirc&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \ddagger&lt;br /&gt;
| &amp;lt;math&amp;gt;\ddagger&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \otimes&lt;br /&gt;
| &amp;lt;math&amp;gt;\otimes&amp;lt;/math&amp;gt;   &lt;br /&gt;
| \triangleright&lt;br /&gt;
| &amp;lt;math&amp;gt;\triangleright&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| \bigtriangledown&lt;br /&gt;
| &amp;lt;math&amp;gt;\bigtriangledown&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \diamond&lt;br /&gt;
| &amp;lt;math&amp;gt;\diamond&amp;lt;/math&amp;gt;   &lt;br /&gt;
| \pm&lt;br /&gt;
| &amp;lt;math&amp;gt;\pm&amp;lt;/math&amp;gt;  	&lt;br /&gt;
| \odot&lt;br /&gt;
| &amp;lt;math&amp;gt;\odot&amp;lt;/math&amp;gt;   &lt;br /&gt;
|- &lt;br /&gt;
| \bigtriangleup&lt;br /&gt;
| &amp;lt;math&amp;gt;\bigtriangleup&amp;lt;/math&amp;gt;   &lt;br /&gt;
| \div&lt;br /&gt;
| &amp;lt;math&amp;gt;\div&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \ominus&lt;br /&gt;
| &amp;lt;math&amp;gt;\ominus&amp;lt;/math&amp;gt;   &lt;br /&gt;
| \wr&lt;br /&gt;
| &amp;lt;math&amp;gt;\wr&amp;lt;/math&amp;gt;   &lt;br /&gt;
|-&lt;br /&gt;
| \circ&lt;br /&gt;
| &amp;lt;math&amp;gt;\circ&amp;lt;/math&amp;gt;   &lt;br /&gt;
| \wedge&lt;br /&gt;
| &amp;lt;math&amp;gt;\wedge&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \vee&lt;br /&gt;
| &amp;lt;math&amp;gt;\vee&amp;lt;/math&amp;gt;   &lt;br /&gt;
| \sqcup&lt;br /&gt;
| &amp;lt;math&amp;gt;\sqcup&amp;lt;/math&amp;gt;  &lt;br /&gt;
|- &lt;br /&gt;
| \leq&lt;br /&gt;
| &amp;lt;math&amp;gt;\leq&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \geq&lt;br /&gt;
| &amp;lt;math&amp;gt;\geq&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \equiv&lt;br /&gt;
| &amp;lt;math&amp;gt;\equiv&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \prec&lt;br /&gt;
| &amp;lt;math&amp;gt;\prec&amp;lt;/math&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| \succ&lt;br /&gt;
| &amp;lt;math&amp;gt;\succ&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \sim&lt;br /&gt;
| &amp;lt;math&amp;gt;\sim&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \perp&lt;br /&gt;
| &amp;lt;math&amp;gt;\perp&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \preceq&lt;br /&gt;
| &amp;lt;math&amp;gt;\preceq&amp;lt;/math&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| \succeq&lt;br /&gt;
| &amp;lt;math&amp;gt;\succeq&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \simeq&lt;br /&gt;
| &amp;lt;math&amp;gt;\simeq&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \mid&lt;br /&gt;
| &amp;lt;math&amp;gt;\mid&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \ll&lt;br /&gt;
| &amp;lt;math&amp;gt;\ll&amp;lt;/math&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| \gg &lt;br /&gt;
| &amp;lt;math&amp;gt;\gg&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \asymp&lt;br /&gt;
| &amp;lt;math&amp;gt;\asymp&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \parallel&lt;br /&gt;
| &amp;lt;math&amp;gt;\parallel&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \subset&lt;br /&gt;
| &amp;lt;math&amp;gt;\subset&amp;lt;/math&amp;gt;  &lt;br /&gt;
|- &lt;br /&gt;
| \supset&lt;br /&gt;
| &amp;lt;math&amp;gt;\supset&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \subseteq&lt;br /&gt;
| &amp;lt;math&amp;gt;\subseteq&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \supseteq&lt;br /&gt;
| &amp;lt;math&amp;gt;\supseteq&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \approx&lt;br /&gt;
| &amp;lt;math&amp;gt;\approx&amp;lt;/math&amp;gt;  &lt;br /&gt;
|- &lt;br /&gt;
| \neq&lt;br /&gt;
| &amp;lt;math&amp;gt;\neq&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \ni&lt;br /&gt;
| &amp;lt;math&amp;gt;\ni&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \notin&lt;br /&gt;
| &amp;lt;math&amp;gt;\notin&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \in&lt;br /&gt;
| &amp;lt;math&amp;gt;\ni&amp;lt;/math&amp;gt;  &lt;br /&gt;
|- &lt;br /&gt;
| \vdash&lt;br /&gt;
| &amp;lt;math&amp;gt;\vdash&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \dashv&lt;br /&gt;
| &amp;lt;math&amp;gt;\dashv&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \bullet&lt;br /&gt;
| &amp;lt;math&amp;gt;\bullet&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \cdot&lt;br /&gt;
| &amp;lt;math&amp;gt;\cdot&amp;lt;/math&amp;gt;  &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Arrows==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| \leftarrow	&lt;br /&gt;
| &amp;lt;math&amp;gt; \leftarrow&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \longleftarrow&lt;br /&gt;
| &amp;lt;math&amp;gt; \longleftarrow&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \Leftarrow&lt;br /&gt;
| &amp;lt;math&amp;gt; \Leftarrow&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \Longleftarrow&lt;br /&gt;
| &amp;lt;math&amp;gt; \Longleftarrow&amp;lt;/math&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| \rightarrow&lt;br /&gt;
| &amp;lt;math&amp;gt; \rightarrow&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \longrightarrow&lt;br /&gt;
| &amp;lt;math&amp;gt; \longrightarrow&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \Rightarrow&lt;br /&gt;
| &amp;lt;math&amp;gt; \Rightarrow&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \Longrightarrow&lt;br /&gt;
| &amp;lt;math&amp;gt; \Longrightarrow&amp;lt;/math&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| \uparrow&lt;br /&gt;
| &amp;lt;math&amp;gt; \uparrow&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \Uparrow&lt;br /&gt;
| &amp;lt;math&amp;gt; \Uparrow&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \downarrow&lt;br /&gt;
| &amp;lt;math&amp;gt; \downarrow&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \Downarrow&lt;br /&gt;
| &amp;lt;math&amp;gt; \Downarrow&amp;lt;/math&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| \leftrightarrow&lt;br /&gt;
| &amp;lt;math&amp;gt; \leftrightarrow&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \longleftrightarrow&lt;br /&gt;
| &amp;lt;math&amp;gt; \longleftrightarrow&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \updownarrow&lt;br /&gt;
| &amp;lt;math&amp;gt; \updownarrow&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \Updownarrow&lt;br /&gt;
| &amp;lt;math&amp;gt; \Updownarrow&amp;lt;/math&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| \Leftrightarrow&lt;br /&gt;
| &amp;lt;math&amp;gt; \Leftrightarrow&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \Longleftrightarrow&lt;br /&gt;
| &amp;lt;math&amp;gt; \Longleftrightarrow&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \leftrightharpoons&lt;br /&gt;
| &amp;lt;math&amp;gt; \rightleftharpoons&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \Im&lt;br /&gt;
| &amp;lt;math&amp;gt; \Im&amp;lt;/math&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| \nearrow&lt;br /&gt;
| &amp;lt;math&amp;gt; \nearrow&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \nwarrow&lt;br /&gt;
| &amp;lt;math&amp;gt; \nwarrow&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \swarrow&lt;br /&gt;
| &amp;lt;math&amp;gt; \swarrow&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \searrow&lt;br /&gt;
| &amp;lt;math&amp;gt; \searrow&amp;lt;/math&amp;gt;    &lt;br /&gt;
  &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Delimiters and Maths Constructs==&lt;br /&gt;
&lt;br /&gt;
NOTE: Most delimiters and constructs need additional parameters for them to appear appropriately.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| \{x&lt;br /&gt;
| &amp;lt;math&amp;gt; \{x &amp;lt;/math&amp;gt;  &lt;br /&gt;
| x | \}&lt;br /&gt;
| &amp;lt;math&amp;gt;x | \} &amp;lt;/math&amp;gt;  &lt;br /&gt;
| \rangle&lt;br /&gt;
| &amp;lt;math&amp;gt; \rangle &amp;lt;/math&amp;gt;  &lt;br /&gt;
| \langle&lt;br /&gt;
| &amp;lt;math&amp;gt; \langle &amp;lt;/math&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| \angle&lt;br /&gt;
| &amp;lt;math&amp;gt; \angle &amp;lt;/math&amp;gt;  &lt;br /&gt;
| \=&lt;br /&gt;
| &amp;lt;math&amp;gt; \| &amp;lt;/math&amp;gt;  &lt;br /&gt;
| \sqrt{ab}&lt;br /&gt;
| &amp;lt;math&amp;gt; \sqrt{ab}&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \sqrt[n]{ab}&lt;br /&gt;
| &amp;lt;math&amp;gt; \sqrt[n]{ab}&amp;lt;/math&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| \frac{ab}{cd}&lt;br /&gt;
| &amp;lt;math&amp;gt; \frac{ab}{cd}&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \backslash&lt;br /&gt;
| &amp;lt;math&amp;gt; \backslash&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \widehat{ab}&lt;br /&gt;
| &amp;lt;math&amp;gt; \widehat{ab}&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \$&lt;br /&gt;
| &amp;lt;math&amp;gt; \$ &amp;lt;/math&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| \overline{ab}&lt;br /&gt;
| &amp;lt;math&amp;gt; \overline{ab}&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \underline{ab}&lt;br /&gt;
| &amp;lt;math&amp;gt; \underline{ab}&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \therefore&lt;br /&gt;
| &amp;lt;math&amp;gt; \therefore&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \ddots&lt;br /&gt;
| &amp;lt;math&amp;gt; \ddots&amp;lt;/math&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| \%&lt;br /&gt;
| &amp;lt;math&amp;gt; \%&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \#&lt;br /&gt;
| &amp;lt;math&amp;gt; \# &amp;lt;/math&amp;gt;  &lt;br /&gt;
| \vdots&lt;br /&gt;
| &amp;lt;math&amp;gt; \vdots&amp;lt;/math&amp;gt;  &lt;br /&gt;
| \emptyset&lt;br /&gt;
| &amp;lt;math&amp;gt; \emptyset&amp;lt;/math&amp;gt;  &lt;br /&gt;
|}&lt;br /&gt;
WARNINGS: The &amp;amp; character in LaTeX usually requires a backslash, \. In TeX Notation for Moodle, apparently, it does not. Other packages, AsciiMath, may use it differently again so be careful using it. The copyright character may use the MimeTeX charset, and produces a copyright notice for John Forkosh Associates who provided a lot of the essential packages for the TeX Notation for Moodle, so I understand. I have been, almost reliably, informed that a particular instruction will produce a different notice though .:)    &lt;br /&gt;
&lt;br /&gt;
There are also a number of characters that can be used in TeX Notation for Moodle but do not render in this page:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| [[Image: cfmimetex08.png|frame|left]] &lt;br /&gt;
| Larger \left(x and \right) brackets&lt;br /&gt;
|-&lt;br /&gt;
|[[Image: cfmimetex06.gif|frame|left]]&lt;br /&gt;
| \widetilde{ab}&lt;br /&gt;
|-&lt;br /&gt;
|[[Image: cfmimetex09.gif|frame|left]]&lt;br /&gt;
| \textdegree or (50)^\circ&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Greek Letters==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
| &amp;lt;math&amp;gt;\alpha&amp;lt;/math&amp;gt;&lt;br /&gt;
| \alpha  	&lt;br /&gt;
| &amp;lt;math&amp;gt;\beta&amp;lt;/math&amp;gt;&lt;br /&gt;
| \beta  	&lt;br /&gt;
| &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt;&lt;br /&gt;
| \gamma &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\delta&amp;lt;/math&amp;gt;&lt;br /&gt;
| \delta  	&lt;br /&gt;
| &amp;lt;math&amp;gt;\epsilon&amp;lt;/math&amp;gt;&lt;br /&gt;
| \epsilon &lt;br /&gt;
| &amp;lt;math&amp;gt;\zeta&amp;lt;/math&amp;gt;&lt;br /&gt;
| \zeta &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\eta&amp;lt;/math&amp;gt;&lt;br /&gt;
| \eta &lt;br /&gt;
| &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;&lt;br /&gt;
| \theta &lt;br /&gt;
| &amp;lt;math&amp;gt;\iota&amp;lt;/math&amp;gt;&lt;br /&gt;
| \iota &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\kappa&amp;lt;/math&amp;gt;&lt;br /&gt;
| \kappa &lt;br /&gt;
| &amp;lt;math&amp;gt;\lambda&amp;lt;/math&amp;gt;&lt;br /&gt;
| \lambda &lt;br /&gt;
| &amp;lt;math&amp;gt;\mu&amp;lt;/math&amp;gt;&lt;br /&gt;
| \mu &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\xi&amp;lt;/math&amp;gt;&lt;br /&gt;
| \xi &lt;br /&gt;
| &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt;&lt;br /&gt;
| \pi &lt;br /&gt;
| &amp;lt;math&amp;gt;\rho&amp;lt;/math&amp;gt;&lt;br /&gt;
| \rho &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
| \sigma &lt;br /&gt;
| &amp;lt;math&amp;gt;\tau&amp;lt;/math&amp;gt;&lt;br /&gt;
| \tau &lt;br /&gt;
| &amp;lt;math&amp;gt;\upsilon&amp;lt;/math&amp;gt;&lt;br /&gt;
| \upsilon &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt;&lt;br /&gt;
| \phi &lt;br /&gt;
| &amp;lt;math&amp;gt;\chi&amp;lt;/math&amp;gt;&lt;br /&gt;
| \chi &lt;br /&gt;
| &amp;lt;math&amp;gt;\psi&amp;lt;/math&amp;gt;&lt;br /&gt;
| \psi&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\omega&amp;lt;/math&amp;gt;&lt;br /&gt;
| \omega  	&lt;br /&gt;
| &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;&lt;br /&gt;
| \Omega  	&lt;br /&gt;
| &amp;lt;math&amp;gt;\Theta&amp;lt;/math&amp;gt;&lt;br /&gt;
| \Theta&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Delta&amp;lt;/math&amp;gt;&lt;br /&gt;
| \Delta  	&lt;br /&gt;
| &amp;lt;math&amp;gt;\Pi&amp;lt;/math&amp;gt;&lt;br /&gt;
| \Pi  	&lt;br /&gt;
| &amp;lt;math&amp;gt;\Phi&amp;lt;/math&amp;gt;&lt;br /&gt;
| \Phi&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Gamma &amp;lt;/math&amp;gt;&lt;br /&gt;
| \Gamma&lt;br /&gt;
| &amp;lt;math&amp;gt;\Lambda  &amp;lt;/math&amp;gt;&lt;br /&gt;
| \Lambda  &lt;br /&gt;
| &amp;lt;math&amp;gt;\Sigma  &amp;lt;/math&amp;gt;&lt;br /&gt;
| \Sigma  &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Psi &amp;lt;/math&amp;gt;&lt;br /&gt;
| \Psi&lt;br /&gt;
| &amp;lt;math&amp;gt;\Xi &amp;lt;/math&amp;gt;&lt;br /&gt;
| \Xi&lt;br /&gt;
| &amp;lt;math&amp;gt;\Upsilon&amp;lt;/math&amp;gt;&lt;br /&gt;
| \Upsilon&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\vartheta &amp;lt;/math&amp;gt;&lt;br /&gt;
| \vartheta&lt;br /&gt;
| &amp;lt;math&amp;gt;\varrho  &amp;lt;/math&amp;gt;&lt;br /&gt;
| \varrho&lt;br /&gt;
| &amp;lt;math&amp;gt;\varphi &amp;lt;/math&amp;gt;&lt;br /&gt;
| \varphi &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\varsigma &amp;lt;/math&amp;gt;&lt;br /&gt;
| \varsigma&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notable Exceptions&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Greek letter omicron (traditionally, mathemeticians don&#039;t make much use of omicron due to possible confusion with zero). Simply put, lowercase omicron is an &amp;quot;o&amp;quot; redered as &amp;lt;i&amp;gt;o&amp;lt;/i&amp;gt;. But note \omicron may now work with recent TeX implementations including MathJax.&lt;br /&gt;
&lt;br /&gt;
At the time of writing, these Greek capital letters cannot be rendered by TeX Notation in Moodle: &lt;br /&gt;
&lt;br /&gt;
Alpha, Beta, Zeta, Eta, Tau, Chi, Mu, Iota, Kappa and Epsilon.&lt;br /&gt;
&lt;br /&gt;
TeX methematics adopts the convention that lowercase Greek symbols are displayed as italics whereas uppercase Greek symbols are displayed as upright characters. Therefore, the missing Greek capital letters can simply be represented by the \mathrm{ } equivalent &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathrm{A, B, Z, H, T, X, M, I, K, E}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Boolean algebra==&lt;br /&gt;
&lt;br /&gt;
There are a number of different conventions for representing Boolean (logic) algebra. Common conventions used in computer science and electronics are detailed below:&lt;br /&gt;
&lt;br /&gt;
Negation, NOT, ¬, !, ~, &amp;lt;sup&amp;gt;−&amp;lt;/sup&amp;gt;&lt;br /&gt;
 \lnot, !, \sim, \overline{ }&lt;br /&gt;
Conjunction, AND, ∧, &amp;lt;math&amp;gt;\cdot&amp;lt;/math&amp;gt;&lt;br /&gt;
 \land, \wedge, \cdot&lt;br /&gt;
Dysjunction, OR, ∨, +, &lt;br /&gt;
 \lor, \vee, +&lt;br /&gt;
Exclusive dysjunction, XOR ⊻, ⊕&lt;br /&gt;
 \veebar, \oplus&lt;br /&gt;
Equivalence, If and only if, Iff, ≡, ↔, ⇔&lt;br /&gt;
  \equiv, \leftrightarrow \iff&lt;br /&gt;
&lt;br /&gt;
Example: two representations of De Morgan&#039;s laws:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;A \cdot B = \overline{\overline{A} + \overline{B}}&amp;lt;/math&amp;gt;&lt;br /&gt;
 $$ A \cdot B = \overline{\overline{A} + \overline{B}} SS&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;(A \land B) \equiv \lnot(\lnot{A} \lor \lnot{B})&amp;lt;/math&amp;gt;&lt;br /&gt;
 $$ (A \land B) \equiv \lnot(\lnot{A} \lor \lnot{B}) $$&lt;br /&gt;
&lt;br /&gt;
==Fonts==&lt;br /&gt;
&lt;br /&gt;
To use a particular font you need to access the font using the same syntax as demonstrated above.&lt;br /&gt;
&lt;br /&gt;
A math calligraphic font:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathcal{ABCDEFGHIJKLMNOPQRSTUVXYZ}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
$$ \mathcal{ABCDEFGHIJKLMNOPQRSTUVXYZ}$$&lt;br /&gt;
&lt;br /&gt;
Blackboard bold, a Castellar type font:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathbb{ABCDEFGHIJKLMNOPQRSTUVXYZ}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
$$ \mathbb{ABCDEFGHIJKLMNOPQRSTUVXYZ}$$&lt;br /&gt;
&lt;br /&gt;
Often used in number theory. For example: &amp;lt;math&amp;gt;\mathbb{N}&amp;lt;/math&amp;gt; = set of natural numbers including 0 {0, 1, 2, 3, ...}, &amp;lt;math&amp;gt;\mathbb{Z}&amp;lt;/math&amp;gt; = set of integers {-..., -3, -2, -1, 0, 1, 2, 3, ... }, &amp;lt;math&amp;gt;\mathbb{Q}&amp;lt;/math&amp;gt; = set of rational numbers, including integers, &amp;lt;math&amp;gt;\mathbb{R}&amp;lt;/math&amp;gt; = set of real numbers, which includes the natural numbers, rational numbers and irrational numbers.&lt;br /&gt;
&lt;br /&gt;
Fraktur, an Old English type font:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathfrak{ABCDEFGHIJKLMNOPQRSTUVXYZ}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
$$ \mathfrak{ABCDEFGHIJKLMNOPQRSTUVXYZ}$$&lt;br /&gt;
&lt;br /&gt;
This is different in Tex Notation in Moodle than it is for other, full, TeX packages. &lt;br /&gt;
&lt;br /&gt;
An italic font:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathit{ABCDEFGHIJKLMNOPQRSTUVXYZ}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
$$ \mathit{ABCDEFGHIJKLMNOPQRSTUVXYZ} $$&lt;br /&gt;
&lt;br /&gt;
A normal, upright non-italic, Roman font:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathrm{ABCDEFGHIJKLMNOPQRSTUVXYZ}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
$$ \mathrm{ABCDEFGHIJKLMNOPQRSTUVXYZ} $$&lt;br /&gt;
A bold-face font:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathbf{ABCDEFGHIJKLMNOPQRSTUVXYZ}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
$$ \mathbf{ABCDEFGHIJKLMNOPQRSTUVXYZ} $$&lt;br /&gt;
&lt;br /&gt;
==Size of displays==&lt;br /&gt;
&lt;br /&gt;
The default size is rendered slightly larger than normal font size. TeX Notation in Moodle uses eight different sizes ranging from &amp;quot;tiny&amp;quot; to &amp;quot;huge&amp;quot;. However,these values seem to mean different things and are, I suspect, dependent upon the User&#039;s screen resolution. The sizes can be noted in four different ways: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| \fontsize{0} to \fontsize{7}&lt;br /&gt;
| $$\fontsize{2} x \ = \ \frac{\sqrt{144}}{2} \ \times \ (y \ + \ 12)$$&lt;br /&gt;
| [[Image:cfmimetex10.gif|left]]&lt;br /&gt;
|-&lt;br /&gt;
| \fs{0} to \fs{7}&lt;br /&gt;
| $$\fs{4} x \ = \ \frac{\sqrt{144}}{2} \ \times \ (y \ + \ 12)$$&lt;br /&gt;
| [[Image:cfmimetex10.gif|left]]&lt;br /&gt;
|-&lt;br /&gt;
| \fs0 to \fs7&lt;br /&gt;
| $$\fs6 x \ = \ \frac{\sqrt{144}}{2} \ \times \ (y \ + \ 12)$$&lt;br /&gt;
| [[Image:cfmimetex11c.gif|left]]&lt;br /&gt;
|-&lt;br /&gt;
| As well, you can use \tiny \small &lt;br /&gt;
\normalsize \large \Large &lt;br /&gt;
\LARGE \huge \Huge&lt;br /&gt;
| $$\normalsize x \ = \ \frac{\sqrt{144}}{2} \ \times \ (y \ + \ 12)$$&lt;br /&gt;
| [[Image:cfmimetex11d.gif|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
It appears that TeX Notation in Moodle now allows \fs6, \fs7, \huge and \Huge to be properly rendered.&lt;br /&gt;
&lt;br /&gt;
==Colour==&lt;br /&gt;
&lt;br /&gt;
Unlike many scripting languages, we only need to name the colour we want to use. You may have to experiment a little with colours, but it will make for a brighter page. Once named, the entire statement will appear in the colour, and if you mix colours, the last named colour will dominate. Some examples: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| $$ \red x \ = \ \frac{\sqrt{144}}{2} \ \times \ (y \ + \ 12) $$&lt;br /&gt;
| [[Image: cfmimetex30a.gif|right]] &lt;br /&gt;
|-&lt;br /&gt;
| $$ \blue x \ = \ \frac{\sqrt{144}}{2} \ \times \ (y \ + \ 12) $$&lt;br /&gt;
| [[Image: cfmimetex30b.gif|right]]&lt;br /&gt;
|-&lt;br /&gt;
| $$ \green x \ = \ \frac{\sqrt{144}}{2} \ \times \ (y \ + \ 12) $$&lt;br /&gt;
| [[Image: cfmimetex30c.gif|right]]&lt;br /&gt;
|-&lt;br /&gt;
| $$ \red x \ = \ \frac{\sqrt{144}}{2}$$ $$ \times $$ &lt;br /&gt;
$$\green (y \ + \ 12) $$ $$ \ = $$ $$ \ \blue 6^3 $$ &lt;br /&gt;
| [[Image: cfmimetex30d.gif|right]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Moodle 2.2 note: You may find this doesn&#039;t work for you. You can try to add &amp;quot;\usepackage{color}&amp;quot; to your tex notation setting &amp;quot;LaTeX preamble&amp;quot; (under Site adminstration/Plugins/Filters/TeX notation)and then use this new syntax: $$ \color{red} x \ = \ \frac{\sqrt{144}}{2} \ \times \ (y \ + \ 12) $$&lt;br /&gt;
&lt;br /&gt;
You may note this last one, it is considerably more complex than the previous for colours. TeX Notation in Windows does not allow multicoloured equations, if you name a number of colours in the equation, only the last named will be used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Geometric Shapes== &lt;br /&gt;
&lt;br /&gt;
There are two ways to produce geometric shapes, one is with circles and the other is with lines. Each take a bit of practice to get right, but they can provide some simple geometry. It may be easier to produce the shapes in Illustrator or Paint Shop Pro or any one of a number of other drawing packages and use them to illustrate your lessons, but sometimes, some simple diagrams in Moodle will do a better job.&lt;br /&gt;
&lt;br /&gt;
==Circles==&lt;br /&gt;
&lt;br /&gt;
Circles are easy to make. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| [[Image:cfmimetex20.gif|left]]&lt;br /&gt;
| Circles are easily created, and only needs a number to determine how large the circle is. &lt;br /&gt;
To create the circle use $$ \circle(150) $$. This makes a circle of 150 pixels in diameter. &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Creating Arcs==&lt;br /&gt;
&lt;br /&gt;
Arcs are also easy to produce, but require some additional parameters. The same code structure used in circles create the basic shape, but the inclusion of a start and end point creates only the arc. However, notice where the 0 point is, not at the true North, but rather the East and run in an anti-clockwise direction. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| [[Image:cfmimetex21a.gif|left]]&lt;br /&gt;
| $$ \circle(120;90,180)$$&lt;br /&gt;
| [[Image:cfmimetex21b.gif|left]]&lt;br /&gt;
| $$ \circle(120;0,90)$$&lt;br /&gt;
|-&lt;br /&gt;
| [[Image:cfmimetex21c.gif|left]]&lt;br /&gt;
| $$ \circle(120;180,270)$$&lt;br /&gt;
| [[Image:cfmimetex21d.gif|left]]&lt;br /&gt;
| $$ \circle(120;270,360)$$&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This structure breaks down into the \circle command followed by the diameter, not the radius, of the circle, followed by a semi-colon, then the demarcation of the arc, the nomination of the start and end points in degrees from the 0, East, start point. Note that the canvas is the size of the diameter nominated by the circle&#039;s parameters.&lt;br /&gt;
&lt;br /&gt;
==The \picture Command==&lt;br /&gt;
&lt;br /&gt;
Using circles and arcs as shown above is somewhat limiting. The \picture command allows you to use a frame in which to build a picture of many layers. Each part of the picture though needs to be in its own space, and while this frame allows you to be creative, to a degree, there are some very hard and fast rules about using it. &lt;br /&gt;
&lt;br /&gt;
All elements of a picture need to be located within the picture frame. Unexpected results occur when parts of an arc, for example, runs over the border of the frame. (This is particularly true of lines, which we will get to next, and the consequences of that overstepping of the border can cause serious problems.)&lt;br /&gt;
&lt;br /&gt;
The \picture command is structured like:&lt;br /&gt;
   \picture(100){(50,50){\circle(200)}}&lt;br /&gt;
   \command(size of frame){(x co-ordinate, y co-ordinate){\shape to draw(size or x co-ordinate, y co-ordinate)})  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; The brace is used to enclose each set of required starting point coordinates. Inside each set of braces, another set of braces is used to isolate each set of coordinates from the other, and those coordinates use their proper brackets and backslash. Count the opening and closing brackets, be careful of the position,       &lt;br /&gt;
  &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| [[Image:cfmimetex24a.gif|left]]&lt;br /&gt;
| $$ \picture(100){(50,50){\circle(200)}}&amp;amp;&amp;amp;&lt;br /&gt;
&lt;br /&gt;
The picture frame brings elements together that you may not otherwise see.&lt;br /&gt;
&lt;br /&gt;
Because of the frame size of 100px and the centre point of the circle in the mid-point of the frame, the 200px circle will be squashed. Unexpected results occur when sizes are not correct.&lt;br /&gt;
| [[Image:cfmimetex24b.gif|left]]&lt;br /&gt;
|&lt;br /&gt;
Using the picture frame, you can layer circles &lt;br /&gt;
and lines over each other, or they can intersect.&lt;br /&gt;
&lt;br /&gt;
$$ \picture(100){(50,50){\circle(99)} (50,50){\circle(80)}} $$&lt;br /&gt;
|-&lt;br /&gt;
| [[Image:cfmimetex24c.gif|left]]&lt;br /&gt;
| You may want to see an image of a circle with a dot in the middle. &lt;br /&gt;
You may have to try to place the centre dot correctly , but the &lt;br /&gt;
ordering of the elements in the image may have an impact.&lt;br /&gt;
&lt;br /&gt;
$$ \picture(100){(48,46){\bullet}(50,50){\circle(99)}} $$ &lt;br /&gt;
| [[Image:cfmimetex24d.gif|left]]&lt;br /&gt;
| Using the same ideas as above, you can make semi-circles.&lt;br /&gt;
&lt;br /&gt;
$$\picture(150){(50,50){\circle(100;0,180)}(100,50){\circle(100;180,360)}}$$&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Lines==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning:&#039;&#039;&#039; Drawing lines in TeX Notation in Moodle is an issue, go to the [[Using_TeX_Notation#Reserved_Characters_and_Keywords| Using Text Notation]] for more information. If the line is not noted properly then the parser will try to correctly draw the line but will not successfully complete it. This means that every image that needs be drawn will be drawn until it hits the error. When the error is being converted, it fails, so no subsequent image is drawn. Be careful and make sure your line works BEFORE you move to the next problem or next image. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| [[Image: cfmimetex26.gif|frame|left| a couple of lines]] &lt;br /&gt;
| $$\red \picture(200){(20,0){ \line(180,0)}{(20,180){\line(180,0}$$ &lt;br /&gt;
 &lt;br /&gt;
The structure of the picture box is that the \picture(200) provides a square image template.&lt;br /&gt;
&lt;br /&gt;
The (20,0) provides the starting coordinates for any line that comes after. In this case the start point is at 20pixels in the x axis and 0 pixels in the y axis. The starting point for all coordinates, 0,0, is the bottom left corner and they run in a clockwise manner. &#039;&#039;&#039;Do not confuse this with arcs.&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
The \line(180,0) determines the length and inclination of the line. In this case, the inclination is 0 and the length is 180px. &lt;br /&gt;
&lt;br /&gt;
These are enclosed in braces, all inside one set of braces owned by the \picture() control sequence.&lt;br /&gt;
&lt;br /&gt;
The next set of commands are the same, that is, the (20,200) are the coordinates of the next line. The x co-ordinate is the 20, that is the distance to the right from the 0 point. The y co-ordinates is the distance from the bottom of the image. Whereas the first line started and ran on the bottom of the picture frame, the y co-ordinate starts at the 200 pixel mark from the bottom of the image. The line, at 180 pixels long and has no y slope. This creates a spread pair of parallel lines.     &lt;br /&gt;
| [[Image: cfmimtex27.gif|thumb|right|150px|\picture explained]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
While this explains the structure of a line, there is a couple of elements that you need to go through to do more with them.&lt;br /&gt;
&lt;br /&gt;
==Squares and Rectangles==&lt;br /&gt;
Drawing squares and rectangles is similar, but only slightly different. &lt;br /&gt;
&lt;br /&gt;
There should be a square box tool, and there is, but unless it has something inside it, it does not display. It is actually easier to make a square using the \line command.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| [[Image: line03.gif|left]]&lt;br /&gt;
|This box is constructed using:&lt;br /&gt;
$$ \picture(250){(10,10){\line(0,230)}(10,10){\line(230,0)}(240,10){\line(0,230)}(10,240){\line(230,0)}}$$&lt;br /&gt;
It is a 250 pixel square box with a 230 pixel square inside it.&lt;br /&gt;
| [[Image: line04.gif|left]]&lt;br /&gt;
|This box is different in that is has the equal length indicators that are used in a square.&lt;br /&gt;
$$ \picture(250){(10,10){\line(0,230)}&lt;br /&gt;
(5,120){\line(10,0)}&lt;br /&gt;
(10,10){\line(230,0)}&lt;br /&gt;
(120,5){\line(0,10)}&lt;br /&gt;
(240,10){\line(0,230)}&lt;br /&gt;
(235,120){\line(10,0)}&lt;br /&gt;
(10,240){\line(230,0)}&lt;br /&gt;
(120,235){\line(0,10)}}$$&lt;br /&gt;
|-&lt;br /&gt;
| [[Image: line05.gif|left]]&lt;br /&gt;
| The rectangle then becomes the same thing, but with one side shorter. For a portrait canvas it would be:&lt;br /&gt;
$$ \picture(250){(10,10){\line(0,230)}(10,10){\line(150,0)}(160,10){\line(0,230)}(10,240){\line(150,0)}}$$&lt;br /&gt;
| [[Image: line06.gif|left]]&lt;br /&gt;
|The rectangle can also produce a landscape shape:&lt;br /&gt;
$$ \picture(250){(10,10){\line(0,160)}(10,10){\line(230,0)}(240,10){\line(0,160)}(10,170){\line(230,0)}}$$&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Controlling Angles==&lt;br /&gt;
&lt;br /&gt;
Controlling angles is a little different. They involve a different perception, but not one that is unfamiliar. Consider this:&lt;br /&gt;
&lt;br /&gt;
We have a point from which we want to draw a line that is on an angle. The notation used at this point can be positive, positive or positive, negative or negative, positive or negative, negative. Think of it like a number plane or a graph, using directed numbers. The 0,0 point is in the centre, and we have four quadrants around it that give us one of the previously mentioned results.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;4&amp;quot;|[[Image:co-ordquadrants.png|left]]&lt;br /&gt;
| [[Image:line06a.gif|left]] $$\picture(100){(50,50){\line(40,45)}}$$, &lt;br /&gt;
a positive x and positive y&lt;br /&gt;
|-&lt;br /&gt;
| [[Image:line06b.gif|left]]$$\picture(100){(50,50){\line(-40,45)}}$$&lt;br /&gt;
a negative x and positive y&lt;br /&gt;
|-&lt;br /&gt;
| [[Image:line06c.gif|left]]$$\picture(100){(50,50){\line(-40,-45)}}$$&lt;br /&gt;
a negative x and negative y&lt;br /&gt;
|-&lt;br /&gt;
| [[Image:line06d.gif|left]]$$\picture(100){(50,50){\line(40,-45)}}$$&lt;br /&gt;
a positive x and a negative y&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Essentially, what these points boil down to is that anything above the insertion point is a positive on the y axis, anything below is a negative. Anything to the left of the insertion point is a negative while everything to the right is a positive. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|[[Image:line06e.gif|left]]&lt;br /&gt;
| $$\picture(100){(50,50){\line(40,45)}(50,50){\line(-40,45)}(50,50){\line(-40,-45)}(50,50){\line(40,-45)}}$$&lt;br /&gt;
&lt;br /&gt;
The co-ordinate alignment process in TeX is not that good that you can use one set of co-ords as a single starting point for all lines. The layering of each object varies because of the position of the previous object, so each object needs to be exactly placed.&lt;br /&gt;
&lt;br /&gt;
This co-ord structure has a great deal of impact on intersecting lines, parallel lines and triangles. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Intersecting Lines==&lt;br /&gt;
&lt;br /&gt;
You can set up an intersecting pair easily enough, using the \picture control sequence.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| [[Image:cfmimetex31.gif|left]]&lt;br /&gt;
| $$ \picture(200){(10,0){\line(150,150)} (0,130){\line(180,-180)}} $$&lt;br /&gt;
&lt;br /&gt;
The lines that are drawn can be labeled.&lt;br /&gt;
&lt;br /&gt;
$$ \picture(200){(10,0){\line(150,150)}(0,130){\line(180,-180)}&lt;br /&gt;
(0,10){A}(0,135){B}(140,0){C}(140,150){D}(62,80){X}} $$ &lt;br /&gt;
&lt;br /&gt;
To produce another image.&lt;br /&gt;
| [[Image:cfmimetex32.gif|right]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;3&amp;quot; style=&amp;quot;text-align: center;&amp;quot;| To which you may want to ask the question: &lt;br /&gt;
$$The \ \angle \ of \ AXB \ is \ 72\textdegree. \ What \ is \ the \ value \ of \ \angle BXD? $$&lt;br /&gt;
 [[Image: cfmimetex32a.gif|center]] &lt;br /&gt;
&lt;br /&gt;
NOTE: Labeling this image, above-right, turned out to be fairly simple. Offsetting points by a few pixels at the start or end points of the lines proved a successful strategy. The X point proved a little more problematic, and took a number of adjustments before getting it right. Experience here will help.&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot;| With labels the drawing can become a little more like your traditional geometric drawing, but the devil is in the details. The parallel markers need to be placed properly, and that is where experience really comes into it. On lines that are vertical or horizontal, you can get away with using the &amp;gt; or &amp;lt; directly from the keyboard, or the &amp;lt;math&amp;gt;\gg&amp;lt;/math&amp;gt;  or &amp;lt;math&amp;gt;\ll&amp;lt;/math&amp;gt;  symbols. In either case, you need to position them properly.&lt;br /&gt;
&lt;br /&gt;
The code:&lt;br /&gt;
$$\picture(200){(15,45){\line(170,0)} (15,30){c}(170,28){d}(15,160){\line(170,0)}(15,145){e}(180,143){f}(50,20){\line(110,175)}(58,20){a}(140,185){b}(42,32){\kappa}(53,48){\beta}&lt;br /&gt;
(150,165){\kappa}&lt;br /&gt;
(90,38){\gg}(80,153){\gg}&lt;br /&gt;
}$$&lt;br /&gt;
| [[Image:line10.gif|right]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Lines and Arcs==&lt;br /&gt;
&lt;br /&gt;
Combining lines and arcs is a serious challenge actually, on a number of levels. For example lets take an arc from the first page on circles.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| [[Image: cfmimetex21a.gif|left]]&lt;br /&gt;
| Fairly innocuous of itself, but when we start to add in elements, it changes dramatically.&lt;br /&gt;
&lt;br /&gt;
$$ \circle(120;90,180) $$&lt;br /&gt;
|-&lt;br /&gt;
| [[Image: line12.gif|left]]&lt;br /&gt;
| $$\picture(150){(75,75){\circle(120;90,180)}(75,75){\line(-70,0)}(75,75){\line(0,75)}} $$&lt;br /&gt;
All elements in this drawing start in the same place. Each is layered, and properly placed on the canvas, and using the same co-ord to start makes it easy to control them. No matter the size of the arc, intersecting lines can all be drawn using the centre co-ords of the arc. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Triangles == &lt;br /&gt;
&lt;br /&gt;
Of all the drawing objects, it is actually triangles that present the most challenge. For example:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| [[Image:line13.gif|left]]&lt;br /&gt;
$$\picture(350){(10,10){\line(0,320)}(10,330){\line(330,0)}(10,10){\line(330,320)}}$$&lt;br /&gt;
|This is a simple triangle, one that allows us to establish a simple set of rules for the sides. The vertical always has an x=0 co-ord and the horizontal always has a y=0 co-ord.&lt;br /&gt;
&lt;br /&gt;
In this case with an x value of 330 on the horizontal, and a y value of 320 on the vertical, the hypotenuse should then have a value of x=340, and the y=330, but not so, they actually have an x=330 and a y=320.&lt;br /&gt;
&lt;br /&gt;
There is no need to add the starting point co-ords to the x and y values of the line.&lt;br /&gt;
| [[Image:line14.gif|right]]&lt;br /&gt;
$$picture(350){(10,10){\line(330,0)}(340,10){\line(0,320)}(340,330){\line(-330,-320)}}$$ &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This triangle has been developed for a Trigonometry page - but the additional notation should provide insight into how you can use it. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| [[Image:line16.gif|left]]&lt;br /&gt;
| This is a labeled image, but it has an \fbox in it with its little line. With some effort, it could be replaced with two intersecting short lines.&lt;br /&gt;
$$\picture(350,150){(25,25){\line(300,0)}(325,25){\line(0,110)}(25,25){\line(300,110)}(309,25){\fbox{\line(5,5)}}&lt;br /&gt;
(307,98){\theta}(135,75){\beta}(150,5){\alpha}(335,75){\epsilon}}$$ &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| The triangle shows like: &lt;br /&gt;
[[Image:trig01.gif|left]]&lt;br /&gt;
|We use the different elements of the triangle to identify those things we need to know about a right-angled triangle. &lt;br /&gt;
&lt;br /&gt;
The hypotenuse is always the side that is opposite the right angle. The longest side is always the Hypotenuse. &lt;br /&gt;
&lt;br /&gt;
To identify the other elements of the triangle we look for the sign &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. &amp;lt;math&amp;gt;\Theta&amp;lt;/math&amp;gt; is the starting point for naming the other sides. &lt;br /&gt;
&lt;br /&gt;
The side that is opposite &amp;lt;math&amp;gt;\angle \theta&amp;lt;/math&amp;gt; is known as the Opposite. &lt;br /&gt;
&lt;br /&gt;
The side that lies alongside &amp;lt;math&amp;gt;\angle \theta&amp;lt;/math&amp;gt; is known as the Adjacent side. &lt;br /&gt;
&lt;br /&gt;
To determine which is which, draw a line that bisects &amp;lt;math&amp;gt;\angle \theta&amp;lt;/math&amp;gt; and whatever line it crosses is the Opposite side. &lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot;| The code:&lt;br /&gt;
$$ \picture(350,250){(25,25){\line(300,0)}(25,25){\line(0,220)}(25,245){\line(300,-220)}(310,25){\circle(100;135,180)}(20,100){\line(310,-75)} (25,25){\fbox{\line(5,5)}}(25,25){\line(150,150)}(165,140){Hypotenuse}(120,2){Adjacent}(2,80){\rotatebox{90}{Opposite}}(270,40){\theta}}$$&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Matrices=&lt;br /&gt;
A Matrix is a rectangular array of numbers arranged in rows and columns which can be used to organize numeric information. Matrices can be used to predict trends and outcomes in real situations - i.e. polling.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==A Matrix==&lt;br /&gt;
A matrix can be written and displayed like [[Image: matrices03.gif|A matrix]]&lt;br /&gt;
&lt;br /&gt;
In this case the matrix is constructed using the brackets before creating the array:&lt;br /&gt;
  $$ M = \left[\begin{array}{ccc} a&amp;amp;b&amp;amp;1 \\ c&amp;amp;d&amp;amp;2 \\ e&amp;amp;f&amp;amp;3\end{array}\right] $$&lt;br /&gt;
The internal structure of the array is generated by the &amp;amp;, ampersand, and the double backslash.&lt;br /&gt;
&lt;br /&gt;
You can also create a grid for the matrix.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|A dashed line&lt;br /&gt;
|A solid line&lt;br /&gt;
|A mixed line&lt;br /&gt;
|-&lt;br /&gt;
|[[Image: matrices04.gif]] 	&lt;br /&gt;
|[[Image: matrices05.gif]]	&lt;br /&gt;
|[[Image: matrices06.gif]]&lt;br /&gt;
|-&lt;br /&gt;
|$$ M = \left[\begin{array}&#039;&#039;&#039;{c.c.c}&#039;&#039;&#039; a&amp;amp;b&amp;amp;1 \ &#039;&#039;&#039;\hdash&#039;&#039;&#039; c&amp;amp;d&amp;amp;2 \ &#039;&#039;&#039;\hdash&#039;&#039;&#039; e&amp;amp;f&amp;amp;3\end{array}\right] $$ 	&lt;br /&gt;
|$$ M = \left[\begin{array}&#039;&#039;&#039;{c|c|c}&#039;&#039;&#039; a&amp;amp;b&amp;amp;1 \ &#039;&#039;&#039;\hline&#039;&#039;&#039; c&amp;amp;d&amp;amp;2 \ &#039;&#039;&#039;\hline&#039;&#039;&#039; e&amp;amp;f&amp;amp;3\end{array}\right] $$ 	&lt;br /&gt;
|$$ M = \left[\begin{array}&#039;&#039;&#039;{c.c|c}&#039;&#039;&#039; a&amp;amp;b&amp;amp;1 \ &#039;&#039;&#039;\hline&#039;&#039;&#039; c&amp;amp;d&amp;amp;2 \ &#039;&#039;&#039;\hdash&#039;&#039;&#039; e&amp;amp;f&amp;amp;3\end{array}\right] $$&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The command sequences here are the {c|c.c} and \hdash and \hline. The pipe, |, and the full stop determine the line type for the vertical line.&lt;br /&gt;
&lt;br /&gt;
Matrices also respond to other TeX Notation commands such as size and colour.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Colour&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot;|Size&lt;br /&gt;
|-&lt;br /&gt;
|[[Image: matrices07.gif]] 	&lt;br /&gt;
|[[Image: matrices08.gif]]&lt;br /&gt;
|[[Image: matrices09.gif]]&lt;br /&gt;
|-&lt;br /&gt;
|$$ &#039;&#039;&#039;\blue&#039;&#039;&#039; M = \left[\begin{array}{c.c.c} a&amp;amp;b&amp;amp;1 \ \hdash c&amp;amp;d&amp;amp;2 \ \hdash e&amp;amp;f&amp;amp;3\end{array}\right] $$ 	&lt;br /&gt;
|$$ &#039;&#039;&#039;\fs7&#039;&#039;&#039; M = \left[\begin{array}{c.c.c} a&amp;amp;b&amp;amp;1 \ \hdash c&amp;amp;d&amp;amp;2 \ \hdash e&amp;amp;f&amp;amp;3\end{array}\right] $$ 	&lt;br /&gt;
|$$ &#039;&#039;&#039;\fs2&#039;&#039;&#039; M = \left[\begin{array}{c.c.c} a&amp;amp;b&amp;amp;1 \ \hdash c&amp;amp;d&amp;amp;2 \ \hdash e&amp;amp;f&amp;amp;3\end{array}\right] $$&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Creating equal and unequal matrices==&lt;br /&gt;
Equal and unequal matrices are simply matrices that either share or not share the same number of rows and columns. To be more precise, equal matrices share the same order and each element in the corresponding positions are equal. Anything else is unequal matrices.&lt;br /&gt;
&lt;br /&gt;
Actually equal and unequal matrices are constructed along similar lines, but have different shapes:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Equal Matrix&lt;br /&gt;
|An unequal matrix&lt;br /&gt;
|-&lt;br /&gt;
|[[Image: matrices10.gif]] 	&lt;br /&gt;
|[[Image: matrices11.gif]]&lt;br /&gt;
|-&lt;br /&gt;
| $$ \left[\begin{array} a&amp;amp;b&amp;amp;1 \ c&amp;amp;d&amp;amp;2 \ e&amp;amp;f&amp;amp;3\end{array}\right] \ = \ \left[\begin{array} 12&amp;amp;11&amp;amp;z \ 10&amp;amp;9&amp;amp;y \ 8&amp;amp;7&amp;amp;x\end{array}\right] $$&lt;br /&gt;
| $$ \left[\begin{array} a&amp;amp;b \ c&amp;amp;d \ e&amp;amp;f \end{array}\right] \ \neq \ \left[\begin{array} 12&amp;amp;11&amp;amp;z \ 10&amp;amp;9&amp;amp;y \ 8&amp;amp;7&amp;amp;x\end{array}\right] $$&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Labeling a Matrix==&lt;br /&gt;
&lt;br /&gt;
Addition and subtraction matrices are similar again, but the presentation is usually very different. The problem comes when trying to mix labels into arrays. The lack of sophistication in the TeX Notation plays against it here.&lt;br /&gt;
&lt;br /&gt;
Moodle allows an easy adoption of tables to make it work though. For example:&lt;br /&gt;
&lt;br /&gt;
  Bill the baker supplies three shops, A, B and C with pies, pasties and sausage rolls. &lt;br /&gt;
  He is expected to determine the stock levels of those three shops in his estimation of supplies.&lt;br /&gt;
&lt;br /&gt;
It is better to use the Moodle Fullscreen editor for this, to have a better idea of how the end product will look and to take advantage of the additional tools available. Design decisions need occupy our attention for a while. We need a table of five rows and four columns. The first row is a header row, so the label is centred. The next row needs four columns, a blank cell to start and labels A, B and C. The next three rows are divided into two columns, with the labels, pies, pasties and sausage rolls in each row of the first column and the matrix resides in a merged set of columns there. So first the table:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Insert Table - initial properties&lt;br /&gt;
| Merge Cells Button&lt;br /&gt;
| Advanced Properties&lt;br /&gt;
|-&lt;br /&gt;
|  rowspan=&amp;quot;2&amp;quot;|[[Image: matricestable01.png|Table properties]]&lt;br /&gt;
| [[Image: matricestable02.png | Merge cells]]&lt;br /&gt;
| [[Image: matricestable03.png | Cell properties button]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot;| You may need to look into the Advanced properties setting of the tables and cells to make this work.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is the immediate result: &lt;br /&gt;
&lt;br /&gt;
[[Image: matricestable04.png | The resulting table]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
While not a very good look, it can be made better by tweaking the table using the advanced settings and properties buttons and then you can tweak the matrix itself.&lt;br /&gt;
&lt;br /&gt;
==Tweaking the Matrix==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image: matricestable05a.png | A tweaked matrix]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Things are not always as they seem, be aware, the &amp;quot;c&amp;quot; does not stand for &amp;quot;column&amp;quot;, it actually stands for &amp;quot;centre&amp;quot;. The columns are aligned by the letters l, for left, c for centre and r for right.&lt;br /&gt;
&lt;br /&gt;
Each column is spread across 50 pixels, so the value of 50 is entered into the alignment declaration. The plus sign before the value is used to &amp;quot;propogate&amp;quot; or to force the value across the whole matrix, but is not used when wanting to separate only one column. &lt;br /&gt;
&lt;br /&gt;
To set the rows is a little more problematic. The capital letter C sets the vertical alignment to the centre, (B is for baseline, but that does not guarantee that the numbers will appear on the base line, and there does not appear to be any third value). The plus sign and following value sets the height of all rows to the number given. In this I have given it a value of 25 pixels for the entire matrix. If there were four or five rows, the same height requirement is made. &lt;br /&gt;
&lt;br /&gt;
The order things appear is also important. If you change the order of these settings, they will either not work at all, or will not render as you expect them to. If something does not work properly, then check to make sure you have the right order first.&lt;br /&gt;
&lt;br /&gt;
==An Addition Matrix==&lt;br /&gt;
&lt;br /&gt;
The rule for performing operations on matrices is that they must be equal matrices. For example, addition matrices look like:&lt;br /&gt;
&lt;br /&gt;
[[Image: matricestable06.png | An addition matrix]]&lt;br /&gt;
&lt;br /&gt;
with the results obvious. The code is:&lt;br /&gt;
&lt;br /&gt;
  $$\left[\begin{array}{c+50C+25.c.c}&lt;br /&gt;
  11&amp;amp;14&amp;amp;12 \ \hdash16&amp;amp;12&amp;amp;22 \ \hdash 14&amp;amp;17&amp;amp;15&lt;br /&gt;
  \end{array}\right] + \left[\begin{array}{c+50C+25.c.c}&lt;br /&gt;
  60&amp;amp;60&amp;amp;60 \ \hdash 40&amp;amp;40&amp;amp;30 \ \hdash 30&amp;amp;30&amp;amp;30&lt;br /&gt;
  \end{array}\right] $$&lt;br /&gt;
&lt;br /&gt;
==A Subtraction Matrix==&lt;br /&gt;
&lt;br /&gt;
Similar to an addition matrix in its construction, the subtraction matrix is subject to the same rules of equality.&lt;br /&gt;
&lt;br /&gt;
Using the same essential data, we can calculate the daily sales of each of the shops.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image: matricestable07.png | A subtraction matrix]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code is:&lt;br /&gt;
  $$ \left[\begin{array}{c+50C+25.c.c}&lt;br /&gt;
  72&amp;amp;95&amp;amp;68 \ \hdash 54&amp;amp;61&amp;amp;65 \ \hdash 48&amp;amp;51&amp;amp;60&lt;br /&gt;
  \end{array}\right] - \left[\begin{array}{c+50C+25.c.c}&lt;br /&gt;
  11&amp;amp;14&amp;amp;12 \ \hdash 16&amp;amp;12&amp;amp;22 \ \hdash 14&amp;amp;17&amp;amp;15&lt;br /&gt;
  \end{array}\right] = \left[\begin{array}{c+50C+25.c.c}&lt;br /&gt;
  61&amp;amp;81&amp;amp;56 \ \hdash 38&amp;amp;49&amp;amp;43 \ \hdash 34&amp;amp;34&amp;amp;48&lt;br /&gt;
  \end{array}\right] $$  &lt;br /&gt;
&lt;br /&gt;
This code looks more complex than it really is, it is cluttered by the lines and alignment sequences.&lt;br /&gt;
&lt;br /&gt;
==Multiplication Matrices==&lt;br /&gt;
&lt;br /&gt;
Different than the addition or subtraction matrices, the multiplication matrix comes in three parts, the row matrix, the column matrix and the answer matrix. This implies it has a different construction methodology.&lt;br /&gt;
&lt;br /&gt;
[[Image: matrices16.gif | A multiplication matrix]]&lt;br /&gt;
&lt;br /&gt;
And the code for this is: &lt;br /&gt;
  $$ \begin{array} 10&amp;amp;amp;14&amp;amp;amp;16\end{array} \ &lt;br /&gt;
  \left[\begin{array} 45 \\ 61 \\ 19 \end{array}\right] &lt;br /&gt;
  \ = \ \begin{array} 450&amp;amp;amp;854&amp;amp;amp;304\end{array} $$&lt;br /&gt;
&lt;br /&gt;
While different, it is not necessarily more complex. For example a problem like:&lt;br /&gt;
&lt;br /&gt;
  Bill the baker is selling his product to Con the cafe owner, who &lt;br /&gt;
  wants to make sure his overall prices are profitable for himself. &lt;br /&gt;
  Con needs to make sure that his average price is providing sufficient &lt;br /&gt;
  profit to be able to keep the cafes open. Con makes his calculations &lt;br /&gt;
  on a weekly basis, comparing cost to sale prices.&lt;br /&gt;
&lt;br /&gt;
With the pies, pasties and sausage rolls in that order he applies them to the cost and sale price columns :&lt;br /&gt;
&lt;br /&gt;
[[Image: matrices17.gif | A multiplication matrix]]&lt;br /&gt;
&lt;br /&gt;
The code for this is: &lt;br /&gt;
  $$\left[\begin{array} 350&amp;amp;amp;310&amp;amp;amp;270 \end{array}\right] \ &lt;br /&gt;
  \left[\begin{array} \$2.10&amp;amp;amp;\$3.60 \ \$2.05&amp;amp;amp;\$3.60 \ \$1.90&amp;amp;amp;\$3.10 \end{array} &lt;br /&gt;
  \right] \ = \ \left[\begin{array} \$735.00&amp;amp;amp;\$1260.00 \ \$635.50&amp;amp;amp;\$1116.00 \ &lt;br /&gt;
  \$513.00&amp;amp;amp;$\837.00 \end{array}\right] $$&lt;br /&gt;
&lt;br /&gt;
==How to wrap long MathJax equations==&lt;br /&gt;
As [https://moodle.org/mod/forum/discuss.php?d=389730 described by Christopher Sangwin]:&lt;br /&gt;
&lt;br /&gt;
See [http://docs.mathjax.org/en/latest/output/linebreaks.html this documentation].&lt;br /&gt;
&lt;br /&gt;
Add &lt;br /&gt;
&lt;br /&gt;
    CommonHTML: { linebreaks: { automatic: true } },&lt;br /&gt;
   &amp;quot;HTML-CSS&amp;quot;: { linebreaks: { automatic: true } },&lt;br /&gt;
    SVG: { linebreaks: { automatic: true } }&lt;br /&gt;
&lt;br /&gt;
to &amp;quot;filter_mathjaxloader | mathjaxconfig&amp;quot; in the filter settings: Dashboard &amp;gt; Site administration &amp;gt; Plugins &amp;gt; Filters &amp;gt; MathJax Seems to do the trick.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
* [[Mathematics_tools_FAQ]]&lt;br /&gt;
* [[MathJax_filter]] - available in Moodle 2.7 and later&lt;br /&gt;
* [[TeX notation filter]] To turn on the TeX Notation &lt;br /&gt;
* [[DragMath equation editor]]&lt;br /&gt;
* [[Chemistry notation using mhchem]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Mathematics]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Atto_editor&amp;diff=140831</id>
		<title>Atto editor</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Atto_editor&amp;diff=140831"/>
		<updated>2021-07-14T13:24:23Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Text replacement - &amp;quot;class=&amp;quot;nicetable&amp;quot;&amp;quot; to &amp;quot;class=&amp;quot;wikitable&amp;quot;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Editing text}}&lt;br /&gt;
==The Atto text editor==&lt;br /&gt;
&lt;br /&gt;
The Atto text editor (sometimes referred to as the &#039;HTML editor&#039;) has many icons to assist the user in entering content.  Many of these icons and functions should be familiar to anyone who uses a word processor.  &lt;br /&gt;
&lt;br /&gt;
Some examples of where you will see the text editor include: Editing Section headings, description of an activity, writing an answer to a quiz question or editing the content of many blocks.&lt;br /&gt;
&lt;br /&gt;
The default text editor in Moodle is the Atto editor, built specifically for Moodle. There is also a [[TinyMCE editor]] and a plain text editor.&lt;br /&gt;
&lt;br /&gt;
Text editors can be enabled, disabled or a different one set to default from &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Plugins &amp;gt; Text editors &amp;gt; Manage editors&#039;&#039;. The order of priority may also be specified here.&lt;br /&gt;
&lt;br /&gt;
If more than one text editor is enabled, users can select their preferred editor via their preferences page in the user menu (top right).&lt;br /&gt;
	&lt;br /&gt;
{{MediaPlayer | url = https://youtu.be/fEtGcVz0pzE | desc = }}&lt;br /&gt;
&lt;br /&gt;
==Atto features==&lt;br /&gt;
&lt;br /&gt;
===Image copy and paste===&lt;br /&gt;
&lt;br /&gt;
In Moodle 3.9 onwards, images can be copied from anywhere and pasted into the Atto editor. For example, you can take a screenshot, copy it to your clipboard and then paste it into the Atto editor.&lt;br /&gt;
&lt;br /&gt;
===Image drag and drop===&lt;br /&gt;
&lt;br /&gt;
If your browser allows it (and if it does, you will see a message at the top of your screen when the editing is on) you can add images into the Atto editor simply by dragging them from your computer:&lt;br /&gt;
&lt;br /&gt;
[[File:Attodragdrop29.png|thumb|600px|center|Drag an image directly into the editor]]&lt;br /&gt;
&lt;br /&gt;
===Autosave===&lt;br /&gt;
&lt;br /&gt;
Text typed into the Atto editor is automatically saved if you leave the page. The default of 60 seconds may be changed by the administrator in &#039;&#039;Site administration&amp;gt;Plugins&amp;gt;Text editors&amp;gt;Atto HTML editor&amp;gt;Atto toolbar settings.&#039;&#039; If the user accidentally closes the tab or otherwise leaves the form without submitting, the text in the editor will be restored next time he opens the page. To discard  a restored draft, the  user needs to cancel the form or press the &amp;quot;Undo&amp;quot; button in the editor.&lt;br /&gt;
[[File:AtttoAutosave.png|thumb|600px|center]]&lt;br /&gt;
&lt;br /&gt;
==Atto editor toolbar==&lt;br /&gt;
&lt;br /&gt;
[[File:Attotopline1382.png]]&lt;br /&gt;
&lt;br /&gt;
Atto Row 1 default buttons&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| 1. Expand&lt;br /&gt;
| 2. Style&lt;br /&gt;
| 3. Bold&lt;br /&gt;
| 4. Italic&lt;br /&gt;
|-&lt;br /&gt;
| 5. Bulleted list&lt;br /&gt;
| 6. Numbered list&lt;br /&gt;
| 7. Add link&lt;br /&gt;
| 8. Unlink &lt;br /&gt;
|-&lt;br /&gt;
| 9. Add image&lt;br /&gt;
| 10. Add smiley (if enabled)&lt;br /&gt;
| 11. Add media&lt;br /&gt;
| 12. Record audio&lt;br /&gt;
|-&lt;br /&gt;
| 13. Record video&lt;br /&gt;
| 14. Manage embedded files&lt;br /&gt;
| 15. H5P&lt;br /&gt;
 &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[File:Attobottomline.png]]&lt;br /&gt;
&lt;br /&gt;
Atto Row 2 default buttons&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| 1. Underline&lt;br /&gt;
| 2. Strikethrough&lt;br /&gt;
| 3. Subscript&lt;br /&gt;
| 4. Superscript&lt;br /&gt;
|-&lt;br /&gt;
| 5. Align left/centre/right&lt;br /&gt;
| 6. Decrease/increase indent&lt;br /&gt;
| 7. Equation editor&lt;br /&gt;
| 8. Special character&lt;br /&gt;
|-&lt;br /&gt;
| 9. Table&lt;br /&gt;
| 10. Clear formatting&lt;br /&gt;
| 11. Undo/redo&lt;br /&gt;
| 12. Accessibility checker&lt;br /&gt;
|-&lt;br /&gt;
| 13. Screenreader helper&lt;br /&gt;
| 14. HTML/code view&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Manage embedded files===&lt;br /&gt;
This allows users to add, delete or override files embedded in the current text area, for example in a label or topic summary. (It complements the [[Embedded files repository]])&lt;br /&gt;
&lt;br /&gt;
[[File:26embeddefiles2.png|thumb|400px|center]]&lt;br /&gt;
&lt;br /&gt;
===Accessibility checker===&lt;br /&gt;
&lt;br /&gt;
One of the tools available in the text editor is an automated [[Accessibility|accessibility]] checker which checks for some common errors in the text. These are usually things in the way the text is constructed that can prevent all users from having equal access to information and functionality. The list of problems that the accessibility checker looks for is:&lt;br /&gt;
&lt;br /&gt;
* Images with missing or empty alt text (unless they have the presentation role)&lt;br /&gt;
* Contrast of font colour and background colour meets [https://en.wikipedia.org/wiki/Web_Content_Accessibility_Guidelines WCAG AA guidelines]&lt;br /&gt;
* Long blocks of text are sufficiently broken up into headings&lt;br /&gt;
* All tables require captions&lt;br /&gt;
* Tables should not contain merged cells as they are difficult to navigate with screen readers&lt;br /&gt;
* All tables should contain row or column headers&lt;br /&gt;
&lt;br /&gt;
===Screenreader helper===&lt;br /&gt;
&lt;br /&gt;
Screen readers basically treat a content editable region like a text box - which is wrong, because it can contain images, links and more.&lt;br /&gt;
&lt;br /&gt;
The screen reader helper provides additional information about the currently selected text (e.g. is it bold), as well as a listing of any images or links in the text.&lt;br /&gt;
&lt;br /&gt;
===Equation editor===&lt;br /&gt;
&lt;br /&gt;
If either the [[MathJax filter|MathJax]] or the [[TeX notation filter|TeX notation]] filters are enabled (in &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Plugins &amp;gt; Filters &amp;gt; Manage filters&#039;&#039;) then an equation editor button is provided in the toolbar for launching the equation editor.&lt;br /&gt;
&lt;br /&gt;
===Table editor===&lt;br /&gt;
&lt;br /&gt;
If the administrator has enabled the extra settings for the Atto table editor (see below) then border styling, sizing and colours are available when creating a table:&lt;br /&gt;
&lt;br /&gt;
[[File:AttoTableRevised.png|center|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
==Keyboard shortcuts==&lt;br /&gt;
&lt;br /&gt;
The following keyboard shortcuts will work in the Atto text editor in most browsers. Note that for many of these commands to work you need to either click in the text editor or select content in the text editor.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Windows Command&lt;br /&gt;
! Mac Command&lt;br /&gt;
! Function&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl + c&lt;br /&gt;
| ⌘ + c&lt;br /&gt;
| Copy&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl + v&lt;br /&gt;
| ⌘ + v&lt;br /&gt;
| Paste&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl + Shift + v&lt;br /&gt;
| ⌘ + Shift + v&lt;br /&gt;
| Paste without formatting (very useful)&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl + x&lt;br /&gt;
| ⌘ + x&lt;br /&gt;
| Cut&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl + z&lt;br /&gt;
| ⌘ + z&lt;br /&gt;
| Undo (careful - can undo a lot of text and doesn&#039;t always work)&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl + y&lt;br /&gt;
| ⌘ + y&lt;br /&gt;
| Redo&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl + a&lt;br /&gt;
| ⌘ + a&lt;br /&gt;
| Select all&lt;br /&gt;
|-&lt;br /&gt;
| Double-click&lt;br /&gt;
| Double-click&lt;br /&gt;
| Select word&lt;br /&gt;
|-&lt;br /&gt;
| Triple-click&lt;br /&gt;
| Triple-click&lt;br /&gt;
| Select line&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl + f&lt;br /&gt;
| ⌘ + f&lt;br /&gt;
| Find on page&lt;br /&gt;
|-&lt;br /&gt;
| F3&lt;br /&gt;
| F3&lt;br /&gt;
| Find next&lt;br /&gt;
|-&lt;br /&gt;
| Shift + F3&lt;br /&gt;
| Shift + F3&lt;br /&gt;
| Find previous&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl + b&lt;br /&gt;
| ⌘ + b&lt;br /&gt;
| Bold&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl + i&lt;br /&gt;
| ⌘ + i&lt;br /&gt;
| Italics&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl + u&lt;br /&gt;
| ⌘ + u&lt;br /&gt;
| Underline&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl + k&lt;br /&gt;
| ⌘ + k&lt;br /&gt;
| Insert/edit link&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl + Right arrow&lt;br /&gt;
| ⌘ + Right arrow&lt;br /&gt;
| Move to the end of the next word&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl + Left arrow&lt;br /&gt;
| ⌘ + Left arrow&lt;br /&gt;
| Move to the end of the previous word&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl + Shift + Right arrow&lt;br /&gt;
| ⌘ + Shift + Right arrow&lt;br /&gt;
| Select the next word or letter&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl + Shift + Left arrow&lt;br /&gt;
| ⌘ + Shift + Left arrow&lt;br /&gt;
| Select the previous word or letter&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl + Shift + Home&lt;br /&gt;
| ⌘ + Shift + Home&lt;br /&gt;
| Select from the cursor to the beginning of the page&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl + Shift + End&lt;br /&gt;
| ⌘ + Shift + End&lt;br /&gt;
| Select from the cursor to the end of the page&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl + Home&lt;br /&gt;
| ⌘ + Home&lt;br /&gt;
| Move to the beginning of the page&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl + End&lt;br /&gt;
| ⌘ + End&lt;br /&gt;
| Move to the end of the page&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl + Backspace&lt;br /&gt;
| ⌘ + Backspace&lt;br /&gt;
| Delete word or letter to the left&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl + Delete&lt;br /&gt;
| ⌘ + Delete&lt;br /&gt;
| Delete word or letter to the right&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl and +&lt;br /&gt;
| ⌘ and +&lt;br /&gt;
| Zoom in (not specific to the editor, but very useful)&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl and -&lt;br /&gt;
| ⌘ and -&lt;br /&gt;
| Zoom out (not specific to the editor, but very useful)&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl and 0&lt;br /&gt;
| ⌘ and 0&lt;br /&gt;
| Reset zoom (not specific to the editor, but very useful)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:80%&amp;quot;&amp;gt;Source: [https://confluence.royalroads.ca:8443/pages/viewpage.action?pageId=47778173 Jason 1keddie, Royal Roads University (Creative Commons Attribution-ShareAlike)]&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Site administration settings==&lt;br /&gt;
&lt;br /&gt;
===Toolbar settings===&lt;br /&gt;
&lt;br /&gt;
The administrator can specify which plugins to display and in which order from &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Plugins &amp;gt; Text editors &amp;gt; Atto HTML editor &amp;gt; Atto toolbar settings&#039;&#039;.&lt;br /&gt;
[[File:atto-plugins.png|thumb|center|450px|Atto Plugins]]&lt;br /&gt;
&lt;br /&gt;
====Toolbar config table====&lt;br /&gt;
The toolbar is split into groups of related buttons. The format for the config setting is:&lt;br /&gt;
&lt;br /&gt;
groupname1 = button1, button2, button3&lt;br /&gt;
groupname2 = button1, button2, button3&lt;br /&gt;
&lt;br /&gt;
The group names on the left have no effect on how the toolbar works; they just need to be different for each button (and no spaces please). The list of buttons says which button goes in which group and in what order. The exact word to insert here for each button is listed in the &amp;quot;Toolbar config&amp;quot; column above.&lt;br /&gt;
&lt;br /&gt;
The reason there are names for the groups is that it helps to make you think about how to group the buttons sensibly and not just stick new buttons in random locations. Ie. all the buttons in the &amp;quot;files&amp;quot; group interact with the file picker in some way&lt;br /&gt;
&lt;br /&gt;
===Adding extra buttons===&lt;br /&gt;
&lt;br /&gt;
Extra plugins (for example the contributed plugin &#039;Font color&#039;) may be added (once installed) by typing the toolbarconfig term into the toolbar config table.&lt;br /&gt;
&lt;br /&gt;
[[File:toolbarconfig.png]]&lt;br /&gt;
&lt;br /&gt;
Here for example are the available colours when &#039;fontcolor&#039; is added:&lt;br /&gt;
&lt;br /&gt;
[[File:fontcolor.png]]&lt;br /&gt;
&lt;br /&gt;
The icons are displayed in related groups and the administrator can decide how many groups to display in the default collapsed state of the toolbar (that is, how many groups to display on Row 1).&lt;br /&gt;
&lt;br /&gt;
====Autosave frequency====&lt;br /&gt;
Text is automatically saved at regular intervals so it may be restored when the user returns to a form they had previously left. This setting allows the administrator to specify the time between autosaves. The default is one minute.&lt;br /&gt;
==== Non default Atto plugins ====&lt;br /&gt;
Not all plugins are enabled by default and the administrator of each site should give careful thought as to which plugins they choose to enable for their users. Here are some things to consider before enabling the non-default plugins:&lt;br /&gt;
&lt;br /&gt;
===== Emoji picker =====&lt;br /&gt;
An emoji picker button may be added by typing &#039;emojipicker&#039; into the toolbar config table.&lt;br /&gt;
[[File:toolbar with emoji picker.png|thumb|Toolbar with emoji picker button]]&lt;br /&gt;
To add the emoji picker button to the top row:&lt;br /&gt;
&lt;br /&gt;
# Enter the line &amp;lt;code&amp;gt;emoji = emojipicker&amp;lt;/code&amp;gt; under the line &amp;lt;code&amp;gt;files = image, emoticon, media, managefiles, recordrtc, h5p&amp;lt;/code&amp;gt;&lt;br /&gt;
# Go to &#039;Collapse toolbar settings&#039; and change &#039;Show first (n) groups when collapsed&#039; to 6 and save changes.&lt;br /&gt;
&lt;br /&gt;
===== Emoticons =====&lt;br /&gt;
The emoticon plugin inserts text representations of the emoticons in the content. The emoticon filter is responsible for converting these text sequences into proper smiley images. The emoticon filter is not enabled by default, which is why the emoticon plugin for Atto is not enabled by default.&lt;br /&gt;
&lt;br /&gt;
===== No-auto link =====&lt;br /&gt;
In general, the more plugins are added to the Atto toolbar, the harder it becomes to find specific plugins. Because the no-auto link plugin is not felt to be widely used it is not enabled by default.&lt;br /&gt;
&lt;br /&gt;
===== Right to left =====&lt;br /&gt;
Because this plugin is only useful for courses where text needs to be written in a mixture of both &amp;quot;left to right&amp;quot; and &amp;quot;right to left&amp;quot; languages, it is not enabled by default.&lt;br /&gt;
&lt;br /&gt;
==== Moodle plugins directory ====&lt;br /&gt;
&lt;br /&gt;
There are more plugins available for Atto than just those included in a default install. &lt;br /&gt;
See the [https://moodle.org/plugins/browse.php?list=category&amp;amp;id=53 Moodle plugins directory] for additional plugins.&lt;br /&gt;
Some example plugins include the following:&lt;br /&gt;
&lt;br /&gt;
==== Background colour / Font colour ====&lt;br /&gt;
While these are very popular plugins, there are downsides to enabling their use on a site. Firstly - user specified colours may conflict visually with the site colours chosen by the theme designer. Even if the colours of the content do not conflict with the colours of the current theme, if the theme is changed in future, or the content is reused on a different site conflicts may be introduced. There are 2 possible types of conflicts, the first is just a visually unappealing combination of colours, the second is a combination of colours that may produce text that is hard to read for some people. It is preferable if the theme designer uses some interesting colours that meet the accessibility standards required for the site in the theme for the site, and the person creating the content simply uses the proper heading levels (for example) to make use of those styles.&lt;br /&gt;
&lt;br /&gt;
===== Cloze editor for Atto=====&lt;br /&gt;
[[Cloze editor for Atto|This]] is a plugin for easily making [[Embedded Answers (Cloze) question type]] questions inside the standard Moodle Atto text  editor.&lt;br /&gt;
&lt;br /&gt;
===== Toggle preview =====&lt;br /&gt;
This plugin allows you view the content as it would be seen by a reader.&lt;br /&gt;
&lt;br /&gt;
===== Chemistry plugins =====&lt;br /&gt;
There are a number of chemistry plugins that support chemistry equations and structures.&lt;br /&gt;
&lt;br /&gt;
===== Text import plugins =====&lt;br /&gt;
There are a number of plugins that support importing text from other sources. &lt;br /&gt;
The [https://moodle.org/plugins/view/atto_pastespecial Paste special] plugin minimises the amount of superfluous HTML markup&lt;br /&gt;
included when pasting content from an external editor such as Microsoft Word.&lt;br /&gt;
&lt;br /&gt;
The [https://moodle.org/plugins/view/atto_wordimport Word Import] plugin (beta) supports importing an entire Word document, &lt;br /&gt;
including embedded images.&lt;br /&gt;
&lt;br /&gt;
===Equation editor settings===&lt;br /&gt;
&lt;br /&gt;
Equation editor commands may be removed, added or reordered in &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Plugins &amp;gt; Text editors &amp;gt; Atto HTML editor &amp;gt; Equation editor settings&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[File:equationeditor.png]]&lt;br /&gt;
&lt;br /&gt;
===Table editor settings===&lt;br /&gt;
Styles, colours and sizes for tables and their borders may be enabled from &#039;&#039;Administration &amp;gt; Site administraton &amp;gt;Plugins &amp;gt; Test editors &amp;gt; Atto HTML editor &amp;gt; Table settings.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [[Text editor FAQ]]&lt;br /&gt;
* [[Embedded files repository]]&lt;br /&gt;
* [[Word count quick guide]] - Word count is a plugin for the [[Text editor|Atto text editor]] which is used to create content within Moodle.  This plugin enables the author of text, such as a student,  to check how many words and letters are in a  piece of text.&lt;br /&gt;
&lt;br /&gt;
[[Category:Site administration]]&lt;br /&gt;
[[Category:Language teaching]]&lt;br /&gt;
&lt;br /&gt;
[[de:Text-Editor]]&lt;br /&gt;
[[es:Editor Atto]]&lt;br /&gt;
[[fr:Éditeur de texte]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Development:Scheduled_Tasks_Proposal&amp;diff=140830</id>
		<title>Development:Scheduled Tasks Proposal</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Development:Scheduled_Tasks_Proposal&amp;diff=140830"/>
		<updated>2021-07-14T13:24:22Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Text replacement - &amp;quot;class=&amp;quot;nicetable&amp;quot;&amp;quot; to &amp;quot;class=&amp;quot;wikitable&amp;quot;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Moodle 2.0}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This proposal is meant both to provide a replacement for the moodle cron job, and provide a means to schedule once off tasks to be run outside of the user&#039;s request lifecycle.&lt;br /&gt;
&lt;br /&gt;
== Terminology ==&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Subtask&#039;&#039;&#039; an individual piece of cron processing that should be run (equivalent to forum_cron now, or maybe even smaller)&lt;br /&gt;
* &#039;&#039;&#039;Moodle cron instance&#039;&#039;&#039; a cron.php process&lt;br /&gt;
&lt;br /&gt;
== Rationale ==&lt;br /&gt;
&lt;br /&gt;
The moodle cronjob currently delegates all scheduling to each subtask that is run - for example, the forum cron is responsible for checking when it last run, and making decisions about whether or not it should be run again.   This sort of decision process should be centralised, and individual cron subtasks should be called by the central controller.&lt;br /&gt;
&lt;br /&gt;
Additionally, there is not any central locking of subtasks.  At the moment, some subtasks that expect that they might take a long time to run implement their own locking (for example statistics), but it&#039;s not centralised.  Each moodle cron instance runs to completion, no matter how long it takes, and it processes tasks in the order that they&#039;re programmed, regardless of if there are any other moodle cron instances running, that might be processing sub tasks in parallel&lt;br /&gt;
&lt;br /&gt;
The existing events API seems like it should provide a way to schedule tasks to be run outside of a user&#039;s request cycle, but in reality this just adds to the existing cron problem.  We need to have a way in Moodle to schedule once off tasks to be run &amp;quot;at the next available time&amp;quot; which are picked up by cron.  This can be used to process the event queue, but also for some code to just register a new once off cron event &amp;quot;on the fly&amp;quot; and be picked up on the next run.&lt;br /&gt;
&lt;br /&gt;
Finally, we need to be able to run non-related tasks in parallel so that the entire moodle queue isn&#039;t held up by single long running jobs.&lt;br /&gt;
&lt;br /&gt;
== Goals ==&lt;br /&gt;
&lt;br /&gt;
* Centralised locking for &#039;&#039;&#039;all&#039;&#039;&#039; tasks&lt;br /&gt;
* A way consistent for &#039;&#039;&#039;all plugin types&#039;&#039;&#039; to register with Moodle (at installation/upgrade) when they want their jobs run&lt;br /&gt;
* More sophisticated scheduling rather than just intervals in seconds (eg every sunday at 11pm or similar) based on unix cron&lt;br /&gt;
* An administration screen in Moodle to allow site administrators to adjust the scheduling of individual tasks&lt;br /&gt;
* An easy way for core and module code to schedule a once off task to be run as soon as possible&lt;br /&gt;
&lt;br /&gt;
== Approach ==&lt;br /&gt;
&lt;br /&gt;
=== Plugin cron registration ===&lt;br /&gt;
&lt;br /&gt;
Each plugin will be able to provide a db/tasks.php (alongside access.php and events.php etc) that lists all the cronjobs that it wants to have run.  This will look something like the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
$tasks = array(&lt;br /&gt;
    array(&lt;br /&gt;
        &#039;function&#039;    =&amp;gt; &#039;yourmodule_cron_somedescription&#039;,&lt;br /&gt;
        &#039;minute&#039;      =&amp;gt; &#039;*&#039;,&lt;br /&gt;
        &#039;hour&#039;        =&amp;gt; &#039;*&#039;,&lt;br /&gt;
        &#039;day&#039;         =&amp;gt; &#039;*&#039;,&lt;br /&gt;
        &#039;month&#039;       =&amp;gt; &#039;*&#039;,&lt;br /&gt;
        &#039;dayofweek&#039;   =&amp;gt; &#039;*&#039;,&lt;br /&gt;
        &#039;description&#039; =&amp;gt; &#039;langstringkey&#039;, // this must correspond to get_string(&#039;langstringkey&#039;, &#039;yourmodule&#039;);&lt;br /&gt;
    ),&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The fields are the same as normal unix cron, with the exception that you cannot use 3 letter words for the month and day of week fields like you can for unix cron.  The following is straight from the unix manpage about cron:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
              field          allowed values&lt;br /&gt;
              -----          --------------&lt;br /&gt;
              minute         0-59&lt;br /&gt;
              hour           0-23&lt;br /&gt;
              day of month   1-31&lt;br /&gt;
              month          1-12 (or names, see below)&lt;br /&gt;
              day of week    0-7 (0 or 7 is Sun, or use names)&lt;br /&gt;
&lt;br /&gt;
       A field may be an asterisk (*), which always stands for ``first-last&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
       Ranges  of  numbers  are  allowed.  Ranges are two numbers separated with a hyphen.&lt;br /&gt;
       The specified range is inclusive.  For example, 8-11 for an ``hours&#039;&#039; entry specifies&lt;br /&gt;
       execution at hours 8, 9, 10 and 11.&lt;br /&gt;
&lt;br /&gt;
       Lists are allowed.  A list is a set of numbers (or ranges) separated by commas.&lt;br /&gt;
       Examples: ``1,2,5,9&#039;&#039;, ``0-4,8-12&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
       Step values can be used in conjunction with ranges.  Following a range with ``/&amp;lt;number&amp;gt;&#039;&#039;&lt;br /&gt;
       specifies  skips  of  the  number&#039;s  value  through  the  range.   For  example,&lt;br /&gt;
       ``0-23/2&#039;&#039; can be used in the hours field to specify command execution every other hour&lt;br /&gt;
       (the alternative in the V7 standard is ``0,2,4,6,8,10,12,14,16,18,20,22&#039;&#039;).  Steps&lt;br /&gt;
       are also permitted after an asterisk, so if you want to say ``every two hours&#039;&#039;, just use ``*/2&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The unix crontab manpage goes on to say that one can use 3 letter words in the month and dayofweek fields (eg Sun or Feb).  I don&#039;t think this is necessary for our implementation.&lt;br /&gt;
&lt;br /&gt;
=== Database ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;scheduled_tasks:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;Datatype&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;Comment&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|id&lt;br /&gt;
|integer&lt;br /&gt;
|sequence&lt;br /&gt;
|-&lt;br /&gt;
|plugintype&lt;br /&gt;
|varchar(50)&lt;br /&gt;
|plugintype - should match the path-style declarations in get_plugin_types (eg question/type, not qtype).  Will be null for core tasks.&lt;br /&gt;
|-&lt;br /&gt;
|pluginname&lt;br /&gt;
|varchar(50)&lt;br /&gt;
|name of the plugin. Will be null for core tasks.&lt;br /&gt;
|-&lt;br /&gt;
|callfunction&lt;br /&gt;
|varchar(200) (unique)&lt;br /&gt;
|the function to call. Must be unique, as it will be used for the locking.&lt;br /&gt;
|-&lt;br /&gt;
|lastruntime&lt;br /&gt;
|int(10)&lt;br /&gt;
|unix timestamp&lt;br /&gt;
|-&lt;br /&gt;
|nextruntime&lt;br /&gt;
|int(10)&lt;br /&gt;
|unix timestamp&lt;br /&gt;
|-&lt;br /&gt;
|blocking&lt;br /&gt;
|int(1)&lt;br /&gt;
|0 or 1 - whether this task, when running, blocks everything else from running.&lt;br /&gt;
|-&lt;br /&gt;
|minute&lt;br /&gt;
|varchar(25)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|hour&lt;br /&gt;
|varchar(25)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|day&lt;br /&gt;
|varchar(25)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|month&lt;br /&gt;
|varchar(25)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|dayofweek&lt;br /&gt;
|varchar(25)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|customised&lt;br /&gt;
|integer(1)&lt;br /&gt;
|0 or 1 - whether this time differs from what is in code&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This table is for all the normal scheduled regular tasks.  The time fields are intially populated when a plugin is installed or upgraded, but can be overridden by an administrator, which sets the &amp;quot;customised&amp;quot; flag to 1.  If the administrator later decides to revert their customisation, the original code-values are repopulated into this table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;scheduled_onceoff_tasks:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;Datatype&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;Comment&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|id&lt;br /&gt;
|integer&lt;br /&gt;
|sequence&lt;br /&gt;
|-&lt;br /&gt;
|plugintype&lt;br /&gt;
|varchar(50)&lt;br /&gt;
|plugintype - should match the path-style declarations in get_plugin_types (eg question/type, not qtype).  Will be null for core tasks.&lt;br /&gt;
|-&lt;br /&gt;
|pluginname&lt;br /&gt;
|varchar(50)&lt;br /&gt;
|name of the plugin. Will be null for core tasks.&lt;br /&gt;
|-&lt;br /&gt;
|callfunction&lt;br /&gt;
|varchar(200) (unique)&lt;br /&gt;
|the function to call. Must be unique, as it will be used for the locking.&lt;br /&gt;
|-&lt;br /&gt;
|nextruntime&lt;br /&gt;
|int(10)&lt;br /&gt;
|unix timestamp&lt;br /&gt;
|-&lt;br /&gt;
|customdata&lt;br /&gt;
|text&lt;br /&gt;
|any data or serialised information&lt;br /&gt;
|-&lt;br /&gt;
|blocking&lt;br /&gt;
|int(1)&lt;br /&gt;
|0 or 1 - whether this task, when running, blocks everything else from running.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This table is for the once off tasks, which are run and then deleted.  There isn&#039;t a unique constraint on &#039;callfunction&#039; in this table, because the same once off task may be scheduled twice before the first one is processed.  In this case, the named lock will be obtained using a combination of callfunction and the id.&lt;br /&gt;
&lt;br /&gt;
The original database specification had extra custom fields in the main scheduled_tasks table, that the cronjobs could insert information into, called custom1 and custom2 and so on.  I&#039;ve removed these from this specification until such time as we have a solid use-case for them.  It is certain that we need it for the once off tasks, however, but in this case I think it&#039;s better to just have a text field that can either contain a single value, or a serialised blob of information.&lt;br /&gt;
&lt;br /&gt;
The original spec also had a priority field, but this has been removed after the conversation in Jizerka, which led to the proposal to just let some jobs block all others, rather than prioritising individual tasks.  &#039;&#039;&#039;This decision may be later reverted&#039;&#039;&#039; especially for once off tasks, where some may be really urgent.&lt;br /&gt;
&lt;br /&gt;
=== Locking ===&lt;br /&gt;
&lt;br /&gt;
Penny and Tim originally thought that the best approach was to try and do something that would cause an exception to be thrown - for example, try to insert into a row that had a unique constraint on it, and catch the exception.  However, this will cause far too much noise in the logs.  Matt Oquist came up with a different approach in MDL-21110.  We could potentially change this slightly to allow alternative implementations, by means of an abstract class and factory method (this was suggested by Sam Marshall), but probaby isn&#039;t needed for the initial implementation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Black magic ===&lt;br /&gt;
&lt;br /&gt;
Cron.php will need to be rewritten to look something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
while ($nexttask = cron_get_next_task()) {&lt;br /&gt;
    cron_call_function($nexttask);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With some black magic to hand out the next task, which does:&lt;br /&gt;
&lt;br /&gt;
* Checks how long the existing process is allowed to run for&lt;br /&gt;
* Figures out if there&#039;s already a &amp;quot;blocking&amp;quot; task running&lt;br /&gt;
* Figures out the next task that&#039;s scheduled&lt;br /&gt;
* Tries to get a lock on it&lt;br /&gt;
* Returns that task&lt;br /&gt;
&lt;br /&gt;
== Unresolved issues/ideas ==&lt;br /&gt;
&lt;br /&gt;
* It might be nice at some point to find a way to allow different subtasks to run on different servers by designation.  This could be eventually added in to the administration screens as an extra setting (IP address)&lt;br /&gt;
* We obviously need some way to avoid different tasks trampling on eachother.  We ran through a number of ideas already, from differentiating between read/write operations, to having dependencies or conflicts between tasks, to having each task say which database tables it uses.   Finally we decided it would be best to just have some tasks that are able to simply block all others from being run.  Anything to do with authentication and enrolment must block other tasks from running, as otherwise there could be the problem of for example, forum posts being emailed out just before someone is unenrolled from a course.&lt;br /&gt;
* When the first cron in a long time is running, we should lock the entire cron and let it run to completeness, because the order is really important then.  This means that there also needs to be some global lastcronruntime flag somewhere (like in the config table)&lt;br /&gt;
&lt;br /&gt;
== Psuedo code proposal ==&lt;br /&gt;
Moved [[Development_talk:Scheduled_Tasks_Proposal|to the talk page]]&lt;br /&gt;
&lt;br /&gt;
== Audit of current cron ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Main section&lt;br /&gt;
! Subtask&lt;br /&gt;
! Frequency&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| session_gc&lt;br /&gt;
|&lt;br /&gt;
| every run&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|mod/assignment&lt;br /&gt;
|plugins (none)&lt;br /&gt;
|every minute&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|mod/assignment&lt;br /&gt;
|message submissions&lt;br /&gt;
|every minute&lt;br /&gt;
|checks last run time&lt;br /&gt;
|-&lt;br /&gt;
|mod/chat&lt;br /&gt;
|update chat times&lt;br /&gt;
|every five minutes&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|mod/chat&lt;br /&gt;
|update_events&lt;br /&gt;
|every five minutes&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|mod/chat&lt;br /&gt;
|delete old chat_users and add quits&lt;br /&gt;
|every five minutes&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|mod/chat&lt;br /&gt;
|delete old messages&lt;br /&gt;
|every five minutes&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|mod/data&lt;br /&gt;
|&lt;br /&gt;
|every minute&lt;br /&gt;
|no _cron function (includes file unnecessarily)&lt;br /&gt;
|-&lt;br /&gt;
|mod/forum&lt;br /&gt;
|mail posts&lt;br /&gt;
|every minute&lt;br /&gt;
|checks last run time&lt;br /&gt;
|-&lt;br /&gt;
|mod/forum&lt;br /&gt;
|digest processing&lt;br /&gt;
|every minute&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|mod/forum&lt;br /&gt;
|delete old read tracking&lt;br /&gt;
|every minute&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|mod/scorm&lt;br /&gt;
|reparse all scorms&lt;br /&gt;
|every five minutes&lt;br /&gt;
|does hourly checking&lt;br /&gt;
|-&lt;br /&gt;
|mod/wiki&lt;br /&gt;
|delete expired locks&lt;br /&gt;
|every hour&lt;br /&gt;
|-&lt;br /&gt;
|blocks/rss_client&lt;br /&gt;
|update feeds&lt;br /&gt;
|every five minutes&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|quiz/report/statistics&lt;br /&gt;
|delete old statistics&lt;br /&gt;
|every run&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|admin/reports&lt;br /&gt;
|none&lt;br /&gt;
|every run&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|language_cache&lt;br /&gt;
&lt;br /&gt;
|every run&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|remove expired enrolments&lt;br /&gt;
|&lt;br /&gt;
|every run&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|main gradebook&lt;br /&gt;
|lock pending grades (*2)&lt;br /&gt;
|every run&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|main gradebook&lt;br /&gt;
|clean old grade history&lt;br /&gt;
|every run&lt;br /&gt;
|has a TODO to not process as often&lt;br /&gt;
|-&lt;br /&gt;
|event queue&lt;br /&gt;
|&lt;br /&gt;
|every run&lt;br /&gt;
|potentially large&lt;br /&gt;
|-&lt;br /&gt;
|portfolio cron&lt;br /&gt;
|clean expired exports&lt;br /&gt;
|every run&lt;br /&gt;
|potentially large&lt;br /&gt;
|-&lt;br /&gt;
|longtimenosee&lt;br /&gt;
&lt;br /&gt;
|20%&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|deleteunconfirmedusers&lt;br /&gt;
|&lt;br /&gt;
|20%&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|deleteincompleteusers&lt;br /&gt;
|&lt;br /&gt;
|20%&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|deleteoldlogs&lt;br /&gt;
|&lt;br /&gt;
|20%&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|deletefiltercache&lt;br /&gt;
|&lt;br /&gt;
|20%&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|notifyloginfailures&lt;br /&gt;
|&lt;br /&gt;
|20%&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|metacourse syncing&lt;br /&gt;
|&lt;br /&gt;
|20%&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|createpasswordemails&lt;br /&gt;
|&lt;br /&gt;
|20%&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|tag cron&lt;br /&gt;
|&lt;br /&gt;
|20%&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|clean contexts&lt;br /&gt;
|&lt;br /&gt;
|20%&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|gc_cache_flags&lt;br /&gt;
|&lt;br /&gt;
|20%&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|build_context_path&lt;br /&gt;
|&lt;br /&gt;
|20%&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|scheduled backups&lt;br /&gt;
|&lt;br /&gt;
|daily (admin defined)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|make rss feeds&lt;br /&gt;
|&lt;br /&gt;
|every run&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|auth/mnet&lt;br /&gt;
|keepalives&lt;br /&gt;
|every run&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|auth/mnet&lt;br /&gt;
|delete old sessions&lt;br /&gt;
|every run&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|auth/ldap&lt;br /&gt;
|sync users&lt;br /&gt;
|custom&lt;br /&gt;
|not scheduled (external cronjob)&lt;br /&gt;
|-&lt;br /&gt;
|auth/cas&lt;br /&gt;
|sync users&lt;br /&gt;
|custom&lt;br /&gt;
|not scheduled (external cronjob)&lt;br /&gt;
|-&lt;br /&gt;
|auth/db&lt;br /&gt;
|sync users&lt;br /&gt;
|custom&lt;br /&gt;
|not scheduled (external cronjob)&lt;br /&gt;
|-&lt;br /&gt;
|enrol/authorize&lt;br /&gt;
|clears old data&lt;br /&gt;
|daily (admin defined)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|enrol/authorize&lt;br /&gt;
|notifies administrators of old data&lt;br /&gt;
|daily (admin defined)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|enrol/authorize&lt;br /&gt;
|process orders &amp;amp; email teachers&lt;br /&gt;
|every run&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|enrol/flatfile&lt;br /&gt;
|read file and sync users&lt;br /&gt;
|every run&lt;br /&gt;
|!?!&lt;br /&gt;
|-&lt;br /&gt;
|enrol/imsenterprise&lt;br /&gt;
|read file and sync users&lt;br /&gt;
|every run&lt;br /&gt;
|!?!?!&lt;br /&gt;
|-&lt;br /&gt;
|enrol/manual&lt;br /&gt;
|notify people of pending unenrolments&lt;br /&gt;
|daily&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|statistics&lt;br /&gt;
|&lt;br /&gt;
|daily (admin defined)&lt;br /&gt;
|huge&lt;br /&gt;
|-&lt;br /&gt;
|grade/import&lt;br /&gt;
|none&lt;br /&gt;
|every run&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|grade/export&lt;br /&gt;
|none&lt;br /&gt;
|every run&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|grade/reports&lt;br /&gt;
|none&lt;br /&gt;
|every run&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|fetch blog entries&lt;br /&gt;
|&lt;br /&gt;
|every run&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|file gc&lt;br /&gt;
|&lt;br /&gt;
|(optional) daily, else every run?&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|local cron&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
&lt;br /&gt;
* Audit all existing cronjobs (done)&lt;br /&gt;
* Implement the locking code, either Matt&#039;s or something similar and write robust tests for it (this will be hard to test perhaps - can we test race conditions using simpletest?)&lt;br /&gt;
* Write the black magic that hands out the next task to be run for a given cron process&lt;br /&gt;
* Rewrite cron.php to use the black magic&lt;br /&gt;
* Migrate all the existing cronjobs to the new system&lt;br /&gt;
* Write screens to allow administrators to reschedule tasks&lt;br /&gt;
* Write code to transfer between unix-cron-syntax and user-friendly syntax (and vice versa)&lt;br /&gt;
* Write code to capture requests to schedule once off tasks&lt;br /&gt;
* Update portfolio code to use once off tasks rather than events API&lt;br /&gt;
* Evaluate integration of event API to once off tasks&lt;br /&gt;
* Test thoroughly&lt;br /&gt;
&lt;br /&gt;
The above tasks are now in MDL-25499 as sub-tasks to implement this proposal.&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Development:Cohorts&amp;diff=140829</id>
		<title>Development:Cohorts</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Development:Cohorts&amp;diff=140829"/>
		<updated>2021-07-14T13:24:22Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Text replacement - &amp;quot;class=&amp;quot;nicetable&amp;quot;&amp;quot; to &amp;quot;class=&amp;quot;wikitable&amp;quot;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Work in progress}}&lt;br /&gt;
{{Infobox Project&lt;br /&gt;
|name = Cohorts&lt;br /&gt;
|state = Work in progress&lt;br /&gt;
|tracker = MDL-21781&lt;br /&gt;
|discussion = n/a&lt;br /&gt;
|assignee = [[User:Petr Škoda (škoďák)|Petr Škoda (škoďák)]]&lt;br /&gt;
}}&lt;br /&gt;
{{Moodle 2.0}}&lt;br /&gt;
&lt;br /&gt;
=Goals=&lt;br /&gt;
Site-wide groups (aka cohorts) is one of the most requested missing features.&lt;br /&gt;
# Simplify manual enrolments - instead of enrolling students one by one, it would be possible to enrol a cohort with single click.&lt;br /&gt;
# Cohort enrolment plugin - new enrolment plugin synchronising users in cohort with enrolments in a course (including role assignment and group membership)&lt;br /&gt;
# Synchronisation with external systems - some external systems do not know the actual courses, they only contain some user groups, at present we do not have a simple way to reuse these groups in Moodle.&lt;br /&gt;
# Partially replace meta courses&lt;br /&gt;
# Replace category enrolments - category enrolments have major design issues and are not compatible with incomming enrolment changes.&lt;br /&gt;
&lt;br /&gt;
=DB tables=&lt;br /&gt;
&lt;br /&gt;
Table &#039;&#039;cohort&#039;&#039; definition of site-wide groups (aka cohorts)&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Default&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;id&#039;&#039;&#039; &lt;br /&gt;
| int(10)&lt;br /&gt;
| auto-incrementing&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;contextid&#039;&#039;&#039; &lt;br /&gt;
| int(10)&lt;br /&gt;
|&lt;br /&gt;
| foreign key, references context.id&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| char(254)&lt;br /&gt;
| &lt;br /&gt;
| human readable cohort name&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;idnumber&#039;&#039;&#039;&lt;br /&gt;
| char(100)&lt;br /&gt;
| &lt;br /&gt;
| unique identifier of the cohort, can be used in external systems&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text&lt;br /&gt;
| &lt;br /&gt;
| longer description&lt;br /&gt;
|-&lt;br /&gt;
| descriptionformat&lt;br /&gt;
| int(2)&lt;br /&gt;
| &lt;br /&gt;
| text format&lt;br /&gt;
|-&lt;br /&gt;
| component&lt;br /&gt;
| char(100)&lt;br /&gt;
| &lt;br /&gt;
| component name of a plugin responsible for assignment of users (ex: auth_ldap, etc.), NULL means manual assignments&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| &lt;br /&gt;
| timestamp, creation date&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| &lt;br /&gt;
| timestamp, last modification&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Context specified can be system or course category level, defining of cohort a course context would not make much sense.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Table &#039;&#039;cohort_members&#039;&#039; stores cohort members&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Default&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;id&#039;&#039;&#039; &lt;br /&gt;
| int(10)&lt;br /&gt;
| auto-incrementing&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;cohortid&#039;&#039;&#039; &lt;br /&gt;
| int(10)&lt;br /&gt;
|&lt;br /&gt;
| foreign key, references cohort.id&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;userid&#039;&#039;&#039; &lt;br /&gt;
| int(10)&lt;br /&gt;
| &lt;br /&gt;
| foreign key, references user.id&lt;br /&gt;
|-&lt;br /&gt;
| timeadded&lt;br /&gt;
| int(10)&lt;br /&gt;
| &lt;br /&gt;
| timestamp, when added&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=New capabilities=&lt;br /&gt;
* moodle/cohort:assign - add/delete members (only for manual assignment cohorts with source == null)&lt;br /&gt;
* moodle/cohort:manage  -add/delete/move cohorts&lt;br /&gt;
* moodle/cohort:view - view membership and use cohort elsewhere&lt;br /&gt;
&lt;br /&gt;
Context id defined in cohort table is used for access control only, the cohort may be actually used in any context (this may happen when moving courses, categories or cohorts).&lt;br /&gt;
&lt;br /&gt;
=User interface=&lt;br /&gt;
# Cohort edit link in CONTEXT_SYSTEM and each CONTEXT_COURSECAT- most probably from the settings block&lt;br /&gt;
# Option for manual cohort enrolment - part of new enrolment UI&lt;br /&gt;
# New UI in cohort enrolment plugin&lt;br /&gt;
# New options in group creation UI&lt;br /&gt;
# New options for sync with external groups in auth or enrol plugins&lt;br /&gt;
&lt;br /&gt;
=Implementation steps=&lt;br /&gt;
# add db tables and cohort membership UI&lt;br /&gt;
# add option to assign role to all cohort users (one time only, no sync)&lt;br /&gt;
# enrolment rewrite&lt;br /&gt;
# cohort enrolment plugin&lt;br /&gt;
&lt;br /&gt;
=Upgrade=&lt;br /&gt;
&lt;br /&gt;
Cohorts are designed to replace course category enrolments because the new enrolment plugin is not compatible with this.&lt;br /&gt;
&lt;br /&gt;
=See also=&lt;br /&gt;
* [[Obsolete:Enrolment rewrite and role tweaks proposal]]&lt;br /&gt;
* [[Development:New permissions evaluation in 2.0]]&lt;br /&gt;
* [[Development:New permission overriding UI]]&lt;br /&gt;
* [[Development:New enrolments in 2.0]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Roles]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Regular_Expression_Short-Answer_question_type&amp;diff=140828</id>
		<title>Regular Expression Short-Answer question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Regular_Expression_Short-Answer_question_type&amp;diff=140828"/>
		<updated>2021-07-14T13:24:21Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Text replacement - &amp;quot;class=&amp;quot;nicetable&amp;quot;&amp;quot; to &amp;quot;class=&amp;quot;wikitable&amp;quot;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox plugin&lt;br /&gt;
|type = question type&lt;br /&gt;
|entry = https://moodle.org/plugins/pluginversions.php?plugin=qtype_regexp&lt;br /&gt;
|tracker = https://github.com/rezeau/moodle-qtype_regexp/issues&lt;br /&gt;
|discussion = https://moodle.org/plugins/qtype_regexp&lt;br /&gt;
|maintainer = [[user:Joseph Rézeau]]&lt;br /&gt;
|float = right&lt;br /&gt;
}}{{Questions}}&lt;br /&gt;
===The RegExp Short Answer Question===&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;IMPORTANT NOTE&#039;&#039;&#039;&lt;br /&gt;
** The RegExp Short Answer question described in this documentation page is a 3rd-party plugin, which allows you to create questions for the &#039;&#039;&#039;&#039;&#039;Quiz&#039;&#039;&#039;&#039;&#039; activity. It is &#039;&#039;different&#039;&#039; from the &amp;quot;Use regular expressions&amp;quot; option in the &#039;&#039;&#039;&#039;&#039;Lesson&#039;&#039;&#039;&#039;&#039; module.&lt;br /&gt;
** The documentation for the &amp;quot;Use regular expressions&amp;quot; option in the &#039;&#039;&#039;&#039;&#039;Lesson&#039;&#039;&#039;&#039;&#039; module is to be found at: [https://docs.moodle.org/en/Short_answer_analysis Short answer analysis].&lt;br /&gt;
&lt;br /&gt;
Like the Short Answer question, the RegExp Short Answer question expects the respondent to answer an &amp;quot;open&amp;quot; question with a word or a short phrase. However, the RegExp system gives you access to a more powerful system for &#039;&#039;analysing the student&#039;s answers&#039;&#039; with the aim of &#039;&#039;providing more relevant immediate feedback&#039;&#039;.&lt;br /&gt;
The RegExp Short Answer question is meant to be used with questions requiring &#039;&#039;&#039;natural language&#039;&#039;&#039; answers. This question type is not well-suited to questions requiring mathematical, scientific, programming &amp;quot;languages&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Correct answer matching a regular expression pattern===&lt;br /&gt;
&lt;br /&gt;
It is not possible to give complete examples of the vast possibilities offered by this system, and the following are just some possibilities.&lt;br /&gt;
&lt;br /&gt;
====&#039;&#039;&#039;Example 1.&#039;&#039;&#039;====&lt;br /&gt;
&lt;br /&gt;
Suppose your question was &amp;quot;What are the colors of the French flag?&amp;quot;. In the Answer 1 box you would type the &amp;quot;best&amp;quot; answer, e.g. &amp;quot;it&#039;s blue, white and red&amp;quot;. For more details, see [[#firstcorrect|First correct answer]] below.&lt;br /&gt;
&lt;br /&gt;
*In the Answer 2 box you would type this regular expression: &amp;quot;it&#039;s blue, white(,| and) red&amp;quot; (quotes should not be typed, of course).&lt;br /&gt;
* If [[#casesensivity|Case sensivity]] is set to &amp;quot;No&amp;quot;, this will match any of those 4 responses:&lt;br /&gt;
    it&#039;s blue, white, red&lt;br /&gt;
    it&#039;s blue, white and red&lt;br /&gt;
    It&#039;s blue, white, red&lt;br /&gt;
    It&#039;s blue, white and red&lt;br /&gt;
&lt;br /&gt;
====&#039;&#039;&#039;Example 2&#039;&#039;&#039;.====&lt;br /&gt;
&lt;br /&gt;
Question: &amp;quot;What are blue, red and yellow?&amp;quot;. &lt;br /&gt;
* Answer 1: &amp;quot;they are colours&amp;quot;. &lt;br /&gt;
* Answer 2: &amp;quot;(|they(&#039;| a)re )colou?rs&amp;quot;. &lt;br /&gt;
* This will match any of those 6 responses:&lt;br /&gt;
    colours&lt;br /&gt;
    colors&lt;br /&gt;
    they&#039;re colours&lt;br /&gt;
    they&#039;re colors&lt;br /&gt;
    they are colours&lt;br /&gt;
    they are colors&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note&#039;&#039;&#039;&#039;&#039;.- The beginning of this regular expression &amp;quot;(|they(&#039;| a)re )&amp;quot; will match either nothing or &amp;quot;they&#039;re &amp;quot; or &amp;quot;they are &amp;quot;. In &amp;quot;colou?r&amp;quot;, the question-mark means: the preceding character (or parenthesized group of characters) zero or one time; it is used here to match British English as well as US spelling. &lt;br /&gt;
&lt;br /&gt;
====&#039;&#039;&#039;Example 3.&#039;&#039;&#039;====&lt;br /&gt;
&lt;br /&gt;
Question: &amp;quot;Name an animal whose name consists of 3 letters and the middle letter is the vowel &#039;&#039;a&#039;&#039;&amp;quot;.&lt;br /&gt;
* Answer 1: &amp;quot;cat&amp;quot;&lt;br /&gt;
* Answer 2: &amp;quot;[bcr]at&amp;quot;. &lt;br /&gt;
* This will match: bat, cat or rat.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note&#039;&#039;&#039;&#039;&#039;.- In Regular Expression syntax, the inclusion of characters between square brackets means than ANY of those characters can be used. So, in the above example, the regular expression &amp;quot;[bcr]at&amp;quot; is the exact equivalent of &amp;quot;(b|c|r)at&amp;quot;. Be careful NOT to include the pipe character as separator in your [...] regular expressions. For instance, &amp;quot;[b|c|r]at&amp;quot; will NOT WORK CORRECTLY.&lt;br /&gt;
&lt;br /&gt;
====&#039;&#039;&#039;Example 4.&#039;&#039;&#039;====&lt;br /&gt;
&lt;br /&gt;
The &#039;permutation&#039; feature (introduced in regexp version &#039;&#039;&#039;2012102900&#039;&#039;&#039; for Moodle 2.3+)&lt;br /&gt;
&lt;br /&gt;
Question: &amp;quot;What are the colours of the French flag (in any order)&amp;quot;.&lt;br /&gt;
* Answer 1: &amp;quot;it&#039;s blue, white and red&amp;quot;&lt;br /&gt;
* Answer 2: &amp;lt;nowiki&amp;gt;&amp;quot;it&#039;s [[_blue_, _white_(,| and) _red_]]&amp;quot;.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
Upon saving the question, Answer 2 will be automatically re-written as Answer 2b:&lt;br /&gt;
&lt;br /&gt;
it&#039;s (blue, white(,| and) red|blue, red(,| and) white|white, red(,| and) blue|white, blue(,| and) red|red, blue(,| and) white|red, white(,| and) blue) &lt;br /&gt;
&lt;br /&gt;
and it will match all the following answers:&lt;br /&gt;
    it&#039;s blue, white, red&lt;br /&gt;
    it&#039;s blue, white and red&lt;br /&gt;
    it&#039;s blue, red, white&lt;br /&gt;
    it&#039;s blue, red and white&lt;br /&gt;
    it&#039;s white, red, blue&lt;br /&gt;
    it&#039;s white, red and blue&lt;br /&gt;
    it&#039;s white, blue, red&lt;br /&gt;
    it&#039;s white, blue and red&lt;br /&gt;
    it&#039;s red, blue, white&lt;br /&gt;
    it&#039;s red, blue and white&lt;br /&gt;
    it&#039;s red, white, blue&lt;br /&gt;
    it&#039;s red, white and blue&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note&#039;&#039;&#039;&#039;&#039;.- This &#039;permutation feature&#039; has been asked quite a few times by regexp users. It is definitely &#039;&#039;not&#039;&#039; possible to obtain it by using standard Regular Expressions syntax. &lt;br /&gt;
&lt;br /&gt;
It is possible (but tedious) to write a regular expression including all the possible permutations - as in Answer 2b above - but the &#039;&#039;ad hoc&#039;&#039; syntax I am offering makes it easier to write... provided you strictly adhere to that syntax!&lt;br /&gt;
&lt;br /&gt;
Include within double square brackets the part of the Answer which will contain &#039;permutable&#039; words or phrases. You are actually allowed to have a maximum of 2 such sets of &#039;permutable&#039; words or phrases. But you cannot embed one set within another!&lt;br /&gt;
&lt;br /&gt;
Then, use pairs of underscores (the _ character) to delimit each &#039;permutable&#039; word or phrase. You can still use any of the accepted Regular Expressions characters, as explained here, in your Answers which contain one (or two) such sets of &#039;permutable&#039; words or phrases. If your Answer does not contain an even number of underscores, an Error warning will be displayed upon clicking the Show Alternate Answers button or when trying to Save your question.&lt;br /&gt;
&lt;br /&gt;
====&#039;&#039;&#039;Example 5.&#039;&#039;&#039;====&lt;br /&gt;
&lt;br /&gt;
Another &#039;permutation&#039; example&lt;br /&gt;
&lt;br /&gt;
Question: &amp;quot;Quote the English proverb that is an encouragement to hard, diligent work.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Answer 1: &amp;quot;Early to bed and early to rise makes a man healthy, wealthy and wise&amp;quot;&lt;br /&gt;
* Answer 2: &amp;quot;Early to &amp;lt;nowiki&amp;gt;[[_bed_ and early to _rise_]], makes a man [[_healthy_, _wealthy_ and _wise_]]&amp;lt;/nowiki&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Upon saving the question, Answer 2 will be automatically re-written as Answer 2b:&lt;br /&gt;
&lt;br /&gt;
Early to (bed and early to rise|rise and early to bed) makes a man (healthy, wealthy and wise|healthy, wise and wealthy|wealthy, wise and healthy|wealthy, healthy and wise|wise, healthy and wealthy|wise, wealthy and healthy)&lt;br /&gt;
&lt;br /&gt;
and it will match all the following answers:&lt;br /&gt;
&lt;br /&gt;
    Early to bed and early to rise makes a man healthy, wealthy and wise&lt;br /&gt;
    Early to bed and early to rise makes a man healthy, wise and wealthy&lt;br /&gt;
    Early to bed and early to rise makes a man wealthy, wise and healthy&lt;br /&gt;
    Early to bed and early to rise makes a man wealthy, healthy and wise&lt;br /&gt;
    Early to bed and early to rise makes a man wise, healthy and wealthy&lt;br /&gt;
    Early to bed and early to rise makes a man wise, wealthy and healthy&lt;br /&gt;
    Early to rise and early to bed makes a man healthy, wealthy and wise&lt;br /&gt;
    Early to rise and early to bed makes a man healthy, wise and wealthy&lt;br /&gt;
    Early to rise and early to bed makes a man wealthy, wise and healthy&lt;br /&gt;
    Early to rise and early to bed makes a man wealthy, healthy and wise&lt;br /&gt;
    Early to rise and early to bed makes a man wise, healthy and wealthy&lt;br /&gt;
    Early to rise and early to bed makes a man wise, wealthy and healthy&lt;br /&gt;
&lt;br /&gt;
===Escaping metacharacters===&lt;br /&gt;
&lt;br /&gt;
====Definition====&lt;br /&gt;
In the Regular Expressions syntax, a number of special characters or &#039;&#039;meta characters&#039;&#039; have special functions; but it is possible to force these special characters to be interpreted as normal (or &#039;&#039;literal&#039;&#039;) characters by preceding them with a so-called &#039;&#039;escape&#039;&#039; character, the backslash &amp;quot;\&amp;quot;. &lt;br /&gt;
Below is a (partial) list of those &#039;&#039;meta characters&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;. ^ $ * ( ) [ ] + ? | { } \ /&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====In Accepted Answers====&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Accepted Answers&#039;&#039;&#039; are Answers which have a grade greater than zero, i.e. are &#039;&#039;totally&#039;&#039; (grade = 100%) or &#039;&#039;partially&#039;&#039; (grade &amp;gt; 0% &amp;lt; 100%) &#039;&#039;correct Answers&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
In those Answers, if you need to use one or more &#039;&#039;meta characters&#039;&#039; for their &#039;&#039;literal&#039;&#039; value, you &#039;&#039;&#039;must&#039;&#039;&#039; &#039;&#039;escape&#039;&#039; them (i.e. precede them with a backslash). &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example 1.-&#039;&#039;&#039; If you want to accept the answer &amp;quot;This computer costs 1000$ in the US.&amp;quot;, you must write the Answer as &amp;quot;This computer costs 1000\$ in the US\.&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example 2.-&#039;&#039;&#039; If you want to accept the answer &amp;quot;Desktop computers are (usually) more powerful than laptops.&amp;quot;, you must write the Answer as &amp;quot;Desktop computers are \(usually\) more powerful than laptops\.&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
* You can mix metacharacters that have a special function with others that have a literal value, within one Answer.&lt;br /&gt;
&#039;&#039;&#039;Example 3.-&#039;&#039;&#039; If you want to accept both answers &amp;quot;Computers are (usually) cheaper than cars.&amp;quot; and &amp;quot;Computers are (usually) less expensive than cars.&amp;quot;, you must write the Answer as &amp;quot;Computers are \(usually\) (cheaper|less expensive) than cars.&amp;quot;. &lt;br /&gt;
* In the &#039;&#039;&#039;Accepted Answers&#039;&#039;&#039; boxes you can only enter regular expressions which can generate a finite number of sentences. That is why you will not be allowed to use some &#039;&#039;meta characters&#039;&#039; which match a potentially infinite number of sentences.&lt;br /&gt;
* List of &#039;&#039;meta characters&#039;&#039; which you &#039;&#039;&#039;can&#039;&#039;&#039; use for their RegExp functions:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;( ) [ ] ? |&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* List of &#039;&#039;meta characters&#039;&#039; which you &#039;&#039;&#039;cannot&#039;&#039;&#039; use for their RegExp functions, and can only be used for their &#039;&#039;literal&#039;&#039; value (and must be &#039;&#039;escaped&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;. ^ $ * + { } \ /&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* The question mark (?) can be used either for its RegExp function OR, if escaped, for its &#039;&#039;literal&#039;&#039; value.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example 4.-&#039;&#039;&#039; &amp;quot;Do you like Jack(ie)?\?&amp;quot; will accept both &amp;quot;Do you like Jack?&amp;quot; and &amp;quot;Do you like Jackie?&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====In Incorrect Answers====&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Incorrect Answers&#039;&#039;&#039; are Answers which have a grade equal to zero (or None).&lt;br /&gt;
When you write those Incorrect Answers, you can use the whole range of &#039;&#039;meta characters&#039;&#039; for their special function value:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;. ^ $ * ( ) [ ] + ? | { } \ /&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For examples of use, see &#039;&#039;&#039;Detecting missing required words or character strings&#039;&#039;&#039; below.&lt;br /&gt;
&lt;br /&gt;
====Answers Validation====&lt;br /&gt;
&lt;br /&gt;
When you validate your Question, the question engine checks the validity of your expression, according to the features explained above. If an error is found, an ERROR message is displayed above the erroneous Answer(s) and you cannot save the Question until that error has been corrected.&lt;br /&gt;
&lt;br /&gt;
The validation system also checks that your parentheses and square brackets are correctly balanced.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note.-&#039;&#039;&#039; The faulty Answer text is &amp;quot;underlined&amp;quot; with the list of errors, as shown below.&lt;br /&gt;
&lt;br /&gt;
[[Image:Errors_en.jpg]]&lt;br /&gt;
&lt;br /&gt;
===Detecting missing required words or character strings===&lt;br /&gt;
&lt;br /&gt;
This is a powerful feature of the RegExp question type. It will analyse the student&#039;s answer for words that are required for the answer to be correct. There are 2 ways to do this.&lt;br /&gt;
* Use what is called &amp;quot;negative lookahead assertion&amp;quot; in regular expressions syntax: &#039;&#039;&#039;^(?!.*required.*)&#039;&#039;&#039;&lt;br /&gt;
* or use an &#039;&#039;ad hoc&#039;&#039; pseudo-syntax provided in RegExp (an initial double hyphen): &#039;&#039;&#039;--.*required.*&#039;&#039;&#039;.&lt;br /&gt;
In the examples below, we shall be using the &#039;ad hoc&#039; RegExp pseudo-syntax, and sometimes give the &amp;quot;negative lookahead assertion&amp;quot; equivalent for anyone interested.&lt;br /&gt;
&lt;br /&gt;
Any Teacher Answer which begins with a double hyphen will analyse the student’s response to find out whether the following string is present or absent. If present, the analysis continues to the next question; if absent, the analysis stops and the relevant feedback message is displayed.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example 4. &#039;&#039;&#039; Question &amp;quot;What are the colors of the French flag?&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* Teacher Answer 2: --.*blue.*&lt;br /&gt;
* Sample student Response: &amp;quot;it&#039;s red and white&amp;quot;&lt;br /&gt;
* Feedback 2: The color of the sky is missing!&lt;br /&gt;
&lt;br /&gt;
Here, the . (dot) stands for “any character” and the * (asterisk) means “preceding special character repeated any number of times”. The Teacher Answer 2 regular expression above means: check whether the character string &amp;quot;blue&amp;quot;, preceded with anything and followed by anything is absent from the student&#039;s answer. Please note that the use of the asterisk is different in Moodle&#039;s &amp;quot;normal&amp;quot; Short Answer question type and in the RegExp question type.&lt;br /&gt;
&lt;br /&gt;
Actually, this syntax is not sufficient to track the absence of the word &amp;quot;blue&amp;quot; in a student&#039;s answer such as &amp;quot;it&#039;s blueish, white and red&amp;quot;. To make sure that we want to track the absence of &amp;quot;blue&amp;quot; as a word(and not just as part of a word), we must use the metacharacter \b which is an anchor which matches at a position that is called a &amp;quot;word boundary&amp;quot;. Hence the new version of our Example 4:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example 4b. &#039;&#039;&#039; Question &amp;quot;What are the colors of the French flag?&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* Teacher Answer 2: --.*\bblue\b.*&lt;br /&gt;
* Sample student Response: &amp;quot;it&#039;s blueish, white and red&amp;quot;&lt;br /&gt;
* Feedback 2: The color of the sky is missing!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note.-&#039;&#039;&#039;&lt;br /&gt;
Using the &amp;quot;negative lookahead assertion&amp;quot; syntax mentioned at the beginning of this section, Teacher Answer 2 would look like this:&lt;br /&gt;
* Teacher Answer 2: &#039;&#039;&#039;^(?!&#039;&#039;&#039;.*\bblue\b.*&#039;&#039;&#039;)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example 5.&#039;&#039;&#039; Question: &amp;quot;Name an animal whose name consists of 3 letters and the middle letter is the vowel &#039;&#039;a&#039;&#039;&amp;quot;. &lt;br /&gt;
* Teacher Answer: &amp;quot;--^[bcr].*&amp;quot;. &#039;&#039;&#039;OR&#039;&#039;&#039; * Teacher Answer: &amp;quot;--^(b|c|r).*&amp;quot;.&lt;br /&gt;
* Sample student Response: &amp;quot;dog&amp;quot;&lt;br /&gt;
* Feedback: &amp;quot;Your answer should start with one of these letters: b, c or r&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note.-&#039;&#039;&#039;&lt;br /&gt;
In regular expressions syntax, the caret ^ stands for &amp;quot;beginning of character string to be matched&amp;quot;, while the dollar sign $ stands for &amp;quot;end of character string&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example 6.&#039;&#039;&#039; Question &amp;quot;What are the colors of the French flag?&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* Teacher Answer: &amp;quot;--.*(blue|red|white).*&amp;quot;&lt;br /&gt;
* Sample student Response #1: &amp;quot;It&#039;s black and orange.&amp;quot;&lt;br /&gt;
* Feedback: &amp;quot;You have not even found one of the colors of the French flag!&amp;quot;&lt;br /&gt;
* Sample student Response #2: &amp;quot;It&#039;s blue and orange.&amp;quot;&lt;br /&gt;
* Feedback: None, the analysis continues to the next Teacher Answer expression.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Explanation&#039;&#039;&#039;&#039;&#039;.- The regular expression looks for a missing word among those listed between brackets and separated by the | sign. As soon as one of those words is found, the &amp;quot;missing condition&amp;quot; is considered false, and the response analysis continues to the next Answer&#039;s regular expression.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note.-&#039;&#039;&#039;&lt;br /&gt;
Using the &amp;quot;negative lookahead assertion&amp;quot; syntax, Teacher Answer would look like this: &#039;&#039;&#039;^(?!.*(blue|red|white).*)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example 7.&#039;&#039;&#039; Question &amp;quot;What are the colors of the French flag?&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* Teacher Answer: &amp;quot;--.*(&#039;&#039;&#039;&amp;amp;&amp;amp;&#039;&#039;&#039;blue&#039;&#039;&#039;&amp;amp;&amp;amp;&#039;&#039;&#039;red&#039;&#039;&#039;&amp;amp;&amp;amp;&#039;&#039;&#039;white).*&amp;quot;&lt;br /&gt;
* Sample student Response #1: &amp;quot;It&#039;s blue and orange.&amp;quot;&lt;br /&gt;
* Feedback: &amp;quot;You have not found all the colors of the French flag&amp;quot;.&lt;br /&gt;
* Sample student Response #2: &amp;quot;white blue red&amp;quot;.&lt;br /&gt;
* Feedback: None, the analysis continues to the next Teacher Answer expression.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Explanation&#039;&#039;&#039;&#039;&#039;.- The regular expression looks for a missing word among all of those listed between brackets and separated by the &amp;amp;&amp;amp; double character combination. Only if all of those words are present, will the &amp;quot;missing condition&amp;quot; be considered false, and the response analysis continue to the next Answer&#039;s regular expression. Please note that the list of parenthesized words must begin with the &amp;amp;&amp;amp; character sequence.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note.-&#039;&#039;&#039;&lt;br /&gt;
Using the &amp;quot;negative lookahead assertion&amp;quot; syntax, Teacher Answer would look like this: &#039;&#039;&#039;(^(?!.*(blue).*)|^(?!.*(white).*)|^(?!.*(red).*))&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Editing a regular expression question===&lt;br /&gt;
&lt;br /&gt;
[[Image:regexp settings 01.jpg]]&lt;br /&gt;
&lt;br /&gt;
====Help Button Mode====&lt;br /&gt;
&lt;br /&gt;
Selecting a mode other than &#039;&#039;None&#039;&#039; will display a button to enable the student to get the next letter or word or punctuation mark (including the very first letter or word).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The &amp;quot;Word or Punctuation&amp;quot; help mode is a new feature starting in Moodle 3.1.&lt;br /&gt;
&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In &#039;&#039;Adaptive mode&#039;&#039; the button displayed will say &amp;quot;Buy next letter&amp;quot; or &amp;quot;Buy next word&amp;quot; or &amp;quot;Buy next word or punctuation&amp;quot; according to the mode selected by the teacher. For setting the &amp;quot;cost&amp;quot; of buying a letter or word, see the &#039;&#039;Penalty for incorrect tries and Buying a letter or word&#039;&#039; settings further down the Edit form.&lt;br /&gt;
&lt;br /&gt;
In &#039;&#039;Adaptive No penalty&#039;&#039; mode the button displayed will say &amp;quot;Get next letter&amp;quot; or &amp;quot;Get next word&amp;quot; or &amp;quot;Get next word or punctuation&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
By default the Help button mode value is set at &#039;&#039;&#039;None&#039;&#039;&#039;. The Help button will only be available to quizzes that have their &#039;&#039;&#039;Question behaviour&#039;&#039;&#039; mode set to &#039;&#039;Adaptive&#039;&#039; or &#039;&#039;Adaptive (no penalties)&#039;&#039; as it does not make sense to enable the Help button for non-adaptive tests.&lt;br /&gt;
&lt;br /&gt;
====Show alternate answers to student====&lt;br /&gt;
Show all correct alternative answers to student when on review page? If there are a lot of automatically generated correct alternative answers, displaying them all can make the review page quite long. So, you may wish to &#039;&#039;not&#039;&#039; display all those alternative correct answers. The first correct answer will always be displayed, under the label &amp;quot;The best correct answer is:&amp;quot;&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;span id=&amp;quot;firstcorrect&amp;quot;&amp;gt;First correct answer&amp;lt;/span&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
For Answer 1 you must enter an answer text which a) is the &amp;quot;best&amp;quot; possible answer; b) is &#039;&#039;&#039;not&#039;&#039;&#039; a regular expression or - more exactly - &#039;&#039;will not be interpreted as a regular expression&#039;&#039; but &amp;quot;as is&amp;quot; and c) has a Grade value of 100%. You will notice that when you create a new RegExp question the Grade value for Answer 1 is already automatically set at 100% and cannot be changed.&lt;br /&gt;
&lt;br /&gt;
Note.- There are two ways to enter an answer containing meta characters, according to whether this is Answer 1 or any of the subsequent Answers. Exemple question: how much did your computer cost?&lt;br /&gt;
&lt;br /&gt;
Answer 1: It cost $1,000.&lt;br /&gt;
&lt;br /&gt;
Answer 2: It cost (me )?\$1,000\.&lt;br /&gt;
&lt;br /&gt;
In Anwer 1 you just type the expected answer &amp;quot;as is&amp;quot;. The text in Answer 2 will be interpreted as a regular expression, and thus you need to escape the two meta characters (the $ sign and the end-of-sentence full stop). Note that here I have added the optional pronoun &amp;quot;me&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====Other answers====&lt;br /&gt;
&lt;br /&gt;
Any answers with a Grade higher than 0% must be entered as valid regular expressions &#039;&#039;which can yield acceptable alternative answers&#039;&#039; (regardless of the Grade being less than 100%).&lt;br /&gt;
&lt;br /&gt;
For example, you cannot enter the following Answer with a grade greater than zero:&lt;br /&gt;
&lt;br /&gt;
.*blue, white(,| and) red.*&lt;br /&gt;
&lt;br /&gt;
The reason is that this expression would accept as correct (with a non-null grade) an infinity of answers, many of which would be incorrect, e.g.: &amp;quot;My hat it blue, white, red and orange&amp;quot;, &amp;quot;The French flag is blue, white, red, black and nice&amp;quot; etc.&lt;br /&gt;
&lt;br /&gt;
If you try to do so, validation of your question will fail and an error message will be displayed to tell you where you went wrong.&lt;br /&gt;
&lt;br /&gt;
This means that some regular expressions, which are perfectly valid and would correctly analyse the student&#039;s (correct) answer are not recommended. The only case where they would work is a) if your question&#039;s &#039;&#039;&#039;Display Hint Button&#039;&#039;&#039; is set at No and b) your quiz &#039;&#039;&#039;Adaptative Mode&#039;&#039;&#039; is set at No. This means that you must &#039;&#039;not&#039;&#039; enter as an answer with a grade higher than 0% a regular expression beginning with a double hyphen &amp;quot;--&amp;quot;, used for detecting missing character strings.&lt;br /&gt;
&lt;br /&gt;
====Show/Hide alternate answers====&lt;br /&gt;
&lt;br /&gt;
When you are creating (or modifying) a RegExp question, you may want to make sure that all the alternative correct answers that you have created in the Answers fields will work. You can click the &#039;&#039;&#039;Show alternate answers&#039;&#039;&#039; button to calculate and display all the correct answers in the form you are editing. This may take quite some time on your server, depending on the number and complexity of the regular expressions you have entered in the Answer fields!&lt;br /&gt;
&lt;br /&gt;
On the other hand, it is the recommended way to check that your &amp;quot;correct answers&amp;quot; expressions are correctly written. Here is an example.&lt;br /&gt;
&lt;br /&gt;
Please remember that only Answers regular expressions with a score greater than zero will be used to calculate those alternative answers.&lt;br /&gt;
&lt;br /&gt;
Please note that clicking the &#039;&#039;&#039;Show alternate answers&#039;&#039;&#039; button will perform an analysis of all the regular expressions you entered in the Answers field. If a syntax error is detected at this stage, the alternative correct answers will &#039;&#039;not&#039;&#039; be displayed, and an &#039;&#039;ad hoc&#039;&#039; error message will displayed above the faulty regular expression.&lt;br /&gt;
&lt;br /&gt;
[[Image:showhidealternateanswers.jpg]]&lt;br /&gt;
&lt;br /&gt;
===Automatic formatted extra feedback===&lt;br /&gt;
Please note that the RegExp question can be used in any &#039;&#039;&#039;Question behaviour&#039;&#039;&#039; mode. However, it is advised to create quizzes containing only RegExp questions or containing other types of questions, but &#039;&#039;preferably&#039;&#039; if the quiz&#039;s &#039;&#039;&#039;&#039;&#039;Question behaviour / How questions behave&#039;&#039;&#039;&#039;&#039; setting is set to &#039;&#039;Adaptive mode&#039;&#039; (with or without penalty).&lt;br /&gt;
&lt;br /&gt;
When a student (or teacher in Preview Question mode) submits a response to a RegExp question, 3 types of feedback messages are displayed (in Adaptive mode).&lt;br /&gt;
&lt;br /&gt;
* (line 3) The standard correct/incorrect Quiz message (plus the colour associated with either state).&lt;br /&gt;
* (line 2) The Feedback message entered by the question creator for each Teacher Answer.&lt;br /&gt;
* (line 1) An extra feedback system is automatically provided, displaying the student&#039;s submitted response, with the following format codes:&lt;br /&gt;
** the beginning of the student&#039;s submitted response which best matches one of the Alternate Answers is displayed in blue;&lt;br /&gt;
** any words from the submitted response which are present in the potential Alternate Answers following the initial correct part submitted (correct but misplaced words) are displayed on a green background;&lt;br /&gt;
** any words not present in the potential Alternate Answers following the initial correct part submitted (Wrong words) are displayed on a red background.&lt;br /&gt;
The meaning of those colours is explained below the feedback with the 2 labels &amp;quot;Wrong words&amp;quot; and &amp;quot;Misplaced words&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Please note that the colour scheme has been changed starting with the Moodle 3.1 version of RegExp.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Image:regexp04.jpg]]&lt;br /&gt;
&lt;br /&gt;
===Feedback given by the Help button===&lt;br /&gt;
&lt;br /&gt;
Each time a student clicks the &#039;&#039;&#039;Buy/Get next letter/word/punctuation&#039;&#039;&#039; button to buy/get a letter/word/punctuation mark, that letter, word or punctuation mark is added to their response. The last line of the feedback zone shows the following information: added letter/word; penalty cost (if applicable); total penalties so far (if applicable). Note that if the total of penalties exceeds 1 (i.e. 100%), that total is displayed in red. &lt;br /&gt;
&lt;br /&gt;
When the teacher views the quiz results, on the &#039;&#039;&#039;&#039;Review Attempt&#039;&#039;&#039;&#039; pages, &#039;&#039;&#039;&#039;Response history&#039;&#039;&#039;&#039; section, the response history shows &#039;&#039;Submit (with a request for help)&#039;&#039; with the response states before and after the letter/word/punctuation mark was added.&lt;br /&gt;
----&lt;br /&gt;
[[Image:regexp03.jpg]]&lt;br /&gt;
&lt;br /&gt;
===Display right answers===&lt;br /&gt;
&lt;br /&gt;
If your Quiz settings &#039;&#039;Review options&#039;&#039; are set to display the Right answer (During the attempt or Immediately after the attempt etc.), and your question&#039;s &#039;&#039;Show alternate answers to student&#039;&#039; setting is set to &#039;&#039;&#039;Yes&#039;&#039;&#039;, when the student has submitted his attempt, and is reviewing his answers, all of the possible answers will be displayed, as shown in this screenshot. Correct responses with a grade &amp;lt; 100% are also listed, with their grade value.&lt;br /&gt;
&lt;br /&gt;
Please note that the &#039;&#039;teacher&#039;&#039; will always be able to see that &amp;quot;other accepted answers&amp;quot; section when reviewing the Quiz answers.&lt;br /&gt;
&lt;br /&gt;
[[Image:23 correct responses.jpg]]&lt;br /&gt;
&lt;br /&gt;
===In the Mobile App===&lt;br /&gt;
Starting with the Moodle 3.5 version, RegExp includes code for the Moodle Mobile App. If you access a quiz with the mobile app that contains RegExp questions it will be automatically loaded as a remote add-on.&lt;br /&gt;
&lt;br /&gt;
[[Image:regexp05.jpg]]&lt;br /&gt;
&lt;br /&gt;
Similar to the &#039;&#039;short answer&#039;&#039; core question type instructions, &amp;quot;Normally the answer box appears below the question text. However, if you include five or more underscores in the text, the input box will be placed there.&amp;quot; This inline input feature has recently been made available to the Moodle mobile version for &amp;quot;short answer&amp;quot; questions. It is now available for the &amp;quot;regexp&amp;quot; question type as well.&lt;br /&gt;
&lt;br /&gt;
If you enter this regexp question text: The ____________ sat on the white mat.&lt;br /&gt;
&lt;br /&gt;
This is what it will look like in a moodle mobile quiz:&lt;br /&gt;
&lt;br /&gt;
[[Image:2019-06-04_18-40-30.jpg]]&lt;br /&gt;
&lt;br /&gt;
===Inserting RegExp sub-questions in Cloze type questions===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Important notice&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
The RegExp question type is &#039;&#039;&#039;&#039;&#039;not&#039;&#039;&#039;&#039;&#039; recognized by the standard Moodle &#039;&#039;&#039;Cloze&#039;&#039;&#039; question type. If you want to use it you&#039;ll have to replace 2 files (&#039;&#039;renderer.php&#039;&#039; and &#039;&#039;questiontype.php&#039;&#039;) on your &#039;&#039;&amp;lt;yourmoodle&amp;gt;/question/type/multianswer&#039;&#039; with the hacked files available from the links below. &#039;&#039;&#039;UPdated 26 NOVEMBER 2020&#039;&#039;&#039;.&lt;br /&gt;
Compatible with Moodle 3.10.&lt;br /&gt;
&lt;br /&gt;
https://raw.githubusercontent.com/rezeau/moodle_multianswer_regexp_compatible/master/questiontype.php&lt;br /&gt;
&lt;br /&gt;
https://raw.githubusercontent.com/rezeau/moodle_multianswer_regexp_compatible/master/renderer.php&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Syntax for inserting RegExp sub-questions in Cloze type questions.&lt;br /&gt;
&lt;br /&gt;
Use &#039;&#039;&#039;REGEXP&#039;&#039;&#039; or shorter &#039;&#039;&#039;RX&#039;&#039;&#039; coding for questions which ignore case&lt;br /&gt;
&lt;br /&gt;
* The colors of the French flag are {:REGEXP:=blue, white and red#Correct!}.&lt;br /&gt;
* The colors of the French flag are {:RX:=blue, white and red#Correct!}.&lt;br /&gt;
&lt;br /&gt;
Will accept &amp;quot;blue, white and red&amp;quot; as a correct answer as well as &amp;quot;Blue, White and Red&amp;quot;&lt;br /&gt;
&lt;br /&gt;
use &#039;&#039;&#039;REGEXP_C&#039;&#039;&#039; or shorter &#039;&#039;&#039;RXC&#039;&#039;&#039; coding for questions in which case matters&lt;br /&gt;
* The colors of the French flag are {:REGEXP_C:=blue, white and red#Correct!}.&lt;br /&gt;
* The colors of the French flag are {:RXC:=blue, white and red#Correct!}.&lt;br /&gt;
&lt;br /&gt;
Will not accept &amp;quot;Blue, White and Red&amp;quot; as a correct answer (wrong capital letters).&lt;br /&gt;
&lt;br /&gt;
Please note that, as explained above, the very first answer &#039;&#039;must&#039;&#039; be Graded 100% (in Cloze type question syntax, all correct is either &#039;&#039;&#039;=&#039;&#039;&#039; or &#039;&#039;&#039;100%&#039;&#039;&#039;) and it must &#039;&#039;not&#039;&#039; be a regular expression.&lt;br /&gt;
&lt;br /&gt;
A more complete example. If you enter the following in the text of a Cloze question:&lt;br /&gt;
&lt;br /&gt;
The colors of the French flag are {:REGEXP:=blue, white and red#Very correct indeed!~--.*\bblue\b.*#The color of the sky is missing!~--.*(blue|red|white).*#You have not even found one of the colors of the French flag!}. &lt;br /&gt;
&lt;br /&gt;
and click the &#039;&#039;Decode and verify the question text&#039;&#039; button, you will see this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
Question definition&lt;br /&gt;
{:REGEXP:=blue, white and red#Very correct indeed!~--.*(blue|red|white).*#You have not even found one of the colors of the French flag!~--.*\bblue\b.*#The color of the sky is missing!}&lt;br /&gt;
Default mark&lt;br /&gt;
1&lt;br /&gt;
Answer&lt;br /&gt;
blue, white and red&lt;br /&gt;
Grade&lt;br /&gt;
1&lt;br /&gt;
Feedback&lt;br /&gt;
Very correct indeed!&lt;br /&gt;
Answer&lt;br /&gt;
--.*(blue|red|white).*&lt;br /&gt;
Grade&lt;br /&gt;
0&lt;br /&gt;
Feedback&lt;br /&gt;
You have not even found one of the colors of the French flag!&lt;br /&gt;
Answer&lt;br /&gt;
--.*\bblue\b.*&lt;br /&gt;
Grade&lt;br /&gt;
0&lt;br /&gt;
Feedback&lt;br /&gt;
The color of the sky is missing!&amp;lt;/code&amp;gt; &lt;br /&gt;
[[Image:regexp_in_cloze_question.jpg]]&lt;br /&gt;
&lt;br /&gt;
Please note that the syntax of the sub-questions inside a Cloze-type question must be followed exactly and that you must never ever copy and paste any question text from e.g. a word-processor into the Cloze-type question editing window. Quite often Cloze-type questions yield errors because extraneous blank spaces, new lines, or any odd formatting character has made its way into the question text.&lt;br /&gt;
&lt;br /&gt;
Note that the &#039;&#039;Hint&#039;&#039; button is not available for a RegExp question embedded in a Cloze-type question.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
====Downloads====&lt;br /&gt;
* Download [http://moodle.org/plugins/view.php?plugin=qtype_regexp the Regexp question type] from the Moodle Plugins repository.&lt;br /&gt;
* IMPORTANT : Starting with the 2.2 version of REGEXP, if you want the Help feature, you must also download and install the following 2 &amp;quot;question behaviours&amp;quot; from the Moodle Plugins repository: [http://moodle.org/plugins/view.php?plugin=qbehaviour_regexpadaptivewithhelp RegExp Adaptive mode with Help]  and [http://moodle.org/plugins/view.php?plugin=qbehaviour_regexpadaptivewithhelpnopenalty RegExp Adaptive mode with Help (no penalties)].&lt;br /&gt;
&lt;br /&gt;
====Installation====&lt;br /&gt;
-------------------------------&lt;br /&gt;
If you have downloaded the zip archive from the new moodle.org plugins page&lt;br /&gt;
&lt;br /&gt;
1.- Unzip the zip archive to your local computer.&lt;br /&gt;
&lt;br /&gt;
2.- This will give you a folder named &amp;quot;regexp&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
3.- GO TO STEP 4 below&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
If you have downloaded the zip archive from https://github.com/rezeau/moodle-qtype_regexp (&#039;&#039;&#039;for latest developments&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
1.- Unzip the zip archive to your local computer.&lt;br /&gt;
&lt;br /&gt;
2.- This will give you a folder named something like &amp;quot;rezeau-moodle_qtype_regexp-ff8c6a1&amp;quot;. The end of the name may vary.&lt;br /&gt;
&lt;br /&gt;
3.- ***Rename*** that folder to &amp;quot;regexp&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
4.- Upload the regexp folder to &amp;lt;yourmoodle&amp;gt;/question/type/ folder.&lt;br /&gt;
&lt;br /&gt;
5.- Visit your Admin/Notifications page so that the new question type gets installed.&lt;br /&gt;
&lt;br /&gt;
====Learn more about regular expressions====&lt;br /&gt;
&lt;br /&gt;
*[http://www.regular-expressions.info/tutorial.html Regular Expressions Tutorial] A complete introduction to the topic.&lt;br /&gt;
*[http://www.regexplanet.com/simple/index.html Regular Expression Test Page] Test your regular expressions on a variety of &amp;quot;answers&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====See also these other Moodle question types based on regular expressions====&lt;br /&gt;
* [[Pattern-match question type]]&lt;br /&gt;
* [[Preg question type]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Quiz]]&lt;br /&gt;
[[Category:Questions]]&lt;br /&gt;
[[Category:Contributed code]]&lt;br /&gt;
&lt;br /&gt;
[[fr:question/type/regexp]]&lt;br /&gt;
[[es:Tipo de pregunta respuesta corta de expresión regular]]&lt;br /&gt;
[[de:Fragetyp Kurzantwort vom Typ regulärer Ausdruck]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Development:Styling_and_customising_the_dock&amp;diff=140827</id>
		<title>Development:Styling and customising the dock</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Development:Styling_and_customising_the_dock&amp;diff=140827"/>
		<updated>2021-07-14T13:24:19Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Text replacement - &amp;quot;class=&amp;quot;nicetable&amp;quot;&amp;quot; to &amp;quot;class=&amp;quot;wikitable&amp;quot;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Themes}}{{Moodle 2.0}}The dock is a new addition to Moodle 2.0, it allows the user to move blocks from the flow of the page onto a special bar that is displayed in a constant position on the side of the page by default.&lt;br /&gt;
This document looks at how to style the dock using CSS, as well as how to customise or manipulate it within JavaScript.&lt;br /&gt;
&lt;br /&gt;
==Styling the dock==&lt;br /&gt;
Styling the dock is really no different to styling anything else within a web site however there are a couple of things that may slow you down and reading the following document may help you in your understanding of how the dock works and how you should go about styling it.&lt;br /&gt;
&lt;br /&gt;
The following items are things that you should be aware of before starting to style the dock:&lt;br /&gt;
# When a block is docked the dock attempts to ensure that existing styles for the block are still applied by adding the standard block &#039;&#039;&#039;.block_&#039;&#039;blockname&#039;&#039;&#039;&#039;&#039;. Because of this trick we don&#039;t need to look at the actual content of a docked item it will always be the same as the block.&lt;br /&gt;
# The dock remembers what blocks are docked by saving the user&#039;s choices within the database using AJAX calls. This can be looked at to minimise display jumping within a theme&#039;s layoutfile. Read on to learn how.&lt;br /&gt;
# The dock uses CSS classes to transition the different states. These CSS classes control things such as the whether the dock is visible, whether the panel is visible, and how we know which item is being viewed. Read the section on [[#State_classes|state classes]] to learn more about these.&lt;br /&gt;
# The structure of the dock is built entirely by JavaScript. Because of this you will need a tool such as FireBug to inspect it within a page as it won&#039;t be there until JavaScript has run.&lt;br /&gt;
# Although the base theme doesn&#039;t support the dock it does contain some core CSS to structure the dock by default.&lt;br /&gt;
&lt;br /&gt;
So lets get started and look at the structure.&lt;br /&gt;
===The structure of the dock===&lt;br /&gt;
[[Image:Dock.structure.201005.png|300px|thumb|Dock structure]]&lt;br /&gt;
The first image to the left graphically describes the hierarchical structure of the dock. The first thing you will notice about this image is that it doesn&#039;t describe what each element is for. It is just to illustrate the html structure without at styles or transformation.&lt;br /&gt;
&lt;br /&gt;
So what are the important elements here?&lt;br /&gt;
&lt;br /&gt;
; div#dock.dock.dock_left_vertical : This is the bar on the left. Positioned by default to be fixed position in the top left hand corner of the screen and 30px wide.&lt;br /&gt;
; div.dockeditem_container : This box contains all of the buttons which when clicked or hovered over will display the docked item. Or more technically causing the docked item panel to be shown.&lt;br /&gt;
; div#dock_item_x.dockeditem : This represents one of possibly several docked item buttons containing the title of the docked item. There are two things to note about this element: First it is repeated for every docked item. Second the x within the id is the item instance and should not be used for styling.&lt;br /&gt;
; div.controls : This contains any special controls for the dock and by default is displayed at the bottom of the dock. As of Moodle 2 Preview Release the only control here is to undock all docked items.&lt;br /&gt;
; div#dockeditempanel : This is the panel in which docked items are shown. Although it is within the dock is it positioned outside of the page relative to the button for the item it is currently showing. This element is based loosely off the YUI3 overlay.&lt;br /&gt;
&lt;br /&gt;
===The layout of the dock===&lt;br /&gt;
[[Image:Dock.layout.201005.png|300px|thumb|Dock layout]]&lt;br /&gt;
The second image on the left shows the layout of these elements within the standard theme.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;So what has gone on here?&#039;&#039;&#039;&lt;br /&gt;
First up ignore the bright colours and margins. I have put these colours in simply to highlight everything and ensure there is space between elements so I can show them apart.&lt;br /&gt;
&lt;br /&gt;
; div#dock : So immediately you notice that the dock is in the top left of the screen and the is fixed width. This is achieved by setting a strict with of 30px and setting the position of the &#039;&#039;#dock&#039;&#039; to fixed. The reason that everything is within the one &#039;&#039;#dock&#039;&#039; element is because it makes positioning everything very simple, now that we have set the position of &#039;&#039;#dock&#039;&#039; we don&#039;t need to worry about anything other than the panel which we&#039;ll get to shortly. You should also note that because of the strict width and position you need to be careful when applying styles to this element as it can have nasty effects on everything else.&lt;br /&gt;
&lt;br /&gt;
; div.dockeditem_container : Next you should notice that the &#039;&#039;.dockeditem_container&#039;&#039; doesn&#039;t extend to the bottom of the dock. Because there is not special positioning here it is behaving as div&#039;s normally do and this is the perfect place to really start styling your dock.&lt;br /&gt;
&lt;br /&gt;
; div.controls : After that within the structure we have &#039;&#039;div.controls&#039;&#039;. This element is positioned absolutely at the bottom of the dock, is 100% wide (so the full width of the dock) and uses &#039;&#039;text-align:center&#039;&#039; to ensure that the controls are centred.&lt;br /&gt;
&lt;br /&gt;
; div.dockeditem : Simply representing a button that can be hovered over or clicked to display the docked item the only important thing to note about this is that you should change the cursor to a pointer so that it is clear you can interact with it.&lt;br /&gt;
&lt;br /&gt;
; div#dockeditempanel : After &#039;&#039;#dock&#039;&#039; this is the most serious element in the dock. This element will contain the docked item and needs to positioned to the left of the dock and at the same height as the title of the item that is being displayed. Luckily you don&#039;t need to worry about the top position of the element that will be automatically adjusted by JavaScript however you will need to push the element to the left. This can be done easily by setting the position of the element to relative, and then setting left to 100%. Note you shouldn&#039;t style this element unless you know what you are doing, like the main dock element the smallest change can cause some terrible effects.&lt;br /&gt;
&lt;br /&gt;
; div.dockeditempanel_container : This element is there specifically to give you the themer an easy place to start styling the panel.&lt;br /&gt;
&lt;br /&gt;
; div.dockeditempanel_hd : This element contains the title of the docked item plus controls to undock or close it.&lt;br /&gt;
&lt;br /&gt;
; div.dockeditempanel_bd : Contains is the main content area for the panel.&lt;br /&gt;
&lt;br /&gt;
===State classes===&lt;br /&gt;
There are several state classes that the dock makes use of to achieve things such as the visibility of the dock, visibility of the panel, and which item is active.&lt;br /&gt;
The following table illustrates where these state classes are used.&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Element&lt;br /&gt;
! Class&lt;br /&gt;
! Description&lt;br /&gt;
! Default CSS&lt;br /&gt;
|-&lt;br /&gt;
|body&lt;br /&gt;
|has_dock&lt;br /&gt;
|This class is added to the body element when the dock is visible.&lt;br /&gt;
|Margin-left: 30px&lt;br /&gt;
|-&lt;br /&gt;
|#dock&lt;br /&gt;
|nothingdocked&lt;br /&gt;
|This class is added to the dock when there is nothing docked.&lt;br /&gt;
|visibility: hidden; display: none;&lt;br /&gt;
|-&lt;br /&gt;
|#dock&lt;br /&gt;
|.dock_&#039;&#039;position&#039;&#039;_&#039;&#039;style&#039;&#039;&lt;br /&gt;
|A special class is added to describe the docks desired position e.g. dock_left_vertical&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|.dockeditem&lt;br /&gt;
|activeitem&lt;br /&gt;
|This class is added to the item that is currently being shown.&lt;br /&gt;
|Change the background colour&lt;br /&gt;
|-&lt;br /&gt;
|.dockeditem&lt;br /&gt;
|firstdockitem&lt;br /&gt;
|This class is added to the first dock item.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|.dockeditem h2&lt;br /&gt;
|filterrotate&lt;br /&gt;
|Added when the title is being rotated by an IE filter [Internet Explorer only]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|#dockeditempanel&lt;br /&gt;
|dockitempanel_hidden&lt;br /&gt;
|Added to the panel when it is not being shown.&lt;br /&gt;
|visibility: hidden; display: none;&lt;br /&gt;
|-&lt;br /&gt;
|#dockeditempanel&lt;br /&gt;
|oversized_content&lt;br /&gt;
|Added when the panel required scrolling to show everything.&lt;br /&gt;
|Set the overflow method&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Layout file changes===&lt;br /&gt;
There is only one thing that you need to make sure of within your layout files if you are creating your own. You need to add the class &#039;&#039;block-region&#039;&#039; to all of the block region div&#039;s as shown below.&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;region-post&amp;quot; class=&amp;quot;block-region&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;region-content&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;?php echo $OUTPUT-&amp;gt;blocks_for_region(&#039;side-post&#039;) ?&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Whilst there is nothing else you &#039;&#039;&#039;need&#039;&#039;&#039; to change within your layout files there one other thing that you may want to do.&lt;br /&gt;
&lt;br /&gt;
Because the dock is loaded entirely by JavaScript you will notice a visual jump on the page if all of the blocks within a region have been docked. This is because the dock shrinks sections that have been completely docked so that they don&#039;t wast page space.&lt;br /&gt;
&lt;br /&gt;
Within you layout files you can check whether a section has been completely docked and then if it has set the body classes so that it is shrunk when the page is delivered.&lt;br /&gt;
&lt;br /&gt;
I&#039;m going to assume that you have all read the [[Development:Themes 2.0 creating your first theme]]. If you haven&#039;t go read it now.&lt;br /&gt;
So now that you&#039;ve created your first theme think back to the code you wrote at the top of your layout files that checks whether a page has block regions pre and post. The code was as follows:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$hassidepre = $PAGE-&amp;gt;blocks-&amp;gt;region_has_content(&#039;side-pre&#039;, $OUTPUT);&lt;br /&gt;
$hassidepost = $PAGE-&amp;gt;blocks-&amp;gt;region_has_content(&#039;side-post&#039;, $OUTPUT);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Right below these two lines we are going to add two more:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$showsidepre = ($hassidepre &amp;amp;&amp;amp; !$PAGE-&amp;gt;blocks-&amp;gt;region_completely_docked(&#039;side-pre&#039;, $OUTPUT));&lt;br /&gt;
$showsidepost = ($hassidepost &amp;amp;&amp;amp; !$PAGE-&amp;gt;blocks-&amp;gt;region_completely_docked(&#039;side-post&#039;, $OUTPUT));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
What we have here is two variables that tell use whether we should show the block regions pre and post. The verbal interpretation of this string is to say &#039;&#039;We will show this side if this side has content and if there is at least one block that has not been docked.&#039;&#039; and we repeat it for each side.&lt;br /&gt;
&lt;br /&gt;
Now that we know for each region that it has content and that we should show it we need some way to tell the page what block regions to show.&lt;br /&gt;
This is achieved by adding special classes to the body element of the page as follows:&lt;br /&gt;
; side-pre-only : This gets added to the body if we only want to show the block region pre.&lt;br /&gt;
; side-post-only : Just like side-pre-only except for the post region.&lt;br /&gt;
; content-only : This gets added if don&#039;t want to show either block region.&lt;br /&gt;
By default we want to show both regions so we don&#039;t need to add any class for this.&lt;br /&gt;
So how to do this in PHP?&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$bodyclasses = array();&lt;br /&gt;
if ($showsidepre &amp;amp;&amp;amp; !$showsidepost) {&lt;br /&gt;
    $bodyclasses[] = &#039;side-pre-only&#039;;&lt;br /&gt;
} else if ($showsidepost &amp;amp;&amp;amp; !$showsidepre) {&lt;br /&gt;
    $bodyclasses[] = &#039;side-post-only&#039;;&lt;br /&gt;
} else if (!$showsidepost &amp;amp;&amp;amp; !$showsidepre) {&lt;br /&gt;
    $bodyclasses[] = &#039;content-only&#039;;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
What we have here is three if-else statements, of which either one or none will be true.&lt;br /&gt;
# The first if statement says if we want to show the pre region but not the post region add the class &#039;&#039;side-pre-only&#039;&#039;&lt;br /&gt;
# The second if statement says if we want to show the post region but not the pre region add the class &#039;&#039;side-post-only&#039;&#039;&lt;br /&gt;
# The third class says if we don&#039;t want to display either region add the class &#039;&#039;content-only&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Now that we know which class we want to add to the body element we need to do so. This can be done as follows:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
&amp;lt;body id=&amp;quot;&amp;lt;?php echo $PAGE-&amp;gt;bodyid ?&amp;gt;&amp;quot; class=&amp;quot;&amp;lt;?php echo $PAGE-&amp;gt;bodyclasses.&#039; &#039;.join(&#039; &#039;, $bodyclasses) ?&amp;gt;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
You&#039;ll notice this is very similar to the body tag you wrote in your first theme, however we have added&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
join(&#039; &#039;, $bodyclasses)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This php command simply concatenates each body class putting a space between each.&lt;br /&gt;
&lt;br /&gt;
Now the final thing to do is make sure that we don&#039;t show a block region if we don&#039;t have content for it. This can be done by adding if statements around each block region as follows:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
&amp;lt;?php if ($hassidepre) { ?&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;region-pre&amp;quot; class=&amp;quot;block-region&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;region-content&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;?php echo $OUTPUT-&amp;gt;blocks_for_region(&#039;side-pre&#039;) ?&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;?php } ?&amp;gt;&lt;br /&gt;
                &lt;br /&gt;
&amp;lt;?php if ($hassidepost) { ?&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;region-post&amp;quot; class=&amp;quot;block-region&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;region-content&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;?php echo $OUTPUT-&amp;gt;blocks_for_region(&#039;side-post&#039;) ?&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;?php } ?&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
For each if statement we are saying &#039;&#039;If this region has content display it.&#039;&#039; You&#039;ll notice that here we are using &#039;&#039;$hasside...&#039;&#039; instead of &#039;&#039;$showside...&#039;&#039; this is because we want to add them if they have content even if they won&#039;t be shown. Otherwise the dock won&#039;t be able to find them and you simply won&#039;t see the block.&lt;br /&gt;
&lt;br /&gt;
Having made the above changes if you now look at the layout files for the base theme you start to notice that they are looking very similar and indeed they are. If at any point you get stuck or don&#039;t know how to proceed have a look at the base themes layout files and see how its done there.&lt;br /&gt;
&lt;br /&gt;
===The core CSS===&lt;br /&gt;
As mentioned in the key points at the start of this document the base theme although not supporting the dock does contain structural CSS that ensure the dock is functional on all themes that choose to support it.&lt;br /&gt;
Lets look at the CSS within &#039;&#039;theme/base/style/dock.css&#039;&#039;, this is the core structural CSS for the dock.&lt;br /&gt;
&amp;lt;code css&amp;gt;&lt;br /&gt;
/* Put a margin on the body if the dock is shown */&lt;br /&gt;
body.has_dock {margin-left:30px;}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Well this is very simple, if the dock is being shown apply a 30px margin to the body. This is done to ensure that the dock doesn&#039;t overlap the body.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code css&amp;gt;&lt;br /&gt;
/** For the dock itself */&lt;br /&gt;
#dock {width:30px;position:fixed;top:0px;left:0px;height:100%;background-color:#FFF;border-right:1px solid #000;z-index:11000;}&lt;br /&gt;
#dock.nothingdocked {visibility: hidden;display:none;}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
These two rules style the dock itself. Note the second rule is only applied when nothing is docked in which case we will hide the empty dock.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code css&amp;gt;&lt;br /&gt;
#dock .dockeditem .firstdockitem {margin-top:1em;}&lt;br /&gt;
#dock .dockeditem .dockedtitle {border-bottom:1px solid #000;border-top:1px solid #000;cursor:pointer;}&lt;br /&gt;
#dock .dockeditem .dockedtitle h2 {font-size:0.8em;line-height:100%;text-align:center;}&lt;br /&gt;
#dock .dockeditem .dockedtitle .filterrotate {margin-left:8px;}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
The four rules above style the buttons that will show the docked items. Each docked item has one. The styles being used here arn&#039;t doing anything to special other than setting the cursor to pointer so that it is recognised as an actionable element.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code css&amp;gt;&lt;br /&gt;
#dock .controls {position:absolute;bottom:1em;text-align:center;width:100%;}&lt;br /&gt;
#dock .controls img {cursor:pointer;}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Very simply this bit of CSS. It is positioning the controls for the dock at the bottom centre of the dock.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code css&amp;gt;&lt;br /&gt;
/** For the panel the docked blocks are shown in */&lt;br /&gt;
#dockeditempanel {min-width:200px;position:relative;z-index:12000;left:100%;}&lt;br /&gt;
#dockeditempanel.dockitempanel_hidden {display:none;}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
These two lines are applied to the docked item panel&#039;s base element and are VERY important to the operation of the dock. They ensure that when shown the panel is top the left of the dock and that when it is not being displayed it is not visible.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code css&amp;gt;&lt;br /&gt;
#dockeditempanel .dockeditempanel_content {background-color:#fff;border:1px solid #000;z-index:12050;}&lt;br /&gt;
#dockeditempanel .dockeditempanel_bd {overflow:auto;width:auto;}&lt;br /&gt;
#dockeditempanel .dockeditempanel_bd .block_docked {margin:10px;}&lt;br /&gt;
#dockeditempanel .dockeditempanel_hd {border-bottom:1px solid #000;text-align:right;}&lt;br /&gt;
#dockeditempanel .dockeditempanel_hd h2 {display:inline;margin:0;padding-right:1em;}&lt;br /&gt;
#dockeditempanel .dockeditempanel_hd .commands {display:inline;}&lt;br /&gt;
#dockeditempanel .dockeditempanel_hd .commands img {margin-right:2px;vertical-align:middle;}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
The above lines of CSS are used to style the internal content of the panel. Note the styles for the block will be applied as if it were not docked.&lt;br /&gt;
&lt;br /&gt;
And that is it!&lt;br /&gt;
&lt;br /&gt;
Whilst things don&#039;t look to difficult when styling things if you don&#039;t think carefully about where you are applying styles you can quickly dig yourself a big hole. I would suggest going slowly at first when applying more styles and making sure you don&#039;t apply too many styles to the base elements #dock and #dockeditempanel.&lt;br /&gt;
&lt;br /&gt;
==Customising the dock==&lt;br /&gt;
This section of the document looks at how to customise the dock using JavaScript.&lt;br /&gt;
&lt;br /&gt;
It was recognised early on during the development of the dock that it probably won&#039;t suit everyone&#039;s needs, nor would it appeal to everyone. Because of this during development and the frequent revisions that were occurring during Moodle 2.0s development there was always a focus on ensuring the dock was customisable and that someone with a bit of time on their hands and a good knowledge of JavaScript could hack it to bits and make it into the tool they desired.&lt;br /&gt;
&lt;br /&gt;
This document doesn&#039;t go into the full details of how to customise the dock but should get anyone keen started quickly. Those who fear JavaScript should leave now!&lt;br /&gt;
&lt;br /&gt;
===Getting started===&lt;br /&gt;
The dock is written to make use of YUI3 and all the functionality that it has to offer, the main dock object both looks for specific callback functions and adds manages and fires several important events. At the same time it is also object orientated JavaScript which has the advantage in JavaScript of allowing subsequent JavaScript events to redefine methods of the object.&lt;br /&gt;
&lt;br /&gt;
This allows you the theme designer to write JavaScript to customise the dock in two fashions. The first through events and callbacks. The second through manually overriding the methods the dock uses.&lt;br /&gt;
&lt;br /&gt;
We will look into these two methods in the subsequent sections of this document, for the time being what you need to learn about is the JavaScript structure of the dock.&lt;br /&gt;
&lt;br /&gt;
First all of the code for the dock within Moodle 2.0 is located within the file &#039;&#039;&#039;moodle/blocks/dock.js&#039;&#039;&#039; and can be viewed online through the CVS repository[http://cvs.moodle.org/moodle/blocks/dock.js?view=markup]&lt;br /&gt;
&lt;br /&gt;
There are three main objects that get used for the dock:&lt;br /&gt;
# First up is of course the dock, which is namespaced to M.core_dock.dock. It is instantiated only once per page and is essentially a static object that manages and operates the dock plus everything on it.&lt;br /&gt;
# Second is a generic block class. Every block on the page gets instantiated as a generic block unless it has a more specific class (that should extend the generic block class). This generic block class is responsible for moving a block between the dock and its normal block position. It is namespaced to M.core_dock.generic_block.&lt;br /&gt;
# The third class is the dock item class which is used to represent an item on the dock. It is responsible for showing the item when required and handles the events that the dock + user trigger. I can hear you asking now why not just add this functionality to the generic block class? because this keeps it open for things other than blocks to be docked.&lt;br /&gt;
&lt;br /&gt;
As well as the above three classes there are some important class objects and properties that you should also be aware of as you may want to work with them when customising the dock.&lt;br /&gt;
; M.core_dock.Y : Is a YUI instance for use with the dock.&lt;br /&gt;
; M.core_dock.nodes.dock : Is the façade for the dock itself (#dock) and is a YUI3 Node instance.&lt;br /&gt;
; M.core_dock.getPanel() : This will return the panel that is used to display docked item within. It is stored locally through M.core_dock.nodes.panel however as it is not initialised until it is required you should always use the getPanel method.&lt;br /&gt;
&lt;br /&gt;
The following are other important notes about the dock that you should read and understand before customising the dock.&lt;br /&gt;
# The dock emulates the YUI3 &#039;&#039;&#039;on&#039;&#039;&#039; method for listening to events. Because the dock requires initialisation which may occur through module dependencies we needed a method of exposing the dock to events prior to initialisation and this is it. It ensures that if you attach events to the dock before it is initialised everything still works fine.&lt;br /&gt;
# Both the dock and the item class inherit from Y.EventTarget and publish several events.&lt;br /&gt;
# The dock is designed to work both on old and modern browsers and as such there are several places where we branch based on browser and version.&lt;br /&gt;
# The generic block class should never be added to for the needs of a single block. Only things that are generic to all blocks should be added to this class. Independent needs should be handled by creating a block specific class that extends the generic block class. The navigation and settings blocks do this currently.&lt;br /&gt;
&lt;br /&gt;
===Extending the dock through events===&lt;br /&gt;
Under construction&lt;br /&gt;
&lt;br /&gt;
===Using custom methods for the dock===&lt;br /&gt;
Under construction&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==More information==&lt;br /&gt;
&lt;br /&gt;
* [[Development:Themes 2.0]]&lt;br /&gt;
* [[Development:Themes 2.0 creating your first theme]]&lt;br /&gt;
* [[Development:Themes 2.0 how to make the dock horizontal]] - Modifying the dock to make it horizontal.&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=admin/repository/nanogong&amp;diff=140826</id>
		<title>admin/repository/nanogong</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=admin/repository/nanogong&amp;diff=140826"/>
		<updated>2021-07-14T13:24:19Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Text replacement - &amp;quot;class=&amp;quot;nicetable&amp;quot;&amp;quot; to &amp;quot;class=&amp;quot;wikitable&amp;quot;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Nanogong plugin=&lt;br /&gt;
&lt;br /&gt;
The Nanogong plugin allows audio-only recording inside the Moodle repositories. The wav files are stored into Moodle using the File API. The sound files can be recorded using the ImaACPCM or Speex codecs. The recorded files and the recording applet are available in all places where the repository is used to select files.&lt;br /&gt;
&lt;br /&gt;
After installing the plugin, you can select the codec used and the quality of the sound for the site-wide recording instance. This instance will be shared by all users of your site (because it only handles recording, and File API handles the rest).&lt;br /&gt;
&lt;br /&gt;
==Audio format==&lt;br /&gt;
&lt;br /&gt;
This option allows you to select the codec used for recording sound.&lt;br /&gt;
&lt;br /&gt;
ImaADPCM stands for International Multimedia Association (IMA) Adaptive Differential Pulse Code Modulation (ADPCM). It is a lossy compression mechanism that compresses data recorded at various sampling rates. The compression ratio obtained is relatively modest, but it is very fast to encode and decode. &lt;br /&gt;
&lt;br /&gt;
Speex is an Open Source/Free Software patent-free (part of the GNU Project) audio compression format designed for speech. Speex is well-adapted to Internet applications and provides useful features that are not present in most other codecs. The design goals have been to make a codec that would be optimized for high quality speech and low bit rate.&lt;br /&gt;
&lt;br /&gt;
==Sampling rate==&lt;br /&gt;
&lt;br /&gt;
This option allows you to select the sampling rate used for recording sound. The actual numeric value associated with each level depends on the audio format in use.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Level&lt;br /&gt;
!ImaADPCM sampling rate (Hz)&lt;br /&gt;
!Speex sampling rate (Hz)&lt;br /&gt;
|-&lt;br /&gt;
|Low quality&lt;br /&gt;
|8000&lt;br /&gt;
|8000&lt;br /&gt;
|-&lt;br /&gt;
|Medium quality&lt;br /&gt;
|11025&lt;br /&gt;
|16000&lt;br /&gt;
|-&lt;br /&gt;
|Normal quality&lt;br /&gt;
|22050&lt;br /&gt;
|32000&lt;br /&gt;
|-&lt;br /&gt;
|High quality&lt;br /&gt;
|44100&lt;br /&gt;
|44100&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=File_upload_size&amp;diff=140825</id>
		<title>File upload size</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=File_upload_size&amp;diff=140825"/>
		<updated>2021-07-14T13:24:18Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Text replacement - &amp;quot;class=&amp;quot;nicetable&amp;quot;&amp;quot; to &amp;quot;class=&amp;quot;wikitable&amp;quot;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Installing Moodle}}&lt;br /&gt;
==Upload file size restrictions==&lt;br /&gt;
&lt;br /&gt;
Probably the most frequently asked question on moodle.org is &amp;quot;How do I increase the upload file size limit?&amp;quot; The changes that need be made are the same in all versions of Moodle, just in different OS&#039; they need be made in different places. Upload file sizes are restricted in a number of ways and each one in this list restricts the following ones:&lt;br /&gt;
&lt;br /&gt;
# Server level&lt;br /&gt;
# Moodle site level&lt;br /&gt;
# Course level&lt;br /&gt;
# Activity level&lt;br /&gt;
&lt;br /&gt;
This is a contentious issue, mainly because you might think that it should be set inside the Moodle. Unfortunately, this is not so, these are environment issues that need to be set in the server and PHP folders, Moodle cannot work outside itself. &lt;br /&gt;
&lt;br /&gt;
==Physical access to Server==&lt;br /&gt;
These instructions assume you have full physical and administrative access to your server. If you are using a hosted server then you will probably need to look into other ways to increase your file upload size. &lt;br /&gt;
&lt;br /&gt;
There are positives and negatives to both methods below. If you modify the php.ini file then the changes will effect all php applications on your server. Since PHP5 you can only have one php.ini file on your server. The php.ini method will work with all web servers though. The .htaccess method will only effect the folder and all subfolders that it is placed in, but you must have certain settings enabled in Apache.&lt;br /&gt;
&lt;br /&gt;
==Restricting the File size - how it works==&lt;br /&gt;
The Host may set a limit on the maximum file upload size in the Server environment, which you may override if the Host allows you to. PHP has a setting that it uses to limit the size of the file that it handles in upload. The Host has set that figure in the php.ini based on their particular perceptions and their clientele need. This size appears in Moodle in the &#039;&#039;&#039;Site administration &amp;gt; Security &amp;gt; Site security settings &amp;gt; Maximum uploaded file size&#039;&#039;&#039; drop-down combo box. You can change this at any time to suit your site need. In the Course Settings page, there is also a further restriction that can be made. At no time can the Course setting over-ride the Site setting, nor can the Site setting over-ride the php.ini setting, which cannot over-ride the Server setting. The only exception to this rule is that you can manipulate both the Server and the PHP settings, and how to do that is described below.&lt;br /&gt;
&lt;br /&gt;
==Modifying the php.ini file==&lt;br /&gt;
These instructions show you how to change the file upload size by editing your php.ini file.&lt;br /&gt;
&lt;br /&gt;
For the most part these instructions amount to the following.&lt;br /&gt;
In the file /etc/php5/apache2/php.ini you need to change &amp;quot;post_max_size&amp;quot;, &amp;quot;upload_max_filesize&amp;quot; and &amp;quot;max_execution_time&amp;quot; to values that suit your needs using whatever editor you are used to. &lt;br /&gt;
&lt;br /&gt;
Below are some line by line instructions for various installations of Moodle.&lt;br /&gt;
&lt;br /&gt;
====Ubuntu Linux Instructions====&lt;br /&gt;
&lt;br /&gt;
These instructions assume that you have installed the standard Moodle package, PHP 5 and Apache 2 via apt-get and left it all as a default install. If you have compiled yourself I presume that you will know where your php.ini files are!&lt;br /&gt;
NB As latest version of &#039;&#039;&#039;PHP is now 7.2+&#039;&#039;&#039; you may need to find the file.  If you run phpinfo() this should give you the correct location which will be something like:  /etc/php/7.3/apache2/php.ini &lt;br /&gt;
&lt;br /&gt;
You need to edit the following three settings in your php.ini file located at: /etc/php5/apache2/&lt;br /&gt;
Here are a set of instructions to follow line by line.&lt;br /&gt;
&lt;br /&gt;
*Type &amp;quot;sudo nano /etc/php5/apache2/php.ini&amp;quot;&lt;br /&gt;
*Press Ctrl and W and type &amp;quot;post_max_size&amp;quot; &lt;br /&gt;
*Change the value to the number of Mb you want your site to accept as uploads&lt;br /&gt;
*Press Ctrl and W and type &amp;quot;upload_max_filesize&amp;quot; &lt;br /&gt;
*Change the value to the number of Mb you want your site to accept as uploads&lt;br /&gt;
*Press Ctrl and W and type &amp;quot;max_execution_time&amp;quot; &lt;br /&gt;
*Change the value to 600&lt;br /&gt;
*Press Ctrl and O&lt;br /&gt;
*Press Ctrl and X&lt;br /&gt;
*Type sudo apachectl restart&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size NGINX] system administrators should also add &amp;quot;client_max_body_size XXXm;&amp;quot; to the &amp;quot;http&amp;quot; section of their nginx main configuration file. ([https://rtcamp.com/tutorials/php/increase-file-upload-size-limit/#change-in-nginx-config see more info]) if you have SSL, that will require you to set the above for the SSL &#039;&#039;server&#039;&#039; and &#039;&#039;location&#039;&#039; too.&lt;br /&gt;
&lt;br /&gt;
Your new file size limit should now appear in Administration &amp;gt; Security &amp;gt; Site Policies &amp;gt; Maximum uploaded file size&lt;br /&gt;
&lt;br /&gt;
====XAMPP on Mac Instructions====&lt;br /&gt;
&lt;br /&gt;
These are instructions for how to do this for Moodle on a Mac using the [http://download.moodle.org/macosx/ XAMPP sample download package available]. (This is not for a OS X production server.)&lt;br /&gt;
&lt;br /&gt;
* Close down Apache and MySQL if they are running via the XAMPP Control app and close the XAMPP Control app &lt;br /&gt;
* Open Finder and go to Applications&lt;br /&gt;
* Navigate down and open the folder &#039;&#039;XAMPP&#039;&#039; / &#039;&#039;xamppfiles&#039;&#039; / &#039;&#039;etc&#039;&#039;&lt;br /&gt;
* Open the file &#039;&#039;php.ini&#039;&#039; with TextEdit (or another plain text editor)&lt;br /&gt;
* Search for the &#039;&#039;post_max_size&#039;&#039; setting and up this from 128M (the default) to more; 500M is the maximum&lt;br /&gt;
* Do the same for &#039;&#039;upload_max_filesize&#039;&#039; (make the numbers the same)&lt;br /&gt;
* Search for the &#039;&#039;max_execution_time&#039;&#039; setting and up this to 300 (or more if you get timeouts on uploads)&lt;br /&gt;
* Save the php.ini file &lt;br /&gt;
* restart Apache and MySQL as usual&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: You may get a &amp;quot;permission denied&amp;quot; error when saving the php.ini file unless you are logged in with  admin access to your Mac. To work around this, you can set the &#039;&#039;/etc&#039;&#039; directory in which the php.ini file is located to be writable temporarily. For how to do that, see [http://answers.yahoo.com/question/index?qid=20090115235753AA4DtJ0 here] or [http://www.ehow.com/how_2314896_fix-permissions-mac-os-x.html here].&lt;br /&gt;
&lt;br /&gt;
====Windows XP and Server 2003 Instructions====&lt;br /&gt;
&lt;br /&gt;
These instructions presume that you have downloaded the latest PHP 5.3.x Windows zip package and extracted it to C:\PHP. If you have installed PHP to another location then change all references to &amp;quot;C:\PHP&amp;quot; to the location you installed PHP too.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|[[Image:lightbulb.png]]&lt;br /&gt;
|Download and install any text editor that can save the file in a UTF-8 format, [http://www.crimsoneditor.com Crimson Editor] is one such, NotePad++ is another, use that instead of either Wordpad or Notepad! The issue is that WordPad or Notepad will include hidden characters that may not be compatible with the requirements of PHP.   &lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
*Open C:\PHP&lt;br /&gt;
*Right Click the &#039;&#039;&#039;php.ini&#039;&#039;&#039; file in this folder and choose &amp;quot;Open with...&amp;quot; selecting your editor of choice. &lt;br /&gt;
*Press Ctrl + F and type &amp;quot;post_max_size&amp;quot; (click Find...&amp;quot;, where needed) &lt;br /&gt;
*Change the value to the number of Mb you want your site to accept as uploads&lt;br /&gt;
*Press Ctrl + F and type &amp;quot;upload_max_filesize&amp;quot; (click Find...&amp;quot;, where needed)&lt;br /&gt;
*Change the value to the number of Mb you want your site to accept as uploads&lt;br /&gt;
*Press Ctrl + F and type &amp;quot;max_execution_time&amp;quot; (click Find...&amp;quot;, where needed)&lt;br /&gt;
*Change the value to 600&lt;br /&gt;
*Press Ctrl and S or the save button. &lt;br /&gt;
*Exit your editor. &lt;br /&gt;
*Restart your webserver to reload PHP with the edited changes. &lt;br /&gt;
**&#039;&#039;&#039;For IIS&#039;&#039;&#039;&lt;br /&gt;
**Open the Start Menu on your server and select &amp;quot;Run&amp;quot;&lt;br /&gt;
**Type &amp;quot;iisreset /RESTART&amp;quot;&lt;br /&gt;
**For &#039;&#039;&#039;Apache 2 and Windows XP&#039;&#039;&#039;&lt;br /&gt;
**Go to Start &amp;gt; All Programs &amp;gt; Apache &amp;gt; Restart&lt;br /&gt;
**&#039;&#039;&#039;For Apache 2 and Windows Server&#039;&#039;&#039;&lt;br /&gt;
**The following command will work as long as you have installed Apache 2 as a service on your Windows Server&lt;br /&gt;
**Open your Start Menu on your server and select &amp;quot;Run&amp;quot;&lt;br /&gt;
**Type &amp;quot;httpd -k restart&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Your new file size limit should now appear in Administration &amp;gt; Security &amp;gt; Site Policies &amp;gt; Maximum uploaded file size&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; These instructions also cover the Xampp Windows installer. Just replace C:\PHP with C:\Moodle\server\php and to restart your Moodle with a normal stop-start.&lt;br /&gt;
&lt;br /&gt;
==Modifying the apache config file==&lt;br /&gt;
====Ubuntu Linux Instructions====&lt;br /&gt;
You may also need to edit the config.php file in the moodle directory:&lt;br /&gt;
*Type &amp;quot;gksudo nautilus&amp;quot; to get root permissions&lt;br /&gt;
*Navigate to /etc/moodle&lt;br /&gt;
*Open apache.conf&lt;br /&gt;
*Go to the &amp;quot;&amp;lt;IfModule mod_php5.c&amp;gt;&amp;quot; section&lt;br /&gt;
*Change &amp;quot;php_value upload_max_filesize = 2M&amp;quot; to a higher value&lt;br /&gt;
*Change &amp;quot;php_value post_max_size = 2M&amp;quot; to a higher value&lt;br /&gt;
*Go to the &amp;quot;&amp;lt;IfModule mod_php4.c&amp;gt;&amp;quot; section&lt;br /&gt;
*Change &amp;quot;php_value upload_max_filesize = 2M&amp;quot; to a higher value&lt;br /&gt;
*Change &amp;quot;php_value post_max_size = 2M&amp;quot; to a higher value&lt;br /&gt;
*Save file&lt;br /&gt;
*Type sudo /etc/init.d/apache2 restart&lt;br /&gt;
&lt;br /&gt;
===Modifying the .htaccess file===&lt;br /&gt;
&lt;br /&gt;
The following instructions will only work on an Apache web server, and also the Apache server must have Overrides allowed. Traditionally, you could only use .htaccess files when PHP was run as a module of Apache, but with Apache 2.2, this appears to no longer be the case. You can now use the .htaccess file in either module or cgi forms. As well, allowing the use of .htaccess files will cause a performance hit on the server, not a desirable outcome either - so check with your Host. &lt;br /&gt;
&lt;br /&gt;
The .htaccess file is a distributed configuration file, that is, it can be used on a per-folder basis to configure each user&#039;s folder and sub-folders. You cannot alter the &amp;quot;AllowOverrides&amp;quot; directive in the Apache configuration file with a .htaccess file, only the Host can set that manually. Usually the Host will place a .htaccess file into your site Root if they do allow you to override the server settings. You can edit it the same as below, and the overrides you set will work. Alternatively, you may create your own .htaccess file in your text editor. It may also be called something else, like .config. If you have any file that starts with a ., you might want to open it in your text editor, just out of curiosity. &lt;br /&gt;
&lt;br /&gt;
Create a file called .htaccess in Moodle&#039;s main directory (where &#039;index.php&#039; is located, not the &#039;moodledata&#039; directory) that contains the following information:&lt;br /&gt;
&lt;br /&gt;
 php_value upload_max_filesize 20971520&lt;br /&gt;
 php_value post_max_size 20971520&lt;br /&gt;
 php_value max_execution_time 600&lt;br /&gt;
&lt;br /&gt;
20971520 is the integer value for 20Mb. You can use the following site to [http://www.onlineconversion.com/computer_base2.htm convert MegaBytes to Bytes].&lt;br /&gt;
&lt;br /&gt;
For a more complete description of how to edit the .htacess file, look at this page, [http://httpd.apache.org/docs/current/howto/htaccess.html Apache Tutorial: .htaccess files]&lt;br /&gt;
&lt;br /&gt;
===Modifying the IIS 7.0/7.5 configuration (Windows Server 2008, Windows Server 2008 R2)===&lt;br /&gt;
First increase activity and request time outs (allows large files to succeed on slow connections)&lt;br /&gt;
 FastCGI Settings &amp;gt; Edit (Right-click on PHP application)&lt;br /&gt;
 Set Process Model &amp;gt; Activity Timeout to &#039;3600&#039; (one hour)&lt;br /&gt;
 Set Process Model &amp;gt; Request Timeout to &#039;3600&#039; (one hour)&lt;br /&gt;
Next set &#039;Maximum allowed content length&#039;&lt;br /&gt;
 Request Filtering &amp;gt; Edit Feature Settings:&lt;br /&gt;
 Set &#039;Maximum allowed content length&#039; to your desired file size (in bytes) e.g. &#039;536870912&#039; for 512MB (default is approximately 28.6MB)&lt;br /&gt;
&lt;br /&gt;
==Hosted Server==&lt;br /&gt;
Things can be a little different with a hosted server for uploaded and downloaded file size.  You are probably going to  to be told to create or change a .htaccess file, or to modify a php.ini file.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|[[Image:lightbulb.png]]&lt;br /&gt;
|It might be a good idea to talk to with your service provider before you attempt anything.  They probably have instructions on &amp;quot;how to&amp;quot; and may have their own limits for uploaded file size. Some hosts measure the file size in gigabytes and others in megabytes.  If you are unhappy with their limits, then check your contract and consider changing your provider to one that has a limit and price that you like.&lt;br /&gt;
|}   &lt;br /&gt;
&lt;br /&gt;
===.htaccess with hosted server===&lt;br /&gt;
The one purpose of an .htaccess file is to override the the current limitations of both the server and the php.ini file.  Your hosted server should inform you where that file needs be placed in your Moodle, but generally in the root is sufficient. They may already have a standard file you can use, if so, use it - but perhaps not.  &lt;br /&gt;
&lt;br /&gt;
To the .htaccess file add the lines:&lt;br /&gt;
  php_value upload_max_filesize 128M&lt;br /&gt;
  php_value post_max_size 128M&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
This will limit uploads to 128MB, but you can make it any size you agree with your provider. The wording may vary slightly, according to the demands of the server.&lt;br /&gt;
&lt;br /&gt;
===php.ini with hosted server===&lt;br /&gt;
Some servers will not allow you to change the moodle root .htaccess file and tell you to use a php.ini file for php directives.  Here you can use the instruction located in the section above called [[File_upload_size#Modifying_the_php.ini_file|Modifying the php.ini file]].&lt;br /&gt;
&lt;br /&gt;
Find the php.ini file in your moodle subfolder on your hosted server. You might want to copy the file as a backup just in case.  Edit php.ini, find &amp;quot;upload_max_filesize&amp;quot; and post_max_size in the code.  After the = change the number.  Here the max filesize is 20 megabytes.  &lt;br /&gt;
&lt;br /&gt;
 upload_max_filesize = 20M&lt;br /&gt;
 post_max_size = 20M&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|[[Image:lightbulb.png]]&lt;br /&gt;
|Still not changed? Some hosts using cpanel have a php config program under services/software. Use the &amp;quot;Single php.ini&amp;quot; option and make sure you note the location of the php.ini file to modify. This changes the .htaccess file in the same area and thus the server limit for all programs using php.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|[[Image:lightbulb.png]]&lt;br /&gt;
|Still not changed? [http://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size NGINX] system administrators should also add client_max_body_size XXXm; to the &amp;quot;http&amp;quot; section of their nginx main configuration file. ([https://rtcamp.com/tutorials/php/increase-file-upload-size-limit/#change-in-nginx-config see more info]) if you have SSL, that will require you to set the above for the SSL &#039;&#039;server&#039;&#039; and &#039;&#039;location&#039;&#039; too.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
*[[Administration_FAQ#How_do_the_limits_on_uploaded_files_work.3F|Administration FAQ Doc page]]&lt;br /&gt;
*[[Site_policies#Maximum_uploaded_file_size|Site Policies Doc page]]&lt;br /&gt;
* Using Moodle [http://moodle.org/mod/forum/discuss.php?d=39625 Detailed instructions to increase the maximum allowed size for uploaded files] forum discussion&lt;br /&gt;
* Using Moodle [http://moodle.org/mod/forum/discuss.php?d=97907 Instructions to increase maximum allowed size on hosted servers] forum discussion&lt;br /&gt;
* Using Moodle [http://moodle.org/mod/forum/discuss.php?d=124441 Help on changing the maximum upload size when installing Moodle via apt-get] forum discussion&lt;br /&gt;
&lt;br /&gt;
[[es:Tamaño de archivo subido]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:FAQ|File]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=admin/setting/blocksettingmoodletxt&amp;diff=140824</id>
		<title>admin/setting/blocksettingmoodletxt</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=admin/setting/blocksettingmoodletxt&amp;diff=140824"/>
		<updated>2021-07-14T13:24:18Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Text replacement - &amp;quot;class=&amp;quot;nicetable&amp;quot;&amp;quot; to &amp;quot;class=&amp;quot;wikitable&amp;quot;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== MoodleTxt Settings ==&lt;br /&gt;
&lt;br /&gt;
This page contains all the common configuration options for MoodleTxt. At the top of the page you will see two links:&lt;br /&gt;
&lt;br /&gt;
; ConnectTxt Accounts : This link will take you to the ConnectTxt account admin pages, which will allow you to add, update and restrict these accounts. If you have just installed MoodleTxt, this should be your first stop.&lt;br /&gt;
; Inbound Message Filters : This link will take you to the inbound filter management page, which will allow you to create filters for inbound SMS messages, routing them to particular Moodle users.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Send/Receive Settings ===&lt;br /&gt;
&lt;br /&gt;
The first 4 settings in this section relate to how MoodleTxt gets both message status updates and new inbound messages from the ConnectTxt system. By default, MoodleTxt pulls these updates on a per-request basis, whenever users visit certain pages. However, it can be configured to get these updates automatically, which improves the performance of the block and results in far fewer outbound connections. The available automatic update methods are [[Moodletxt_cron | cron]] and [[Moodletxt_push | push]]. We &#039;&#039;&#039;highly&#039;&#039;&#039; recommend taking the time to set up push functionality, as it is the fastest and most efficient method of obtaining updates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field Name&lt;br /&gt;
! Field Label&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| Get_Status_On_View&lt;br /&gt;
| Automatically get status updates on &amp;quot;View Message&amp;quot; page&lt;br /&gt;
| If this box is checked, then whenever a user views the current status of a sent message, the block will first connect to the ConnectTxt system in order to fetch updates. You should uncheck this if you have configured an automatic update option as mentioned above.&lt;br /&gt;
|-&lt;br /&gt;
| Get_Inbound_On_View&lt;br /&gt;
| Automatically get inbound messages on Inbox page&lt;br /&gt;
| If this box is checked, then whenever a user views their inbox, the block will first connect to the ConnectTxt system in order to fetch new messages. You should uncheck this if you have configured an automatic update option as mentioned above.&lt;br /&gt;
|-&lt;br /&gt;
| Push_Username&lt;br /&gt;
| XML Push Username&lt;br /&gt;
| If you have set up XML push updates (highly recommended) then this is the username you provided to ConnectTxt as part of that setup. ConnectTxt uses this username to authenticate itself with your MoodleTxt installation when connecting to it.&lt;br /&gt;
|-&lt;br /&gt;
| Push_Password&lt;br /&gt;
| XML Push Password&lt;br /&gt;
| If you have set up XML push updates (highly recommended) then this is the password you provided to ConnectTxt as part of that setup. ConnectTxt uses this password to authenticate itself with your MoodleTxt installation when connecting to it.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The last two settings in this category control other parameters related to message sending via ConnectTxt.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field Name&lt;br /&gt;
! Field Label&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| Protocol_Warnings_On&lt;br /&gt;
| Display SSL security warnings&lt;br /&gt;
| If you do not have SSL connections to the ConnectTxt server enabled, MoodleTxt will generally display warnings that your data is being transmitted in an unsecure manner. To disable these warnings, uncheck this box.&lt;br /&gt;
|-&lt;br /&gt;
| Event_Messaging_Account&lt;br /&gt;
| Event Messaging Account&lt;br /&gt;
| This is the ConnectTxt account that MoodleTxt will use when it is asked to send automatic messages out in response to system events. By extension, this is the ConnectTxt account that will be used to send any messages originating via the MoodleTxt Plus message processor plugin. If no account is selected, then MoodleTxt will be unable to send event-generated messages.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Recipient Settings ===&lt;br /&gt;
&lt;br /&gt;
The settings in this section relate to how MoodleTxt captures user phone/name information from the Moodle system, and how it processes that information in order to send SMS messages out. (Future versions of the block will feature improvements in international phone number handling.)&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field Name&lt;br /&gt;
! Field Label&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| National_Prefix&lt;br /&gt;
| National Prefix&lt;br /&gt;
| This is the default dialling prefix for phone numbers within your country. It is the digit or set of digits that all phone numbers begin with when being dialled within the country. This defaults to 0, the UK domestic dialling prefix. (&#039;&#039;&#039;Note:&#039;&#039;&#039; If the phone numbers you enter into MoodleTxt are already formatted internationally, e.g. +441234567890, then this setting is ignored.)&lt;br /&gt;
|-&lt;br /&gt;
| Default_International_Prefix&lt;br /&gt;
| Default International Prefix&lt;br /&gt;
| This is the international dialling prefix for phone numbers within your country. This usually consists of a plus &#039;+&#039; sign, along with two or three digits, and is used when dialling into your country from another location. This defaults to +44, the UK international dialling prefix. (&#039;&#039;&#039;Note:&#039;&#039;&#039; If the phone numbers you enter into MoodleTxt are already formatted internationally, e.g. +441234567890, then this setting is ignored.)&lt;br /&gt;
|-&lt;br /&gt;
| Phone_Number_Source&lt;br /&gt;
| Take phone numbers from&lt;br /&gt;
| This option allows you to choose the field in your user database table that MoodleTxt will search for mobile phone numbers (phone1 or phone2). This is largely redundant in modern Moodle setups, where phone2 has been standardised as the mobile phone field, and exists for long-running installations where things may be different. If mobile phone numbers are populated to the phone1 field in your system, then select it from this drop-down.&lt;br /&gt;
|-&lt;br /&gt;
| Default_Recipient_Name&lt;br /&gt;
| Default Recipient Name&lt;br /&gt;
| When Moodle cannot find a recipient&#039;s name in the database, or cannot match an incoming phone number to any known contact, this is the name/identifier it will record against that message.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Proxy Settings ===&lt;br /&gt;
&lt;br /&gt;
If connections between your MoodleTxt installation and ConnectTxt need to be routed via a proxy server, then you can enter the details of that proxy server in this section. &#039;&#039;&#039;Please note:&#039;&#039;&#039; MoodleTxt currently only supports proxy servers that use either BASIC authentication, or no authentication at all. Newer versions of Moodle have their own proxy settings within the system, and future versions of the block will migrate to use those settings for proxy support.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field Name&lt;br /&gt;
! Field Label&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| Proxy_Host&lt;br /&gt;
| Proxy Address&lt;br /&gt;
| The host/IP address of your proxy server.&lt;br /&gt;
|-&lt;br /&gt;
| Proxy_Port&lt;br /&gt;
| Proxy Port&lt;br /&gt;
| The TCP/IP port your proxy server listens on for connections.&lt;br /&gt;
|-&lt;br /&gt;
| Proxy_Username&lt;br /&gt;
| Proxy Username&lt;br /&gt;
| If your proxy server requires a username for authentication, then enter it here (BASIC authentication only).&lt;br /&gt;
|-&lt;br /&gt;
| Proxy_Password&lt;br /&gt;
| Proxy Password&lt;br /&gt;
| If your proxy server requires a password for authentication, then enter it here (BASIC authentication only).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Miscellaneous Settings ===&lt;br /&gt;
&lt;br /&gt;
This section contains any other global settings for MoodleTxt that do not fall into one of the earlier categories.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field Name&lt;br /&gt;
! Field Label&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| jQuery_Include_Enabled&lt;br /&gt;
| Include main jQuery package&lt;br /&gt;
| MoodleTxt uses the popular jQuery library within its user interface. Some Moodle installations already include this library within their active themes. If this is the case, then attempting to load both libraries can cause problems with the system. To turn off MoodleTxt&#039;s jQuery installation and have it use the one provided with your theme, uncheck this box. (&#039;&#039;&#039;Note:&#039;&#039;&#039; You will require at least jQuery 1.6 for this to work.)&lt;br /&gt;
|-&lt;br /&gt;
| jQuery_UI_Include_Enabled&lt;br /&gt;
| Include jQuery UI Library&lt;br /&gt;
| MoodleTxt uses the jQuery User Interface library for many common widgets/user interface components. Some Moodle installations already include this library within their active themes. If this is the case, then attempting to load both libraries can cause problems with the system. To turn off MoodleTxt&#039;s jQuery UI installation and have it use the one provided with your theme, uncheck this box. (&#039;&#039;&#039;Note:&#039;&#039;&#039; You will require at least jQuery UI 1.7 for this to work.)&lt;br /&gt;
|-&lt;br /&gt;
| Show_Inbound_Numbers&lt;br /&gt;
| Show source names/numbers in inbox (Default)&lt;br /&gt;
| In a classroom situation, such as a survey, where many people can see the messages that are coming into the system, you may wish to anonymise them by hiding the source of the messages. In current versions of MoodleTxt, inbound messages are anonymised by default. To show those message sources on inbox pages by default, then check this box. Since MoodleTxt 3.0, users can override these settings for their own inboxes, so this setting is now a default.&lt;br /&gt;
|-&lt;br /&gt;
| RSS_Update_Interval&lt;br /&gt;
| RSS Update Interval&lt;br /&gt;
| This setting controls how often MoodleTxt should check with the RSS feed on the ConnectTxt servers for new updates. (This is being retired, as Moodle 2.3 and up can find updates automatically.)&lt;br /&gt;
|-&lt;br /&gt;
| RSS_Expiry_Length&lt;br /&gt;
| RSS items expire after&lt;br /&gt;
| This setting controls how long an update notification from ConnectTxt should be displayed on the MoodleTxt admin panel. (This is being retired, as Moodle 2.3 and up can find updates automatically.)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:MoodleTxt|Settings]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Microsoft_365&amp;diff=140823</id>
		<title>Microsoft 365</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Microsoft_365&amp;diff=140823"/>
		<updated>2021-07-14T13:24:18Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Text replacement - &amp;quot;class=&amp;quot;nicetable&amp;quot;&amp;quot; to &amp;quot;class=&amp;quot;wikitable&amp;quot;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox plugin&lt;br /&gt;
|type = set&lt;br /&gt;
|set=https://moodle.org/plugins/browse.php?list=set&amp;amp;id=72&lt;br /&gt;
|entry = &lt;br /&gt;
https://moodle.org/plugins/local_office365 https://moodle.org/plugins/local_o365 https://moodle.org/plugins/auth_oidc https://moodle.org/plugins/repository_office365 https://moodle.org/plugins/block_microsoft https://moodle.org/plugins/theme_boost_o365teams https://moodle.org/plugins/assignsubmission_onenote https://moodle.org/plugins/assignfeedback_onenote&lt;br /&gt;
|tracker = https://github.com/Microsoft/o365-moodle/issues&lt;br /&gt;
|discussion = https://moodle.org/mod/forum/view.php?id=8273&lt;br /&gt;
|maintainer = See plugins directory entries&lt;br /&gt;
|float = right&lt;br /&gt;
}}&lt;br /&gt;
{{Note|[[OAuth 2 authentication]] (enabling users to log in to Moodle with their Microsoft account) and the [[OneDrive repository]] are included in the standard Moodle, so require no additional plugins to be installed.}}&lt;br /&gt;
= Introduction  =&lt;br /&gt;
Microsoft 365 services complement the Moodle learning platform to provide a more productive experience for teachers and students.&lt;br /&gt;
== Differences from Moodle Core ==&lt;br /&gt;
Although Moodle core now provides Microsoft 365 authentication and basic OneDrive repository support, the Microsoft 365 plugin suite provides a much wider set of features.&lt;br /&gt;
&lt;br /&gt;
A few key features only found in the Microsoft 365 plugin suite:&lt;br /&gt;
* User sync from Microsoft 365/Azure AD to Moodle&lt;br /&gt;
* Automatic and manual user matching from Microsoft 365/Azure AD to Moodle&lt;br /&gt;
* Calendar sync&lt;br /&gt;
* Course to Microsoft 365 group sync and shared file repositories&lt;br /&gt;
* OneNote assignment submission and feedback types&lt;br /&gt;
* Office document embedding using Office web apps&lt;br /&gt;
* Fully customizable sign-in experience&lt;br /&gt;
= Requirements =&lt;br /&gt;
To use the Microsoft 365 plugins, you need the following:&lt;br /&gt;
* A Microsoft 365 subscription.&lt;br /&gt;
* A Microsoft Azure subscription.&lt;br /&gt;
* Moodle version 3.5 or above. The plugins are available for Moodle versions 2.7 and above. Features available in each version, and the support status vary.&lt;br /&gt;
&lt;br /&gt;
= Plugins &amp;amp; Features =&lt;br /&gt;
The Microsoft 365 set of plugins contains 5 core plugins, and 4 optional plugins, which provide a wide variety of features to enhance your Moodle instance.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Microsoft 365 Local Plugin&#039;&#039;&#039; (local_office365)&lt;br /&gt;
** This is a shell plugin which has dependencies on the current version of each of the 4 other core plugins that make up the complete set. Installing this plugin ensures you have the current version of each of the functional plugins installed.&lt;br /&gt;
* &#039;&#039;&#039;OpenID Connect Authentication Plugin&#039;&#039;&#039; (auth_oidc)&lt;br /&gt;
** This plugin allows users to log in to Moodle using their Microsoft 365 accounts.&lt;br /&gt;
** Users with existing Moodle accounts can switch to using this authentication plugin, and new users can log in with this plugin and have an account created for them.&lt;br /&gt;
** If the administrator allows, users can also choose to disconnect from OpenID Connect and revert their previous login method, or to a username/password.&lt;br /&gt;
** Features&lt;br /&gt;
*** Standards-Compliant OpenID Connect Authentication&lt;br /&gt;
*** Supports authorization code or resource-owner credentials grants&lt;br /&gt;
**** Users can log in to Moodle by clicking the identity provider on the login page, or by entering their OpenID Connect credentials.&lt;br /&gt;
*** Customizable Icon + Identity Provider name&lt;br /&gt;
**** The icon and identity provider name shown on the Moodle login page can be customized. A number of prechosen icons are available, as well as the ability to upload your own.&lt;br /&gt;
*** Provides hooks to link OpenID Connect accounts to Moodle accounts&lt;br /&gt;
**** If you do not want to change your users&#039; login method, you can still connect to an OpenID Connect provider. The plugin provides code-level hooks to link a Moodle account to an OpenID Connect account without changing the Moodle user&#039;s authentication method. This means you can obtain tokens from an OpenID Connect service in the background.&lt;br /&gt;
*** Optional user-self-service connection and disconnection&lt;br /&gt;
**** A user-facing page is available for users to switch to and from OpenID Connect authentication. Access to this page and feature is controlled by a capability so administrators can disable it.&lt;br /&gt;
* &#039;&#039;&#039;Microsoft 365 support plugin&#039;&#039;&#039; (local_o365)&lt;br /&gt;
** This plugin provides most of the Microsoft 365 integration back-end. It provides shared code to communicate with Microsoft 365, and powers the calendar sync.&lt;br /&gt;
** Features&lt;br /&gt;
*** Calendar sync from/to Outlook.&lt;br /&gt;
**** Users can sync site events, course events, assignment due dates, and their personal Moodle calendar to their Outlook calendar.&lt;br /&gt;
*** User Sync and Matching&lt;br /&gt;
**** Users can be synced from Azure AD, or matched with existing users.&lt;br /&gt;
*** Teams&lt;br /&gt;
**** Teams can be automatically created for each course in Moodle (or you can select which courses are used), and Team membership is kept up-to-date with Moodle enrolments.&lt;br /&gt;
*** SharePoint sites for each Moodle course (Deprecated)&lt;br /&gt;
**** You can connect your Moodle instance to a SharePoint subsite. Sites below this will be created for each course in your Moodle instance, and the document library from each course subsite is accessible through the OneDrive for Business repository. The course subsite document library is accessible by course teachers, serving as a place for teachers to share documents.&lt;br /&gt;
**** This feature is now deprecated. It is mainly used to provide shared document repositories for courses, which can now be accomplished by Teams.&lt;br /&gt;
* &#039;&#039;&#039;Microsoft Block&#039;&#039;&#039; (block_microsoft)&lt;br /&gt;
** This block provides a user-facing menu to access various Microsoft 365 integration features, resources, and preferences.&lt;br /&gt;
** Links to: Azure AD login preferences, Calendar sync preferences, OneNote notebooks, Teams, and the Microsoft 365 integration user control panel.&lt;br /&gt;
* &#039;&#039;&#039;OneDrive for Business Repository&#039;&#039;&#039; (repository_office365)&lt;br /&gt;
** This is a repository plugin that communicates with OneDrive for Business. If the SharePoint link is configured, this also provides access to Moodle course SharePoint sites&#039; document libraries.&lt;br /&gt;
** Features&lt;br /&gt;
*** Import files into Moodle from OneDrive for Business&lt;br /&gt;
*** Upload files into OneDrive for Business from within Moodle&lt;br /&gt;
*** Link to files in OneDrive for Business so users always get the most up-to-date version.&lt;br /&gt;
*** Embed documents into Moodle courses so users can view documents directly on the site.&lt;br /&gt;
&lt;br /&gt;
== Optional Plugins ==&lt;br /&gt;
These 4 plugins provide support for OneNote assignment submission and feedback. While they are not required, they provide a powerful way to submit and review assignments.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Microsoft 365 Teams Theme&#039;&#039;&#039; (theme_boost_o365teams)&lt;br /&gt;
** This provides a theme to be used when when opening the course page in Teams tab, and provides a seamless user experience for users in Teams.&lt;br /&gt;
* &#039;&#039;&#039;OneNote support plugin&#039;&#039;&#039; (local_onenote)&lt;br /&gt;
** This provides supporting and shared code used by all other OneNote plugins. Does not have a user interface or configuration by itself.&lt;br /&gt;
* &#039;&#039;&#039;OneNote Assignment Feedback&#039;&#039;&#039; (assignfeedback_onenote)&lt;br /&gt;
** Allows teachers to leave feedback for students using OneNote.&lt;br /&gt;
* &#039;&#039;&#039;OneNote Assignment Submission&#039;&#039;&#039; (assignsubmission_onenote)&lt;br /&gt;
** Allows students to submit assignments using OneNote.&lt;br /&gt;
&lt;br /&gt;
== 3rd Party Plugins ==&lt;br /&gt;
* &#039;&#039;&#039;oEmbed Filter&#039;&#039;&#039; (filter_oembed)&lt;br /&gt;
** This filter converts links to a variety of sites into oembed-powered interactions.&lt;br /&gt;
** Provides [https://mix.office.com/ Office Mix] support for Moodle, allowing you to embed Office Mixes directly into any text within Moodle.&lt;br /&gt;
&lt;br /&gt;
= Resources =&lt;br /&gt;
&lt;br /&gt;
Tooling and guidance on deploying Scalable Moodle Clusters on Azure&lt;br /&gt;
* https://github.com/azure/moodle&lt;br /&gt;
&lt;br /&gt;
= Setup =&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
The packages are available from:&lt;br /&gt;
&lt;br /&gt;
* The [https://moodle.org/plugins/ Moodle Plugins directory]&lt;br /&gt;
** [https://moodle.org/plugins/browse.php?list=set&amp;amp;id=72 Microsoft 365 Plugin Set]&lt;br /&gt;
* GitHub&lt;br /&gt;
** http://github.com/microsoft/o365-moodle&lt;br /&gt;
&lt;br /&gt;
When you log back in to your Moodle instance, you are presented with the all the plugin configuration options. Save the settings without configuring them for now, you will come back to them later.&lt;br /&gt;
&lt;br /&gt;
For information on installing plugins in Moodle see  [[Installing plugins]]&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
After you have the code installed in your Moodle instance, you&#039;ll need to do a bit of setup before you can use the plugins.&lt;br /&gt;
&lt;br /&gt;
=== Enable the OpenID Connect Authentication Plugin ===&lt;br /&gt;
# Navigate to &#039;&#039;&#039;Site Administration &amp;gt; Plugins &amp;gt; Authentication&#039;&#039;&#039; and click &#039;&#039;&#039;Manage authentication&#039;&#039;&#039;&lt;br /&gt;
# Locate the OpenID Connect authentication plugin and click the eye icon to enable&lt;br /&gt;
# Click the Settings link for the plugin.&lt;br /&gt;
# Verify the Authorization and Token endpoints. These should be set by default but if not, set the endpoints to the following:&lt;br /&gt;
## &#039;&#039;&#039;Authorization Endpoint:&#039;&#039;&#039; https://login.microsoftonline.com/common/oauth2/authorize&lt;br /&gt;
## &#039;&#039;&#039;Token Endpoint:&#039;&#039;&#039; https://login.microsoftonline.com/common/oauth2/token&lt;br /&gt;
# Note the Redirect URI. This should be the URI of your Moodle instance followed by /auth/oidc/. You will need to enter this value into Azure AD later, so note this value and put it aside.&lt;br /&gt;
## For example, https://www.example.com/auth/oidc/&lt;br /&gt;
## Notes:&lt;br /&gt;
### This is a fixed value that is derived from your Moodle site&#039;s configured URL (wwwroot). You cannot change this value directly. If you need to change it for any of the following reasons, you must change your Moodle site&#039;s configured domain name ($CFG-&amp;gt;wwwroot).&lt;br /&gt;
### This URL must be a fully qualified domain name pointing to your Moodle instance.&lt;br /&gt;
### If your Moodle installation is configured with an IP address pointing to your instance, you must change $CFG-&amp;gt;wwwroot in your config.php to a fully-qualified domain name.&lt;br /&gt;
### This domain name does not need to be publicly accessible (i.e. internet-wide), but does need to be accessible to users of your Moodle instance. So, for example, you can use a intranet-only domain name.&lt;br /&gt;
&lt;br /&gt;
=== Prepare your Microsoft 365 account for single sign-on with your Moodle installation ===&lt;br /&gt;
You will need an Azure subscription. If you do not have one, you can create one by visiting [http://azure.microsoft.com/en-us/pricing/free-trial/ Microsoft Azure Sign Up].&lt;br /&gt;
&lt;br /&gt;
To use Moodle with Microsoft 365 for SSO, you must configure Microsoft Azure to manage your Microsoft 365 Microsoft Azure Active Directory. A guide is available at [https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-create-new-tenant this link].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: During the setup, you are required to enter a credit card and phone number. If you do not setup virtual machines or use paid services on the subscription, and only use it to access the Azure Active Directory, you will not be charged for the subscription.&lt;br /&gt;
&lt;br /&gt;
=== Register Application in Azure ===&lt;br /&gt;
The easiest way to register application in Azure is to run the PowerShell script downloaded from the plugin configuration page. Go to &#039;&#039;&#039;Site Administration &amp;gt; Plugins &amp;gt; Local plugins &amp;gt; Microsoft 365 Integration&#039;&#039;&#039;, it&#039;s the &#039;&#039;&#039;Download PowerShell Script&#039;&#039;&#039; button in the &#039;&#039;&#039;Setup&#039;&#039;&#039; tab.&lt;br /&gt;
&lt;br /&gt;
You should only follow the manual process if you are unable to setup the AzureAd app via PowerShell script, or you need to verify some specific settings.&lt;br /&gt;
&lt;br /&gt;
==== Manual steps ====&lt;br /&gt;
The following steps are involved in the manual setup:&lt;br /&gt;
# Sign in to the [https://portal.azure.com Microsoft Azure Management Portal].&lt;br /&gt;
# Click on the &#039;&#039;&#039;Azure Active Directory&#039;&#039;&#039; link from &#039;&#039;&#039;Azure services&#039;&#039;&#039; section, then &#039;&#039;&#039;App Registrations&#039;&#039;&#039; from &#039;&#039;&#039;Manage&#039;&#039;&#039; section on the left.&lt;br /&gt;
# Click &#039;&#039;&#039;New registration&#039;&#039;&#039; on the top menu.&lt;br /&gt;
# Enter a name for your application (can be anything you want, but should let you know this is for Moodle).&lt;br /&gt;
# Choose option applicable to your organisation in &#039;&#039;&#039;Supported account types&#039;&#039;&#039; section. Note that if you choose option other than the &amp;quot;single tenant&amp;quot; one for &amp;quot;Who can use this application or access this API?&amp;quot;, you will not be able to use SSO in Teams integration.&lt;br /&gt;
# In &#039;&#039;&#039;Redirect URI (optional)&#039;&#039;&#039; section, select &#039;&#039;&#039;Web&#039;&#039;&#039; and put the redirect URI from the OpenID Connect authentication plugin configuration. &#039;&#039;&#039;Ensure there is a trailing slash for this URI - i.e. https://example.com/auth/oidc/&#039;&#039;&#039;&lt;br /&gt;
# Click &#039;&#039;&#039;Register&#039;&#039;&#039;.&lt;br /&gt;
# You now have an application registered in Azure for Moodle. Move on to the next section to properly configure it.&lt;br /&gt;
&lt;br /&gt;
===== Configure application =====&lt;br /&gt;
# Locate the App.&lt;br /&gt;
## Sign in to the [https://portal.azure.com Microsoft Azure Management Portal].&lt;br /&gt;
## Click on the &#039;&#039;&#039;Azure Active Directory&#039;&#039;&#039; link from &#039;&#039;&#039;Azure services&#039;&#039;&#039; section, then &#039;&#039;&#039;App Registrations&#039;&#039;&#039; from &#039;&#039;&#039;Manage&#039;&#039;&#039; section on the left.&lt;br /&gt;
## Click on the App you created for Moodle. Note you may need to change the dropdown from &amp;quot;My apps&amp;quot; to &amp;quot;All apps&amp;quot; if the App was not created by you.&lt;br /&gt;
## Locate the &#039;&#039;&#039;Application ID&#039;&#039;&#039;, note this value (write it down or copy it somewhere), and set it aside. You&#039;ll need it later.&lt;br /&gt;
## Click on the display name of the App to open its settings.&lt;br /&gt;
# Enable implicit grant flow.&lt;br /&gt;
## From the menu on the left, go to &#039;&#039;&#039;Authentication&#039;&#039;&#039; link in the &#039;&#039;&#039;Manage&#039;&#039;&#039; section.&lt;br /&gt;
## In the &#039;&#039;&#039;Implicit grant&#039;&#039;&#039; section, check both &amp;quot;Access tokens&amp;quot; and &amp;quot;ID tokens&amp;quot;.&lt;br /&gt;
## Save the changes.&lt;br /&gt;
# Create client secrets.&lt;br /&gt;
## From the menu on the left, go to &#039;&#039;&#039;Certificates &amp;amp; secrets&#039;&#039;&#039; link in the &#039;&#039;&#039;Manage&#039;&#039;&#039; section.&lt;br /&gt;
## Create a new client secret by clicking &#039;&#039;&#039;New client secret&#039;&#039;&#039; button.&lt;br /&gt;
## Enter a description, and select a duration for &amp;quot;Expires&amp;quot;&lt;br /&gt;
## Click &#039;&#039;&#039;Add&#039;&#039;&#039;&lt;br /&gt;
## A value will appear under &#039;&#039;&#039;Value&#039;&#039;&#039;, note this key value (write it down or copy it somewhere) and set it aside. You&#039;ll need it later.&lt;br /&gt;
# Expose an API - only required if Teams sync feature is used.&lt;br /&gt;
## From the menu on the left, go to &#039;&#039;&#039;Expose an API&#039;&#039;&#039; link in the &#039;&#039;&#039;Manage&#039;&#039;&#039; section.&lt;br /&gt;
## Click the &amp;quot;Set&amp;quot; link next to &amp;quot;Application ID URI&amp;quot;.&lt;br /&gt;
## This should open a &amp;quot;Set the APP ID URI&amp;quot; prompt, with a default value such as &amp;quot;api://00000000-0000-0000-0000-000000000000&amp;quot;, where the GUID is the same as your Application ID.&lt;br /&gt;
## Replace this value with &amp;quot;api://URL.TO.MOODLE/00000000-0000-0000-0000-000000000000&amp;quot;, where URL.TO.MOODLE is the wwwroot of your Moodle site, and the GUID is the same was default value, i.e. your Application ID.&lt;br /&gt;
## Click &amp;quot;Save&amp;quot; to create the Application ID URI.&lt;br /&gt;
## Click &amp;quot;Add a scope&amp;quot;.&lt;br /&gt;
## Enter &amp;quot;access_as_user&amp;quot; as scope name.&lt;br /&gt;
## Set &amp;quot;Who can consent?&amp;quot; to &amp;quot;Admins and users&amp;quot;.&lt;br /&gt;
## Set &amp;quot;Admin consent title&amp;quot; to &amp;quot;Teams can access the user’s profile&amp;quot;.&lt;br /&gt;
## Set &amp;quot;Admin consent description&amp;quot; to &amp;quot;Allows Teams to call the app’s web APIs as the current user&amp;quot;.&lt;br /&gt;
## Set &amp;quot;User consent title&amp;quot; to &amp;quot;Teams can access the user profile and make requests on the user&#039;s behalf&amp;quot;.&lt;br /&gt;
## Set &amp;quot;User consent description&amp;quot; to &amp;quot;Enable Teams to call this app’s APIs with the same rights as the user&amp;quot;&lt;br /&gt;
## Ensure that &amp;quot;State&amp;quot; is set to &amp;quot;Enabled&amp;quot;.&lt;br /&gt;
## Select the &amp;quot;Add scope&amp;quot; button to save.&lt;br /&gt;
## In the &amp;quot;Authorized client applications&amp;quot; section, identify the applications that you want to authorize for your app’s web application. Select Add a client application. Enter each of the following client IDs and select the authorized scope you created in the previous step:&lt;br /&gt;
### 1fec8e78-bce4-4aaf-ab1b-5451cc387264 (Teams mobile/desktop application)&lt;br /&gt;
### 5e3ce6c0-2b1f-4285-8d4b-75ee78787346 (Teams web application)&lt;br /&gt;
# Configure App Permissions.&lt;br /&gt;
## Click the &#039;&#039;&#039;API permissions&#039;&#039;&#039; link in the &#039;&#039;&#039;Manage&#039;&#039;&#039; section.&lt;br /&gt;
## Click &#039;&#039;&#039;Add a permission&#039;&#039;&#039; button.&lt;br /&gt;
## In &#039;&#039;&#039;Select an API&#039;&#039;&#039; section, choose &#039;&#039;&#039;Microsoft APIs&#039;&#039;&#039; tab, then choose &amp;quot;Microsoft Graph&amp;quot;.&lt;br /&gt;
## Click the checkbox for the following permissions in each of the &amp;quot;Application&amp;quot; and &amp;quot;Delegated&amp;quot; permissions sections according to the table below.&lt;br /&gt;
## After all the permissions are added, click the &amp;quot;Grant admin consent for YOUR ORGANISATION NAME&amp;quot; link.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Type&lt;br /&gt;
! Permission&lt;br /&gt;
! Display Name&lt;br /&gt;
! Use&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;9&amp;quot; | Application Permissions&lt;br /&gt;
| &#039;&#039;&#039;Domain.ReadWrite.All&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Read and write domains&#039;&#039;&#039;&lt;br /&gt;
| Required to automatically detect your Microsoft 365 tenant during setup.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;User.ReadWrite.All&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Read and write all users&#039; full profiles&#039;&#039;&#039;&lt;br /&gt;
| Required to sync user information between Moodle and Microsoft 365.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Notes.ReadWrite.All&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Read and write all OneNote notebooks&#039;&#039;&#039;&lt;br /&gt;
| Required for the OneNote integration to create notebooks, sections, and pages for assignments.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Group.ReadWrite.All&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Read and write all groups&#039;&#039;&#039;&lt;br /&gt;
| Required for course group integration.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Directory.Read.All&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Read directory data&#039;&#039;&#039;&lt;br /&gt;
| Required for setup detection and verification.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Calendars.ReadWrite&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Read and write calendars in all mailboxes&#039;&#039;&#039;&lt;br /&gt;
| Required for calendar event sync.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Files.ReadWrite.All&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Read and write files in all site collections&#039;&#039;&#039;&lt;br /&gt;
| Required for the Microsoft 365 repository to access, download, and upload files to OneDrive.&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;MailboxSettings.Read&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Read all user mailbox settings&#039;&#039;&#039;&lt;br /&gt;
| Required for syncing Outlook default timezone settings of the user.&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;MailboxSettings.ReadWrite&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Read and write all user mailbox settings&#039;&#039;&#039;&lt;br /&gt;
| Required for syncing Outlook default timezone settings of the user.&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;16&amp;quot; | Delegated Permissions&lt;br /&gt;
| &#039;&#039;&#039;Notes.ReadWrite.All&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Read and write all OneNote notebooks that user can access&#039;&#039;&#039;&lt;br /&gt;
| Required for the OneNote integration to create notebooks, sections, and pages for assignments.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;User.Read&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Sign-in and read user profile&#039;&#039;&#039;&lt;br /&gt;
| Required to sign users in using Microsoft 365, and to access Microsoft 365 APIs.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;User.ReadWrite.All&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Read and write all users&#039; full profiles&#039;&#039;&#039;&lt;br /&gt;
| Required to sync user information between Moodle and Microsoft 365.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Group.ReadWrite.All&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Read and write all groups&#039;&#039;&#039;&lt;br /&gt;
| Required for course group integration.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Directory.ReadWrite.All&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Read and write directory data&#039;&#039;&#039;&lt;br /&gt;
| Required for setup detection and verification.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Directory.AccessAsUser.All&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Access directory as the signed in user&#039;&#039;&#039;&lt;br /&gt;
| Required to access Microsoft 365 APIs.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Calendars.ReadWrite&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Have full access to user calendars&#039;&#039;&#039;&lt;br /&gt;
| Required for calendar event sync.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Files.ReadWrite&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Have full access to user files&#039;&#039;&#039;&lt;br /&gt;
| Required for the Microsoft 365 repository to access, download, and upload files to OneDrive.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Sites.Read.All&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Read items in all site collections&#039;&#039;&#039;&lt;br /&gt;
| Required for SharePoint integration (deprecated)&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;MailboxSettings.Read&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Read user mailbox settings&#039;&#039;&#039;&lt;br /&gt;
| Required for syncing Outlook default timezone settings of the user.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;MailboxSettings.ReadWrite&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Read and write user mailbox settings&#039;&#039;&#039;&lt;br /&gt;
| Required for syncing Outlook default timezone settings of the user.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;openid&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Sign users in&#039;&#039;&#039;&lt;br /&gt;
| Required to sign users in using Microsoft 365 (required for all integration).&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;offline_access&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Maintain access to data you have given it access to&#039;&#039;&#039;&lt;br /&gt;
| Required for Teams SSO.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;email&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;View users&#039; email address&#039;&#039;&#039;&lt;br /&gt;
| Required for Teams SSO.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;profile&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;View users&#039; basic profile&#039;&#039;&#039;&lt;br /&gt;
| Required for Teams SSO.&lt;br /&gt;
|}&lt;br /&gt;
When you&#039;re done, click &#039;&#039;&#039;Add permissions&#039;&#039;&#039; at bottom of the page.&lt;br /&gt;
&lt;br /&gt;
=== Enter Azure application credentials into Moodle ===&lt;br /&gt;
# Navigate to the OpenID Connect authentication plugin&#039;s settings page (Site Administration &amp;gt; Plugins &amp;gt; Authentication &amp;gt; OpenID Connect)&lt;br /&gt;
# Enter the &#039;&#039;&#039;Application ID&#039;&#039;&#039; value you noted earlier from Azure into the &#039;&#039;&#039;Application ID&#039;&#039;&#039; box on the screen.&lt;br /&gt;
# Enter the &#039;&#039;&#039;Key&#039;&#039;&#039; value you noted earlier from Azure into the &amp;quot;Key&amp;quot; box on the screen.&lt;br /&gt;
# Click &amp;quot;Save changes&amp;quot; at the bottom of the screen.&lt;br /&gt;
&lt;br /&gt;
=== Configure the Microsoft 365 support plugin ===&lt;br /&gt;
# Navigate to &#039;&#039;&#039;Site Administration &amp;gt; Plugins &amp;gt; Local plugins&#039;&#039;&#039; and click &#039;&#039;&#039;Microsoft 365 Integration&#039;&#039;&#039;&lt;br /&gt;
# Complete each of the steps as follows:&lt;br /&gt;
# &#039;&#039;&#039;Choose connection method&#039;&#039;&#039;&lt;br /&gt;
## Choose the method you want to use to connect to Microsoft 365. Unless you have a special reason to use the System API user, choose &#039;&#039;&#039;Application access&#039;&#039;&#039;.&lt;br /&gt;
## Click &#039;&#039;&#039;Save changes&#039;&#039;&#039;&lt;br /&gt;
# &#039;&#039;&#039;Admin consent &amp;amp; additional information&#039;&#039;&#039;&lt;br /&gt;
## &#039;&#039;&#039;Admin consent:&#039;&#039;&#039; Every time you change a &#039;&#039;&#039;Requires admin&#039;&#039;&#039; permission in Azure, you will need an administrator to provide consent to use the permission. Clicking the &#039;&#039;&#039;Provide admin consent&#039;&#039;&#039; button will take you to a log in screen on Microsoft 365. An administrator will have to log in, and then will be given the option to approve the new permissions.&lt;br /&gt;
## &#039;&#039;&#039;Azure AD Tenant:&#039;&#039;&#039; This is the domain name that identifies your Microsoft 365 subscription, for example &amp;quot;contoso.onmicrosoft.com&amp;quot;. If you know it, enter it in this box, if not, click the &amp;quot;Detect&amp;quot; button to attempt to detect the correct value.&lt;br /&gt;
## &#039;&#039;&#039;OneDrive for Business URL:&#039;&#039;&#039; This is the URL that your users use to access OneDrive for Business. This can usually be determined from your AzureAD tenant, for example, if your tenant is &amp;quot;contoso.onmicrosoft.com&amp;quot;, your OneDrive for Business URL is &amp;quot;contoso-my.sharepoint.com.&amp;quot; If you know the URL, enter it here, otherwise click &amp;quot;Detect&amp;quot; to attempt to detect the correct value. Only enter the domain name, do not include &amp;quot;http://&amp;quot;, &amp;quot;www.&amp;quot; or any trailing slashes. For example &amp;quot;contoso-my.sharepoint.com&amp;quot;, not &amp;quot;https://contoso-my.sharepoint.com/&amp;quot;&lt;br /&gt;
## Click Save changes.&lt;br /&gt;
# &#039;&#039;&#039;Verify Setup&#039;&#039;&#039;&lt;br /&gt;
## This tool verifies that Azure has been correctly set up. Click the &amp;quot;Update&amp;quot; button to check setup.&lt;br /&gt;
## If the tool reports any missing permissions, return to Azure and ensure that all required permissions have been added to your configured application for Moodle.&lt;br /&gt;
&lt;br /&gt;
== Connecting users to Microsoft 365 ==&lt;br /&gt;
To use any Microsoft 365 features, a Moodle user must be connected to a Microsoft 365 user that has an active Microsoft 365 subscription. There are two ways to connect a Moodle user to a Microsoft 365 user.&lt;br /&gt;
&lt;br /&gt;
=== Switch the user to use OpenID Connect authentication. ===&lt;br /&gt;
With this method, the user will log in to Moodle using their Microsoft 365 account credentials.&lt;br /&gt;
* Users who do not yet have a Moodle account can simply follow the normal OpenID Connect login process (see: [[Office365#Basic_Usage]]). If a Moodle account is not found for a user logging in with OpenID Connect, an account will be created for them.&lt;br /&gt;
* To migrate an existing Moodle user to OpenID Connect authentication, see [[Office365#Switching_existing_Moodle_users_to_use_Office_365_to_log_in]].&lt;br /&gt;
&lt;br /&gt;
=== Link a Moodle user to a Microsoft 365 user. ===&lt;br /&gt;
Users in Moodle can also be linked to Microsoft 365 users without changing the Moodle user&#039;s authentication method. Users will be able to log in as they always have, and still use all the Microsoft 365 features.&lt;br /&gt;
# Ensure the Microsoft block has been added to a page in Moodle (for example, the Moodle dashboard).&lt;br /&gt;
# As the user to link to Microsoft 365, visit a page that has the Microsoft block visible.&lt;br /&gt;
# Click the &#039;&#039;&#039;Connect to Microsoft 365&#039;&#039;&#039; link in the Microsoft block.&lt;br /&gt;
# You will be brought to the &#039;&#039;&#039;Microsoft 365 / Moodle Control Panel&#039;&#039;&#039;.&lt;br /&gt;
# There will be a &amp;quot;Connection Status&amp;quot; indicator box on the right side of the screen, click the &amp;quot;Click here to connect&amp;quot; link.&lt;br /&gt;
# You will be brought to the AzureAD authentication screen. Log in with the Microsoft 365 user&#039;s credentials you&#039;d like to connect to the Moodle user you are logged in as.&lt;br /&gt;
# If login was successful, you will be brought back to the &#039;&#039;&#039;Microsoft 365 / Moodle Control Panel&#039;&#039;&#039; page, where the Microsoft 365 connection indicator should now read &#039;&#039;&#039;Active&#039;&#039;&#039;.&lt;br /&gt;
# This user is now connected to the Microsoft 365 user.&lt;br /&gt;
&lt;br /&gt;
= Microsoft 365 Integration Local Plugin =&lt;br /&gt;
== Sync Settings ==&lt;br /&gt;
These features are accessible from the plugin&#039;s settings page (Site Administration &amp;gt; Plugins &amp;gt; Local plugins &amp;gt; Microsoft 365 Integration), on the &#039;&#039;&#039;Sync Settings&#039;&#039;&#039; tab.&lt;br /&gt;
&lt;br /&gt;
=== User Sync ===&lt;br /&gt;
This option controls how users are synced from Azure AD to Moodle. If enabled, users from Azure AD can be automatically created in Moodle. This feature can also delete users in Moodle when they are deleted from Azure AD, or attempt to automatically match Moodle users with users in the connected Azure AD.&lt;br /&gt;
&lt;br /&gt;
The main benefit of using this option, compared to having accounts created as users log in using OpenID Connect, is that you can manage and enrol users before they first log in, so everything is ready to go the first time they access Moodle.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes:&#039;&#039;&#039;&lt;br /&gt;
* The sync job runs in the Moodle cron, and syncs 1000 users at a time.&lt;br /&gt;
* By default, this runs once per day at 1:00 AM in the time zone local to your server.&lt;br /&gt;
* To sync large sets of users more quickly, you can increase the freqency of the Sync users with Azure AD task using the Scheduled tasks management page. See [[Scheduled_tasks]].&lt;br /&gt;
&lt;br /&gt;
There are several options that affect user sync:&lt;br /&gt;
* &#039;&#039;&#039;Create accounts in Moodle for users in Azure AD&#039;&#039;&#039;: This will create users in Moodle from each user in the linked Azure Active Directory. Only users which do not currently have Moodle accounts will have accounts created. New accounts will be set up to use their Microsoft 365 credentials to log in to Moodle (using the OpenID Connect authentication plugin), and will be able to use all the features of the Microsoft 365 plugin set.&lt;br /&gt;
* &#039;&#039;&#039;Update all accounts in Moodle for users in Azure AD&#039;&#039;&#039;: This will update all users in Moodle from each user in the linked Azure AD.&lt;br /&gt;
* &#039;&#039;&#039;Delete previously synced accounts in Moodle when they are deleted from Azure AD&#039;&#039;&#039;: This will delete users from Moodle if they are marked as deleted in Azure AD. The Moodle account will be deleted and all associated user information will be removed from Moodle. Be careful!&lt;br /&gt;
* &#039;&#039;&#039;Match preexisting Moodle users with same-named accounts in Azure AD&#039;&#039;&#039;: This will look at the each user in the linked Azure Active Directory and try to match them with a user in Moodle. This looks for matching usernames in Azure AD and Moodle. Matches are insensitive and ignore the Microsoft 365 tenant. For example, &amp;quot;BoB.SmiTh&amp;quot; in Moodle would match &amp;quot;bob.smith@example.onmicrosoft.com&amp;quot;. Users who are matched will have their Moodle and Office accounts connected and will be able to use all Microsoft 365/Moodle integration features. The user&#039;s authentication method will not change unless the setting below is enabled.&lt;br /&gt;
* &#039;&#039;&#039;Switch matched users to Microsoft 365 (OpenID Connect) authentication&#039;&#039;&#039;: This requires the &amp;quot;Match&amp;quot; setting above to be enabled. When a user is matched, enabling this setting will switch their authentication method to OpenID Connect. They will then log in to Moodle with their Microsoft 365 credentials. Note: Please ensure the OpenID Connect authentication plugin is enabled if you want to use this setting.&lt;br /&gt;
* &#039;&#039;&#039;Assign users to application during sync&#039;&#039;&#039;: The sync will search all users in the linked Azure AD (other than those excluded by the User Creation Restriction, however not all users may be assigned to the Moodle application you created in Azure AD App Registration during early setup. This setting will assign any Azure AD users with a matching Moodle account to the Azure AD App for Moodle you created.&lt;br /&gt;
* &#039;&#039;&#039;Sync Microsoft 365 profile photos to Moodle in cron job&#039;&#039;&#039;: User&#039;s photos in the Moodle profile will be updated with their image from their Azure AD profile - by cron job.&lt;br /&gt;
* &#039;&#039;&#039;Sync Microsoft 365 profile photos to Moodle on login&#039;&#039;&#039;: User&#039;s photos in the Moodle profile will be updated with their image from their Azure AD profile - on login.&lt;br /&gt;
* &#039;&#039;&#039;Perform a full sync each run&#039;&#039;&#039;: By default user sync will only sync changes from Azure AD. Checking this option will force a full user sync each time.&lt;br /&gt;
* &#039;&#039;&#039;Match Azure usernames to Moodle emails instead of Moodle usernames during the sync&#039;&#039;&#039;: Enabling this option will match Azure usernames to Moodle emails instead of the default behaviour which is Azure usernames to Moodle usernames.&lt;br /&gt;
&lt;br /&gt;
====User Creation Restriction====&lt;br /&gt;
During user sync, by default, all users from Azure AD will be created in Moodle. This setting allows you to set a required field and value that a user must have in Azure to have an account created in Moodle. For example, if you wanted to only have users from the &amp;quot;IT&amp;quot; department syncing into Moodle, you would choose the &amp;quot;Department&amp;quot; field, and enter &amp;quot;IT&amp;quot;. &lt;br /&gt;
====User Field Mapping====&lt;br /&gt;
This controls how information is synced from Azure AD to Moodle. The first column lists Azure fields, the second column lists Moodle fields, and the third column controls when information is synced. &lt;br /&gt;
To create mappings:&lt;br /&gt;
# Click &amp;quot;Add Mapping&amp;quot;&lt;br /&gt;
# In the row that appears, select an Azure field to bring into Moodle.&lt;br /&gt;
# In the second column on the same row, select a Moodle field to copy the value into.&lt;br /&gt;
# In the third column on the same row, choose whether this only happens on user creation, on user login, or both.&lt;br /&gt;
# Click &amp;quot;Save Changes&amp;quot; at the bottom of the page.&lt;br /&gt;
&lt;br /&gt;
To Delete A Mapping&lt;br /&gt;
# Click the &amp;quot;X&amp;quot; button at the end of the row you want to delete. &lt;br /&gt;
# Click &amp;quot;Save changes&amp;quot; at the bottom of the page.&lt;br /&gt;
# Note this will only prevent future information syncing, it will not undo past operations.&lt;br /&gt;
&lt;br /&gt;
=== Teams Sync ===&lt;br /&gt;
The Teams sync setting creates teams in Microsoft Teams for courses in Moodle. Teams creation effectively results in team members being added to a Microsoft 365 group, enabling all  group features to be usable.&lt;br /&gt;
&lt;br /&gt;
Features:&lt;br /&gt;
* Teams (group) membership is kept up-to-date with enrolments in Moodle. &lt;br /&gt;
* Provides an easy way to address all users in a course from Microsoft 365. For example, a teacher can share a document from OneDrive with all of their students by choosing the user group, i.e. Teams members, for their course - they don&#039;t have to choose each student individually.&lt;br /&gt;
* Course group file stores are accessible from the Microsoft 365 Moodle file repository plugin, allowing users to access group files from Moodle.&lt;br /&gt;
&lt;br /&gt;
The Teams sync option allows a great deal of customization. An administrator can choose to create Teams for all courses, and enable all settings, or customize the implementation. If administrators choose the &amp;quot;Customize&amp;quot; option for this setting, administrators can choose which courses have Teams created, and choose which features are enabled for each course.&lt;br /&gt;
&lt;br /&gt;
Once enabled, new Teams will be created every cron run for any enabled course that doesn&#039;t have a team set up. Once Teams are set up, membership will be maintained automatically whenever someone joins or leaves a Moodle course.&lt;br /&gt;
&lt;br /&gt;
==== Teams vs Group ====&lt;br /&gt;
Microsoft Teams share the same base with Microsoft 365 groups in many ways, notably they share the same GUID, and Team members are also group members, however, there is a significant difference in the requirements for creating a Team and creating a group - Team creation require at least one Team owner, while groups can be created without owner. This unfortunately has an impact on the Teams sync feature, when a Moodle course is processed by the Teams sync feature for the first time, assuming the &amp;quot;Teams&amp;quot; feature is enabled:&lt;br /&gt;
* If the course has at least one teacher who can be matched to a Microsoft 365 user enrolled, a Team will be created, with the teacher as Team owner,&lt;br /&gt;
* If the course has no user enrolled with teacher role, or none user enrolled with teacher role is Microsoft 365 user, only a group will be created.&lt;br /&gt;
&lt;br /&gt;
== Advanced settings ==&lt;br /&gt;
=== Administrator Tools ===&lt;br /&gt;
* &#039;&#039;&#039;Tenants&#039;&#039;&#039;: This tool allows you to add additional Microsoft 365 tenants to be used with Moodle. Users from additional tenants can log-in to Moodle using their Microsoft 365 account, and use features like calendar sync and the OneDrive repository.&lt;br /&gt;
* &#039;&#039;&#039;Health check&#039;&#039;&#039;: If you are experiencing problems with any Microsoft 365 / Moodle features, click the &#039;&#039;&#039;Health Check&#039;&#039;&#039; link to run tests on your system and look for potential problems.&lt;br /&gt;
* &#039;&#039;&#039;Connections&#039;&#039;&#039;: This tool allows administrators to see and manage the connections between their Moodle users and Microsoft 365 accounts. Each user in the system is listed alongside the Microsoft 365 username the user is connected to, if any. Administrators can choose to manually connect or disconnect each user.&lt;br /&gt;
* &#039;&#039;&#039;User Matching&#039;&#039;&#039;: This tool allows administrators to manually match Moodle and Microsoft 365 users using a CSV file. Administrators can upload a CSV file containing, on each line, a Moodle username, and Microsoft 365 username, and a 1 or 0 indicating whether to enable Microsoft 365 login for that user. Once uploaded, the file is processed in batches during the Moodle cron. The tool page will display the progress of this process.&lt;br /&gt;
* &#039;&#039;&#039;Maintenance Tools&#039;&#039;&#039;: These tools perform maintenance tasks that can help solve problems which may crop up from time to time. Generally, users should not need these tools unless they encounter the specific situation these tools are designed to solve.&lt;br /&gt;
** &#039;&#039;&#039;Resync users in groups for courses&#039;&#039;&#039;: Course group membership is kept up-to-date as users are enrolled and un-enrolled from courses in Moodle. If this membership gets out-of-date for whatever reason, this tool will force a resync of group membership.&lt;br /&gt;
** &#039;&#039;&#039;Recreate deleted Microsoft 365 groups&#039;&#039;&#039;: Course groups are created from Moodle courses when using the course group feature. If a group is manually deleted from the Microsoft 365 administrator panel, this tool will recreate it.&lt;br /&gt;
** &#039;&#039;&#039;Generate debug data package&#039;&#039;&#039;:  This tool will generate a package of information that can be sent to the plugin suite maintainers to help debug problems in environment and setup. While no API keys are present, this information does contain a lot about your environment and setup, so please be careful about who you send this information to.&lt;br /&gt;
** &#039;&#039;&#039;Cleanup OpenID Connect Tokens&#039;&#039;&#039;: If your users are experiencing problems logging in using their Microsoft 365 account, trying cleaning up OpenID Connect tokens. This removes stray and incomplete tokens that can cause errors. WARNING: This may interrupt logins in-process, so it&#039;s best to do this during downtime.&lt;br /&gt;
** &#039;&#039;&#039;Cleanup User Sync Delta Tokens&#039;&#039;&#039;: If user synchronisation is not fully working after updating it user sync settings, it may be caused by an old delta sync token. Cleaning up the token will remove force a complete re-sync the next time when the user sync is run.&lt;br /&gt;
&lt;br /&gt;
===Other advanced settings===&lt;br /&gt;
* &#039;&#039;&#039;Single sign off&#039;&#039;&#039;: If enabled, when a Moodle user using OIDC authentication method signs off from Moodle, Moodle will attempt to log the user off from Microsoft 365 as well.&lt;br /&gt;
* &#039;&#039;&#039;Microsoft 365 for China&#039;&#039;&#039;: Microsoft 365 in China differs slightly in some technical aspects. If you are using Microsoft 365 for China, select this box to ensure everything will work properly.&lt;br /&gt;
* &#039;&#039;&#039;Record debug messages&#039;&#039;&#039;: If you experience problems using any Microsoft 365 features in Moodle, enable this setting. Once enabled, errors will be recorded to the Moodle log for review. These errors can help you or the plugin developers debug and fix the problem. The error log can be viewed by navigating to Site Administration &amp;gt; Reports &amp;gt; Logs, changing the &amp;quot;All activities&amp;quot; select box to &amp;quot;Site errors&amp;quot;, and clicking &amp;quot;Get these logs&amp;quot;.&lt;br /&gt;
* &#039;&#039;&#039;Minimum inexact username length to switch to Microsoft 365&#039;&#039;&#039;: When using automatic user matching, this setting can be used to exclude accounts with short names. The intended use of this is to avoid matching generic accounts like &amp;quot;admin&amp;quot;. This setting is the minimum length of a username required for automatic matching to match users.&lt;br /&gt;
* &#039;&#039;&#039;Profile photo refresh time&#039;&#039;&#039;: Profile photo syncing can be a resource-intensive process, so this setting allows you to set a minimum time between profile photo refresh runs.&lt;br /&gt;
* &#039;&#039;&#039;Custom theme (Advanced)&#039;&#039;&#039;: This allows you to choose the theme to use in when accessing Moodle pages from the Moodle Teams tab.&lt;br /&gt;
&lt;br /&gt;
===Legacy settings===&lt;br /&gt;
&#039;&#039;&#039;These features are deprecated and is likely to be removed in a future version.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Preview features===&lt;br /&gt;
From time-to-time, we add features that use brand-new APIs or are slightly experimental in some way. These features often become part of our regular feature offering once they mature, but if you want to see the latest features we&#039;re working on, you can enable this setting to enable all preview features. Be careful though! These features do break from time to time.&lt;br /&gt;
&lt;br /&gt;
==Teams Settings==&lt;br /&gt;
This section allows configuration Moodle and Microsoft Teams integration. When fully configured, the integration will&lt;br /&gt;
* Automatically create Teams for Moodle courses configured to be synced.&lt;br /&gt;
* Automatically sync Moodle course users to Teams.&lt;br /&gt;
* Automatically create a Moodle tab in the general channel of the created Team, linking to the Moodle course page.&lt;br /&gt;
* Allow users to use Moodle courses right from Teams.&lt;br /&gt;
* Allow users to ask questions about their courses, assignments, grades and students from Teams using Moodle assistance bot.&lt;br /&gt;
* Forward all Moodle notifications to users to Teams.&lt;br /&gt;
Some features can be disabled if needed.&lt;br /&gt;
&lt;br /&gt;
===Prerequisite===&lt;br /&gt;
# &#039;&#039;&#039;OpenID Connect Authentication&#039;&#039;&#039; plugin is enabled and configured.&lt;br /&gt;
# &#039;&#039;&#039;Allow frame embedding&#039;&#039;&#039; is enabled in &#039;&#039;&#039;HTTP security&#039;&#039;&#039; section of site configuration.&lt;br /&gt;
## Login to the site as site administrator.&lt;br /&gt;
## Go to &amp;quot;Site administration&amp;quot;, then in the &amp;quot;Site administration&amp;quot; tab, go to &amp;quot;HTTP security&amp;quot; in &amp;quot;Security&amp;quot; section.&lt;br /&gt;
## Find &#039;&#039;&#039;Allow frame embedding&#039;&#039;&#039; setting and make sure it&#039;s enabled.&lt;br /&gt;
## Save changes.&lt;br /&gt;
# Web services are enabled on the site.&lt;br /&gt;
## Login to the site as site administrator.&lt;br /&gt;
## Go to &amp;quot;Site administration&amp;quot;, then in the &amp;quot;Site administration&amp;quot; tab, go to &amp;quot;Advanced features&amp;quot;.&lt;br /&gt;
## Find &#039;&#039;&#039;Enable web services&#039;&#039;&#039; setting and make sure it&#039;s enabled.&lt;br /&gt;
## Save changes.&lt;br /&gt;
# &#039;&#039;&#039;Moodle Microsoft 365 Webservices&#039;&#039;&#039; are enabled.&lt;br /&gt;
## Login to the site as site administrator.&lt;br /&gt;
## Go to &amp;quot;Site administration&amp;quot;, then in the &amp;quot;Plugins&amp;quot; tab, go to &amp;quot;External services&amp;quot; in &amp;quot;Web services&amp;quot; section.&lt;br /&gt;
## From the list of web services in the &amp;quot;External service&amp;quot; part in &amp;quot;Built-in services&amp;quot; section, find &#039;&#039;&#039;Moodle Microsoft 365 Webservices&#039;&#039;&#039;.&lt;br /&gt;
## If the web services is disabled, i.e. greyed out, go to its settings and enable it.&lt;br /&gt;
# Give &#039;&#039;&#039;Authenticated user&#039;&#039;&#039; role permission to create web service token.&lt;br /&gt;
## Login to the site as site administrator.&lt;br /&gt;
## Go to &amp;quot;Site administration&amp;quot;, then in the &amp;quot;Users&amp;quot; tab, go to &amp;quot;Define roles&amp;quot; in &amp;quot;Permissions&amp;quot; section.&lt;br /&gt;
## In the &amp;quot;Manage roles&amp;quot; tab, from the list of roles, find &amp;quot;Authenticated user&amp;quot; role, and click the edit icon for the role.&lt;br /&gt;
## From the list of permissions, find &amp;quot;Create a web service token&amp;quot;, i.e. moodle/webservice:createtoken, and set it to allow.&lt;br /&gt;
## Save changes.&lt;br /&gt;
&lt;br /&gt;
=== Register Application in Azure ===&lt;br /&gt;
Note this is different from the application registered above to allow user login integration.&lt;br /&gt;
# Sign in to the [https://portal.azure.com Microsoft Azure Management Portal].&lt;br /&gt;
# Click on the &#039;&#039;&#039;Azure Active Directory&#039;&#039;&#039; link from &#039;&#039;&#039;Azure services&#039;&#039;&#039; section, then &#039;&#039;&#039;App Registrations&#039;&#039;&#039; from the &#039;&#039;&#039;Manage&#039;&#039;&#039; section on the left.&lt;br /&gt;
# Click &#039;&#039;&#039;New application&#039;&#039;&#039; on the top menu.&lt;br /&gt;
# Enter a name for your application (can be anything you want, but should let you know this is for Moodle Teams integration).&lt;br /&gt;
# Choose option applicable to your organisation in &#039;&#039;&#039;Supported account types&#039;&#039;&#039; section.&lt;br /&gt;
# Click &#039;&#039;&#039;Register&#039;&#039;&#039; button to finish registration.&lt;br /&gt;
# You should be redirected to the settings page of the newly registered app; if not, find the app from the list of apps, and go to the settings page by clicking on its name.&lt;br /&gt;
# Note the &#039;&#039;&#039;Application (client) ID&#039;&#039;&#039; of the app, which will be used in plugin configuration in Moodle.&lt;br /&gt;
# From the &#039;&#039;&#039;Manage&#039;&#039;&#039; section on the left of the page, go to &#039;&#039;&#039;Certificates &amp;amp; Secrets&#039;&#039;&#039;, and create a new client secret by clicking the &#039;&#039;&#039;New client secret&#039;&#039;&#039; button. Note the secret which will be used in plugin configuration in Moodle.&lt;br /&gt;
# In &#039;&#039;&#039;Teams Settings&#039;&#039;&#039; tab of &#039;&#039;&#039;Microsoft 365 Integration&#039;&#039;&#039; configuration in Moodle, fill in the &#039;&#039;&#039;Application (client) ID&#039;&#039;&#039; and the client secret in &#039;&#039;&#039;Application ID&#039;&#039;&#039; and &#039;&#039;&#039;Client Secret&#039;&#039;&#039; settings respectively.&lt;br /&gt;
# Save changes.&lt;br /&gt;
&lt;br /&gt;
=== Update authentication application settings in Azure ===&lt;br /&gt;
When performing &#039;&#039;&#039;Step 1/3: Register Moodle with Azure AD&#039;&#039;&#039; in the &#039;&#039;&#039;Setup&#039;&#039;&#039; tab of &#039;&#039;&#039;Microsoft 365 Integration&#039;&#039;&#039; configuration, the PowerShell script downloaded from Moodle was used, you can skip this section. If you followed manual steps, or the application registration was completed before, you will need to follow these steps.&lt;br /&gt;
# Sign in to the [https://portal.azure.com Microsoft Azure Management Portal].&lt;br /&gt;
# Click on the &#039;&#039;&#039;Azure Active Directory&#039;&#039;&#039; link from &#039;&#039;&#039;Azure services&#039;&#039;&#039; section, then &#039;&#039;&#039;App Registrations&#039;&#039;&#039; from &#039;&#039;&#039;Manage&#039;&#039;&#039; section on the left.&lt;br /&gt;
# Click the app created for Moodle. Note this is not the app for Moodle Teams integration, but the one used for authentication. You may need to show &#039;&#039;&#039;All applications&#039;&#039;&#039; if the app wasn&#039;t created by your account.&lt;br /&gt;
# Go to the settings of the application by clicking its name.&lt;br /&gt;
# In the &#039;&#039;&#039;Manage&#039;&#039;&#039; section on the left of the page, go to &#039;&#039;&#039;Authentication&#039;&#039;&#039;.&lt;br /&gt;
# In the list of &#039;&#039;&#039;Redirect URIs&#039;&#039;&#039;, add the following entry, in type &#039;&#039;&#039;Web&#039;&#039;&#039;:&lt;br /&gt;
## https://your.moodle.url/local/o365/sso_end.php&lt;br /&gt;
# If bot feature is to be enabled, also add the following entry, in type &#039;&#039;&#039;Web&#039;&#039;&#039;:&lt;br /&gt;
## https://token.botframework.com/.auth/web/redirect&lt;br /&gt;
# Save changes.&lt;br /&gt;
&lt;br /&gt;
=== Bot configuration ===&lt;br /&gt;
This section is only required if you want to enable bot features in the configuration. If bot feature is not required, please skip.&lt;br /&gt;
==== Bot deployment====&lt;br /&gt;
# Go back to &#039;&#039;&#039;Teams Settings&#039;&#039;&#039; section of &#039;&#039;&#039;Microsoft 365 Integration&#039;&#039;&#039; configuration in Moodle as site administrator.&lt;br /&gt;
# Make sure &#039;&#039;&#039;Application ID&#039;&#039;&#039; and &#039;&#039;&#039;Client secret&#039;&#039;&#039; are configured and saved.&lt;br /&gt;
# Click &#039;&#039;&#039;Deploy to Azure&#039;&#039;&#039; button. This will start the process of bot deployment in Azure Portal in a popup window.&lt;br /&gt;
# Configure the following in the &#039;&#039;&#039;Custom deployment&#039;&#039;&#039; window:&lt;br /&gt;
## Choose your &#039;&#039;&#039;Subscription&#039;&#039;&#039;.&lt;br /&gt;
## Choose your &#039;&#039;&#039;Resource group&#039;&#039;&#039;. you may need to create a new one.&lt;br /&gt;
## Choose your &#039;&#039;&#039;Location&#039;&#039;&#039;.&lt;br /&gt;
## &#039;&#039;&#039;LUIS Pricing Tier&#039;&#039;&#039; - [https://azure.microsoft.com/en-us/pricing/details/cognitive-services/language-understanding-intelligent-services/ LUIS pricing tiers] are explained here. The free tier should be able to get you started.&lt;br /&gt;
## &#039;&#039;&#039;LUIS Region&#039;&#039;&#039; - Region where the LUIS resource will be deployed.&lt;br /&gt;
## &#039;&#039;&#039;Bot Application ID&#039;&#039;&#039; - the application ID of the Moodle Teams integration application, which is the same as &#039;&#039;&#039;Application ID&#039;&#039;&#039; in &#039;&#039;&#039;Teams Settings&#039;&#039;&#039; tab of &#039;&#039;&#039;Microsoft 365 Integration&#039;&#039;&#039; configuration.&lt;br /&gt;
## &#039;&#039;&#039;Bot Application Password&#039;&#039;&#039; - the client secret  of the Moodle Teams integration application, which is the same as &#039;&#039;&#039;Client Secret&#039;&#039;&#039; in &#039;&#039;&#039;Teams Settings&#039;&#039;&#039; tab of &#039;&#039;&#039;Microsoft 365 Integration&#039;&#039;&#039; configuration.&lt;br /&gt;
## &#039;&#039;Moodle URL&#039;&#039;&#039;.&lt;br /&gt;
## &#039;&#039;&#039;Azure AD Application ID&#039;&#039;&#039; - The Application ID saved in the &#039;&#039;&#039;Setup&#039;&#039;&#039; tab of &#039;&#039;&#039;Microsoft 365 Integration&#039;&#039;&#039; configuration.&lt;br /&gt;
## &#039;&#039;&#039;Azure AD Application Key&#039;&#039;&#039; - The Application Key saved in the &#039;&#039;&#039;Setup&#039;&#039;&#039; tab of &#039;&#039;&#039;Microsoft 365 Integration&#039;&#039;&#039; configuration.&lt;br /&gt;
## &#039;&#039;&#039;Azure AD Tenant&#039;&#039;&#039; - The tenant name (xyz.onmicrosoft.com) of your Azure AD tenant.&lt;br /&gt;
## &#039;&#039;&#039;Shared Moodle Secret&#039;&#039;&#039; - Paste the &#039;&#039;&#039;Shared Moodle Secret&#039;&#039;&#039; setting of in the &#039;&#039;&#039;Teams Settings&#039;&#039;&#039; tab of &#039;&#039;&#039;Microsoft 365 Integration&#039;&#039;&#039; configuration.&lt;br /&gt;
Once all configured, agree the terms and conditions, and click &#039;&#039;&#039;Purchase&#039;&#039;&#039;. This will start the bot deployment, which can take a few minutes to finish.&lt;br /&gt;
&lt;br /&gt;
==== Post deployment configuration====&lt;br /&gt;
After bot deployment is finished:&lt;br /&gt;
# Sign in to the [https://portal.azure.com Microsoft Azure Management Portal].&lt;br /&gt;
# In the &#039;&#039;&#039;Navigation&#039;&#039;&#039; section of the page, go to &#039;&#039;&#039;Resource groups&#039;&#039;&#039;.&lt;br /&gt;
# From the list of resource groups, select the one in which the bot was created and deployed.&lt;br /&gt;
# One of the resources in the group should be in type &#039;&#039;&#039;Web App Bot&#039;&#039;&#039;. Click its name to go to settings.&lt;br /&gt;
# Copy the &#039;&#039;&#039;Messaging endpoint&#039;&#039;&#039; of the resource (e.g. https://provisioned-bot-name.azurewebsites.net/api/messages), rename messages to webhook (Ex: https://provisioned-bot-name.azurewebsites.net/api/webook)&lt;br /&gt;
# Paste this endpoint to the &#039;&#039;&#039;Bot webhook end point&#039;&#039;&#039; field in &#039;&#039;&#039;Teams Settings&#039;&#039;&#039; tab of &#039;&#039;&#039;Microsoft 365 Integration&#039;&#039;&#039; configuration page.&lt;br /&gt;
# Check &#039;&#039;&#039;Bot feature enabled&#039;&#039;&#039; box in &#039;&#039;&#039;Teams Settings&#039;&#039;&#039; tab of &#039;&#039;&#039;Microsoft 365 Integration&#039;&#039;&#039; configuration page.&lt;br /&gt;
# Save changes.&lt;br /&gt;
&lt;br /&gt;
=== Add Moodle app to Teams ===&lt;br /&gt;
Once all configured, you are ready to add Moodle app to Teams.&lt;br /&gt;
# Go to &#039;&#039;&#039;Teams Settings&#039;&#039;&#039; tab of &#039;&#039;&#039;Microsoft 365 Integration&#039;&#039;&#039; configuration page.&lt;br /&gt;
# Click &#039;&#039;&#039;Download manifest file&#039;&#039;&#039; button. This will download a manifest file (in .zip format) which contains the Moodle app.&lt;br /&gt;
# Follow [https://docs.microsoft.com/en-gb/microsoftteams/platform/concepts/deploy-and-publish/apps-upload these instructions] to upload the app to the app catalog of your tenant.&lt;br /&gt;
# Once the app is uploaded to the catalog of your tenant, it can be used in any Teams in the tenant.&lt;br /&gt;
&lt;br /&gt;
== Teams Moodle app settings==&lt;br /&gt;
After downloading the manifest file of Moodle app, a new tab &#039;&#039;&#039;Teams Moodle app&#039;&#039;&#039; will be made available in &#039;&#039;&#039;Microsoft 365 Integration&#039;&#039;&#039; configuration page, which contains a single setting to configure the app ID of the Moodle app uploaded to Teams. This is optional but recommended. If configured, all new Teams created by Moodle course sync will:&lt;br /&gt;
* automatically install the Moodle app,&lt;br /&gt;
* automatically create a Moodle tab in the &#039;&#039;&#039;General&#039;&#039;&#039; channel.&lt;br /&gt;
* automatically configure the Moodle tab to point to the Moodle course that&#039;s related to the Team.&lt;br /&gt;
&lt;br /&gt;
To configure the field, follow these steps:&lt;br /&gt;
# Log in Teams, and go to app catalog by clicking the &#039;&#039;&#039;Apps&#039;&#039;&#039; button from the navigation bar on the left.&lt;br /&gt;
# Find the &#039;&#039;&#039;Moodle&#039;&#039;&#039; app uploaded.&lt;br /&gt;
# Click the option icon of the app, which is located at the top right corner of the app image.&lt;br /&gt;
# Click &#039;&#039;&#039;Copy link&#039;&#039;&#039;.&lt;br /&gt;
# In a text editor, paste the copied content. It should contain an URL such as https://teams.microsoft.com/l/app/00112233-4455-6677-8899-aabbccddeeff. &lt;br /&gt;
# The last part of the URL, i.e. 00112233-4455-6677-8899-aabbccddeeff, is the app ID.&lt;br /&gt;
# Paste the app ID in the &#039;&#039;&#039;Moodle app ID&#039;&#039;&#039; setting on &#039;&#039;&#039;Teams Moodle app&#039;&#039;&#039; tab of &#039;&#039;&#039;Microsoft 365 Integration&#039;&#039;&#039; configuration page in Moodle.&lt;br /&gt;
# Save changes.&lt;br /&gt;
&lt;br /&gt;
= OpenID Connect Authentication Plugin =&lt;br /&gt;
== Basic Usage ==&lt;br /&gt;
Once configured, you should see a link named &amp;quot;OpenID Connect&amp;quot; on the Moodle login page. Clicking this link will redirect the browser to the identity provider. Users will log in there, and will be redirected back to Moodle. If they have logged in to Moodle using OpenID Connect before, they will be logged in to their existing Moodle account. If they have not logged in to Moodle with OpenID Connect before, an account will be created for them.&lt;br /&gt;
&lt;br /&gt;
Note: If the &amp;quot;Prevent account creation when authenticating&amp;quot; setting is enabled in Moodle, new accounts will not be created.&lt;br /&gt;
&lt;br /&gt;
== Settings ==&lt;br /&gt;
There are a number of options you can use to customize how the plugin behaves. To configure the plugin, visit the plugin&#039;s settings page. (Site Administration &amp;gt; Plugins &amp;gt; Authentication &amp;gt; OpenID Connect)&lt;br /&gt;
&lt;br /&gt;
====Provider Name====&lt;br /&gt;
The name entered here will be used through the OpenID Connect plugin and the Microsoft 365 plugins to refer to the system used to log users in. For example, if your users are used to calling their Azure AD account their &amp;quot;School&amp;quot; account, you enter &amp;quot;School account&amp;quot; here, and all references to authentication will be &amp;quot;Log in with your School account&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====Auto-Append====&lt;br /&gt;
When using the &amp;quot;Username/Password&amp;quot; login flow, this setting with automatically append a given string to an entered username. This is useful in Azure AD usernames, where a single domain name is often used for every user - i.e. [user]@contoso.onmicrosoft.com. Users would normally have to enter this entire username to successfully log in to Moodle, but in this example, entering &amp;quot;@contoso.onmicrosoft.com&amp;quot; here means users would only have to enter their unique username, i.e. &amp;quot;bob.smith&amp;quot;, instead of &amp;quot;bob.smith@contoso.onmicrosoft.com&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====Domain Hint====&lt;br /&gt;
If users have several different Azure AD accounts with different tenants (i.e. @contoso.onmicrosoft.com, @example.onmicrosoft.com), but Moodle only uses one of these tenants, you can enter that tenant in this box to have the Azure AD login screen only ever suggest accounts from that tenant.&lt;br /&gt;
&lt;br /&gt;
====Login Flow====&lt;br /&gt;
This setting changes how users log in to Moodle using the plugin. You can redirect users to the OpenID Connect provider&#039;s login page, or have users enter their credentials directly into Moodle. See the &amp;quot;Login Flows&amp;quot; section below for further information.&lt;br /&gt;
&lt;br /&gt;
====User Restrictions====&lt;br /&gt;
This setting allows you to restrict the users that can log in to Moodle using OpenID Connect (Azure AD).&lt;br /&gt;
&lt;br /&gt;
Once you&#039;ve entered at least one user restriction, users logging in to Moodle must match at least one entered pattern.&lt;br /&gt;
&lt;br /&gt;
How to use user restrictions:&lt;br /&gt;
# Enter a regular expression pattern that matches the usernames of users you want to allow.&lt;br /&gt;
# Enter one pattern per line&lt;br /&gt;
# If you enter multiple patterns a user will be allowed if they match ANY of the patterns.&lt;br /&gt;
# The character &amp;quot;/&amp;quot; should be escaped with &amp;quot;\&amp;quot;.&lt;br /&gt;
# If you don&#039;t enter any restrictions above, all users that can log in to the OpenID Connect provider will be accepted by Moodle.&lt;br /&gt;
# Any user that does not match any entered pattern(s) will be prevented from logging in using OpenID Connect.&lt;br /&gt;
&lt;br /&gt;
====Record debug messages====&lt;br /&gt;
If you experience problems using OpenID Connect, enable this setting. Once enabled, errors will be recorded to the Moodle log for review. These errors can help you or the plugin developers debug and fix the problem. The error log can be viewed by navigating to Site Administation &amp;gt; Reports &amp;gt; Logs, changing the &amp;quot;All activities&amp;quot; select box to &amp;quot;Site errors&amp;quot;, and clicking &amp;quot;Get these logs&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====Custom Icon====&lt;br /&gt;
This setting allows you to choose from a selection of predefined icons to appear next to the identity provider link on the login page. You can also upload your own icon.&lt;br /&gt;
&lt;br /&gt;
# Visit the plugin settings page (Site Administration &amp;gt; Plugins &amp;gt; Authentication &amp;gt; OpenID Connect)&lt;br /&gt;
# Locate the &amp;quot;Icon&amp;quot; section of the settings page.&lt;br /&gt;
# There are several predefined icons to choose from, clicking an icon will use that icon on the login page.&lt;br /&gt;
# To use a custom icon, use the file picker below the &amp;quot;Icon&amp;quot; setting.&lt;br /&gt;
## This image will not be resized on the login page, so we recommend uploading an image no bigger than 35x35 pixels.&lt;br /&gt;
## If you have uploaded a custom icon and want to go back to one of the stock icons, click the custom icon in the file picker and click &amp;quot;Delete&amp;quot;, then &amp;quot;OK&amp;quot;, then &amp;quot;Save Changes&amp;quot; at the bottom of the settings page. The selected stock icon will now appear on the Moodle login page.&lt;br /&gt;
&lt;br /&gt;
== Login flows ==&lt;br /&gt;
This plugin supports two different methods for users to log in: Authorization Request and Username/Password Authentication&lt;br /&gt;
&lt;br /&gt;
=== Authorization Request ===&lt;br /&gt;
This flow redirects the user to Microsoft 365 to log in and are then brought back to Moodle logged in.&lt;br /&gt;
&lt;br /&gt;
Using this flow:&lt;br /&gt;
# The user clicks the name of the identity provider (What you entered in the &amp;quot;Provider Name&amp;quot; box at the top of the settings page.) on the Moodle login page.&lt;br /&gt;
# The user is redirected to Microsoft 365 to log in.&lt;br /&gt;
# Once successfully logged in, the user is redirected back to Moodle where the Moodle login takes place transparently.&lt;br /&gt;
&lt;br /&gt;
=== Username/Password Authentication ===&lt;br /&gt;
This login flow works like a classic username and password, except the user uses their Microsoft 365 account information.&lt;br /&gt;
&lt;br /&gt;
Using this flow:&lt;br /&gt;
# The user enters their Microsoft 365 username and password directly into the Moodle login form.&lt;br /&gt;
# Their credentials are securely sent to Microsoft 365 for verification.&lt;br /&gt;
# If the credentials are verified, the user is logged in to Moodle.&lt;br /&gt;
&lt;br /&gt;
== Switching existing Moodle users to use Microsoft 365 to log in ==&lt;br /&gt;
If a user logs in to Moodle using OpenID Connect but does not have a Moodle account, one will be created for them. However, existing Moodle users can be migrated to use OpenID Connect and provide a connection to Microsoft 365.&lt;br /&gt;
&lt;br /&gt;
# Ensure the Microsoft block has been added to a page in Moodle (for example, the Moodle dashboard).&lt;br /&gt;
# Log in as the user to be migrated, visit a page that has the Microsoft block visible.&lt;br /&gt;
# Click the &#039;&#039;&#039;Connect to Microsoft 365&#039;&#039;&#039; link in the Microsoft block.&lt;br /&gt;
# You will be brought to the &#039;&#039;&#039;Microsoft 365 / Moodle Control Panel&#039;&#039;&#039;.&lt;br /&gt;
# Click the &#039;&#039;&#039;Microsoft 365 Login&#039;&#039; link under &#039;&#039;&#039;Microsoft 365 Features&#039;&#039;&#039;&lt;br /&gt;
# Click the &amp;quot;Start using Microsoft 365 to log in to Moodle.&amp;quot; link.&lt;br /&gt;
# You will be redirected to Microsoft 365 to log in. Log in with the account you&#039;d like to link to the Moodle account you&#039;re using.&lt;br /&gt;
## &#039;&#039;&#039;NOTE:&#039;&#039;&#039; If you&#039;re already logged in to Microsoft 365, you will not have to enter your credentials on the Microsoft 365 login page. This Microsoft 365 account will be linked to the Moodle account. Ensure you are logged in to the correct account, or log out of Microsoft 365 first to show the Microsoft 365 login screen.&lt;br /&gt;
# The Moodle account will now use Microsoft 365 to log in. &#039;&#039;&#039;The previous login method will not work.&#039;&#039;&#039;&lt;br /&gt;
# The Moodle user can now use any of the Microsoft 365 features in Moodle.&lt;br /&gt;
&lt;br /&gt;
== Connecting existing Moodle users to Microsoft 365 without changing login method ==&lt;br /&gt;
# Ensure the Microsoft block has been added to a page in Moodle (for example, the Moodle dashboard).&lt;br /&gt;
# Log in as the user to be migrated, visit a page that has the Microsoft block visible.&lt;br /&gt;
# Click the &#039;&#039;&#039;Connect to Microsoft 365&#039;&#039;&#039; link in the Microsoft block.&lt;br /&gt;
# You will be brought to the &#039;&#039;&#039;Microsoft 365 / Moodle Control Panel&#039;&#039;&#039;.&lt;br /&gt;
# There will be a &amp;quot;Connection Status&amp;quot; indicator box on the right side of the screen, click the &amp;quot;Click here to connect&amp;quot; link.&lt;br /&gt;
# You will be brought to the AzureAD authentication screen. Log in with the Microsoft 365 user&#039;s credentials you&#039;d like to connect to the Moodle user you are logged in as.&lt;br /&gt;
## &#039;&#039;&#039;NOTE:&#039;&#039;&#039; If you&#039;re already logged in to Microsoft 365, you will not have to enter your credentials on the Microsoft 365 login page. This Microsoft 365 account will be linked to the Moodle account. Ensure you are logged in to the correct account, or log out of Microsoft 365 first to show the Microsoft 365 login screen.&lt;br /&gt;
# If login was successful, you will be brought back to the &#039;&#039;&#039;Microsoft 365 / Moodle Control Panel&#039;&#039;&#039; page, where the Microsoft 365 connection indicator should now read &#039;&#039;&#039;Active&#039;&#039;&#039;.&lt;br /&gt;
# The Moodle account is now linked to the Microsoft 365 account and can use Microsoft 365 features as that user.&lt;br /&gt;
# The Moodle user&#039;s login method will not change, the user will log in to Moodle as they always have.&lt;br /&gt;
&lt;br /&gt;
= OneDrive for Business Repository =&lt;br /&gt;
The OneDrive for Business repository allows users using the Microsoft 365 integration plugins to connect to their OneDrive for Business as a Moodle repository.&lt;br /&gt;
&lt;br /&gt;
== Downloading and linking files ==&lt;br /&gt;
# When using a filepicker anywhere in Moodle, you&#039;ll see a list of repositories on the left side of the popup. Look for and click on &amp;quot;OneDrive for Business&amp;quot;.&lt;br /&gt;
# You&#039;ll see two folders - &amp;quot;My Files&amp;quot; and &amp;quot;Courses&amp;quot;. Click the folder for the document library you want to access.&lt;br /&gt;
## &#039;&#039;&#039;My Files&#039;&#039;&#039; contains all documents in your personal OneDrive for Business&lt;br /&gt;
## &#039;&#039;&#039;Courses&#039;&#039;&#039; will list all Moodle course shared document libraries that you have access to. If you want to download files from one of these, you&#039;ll click &amp;quot;Courses&amp;quot;, then click the folder for the course you want to access.&lt;br /&gt;
# You will now see a list of all the files and folders in your OneDrive.&lt;br /&gt;
# Click the file you want to download into Moodle.&lt;br /&gt;
# Choose to &amp;quot;Make a copy of the file&amp;quot;, or &amp;quot;Create an alias/shortcut to the file.&amp;quot;&lt;br /&gt;
## If you want to download a copy of the file as it is now, choose &amp;quot;Make a cope of the file&amp;quot;. This will copy the file into Moodle, and will then use the local Moodle copy when the file is accessed from within Moodle. Any changes to the file in OneDrive will not be seen in Moodle.&lt;br /&gt;
## If you want to link a file choose &amp;quot;Create an alias/shortcut to the file&amp;quot;. This will create a link in Moodle to the file in OneDrive, and the file will be accessed from OneDrive directly. Any changes to the file in OneDrive will be seen when accessing the file from Moodle.&lt;br /&gt;
# You can change other file information like the filename or author name using the respective text fields. This information is only applicable to the Moodle side of the file, and will not transfer to OneDrive.&lt;br /&gt;
# Click &amp;quot;Select this file&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Uploading files ==&lt;br /&gt;
You can upload files into both your personal OneDrive for Business document library and a course SharePoint document library from the filepicker interface.&lt;br /&gt;
&lt;br /&gt;
# When accessing a OneDrive document library from a file picker, you will see an &amp;quot;Upload New File&amp;quot; item in the list of files and folders.&lt;br /&gt;
# Click the &amp;quot;Upload new file&amp;quot; item.&lt;br /&gt;
# Choose the file you want to upload and click &amp;quot;Upload this file&amp;quot;.&lt;br /&gt;
# The file will be uploaded to OneDrive and selected for the file picker.&lt;br /&gt;
&lt;br /&gt;
== Embedding Office documents ==&lt;br /&gt;
This repository allows users to embed Office documents from OneDrive into a course and have the live version viewable using Office web apps.&lt;br /&gt;
&lt;br /&gt;
# Start as a user connected to Microsoft 365 and who has access to modify a course.&lt;br /&gt;
# Turn on editing for the course and choose &amp;quot;Add an activity or resource&amp;quot; for the section of the course you want to add the document.&lt;br /&gt;
# Choose the &amp;quot;File&amp;quot; resource to add to the course.&lt;br /&gt;
# In the &amp;quot;Content&amp;quot; section of the file resource settings page, click the &amp;quot;Add&amp;quot; button in the filepicker&lt;br /&gt;
# Choose the &amp;quot;OneDrive for Business&amp;quot; repository and choose your Office document.&lt;br /&gt;
# When you select a file, make sure &amp;quot;Create an alias/shortcut to the file&amp;quot; is selected, the click &amp;quot;Select this file&amp;quot;&lt;br /&gt;
# Expand the &amp;quot;Appearance&amp;quot; section, and choose &amp;quot;Embed&amp;quot; for the &amp;quot;Display&amp;quot; select box.&lt;br /&gt;
# Click &amp;quot;Save and display&amp;quot;&lt;br /&gt;
# You should see the file embedded into the page.&lt;br /&gt;
&lt;br /&gt;
= OneNote =&lt;br /&gt;
OneNote is now available through Microsoft 365. If you have installed all the plugins (for example, by installing [https://moodle.org/plugins/view/local_office365]) then you already have the OneNote plugins installed. To access OneNote using your Microsoft 365 subscription, add OneNote to the list of applications in your Azure application. This is done the same way you configured Azure permissions, above. Note that OneNote is still in preview, and may not be available to everyone yet. If you don&#039;t see OneNote in the list of applications to add to your Azure application, you can try logging in to a desktop OneNote application using an administrator account in your Microsoft 365 tenant. This sometimes expedites to the process of adding the OneNote preview to your tenant. &lt;br /&gt;
&lt;br /&gt;
= Notes on special release =&lt;br /&gt;
== 3.8.0.4 and 3.9.1 release==&lt;br /&gt;
3.8.0.4 and 3.9.1 release of the plugins on 29 September 2020 introduced improvements on SSO integration for Moodle in Teams as well as Single Sign Off support, but requires additional actions from Moodle and Azure admins.&lt;br /&gt;
&lt;br /&gt;
=== Moodle and Teams SSO integration ===&lt;br /&gt;
The new releases is capable of getting a user token from either Teams desktop/mobile app or Teams web app, and attempt to log in as the user in the Moodle Teams tab. In order for it to work, changes in 3 sections are required.&lt;br /&gt;
&lt;br /&gt;
==== Update Azure app settings ====&lt;br /&gt;
# Sign in to the [https://portal.azure.com Microsoft Azure Management Portal].&lt;br /&gt;
# Click on the &#039;&#039;&#039;Azure Active Directory&#039;&#039;&#039; link from &#039;&#039;&#039;Azure services&#039;&#039;&#039; section, then &#039;&#039;&#039;App Registrations&#039;&#039;&#039; from &#039;&#039;&#039;Manage&#039;&#039;&#039; section on the left.&lt;br /&gt;
# Locate the app used for Moodle and Microsoft 365 integration, and click its name.&lt;br /&gt;
# Under &#039;&#039;&#039;Manage&#039;&#039;&#039;, select &#039;&#039;&#039;Expose an API&#039;&#039;&#039;.&lt;br /&gt;
# Select the &amp;quot;Set&amp;quot; link to generate the Application ID URI in the form of api://{AppID}. Insert your fully qualified domain name (with a forward slash &amp;quot;/&amp;quot; appended to the end) between the double forward slashes and the GUID. The entire ID should have the form of: api://fully-qualified-domain-name.com/{AppID}. e.g. api://URL.TO.MOODLE/00000000-0000-0000-0000-000000000000.&lt;br /&gt;
# If you get errors when selecting the &amp;quot;Set&amp;quot; link, it may be because the &#039;&#039;&#039;Supported account types&#039;&#039;&#039; setting of your app is set to a value rather than the one with &amp;quot;single tenant&amp;quot;. Try updating this value to get it working.&lt;br /&gt;
# Select the &amp;quot;Add a scope&amp;quot; button. In the panel that opens:&lt;br /&gt;
## enter &amp;quot;access_as_user&amp;quot; as the &amp;quot;Scope name&amp;quot;.&lt;br /&gt;
## Set &amp;quot;Who can consent?&amp;quot; to &amp;quot;Admins and users&amp;quot;.&lt;br /&gt;
## Set &amp;quot;Admin consent title&amp;quot; to be &amp;quot;Teams can access the user’s profile&amp;quot;.&lt;br /&gt;
## Set &amp;quot;Admin consent description&amp;quot; to be &amp;quot;Allows Teams to call the app’s web APIs as the current user&amp;quot;.&lt;br /&gt;
## Set &amp;quot;User consent title&amp;quot; to be &amp;quot;Teams can access the user profile and make requests on the user&#039;s behalf&amp;quot;.&lt;br /&gt;
## Set &amp;quot;User consent description&amp;quot; to be &amp;quot;Enable Teams to call this app’s APIs with the same rights as the user&amp;quot;.&lt;br /&gt;
## Ensure that &amp;quot;State&amp;quot; is set to &amp;quot;Enabled&amp;quot;.&lt;br /&gt;
## Select the &amp;quot;Add scope&amp;quot; button to save.&lt;br /&gt;
# In the Authorized client applications section, identify the applications that you want to authorize for your app’s web application. Select Add a client application. Enter each of the following client IDs and select the authorized scope you created in the previous step:&lt;br /&gt;
## 1fec8e78-bce4-4aaf-ab1b-5451cc387264 (Teams mobile/desktop application)&lt;br /&gt;
## 5e3ce6c0-2b1f-4285-8d4b-75ee78787346 (Teams web application)&lt;br /&gt;
# Under &#039;&#039;&#039;Manage&#039;&#039;&#039; then &#039;&#039;&#039;API permissions&#039;&#039;&#039;, ensure the following permissions are added under &amp;quot;Microsoft Graph&amp;quot; &amp;gt; &amp;quot;Delegated permissions&amp;quot;:&lt;br /&gt;
## User.Read (enabled by default)&lt;br /&gt;
## email&lt;br /&gt;
## offline_access&lt;br /&gt;
## OpenId&lt;br /&gt;
## profile&lt;br /&gt;
# Under &#039;&#039;&#039;Manage&#039;&#039;&#039; then &#039;&#039;&#039;Authentication&#039;&#039;&#039;, ensure the following boxes are checked for &amp;quot;implicit grant&amp;quot;:&lt;br /&gt;
## ID Token&lt;br /&gt;
## Access Token.&lt;br /&gt;
&lt;br /&gt;
==== Download updated manifest file ====&lt;br /&gt;
# Login to Moodle as site administrator.&lt;br /&gt;
# Go to &amp;quot;Microsoft 365 Integration&amp;quot; page in the site admin section.&lt;br /&gt;
# Go to &amp;quot;Teams Settings&amp;quot; tab.&lt;br /&gt;
# Verify settings on the page, note that two new settings are added in this release:&lt;br /&gt;
## &#039;&#039;&#039;Microsoft app ID for the Moodle Teams app&#039;&#039;&#039;: This is used in the &amp;quot;ID&amp;quot; field of [https://docs.microsoft.com/en-us/microsoftteams/platform/resources/schema/manifest-schema Teams app manifest file], which is essentially a self generated app ID to identify itself. It should be set to the default value in most use cases, otherwise it may affect upgrading of the Teams app. The only scenario a custom value is to be set for this setting is when there are multiple Moodle sites in the organisation, and they all need to be integrated with Teams, thus each site will require a separate Teams app. If custom value is required, please use [https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/new-guid?view=powershell-7 powershell] or [https://www.guidgenerator.com/ external tools] to generate valid ones.&lt;br /&gt;
## &#039;&#039;&#039;Teams app name&#039;&#039;&#039;: This allows you to give a custom name, rather than the default &amp;quot;Moodle&amp;quot;, to the Moodle Teams app created. It can be useful if you have multiple Moodle sites in your organisation, and each creating a separate Moodle app for Teams integration.&lt;br /&gt;
# Once settings are verified, save changes, go back to the tab, and click the &amp;quot;Download manifest file&amp;quot; button to download the new manifest file for the upgraded app.&lt;br /&gt;
==== Update Moodle app in Teams ====&lt;br /&gt;
# As a tenant admin, go to Teams.&lt;br /&gt;
# Go to &amp;quot;Apps&amp;quot; page to manage apps.&lt;br /&gt;
# From the menu on the left, click on the link &amp;quot;Built for YOUR ORGANISATION&amp;quot;. This should list all custom apps uploaded for your tenant.&lt;br /&gt;
# Locate the previous Moodle app, click the options button on the card for more options, and click &amp;quot;update&amp;quot;. This should open a file picker.&lt;br /&gt;
# Select the new manifest file downloaded from Moodle.&lt;br /&gt;
Note that as long as the &#039;&#039;&#039;Microsoft app ID for the Moodle Teams app&#039;&#039;&#039; setting is not changed, this should be recognised as an app upgrade, rather than uploading a new app. This means that the app will be kept in all existing Teams that have it installed, and all existing Moodle tabs will keep working.&lt;br /&gt;
&lt;br /&gt;
==== Known limitations ====&lt;br /&gt;
It is a known issue that if a Microsoft 365 user has never login to Moodle either, her first attempt to SSO from Teams to Moodle will not work silently. Instead, the user will need to click a button from the prompt to login.&lt;br /&gt;
&lt;br /&gt;
=== Single Sign Off ===&lt;br /&gt;
When a Microsoft 365 authenticated user clicks the Moodle log out button, it is possible to log the user out from Microsoft 365 at the same time.&lt;br /&gt;
&lt;br /&gt;
In order for this to work, configuration changes in two places are required:&lt;br /&gt;
==== Moodle settings change ==== &lt;br /&gt;
# Sign in Moodle as site admin.&lt;br /&gt;
# Go to &amp;quot;OpenID Connect&amp;quot; settings page under Plugins - Authentication:&lt;br /&gt;
# Go to &amp;quot;Advanced&amp;quot; tab.&lt;br /&gt;
# Enable &amp;quot;Single sign off&amp;quot;.&lt;br /&gt;
# Save changes.&lt;br /&gt;
&lt;br /&gt;
==== Azure app settings change ====&lt;br /&gt;
# Click on the &#039;&#039;&#039;Azure Active Directory&#039;&#039;&#039; link from &#039;&#039;&#039;Azure services&#039;&#039;&#039; section, then &#039;&#039;&#039;App Registrations&#039;&#039;&#039; from &#039;&#039;&#039;Manage&#039;&#039;&#039; section on the left.&lt;br /&gt;
# Locate the app used for Moodle and Microsoft 365 integration, and click its name.&lt;br /&gt;
# In the &#039;&#039;&#039;Manage&#039;&#039;&#039; section on the left of the page, go to &#039;&#039;&#039;Authentication&#039;&#039;&#039;.&lt;br /&gt;
# In the list of &#039;&#039;&#039;Redirect URIs&#039;&#039;&#039;, add the root URL of your Moodle site (wwwroot) as an entry.&lt;br /&gt;
&lt;br /&gt;
== 3.8.0.5 and 3.9.2 release==&lt;br /&gt;
3.8.0.5 and 3.9.2 release of the plugins on 18 November 2020 added support for synching the default timezone preference of the user in Outlook to Moodle. This requires the following permission to be granted for the Azure app:&lt;br /&gt;
# &#039;&#039;&#039;Delegated permissions&#039;&#039;&#039;&lt;br /&gt;
## &#039;&#039;&#039;MailboxSettings.Read&#039;&#039;&#039;&lt;br /&gt;
## &#039;&#039;&#039;MailboxSettings.ReadWrite&#039;&#039;&#039;&lt;br /&gt;
# &#039;&#039;&#039;Application permissions&#039;&#039;&#039;&lt;br /&gt;
## &#039;&#039;&#039;MailboxSettings.Read&#039;&#039;&#039;&lt;br /&gt;
## &#039;&#039;&#039;MailboxSettings.ReadWrite&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Any further questions?=&lt;br /&gt;
&lt;br /&gt;
For support, please open an issue on Github at [https://github.com/Microsoft/o365-moodle/issues]&lt;br /&gt;
&lt;br /&gt;
For community discussion, please post in the [https://moodle.org/mod/forum/view.php?id=8273 Moodle office tool integrations forum] on moodle.org. Note: developers may or may not see questions in this forum thread.&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Development:Grades&amp;diff=140822</id>
		<title>Development:Grades</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Development:Grades&amp;diff=140822"/>
		<updated>2021-07-14T13:24:17Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Text replacement - &amp;quot;class=&amp;quot;nicetable&amp;quot;&amp;quot; to &amp;quot;class=&amp;quot;wikitable&amp;quot;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Work in progress}}&lt;br /&gt;
&lt;br /&gt;
== Executive Summary ==&lt;br /&gt;
&lt;br /&gt;
This document primarily describes the current workings of the gradebook. For more detailed information about current gradebook development see [[Development:Gradebook_improvements]]&lt;br /&gt;
&lt;br /&gt;
The gradebook mechanisms must be rebuilt to:&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Improve performance and scalability&#039;&#039;&#039; - All grades from throughout the system will be pushed to a central system of tables. This means reports based on grades can be generated much faster, and the gradebook has ultimate control over the content.&lt;br /&gt;
# &#039;&#039;&#039;Improve flexibility&#039;&#039;&#039; - All aspects of the new gradebook will use simple plugin structures, namely: exports, imports and displays/reports. It is expected that the community will be very active in producing [[Development:Gradebook Report Tutorial |special-purpose reports]] analysing the basic grade data in new ways, for example, or writing plugins to transfer grades to student information systems.&lt;br /&gt;
# &#039;&#039;&#039;Allow rubrics for outcomes (aka standards,competencies,goals)&#039;&#039;&#039; - As well as numerical grades, each grading item can consist of a number of scores made on a rubric against a standard outcome statement. These can be automatically converted to a numerical grade if desired or just shown as is.&lt;br /&gt;
# &#039;&#039;&#039;Allow arbitrary columns and derived columns&#039;&#039;&#039; - Arbitrary columns of data can be added (either manually or via import). Columns can also be automatically filled based on formulas.&lt;br /&gt;
# &#039;&#039;&#039;Implement limited public API&#039;&#039;&#039; - Activities may use this API to send grades/outcomes to gradebook and find out the final grades.&lt;br /&gt;
&lt;br /&gt;
== Glossary ==&lt;br /&gt;
&lt;br /&gt;
Here are some terms used in the gradebook, both in the development and the user interface.  Using these terms in discussions about the gradebook will help to reduce confusion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Term&lt;br /&gt;
!Definition&lt;br /&gt;
|-&lt;br /&gt;
|Activity&lt;br /&gt;
|An instance of an activity module [[Category:Modules|Module]] (e.g. a single quiz, assignment etc...)&lt;br /&gt;
|-&lt;br /&gt;
|Calculation&lt;br /&gt;
|A formula used to calculate grades, based (optionally) on other grade items. Not the same as [[Calculated_question_type|Calculated question types]].&lt;br /&gt;
|-&lt;br /&gt;
|Category&lt;br /&gt;
|A set of Grade Items.  A Category also has its own aggregated Grade which is calculated from its Grade Items.  There is no limit to the level of nesting of Categories (a Category may belong to another Category). However, each Grade Item may belong to only one Category. &lt;br /&gt;
|-&lt;br /&gt;
|Course completion&lt;br /&gt;
|The concept of meeting certain criteria for completing a course. In the context of the gradebook, this means a set of grades that must be reached, or a number of outcomes/competencies to complete/master.&lt;br /&gt;
|-&lt;br /&gt;
|Grade&lt;br /&gt;
|A Grade is a single assessment. It may be a number or an item on a scale (possibly tied to an Outcome). Raw grade value is the numerical or scale grade from activity. Final grade is the grade reported in gradebook.&lt;br /&gt;
|-&lt;br /&gt;
|[[Gradebook|Gradebook]]&lt;br /&gt;
|A central location in Moodle where students&#039; Grades are stored and displayed. Teachers can keep track of their students&#039; progress and organise which set of Grades their students will be able to see. Students see their own Grades.&lt;br /&gt;
|-&lt;br /&gt;
|Grade Item&lt;br /&gt;
|A &amp;quot;column&amp;quot; of Grades.  It can be created from a specific Activity or other module, calculated from other Grade Items, or entered manually.&lt;br /&gt;
|-&lt;br /&gt;
|[[Development:Grades#Locked_grades|Grade Locks]]&lt;br /&gt;
|See linked section of this page&lt;br /&gt;
|-&lt;br /&gt;
|History&lt;br /&gt;
|The gradebook has its own type of log, which keeps a History of all changes made to grades.&lt;br /&gt;
|-&lt;br /&gt;
|[[Development:Outcomes|Outcome]]&lt;br /&gt;
|[[Development:Outcomes|Outcomes]] are specific descriptions of what a person is expected to be able to do or understand at the completion of an activity or course. An activity might have more than one outcome, and each may have a grade against it (usually on a scale).  Other terms for Outcomes are &#039;&#039;Competencies&#039;&#039; and &#039;&#039;Goals&#039;&#039;. See some [[Development:Outcomes_examples|Examples]].&lt;br /&gt;
|-&lt;br /&gt;
|[[Scales|Scale]]&lt;br /&gt;
|A scale is a set of responses from which the teacher can choose one.   eg   Very cool, Cool, Fairly cool, Not very cool, Not cool&lt;br /&gt;
|-&lt;br /&gt;
|Letter Grades&lt;br /&gt;
|Special representation of grade values similar to scales.  Letters are configured in course contexts or above and are defined by lower boundary.   eg   A (above 90 %), B (above 80 %), C (above 70 %), D (above 50 %), F (above 0 %)&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Database structures ==&lt;br /&gt;
=== grade_items ===&lt;br /&gt;
&lt;br /&gt;
This table keeps information about gradeable items (ie columns). If an activity (eg an assignment or quiz) has multiple grade_items associated with it (eg several outcomes and numerical grade), then there will be a corresponding multiple number of rows in this table.&lt;br /&gt;
&lt;br /&gt;
idnumber is a tag unique inside a course identifying the grade item, useful for identifying data in exports and for referring to the grade item in calculations.  It is the same as the idnumber in course_modules.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Type&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Default&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Info&#039;&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;id&#039;&#039;&#039; &lt;br /&gt;
|int(10)  &lt;br /&gt;
|&lt;br /&gt;
|autoincrementing &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;courseid&#039;&#039;&#039; &lt;br /&gt;
|int(10)  &lt;br /&gt;
|&lt;br /&gt;
|The course this item is part of &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;categoryid&#039;&#039;&#039; &lt;br /&gt;
|int(10)  &lt;br /&gt;
|&amp;lt;center&amp;gt;NULL&amp;lt;/center&amp;gt; &lt;br /&gt;
|the category group this item belongs to &lt;br /&gt;
|-&lt;br /&gt;
|itemname &lt;br /&gt;
|varchar(255) &lt;br /&gt;
|&amp;lt;center&amp;gt;NULL&amp;lt;/center&amp;gt; &lt;br /&gt;
|The name of this item (pushed in by the module or entered by user) &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;itemtype&#039;&#039;&#039; &lt;br /&gt;
|varchar(30) &lt;br /&gt;
|&lt;br /&gt;
|&#039;mod&#039;, &#039;blocks&#039;, &#039;manual&#039;, &#039;course&#039;, &#039;category&#039; etc &lt;br /&gt;
|-&lt;br /&gt;
|itemmodule  &lt;br /&gt;
|varchar(30)  &lt;br /&gt;
|&amp;lt;center&amp;gt;NULL&amp;lt;/center&amp;gt; &lt;br /&gt;
|&#039;forum&#039;, &#039;quiz&#039;, &#039;csv&#039;, etc &lt;br /&gt;
|-&lt;br /&gt;
|iteminstance &lt;br /&gt;
|int(10) &lt;br /&gt;
|&amp;lt;center&amp;gt;NULL&amp;lt;/center&amp;gt; &lt;br /&gt;
|id of the item module &lt;br /&gt;
|-&lt;br /&gt;
|itemnumber &lt;br /&gt;
|int(10) &lt;br /&gt;
|&amp;lt;center&amp;gt;NULL&amp;lt;/center&amp;gt; &lt;br /&gt;
|Can be used to distinguish multiple grades for an activity &lt;br /&gt;
|-&lt;br /&gt;
|iteminfo &lt;br /&gt;
|text &lt;br /&gt;
|&amp;lt;center&amp;gt;NULL&amp;lt;/center&amp;gt; &lt;br /&gt;
|Info and notes about this item XXX &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;idnumber&#039;&#039;&#039;&lt;br /&gt;
|varchar(255) &lt;br /&gt;
|&amp;lt;center&amp;gt;NULL&amp;lt;/center&amp;gt; &lt;br /&gt;
|Arbitrary idnumber provided by the module responsible (optional and course unique)&lt;br /&gt;
|-&lt;br /&gt;
|calculation &lt;br /&gt;
|text&lt;br /&gt;
|&amp;lt;center&amp;gt;NULL&amp;lt;/center&amp;gt; &lt;br /&gt;
|Spreadsheet-type formula used to process the raw grades into final grades&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;gradetype&#039;&#039;&#039; &lt;br /&gt;
|int(4) &lt;br /&gt;
|&amp;lt;center&amp;gt;1&amp;lt;/center&amp;gt; &lt;br /&gt;
|0 = none, 1 = value, 2 = scale, 3 = text &lt;br /&gt;
|-&lt;br /&gt;
|grademax &lt;br /&gt;
|float(10,5) &lt;br /&gt;
|&amp;lt;center&amp;gt;100&amp;lt;/center&amp;gt; &lt;br /&gt;
|What is the maximum allowable grade? &lt;br /&gt;
|-&lt;br /&gt;
|grademin &lt;br /&gt;
|float(10,5) &lt;br /&gt;
|&amp;lt;center&amp;gt;0&amp;lt;/center&amp;gt; &lt;br /&gt;
|What is the minimum allowable grade? &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;scaleid&#039;&#039;&#039; &lt;br /&gt;
|int(10) &lt;br /&gt;
|&amp;lt;center&amp;gt;NULL&amp;lt;/center&amp;gt; &lt;br /&gt;
|If this grade is based on a scale, which one is it? &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;outcomeid&#039;&#039;&#039; &lt;br /&gt;
|int(10) &lt;br /&gt;
|&amp;lt;center&amp;gt;NULL&amp;lt;/center&amp;gt; &lt;br /&gt;
|If this is outcome item, which outcome is it? &lt;br /&gt;
|-&lt;br /&gt;
|gradepass&lt;br /&gt;
|float(10,5) &lt;br /&gt;
|&amp;lt;center&amp;gt;0&amp;lt;/center&amp;gt; &lt;br /&gt;
|What grade is needed to pass?  grademin &amp;lt;= gradepass &amp;lt;= grademax&lt;br /&gt;
|-&lt;br /&gt;
|multfactor &lt;br /&gt;
|float(10,5) &lt;br /&gt;
|&amp;lt;center&amp;gt;1.0&amp;lt;/center&amp;gt; &lt;br /&gt;
|Multiply all raw grades from activities by this &lt;br /&gt;
|-&lt;br /&gt;
|plusfactor  &lt;br /&gt;
|float(10,5) &lt;br /&gt;
|&amp;lt;center&amp;gt;0.0&amp;lt;/center&amp;gt; &lt;br /&gt;
|Add this to all raw grades from activities by this &lt;br /&gt;
|-&lt;br /&gt;
|aggregationcoef  &lt;br /&gt;
|float(10,5) &lt;br /&gt;
|&amp;lt;center&amp;gt;0.0&amp;lt;/center&amp;gt; &lt;br /&gt;
|Weight applied to all grades in this grade item during aggregation with other grade items.&lt;br /&gt;
|-&lt;br /&gt;
|sortorder &lt;br /&gt;
|int(10)  &lt;br /&gt;
|&amp;lt;center&amp;gt;0&amp;lt;/center&amp;gt; &lt;br /&gt;
|Sorting order of the columns (pre-order walk of the grading tree)&lt;br /&gt;
|-&lt;br /&gt;
|display&lt;br /&gt;
|int(10)  &lt;br /&gt;
|&amp;lt;center&amp;gt;0&amp;lt;/center&amp;gt; &lt;br /&gt;
|Display as real grades, percentages (in reference to the minimum and maximum grades) or letters (A, B, C etc..), or course default (0)&lt;br /&gt;
|-&lt;br /&gt;
|hidden &lt;br /&gt;
|int(10) &lt;br /&gt;
|&amp;lt;center&amp;gt;0&amp;lt;/center&amp;gt; &lt;br /&gt;
|1 is hidden, 1 is hide always, &amp;gt; 1 is a date to hide until (prevents viewing of all user grades) &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;locked&#039;&#039;&#039;&lt;br /&gt;
|int(10) &lt;br /&gt;
|&amp;lt;center&amp;gt;0&amp;lt;/center&amp;gt; &lt;br /&gt;
|0 is not locked, &amp;gt; 0 is a date when was item locked (no final grade or grade_item updates possible)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;locktime&#039;&#039;&#039;&lt;br /&gt;
|int(10) &lt;br /&gt;
|&amp;lt;center&amp;gt;0&amp;lt;/center&amp;gt; &lt;br /&gt;
|0 no auto locking, &amp;gt; 0 is a date to lock grade item and final grades after automatically &lt;br /&gt;
|-&lt;br /&gt;
|deleted &lt;br /&gt;
|int(10) &lt;br /&gt;
|&amp;lt;center&amp;gt;0&amp;lt;/center&amp;gt; &lt;br /&gt;
|1 means the associated module instance has been deleted&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;needsupdate&#039;&#039;&#039;&lt;br /&gt;
|int(10) &lt;br /&gt;
|&amp;lt;center&amp;gt;0&amp;lt;/center&amp;gt; &lt;br /&gt;
|If this flag is set, then the whole column will be recalculated. If set in course item, some other item needs recalculation. Calculated and category items are recalculated together with any other items.&lt;br /&gt;
|-&lt;br /&gt;
|timecreated &lt;br /&gt;
|int(10)&lt;br /&gt;
|&lt;br /&gt;
|The first time this grade_item was created&lt;br /&gt;
|-&lt;br /&gt;
|timemodified &lt;br /&gt;
|int(10)&lt;br /&gt;
|&lt;br /&gt;
|The last time this grade_item was modified&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== grade_categories ===&lt;br /&gt;
&lt;br /&gt;
This table keeps information about categories, used for grouping items.  An associated grade_item will be maintained for each category to store the aggregate data.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Type&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Default&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Info&#039;&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;id&#039;&#039;&#039; &lt;br /&gt;
|int(10)  &lt;br /&gt;
|&lt;br /&gt;
|autoincrementing &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;courseid&#039;&#039;&#039; &lt;br /&gt;
|int(10)  &lt;br /&gt;
|&lt;br /&gt;
|The course this grade category is part of &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;parent&#039;&#039;&#039; &lt;br /&gt;
|int(10) &lt;br /&gt;
|&amp;lt;center&amp;gt;NULL&amp;lt;/center&amp;gt; &lt;br /&gt;
|Parent grade_category (hierarchical)&lt;br /&gt;
|-&lt;br /&gt;
|depth&lt;br /&gt;
|int(10) &lt;br /&gt;
|&amp;lt;center&amp;gt;0&amp;lt;/center&amp;gt; &lt;br /&gt;
|How deep is this category from the highest level (1,2,3)&lt;br /&gt;
|-&lt;br /&gt;
|path&lt;br /&gt;
|varchar(255) &lt;br /&gt;
| &lt;br /&gt;
|Shows the path as /1/2/3/  &lt;br /&gt;
|-&lt;br /&gt;
|fullname &lt;br /&gt;
|varchar(255) &lt;br /&gt;
|&lt;br /&gt;
|The name of this grade category &lt;br /&gt;
|-&lt;br /&gt;
|aggregation &lt;br /&gt;
|int(10) &lt;br /&gt;
|&amp;lt;center&amp;gt;0&amp;lt;/center&amp;gt; &lt;br /&gt;
|A constant pointing to one of the predefined aggregation strategies (none, mean,median,sum, etc) &lt;br /&gt;
|-&lt;br /&gt;
|keephigh &lt;br /&gt;
|int(10) &lt;br /&gt;
|&amp;lt;center&amp;gt;0&amp;lt;/center&amp;gt; &lt;br /&gt;
|Keep only the X highest items &lt;br /&gt;
|-&lt;br /&gt;
|droplow &lt;br /&gt;
|int(10) &lt;br /&gt;
|&amp;lt;center&amp;gt;0&amp;lt;/center&amp;gt; &lt;br /&gt;
|Drop the X lowest items &lt;br /&gt;
|-&lt;br /&gt;
|aggregateonlygraded&lt;br /&gt;
|int(1) &lt;br /&gt;
|&amp;lt;center&amp;gt;0&amp;lt;/center&amp;gt; &lt;br /&gt;
|Aggregate only existing grades &lt;br /&gt;
|-&lt;br /&gt;
|aggregateoutcomes&lt;br /&gt;
|int(1) &lt;br /&gt;
|&amp;lt;center&amp;gt;0&amp;lt;/center&amp;gt; &lt;br /&gt;
|Aggregate otcomes together with normal items &lt;br /&gt;
|-&lt;br /&gt;
|aggregatesubcats&lt;br /&gt;
|int(1) &lt;br /&gt;
|&amp;lt;center&amp;gt;0&amp;lt;/center&amp;gt; &lt;br /&gt;
|Aggregate only items placed directly in category or all items in subcategories excluding the subcategory totals &lt;br /&gt;
|-&lt;br /&gt;
|timecreated&lt;br /&gt;
|int(10) &lt;br /&gt;
|&lt;br /&gt;
|The first time this grade_category was created&lt;br /&gt;
|-&lt;br /&gt;
|timemodified &lt;br /&gt;
|int(10) &lt;br /&gt;
|&lt;br /&gt;
|The last time this grade_category was modified&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== grade_grades ===&lt;br /&gt;
&lt;br /&gt;
This table keeps individual grades for each user and each item.  The raw grade is exactly as imported or submitted by modules. The rawgrademax/min and rawscaleid are stored here to record the values at the time the grade was stored, because teachers might change this for an activity!   All the results are normalised/resampled/calculated for the finalgrade, which is relative to the max/min/scaleid values stored in the grade_item.  The finalgrade field is effectively a cache and values are rebuilt whenever raw values or the grade_item changes.&lt;br /&gt;
&lt;br /&gt;
Note that the finalgrade for a scale-based item may be non-integer!  It needs to be rounded on display.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Type&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Default&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Info&#039;&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;id&#039;&#039;&#039; &lt;br /&gt;
|int(10)  &lt;br /&gt;
|&lt;br /&gt;
|autoincrementing &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;itemid&#039;&#039;&#039; &lt;br /&gt;
|int(10)  &lt;br /&gt;
|&lt;br /&gt;
|The item this grade belongs to &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;userid&#039;&#039;&#039; &lt;br /&gt;
|int(10) &lt;br /&gt;
|&lt;br /&gt;
|The user who this grade is for &lt;br /&gt;
|-&lt;br /&gt;
|rawgrade&lt;br /&gt;
|float(11,10) &lt;br /&gt;
|&amp;lt;center&amp;gt;NULL&amp;lt;/center&amp;gt; &lt;br /&gt;
|The raw grade that came into the system&lt;br /&gt;
|-&lt;br /&gt;
|rawgrademax &lt;br /&gt;
|float(11,10) &lt;br /&gt;
|&amp;lt;center&amp;gt;100&amp;lt;/center&amp;gt; &lt;br /&gt;
|The maximum allowable grade when this was created &lt;br /&gt;
|-&lt;br /&gt;
|rawgrademin &lt;br /&gt;
|float(11,10) &lt;br /&gt;
|&amp;lt;center&amp;gt;0&amp;lt;/center&amp;gt; &lt;br /&gt;
|The minimum allowable grade when this was created &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;rawscaleid&#039;&#039;&#039; &lt;br /&gt;
|int(10) &lt;br /&gt;
|&amp;lt;center&amp;gt;NULL&amp;lt;/center&amp;gt; &lt;br /&gt;
|If this grade is based on a scale, which one was it? &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;usermodified&#039;&#039;&#039;&lt;br /&gt;
|int(10) &lt;br /&gt;
|&amp;lt;center&amp;gt;NULL&amp;lt;/center&amp;gt; &lt;br /&gt;
|the userid of the person who last modified the raw grade value&lt;br /&gt;
|-&lt;br /&gt;
|finalgrade&lt;br /&gt;
|float(11,10) &lt;br /&gt;
|&amp;lt;center&amp;gt;NULL&amp;lt;/center&amp;gt; &lt;br /&gt;
|The final grade (cached) after all calculations are made. Overriden grades are also stored here.&lt;br /&gt;
|-	 &lt;br /&gt;
|hidden &lt;br /&gt;
|int(10) &lt;br /&gt;
|&amp;lt;center&amp;gt;0&amp;lt;/center&amp;gt; &lt;br /&gt;
|0 is not hidden, 1 is hide always, &amp;gt; 1 is a date to hide until &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;locked&#039;&#039;&#039;&lt;br /&gt;
|int(10) &lt;br /&gt;
|&amp;lt;center&amp;gt;0&amp;lt;/center&amp;gt; &lt;br /&gt;
|0 is not locked, &amp;gt; 0 when was the grade locked&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;locktime&#039;&#039;&#039;&lt;br /&gt;
|int(10) &lt;br /&gt;
|&amp;lt;center&amp;gt;0&amp;lt;/center&amp;gt; &lt;br /&gt;
|0 is never, &amp;gt; 0 is a date to lock the final grade after automatically&lt;br /&gt;
|-&lt;br /&gt;
|exported &lt;br /&gt;
|int(10) &lt;br /&gt;
|&amp;lt;center&amp;gt;0&amp;lt;/center&amp;gt; &lt;br /&gt;
|0 is not exported, &amp;gt; 0 is the last exported date &lt;br /&gt;
|-&lt;br /&gt;
|excluded &lt;br /&gt;
|int(10) &lt;br /&gt;
|&amp;lt;center&amp;gt;0&amp;lt;/center&amp;gt; &lt;br /&gt;
|grade excluded from aggregation, &amp;gt; 0 is the last exported date &lt;br /&gt;
|-&lt;br /&gt;
|overridden &lt;br /&gt;
|int(10) &lt;br /&gt;
|&amp;lt;center&amp;gt;0&amp;lt;/center&amp;gt; &lt;br /&gt;
|0 is not overridden, &amp;gt; 0 is the last overridden date &lt;br /&gt;
|-&lt;br /&gt;
|feedback &lt;br /&gt;
|text &lt;br /&gt;
|&amp;lt;center&amp;gt;NULL&amp;lt;/center&amp;gt; &lt;br /&gt;
|Manual feedback from the teacher. Could be a code like &#039;mi&#039;. &lt;br /&gt;
|-&lt;br /&gt;
|feedbackformat&lt;br /&gt;
|int(10)&lt;br /&gt;
|&amp;lt;center&amp;gt;0&amp;lt;/center&amp;gt; &lt;br /&gt;
|Text format for feedback&lt;br /&gt;
|-&lt;br /&gt;
|information &lt;br /&gt;
|text &lt;br /&gt;
|&amp;lt;center&amp;gt;NULL&amp;lt;/center&amp;gt; &lt;br /&gt;
|not sued yet (Further information like forum rating distribution 4/5/7/0/1 ?)&lt;br /&gt;
|-&lt;br /&gt;
|informationformat&lt;br /&gt;
|int(10)&lt;br /&gt;
|&amp;lt;center&amp;gt;0&amp;lt;/center&amp;gt; &lt;br /&gt;
|Text format for information&lt;br /&gt;
|-&lt;br /&gt;
|timecreated&lt;br /&gt;
|int(10) &lt;br /&gt;
|&lt;br /&gt;
|temporary hack - the date of submission in activity if any, new field expected in 2.0&lt;br /&gt;
|-&lt;br /&gt;
|timemodified&lt;br /&gt;
|int(10) &lt;br /&gt;
|&lt;br /&gt;
|temporary hack - the date of grading in activity or date of manual grading in gradebook, new field expected in 2.0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== grade_outcomes ===&lt;br /&gt;
&lt;br /&gt;
This table describes the outcomes used in the system. An outcome is a statement tied to a rubric scale from low to high, such as “Not met, Borderline, Met” (stored as 0,1 or 2).  For more info about these see [[Development:Outcomes]].&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Type&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Default&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Info&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;id&#039;&#039;&#039; &lt;br /&gt;
|int(10)  &lt;br /&gt;
|&lt;br /&gt;
|autoincrementing &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;courseid&#039;&#039;&#039; &lt;br /&gt;
|int(10)  &lt;br /&gt;
|&amp;lt;center&amp;gt;NULL&amp;lt;/center&amp;gt; &lt;br /&gt;
|Mostly these are defined site wide ie NULL &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|shortname &lt;br /&gt;
|varchar(255) &lt;br /&gt;
|&lt;br /&gt;
|The short name or code for this outcome statement &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|fullname &lt;br /&gt;
|text &lt;br /&gt;
|&lt;br /&gt;
|The full description of the outcome (usually 1 sentence) &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;scaleid&#039;&#039;&#039; &lt;br /&gt;
|int(10) &lt;br /&gt;
|&lt;br /&gt;
|The recommended scale for this outcome.  &lt;br /&gt;
|-&lt;br /&gt;
|description &lt;br /&gt;
|text &lt;br /&gt;
|&amp;lt;center&amp;gt;NULL&amp;lt;/center&amp;gt; &lt;br /&gt;
|The full description of the outcome (usually 1 sentence) &lt;br /&gt;
|-&lt;br /&gt;
|timecreated&lt;br /&gt;
|int(10) &lt;br /&gt;
|&lt;br /&gt;
|the time this outcome was first created &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|timemodified&lt;br /&gt;
|int(10) &lt;br /&gt;
|&lt;br /&gt;
|the time this outcome was last updated &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;usermodified&#039;&#039;&#039;&lt;br /&gt;
|int(10) &lt;br /&gt;
|&amp;lt;center&amp;gt;NULL&amp;lt;/center&amp;gt; &lt;br /&gt;
|the userid of the person who last modified this outcome&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== grade_outcomes_courses ===&lt;br /&gt;
An intersection table used to make standard outcomes available to courses.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Type&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Default&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Info&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;id&#039;&#039;&#039; &lt;br /&gt;
|int(10)  &lt;br /&gt;
|&lt;br /&gt;
|autoincrementing &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;courseid&#039;&#039;&#039;&lt;br /&gt;
|int(10)&lt;br /&gt;
|&lt;br /&gt;
|The id of the course being assigned the outcome&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;outcomeid&#039;&#039;&#039; &lt;br /&gt;
|int(10)  &lt;br /&gt;
|&lt;br /&gt;
|The id of the outcome being assigned to the course&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== grade_import_newitem ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Type&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Default&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Info&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;id&#039;&#039;&#039; &lt;br /&gt;
|int(10)  &lt;br /&gt;
|&lt;br /&gt;
|autoincrementing &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|itemname&lt;br /&gt;
|varchar(255)&lt;br /&gt;
|&lt;br /&gt;
|*TODO* Document&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|importcode&lt;br /&gt;
|int(12)  &lt;br /&gt;
|&lt;br /&gt;
|*TODO* Document &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== grade_import_values ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Type&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Default&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Info&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;id&#039;&#039;&#039; &lt;br /&gt;
|int(10)  &lt;br /&gt;
|&lt;br /&gt;
|autoincrementing &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;itemid&#039;&#039;&#039; &lt;br /&gt;
|int(10)  &lt;br /&gt;
|NULL&lt;br /&gt;
|*TODO* Document &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|newgradeitem&lt;br /&gt;
|int(10)&lt;br /&gt;
|NULL&lt;br /&gt;
|*TODO* Document&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;userid&#039;&#039;&#039; &lt;br /&gt;
|int(10)  &lt;br /&gt;
|&lt;br /&gt;
|*TODO* Document &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|finalgrade&lt;br /&gt;
|float(10,5)  &lt;br /&gt;
|NULL&lt;br /&gt;
|*TODO* Document &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|feedback&lt;br /&gt;
|text&lt;br /&gt;
|NULL&lt;br /&gt;
|*TODO* Document &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|importcode&lt;br /&gt;
|int(12)  &lt;br /&gt;
|&lt;br /&gt;
|*TODO* Document &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== History tables ===&lt;br /&gt;
&lt;br /&gt;
These table keep track of changes to most of the grade tables. Using these it should be possible to reconstruct the grades at any point in time in the past, or to audit grade changes over time.  It should be quicker to use these tables for that, rather than storing this information in the main Moodle log. The following tables are set up for that purpose:&lt;br /&gt;
&lt;br /&gt;
#grade_categories_history&lt;br /&gt;
#grade_grades_history&lt;br /&gt;
#grade_items_history&lt;br /&gt;
#grade_outcomes_history&lt;br /&gt;
&lt;br /&gt;
Each of them has exactly the same DB structure as their matching table (e.g. grade_categories), with 3 extra fields:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Type&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Default&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Info&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|action&lt;br /&gt;
|int(10)  &lt;br /&gt;
|0&lt;br /&gt;
|The action that lead to the change being recorded (insert, update, delete)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;oldid&#039;&#039;&#039; &lt;br /&gt;
|int(10)  &lt;br /&gt;
|&lt;br /&gt;
|The id of the record being changed or inserted (PK of the main table, not the history table) &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|source&lt;br /&gt;
|varchar(255)&lt;br /&gt;
|NULL&lt;br /&gt;
|The module from which the action originated &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== grade_letters ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Type&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Default&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Info&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;id&#039;&#039;&#039; &lt;br /&gt;
|int(10)  &lt;br /&gt;
|&lt;br /&gt;
|autoincrementing &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|contextid&lt;br /&gt;
|int(10)&lt;br /&gt;
|&lt;br /&gt;
|What contextid does this letter apply to (from levels CONTEXT_SYSTEM, CONTEXT_COURSECAT or CONTEXT_COURSE)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|lowerboundary&lt;br /&gt;
|float(10,5)  &lt;br /&gt;
|&lt;br /&gt;
|The lower boundary of the letter. Its upper boundary is the lower boundary of the next highest letter, unless there is none above, in which case it&#039;s grademax for that grade_item.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|letter&lt;br /&gt;
|varchar(255)  &lt;br /&gt;
|&lt;br /&gt;
|The display value of the letter. Can be any character or string of characters (OK, A, 10% etc..) &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Overview of module communication ==&lt;br /&gt;
&lt;br /&gt;
Modules usually store raw grades internally and pass them into gradebook every time they change. Gradebook may also request activities to resend the grades. &lt;br /&gt;
&lt;br /&gt;
The gradebook is designed to be as separate as possible from the code of activities - modules do not read grade tables or use internal gradebook API. &lt;br /&gt;
&lt;br /&gt;
Originally it was planned to use new events API, but in the end it was decided to use minimal API consisting of several function in lib/gradelib.php and each mod/xxx/lib.php&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Backward compatibility with Moodle 1.8 and earlier ===&lt;br /&gt;
&lt;br /&gt;
Function grade_grab_legacy_grades($courseid) may be used to request transfer of grades from legacy or 3rd party activities which were not yet converted to new grade API. This function is not called automatically.&lt;br /&gt;
&lt;br /&gt;
Modules are responsible to push existing grades into gradebook during upgrade.&lt;br /&gt;
&lt;br /&gt;
==API for communication with modules/blocks==&lt;br /&gt;
&lt;br /&gt;
Modules may use only functions from lib/gradelib.php which are marked as public. This API may be extended in later 1.9.x release. Activities should access/update only own grades.&lt;br /&gt;
&lt;br /&gt;
===grade_get_grades()===&lt;br /&gt;
&lt;br /&gt;
grade_get_grades($courseid, $itemtype, $itemmodule, $iteminstance, $userid_or_ids=0)&lt;br /&gt;
&lt;br /&gt;
Returns grading information for given activity - optionally with users grades. Manual, course or category items can not be queried.&lt;br /&gt;
&lt;br /&gt;
===grade_get_outcomes()===&lt;br /&gt;
&lt;br /&gt;
grade_get_outcomes($courseid, $itemtype, $itemmodule, $iteminstance,$userid=0)&lt;br /&gt;
&lt;br /&gt;
Returns list of outcomes used in course together with current outcomes for this user.&lt;br /&gt;
&lt;br /&gt;
===grade_is_locked()===&lt;br /&gt;
&lt;br /&gt;
grade_is_locked($courseid, $itemtype, $itemmodule, $iteminstance, $itemnumber, $userid=NULL)&lt;br /&gt;
&lt;br /&gt;
This function will tell a module whether a grade (or grade_item if $userid is not given) is currently locked or not. If it&#039;s locked to the current user then the module can print a nice message or prevent editing in the module. If no $userid is given, the method will always return the grade_item&#039;s locked state. If a $userid is given, the method will first check the grade_item&#039;s locked state (the column). If it is locked, the method will return true no matter the locked state of the specific grade being checked. If unlocked, it will return the locked state of the specific grade.&lt;br /&gt;
([http://moodle.org/mod/forum/discuss.php?d=69223#p311329 info])&lt;br /&gt;
&lt;br /&gt;
===grade_update()===&lt;br /&gt;
&lt;br /&gt;
grade_update($source, $courseid, $itemtype, $itemmodule, $iteminstance, $itemnumber, $grades=NULL, $itemdetails=NULL)&lt;br /&gt;
&lt;br /&gt;
Submit new or update grade; update/create grade_item definition. Grade must have userid specified, rawgrade and feedback with format are optional. rawgrade NULL means &#039;Not graded&#039;, missing property or key means do not change existing. Only following grade item properties can be changed &#039;itemname&#039;, &#039;idnumber&#039;, &#039;gradetype&#039;, &#039;grademax&#039;, &#039;grademin&#039;, &#039;scaleid&#039;, &#039;multfactor&#039;, &#039;plusfactor&#039;, &#039;deleted&#039;.&lt;br /&gt;
&lt;br /&gt;
===grade_update_outcomes()===&lt;br /&gt;
&lt;br /&gt;
grade_update_outcomes($source, $courseid, $itemtype, $itemmodule, $iteminstance, $userid, $data)&lt;br /&gt;
&lt;br /&gt;
Updates outcomes of a given user. Manual outcomes cannot be updated.&lt;br /&gt;
&lt;br /&gt;
== Private gradebook API ==&lt;br /&gt;
Private API is used by gradebook plugins and core Moodle code, it may change in 2.0. Most  of the interesting classes and functions are in lib/gradelib.php, grade/lib.php and grade/report/lib.php.&lt;br /&gt;
&lt;br /&gt;
The following 3 functions are all in /lib/gradelib.php&lt;br /&gt;
&lt;br /&gt;
===grade_regrade_final_grades()===&lt;br /&gt;
&lt;br /&gt;
grade_regrade_final_grades($courseid=NULL, $userid=NULL, $updated_item=NULL)&lt;br /&gt;
&lt;br /&gt;
Updates all grade_grades-&amp;gt;finalgrade records for each grade_item matching the given attributes. The search is further restricted, so that only grade_items that have needs_update == true or that use calculation are retrieved and used for the update. The function returns the number of grade_items updated (NOT the same as the number of grades_grades updated!).&lt;br /&gt;
&lt;br /&gt;
===grade_verify_idnumber()===&lt;br /&gt;
&lt;br /&gt;
grade_verify_idnumber($idnumber, $grade_item = null, $cm = null, $gradeitem)&lt;br /&gt;
&lt;br /&gt;
Verify new value of idnumber - checks for uniqueness of new idnubmers, existing are kept intact.&lt;br /&gt;
&lt;br /&gt;
===remove_course_grades()===&lt;br /&gt;
&lt;br /&gt;
remove_course_grades($courseid, $showfeedback)&lt;br /&gt;
&lt;br /&gt;
Remove all grade related course data - history is kept&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TODO: add description of the other methods and classes + simple usage examples + querylib.php description&lt;br /&gt;
&lt;br /&gt;
== Dealing with multiple grades  ==&lt;br /&gt;
&lt;br /&gt;
Modules usually produce only one grade item per activity. Optionally one or more outcomes may be attached to activities.&lt;br /&gt;
&lt;br /&gt;
Some activities may need to aggregate multiple ratings or attempts before sending them into the gradebook. Activities can not send variable number of items.&lt;br /&gt;
&lt;br /&gt;
If the gradebook receives multiple grade items from a module, then they are automatically grouped together in a unique grade category (with the same name as the module instance). See [[Development:Outcomes]] for more details.&lt;br /&gt;
&lt;br /&gt;
TODO: this may still be changed&lt;br /&gt;
&lt;br /&gt;
== Calculated grade items  ==&lt;br /&gt;
&lt;br /&gt;
Categories or manual items maybe calculated using spreadsheet-like formulas.  Formulas may reference other items from the same course only using Id numbers in double square brackets.&lt;br /&gt;
&lt;br /&gt;
 eg:  &amp;lt;nowiki&amp;gt;= MEAN([[quiz121]], [[quizend]]) + [[assignmentAXC]] + 20.0&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Regrading / updating of final grades ==&lt;br /&gt;
&lt;br /&gt;
TODO: describe needsupdate flag and incremental updates&lt;br /&gt;
&lt;br /&gt;
== Adjustment of raw grades ==&lt;br /&gt;
Grade_item contains optional rules for adjusting the raw grade before it is cached into a final grade. These rules are processed BEFORE the calculation discussed above. Scale is never changed. Multfactor and plusfactor may be used to alter raw grades coming from activities, but it is recommended to use formulas instead.&lt;br /&gt;
&lt;br /&gt;
== Displaying the grades to ordinary participants  ==&lt;br /&gt;
&lt;br /&gt;
The module takes responsibility for displaying grades within the module (to a student, say). It is recommended to use the real final grades obtained using grade_get_grades() functionBecause guidebook might force hiding, override grade, etc.&lt;br /&gt;
&lt;br /&gt;
For full display of grades in a whole course say, the student uses the same link as teachers use to access the gradebook. However, due to their different permissions they will only have access to specific reports. By default this is the &#039;&#039;User report&#039;&#039; report which only shows their own grades and has very few configuration options.&lt;br /&gt;
&lt;br /&gt;
== Locked grades  ==&lt;br /&gt;
&lt;br /&gt;
Both whole columns and individual grades can be locked in the gradebook, via the &#039;&#039;locked&#039;&#039; field.  Teachers may want to do this to prevent further changes from the modules, or from other teachers.  When a grade is locked, any changes that might affect that grade are ignored.  When the graded is unlocked, activities are asked to resend the latest grades.&lt;br /&gt;
&lt;br /&gt;
In the main GUIs the lock toggling will be achieved by clicking on a little padlock icon beside each entry or column.&lt;br /&gt;
&lt;br /&gt;
There is also an option to lock grade or item after some specified date.&lt;br /&gt;
&lt;br /&gt;
== Overridden grades ==&lt;br /&gt;
&lt;br /&gt;
Grades can be manually modified (overridden) in the gradebook.  When this is done the entered value is always used instead of the aggregated, calculated or activity grade.&lt;br /&gt;
&lt;br /&gt;
Once grades have been overriden in the gradebook they become read only in the original module. The module should provide a visual indication as to why the grade cannot be modified.&lt;br /&gt;
&lt;br /&gt;
The need to improve how the module expresses that a grade has been overridden will be reduced by the new [https://docs.moodle.org/en/Development:Grading_interface_2.0 grading interface]&lt;br /&gt;
&lt;br /&gt;
== Hidden grades and categories ==&lt;br /&gt;
&lt;br /&gt;
Grades and categories can be hidden in the gradebook or the &amp;quot;categories and items&amp;quot; screen.  When a category is hidden all the grade items within it are automatically hidden as well.  When a category is un-hidden then all the grade items within it are un-hidden.&lt;br /&gt;
&lt;br /&gt;
The teacher always sees totals calculated from all relevant items (hidden or un-hidden)&lt;br /&gt;
&lt;br /&gt;
(Features below were added in 1.9.8 and 2.0)&lt;br /&gt;
&lt;br /&gt;
When a grade is shown its parent category will also be shown if it was hidden.   MDL-21367&lt;br /&gt;
&lt;br /&gt;
The teacher decides what ordinary users can see in the case of totals that include hidden grades (MDL-21218, in 1.9.8 and 2.0).   The user and overview report each have a setting to choose between:&lt;br /&gt;
&lt;br /&gt;
# Hide any totals that are dependent on a hidden item (show a hyphen there)  [DEFAULT]&lt;br /&gt;
# Display totals excluding the hidden items&lt;br /&gt;
# Display full totals including the hidden items (may allow students to back-calculate hidden grades)&lt;br /&gt;
&lt;br /&gt;
== Logging ==&lt;br /&gt;
&lt;br /&gt;
All grading related changes maybe logged in history tables.&lt;br /&gt;
&lt;br /&gt;
== Security Issues ==&lt;br /&gt;
&lt;br /&gt;
For security an option to force SSL for the gradebook might be good.&lt;br /&gt;
&lt;br /&gt;
==Overall grade==&lt;br /&gt;
&lt;br /&gt;
Each course has exactly one course grade item. It may be used for this purpose now. Other course completion criteria will be implemented in 2.0.&lt;br /&gt;
&lt;br /&gt;
== Report plugins ==&lt;br /&gt;
All the main interface of the gradebook are implemented as report plugins. Each plugin is fully responsible for page layout, there are some handy functions in grade/lib.php. They can even define their own capabilities and extra tables if the core tables are not enough, as they&#039;ll have a full /grade/report/xxxx/db directory.&lt;br /&gt;
&lt;br /&gt;
Each report defines one capability to allow people to see that report, so that admins have control over who can see what reports. For example, the participant interface can be a totally separate report plugin.&lt;br /&gt;
&lt;br /&gt;
This allows for the widest flexibility and safety in how grades are presented.&lt;br /&gt;
&lt;br /&gt;
=== Default teacher interface ===&lt;br /&gt;
This interface will be what teachers see by default, and will subsume everything the current interface (in Moodle 1.8) does.&lt;br /&gt;
&lt;br /&gt;
Some snippets of functionality:&lt;br /&gt;
{{Moodle 1.9}}&lt;br /&gt;
Overall it&#039;s a grid, with participant names down one side and grade items along the top. &lt;br /&gt;
&lt;br /&gt;
Columns will be able to be collapsed together by grouping them into categories. Grades for categories can be calculated via various means. &lt;br /&gt;
&lt;br /&gt;
“Eye-cons” on the columns and checkboxes by every grade (this bit possibly controlled with a switch) allow hiding by category, by column, by individual grade.&lt;br /&gt;
&lt;br /&gt;
Textual notes can be added to each grade for more info. These show up to participants as well.&lt;br /&gt;
&lt;br /&gt;
A groups menu allows the teacher to switch between showing EACH of the groups they have access to, or ALL the groups they have access to.&lt;br /&gt;
&lt;br /&gt;
All grade items will link to modulepath/grade.php?id=44 which will work out what the current person should be allowed to see and either redirect them to the correct page or just show them immediately.   This copes with situations like the quiz, say, where we want editing teachers to go to the detailed reports there while participants just see their own grade or whatever the quiz is set to show.&lt;br /&gt;
&lt;br /&gt;
User preference to SWITCH between showing raw grades, percentage grades, or both, or grade letters (A/B/C etc).  &lt;br /&gt;
&lt;br /&gt;
Settings for grade letters not only define the transformation from percentage to grades, but also the transformation from letters to grades (in case the teacher edits some of the letter grades).&lt;br /&gt;
&lt;br /&gt;
Categories are shown above the headings for each column.  Clicking for more info on a category will just show the category with a summary column showing total/average for just that category (PLUS the summary column for the whole course).&lt;br /&gt;
&lt;br /&gt;
All columns should be sortable up/down.&lt;br /&gt;
&lt;br /&gt;
At the bottom of each column is a row with the mean course score.  If in groups mode, then add ANOTHER row with just the group mean. Add the number of grades used in brackets.  eg 56% (11).   When the report is paged, these means are still for the whole course/group (not the page!)&lt;br /&gt;
&lt;br /&gt;
{{Moodle 2.0}}&lt;br /&gt;
&lt;br /&gt;
Teachers can type “straight into” the grid using AJAX or fallback to forms. No popup menus for values.&lt;br /&gt;
&lt;br /&gt;
Later on we can support customisable shorthand codes to make data entry quick (eg type &#039;ab&#039; for absent, or &#039;nge&#039; for not good enough).&lt;br /&gt;
&lt;br /&gt;
See [http://test.moodle.com/grade/report/grader/index.php?id=2 the test site] for a live demo of this report.&lt;br /&gt;
&lt;br /&gt;
=== Default participant interface ===&lt;br /&gt;
This interface will be what participants see by default:&lt;br /&gt;
&lt;br /&gt;
Some snippets of functionality:&lt;br /&gt;
&lt;br /&gt;
*Invert the grid to show one item per row, with the total/average at the bottom.&lt;br /&gt;
*Use second/third columns to show categories.&lt;br /&gt;
*Include ranking score in another column.&lt;br /&gt;
*Show feedback&lt;br /&gt;
*Show percentage&lt;br /&gt;
*No editing functionality.&lt;br /&gt;
&lt;br /&gt;
See [http://test.moodle.com/grade/report/user/index.php?id=2 the test site] for a live demo of this report.&lt;br /&gt;
&lt;br /&gt;
=== Outcomes report ===&lt;br /&gt;
This simple informational report displays all the outcomes used by the course, with the following information:&lt;br /&gt;
&lt;br /&gt;
*Outcome name&lt;br /&gt;
*Overall average: If the outcome is used by more than one activity, this shows you the mean across all these activities in the current course&lt;br /&gt;
*Site-wide: Yes or No: A site-wide outcome is automatically made available to all courses.&lt;br /&gt;
*Activities: A list of links to the activities in the current course that use each outcome. One row per activity (table splits here)&lt;br /&gt;
*Average: For each activity using the outcome, the average score is shown.&lt;br /&gt;
*Number of grades: For each activity using the outcome, the number of grades is shown (non-graded participants are ignored)&lt;br /&gt;
&lt;br /&gt;
See [http://test.moodle.com/grade/report/outcomes/index.php?id=2 the test site] for a live demo of this report.&lt;br /&gt;
&lt;br /&gt;
=== Overview report ===&lt;br /&gt;
Another basic report, showing a participant&#039;s course averages in each of the courses in which s/he has received grades.&lt;br /&gt;
&lt;br /&gt;
See [http://test.moodle.com/grade/report/overview/index.php the test site] for a live demo of this report.&lt;br /&gt;
&lt;br /&gt;
== Export plugins ==&lt;br /&gt;
&lt;br /&gt;
The API for these is extremely simple.  Each export plugin should occupy a directory under /grade/export/xyz and needs to provide only an index.php file as a the primary interface. This file just accepts a &#039;courseid&#039; parameter.&lt;br /&gt;
&lt;br /&gt;
== Import plugins ==&lt;br /&gt;
&lt;br /&gt;
Each import plugin should occupy a directory under /grade/import/xyz and needs to provide only an index.php file as a the primary interface.  This file just accepts a &#039;courseid&#039; parameter.&lt;br /&gt;
&lt;br /&gt;
The index.php will show an interface for further options and selections.&lt;br /&gt;
&lt;br /&gt;
Import plugin must validate data before starting the import operation, if some parts of import fail the user must be notified.&lt;br /&gt;
&lt;br /&gt;
Some sample import plugins are:&lt;br /&gt;
&lt;br /&gt;
===Import from CSV===&lt;br /&gt;
&lt;br /&gt;
Accepts an upload of (or URL to) a CSV file.  Multiple options describe how to process the file, which columns to add etc.  The imported grades always override current grades.&lt;br /&gt;
&lt;br /&gt;
===Import from XML===&lt;br /&gt;
&lt;br /&gt;
Accepts an upload of (or URL to) an XML file with this kind of format (from OU). &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;results batch=&amp;quot;[someuniqueimportnumber]&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;result&amp;gt;&lt;br /&gt;
         &amp;lt;state&amp;gt;[&#039;new&#039; or &#039;regrade&#039;]&amp;lt;/state&amp;gt;&lt;br /&gt;
             &amp;lt;assignment&amp;gt;[idnumber]&amp;lt;/assignment&amp;gt;&lt;br /&gt;
             &amp;lt;student&amp;gt;[studentid]&amp;lt;/student&amp;gt;&lt;br /&gt;
             &amp;lt;score&amp;gt;[score]&amp;lt;/score&amp;gt;&lt;br /&gt;
         &amp;lt;/result&amp;gt;&lt;br /&gt;
         &amp;lt;result&amp;gt;&lt;br /&gt;
             &amp;lt;state&amp;gt;[&#039;new&#039; or &#039;regrade&#039;]&amp;lt;/state&amp;gt;&lt;br /&gt;
             &amp;lt;assignment&amp;gt;[idnumber]&amp;lt;/assignment&amp;gt;&lt;br /&gt;
             &amp;lt;student&amp;gt;[studentid]&amp;lt;/student&amp;gt;&lt;br /&gt;
             &amp;lt;score&amp;gt;[score]&amp;lt;/score&amp;gt;&lt;br /&gt;
         &amp;lt;/result&amp;gt;&lt;br /&gt;
         [...]&lt;br /&gt;
 &amp;lt;/results&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Capabilities and Permissions ==&lt;br /&gt;
&lt;br /&gt;
* moodle/grade:view  -  view own grades or grades of other user if used in CONTEXT_USER&lt;br /&gt;
&lt;br /&gt;
* moodle/grade:viewall - view grades of all users&lt;br /&gt;
&lt;br /&gt;
* moodle/grade:viewhidden - see grades that are marked as hidden for the owner&lt;br /&gt;
&lt;br /&gt;
* moodle/grade:hide - be able to hide/unhide cells, items or categories&lt;br /&gt;
&lt;br /&gt;
* moodle/grade:lock - be able to lock cells, items or categories&lt;br /&gt;
&lt;br /&gt;
* moodle/grade:unlock - be able to unlock cells, items or categories&lt;br /&gt;
&lt;br /&gt;
* moodle/grade:manage - manage grade items and categories in gradebook (create, edit, lock, hide, delete, etc.)&lt;br /&gt;
&lt;br /&gt;
* moodle/grade:import - general import grades, requires separate permission for each plugin&lt;br /&gt;
&lt;br /&gt;
* moodle/grade:export - export grades, requires separate permission for each plugin&lt;br /&gt;
&lt;br /&gt;
* gradereport/grader:view - can view the grader report&lt;br /&gt;
&lt;br /&gt;
* gradeimport/csv:view - can view/use the csv import plugin&lt;br /&gt;
&lt;br /&gt;
* gradeexport/csv:view - can view/use the csv export plugin&lt;br /&gt;
&lt;br /&gt;
* moodle:site/accessallgroups&lt;br /&gt;
&lt;br /&gt;
== Development Tasks and Tracking ==&lt;br /&gt;
&lt;br /&gt;
For details of 1.9 development see [http://tracker.moodle.org/browse/MDL-9137 MDL-9137]&lt;br /&gt;
&lt;br /&gt;
For details of 2.0 development see [https://docs.moodle.org/en/Development:Gradebook_improvements Gradebook_imporovements] and [http://tracker.moodle.org/browse/MDL-19131 MDL-19131]&lt;br /&gt;
&lt;br /&gt;
==Updating module code==&lt;br /&gt;
Module authors must implement new gradebook API and add upgrade code for migration of old grades into new gradebook. Fortunately the needed changes are not big.&lt;br /&gt;
&lt;br /&gt;
Steps:&lt;br /&gt;
*add xxx_update_grades() function into mod/xxx/lib.php&lt;br /&gt;
*add xxx_grade_item_update() function into mod/xxx/lib.php&lt;br /&gt;
*patch xxx_update_instance(), xxx_add_instance() and xxx_delete_instance() to call xxx_grade_item_update()&lt;br /&gt;
*patch all places of code that change grade values to call xxx_update_grades()&lt;br /&gt;
*patch code that displays grades to students to use final grades from the gradebook&lt;br /&gt;
&lt;br /&gt;
There are many examples in official modules, assignment has the most advanced implementation.&lt;br /&gt;
&lt;br /&gt;
== Ideas for the future ==&lt;br /&gt;
{{Moodle 2.1}}&lt;br /&gt;
See [[Development:Gradebook_improvements]] and MDL-25423 for details of planned future enhancements&lt;br /&gt;
&lt;br /&gt;
*option to aggregate including/excluding hidden grades - needs db changes&lt;br /&gt;
*option to rollback all changes during import operation if anything fails&lt;br /&gt;
*performance improvements&lt;br /&gt;
*conditional activities&lt;br /&gt;
*course completion criteria&lt;br /&gt;
*better public API for modules&lt;br /&gt;
*better API for gradebook plugins&lt;br /&gt;
*better state tracking in export plugins&lt;br /&gt;
*ajax reports&lt;br /&gt;
*specialised reports&lt;br /&gt;
*submission and marking date tracking db changes&lt;br /&gt;
*calculation formula improvements&lt;br /&gt;
*historical views&lt;br /&gt;
*individual graph of grades (time vs %). Bar graph, lineal graph. Add (or not) the maximum posible; line of 0 (=minimum), 25, 50 (=median), 75 and 100 (=max) percentils of the group&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=69223&amp;amp;mode=3 Gradebook Development ideas] forum discussion&lt;br /&gt;
* Using Moodle [http://moodle.org/mod/forum/discuss.php?d=51107 New gradebook for Moodle] forum discussion&lt;br /&gt;
* [[Development:Gradebook Report Tutorial]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer|Grades]]&lt;br /&gt;
[[Category:Grades]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Development:Survey_2_brainstorm&amp;diff=140821</id>
		<title>Development:Survey 2 brainstorm</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Development:Survey_2_brainstorm&amp;diff=140821"/>
		<updated>2021-07-14T13:24:17Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Text replacement - &amp;quot;class=&amp;quot;nicetable&amp;quot;&amp;quot; to &amp;quot;class=&amp;quot;wikitable&amp;quot;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is for collecting feature requests for a new Survey module that replaces Survey, Questionnaire and Feedback.&lt;br /&gt;
&lt;br /&gt;
==General features of the Module==&lt;br /&gt;
* translate previously built survey1, feedback and questionnaire at installation time&lt;br /&gt;
* upload exported feedback or questionnaires (survey1 doesn&#039;t export questionnaires templates)&lt;br /&gt;
* save instances of survey2 as a template to reuse it or export it&lt;br /&gt;
* import saved survey2 templates&lt;br /&gt;
* support for groups and groupings&lt;br /&gt;
* custom user survey2 page layout (custom html and css, as it already is in database module)&lt;br /&gt;
* download of submissions in txt, xls and ods&lt;br /&gt;
* conditional branching&lt;br /&gt;
* handle more than one input form layout (and find a way to allow this or that layout to this or that user).&lt;br /&gt;
* order survey fields in editing mode&lt;br /&gt;
* group fields in the page layout with fieldset&lt;br /&gt;
* relations between tables (Example: one record for the profile of my company one related record for each intervention request submitted by my company)&lt;br /&gt;
* email submissions to students/teachers/both/none&lt;br /&gt;
* email submissions to address specified in a designated question field (for surveys not requiring login)&lt;br /&gt;
* for text fields, simple data checking (&#039;must be numeric&#039;, &#039;must contain X character&#039;, &#039;must have exact length n&#039;, etc.)&lt;br /&gt;
* full web accessibility features to the same level as elsewhere in Moodle e.g. labels on text fields, fieldsets on groups of radio buttons &amp;amp; checkboxes.&lt;br /&gt;
* gradebook integration (to allow simple polls to control conditional activities)&lt;br /&gt;
&lt;br /&gt;
==Instance settings page==&lt;br /&gt;
* Access section: 20 types of survey, distinguished by:&lt;br /&gt;
:-&amp;gt; ppl who is allowed to R/O,&lt;br /&gt;
:-&amp;gt; ppl who is allowed to R/W,&lt;br /&gt;
:-&amp;gt; ppl who is allowed to delete a record&lt;br /&gt;
The reationale is: once a record has been submitted by a user, who is allowed to see it (R/O access)?, who is allowed to edit it (R/W access)?, who is allowed to delete it?&lt;br /&gt;
&lt;br /&gt;
Combining all the options the come out 20 cases are defined as follows where:&lt;br /&gt;
:ALL means, all the people accessing the survey;&lt;br /&gt;
:GROUP means people belonging to the group of the user who submitted the record;&lt;br /&gt;
:OWNER is the user who submitted the record;&lt;br /&gt;
:NONE is none.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! type&lt;br /&gt;
! R/O&lt;br /&gt;
! R/W&lt;br /&gt;
! delete&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| ALL&lt;br /&gt;
| ALL&lt;br /&gt;
| ALL&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| ALL&lt;br /&gt;
| ALL&lt;br /&gt;
| GROUP&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| ALL&lt;br /&gt;
| ALL&lt;br /&gt;
| OWNER&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| ALL&lt;br /&gt;
| ALL&lt;br /&gt;
| NONE&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| ALL&lt;br /&gt;
| GROUP&lt;br /&gt;
| GROUP&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| ALL&lt;br /&gt;
| GROUP&lt;br /&gt;
| OWNER&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| ALL&lt;br /&gt;
| GROUP&lt;br /&gt;
| NONE&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| ALL&lt;br /&gt;
| OWNER&lt;br /&gt;
| OWNER&lt;br /&gt;
|-&lt;br /&gt;
| 9&lt;br /&gt;
| ALL&lt;br /&gt;
| OWNER&lt;br /&gt;
| NONE&lt;br /&gt;
|-&lt;br /&gt;
| 10&lt;br /&gt;
| ALL&lt;br /&gt;
| NONE&lt;br /&gt;
| NONE&lt;br /&gt;
|-&lt;br /&gt;
| 11&lt;br /&gt;
| GROUP&lt;br /&gt;
| GROUP&lt;br /&gt;
| GROUP&lt;br /&gt;
|-&lt;br /&gt;
| 12&lt;br /&gt;
| GROUP&lt;br /&gt;
| GROUP&lt;br /&gt;
| OWNER&lt;br /&gt;
|-&lt;br /&gt;
| 13&lt;br /&gt;
| GROUP&lt;br /&gt;
| GROUP&lt;br /&gt;
| NONE&lt;br /&gt;
|-&lt;br /&gt;
| 14&lt;br /&gt;
| GROUP&lt;br /&gt;
| OWNER&lt;br /&gt;
| OWNER&lt;br /&gt;
|-&lt;br /&gt;
| 15&lt;br /&gt;
| GROUP&lt;br /&gt;
| OWNER&lt;br /&gt;
| NONE&lt;br /&gt;
|-&lt;br /&gt;
| 16&lt;br /&gt;
| GROUP&lt;br /&gt;
| NONE&lt;br /&gt;
| NONE&lt;br /&gt;
|-&lt;br /&gt;
| 17&lt;br /&gt;
| OWNER&lt;br /&gt;
| OWNER&lt;br /&gt;
| OWNER&lt;br /&gt;
|-&lt;br /&gt;
| 18&lt;br /&gt;
| OWNER&lt;br /&gt;
| OWNER&lt;br /&gt;
| NONE&lt;br /&gt;
|-&lt;br /&gt;
| 19&lt;br /&gt;
| OWNER&lt;br /&gt;
| NONE&lt;br /&gt;
| NONE&lt;br /&gt;
|-&lt;br /&gt;
| 20&lt;br /&gt;
| NONE&lt;br /&gt;
| NONE&lt;br /&gt;
| NONE&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* option: allow/deny save without submission (save and restart)&lt;br /&gt;
* option: anonymous survey or named responses&lt;br /&gt;
* option: allow access to records any time/after you&#039;ve submitted/after close date/never&lt;br /&gt;
* opening and closing submission dates&lt;br /&gt;
* number of maximun allowed submission&lt;br /&gt;
* option whether to show results immediately after submission, or a thank you message with link to results.&lt;br /&gt;
&lt;br /&gt;
==Field level settings==&lt;br /&gt;
* type of field (char(n), text, number, alphanumeric, boolean, date, picture, file, email, url...) with type check at submit time (and number of digit check for char(n) fields). This information may not be used at field definition time but is useful for data verification/check.&lt;br /&gt;
&lt;br /&gt;
(Example: Please, enter your card ID: _______ This field should be defined, for instance, as char(7))&lt;br /&gt;
* option: mandatory/non mandatory field&lt;br /&gt;
* free text description field for further description and advices to the completer&lt;br /&gt;
*define a range of valid answers for fields allowing this (see next examples)&lt;br /&gt;
(Example 1:&lt;br /&gt;
Please, enter your seniority. (limited between 0 and 50 years)&lt;br /&gt;
&lt;br /&gt;
Example 2:&lt;br /&gt;
Date of birth: (limited between 18 and 100 years ago))&lt;br /&gt;
*define fields default to be loaded at &amp;quot;new record&amp;quot; display time&lt;br /&gt;
*optional &amp;quot;other&amp;quot; text field for drop down menu/radio button/check box. (see next example)&lt;br /&gt;
(Example for drop down:&lt;br /&gt;
&lt;br /&gt;
 Where were you born? &amp;lt;code&amp;gt;&amp;lt;select name=&amp;quot;dropdown_14&amp;quot; size=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;option value=&amp;quot;1&amp;quot; selected=&amp;quot;selected&amp;quot;&amp;gt;Spain&amp;lt;/option&amp;gt;&amp;lt;option value=&amp;quot;2&amp;quot; &amp;gt;France&amp;lt;/option&amp;gt;&amp;lt;option value=&amp;quot;3&amp;quot; &amp;gt;other, please specify&amp;lt;/option&amp;gt;&amp;lt;/select&amp;gt;  &amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;dropdown_14_other&amp;quot; size=&amp;quot;10&amp;quot; maxlength=&amp;quot;10&amp;quot; value=&amp;quot;&amp;quot; /&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you choose &amp;quot;other&amp;quot; in the drop down menu the field will be enabled and become mandatory, otherwise it will be disabled.&lt;br /&gt;
)&lt;br /&gt;
* custom question numbers&lt;br /&gt;
* question name to name columns header in the downloaded document&lt;br /&gt;
&lt;br /&gt;
==Question types==&lt;br /&gt;
&lt;br /&gt;
Question types should be plug-ins so that they can be extended locally if required.  The following list covers types which exist in at least one of the current survey modules.&lt;br /&gt;
&lt;br /&gt;
* radio buttons (horizontal &amp;amp; vertical display)&lt;br /&gt;
* short text entry&lt;br /&gt;
* long text entry&lt;br /&gt;
* checkbox&lt;br /&gt;
* drop down menu&lt;br /&gt;
* customisable likert scale for rating&lt;br /&gt;
* date (Example: When were you born?)&lt;br /&gt;
&lt;br /&gt;
===New question types===&lt;br /&gt;
* short date (with month and years only, to answer question like: When had you the first evidence of this disease?)&lt;br /&gt;
* time&lt;br /&gt;
(Example:&lt;br /&gt;
When do you usually take breakfast?&lt;br /&gt;
)&lt;br /&gt;
* &amp;quot;static text&amp;quot;/&amp;quot;read only&amp;quot; fields (auto filled by the software) like, current_date, user_name, record_ID, counter...&lt;br /&gt;
* allocation (Drag and drop)&lt;br /&gt;
* ranking&lt;br /&gt;
&lt;br /&gt;
==Result display==&lt;br /&gt;
&lt;br /&gt;
* report per survey, per user and per question&lt;br /&gt;
* report about non-respondent users&lt;br /&gt;
* choose for a question whether to display results as&lt;br /&gt;
** a table&lt;br /&gt;
** a bar chart&lt;br /&gt;
** a pie chart&lt;br /&gt;
&lt;br /&gt;
==Question management==&lt;br /&gt;
&lt;br /&gt;
* questions can be copied within an activity&lt;br /&gt;
* question sets can be created as templates for re-use [maybe later]&lt;br /&gt;
* question sets can be used across multiple courses [maybe later]&lt;br /&gt;
* questions can be re-ordered within an activity&lt;br /&gt;
* question sets can be combined to create a template&lt;br /&gt;
* questions can be deleted from an activity, but there should be an &amp;quot;are you sure&amp;quot; check first.&lt;br /&gt;
&lt;br /&gt;
==Answer Piping &amp;amp; Conditional Questions==&lt;br /&gt;
&lt;br /&gt;
*Allow follow on questions related to the previous.&lt;br /&gt;
*Do You Smoke? Yes/No If Yes is selected a conditional question appears, How Many per Day, if No is selected move on to question 6 appears&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Answer Piping such as:&lt;br /&gt;
*Q1 Which dog breed do you prefer?&lt;br /&gt;
*Labrador&lt;br /&gt;
*Spaniel&lt;br /&gt;
*Collie&lt;br /&gt;
*Other&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Q2 In question 1 you stated you prefer the (Q1 Answer) as a breed, what do you like about it. [Where (Q1 Answer) is replaced with the chosen answer such as &#039;Labrador&#039;&lt;br /&gt;
*Temperament&lt;br /&gt;
*Looks&lt;br /&gt;
*Colour&lt;br /&gt;
*Other&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Mindmap_module&amp;diff=140820</id>
		<title>Mindmap module</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Mindmap_module&amp;diff=140820"/>
		<updated>2021-07-14T13:24:17Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Text replacement - &amp;quot;class=&amp;quot;nicetable&amp;quot;&amp;quot; to &amp;quot;class=&amp;quot;wikitable&amp;quot;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{stub}}&lt;br /&gt;
This contributed code activity module can add, create and share mindmaps within Moodle.&lt;br /&gt;
&lt;br /&gt;
==Features==&lt;br /&gt;
* Create and share mindmaps online.&lt;br /&gt;
* Make mindmaps public or share them with groups or make them public.&lt;br /&gt;
* Export maps to XML, PDF, image or Freemind-files.&lt;br /&gt;
* Edit mindmaps offline via Gears or Adobe AIR&lt;br /&gt;
&lt;br /&gt;
Most important commands and functions&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Command&lt;br /&gt;
|-&lt;br /&gt;
|add node &lt;br /&gt;
|&lt;br /&gt;
*Doubleclick on any place or click the green plus-icon &lt;br /&gt;
*ENTER adds a node to the same layer &lt;br /&gt;
*INSERT adds a childnode&lt;br /&gt;
|-&lt;br /&gt;
| delete nodes &lt;br /&gt;
| &lt;br /&gt;
* CTRL + click on the node, &lt;br /&gt;
* press DELETE &lt;br /&gt;
* click the red minus-sign&lt;br /&gt;
|-&lt;br /&gt;
|deletes a node and all of his child-nodes&lt;br /&gt;
|CTRL + D&lt;br /&gt;
|-&lt;br /&gt;
|Undo and Redo &lt;br /&gt;
|&lt;br /&gt;
*CTRL + Z and CTRL + Y or &lt;br /&gt;
*use the icons|&lt;br /&gt;
|-&lt;br /&gt;
|Autocomplete-Node &lt;br /&gt;
|press END &lt;br /&gt;
|-&lt;br /&gt;
|move node&lt;br /&gt;
|&lt;br /&gt;
#position a node over new parent, &lt;br /&gt;
#release mouse, &lt;br /&gt;
#reposition node&lt;br /&gt;
|}&lt;br /&gt;
For Mac User: There is no INSERT key!  To add a childnode on Mac, first highlight the mother node. Then while pressing command key, double tab at the new position for the childnode.  Or if you are using the mouse position your cursor at the new childnode place, then double click left mouse at the same time pressing the command key.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=1628  Mindmap] is a Modules and plugins database page for downloads and more information.&lt;br /&gt;
*Discussions: please create or find a discussion topic in the [http://moodle.org/mod/forum/view.php?id=44  Contributed Code forum]&lt;br /&gt;
*[[FreeMind filter]] contributed code&lt;br /&gt;
&lt;br /&gt;
* Register here to find out more about: http://ekpenso.com/&lt;br /&gt;
[[Category:Contributed code]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Development:Community_hub&amp;diff=140819</id>
		<title>Development:Community hub</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Development:Community_hub&amp;diff=140819"/>
		<updated>2021-07-14T13:24:11Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Text replacement - &amp;quot;class=&amp;quot;nicetable&amp;quot;&amp;quot; to &amp;quot;class=&amp;quot;wikitable&amp;quot;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Moodle 2.0}}&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;PROJECT STATE: implemented&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;MAIN TRACKER ISSUE&#039;&#039;&#039;: MDL-19309&lt;br /&gt;
* &#039;&#039;&#039;DISCUSSION AND COMMENTS&#039;&#039;&#039;: [http://moodle.org/mod/forum/view.php?id=7330 Hub servers] forum in Using Moodle&lt;br /&gt;
* &#039;&#039;&#039;MAIN AUTHORS&#039;&#039;&#039;: [[User:Martin_Dougiamas|Martin Dougiamas]] and [[User:jerome_mouneyrac|Jerome Mouneyrac]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page describes an overall functional specification for the &amp;quot;Moodle Community Hub&amp;quot; project, which consists of a new system (the Moodle Hub Server) and several new features in Moodle 2.0. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Goals and rationale =&lt;br /&gt;
&lt;br /&gt;
The main goals of the Community hub project are:&lt;br /&gt;
&lt;br /&gt;
# to allow people to easily find courses around the world that they want to enrol in:&lt;br /&gt;
#* educators want to find &#039;&#039;&#039;communities of practice&#039;&#039;&#039; that are subject or region-oriented, so that they can associate with their peers on a long-term basis.&lt;br /&gt;
#* other learners want to find and study courses on various other subjects&lt;br /&gt;
# to make it easy for educators to find and download &#039;&#039;&#039;course templates&#039;&#039;&#039; from other people.  This will help educators share and identify examples of &#039;&#039;&#039;best practice&#039;&#039;&#039; in online pedagogy and hopefully improve the average quality of online courses.&lt;br /&gt;
&lt;br /&gt;
Finally, we want to do all this in the simplest, safest way possible, while allowing a range of scenarios such as courses that are public or private, free or paid, so that the Moodle community can build solutions for themselves.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
&lt;br /&gt;
The diagram below shows the basic idea.  The systems in this diagram are:&lt;br /&gt;
&lt;br /&gt;
;Ordinary Moodle site: A typical Moodle site with teachers who want to download course templates and/or users who want to connect (enrol) with external communities &lt;br /&gt;
;Publishing site: A Moodle site that wants to make some of its courses available for download&lt;br /&gt;
;Community site: A Moodle site that provides courses that are enrollable&lt;br /&gt;
;Moodle Hub Server: A new Moodle plugin for listing registered courses that are &#039;&#039;&#039;downloadable&#039;&#039;&#039; or &#039;&#039;&#039;enrollable&#039;&#039;&#039;.  The default hub will be installed at hub.moodle.org, but there can be many others.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Community-hubs-flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
Downloadable courses&lt;br /&gt;
* (A) Sites that want to publish certain courses and make them downloadable can register them with one or more Hub Servers.&lt;br /&gt;
* (B) The Hub will check the data and make sure the course zip is downloadable, caching a copy locally.  The Hub may also have a security process to check the download for trojan horses, bad content, etc.&lt;br /&gt;
* (C) The download process may trigger the backup process on the original server if it hasn&#039;t been done already.&lt;br /&gt;
* (D) Later, Moodle users (who have permissions to do so) can connect to a Hub to search for downloadable courses and choose one.&lt;br /&gt;
* (E) The Moodle site downloads the file and makes it available to the Moodle user so they can now continue to restore it normally.&lt;br /&gt;
&lt;br /&gt;
Enrollable courses&lt;br /&gt;
* (1) Sites that want to publish certain courses for the public to enrol in can register them with one or more hub (including the main one at moodle.org)&lt;br /&gt;
* (2) Later, any Moodle user can connect to a hub (via Community block in their site) to search and find courses they want to join&lt;br /&gt;
* (3) They click on a link to be sent to the other site so that they can enrol there.&lt;br /&gt;
&lt;br /&gt;
= Use Cases =&lt;br /&gt;
&lt;br /&gt;
== New teacher creating a course ==&lt;br /&gt;
&lt;br /&gt;
# New teacher needs some help with a new course for &amp;quot;Alligator farming 101&amp;quot;&lt;br /&gt;
# Teacher sees the &amp;quot;Community&amp;quot; block into the &amp;quot;Alligator farming 101&amp;quot; course page and presses &amp;quot;Search course&amp;quot;&lt;br /&gt;
# Teacher browses a list of downloadable courses in the community page (the data comes from one or more Hubs via web services)&lt;br /&gt;
# Teacher searches for &amp;quot;Alligator&amp;quot; &lt;br /&gt;
# Teacher finds 4 courses that look good, and after reading reviews and ratings, chooses one.&lt;br /&gt;
# The course is downloaded and unpacked in Moodle.&lt;br /&gt;
# The teacher now has a good starter course they can keep developing.&lt;br /&gt;
&lt;br /&gt;
== New teacher needs help ==&lt;br /&gt;
&lt;br /&gt;
A teacher decides they need some help and wants to talk with others teaching Alligator farming.&lt;br /&gt;
&lt;br /&gt;
# Teacher goes to their &amp;quot;Community&amp;quot; block and clicks &amp;quot;Search course&amp;quot;.&lt;br /&gt;
# Moodle displays a page to search for courses (the data comes from one or more Hubs via web services)&lt;br /&gt;
# Teacher searches courses for &amp;quot;educator&amp;quot; courses on &amp;quot;Alligators&amp;quot; in their country/language.&lt;br /&gt;
# Teacher finds two, selects one, and is returned to the page where is was before clicking on &amp;quot;Search course&amp;quot;.  The selected course is now permanently listed in the Community block.&lt;br /&gt;
# Teacher clicks on the link and is taken to the course, where they can enrol and interact/learn with peers over time, subscribe to forums etc.&lt;br /&gt;
&lt;br /&gt;
== University consortium ==&lt;br /&gt;
&lt;br /&gt;
A group of five universites wants to share courses among themselves and not to the outside world.  They also want to prevent teachers from downloading courses from outside the consortium.&lt;br /&gt;
&lt;br /&gt;
# Someone downloads Moodle and installs it as a private Moodle Hub Server&lt;br /&gt;
# Admins of all five Moodle sites in the group add the URL of the private Hub to their settings and register their sites there&lt;br /&gt;
# The default Hub at hub.moodle.org is (optionally) disabled in the site-wide settings.&lt;br /&gt;
# Admins register their courses with the Hub.&lt;br /&gt;
# Teachers can now import, export or join courses via the private Hub.&lt;br /&gt;
&lt;br /&gt;
== Course creation business ==&lt;br /&gt;
NOT IMPLEMENTED&lt;br /&gt;
&lt;br /&gt;
CoolCourses Inc have produced a set of 50 good Moodle courses which they wish to sell.&lt;br /&gt;
&lt;br /&gt;
# They set up a Moodle site with all their courses in them.&lt;br /&gt;
# They set up a Hub with a payment system, and register it with the Hub List at moodle.org so people can find it&lt;br /&gt;
# They register all their courses with their own Hub with appropriate metadata&lt;br /&gt;
# When looking for courses, users can either &lt;br /&gt;
#* find this Hub by browsing through the Hub List, or &lt;br /&gt;
#* type the URL of the Hub directly into their Moodle site&lt;br /&gt;
# When users try to download a course, they may see a payment button to download it (credit card, paypal etc)&lt;br /&gt;
# CoolCourses could provide limited access to the courses on their Moodle site using Roles, as a preview.&lt;br /&gt;
&lt;br /&gt;
= Components =&lt;br /&gt;
&lt;br /&gt;
There are several components:&lt;br /&gt;
&lt;br /&gt;
;&#039;&#039;&#039;Hub List&#039;&#039;&#039;: A list of known Hub Servers, kept on moodle.org &lt;br /&gt;
;&#039;&#039;&#039;Hub Server&#039;&#039;&#039;: A new Moodle plugin for publishing a list of registered courses that are &#039;&#039;&#039;downloadable&#039;&#039;&#039; or &#039;&#039;&#039;enrollable&#039;&#039;&#039;&lt;br /&gt;
;&#039;&#039;&#039;Course registration&#039;&#039;&#039;: A new mechanism in every Moodle to register particular courses with one or more Hub Servers&lt;br /&gt;
;&#039;&#039;&#039;Community membership block&#039;&#039;&#039;: to search Hub Servers to find enrollable courses to join and bookmark&lt;br /&gt;
;&#039;&#039;&#039;Import/Export block&#039;&#039;&#039;: Makes it easy to find downloadable course templates in a Hub Server, then download them from the Hub Server and restore them locally&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Moodle Hub List==&lt;br /&gt;
The Hub List is a list of known Hub Servers (see the next section).  This makes it easy for Moodle users to find the most appropriate Hub Servers for their needs.  To get on the Hub List, Hub Servers choose to register with moodle.org via their administration interface.&lt;br /&gt;
&lt;br /&gt;
Moodle.org will store the following information, and make it available via a browseable interface at [http://hubdirectory.moodle.org/ hhttp://hubdirectory.moodle.org/].&lt;br /&gt;
&lt;br /&gt;
==Moodle Hub Server==&lt;br /&gt;
[[Image:Registerhub.png| thumb |Mockup: hub registration page]]&lt;br /&gt;
The Moodle Hub Server (aka Hub) is a separate system (based on Moodle technology) that allows Moodle sites to register their courses for listing there. More technically, the hub server is a Moodle plugin.&lt;br /&gt;
&lt;br /&gt;
A default installation of this software will be running at &#039;&#039;&#039;hub.moodle.org&#039;&#039;&#039;, but anyone else can download it and set up their own hub for private or public uses.   A hub can also be used as a Moodle site, even though the Moodle front page will be replaced by the hub front page.&lt;br /&gt;
&lt;br /&gt;
Hubs can optionally register themselves in the Hub List so that they are easier to find and so they can become a &amp;quot;Trusted Hub&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
A hub server has some config fields (saved into its database):&lt;br /&gt;
* name (site name by default, changing the value here, do not change the site name)&lt;br /&gt;
* description (front page summary as default value)&lt;br /&gt;
* language (choose the language, set site language as default)&lt;br /&gt;
* contact name (current user by default)&lt;br /&gt;
* contact email&lt;br /&gt;
* enable&lt;br /&gt;
* password (only for private hub)&lt;br /&gt;
* logo url (need to have a limited size of 150x150)&lt;br /&gt;
* protected web search interface &#039;&#039;&#039;(TODO: MDL-24015)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Data structure ===&lt;br /&gt;
Most of the data structure can be found in the [https://docs.moodle.org/en/Development:Community_hub_-_technical_specification community hub technical specification].&lt;br /&gt;
&lt;br /&gt;
=== User interface ===&lt;br /&gt;
[[Image:Webinterface.png|thumb|Mockup: search course UI]]&lt;br /&gt;
If visiting the hub via the web, it will provide an interface for full searching and browsing.  &lt;br /&gt;
&lt;br /&gt;
The web interface can be protected from access.  The hub at moodle.org will of course be open to all.&lt;br /&gt;
&lt;br /&gt;
[[Image:Search_hub_moodle.png|thumb|Mockup: search hub UI]]&lt;br /&gt;
&lt;br /&gt;
The web interface allows users to:&lt;br /&gt;
&lt;br /&gt;
* search by keyword (descriptions, titles, tags, subject etc)&lt;br /&gt;
* browse a list of courses by subject&lt;br /&gt;
* go directly to a course (if marked for public use)&lt;br /&gt;
* preview a course (if screenshots have been provided, or the original URL location)&lt;br /&gt;
* download the course to desktop (only if an download url has been set)&lt;br /&gt;
* If logged in to the Hub, users can also:&lt;br /&gt;
** give a rating to the course&lt;br /&gt;
** write a comment for the course - &amp;lt;span style=color:blue&amp;gt;use comment 2.0 API&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When displaying courses, you can see and sort by:&lt;br /&gt;
&lt;br /&gt;
* Title - &#039;&#039;Sortable&#039;&#039;&lt;br /&gt;
* Description&lt;br /&gt;
* Tags  - &#039;&#039;Sortable &amp;lt;span style=color:blue&amp;gt;(first tag retrieved by the request is considered)&amp;lt;/span&amp;gt;&#039;&#039;&lt;br /&gt;
* Screenshot(s)&lt;br /&gt;
* Cost (if any) - &#039;&#039;Sortable&#039;&#039;&lt;br /&gt;
* Rating (10-point scale displayed as 5 stars, and only if you are logged in to moodle.org) - &#039;&#039;Sortable&#039;&#039;&lt;br /&gt;
* Comments &lt;br /&gt;
* Moodle site name&lt;br /&gt;
* Date added to directory&lt;br /&gt;
* Date last updated in directory&lt;br /&gt;
* Audience (teachers, students, admins)&lt;br /&gt;
* Teacher name(s) - &#039;&#039;Sortable&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Web service interface ===&lt;br /&gt;
&#039;&#039;&#039;TODO: MDL-24031&#039;&#039;&#039;&lt;br /&gt;
A REST-based web services interface will be provided for other systems (eg Moodle sites) to use directly.&lt;br /&gt;
&lt;br /&gt;
Web services can search on:&lt;br /&gt;
* string search&lt;br /&gt;
* array language&lt;br /&gt;
* array cost&lt;br /&gt;
* array Moodle url&lt;br /&gt;
* Others?&lt;br /&gt;
&lt;br /&gt;
=== Hub admin interface ===&lt;br /&gt;
&lt;br /&gt;
The hub will have a Hub admin interface.  Admin processes include:&lt;br /&gt;
&lt;br /&gt;
* Listing, approving and editing the sites registered with the hub &lt;br /&gt;
* Listing, approving and editing the course descriptions, metadata etc.&lt;br /&gt;
* Registering/updating the Hub with the Hub List&lt;br /&gt;
* Configuring Hub behaviour and the appearance of the home page.&lt;br /&gt;
&lt;br /&gt;
== Course global search functionality ==&lt;br /&gt;
In order to quickly search a course on all public hubs, Moodle.org will have a table equivalent to the course &#039;directory&#039; table with dew additional field as &amp;quot;public hub id&amp;quot;, &amp;quot;site url&amp;quot;, &amp;quot;site name&amp;quot;...&lt;br /&gt;
&lt;br /&gt;
== Site registration ==&lt;br /&gt;
[[Image:SiteRegistration.png|thumb|Mockup: site registration UI]]&lt;br /&gt;
The existing site registration form in Moodle will be extended so that admins can:&lt;br /&gt;
&lt;br /&gt;
# choose one or more Hubs to register with (hub.moodle.org and/or others in the Hub List, or directly to a particular Hub specified by URL)&lt;br /&gt;
# choose to enable cron to re-send statistics to the hub on a periodic basis. (TODO/TBD)&lt;br /&gt;
# choose to enable the hub to harvest courses on a periodic basis (TODO: not shown on image/TBD)&lt;br /&gt;
&lt;br /&gt;
== Community membership ==&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Community&amp;quot; block allows people to find and subscribe to external courses that they want to be part of.&lt;br /&gt;
&lt;br /&gt;
Visibility of the block and the features within it are controlled by roles, and contains:&lt;br /&gt;
&lt;br /&gt;
# &#039;Bookmarks&#039; of previously-selected (subscribed) external courses (to make revisiting easy) grouped by site, which can be edited/deleted etc&lt;br /&gt;
# A link to a search script - &amp;quot;Add new courses...&amp;quot;&lt;br /&gt;
# A search script to browse/search one or more Hubs (via web services to get the data, with the interface rendered by the local script).  Users can select joinable courses from the list and they&#039;ll get added to the list in the block.&lt;br /&gt;
&lt;br /&gt;
Generally the links will be just be an ordinary URL and the remote site will be responsible for authentication.&lt;br /&gt;
&lt;br /&gt;
If the foreign site has an Mnet connection set up with the current site then login will be immediate.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Addacourse.png|thumb|Mockup: community block]]&lt;br /&gt;
&lt;br /&gt;
community block database structure:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|id&lt;br /&gt;
|int&lt;br /&gt;
|Standard autoincrement&lt;br /&gt;
|-&lt;br /&gt;
|userid&lt;br /&gt;
|int&lt;br /&gt;
|foreign key - ID of the user&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|coursename&lt;br /&gt;
|varchar&lt;br /&gt;
|Name of the community course&lt;br /&gt;
|-&lt;br /&gt;
|coursedescription&lt;br /&gt;
|text&lt;br /&gt;
|Description of the community course - display by the tag link&lt;br /&gt;
|-&lt;br /&gt;
|courseurl&lt;br /&gt;
|varchar&lt;br /&gt;
|The full URL to the community course front page&lt;br /&gt;
|-&lt;br /&gt;
|image&lt;br /&gt;
|varchar&lt;br /&gt;
|community course logo url - it could be displayed as icon&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Publish courses ==&lt;br /&gt;
 &#039;&#039;&#039;Publish course&#039;&#039;&#039;: to publish or update the description of the current course in one or more Hubs&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;Publish&#039;&#039;&#039; button only exists if the current user has the appropriate capabilities and if the current Moodle site has been registered with a Hub.&lt;br /&gt;
&lt;br /&gt;
[[Image:Coursepublishing.png|thumb|Mockup: course publishing]]&lt;br /&gt;
&lt;br /&gt;
Choosing &amp;quot;Publish&amp;quot; goes to a script where you can chose from the registered Hubs and whether you want to publish the course as:&lt;br /&gt;
* enrollable/advertise, so that others can come here and use the course where it is, and/or &lt;br /&gt;
* downloadable/share, so that a Hub can offer this course for download to others&lt;br /&gt;
&lt;br /&gt;
If the user wants to offer this course for download, then they are directed to the standard backup process to create and define the backup file (without users!).  If the backup is successful the zip is stored in a standard place and then the user is returned to the publish script to continue.  (If downloads are not required then this whole step is skipped).&lt;br /&gt;
&lt;br /&gt;
It allows the user to set up full , and especially whether you want to advertise this course as being:&lt;br /&gt;
&lt;br /&gt;
Now the script presents a form with metadata that this course will be published with on the chosen Hub(s) (this is also available in the course settings page).  Metadata includes information such as description, licensing, categories, screenshots etc (see the [[#Courses|Courses]] section above for more info).&lt;br /&gt;
&lt;br /&gt;
After checking/updating the metadata, the script will push the data to the selected Hub. &lt;br /&gt;
&lt;br /&gt;
If the checkbox to allow download was selected, then the URL to a course upload script in the current Moodle is included with the metadata.  This URL contains a token (eg an MD5 stored in the course table) that only the Hub knows.&lt;br /&gt;
&lt;br /&gt;
The course upload script (eg /local/hub/webservice/upload.php?id=55&amp;amp;token=XXXXX) will expect the cached .zip file for the given course.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Publish course settings ====&lt;br /&gt;
&lt;br /&gt;
Some publish settings and info will also be available anytime via the course settings page under a &amp;quot;Publish&amp;quot; tab:&lt;br /&gt;
&lt;br /&gt;
* Which hubs has this course been published on, and when&lt;br /&gt;
* Full metadata&lt;br /&gt;
* Screenshots&lt;br /&gt;
&lt;br /&gt;
== Harvest courses ==&lt;br /&gt;
&#039;&#039;&#039;NOT IMPLEMENTED&#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;Note: site to hub communication is one way only, the following text may change.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Each hub will use cron to call every site that has registered a harvesting url on a periodic basis.  This will be done at the same time as the link is checked to ensure the site is reachable, so the &amp;quot;time link was last checked&amp;quot; field in the site table also indicates when the site was last harvested.&lt;br /&gt;
&lt;br /&gt;
The harvesting url will be an RSS feed which will list all the courses to be included in the hub and their metadata.  This might be the feed of all visible courses on the site, or courses in a given category.  TODO: should we allow them to enter multiple category feeds so they can say &amp;quot;arts&amp;quot;, &amp;quot;business&amp;quot; and &amp;quot;languages&amp;quot; but not &amp;quot;science&amp;quot;?&lt;br /&gt;
&lt;br /&gt;
Course list RSS feeds are an existing tracker item for Moodle 2.0  See http://tracker.moodle.org/browse/MDL-13248  This patch allows admins to pick which categories have individual feeds created and are included in the &amp;quot;all courses&amp;quot; feed.  Each course becomes an &amp;lt;item&amp;gt; in the RSS feed as follows:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;category&amp;gt; the Moodle course category in which the course belongs&lt;br /&gt;
* &amp;lt;title&amp;gt; the course fullname&lt;br /&gt;
* &amp;lt;link&amp;gt; the course url&lt;br /&gt;
* &amp;lt;pubdate&amp;gt; the date the course (or any of its resources and activities) last updated&lt;br /&gt;
* &amp;lt;description&amp;gt; the course summary&lt;br /&gt;
&lt;br /&gt;
The current tracker item will need to be extended to include appropriate course metadata in the RSS feed.  There is a [http://purl.org/dc/elements/1.1/ Dublin Core extension to RSS 2.0] which can be implemented.  &lt;br /&gt;
&lt;br /&gt;
TODO: If we choose an alternative metadata format we will need to locate or create an alternative RSS extension.  There is a [http://www.downes.ca/xml/RSS_LOM.htm LOM extension] but not from an official IEEE namespace.  &lt;br /&gt;
&lt;br /&gt;
We will need to declare our own namespace RSS extension to identify whether a course should be listed in the hub as downloadable and/or enrollable.  This extension will add tags to the RSS feed as follows:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;moodlehub:downloadable&amp;gt; &lt;br /&gt;
* &amp;lt;moodlehub:enrollable&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Both tags will take either &amp;quot;yes&amp;quot; or &amp;quot;no&amp;quot; values and will be set by course creators at the same time as they enter course metadata.&lt;br /&gt;
&lt;br /&gt;
The hub will check the published date for each item in the RSS feed to identify whether it needs to update its records.  TODO: if we use OAI-PMH for harvesting we can request courses updated since x see http://moodle.org/mod/forum/discuss.php?d=127488 &lt;br /&gt;
&lt;br /&gt;
If the course has been updated and is &amp;lt;moodlehub:downloadable&amp;gt; is yes, then the hub will request the site to create a new backup of the entire course (less user data).&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* [https://docs.moodle.org/en/Community_hub Community hub]&lt;br /&gt;
* [https://docs.moodle.org/en/Development:Community_hub_-_technical_specification Development: community hub technical specification]&lt;br /&gt;
&lt;br /&gt;
[[Category:Hub]]&lt;br /&gt;
&lt;br /&gt;
[[ja:開発:コミュニティハブ]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Development:Ratings_2.0&amp;diff=140818</id>
		<title>Development:Ratings 2.0</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Development:Ratings_2.0&amp;diff=140818"/>
		<updated>2021-07-14T13:24:11Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Text replacement - &amp;quot;class=&amp;quot;nicetable&amp;quot;&amp;quot; to &amp;quot;class=&amp;quot;wikitable&amp;quot;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Moodle 2.0}}==Objectives==&lt;br /&gt;
&lt;br /&gt;
Ratings are grades entered away from the gradebook. They can be entered by students and teachers and are aggregated into grades.&lt;br /&gt;
&lt;br /&gt;
The goals of ratings 2.0:&lt;br /&gt;
&lt;br /&gt;
* Manage ratings centrally&lt;br /&gt;
* Use a consistent approach for all ratings throughout Moodle&lt;br /&gt;
* Easily integrate ratings 2.0 with existing modules&lt;br /&gt;
* Remove duplicate implementations of ratings functionality&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
The ratings 2.0 provides APIs to:&lt;br /&gt;
# Add ratings&lt;br /&gt;
# Update ratings&lt;br /&gt;
# Access collected ratings for grade calculation purposes&lt;br /&gt;
# Delete ratings&lt;br /&gt;
&lt;br /&gt;
==Current tracker issues==&lt;br /&gt;
MDL-21389 Write spec for separate Ratings 2.0&lt;br /&gt;
&lt;br /&gt;
MDL-20514 Allow Aggregate Type in Glossary Activity&lt;br /&gt;
&lt;br /&gt;
MDL-21657 Implement Ratings 2.0&lt;br /&gt;
&lt;br /&gt;
==Interface==&lt;br /&gt;
&lt;br /&gt;
[[Image:RatingUI.gif]]&lt;br /&gt;
&lt;br /&gt;
When Javascript is enabled ajax submission means the button can be removed. In the future it would be possible to automatically interpret a 1 to 5 rating as a star rating style UI element.&lt;br /&gt;
&lt;br /&gt;
If the user has &#039;post&#039; permission as returned by modname_rating_permissions() the dropdown box and submission button will be displayed.&lt;br /&gt;
&lt;br /&gt;
If the user has &#039;view&#039; permissions the text to the left of the dropdown box will be displayed. The displayed text consists of the aggregate of the ratings, 4 out of 5 in the example. The number in brackets is the number of ratings that have been submitted. There have been two ratings submitted in the example.&lt;br /&gt;
&lt;br /&gt;
If the user has &#039;viewall&#039; permissions they can click on the aggregate summary to view a list of all of the ratings that have been submitted. This is a listing of each user&#039;s profile pic, their name and the rating they submitted.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Database changes==&lt;br /&gt;
===New tables===&lt;br /&gt;
&lt;br /&gt;
====Ratings====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Default&lt;br /&gt;
! Info&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10)&lt;br /&gt;
| auto-incrementing&lt;br /&gt;
| The unique ID for this comment.&lt;br /&gt;
|-&lt;br /&gt;
| contextid&lt;br /&gt;
| int(10)&lt;br /&gt;
|&lt;br /&gt;
| The context id defined in context table - identifies the instance of plugin owning the comment.&lt;br /&gt;
|-&lt;br /&gt;
| itemid&lt;br /&gt;
| int(10)&lt;br /&gt;
|&lt;br /&gt;
| Some plugin specific item id (eg. forum post blog entry)&lt;br /&gt;
|-&lt;br /&gt;
| scaleid&lt;br /&gt;
| int(10)&lt;br /&gt;
|&lt;br /&gt;
| ID of the scale (1-5, 0-100, custom) from which the user selected their rating. Including this allows smarter handling of previously entered ratings should the scales be changed.&lt;br /&gt;
|-&lt;br /&gt;
| rating&lt;br /&gt;
| int(10)&lt;br /&gt;
|&lt;br /&gt;
| The user&#039;s rating&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10)&lt;br /&gt;
|&lt;br /&gt;
| The user who submitted the rating&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Altered tables===&lt;br /&gt;
The forum, glossary and data tables need to be altered to contain the required fields specificed in [https://docs.moodle.org/en/Development:Ratings_2.0#Ratings_Settings]&lt;br /&gt;
&lt;br /&gt;
===Removed database tables===&lt;br /&gt;
&lt;br /&gt;
The following tables will have their data migrated to the above ratings table and then be removed:&lt;br /&gt;
&lt;br /&gt;
data_ratings&lt;br /&gt;
&lt;br /&gt;
forum_ratings&lt;br /&gt;
&lt;br /&gt;
glossary_ratings&lt;br /&gt;
&lt;br /&gt;
===Scales===&lt;br /&gt;
&lt;br /&gt;
Course modules will continue to store the scale associated with their ratings. For example the glossary table has a scale column.&lt;br /&gt;
&lt;br /&gt;
Scales are going to be refactored as part of a separate issue. See MDL-17258.&lt;br /&gt;
&lt;br /&gt;
==Ratings code changes==&lt;br /&gt;
&lt;br /&gt;
rating/lib.php will contain...&lt;br /&gt;
&lt;br /&gt;
===class rating===&lt;br /&gt;
&lt;br /&gt;
====__construct($options)====&lt;br /&gt;
&lt;br /&gt;
Initialize a class instance. Requires context, itemid, scaleid and userid.&lt;br /&gt;
&lt;br /&gt;
====update_rating($rating)====&lt;br /&gt;
&lt;br /&gt;
Add or update the numerical value of the rating in the database&lt;br /&gt;
&lt;br /&gt;
====get_rating()====&lt;br /&gt;
&lt;br /&gt;
get the numerical value of the rating&lt;br /&gt;
&lt;br /&gt;
====delete_rating()====&lt;br /&gt;
&lt;br /&gt;
delete the rating. Not implemented yet as it hasn&#039;t been required.&lt;br /&gt;
&lt;br /&gt;
===class rating_manager===&lt;br /&gt;
&lt;br /&gt;
====public get_ratings($options)====&lt;br /&gt;
Returns the supplied set of items with a rating instance attached to each item.&lt;br /&gt;
&lt;br /&gt;
$items is an array of objects with an id member variable ie $items[0]-&amp;gt;id.&lt;br /&gt;
$options requires context, items, aggregate and scaleid.&lt;br /&gt;
&lt;br /&gt;
items is an array of items such as forum posts or glossary items. They must have an &#039;id&#039; member ie $items[0]-&amp;gt;id.&lt;br /&gt;
aggregate is the the aggregation method to apply. RATING_AGGREGATE_AVERAGE etc.&lt;br /&gt;
&lt;br /&gt;
Optionally options may include userid, returnurl, assesstimestart and assesstimefinish.&lt;br /&gt;
&lt;br /&gt;
If userid is omitted the current user&#039;s id will be used.&lt;br /&gt;
returnurl is the url to return the user to after submitting a rating. Can be left null for ajax requests.&lt;br /&gt;
assesstimestart. Only allow rating of items created after this timestamp.&lt;br /&gt;
assesstimefinish. Only allow rating of items created before this timestamp.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
function get_ratings($options) {&lt;br /&gt;
 global $DB, $USER;&lt;br /&gt;
 &lt;br /&gt;
    if (isnull($userid)) {&lt;br /&gt;
        $userid = $USER-&amp;gt;id;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    $itemids = array();&lt;br /&gt;
    foreach($items as $item) {&lt;br /&gt;
        $itemids[] = $item-&amp;gt;id;&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    list($itemidtest, $params) = $DB-&amp;gt;get_in_or_equal(&lt;br /&gt;
            $itemids, SQL_PARAMS_NAMED, &#039;itemid0000&#039;);&lt;br /&gt;
 &lt;br /&gt;
    $sql = &amp;quot;SELECT r.itemid, ur.id, ur.userid, ur.scaleid,&lt;br /&gt;
    $aggregatestr(r.rating) AS aggrrating,&lt;br /&gt;
    COUNT(r.rating) AS numratings,&lt;br /&gt;
    ur.rating AS usersrating&lt;br /&gt;
FROM {ratings} r&lt;br /&gt;
LEFT JOIN {ratings} ur ON ur.contextid = r.contextid AND&lt;br /&gt;
        ur.itemid = r.itemid AND&lt;br /&gt;
        ur.userid = :userid&lt;br /&gt;
WHERE&lt;br /&gt;
    r.contextid = :contextid AND&lt;br /&gt;
    r.itemid $itemidtest&lt;br /&gt;
GROUP BY r.itemid, ur.rating&lt;br /&gt;
ORDER BY r.itemid&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
    $params[&#039;userid&#039;] = $userid;&lt;br /&gt;
    $params[&#039;contextid&#039;] = $context-&amp;gt;id;&lt;br /&gt;
 &lt;br /&gt;
    //add ratings to the items at $item-&amp;gt;rating. Similar to make_context_subobj().&lt;br /&gt;
    //Iterate over forum $items (forum posts, glossary items etc) and create the  $item-&amp;gt;rating objects. Properties of the individual ratings, such as $item-&amp;gt;rating-&amp;gt;aggregate and $item-&amp;gt;rating-&amp;gt;rating, are stored on the rating object directly.&lt;br /&gt;
    //Settings common to the ratings are stored at $item-&amp;gt;rating-&amp;gt;settings-&amp;gt;aggregationmethod (for example).&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====get_aggregation_method($aggregate)====&lt;br /&gt;
Converts the aggregation method constants to a string that can be included in SQL&lt;br /&gt;
&lt;br /&gt;
====get_all_ratings_for_item($options)====&lt;br /&gt;
Load all ratings for a given item. Used to display a listing of submitted ratings to users with &#039;viewall&#039; permission.&lt;br /&gt;
&lt;br /&gt;
Requires context, itemid and optionally accepts an SQL order by clause.&lt;br /&gt;
&lt;br /&gt;
====get_user_grades($options)====&lt;br /&gt;
Returns a grade for a user based on other user&#039;s rating of their items.&lt;br /&gt;
&lt;br /&gt;
===Rendering ratings===&lt;br /&gt;
&lt;br /&gt;
As rendering a rating will consist of only a single function call a new method called render_rating() will be added to the core renderer.&lt;br /&gt;
&lt;br /&gt;
If necessary a ratings renderer could be added. Located in mod/ratings/renderer.php this new class core_rating_renderer should extend plugin_renderer_base defined in lib/outputrenderers.php Almost all renderers appear to inherit from plugin_renderer_base rather than core_renderer.&lt;br /&gt;
&lt;br /&gt;
=====core_renderer::render_rating(rating $rating)=====&lt;br /&gt;
&lt;br /&gt;
returns rating UI html snippet. Used to include ratings in pages.&lt;br /&gt;
&lt;br /&gt;
===Using the rating renderer===&lt;br /&gt;
&lt;br /&gt;
The process to render ratings is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
// in mod/forum/discuss.php (for example)&lt;br /&gt;
$posts = // Some forum/lib.php function call.&lt;br /&gt;
&lt;br /&gt;
//these are supplied by the calling module (forum etc)&lt;br /&gt;
$aggregate = &lt;br /&gt;
$scaleid = &lt;br /&gt;
$userid =&lt;br /&gt;
$returnurl = &lt;br /&gt;
&lt;br /&gt;
//The current scaleid comes from the forum or glossary object and may be changed at any time so supply it each time&lt;br /&gt;
//Also, a user should only see their own ratings&lt;br /&gt;
$posts = rating::load_ratings($context, &lt;br /&gt;
    $posts/* Optional array of items (forum posts or glossary items) with an &#039;id&#039; property. If null returns all ratings for the context by the user*/, &lt;br /&gt;
    $aggregate, &lt;br /&gt;
    $scaleid, &lt;br /&gt;
    $userid, &lt;br /&gt;
    $returnurl);&lt;br /&gt;
&lt;br /&gt;
//ratings are now attached to the post objects. $posts[0]-&amp;gt;rating&lt;br /&gt;
&lt;br /&gt;
foreach ($posts as $postid =&amp;gt; $post) {&lt;br /&gt;
    $forumoutput-&amp;gt;post($post);//access the rating info at $post-&amp;gt;rating, $post-&amp;gt;rating-&amp;gt;aggregate and $post-&amp;gt;rating-&amp;gt;count&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// in mod/forum/renderer.php, in the post($post) method:&lt;br /&gt;
&lt;br /&gt;
// ... output most of the post ... starts around line 5813 of mod/forum/lib.php&lt;br /&gt;
echo $OUTPUT-&amp;gt;render($item-&amp;gt;rating);&lt;br /&gt;
// ... output the rest.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// and finally in rating/lib.php in the rating class:&lt;br /&gt;
&lt;br /&gt;
public function core_renderer::render_rating(rating $rating) {&lt;br /&gt;
    //return html representation of the rating&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Ratings Aggregation===&lt;br /&gt;
Forums currently support multiple forms of rating aggregation such as average, maximum, sum etc. These options should be available everywhere that ratings are available.&lt;br /&gt;
&lt;br /&gt;
They are calculated within rating::ratings_load_ratings()&lt;br /&gt;
&lt;br /&gt;
===Ratings Settings===&lt;br /&gt;
Settings for ratings are stored by the module. Each module table, for example forum, must contain the following columns.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Default&lt;br /&gt;
! Info&lt;br /&gt;
|-&lt;br /&gt;
| assessed&lt;br /&gt;
| int(10)&lt;br /&gt;
| &lt;br /&gt;
| The aggregation method to apply. A value of 0 means ratings should be disabled. Currently the glossary stores an &amp;quot;allcanrate&amp;quot; flag in the assessed column. &amp;quot;allcanrate&amp;quot; will disappear in favour of proper permissions.&lt;br /&gt;
|-&lt;br /&gt;
| assesstimestart&lt;br /&gt;
| int(10)&lt;br /&gt;
|&lt;br /&gt;
| From when can users submit ratings&lt;br /&gt;
|-&lt;br /&gt;
| assesstimefinish&lt;br /&gt;
| int(10)&lt;br /&gt;
|&lt;br /&gt;
| When must users submit ratings by&lt;br /&gt;
|-&lt;br /&gt;
| scale&lt;br /&gt;
| int(10)&lt;br /&gt;
|&lt;br /&gt;
| What scale to use&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Restrict ratings to posts with dates in this range&amp;quot; flag is calculated in the course/moodleforum_mod.php method moodleform::data_preprocessing() and is not stored in the database.&lt;br /&gt;
&lt;br /&gt;
====Settings interface====&lt;br /&gt;
=====moodleform_mod::standard_coursemodule_elements()=====&lt;br /&gt;
Adds elements to an instance of moodle form. The ratings elements should appear in a separate block from Common Module Settings.&lt;br /&gt;
&lt;br /&gt;
It will determine whether to include ratings settings by calling plugin_supports() found in lib/moodlelib.php like this...&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
if (plugin_supports(&#039;mod&#039;, $this-&amp;gt;_modname, FEATURE_RATINGS, false)) {&lt;br /&gt;
    //include ratings elements&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
mod/%modulename%/lib.php defines a function called %modulename%_supports() that lists the elements that the module supports.&lt;br /&gt;
&lt;br /&gt;
FEATURE_MOD_RATINGS will have to be added to lib/moodlelib.php&lt;br /&gt;
&lt;br /&gt;
===Rating Submission===&lt;br /&gt;
&lt;br /&gt;
rating/rate.php will be the target for posted ratings. Previously each module implemented their own ratings submission. For example mod/glossary/rate.php within the glossary module.&lt;br /&gt;
&lt;br /&gt;
The supplied fields should consist of&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Default&lt;br /&gt;
! Info&lt;br /&gt;
|-&lt;br /&gt;
| contextid&lt;br /&gt;
| PARAM_INT&lt;br /&gt;
|&lt;br /&gt;
| The context id defined in context table - identifies the instance of plugin owning the comment.&lt;br /&gt;
|-&lt;br /&gt;
| itemid&lt;br /&gt;
| PARAM_INT&lt;br /&gt;
|&lt;br /&gt;
| Some plugin specific item id (eg. forum post blog entry)&lt;br /&gt;
|-&lt;br /&gt;
| scaleid&lt;br /&gt;
| PARAM_INT&lt;br /&gt;
|&lt;br /&gt;
| ID of the scale (1-5, 0-100, custom) from which the user selected their rating. Including this allows smarter handling of scales being changed.&lt;br /&gt;
|-&lt;br /&gt;
| rating&lt;br /&gt;
| PARAM_INT&lt;br /&gt;
|&lt;br /&gt;
| for example, in user profile, you can comment user&#039;s description or interests, but they share the same itemid(==userid), we need comment_area to separate them&lt;br /&gt;
|-&lt;br /&gt;
| returnurl&lt;br /&gt;
| PARAM_LOCALURL&lt;br /&gt;
|&lt;br /&gt;
| Null for ajax requests. If not null the url to which the user should be redirected after recording the rating&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The process to record a rating is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$permissions = forum_rating_permission();&lt;br /&gt;
if($permissions[&#039;post&#039;]) {&lt;br /&gt;
$rating = N; //the actual rating from the user&lt;br /&gt;
$ratingObj = new rating($contextid, $scaleid, $userid, array($itemid));&lt;br /&gt;
$ratingObj-&amp;gt;set_rating($rating);&lt;br /&gt;
//redirect to return url if supplied&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//within the class rating&lt;br /&gt;
function Rating::update_rating($rating) {&lt;br /&gt;
$ratings = rating_system::load_ratings($scaleid, $userid, $contextid, array($itemid));&lt;br /&gt;
if( !$ratings || sizeof($ratings)==0) {&lt;br /&gt;
$data-&amp;gt;contextid    = $this-&amp;gt;contextid;&lt;br /&gt;
$data-&amp;gt;scaleid      = $this-&amp;gt;scaleid;&lt;br /&gt;
$data-&amp;gt;userid       = $this-&amp;gt;userid;&lt;br /&gt;
$data-&amp;gt;rating       = $rating;&lt;br /&gt;
$DB-&amp;gt;insert_record($this-&amp;gt;table, $data);&lt;br /&gt;
}&lt;br /&gt;
else {&lt;br /&gt;
$data-&amp;gt;id       = $this-&amp;gt;id;&lt;br /&gt;
$data-&amp;gt;rating   = $rating;&lt;br /&gt;
$DB-&amp;gt;update_record($this-&amp;gt;table, $data);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Ajax submission====&lt;br /&gt;
Ajax submission of ratings must be possible for sites with ajax enabled. ForumNG (http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=2927) written by Sam Marshall contains an ajax implementation of the rating UI elements that may be useful to reference.&lt;br /&gt;
&lt;br /&gt;
Check if ajax is enabled like this...&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
if (empty($CFG-&amp;gt;enableajax)) {&lt;br /&gt;
    //no ajax&lt;br /&gt;
}&lt;br /&gt;
else {&lt;br /&gt;
    //add ajax stuff&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Permissions changes ===&lt;br /&gt;
&lt;br /&gt;
Ratings is dependent on two things: core capabilities and the result of a module callback (which may itself use module capabilities).&lt;br /&gt;
&lt;br /&gt;
====New ratings permissions====&lt;br /&gt;
&lt;br /&gt;
New system-wide ratings permissions will be added.  These will be checked IN ADDITION to local permissions in existing modules.&lt;br /&gt;
&lt;br /&gt;
It is anticipated most new modules will just use these.&lt;br /&gt;
&lt;br /&gt;
The new capabilities are:&lt;br /&gt;
&lt;br /&gt;
moodle/rating:view - allows the user to view aggregated ratings made on their own items&lt;br /&gt;
&lt;br /&gt;
moodle/rating:viewany - allows the user to view aggregated ratings made on other people&#039;s items&lt;br /&gt;
&lt;br /&gt;
moodle/rating:viewall - allows the user to see individual ratings&lt;br /&gt;
&lt;br /&gt;
moodle/rating:rate - allows the user to make ratings on other people&#039;s items&lt;br /&gt;
&lt;br /&gt;
====Handling of old permissions====&lt;br /&gt;
&lt;br /&gt;
Pre-existing module-specific permissions will be extended to have matching names/behaviour with the new rating permissions.&lt;br /&gt;
&lt;br /&gt;
*mod/data:rate  - unchanged&lt;br /&gt;
*mod/data:viewrating   - unchanged &lt;br /&gt;
*mod/data:viewanyrating - cloned from old mod/data:viewrating&lt;br /&gt;
*mod/data:viewallratings - cloned from old mod/data:viewrating&lt;br /&gt;
*mod/forum:rate - unchanged&lt;br /&gt;
*mod/forum:viewrating - unchanged&lt;br /&gt;
*mod/forum:viewanyrating - unchanged&lt;br /&gt;
*mod/forum:viewallratings - cloned from old mod/forum:viewanyrating&lt;br /&gt;
*mod/glossary:rate   - unchanged&lt;br /&gt;
*mod/glossary:viewrating   - unchanged&lt;br /&gt;
*mod/glossary:viewanyrating - cloned from old mod/glossary:viewrating&lt;br /&gt;
*mod/glossary:viewallratings - cloned from old mod/glossary:viewrating&lt;br /&gt;
&lt;br /&gt;
===Module callbacks===&lt;br /&gt;
&lt;br /&gt;
These allow modules to control how ratings behave.&lt;br /&gt;
&lt;br /&gt;
====modname_rating_validate====&lt;br /&gt;
&lt;br /&gt;
As of Moodle 2.0.3 modules must implement a function named &#039;&#039;&#039;modname_rating_validate&#039;&#039;&#039; to verify the validity of submitted ratings.&lt;br /&gt;
&lt;br /&gt;
This function must return true if the rating is valid or throw an instance of rating_exception if the rating is invalid. Note: false is used to indicate that the module hasn&#039;t implemented this callback.&lt;br /&gt;
&lt;br /&gt;
This example shows how this would work for the forum module&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
function forum_rating_validate($params) {&lt;br /&gt;
    if (!array_key_exists(&#039;itemid&#039;, $params) || !array_key_exists(&#039;context&#039;, $params) || !array_key_exists(&#039;rateduserid&#039;, $params)) {&lt;br /&gt;
        throw new rating_exception(&#039;missingparameter&#039;);&lt;br /&gt;
    }&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
The rating_exception argument is the name of a string in the error language file.&lt;br /&gt;
&lt;br /&gt;
The $params argument contains:&lt;br /&gt;
* context - object the context in which the rated items exists [required]&lt;br /&gt;
* itemid - int the ID of the object being rated&lt;br /&gt;
* scaleid - int the scale from which the user can select a rating. Used for bounds checking. [required]&lt;br /&gt;
* rating - int the submitted rating&lt;br /&gt;
* rateduserid - int the id of the user whose items have been rated. NOT the user who submitted the ratings. 0 to update all. [required]&lt;br /&gt;
* aggregation - int the aggregation method to apply when calculating grades ie RATING_AGGREGATE_AVERAGE [required]&lt;br /&gt;
&lt;br /&gt;
====modname_rating_permissions====&lt;br /&gt;
Modules must implement a function named &#039;&#039;&#039;modname_rating_permissions&#039;&#039;&#039; to control post and view permission. This is called prior to rendering a set of ratings. It is also called by rating/rate.php and rate/rate_ajax.php when they receive rating submissions.&lt;br /&gt;
&lt;br /&gt;
Modules do not need to implement this.  It&#039;s mostly provided for backward compatibility with modules that had complicated ratings related logic or for modules that use settings other than capabilities to control ratings behavior.&lt;br /&gt;
&lt;br /&gt;
This function will return an array: array(&#039;view&#039;=&amp;gt;true, &#039;viewany&#039;=&amp;gt;true, &#039;viewall&#039;=&amp;gt;true, &#039;rate&#039;=&amp;gt;true)&lt;br /&gt;
&lt;br /&gt;
This example shows how this would work for the forum module&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
function forum_rating_permissions($context) {&lt;br /&gt;
    return array(&#039;view&#039;=&amp;gt;has_capability(&#039;mod/forum:viewrating&#039;,$context), &lt;br /&gt;
                 &#039;viewany&#039;=&amp;gt;has_capability(&#039;mod/forum:viewanyrating&#039;,$context), &lt;br /&gt;
                 &#039;viewall&#039;=&amp;gt;has_capability(&#039;mod/forum:viewallratings&#039;,$context), &lt;br /&gt;
                 &#039;rate&#039;=&amp;gt;has_capability(&#039;mod/forum:rate&#039;,$context));&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* MDL-21657 Implement Ratings 2.0&lt;br /&gt;
&lt;br /&gt;
[[Category:Grades]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Development:Blog_2.0&amp;diff=140817</id>
		<title>Development:Blog 2.0</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Development:Blog_2.0&amp;diff=140817"/>
		<updated>2021-07-14T13:24:10Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Text replacement - &amp;quot;class=&amp;quot;nicetable&amp;quot;&amp;quot; to &amp;quot;class=&amp;quot;wikitable&amp;quot;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Work in progress}}{{Moodle 2.0}}&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;PROJECT STATE: Coding&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;MAIN TRACKER ISSUE&#039;&#039;&#039;: MDL-19676 Blog 2.0 improvements&lt;br /&gt;
* &#039;&#039;&#039;DISCUSSION AND COMMENTS&#039;&#039;&#039;: http://moodle.org/mod/forum/discuss.php?d=133348&lt;br /&gt;
&lt;br /&gt;
== Description of improvements ==&lt;br /&gt;
=== Who can view blog entries? ===&lt;br /&gt;
Blog entries are either in draft mode (only the author can view it), or in public mode. In public mode, everyone on the entire site can view the blog entry. &lt;br /&gt;
&lt;br /&gt;
Before 2.0 there was an attempt to restrict who can view certain blog entries, based on course enrolment and capabilities. However, after extensive discussion and feasibility testing it became clear that this could lead to serious performance and usability issues on large sites, and was turning the blog into something more akin to a forum. It was thus decided to make all blogs public. (See MDL-19676)&lt;br /&gt;
&lt;br /&gt;
This simplification means that sites using the old BLOG_GROUP_LEVEL and BLOG_COURSE_LEVEL and values of $CFG-&amp;gt;bloglevel have to perform an special upgrade which copies all the site&#039;s blog entries into a special &amp;quot;blog-type&amp;quot; forum in each course in which the blog entry&#039;s author is enrolled, then disables blogging at site level.&lt;br /&gt;
&lt;br /&gt;
Capabilities:&lt;br /&gt;
*moodle/blog:view&lt;br /&gt;
*moodle/blog:viewdrafts&lt;br /&gt;
&lt;br /&gt;
=== Associations ===&lt;br /&gt;
A blog entry can optionally be associated with a course. This makes it possible for a user to blog &amp;quot;about&amp;quot; that course. All blog entries associated in that way can be viewed on a page like blog/index.php?courseid=3. This type of filtering of blog entries does not take into account course enrolments.&lt;br /&gt;
&lt;br /&gt;
Additionally, blog entries can be associated with an activity module.&lt;br /&gt;
&lt;br /&gt;
This requires the creation of a new table, in which the associations are recorded.&lt;br /&gt;
Tracker issue: MDL-14408&lt;br /&gt;
&lt;br /&gt;
Capabilities: &lt;br /&gt;
*moodle/blog:associatecourse&lt;br /&gt;
*moodle/blog:associatemodule&lt;br /&gt;
&lt;br /&gt;
=== Improved navigation ===&lt;br /&gt;
Before 2.0, the navigation for any listing of blog entries was either &amp;quot;Site &amp;gt; User &amp;gt; Blogs&amp;quot; (for a user&#039;s blog entries) or &amp;quot;Site &amp;gt; Blogs&amp;quot; for the whole site&#039;s blog entries, optionally filtered by tag. With the new association features, we need a better way to display what type of blog listing we are looking at, based on the parameters passed to blog/index.php. The navigation should also reflect additional filters such as tag and search.&lt;br /&gt;
&lt;br /&gt;
=== External blogs ===&lt;br /&gt;
A user can specify external blogs which publish an RSS/ATOM feed. This feed is then checked periodically through a cron task, and entries are copied into the user&#039;s blog in Moodle, as read-only entries.&lt;br /&gt;
&lt;br /&gt;
This synchronisation checks if external entries have been modified or deleted since the last sync, and updates the Moodle entries accordingly.&lt;br /&gt;
&lt;br /&gt;
These external blogs are a user preference, and two types of tags can be added to each of them: &amp;quot;Filter tags&amp;quot; and &amp;quot;Automatic tags&amp;quot;:&lt;br /&gt;
*Filter tags are used to filter the external blog entries that get copied into Moodle. They must match the tags used by that external blog. An external entry will be selected if it has at least one of the filter tags. (Tags are called &amp;quot;categories&amp;quot; in RSS feeds)&lt;br /&gt;
*Automatic tags are automatically added to each blog entry copied into Moodle from an external blog that uses such tags.&lt;br /&gt;
&lt;br /&gt;
This requires the creation of a new DB table.&lt;br /&gt;
Tracker issue: MDL-19683&lt;br /&gt;
&lt;br /&gt;
Capabilities:&lt;br /&gt;
*moodle/blog:manageexternal&lt;br /&gt;
&lt;br /&gt;
=== Search blog entries ===&lt;br /&gt;
It is now possible to search blog entries using a search box. The results maintain the current context, so that if you are viewing a list of blog entries for a particular user, entering a term in the search box will return only the blog entries for that user that match the search term. The search term also appears in the navigation breadcrumbs.&lt;br /&gt;
&lt;br /&gt;
Tracker issue: MDL-19686&lt;br /&gt;
&lt;br /&gt;
Capabilities:&lt;br /&gt;
*moodle/blog:search&lt;br /&gt;
&lt;br /&gt;
=== Contextual blog menu ===&lt;br /&gt;
Previously, the &amp;quot;blog menu&amp;quot; block was the same on every page on which it appeared. In 2.0 it changes depending on which page you are. For example, if you are on course/view.php, it will include a link to blog entries associated with that course. Also, the link for adding a new entry will include the courseid, making the course association automatically pre-selected in the blog entry edit form.&lt;br /&gt;
&lt;br /&gt;
Tracker issue: MDL-19687&lt;br /&gt;
&lt;br /&gt;
=== File attachments ===&lt;br /&gt;
The [[Development:File_API|new file manager]] must be implemented to allow for multiple file attachments per blog entry.&lt;br /&gt;
&lt;br /&gt;
Tracker issue: MDL-19744&lt;br /&gt;
&lt;br /&gt;
=== Comments ===&lt;br /&gt;
The new [[Development:Comments_2.0|Comments API]] makes it possible for anyone having the correct capability to comment on blog entries.&lt;br /&gt;
&lt;br /&gt;
Tracker issue: MDL-8776&lt;br /&gt;
&lt;br /&gt;
=== New &amp;quot;Recent blog entries&amp;quot; block ===&lt;br /&gt;
This block can be configured to display the last N blog entries, filtered by context. For example, if you are viewing an assignment activity, this block would display the last N blog entries that are associated with that assignment.&lt;br /&gt;
&lt;br /&gt;
Tracker issue: MDL-19688&lt;br /&gt;
&lt;br /&gt;
== Potential problems and limitations ==&lt;br /&gt;
&lt;br /&gt;
===Upgrade from &amp;quot;Users can only see blogs for people who share a course&amp;quot;===&lt;br /&gt;
&lt;br /&gt;
This mode was always a slightly quirky and uncomfortable hack.  It was mostly useful for sites with very distinct courses and users, such as those where each course consists of the employees from a separate company, and My Moodle was used to hide the companies from each other.  However, for the general case, the main problem is that you see ALL blog entries from those people, not just ones that are about your courses.  &lt;br /&gt;
&lt;br /&gt;
This mode has no direct equivalent in Moodle 2.0 because we have resolved not to emulate &amp;quot;course-like&amp;quot; modes within a system that is at system level, and outside the courses.  This helps understanding of the blog system, simplifies the implementation and improves performance.  &lt;br /&gt;
&lt;br /&gt;
However some people may be using that mode so we do need to provide an upgrade path for them.&lt;br /&gt;
&lt;br /&gt;
Informationally, the idea of just seeing all the blogs from people who are in your course is the same as a course forum. &lt;br /&gt;
&lt;br /&gt;
So a possible upgrade would be to do this:&lt;br /&gt;
 If the mode is set to &amp;quot;Users can only see blogs for people who share a course&amp;quot; then&lt;br /&gt;
   Set the new mode to &amp;quot;Users can only see their own blog&amp;quot;&lt;br /&gt;
   Foreach user who has a blog &lt;br /&gt;
     Foreach course that user is enrolled in &lt;br /&gt;
        If a &amp;quot;Course blogs (recovered)&amp;quot; forum doesn&#039;t exist yet in the course (section 0) then create one&lt;br /&gt;
        Foreach blog entry that the user created &lt;br /&gt;
           Create a new discussion from the blog post with the same dates, attachments etc&lt;br /&gt;
&lt;br /&gt;
This way no data is lost.  The teachers can choose to delete the whole forum if they choose to.  The original blog entries should not be touched.&lt;br /&gt;
&lt;br /&gt;
== DB Structure ==&lt;br /&gt;
2 new tables need to be added: blog_external and blog_association&lt;br /&gt;
&lt;br /&gt;
=== blog_external ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Default&lt;br /&gt;
! Info&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10)&lt;br /&gt;
| auto-incrementing&lt;br /&gt;
| The unique ID for this external blog.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10)&lt;br /&gt;
|&lt;br /&gt;
| The owner of the external blog&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| char(255)&lt;br /&gt;
|&lt;br /&gt;
| A descriptive name for the external blog. Automatically fetched during initial import, can be overridden.&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text(small)&lt;br /&gt;
|&lt;br /&gt;
| A long description of the external blog. Automatically fetched during initial import, can be overridden.&lt;br /&gt;
|-&lt;br /&gt;
| url&lt;br /&gt;
| text(small)&lt;br /&gt;
|&lt;br /&gt;
| The URL to the external blog (e.g. http://moodle.org/rss.xml)&lt;br /&gt;
|-&lt;br /&gt;
| failedlastsync&lt;br /&gt;
| int(1)&lt;br /&gt;
|&lt;br /&gt;
| Whether or not the last synchronisation failed&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| timefetched&lt;br /&gt;
| int(10)&lt;br /&gt;
|&lt;br /&gt;
| The last time the entries from this external blog were fetched by Moodle.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== blog_association ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Default&lt;br /&gt;
! Info&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10)&lt;br /&gt;
| auto-incrementing&lt;br /&gt;
| The unique ID for this blog entry&amp;lt;-&amp;gt;contextid association.&lt;br /&gt;
|-&lt;br /&gt;
| contextid&lt;br /&gt;
| int(10)&lt;br /&gt;
|&lt;br /&gt;
| The context id defined in context table - identifies the instance of the course or plugin associated with the blog entry.&lt;br /&gt;
|-&lt;br /&gt;
| blogid&lt;br /&gt;
| int(10)&lt;br /&gt;
|&lt;br /&gt;
| The id of the blog entry (from the post table) being associated with a course or module instance&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Upgrade process ==&lt;br /&gt;
The only task required by the upgrade process is to install the new DB tables.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
*[[Development:Blogs|Early wishlist]]&lt;br /&gt;
*[[Student_projects/Blog_improvements|2008 GSoC project addressing some of these improvements]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Blog]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Development:Languages/AMOS&amp;diff=140816</id>
		<title>Development:Languages/AMOS</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Development:Languages/AMOS&amp;diff=140816"/>
		<updated>2021-07-14T13:24:09Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Text replacement - &amp;quot;class=&amp;quot;nicetable&amp;quot;&amp;quot; to &amp;quot;class=&amp;quot;wikitable&amp;quot;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox Project&lt;br /&gt;
|name = Automated manipulation of strings&lt;br /&gt;
|state = Production&lt;br /&gt;
|tracker = MDL-18797&lt;br /&gt;
|discussion = [http://moodle.org/mod/forum/discuss.php?d=118707#p542197]&lt;br /&gt;
|assignee = [[User:David Mudrak|David Mudrak]]&lt;br /&gt;
}}&lt;br /&gt;
{{Moodle 2.0}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;AMOS stands for Automated Manipulation of Strings. AMOS is a central repository of Moodle strings and their history. It tracks the addition of English strings into Moodle code, gathers translations, handles common translation tasks and generates language packages to be deployed on Moodle servers.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The name was chosen in honour of [http://en.wikipedia.org/wiki/John_Amos_Comenius John Amos Comenius], the author of &#039;&#039;Janua linguarum reserata&#039;&#039; (Gate to Languages Unlocked), who may be considered the father of modern education.&lt;br /&gt;
&lt;br /&gt;
== AMOS design ==&lt;br /&gt;
&lt;br /&gt;
This part of the document was the original specification used for development.&lt;br /&gt;
&lt;br /&gt;
=== Overall picture ===&lt;br /&gt;
&lt;br /&gt;
[[Image:lang20amosflow.png]]&lt;br /&gt;
&lt;br /&gt;
# Developers add new string by adding them into appropriate English $strings array definition file (eg /mod/workshop/lang/en/workshop.php). This file is committed into Moodle main CVS repository as a part of the code.&lt;br /&gt;
# CVS repository is mirrored automatically on the fly in a git repository. This git repository is used for further processing because parsing the strings file and tracking their history is much simpler in this system. The whole history is present in the git clone so there is no need to ask CVS server for anything once it is fetched.&lt;br /&gt;
# Git repository is regularly checked for any changes in string definition files. Once a modification is detected, the file is parsed and any addition, modification or removal of a string is recorded in an English strings database, together with a meta-information about the author of the change, timestamp, branch, commit identification (git commit hash) etc.&lt;br /&gt;
# Translators use the strings definition stored in the English strings database as a reference for their translation. Therefore the information about the origin (the branch and the revision) of the translated English string can be stored as meta-info together with the translation. Every translated string is linked with a certain revision of the English source so we can easily find strings there were modified in English to be re-checked etc.&lt;br /&gt;
# So called translation stage (or cache) is used during the translation. This is similar to the session cache when working with [[XMLDB]]. Once the translator is happy with the work, she/he commits (submits) the translation into the database of the translated strings.&lt;br /&gt;
# Non-English strings database contains the history of the translation of all Moodle strings in all supported languages. This database is used as a source to generate the up-to-date language package in various formats (ZIP to be deployed at the servers, XML to be used by an external translation tools etc).&lt;br /&gt;
# Moodle site administrators update their installed language packs by downloading the ZIP files generated from the database (or, in the future, they can fetch the pack in other format)&lt;br /&gt;
&lt;br /&gt;
=== AMOS processes ===&lt;br /&gt;
&lt;br /&gt;
[[Image:lang20amosflow2.png]]&lt;br /&gt;
&lt;br /&gt;
;Tracking CVS commits : run as a cron job. Looks for new/modified/removed strings in Moodle source code (core and contrib) and registers these changes in AMOS database.&lt;br /&gt;
;Uploading strings : both English and translated strings may be registered from uploaded files. This way, 3rd modules not tracked by AMOS automatically (because they are not in our contrib) can be processed in AMOS.&lt;br /&gt;
;Translating strings via web : AMOS provides an interface for translating stored strings (MDL-21691).&lt;br /&gt;
;Staging : Strings from various sources end in a [http://en.wikipedia.org/wiki/Staging_(data) staging area]. They are stored here temporarily before they are committed into the main strings table.&lt;br /&gt;
;Committing : A set of strings in the stage is committed into the main strings table.&lt;br /&gt;
&lt;br /&gt;
Thanks to this design, we have a single interface to get data from stage into the main strings repository. For every supported format/way to get strings, just a class implementing &#039;stageable&#039; interface is needed to convert the input format into the staging area.&lt;br /&gt;
&lt;br /&gt;
Hierarchy of classes is expected to be available for input processing. For example, the process that tracks commits history in CVS prepares a PHP file with the checkout. So we have a class that is able to convert array $string[] defined in PHP file into staging area. Once we have such class, it can be used to process PHP files uploaded by developers/translators, too.&lt;br /&gt;
&lt;br /&gt;
=== Implementation plan ===&lt;br /&gt;
&lt;br /&gt;
The implementation proposal evolved from the idea by Petr Skoda [http://moodle.org/mod/forum/discuss.php?d=118707#p542197 discussed at moodle.org]. The key point is that translators do not have direct access to the source code repository (CVS) any more. There is a central tool (known as AMOS nowadays) that looks after proper branching and keeping history of the language packs. The current proposal follows.&lt;br /&gt;
&lt;br /&gt;
# There a separate Moodle 2.0 site at http://lang.moodle.org MNet&#039;ed with http://moodle.org. This site is intended for our developers, translators and other community members interested in the translation process. Current Languages forum at Using Moodle can be eventually moved into this new languages portal.&lt;br /&gt;
# AMOS is implemented as a local plugin /local/amos installed at http://lang.moodle.org. Because this is the only Moodle site with this plugin, using /local plugin mechanism is a natural way to implement, develop and maintain it.&lt;br /&gt;
# There is a course &amp;quot;Moodle Translation&amp;quot; in this portal containing (among other useful things) a clear link to the /local/amos/view.php page.&lt;br /&gt;
# During Moodle 2.0 beta period, translator use AMOS portal to prepare the translations of the new Moodle release.&lt;br /&gt;
# AMOS installation at http://lang.moodle.org uses its own git clone of our official git mirror to have access to the English strings. Keeping the git mirror up-to-date and synced is a prerequisition for the proper AMOS functionality.&lt;br /&gt;
&lt;br /&gt;
=== Use cases ===&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;Developers&#039;&#039; write the code and commits it into CVS. They can create or modify English strings as needed in the current way of direct modification of the strings definition file.&lt;br /&gt;
# &#039;&#039;Translators&#039;&#039; come to http://lang.moodle.org to translate Moodle. No other way is possible yet.&lt;br /&gt;
## translators can choose the Moodle version (1.8, 1.9 or 2.0) to translate&lt;br /&gt;
## translators can display the list of missing strings to translate&lt;br /&gt;
## translators can display the list of English strings that were modified since their last translation so they should be re-checked&lt;br /&gt;
## translators can display the history of string wording, authors of the change, commit messages explaining the change&lt;br /&gt;
## other useful tools and filters are available, like displaying all strings containing a given phrase etc. See MDL-18797 for details&lt;br /&gt;
## after providing new or modified translations, translators &amp;quot;commit&amp;quot; their changes through the web interface, providing a commit message&lt;br /&gt;
# &#039;&#039;Administrators&#039;&#039; can download language packages as ZIP files from http://download.moodle.org or let them update automatically from the Moodle&lt;br /&gt;
## packages are regenerated automatically as they are at the moment, with the only difference that the database and not CVS is used as their source&lt;br /&gt;
# &#039;&#039;Contributors&#039;&#039; [must think about this yet] - their plugins in CONTRIB can be mirrored into git (one day this will happend anyway ;-)) and then AMOS can process them easily. Or we could add a feature that the contributor can upload the file with English strings definition manually and &amp;quot;register&amp;quot; the strings this way.&lt;br /&gt;
&lt;br /&gt;
== Database structure ==&lt;br /&gt;
&lt;br /&gt;
The core of the whole AMOS system is a single table containing the history of all changes of all strings from all components in all languages. This one is called amos_repository. All other operations, like committing a translation, getting the current snapshot etc., are based on this table. After an initial import of CVS history, the table contains around 3.6 millions of records.&lt;br /&gt;
&lt;br /&gt;
There is yet another table where the permissions to translate a language are stored, which is not so important and is trivial (therefore not documented here).&lt;br /&gt;
&lt;br /&gt;
=== amos_repository ===&lt;br /&gt;
Contains all Moodle strings and their history&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int (10) unsigned not null seq&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| branch&lt;br /&gt;
| int (10) unsigned not null&lt;br /&gt;
| The code of the branch this string is valid for&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| lang&lt;br /&gt;
| char (20) not null &lt;br /&gt;
| The code of the language this string belongs to. Like en, cs or es&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| component&lt;br /&gt;
| char (255) not null &lt;br /&gt;
| The name of the component this string belongs to. Like moodle or workshopform_accumulative&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| stringid&lt;br /&gt;
| char (255) not null&lt;br /&gt;
| The code of the string&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| text&lt;br /&gt;
| text (big) not null&lt;br /&gt;
| The localized string text&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int (10) unsigned not null&lt;br /&gt;
| The timestamp of the commit&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| commitmsg&lt;br /&gt;
| text (big)&lt;br /&gt;
| Commit message&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| commithash&lt;br /&gt;
| char (40)&lt;br /&gt;
| The git commit hash that introduced this string&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| source&lt;br /&gt;
| char (255)&lt;br /&gt;
| The source of this string - git, email etc.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int (2) unsigned default 0&lt;br /&gt;
| Is the string deleted? If not, it will be generated into the lang packs&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int (10) unsigned&lt;br /&gt;
| If the author is known in the local user table, store their id here&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| userinfo&lt;br /&gt;
| char (255)&lt;br /&gt;
| Helps to identify the author of the change, for example a name from CVS commit&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
==== Keys ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Name&lt;br /&gt;
! Type&lt;br /&gt;
! Field(s)&lt;br /&gt;
! Reference&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| primary&lt;br /&gt;
| primary&lt;br /&gt;
| id&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| fk_user&lt;br /&gt;
| foreign&lt;br /&gt;
| userid&lt;br /&gt;
| user (id)&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
==== Indexes ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Name&lt;br /&gt;
! Type&lt;br /&gt;
! Field(s)&lt;br /&gt;
! Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| ix_snapshot&lt;br /&gt;
| Not unique&lt;br /&gt;
| component, lang, branch&lt;br /&gt;
| Optimised for getting a snapshot of all current strings in one component&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| ix_lang&lt;br /&gt;
| Not unique&lt;br /&gt;
| lang&lt;br /&gt;
| For getting a list of all known components. In some cases, we need to filter English records only&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| ix_timemodified&lt;br /&gt;
| Not unique&lt;br /&gt;
| timemodified&lt;br /&gt;
| This index allows to search for the recent records in the log output&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
=== Tracking the changes in the English strings ===&lt;br /&gt;
&lt;br /&gt;
Implemented in: /local/amos/cli/parse-core.php&lt;br /&gt;
&lt;br /&gt;
AMOS uses its own git clone of Moodle repository. It runs &#039;git whatchanged&#039; to see what files were affected by every single commit ever. Once it detects a change in a valid English string file, it checks out that revision of the file and compares its content with the current snapshot of the strings database. New record is added into the strings table for every new, modified or removed string in the checked out file. The commit hash of the last fully processed commit is stored in $CFG-&amp;gt;dataroot/amos/var/MOODLE_xx.startat so that next time AMOS analyzes just new commits.&lt;br /&gt;
&lt;br /&gt;
=== AMOS script ===&lt;br /&gt;
&lt;br /&gt;
AMOS script allows us to propagate changes in the English language pack into other languages.&lt;br /&gt;
&lt;br /&gt;
Sometimes we want to reorganize the English language pack - for example split a component into subcomponents (as happened with auth.php), rename string identifiers, fork a string according the meaning (e.g. &#039;fullname&#039; may be different when talking about a human and about a course) etc. Such a change can be easily done in English by direct editing and committing the lang/en/*.php files. But the translation would get lost and our poor translators would have to translate such strings again.&lt;br /&gt;
&lt;br /&gt;
There is a way how to instruct AMOS to propagate a change in the English lang pack into all other languages at the given branch. We call that AMOS script (or amosbler for the syntax similarity with the assembly language - assembler). Such a script can be uploaded or pasted into a page at AMOS portal and it will just follow the instructions provided. Or - which is more interesting - such a script can be put directly into the commit message of the commit that does the change in the English language pack. In that case, AMOS will automatically run the script right after it process the commit.&lt;br /&gt;
&lt;br /&gt;
Here is an example of a script that instruct AMOS to process a set of bulk operations over language packages:&lt;br /&gt;
&lt;br /&gt;
 AMOS BEGIN&lt;br /&gt;
  MOV [description,mod_workshop],[intro,mod_workshop]&lt;br /&gt;
  CPY [submission,mod_assignment],[submission,mod_workshop]&lt;br /&gt;
  HLP forum/forumtype.html,[forumtype_hlp,mod_forum]&lt;br /&gt;
 AMOS END&lt;br /&gt;
&lt;br /&gt;
In this example, there are three instuctions to be done. The line with MOV (&#039;move&#039;) command instructs AMOS to rename the string &#039;description&#039; defined in workshop to the new identifier &#039;intro&#039;. The second command CPY (&#039;copy&#039;) orders to create new string in the workshop module with the identifier &#039;submission&#039; and the value of that string shall be taken from the $string[&#039;submission&#039;] in the module assignment. If such string already exists in any language, CPY will not replace it. The third command is used for migrating legacy HTML help files into ordinary strings. It tells AMOS to add new $string[&#039;forumtype_hlp&#039;] in every language, using the content of the help file &#039;forum/forumtype.html&#039; as the initial value.&lt;br /&gt;
&lt;br /&gt;
The script syntax is defined as follows. Note that amosbler keywords are case sensitive so must be upper-case. In pseudo-regexp, the valid AMOS script is defined as:&lt;br /&gt;
&lt;br /&gt;
 ^[:blank:]*AMOS BEGIN[:blank:]*$&lt;br /&gt;
 ^[:blank:]*[A-Z]{3}[:blank:]+(param1),[:blank:]*(param2), ...,[:blank:]*(paramn)[:blank:]$&lt;br /&gt;
 ...&lt;br /&gt;
 ^[:blank:]*AMOS END[:blank:]*$&lt;br /&gt;
&lt;br /&gt;
In human language, this roughly means: the script is a block of lines starting with &#039;AMOS BEGIN&#039; or &#039;AMOS START&#039; and ending with &#039;AMOS END&#039; lines. Every instruction is on its own line. Instruction has its name (three capital letters like MOV, CPY, HLP, RPL, SMS or GRR) followed by comma-separated parameters.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Beware:&#039;&#039;&#039; Every string is referenced as [stringid,component] &#039;&#039;&#039;but the component is different from what we use in get_string()&#039;&#039;&#039;. All components use fully normalized plugintype_pluginname syntax (see normalize_component() function in moodlelib). If plugintype === core and pluginname is empty (component &#039;core&#039;), the strings are stored in moodle.php.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! String identification in get_string()&lt;br /&gt;
! String identification in AMOS&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| get_string(&#039;edit&#039;, &#039;moodle&#039;)&lt;br /&gt;
| [edit,core]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| get_string(&#039;submit&#039;, &#039;assignment&#039;)&lt;br /&gt;
| [submit,mod_assignment]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| get_string(&#039;grade_help&#039;, &#039;grades&#039;)&lt;br /&gt;
| [grade_help,core_grades]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| get_string(&#039;send&#039;, &#039;message&#039;)&lt;br /&gt;
| [send,core_message]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| get_string(&#039;hello&#039;, &#039;block_greetings&#039;)&lt;br /&gt;
| [hello,block_greetings]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Currently planned/implemented AMOS script instructions are:&lt;br /&gt;
&lt;br /&gt;
; MOV [source],[target] : Move the string. If the source stringid is already defined in the target component, it is not replaced.&lt;br /&gt;
; CPY [source],[target] : Copy the string. Works as MOV but the source string is not touched.&lt;br /&gt;
; HLP component/helpfile.html,[string] : Convert legacy HTML help file to the string&lt;br /&gt;
; REM text : Allows to put a remark (comment), for example to describe a required operation that can&#039;t be achieved by current instruction set.&lt;br /&gt;
&lt;br /&gt;
Ideas for other future instructions: RPL for replace (forced MOV), SMS for sending a message, GRR for something unknown yet but such instruction just must be there ;-)&lt;br /&gt;
&lt;br /&gt;
Note there are no instructions DEL or ADD. AMOS automatically recognized new strings as well as their removal from the commit diffs.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary of using AMOS script in commit messages:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# The commit must modify some string file, AMOS would ignore the commit completely otherwise&lt;br /&gt;
# The script must be properly formatted as block of lines&lt;br /&gt;
# The strings must be identified in normalized syntax - the main difference is using core for moodle.php and core_* prefix for components in lang/en/*.php&lt;br /&gt;
# Note that it may take up to an hour that your CVS commit is mirrored into git and then processed by AMOS&lt;br /&gt;
&lt;br /&gt;
=== Generating installer files ===&lt;br /&gt;
&lt;br /&gt;
Implemented, not automated yet&lt;br /&gt;
&lt;br /&gt;
See cli/export-installer.php.&lt;br /&gt;
&lt;br /&gt;
== Deployment settings ==&lt;br /&gt;
&lt;br /&gt;
 # crontab -l&lt;br /&gt;
 0,30 01-23 * * * /usr/local/bin/amos-update &amp;gt; /tmp/amos-update.log&lt;br /&gt;
 0    0     * * * /usr/bin/php /var/www/htdocs/moodle-amos/local/amos/cli/rev-clean.php --full &amp;gt; /tmp/amos-full-rev-clean.log&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 &lt;br /&gt;
 # /usr/local/bin/amos-update&lt;br /&gt;
 # Updates AMOS working repositories and registers changes&lt;br /&gt;
 # To be run regularly after git sync&lt;br /&gt;
 &lt;br /&gt;
 AMOSCLIDIR=/var/www/htdocs/moodle-amos/local/amos/cli&lt;br /&gt;
 AMOSREPOCORE=/var/www/data/moodle-amos/amos/repos/moodle&lt;br /&gt;
 AMOSREPOLANG=/var/www/data/moodle-amos/amos/repos/moodle-lang&lt;br /&gt;
 PHP=/usr/bin/php&lt;br /&gt;
 &lt;br /&gt;
 cd $AMOSREPOCORE &amp;amp;&amp;amp; /usr/local/bin/git pull --quiet&lt;br /&gt;
 cd $AMOSREPOLANG &amp;amp;&amp;amp; /usr/local/bin/git pull --quiet&lt;br /&gt;
 &lt;br /&gt;
 $PHP $AMOSCLIDIR/parse-core.php &amp;amp;&amp;amp; $PHP $AMOSCLIDIR/parse-lang.php &amp;amp;&amp;amp; $PHP $AMOSCLIDIR/rev-clean.php&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Language]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=TinyMCE_editor&amp;diff=140815</id>
		<title>TinyMCE editor</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=TinyMCE_editor&amp;diff=140815"/>
		<updated>2021-07-14T13:24:08Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Text replacement - &amp;quot;class=&amp;quot;nicetable&amp;quot;&amp;quot; to &amp;quot;class=&amp;quot;wikitable&amp;quot;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Editing text}}&lt;br /&gt;
The TinyMCE text editor is an editor plugin in Moodle which can be enabled, disabled or set as default from &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Plugins &amp;gt; Text editors &amp;gt; Manage editors&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Users may also select the TinyMCE editor (in preference to the default editor Atto) from the user menu top right&amp;gt;&#039;&#039;Preferences&amp;gt;Editor preferences&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Collapsing and expanding the  editor==&lt;br /&gt;
&lt;br /&gt;
The TinyMCE editor first appears with just one row of buttons. Clicking the icon top left will expand it to three rows.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|[[File:26tinymce1.png|250px|thumb|Collapsed view]]&lt;br /&gt;
|[[File:26tinymce2.png|250px|thumb|Expanded view]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Toolbar buttons==&lt;br /&gt;
For those who are not familiar with the tool bar, here are the buttons as grouped in their rows. Remember that the site administrator can edit or provide additional buttons.&lt;br /&gt;
&lt;br /&gt;
Row 1&lt;br /&gt;
{|&lt;br /&gt;
|[[File:26tinymcerow1.png|400px|thumb]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| 1:Expand&lt;br /&gt;
| 2.Formatting&lt;br /&gt;
| 3.Bold&lt;br /&gt;
| 4.Italic&lt;br /&gt;
|-&lt;br /&gt;
| 5.Bulleted list&lt;br /&gt;
| 6.Numbered list&lt;br /&gt;
| 7.Add link&lt;br /&gt;
| 8.Unlink &lt;br /&gt;
|-&lt;br /&gt;
| 9.Stop auto linking&lt;br /&gt;
| 10.Add image&lt;br /&gt;
| 11.Add emoticon&lt;br /&gt;
| 12.Add media&lt;br /&gt;
|-&lt;br /&gt;
| 13.Manage embedded files&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|  &lt;br /&gt;
|}&lt;br /&gt;
Row 2&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|[[File:26tinymcerow2.png|400px|thumb]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| 1:Undo&lt;br /&gt;
| 2.Redo&lt;br /&gt;
| 3.Underline&lt;br /&gt;
| 4.Strikethrough&lt;br /&gt;
|-&lt;br /&gt;
| 5.Subscript&lt;br /&gt;
| 6.Superscript&lt;br /&gt;
| 7.Align left&lt;br /&gt;
| 8.Align centre &lt;br /&gt;
|-&lt;br /&gt;
| 9.Align right&lt;br /&gt;
| 10.Decrease indent&lt;br /&gt;
| 11.Increase indent&lt;br /&gt;
| 12.Text colour&lt;br /&gt;
|-&lt;br /&gt;
| 13.Background colour&lt;br /&gt;
| 14.Left to Right&lt;br /&gt;
| 15.Right to Left&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
Row 3&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|[[File:26tinymcerow3.png|400px|thumb]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| 1:Font family&lt;br /&gt;
| 2.Font size&lt;br /&gt;
| 3.Edit HTML&lt;br /&gt;
| 4.Find&lt;br /&gt;
|-&lt;br /&gt;
| 5.Find/replace&lt;br /&gt;
| 6.Insert non-breaking space&lt;br /&gt;
| 7.Insert special character&lt;br /&gt;
| 8.Insert table&lt;br /&gt;
|-&lt;br /&gt;
| 9.Clean up messy code&lt;br /&gt;
| 10.Remove formatting&lt;br /&gt;
| 11.Paste as plain text&lt;br /&gt;
| 12.Paste from MS Word&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 13.Toggle full screen&lt;br /&gt;
|-&lt;br /&gt;
 &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Colour pickers===&lt;br /&gt;
*[[Image:26colourpickers.png]]&lt;br /&gt;
There are four levels of selecting a font or background colour, &lt;br /&gt;
*A quick pick 5x8 matrix of colours&lt;br /&gt;
*&amp;quot;More colours&amp;quot; that links to Picker, Pallet and Named tabs&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:HTML_editor_color_selector_basic_1.png|A quick pick 5x8 matrix of colors&lt;br /&gt;
Image:HTML_editor_color_selector_more_picker_1.png|A rainbow color picker tab&lt;br /&gt;
Image:HTML_editor_color_selector_more_pallet_1.png|A Pallet tab with a 18x12 matrix of colors&lt;br /&gt;
Image:HTML_editor_color_selector_more_named_1.png|A Named tab with custom pallets&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Insert table====&lt;br /&gt;
&amp;lt;gallery widths=&amp;quot;300px&amp;quot;&amp;gt;&lt;br /&gt;
Image:HTMLeditor_Insert_Table_general_1.png|General tab&lt;br /&gt;
Image:HTMLeditor_Insert_Table_advanced_1.png|Advanced tab&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;To add borders to a table&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Cell borders are crucial for helping readers to follow the rows across the screen. If they aren’t showing already you can add them as follows:&lt;br /&gt;
&lt;br /&gt;
#In the Wiki page containing your table, click its Edit tab&lt;br /&gt;
#Carefully select all the cells of the table&lt;br /&gt;
#Then right click (Macs: Command+click or Ctrl+Click) over any part of your selection to get a context menu; from it select Cell &amp;gt; Table Cell Properties; the cell properties dialog box then loads.&lt;br /&gt;
#Click on its Advanced tab, set Border Color to black (for instance), then click Apply, and then click Update.&lt;br /&gt;
#Click Save; the Wiki page containing your table will then load displaying its borders.&lt;br /&gt;
&lt;br /&gt;
===TinyMCE editor settings===&lt;br /&gt;
&lt;br /&gt;
The TinyMCE  HTML editor has its own settings page &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Plugins &amp;gt; Text editors &amp;gt; TinyMCE HTML editor &amp;gt; General settings&#039;&#039; with the following options:&lt;br /&gt;
&lt;br /&gt;
====Plugins====&lt;br /&gt;
*Buttons for equations, emoticons,images, media, automatic linking, and  legacy spell-checking may be enabled, disabled or uninstall here by clicking on their eye.&lt;br /&gt;
*Additionally the equation, emoticon and spell check buttons have links to their Settings screens.&lt;br /&gt;
&lt;br /&gt;
[[File:26tinymceplugins.png |thumb|none|upright=2.0|alt=&amp;quot;The TinyMCE editor plugins screen&amp;quot; | The TinyMCE editor plugins screen]]&lt;br /&gt;
&lt;br /&gt;
=====Manage embedded files=====&lt;br /&gt;
&lt;br /&gt;
This plugin allows users to add, delete or override files embedded in the current text area, for example in a label or topic summary. (It complements the [[Embedded files repository]])&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|[[File:26embeddedfiles1.png|thumb|The Manage files button]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:26embeddefiles2.png|thumb|Managing embedded files from within TinyMCE]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=====Insert equation=====&lt;br /&gt;
&lt;br /&gt;
Accessed from &#039;&#039;Administration&amp;gt;Site administration &amp;gt; Plugins &amp;gt; Text editors &amp;gt; TinyMCE HTML editor &amp;gt; Edit equation&#039;&#039;, this allows you to enable or disable the  TeX filter in the editor context and thereby display the Dragmath button. If you have a global custom TeX filter, then disable this setting.&lt;br /&gt;
&lt;br /&gt;
=====Insert emoticon=====&lt;br /&gt;
Accessed from &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Plugins &amp;gt; Text editors &amp;gt; TinyMCE HTML editor &amp;gt; Insert emoticon&#039;&#039;, this allows you to enable or disable the emoticon filter in the editor context and thereby display the emoticon button.&lt;br /&gt;
&lt;br /&gt;
===== Legacy spell checker=====&lt;br /&gt;
The legacy spell checker is visible in IE9 and lower only, but not in other browsers. If you want to disable it and and rely on browser spell checker functionality instead, you can do this by disabling the &#039;&#039;legacy spellchecker&#039;&#039; plugin by clicking its eye in &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Plugins &amp;gt; Text editors &amp;gt; TinyMCE HTML editor &amp;gt; General settings&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To spell-check via your browser, type your word (which if incorrectly spelt will have red lines under it) and press right click + CTRL&lt;br /&gt;
{|&lt;br /&gt;
|[[File:Browserspellcheck.png|thumb|Right-click+CTRL for browser spellcheck]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039;&lt;br /&gt;
While the default spell engine is Google spell which  can be changed in &#039;&#039;Administration&amp;gt;Site administration&amp;gt;Plugins&amp;gt;Text editors&amp;gt;TinyMCE HTML editor&#039;&#039;, this is no longer supported by Google and will not work. (Note that it is only visible in IE9 and lower) It is due to  be removed. See MDL-38867. In browser spell check is recommended.&lt;br /&gt;
&lt;br /&gt;
If PSpell is selected then aspell 0.50 or later must be installed on your server and the path to aspell set in Administration &amp;gt; Site administration &amp;gt; Server &amp;gt; System Paths.&lt;br /&gt;
&lt;br /&gt;
You can select a different spell engine from &#039;&#039;Administration&amp;gt; Site administration &amp;gt; Plugins &amp;gt; Text editors &amp;gt; TinyMCE HTML editor&amp;gt;Check spelling&#039;&#039;.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|[[File:Spellengine.png|thumb|Choosing a different spell engine]]&lt;br /&gt;
|}&lt;br /&gt;
According to: http://php.net/manual/en/book.pspell.php&lt;br /&gt;
&lt;br /&gt;
&amp;quot;As of php 5.3. Pspell is no longer supported/bundled. Instead you can use the enchant which is bundled by default in 5.3.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If PSpell is selected then aspell 0.50 or later must be installed on your server and the path to aspell set in Administration &amp;gt; Site administration &amp;gt; Server &amp;gt; System Paths.&lt;br /&gt;
&lt;br /&gt;
===Customising the editor toolbar===&lt;br /&gt;
&lt;br /&gt;
An administrator can remove or add buttons to the TinyMCE editor toolbar by altering the Editor toolbar box in &#039;&#039; Administration &amp;gt; Site administration &amp;gt; Plugins &amp;gt; Text editors &amp;gt; TinyMCE HTML editor &amp;gt; General settings&#039;&#039; as demonstrated in the screencast [http://youtu.be/vTW1DImro9c Customise the text editor in 2.4].&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| [[File:editortoolbar.png|thumb|The Editor toolbar box]]&lt;br /&gt;
|[[File:horizontalrule.png|thumb|Example of  toolbar with added horizontal rule button]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Available fonts list====&lt;br /&gt;
&lt;br /&gt;
In addition to the default fonts, a site administrator can add extra fonts by typing their name and string in the box in &#039;&#039;Administration &amp;gt; Site administration &amp;gt; Plugins &amp;gt; Text editors &amp;gt; TinyMCE HTML editor &amp;gt; General settings&#039;&#039; as demonstrated in the screencast [http://youtu.be/udP7Bnur30Y How to add extra fonts].&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|[[File:comicsans.png|thumb|Example of custom font]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Custom configuration====&lt;br /&gt;
&lt;br /&gt;
A setting in  &#039;&#039;Administration&amp;gt;Site administration&amp;gt;Plugins&amp;gt;Text editors&amp;gt;TinyMCE HTML editor&amp;gt;General settings&#039;&#039; provides  a box in which an administrator can apply custom formats. See MDL-37186 for more details with examples,  and see also the [http://www.tinymce.com/wiki.php/Configuration:formats TinyMCE configuration page]&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|[[File:bottomtoolbar.png|thumb| Example 1:Toolbar at the bottom]]&lt;br /&gt;
|[[File:customstyles.png|thumb| Example 2: Custom styles]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
*Example: Moving the toolbar to the bottom:&lt;br /&gt;
&lt;br /&gt;
Add the following:&lt;br /&gt;
 {&amp;quot;theme_advanced_toolbar_location&amp;quot; : &amp;quot;bottom&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
*Example: Adding your own custom styles.&lt;br /&gt;
(This might be useful for example if you want a &amp;quot;house style&amp;quot; for important notes, key points or similar)&lt;br /&gt;
In the editor toolbar, enter &amp;quot;styleselect&amp;quot; and then in the custom box add the following code, changing it to suit your purposes:&lt;br /&gt;
 {&amp;quot;style_formats&amp;quot; : [&lt;br /&gt;
  {&amp;quot;title&amp;quot; : &amp;quot;Bold text&amp;quot;, &amp;quot;inline&amp;quot; : &amp;quot;b&amp;quot;},&lt;br /&gt;
  {&amp;quot;title&amp;quot; : &amp;quot;Red text&amp;quot;, &amp;quot;inline&amp;quot; : &amp;quot;span&amp;quot;, &amp;quot;styles&amp;quot; : {&amp;quot;color&amp;quot; : &amp;quot;#ff0000&amp;quot;}},&lt;br /&gt;
  {&amp;quot;title&amp;quot; : &amp;quot;Red header&amp;quot;, &amp;quot;block&amp;quot; : &amp;quot;h1&amp;quot;, &amp;quot;styles&amp;quot; : {&amp;quot;color&amp;quot; : &amp;quot;#ff0000&amp;quot;}} ]}&lt;br /&gt;
&lt;br /&gt;
The following will let you use bootstrap CSS classes if you use a bootstrap based theme:&lt;br /&gt;
&lt;br /&gt;
    {&amp;quot;style_formats&amp;quot; : [&lt;br /&gt;
        {&amp;quot;title&amp;quot; : &amp;quot;Well&amp;quot;, &amp;quot;block&amp;quot; : &amp;quot;div&amp;quot;, &amp;quot;classes&amp;quot; : &amp;quot;well&amp;quot;},&lt;br /&gt;
        {&amp;quot;title&amp;quot; : &amp;quot;Label&amp;quot;, &amp;quot;inline&amp;quot; : &amp;quot;span&amp;quot;, &amp;quot;classes&amp;quot; : &amp;quot;label&amp;quot;},&lt;br /&gt;
        {&amp;quot;title&amp;quot; : &amp;quot;Label - success&amp;quot;, &amp;quot;inline&amp;quot; : &amp;quot;span&amp;quot;, &amp;quot;classes&amp;quot; : &amp;quot;label label-success&amp;quot;},&lt;br /&gt;
        {&amp;quot;title&amp;quot; : &amp;quot;Label - warning&amp;quot;, &amp;quot;inline&amp;quot; : &amp;quot;span&amp;quot;, &amp;quot;classes&amp;quot; : &amp;quot;label label-warning&amp;quot;},&lt;br /&gt;
        {&amp;quot;title&amp;quot; : &amp;quot;Label - important&amp;quot;, &amp;quot;inline&amp;quot; : &amp;quot;span&amp;quot;, &amp;quot;classes&amp;quot; : &amp;quot;label label-important&amp;quot;},&lt;br /&gt;
        {&amp;quot;title&amp;quot; : &amp;quot;Label - info&amp;quot;, &amp;quot;inline&amp;quot; : &amp;quot;span&amp;quot;, &amp;quot;classes&amp;quot; : &amp;quot;label label-info&amp;quot;},&lt;br /&gt;
        {&amp;quot;title&amp;quot; : &amp;quot;Label - inverse&amp;quot;, &amp;quot;inline&amp;quot; : &amp;quot;span&amp;quot;, &amp;quot;classes&amp;quot; : &amp;quot;label label-inverse&amp;quot;},&lt;br /&gt;
        {&amp;quot;title&amp;quot; : &amp;quot;Button&amp;quot;, &amp;quot;inline&amp;quot; : &amp;quot;a&amp;quot;, &amp;quot;classes&amp;quot; : &amp;quot;btn btn&amp;quot;},&lt;br /&gt;
        {&amp;quot;title&amp;quot; : &amp;quot;Button - primary&amp;quot;, &amp;quot;inline&amp;quot; : &amp;quot;a&amp;quot;, &amp;quot;classes&amp;quot; : &amp;quot;btn btn-primary&amp;quot;},&lt;br /&gt;
        {&amp;quot;title&amp;quot; : &amp;quot;Button - info&amp;quot;, &amp;quot;inline&amp;quot; : &amp;quot;a&amp;quot;, &amp;quot;classes&amp;quot; : &amp;quot;btn btn-info&amp;quot;},&lt;br /&gt;
        {&amp;quot;title&amp;quot; : &amp;quot;Button - success&amp;quot;, &amp;quot;inline&amp;quot; : &amp;quot;a&amp;quot;, &amp;quot;classes&amp;quot; : &amp;quot;btn btn-success&amp;quot;},&lt;br /&gt;
        {&amp;quot;title&amp;quot; : &amp;quot;Button - warning&amp;quot;, &amp;quot;inline&amp;quot; : &amp;quot;a&amp;quot;, &amp;quot;classes&amp;quot; : &amp;quot;btn btn-warning&amp;quot;},&lt;br /&gt;
        {&amp;quot;title&amp;quot; : &amp;quot;Button - danger&amp;quot;, &amp;quot;inline&amp;quot; : &amp;quot;a&amp;quot;, &amp;quot;classes&amp;quot; : &amp;quot;btn btn-danger&amp;quot;},&lt;br /&gt;
        {&amp;quot;title&amp;quot; : &amp;quot;Button - inverse&amp;quot;, &amp;quot;inline&amp;quot; : &amp;quot;a&amp;quot;, &amp;quot;classes&amp;quot; : &amp;quot;btn btn-inverse&amp;quot;}&lt;br /&gt;
    ]}&lt;br /&gt;
&lt;br /&gt;
*Example: Enabling copy of rich content with styles from MS Word (tm) and paste into TineMCE without removing important styles:&lt;br /&gt;
&lt;br /&gt;
 {&amp;quot;paste_retain_style_properties&amp;quot; : &amp;quot;margin, padding, width, height, font-size, &lt;br /&gt;
   font-weight, font-family, color, text-align, ul, ol, li, &lt;br /&gt;
   text-decoration, border, background, float, display&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
==Speed of TinyMCE in Firefox and Chrome==&lt;br /&gt;
Some users have complained about the unreasonably slow loading of TinyMCE; for example, https://moodle.org/mod/forum/discuss.php?d=232089 and https://moodle.org/mod/forum/discuss.php?d=223125. [https://moodle.org/mod/forum/discuss.php?d=262235 Apparently,] TinyMCE takes longer to load in Firefox (10-20 seconds) than in Chrome (a couple of seconds).&lt;br /&gt;
&lt;br /&gt;
To speed up TinyMCE you can try disabling ALL the plugins in the TinyMCE editor settings from your admin account: &amp;lt;moodle site address&amp;gt;/admin/settings.php?section=editorsettingstinymce .  Then the editor loaded quickly. This has taken out a couple of minor functions, such as inserting emoticons, but loading speed is far more important for some users  than the ability to insert emoticons.&lt;br /&gt;
&lt;br /&gt;
===Screencasts===&lt;br /&gt;
[http://www.youtube.com/watch?v=1m2xkm2EyXA&amp;amp;feature=share&amp;amp;list=SPxcO_MFWQBDe8RRnGjoUDqbcm9PSlIoWn&amp;amp;index=4 TinyMCE text editor improvements.]&lt;br /&gt;
&lt;br /&gt;
==TinyMCE additional plugins==&lt;br /&gt;
In Moodle 2.4 and later, the TinyMCE editor can be extended and replaced by new plugins available in the [https://moodle.org/plugins/browse.php?list=category&amp;amp;id=45 Moodle plugins database]. Some of these plugins are:&lt;br /&gt;
&lt;br /&gt;
* [[Cloze editor for TinyMCE]] for easily adding [[Embedded Answers (Cloze) question type]].&lt;br /&gt;
* [https://moodle.org/plugins/view.php?plugin=tinymce_wordcount Word count] prints a word count in the bottom right-hand corner of your TinyMCE editor which updates as you type.&lt;br /&gt;
* [[TinyMCE Mathslate]] is a [[Mathematics]] editor that does not depend on Java.&lt;br /&gt;
* [https://moodle.org/plugins/view.php?plugin=tinymce_youtube YouTube Anywhere] enables direct recording and uploading into YouTube from the TinyMCE HTML editor.&lt;br /&gt;
&lt;br /&gt;
[[es:Editor TinyMCE]]&lt;br /&gt;
[[de:TinyMCE-Editor]]&lt;br /&gt;
[[fr:Éditeur TinyMCE]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Editing_Questionnaire_questions&amp;diff=140814</id>
		<title>Editing Questionnaire questions</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Editing_Questionnaire_questions&amp;diff=140814"/>
		<updated>2021-07-14T13:24:07Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Text replacement - &amp;quot;class=&amp;quot;nicetable&amp;quot;&amp;quot; to &amp;quot;class=&amp;quot;wikitable&amp;quot;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Questionnaire}}&lt;br /&gt;
&lt;br /&gt;
==Editing questions==&lt;br /&gt;
* On the Questionnaire &#039;&#039;&#039;Editing Questions&#039;&#039;&#039; page is displayed a drop-down list of the question types available and a list of the questions already created for the current questionnaire instance (if any).&lt;br /&gt;
* Using the standard Moodle icons you can change the order of the questions in the questionnaire, edit or delete questions.&lt;br /&gt;
&lt;br /&gt;
==Common options==&lt;br /&gt;
===Question Name===&lt;br /&gt;
&lt;br /&gt;
====Questionnaires &#039;&#039;&#039;not&#039;&#039;&#039; using the Conditional Branching or the Personality Test features====&lt;br /&gt;
&lt;br /&gt;
You can &#039;&#039;optionally&#039;&#039; enter a &#039;&#039;&#039;Question Name&#039;&#039;&#039; for each question.&lt;br /&gt;
&lt;br /&gt;
If your questionnaire does not use the &amp;quot;Conditional Branching&amp;quot; or the &amp;quot;Personality Test&amp;quot; feature, the &#039;&#039;&#039;Question Name&#039;&#039;&#039; is only used when you export responses to CSV/Excel format. If you never export to CSV, then you needn&#039;t worry about Question names. If you plan to regularly export your questionnaire data to CSV, then you have a choice of two options for question naming.&lt;br /&gt;
&lt;br /&gt;
=====Option 1: significant names=====&lt;br /&gt;
&lt;br /&gt;
In the &#039;&#039;&#039;Question Name &#039;&#039;&#039; box, enter &#039;&#039;meaningful&#039;&#039;, &#039;&#039;short&#039;&#039; and &#039;&#039;&#039;&#039;&#039;different&#039;&#039;&#039;&#039;&#039; question names for all of the questions within one questionnaire. In the CSV export file, all those question names will be prefixed with the question&#039;s actual number (= position) in the quiz. Examples:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | question number (position) in the questionnaire&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | question name entered by teacher&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | field header in csv export&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center&amp;quot;&amp;gt;5&amp;lt;/div&amp;gt;&lt;br /&gt;
| favorite colors&lt;br /&gt;
| Q05_favorite colors&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center&amp;quot;&amp;gt;6&amp;lt;/div&amp;gt;&lt;br /&gt;
| why_use_Moodle&lt;br /&gt;
| Q06_why_use_moodle&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center&amp;quot;&amp;gt;7&amp;lt;/div&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
user-friendliness&lt;br /&gt;
&lt;br /&gt;
&#039;&#039; (rate question with 3 possible answers: Moodle, WebCT and Blackboard) &#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
Q07_user-friendliness-&amp;gt;Moodle&amp;lt;br /&amp;gt; Q07_user-friendliness-&amp;gt;WebCT&amp;lt;br /&amp;gt; Q07_user-friendliness-&amp;gt;Blackboard&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=====Option 2: leave the Question Name boxes blank=====&lt;br /&gt;
&lt;br /&gt;
For each un-named question, CSV export will automatically generate a question name. This is required for table header fields in the CSV and subsequent Excel tables or any statistics package you might be using. The question name generated will be based on the question number in the actual Quiz (excluding &#039;&#039;Section Text&#039;&#039; pseudo-questions, of course) e.g. Q01, Q02, ... Q99. For questions with multiple answers, such as rate-type or Likert type questions, a sub-question number will be generated (Q02_1, Q02_2, Q02_3, etc.). This type of &amp;quot;short-name&amp;quot; naming scheme is advisable for exporting your data to a statistics software. Of course, it&#039;s up to you to have your own system for remembering which abbreviated question name corresponds to which question in your questionnaire!&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! style=&amp;quot;width: 33%&amp;quot; scope=&amp;quot;col&amp;quot; | question number (position) in the questionnaire&lt;br /&gt;
! style=&amp;quot;width: 33%&amp;quot; scope=&amp;quot;col&amp;quot; | question name entered by teacher&lt;br /&gt;
! style=&amp;quot;width: 33%&amp;quot; scope=&amp;quot;col&amp;quot; | field header in csv export&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center&amp;quot;&amp;gt;5&amp;lt;/div&amp;gt;&lt;br /&gt;
| style=&amp;quot;background-color: #CCCCCC&amp;quot; |&lt;br /&gt;
| Q05&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center&amp;quot;&amp;gt;6&amp;lt;/div&amp;gt;&lt;br /&gt;
| style=&amp;quot;background-color: #CCCCCC&amp;quot; |&lt;br /&gt;
| Q06&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center&amp;quot;&amp;gt;7&amp;lt;/div&amp;gt;&lt;br /&gt;
| style=&amp;quot;background-color: #CCCCCC&amp;quot; |&lt;br /&gt;
|&lt;br /&gt;
Q07_1&amp;lt;br /&amp;gt; Q07_2&amp;lt;br /&amp;gt; Q07_3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
It is quite possible (but maybe not advisable) to mix the two systems, and have within one questionnaire both named and un-named questions.&lt;br /&gt;
&lt;br /&gt;
====Questionnaires using the Conditional Branching feature====&lt;br /&gt;
&lt;br /&gt;
If you need a question to be used as the &amp;quot;parent&amp;quot; of one or more subsequent questions in your questionnaire, then you &#039;&#039;&#039;must&#039;&#039;&#039; name that &amp;quot;parent question&amp;quot;. Only those (radio buttons, dropdown list or yes/no) questions with a &#039;&#039;name&#039;&#039; will appear in the Parent question dropdown list when adding a new question, as shown on the following screenshots.&lt;br /&gt;
&lt;br /&gt;
[[Image:05-08-2013 15-26-11.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[Image:05-08-2013 15-34-55.jpg]]&lt;br /&gt;
&lt;br /&gt;
For more information, see [[Questionnaire_Conditional_branching|Conditional branching]].&lt;br /&gt;
&lt;br /&gt;
===Response Required===&lt;br /&gt;
If you select &#039;&#039;&#039;&#039;&#039;Yes&#039;&#039;&#039;&#039;&#039;, response to this question will be required, i.e. the respondent will not be able to submit the questionnaire until this question has been answered. If the respondent tries to submit a questionnaire with unanswered required questions (or, in the case of a questionnaire with more than one section, to go to the next page), a warning message will be displayed with a list of all the missing &#039;&#039;required &#039;&#039;questions in the questionnaire (or on the actual page).&lt;br /&gt;
&lt;br /&gt;
Default.- &#039;&#039;&#039;&#039;&#039;No&#039;&#039;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;.- When you create new questions in sequence (one after the other), this parameter is carried over to subsequent questions. E.g. if you create question #1 with &#039;&#039;&#039;Response Required&#039;&#039;&#039; = &#039;&#039;&#039;&#039;&#039;Yes&#039;&#039;&#039;&#039;&#039;, then the &#039;&#039;&#039;Response Required&#039;&#039;&#039; parameter will be pre-set to &#039;&#039;&#039;&#039;&#039;Yes&#039;&#039;&#039;&#039;&#039; for question #2, etc. You can of course change this parameter at any time.&lt;br /&gt;
&lt;br /&gt;
In the &#039;&#039;Manage Questions&#039;&#039; section of the Questions editing page, once a question has been created, you can use the green and red dots to switch its Required state, as a shortcut alternative of editing the question.&lt;br /&gt;
&lt;br /&gt;
[[Image:05-08-2013 15-49-48.jpg|300px]]&lt;br /&gt;
&lt;br /&gt;
===Parent Question===&lt;br /&gt;
&lt;br /&gt;
See [[Questionnaire_Conditional_branching|Conditional branching]]&lt;br /&gt;
&lt;br /&gt;
===Question Text===&lt;br /&gt;
Enter your question text in this box. The HTML editor is available, which means that you can display not only formatted text but also images or other media in a questionnaire&#039;s questions text.&lt;br /&gt;
&lt;br /&gt;
==Question Types==&lt;br /&gt;
&lt;br /&gt;
Select the type of question from the drop-down list and click on the &#039;&#039;&#039;Add selected question type&#039;&#039;&#039; button.&lt;br /&gt;
&lt;br /&gt;
===---Page Break---===&lt;br /&gt;
&lt;br /&gt;
Use this to insert page breaks in longish questionnaires. Note that if a page contains questions with required response the respondent will not be allowed to navigate to the next page unless those required responses have been given.&lt;br /&gt;
&lt;br /&gt;
If your questionnaire uses the Conditional branching feature, then page breaks will be &#039;&#039;automatically&#039;&#039; inserted when you add &amp;quot;parent&amp;quot; or &amp;quot;child&amp;quot; questions. Page breaks which are needed to ensure a correct &amp;quot;Conditional branching&amp;quot; flow cannot be moved or deleted. Their Move and Delete icons are disabled.&lt;br /&gt;
&lt;br /&gt;
[[Image:05-08-2013 15-58-09.jpg|300px]]&lt;br /&gt;
&lt;br /&gt;
===Check Boxes===&lt;br /&gt;
Check boxes allow the user to select multiple answers from a list of options.&lt;br /&gt;
&lt;br /&gt;
==== Question editing interface ====&lt;br /&gt;
&lt;br /&gt;
[[Image:05-08-2013 14-58-42.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
==== Options ====&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width: 100%&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
! style=&amp;quot;width: 50%&amp;quot; scope=&amp;quot;col&amp;quot; | Editing Mode&lt;br /&gt;
! style=&amp;quot;width: 50%&amp;quot; scope=&amp;quot;col&amp;quot; | Questionnaire View&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
{| style=&amp;quot;width: 300&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; valign=&amp;quot;top&amp;quot; | Question text: What are your favorite hobbies?&lt;br /&gt;
&lt;br /&gt;
Possible answers:&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border: #666666 thin solid&amp;quot; |&lt;br /&gt;
Watching TV&amp;lt;br /&amp;gt; Dancing &amp;lt;br /&amp;gt; Computing&amp;lt;br /&amp;gt; !other=Another hobby:&lt;br /&gt;
|}&lt;br /&gt;
|&lt;br /&gt;
[[Image:05-08-2013 13-29-49.jpg]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You may enter &amp;lt;tt&amp;gt;“!other”&amp;lt;/tt&amp;gt; on a line to create an &#039;&#039;&#039;&#039;&#039;optional&#039;&#039;&#039;&#039;&#039; &#039;&#039;fill in the blank&#039;&#039; option. An&amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;!other&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt; box defaults to using the prompt &#039;&#039;Other: &#039;&#039;, (or the equivalent translation for &#039;&#039;Other&#039;&#039; in the current language being used). You may change this default prompt by using the format: &amp;lt;tt&amp;gt;“!other=&#039;&#039;prompt text”&#039;&#039;&amp;lt;/tt&amp;gt; as shown in the example above.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes.-&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# At the moment the length of the &#039;&#039;fill in the blank&#039;&#039; input text box is set to 25 characters and is not customizable through the online interface.&lt;br /&gt;
# You may provide more than one &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;!other&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt; &#039;&#039;fill in the blank&#039;&#039; option for a Check Boxes question, but this might cause problems so it is &#039;&#039;not recommended&#039;&#039;.&lt;br /&gt;
# When a respondent answers a&#039;&#039;&#039; Check Boxes&#039;&#039;&#039; question which has been created as &#039;&#039;&#039;Required&#039;&#039;&#039;, and the &#039;&#039;&#039;Min. forced responses &#039;&#039;&#039;and&#039;&#039;&#039; Max. forced responses&#039;&#039;&#039; parameters have been used, then a warning message will be displayed if respondent does not check the required number of boxes. &lt;br /&gt;
# Note that, if the &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;!other&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt; &#039;&#039;fill in the blank&#039;&#039; option has been created, then if it is checked by the respondent, it will count in the total of minimum/maximum required check boxes.&lt;br /&gt;
# If a respondent checks a &#039;&#039;fill in the blank&#039;&#039; option &#039;&#039;&#039;check box&#039;&#039;&#039; and leaves the text field empty, &#039;&#039;that box will be unchecked&#039;&#039; (upon navigating to the next page or upon submitting the questionnaire).&lt;br /&gt;
# If a respondent has cheked &#039;&#039;a fill in the blank&#039;&#039; option &#039;&#039;&#039;check box&#039;&#039;&#039; and has filled in the text field, and later on changes his mind and unckecks that box, the &#039;&#039;fill in the blank&#039;&#039; text field will be automatically emptied (cool, ain&#039;t it?).&lt;br /&gt;
&lt;br /&gt;
===Date===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Use the day/month/year format, e.g. for March 14th, 1945: &#039;&#039;&#039;14/3/1945&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use this question type if you expect the response to be a correctly formatted date. The format will depend upon the language currently being used by the questionnaire respondent. For example 4/21/2007 (US); 21/4/2007 (UK); 21-4-2007 (France); etc. An example will be displayed in the questionnaire. If an &amp;quot;impossible&amp;quot; or wrongly formatted date is entered, it will either be re-written or reformatted correctly (if possible) or an error message will be displayed to the respondent. In order for dates to be correctly exported to spreadsheets such as Excel, respondent must enter &#039;&#039;a date in the 1902 to 2037 range&#039;&#039;. If a date outside this range is expected from respondents, then use the &#039;&#039;&#039;Text Box&#039;&#039;&#039; question type instead. The date question type will accept dates consisting only of a month plus a year (e.g. 12/2008 for december 2008) or only a year (e.g. 2008). However, for spreadsheet processing compatibility, such incomplete dates will be automatically transformed to complete dd/mm/yy dates, e.g. 12/2008 -&amp;gt; &#039;&#039;&#039;01/&#039;&#039;&#039;12/2008 and 2008 -&amp;gt; &#039;&#039;&#039;01/01/&#039;&#039;&#039;2008. You may have to explain this pecularity to your questionnaire users beforehand.&lt;br /&gt;
&lt;br /&gt;
===Dropdown Box===&lt;br /&gt;
&lt;br /&gt;
There is no real advantage to using the &#039;&#039;&#039;Dropdown Box&#039;&#039;&#039; over using the &#039;&#039;&#039;Radio Buttons&#039;&#039;&#039; except perhaps for longish lists of options, to save screen space.&lt;br /&gt;
&lt;br /&gt;
===Essay Box===&lt;br /&gt;
====Question editing interface====&lt;br /&gt;
[[Image:2014-01-24_15-37-29.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
====Settings====&lt;br /&gt;
This question will display a plain text box with &#039;&#039;&#039;x&#039;&#039;&#039; &#039;&#039;Textarea columns&#039;&#039; (or area &#039;&#039;width&#039;&#039;) and &#039;&#039;&#039;y&#039;&#039;&#039; &#039;&#039;Textarea rows&#039;&#039; (number of text &#039;&#039;lines&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
If you leave both x and y to their default &#039;&#039;&#039;0&#039;&#039;&#039; value (or if you set it to &#039;&#039;&#039;0&#039;&#039;&#039;), then moodle&#039;s &#039;&#039;&#039;HTML editor&#039;&#039;&#039; will be displayed with standard height and width (if available in the course/user context &amp;amp; user profile).&lt;br /&gt;
&lt;br /&gt;
===Label===&lt;br /&gt;
&lt;br /&gt;
This is not a question but a (short) text which will be displayed to introduce a series of questions.&lt;br /&gt;
&lt;br /&gt;
===Numeric===&lt;br /&gt;
&lt;br /&gt;
Use this question type if you expect the response to be a correctly formatted number. By using the &#039;&#039;&#039;Max. digits allowed &#039;&#039;&#039;and &#039;&#039;&#039;Nb of decimal digits &#039;&#039;&#039;parameters you can specify the length and number of decimal places required. Use &#039;&#039;&#039;Max. digits allowed&#039;&#039;&#039; to set a limit to the number of characters entered for a Numeric question. Note that the decimal point also counts as one character! Use &#039;&#039;&#039;Nb of decimal digits&#039;&#039;&#039; to specify the format of the Average value counted and displayed at the Questionnaire Report page.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! &lt;br /&gt;
! Max. digits allowed&lt;br /&gt;
! Nb of decimal digits&lt;br /&gt;
! Response entered&lt;br /&gt;
! Average displayed&lt;br /&gt;
|-&lt;br /&gt;
| Example 1&lt;br /&gt;
| 6&lt;br /&gt;
| 2&lt;br /&gt;
| 12&lt;br /&gt;
| 12.00&lt;br /&gt;
|-&lt;br /&gt;
| Example 2&lt;br /&gt;
| 6&lt;br /&gt;
| 2&lt;br /&gt;
| 12.569&lt;br /&gt;
| 12.57&lt;br /&gt;
|-&lt;br /&gt;
| Example 3&lt;br /&gt;
| 8&lt;br /&gt;
| 1&lt;br /&gt;
| 12.57898&lt;br /&gt;
| 12.6&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Radio Buttons ===&lt;br /&gt;
====Question editing interface====&lt;br /&gt;
[[Image:05-08-2013 15-03-17.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
====Radio buttons Alignment====&lt;br /&gt;
[[Image:05-08-2013 13-35-04.jpg]]&lt;br /&gt;
&lt;br /&gt;
====Possible answers====&lt;br /&gt;
You must fill in one answer per line in the &#039;&#039;&#039;Possible answers&#039;&#039;&#039; box.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
! style=&amp;quot;width: 250&amp;quot; scope=&amp;quot;col&amp;quot; valign=&amp;quot;top&amp;quot; | Editing Mode&lt;br /&gt;
! style=&amp;quot;width: 243&amp;quot; scope=&amp;quot;col&amp;quot; valign=&amp;quot;top&amp;quot; | Questionnaire View&lt;br /&gt;
! style=&amp;quot;width: 434&amp;quot; scope=&amp;quot;col&amp;quot; valign=&amp;quot;top&amp;quot; | (optional horizontal display)&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
&#039;&#039; 1.Possible answers&#039;&#039;&amp;lt;nowiki&amp;gt;: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Red&amp;lt;br /&amp;gt; Blue&amp;lt;br /&amp;gt; Black&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
&#039;&#039;&#039; What is your favorite color? &#039;&#039;&#039;&amp;lt;br /&amp;gt; Red&amp;lt;br /&amp;gt; Blue&amp;lt;br /&amp;gt; Black&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
&#039;&#039;&#039; What is your favorite color? &#039;&#039;&#039;&amp;lt;br /&amp;gt; Red  Blue  Black&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
&#039;&#039; 2.Possible answers&#039;&#039;&amp;lt;nowiki&amp;gt;: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Red&amp;lt;br /&amp;gt; Blue&amp;lt;br /&amp;gt; Black&amp;lt;br /&amp;gt; !other&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
&#039;&#039;&#039; What is your favorite color? &#039;&#039;&#039;&amp;lt;br /&amp;gt; Red&amp;lt;br /&amp;gt; Blue&amp;lt;br /&amp;gt; Black&amp;lt;br /&amp;gt; Other:&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
&#039;&#039;&#039; What is your favorite color? &#039;&#039;&#039;&amp;lt;br /&amp;gt; Red  Blue  Black &amp;lt;br /&amp;gt; Other:&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
&#039;&#039; 3.Possible answers:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Red&amp;lt;br /&amp;gt; Blue&amp;lt;br /&amp;gt; Black&amp;lt;br /&amp;gt; !other=Another color:&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
&#039;&#039;&#039; What is your favorite color? &#039;&#039;&#039;&amp;lt;br /&amp;gt; Red&amp;lt;br /&amp;gt; Blue&amp;lt;br /&amp;gt; Black&amp;lt;br /&amp;gt; Another color:&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
&#039;&#039;&#039; What is your favorite color? &#039;&#039;&#039;&amp;lt;br /&amp;gt; Red  Blue  Black &amp;lt;br /&amp;gt; Another color:&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | Questionnaire View&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &#039;&#039;&#039;&#039;&#039; Text data export &#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
&#039;&#039; 4.Possible answers: &#039;&#039;&lt;br /&gt;
&lt;br /&gt;
red::the color of blood &amp;lt;br /&amp;gt; blue::the color of the sky &amp;lt;br /&amp;gt; black::opposite of white&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
&#039;&#039;&#039; What is your favorite color? &#039;&#039;&#039;&amp;lt;br /&amp;gt; the color of blood&amp;lt;br /&amp;gt; the color of the sky&amp;lt;br /&amp;gt; opposite of white&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
&#039;&#039; The &amp;quot;values&amp;quot; red, blue and black will be exported to the columns instead of standard 1, 2 and 3 numbers.&amp;lt;br /&amp;gt; See [[Viewing_Questionnaire_responses#Download_in_text_format|Download in text format]]. &#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
&#039;&#039; 5.Possible answers:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
0=Never&amp;lt;br /&amp;gt; 1=Once a year&amp;lt;br /&amp;gt; 3=Once a month&amp;lt;br /&amp;gt; 5=Once a week&amp;lt;br /&amp;gt; 7=Once a day&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
&#039;&#039;&#039; How often do you practise a sport? &#039;&#039;&#039;Never &amp;lt;br /&amp;gt;Once a year&amp;lt;br /&amp;gt;Once a month&amp;lt;br /&amp;gt;Once a week&amp;lt;br /&amp;gt;Once a day&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You may enter &amp;lt;tt&amp;gt;“!other”&amp;lt;/tt&amp;gt; on a line to create an &#039;&#039;&#039;&#039;&#039;optional&#039;&#039;&#039;&#039;&#039; &#039;&#039;fill in the blank&#039;&#039; option. An &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;!other&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt; box defaults to using the prompt &#039;&#039;Other:&#039;&#039;, (or the equivalent translation for &#039;&#039;Other&#039;&#039; in the current language being used). You may change this default prompt by using the format: &amp;lt;tt&amp;gt;“!other=&#039;&#039;prompt text”&#039;&#039;&amp;lt;/tt&amp;gt; as shown in Example #3 above.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# At the moment the length of the &#039;&#039;fill in the blank&#039;&#039; input text box is set to 25 characters and is not customizable through the online interface.&lt;br /&gt;
# It does not make sense to provide more than one &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;!other&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt; &#039;&#039;fill in the blank&#039;&#039; option for a Radio Buttons question.&lt;br /&gt;
# If a respondent checks a &#039;&#039;fill in the blank&#039;&#039; option &#039;&#039;&#039;radio button&#039;&#039;&#039; and leaves the text field empty, &#039;&#039;a warning message will be displayed&#039;&#039; (upon navigating to the next page or upon submitting the questionnaire).&lt;br /&gt;
# If a respondent has checked a &#039;&#039;fill in the blank&#039;&#039; option &#039;&#039;&#039;radio button&#039;&#039;&#039; and has filled in the text field, and later on changes his mind and clicks a different radio button in the same question, the &#039;&#039;fill in the blank&#039;&#039; text field previously entered will be automatically emptied.&lt;br /&gt;
# Example #4 shows a possible &amp;quot;hidden&amp;quot; option, for exporting - in responses - named values as data instead of standard numbers. If you never export your data for studying it in stats packages you won&#039;t need this option.&lt;br /&gt;
# If you plan to use the &#039;&#039;&#039;&#039;&amp;quot;Personality Test&amp;quot;&#039;&#039;&#039;&#039; feature in your questionnaire, the number preceding each choice will be used to calculate the &amp;quot;score&amp;quot; of the section that includes this question. See https://docs.moodle.org/402/en/mod/questionnaire/personality_test#Questions&lt;br /&gt;
&lt;br /&gt;
=== Rate (scale 1..5) ===&lt;br /&gt;
==== Example: ====&lt;br /&gt;
The Rate question now features extra &amp;quot;not yet answered&amp;quot; radio buttons. This is especially useful in Rate questions with a long list of choices.&lt;br /&gt;
[[File:03-12-2013 15-23-57.jpg]]&lt;br /&gt;
&lt;br /&gt;
In case the respondent forgets to check some radio buttons, upon moving to next page or submitting, the error message will be completed with highlighting of the &amp;quot;not yet answered&amp;quot; radio buttons.&lt;br /&gt;
&lt;br /&gt;
[[File:03-12-2013 15-26-58.jpg]]&lt;br /&gt;
&lt;br /&gt;
==== Question editing interface: ====&lt;br /&gt;
&lt;br /&gt;
[[Image:05-08-2013 14-26-37.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
==== Number of scale items ====&lt;br /&gt;
&#039;&#039;&#039; Nb of scale items &#039;&#039;&#039;is the &#039;&#039;number of items&#039;&#039; to be used in your rate scale. You would normally use a value of 3 to 5. Default value: &#039;&#039;&#039;5&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Type of rate scale ====&lt;br /&gt;
* &#039;&#039;&#039; Normal &#039;&#039;&#039; (default value)&lt;br /&gt;
* &#039;&#039;&#039; N/A columns &#039;&#039;&#039; : Choose this if you want an &#039;&#039;&#039;N/A&#039;&#039;&#039; column to be added to the right of your Rate scale items columns.&lt;br /&gt;
* &#039;&#039;&#039; No duplicate choices&#039;&#039;&#039;&amp;lt;nowiki&amp;gt;: Choose this if you want &amp;lt;/nowiki&amp;gt;&#039;&#039;to prevent duplicate choices in each degree &#039;&#039;&#039;column&#039;&#039;&#039;&#039;&#039;.&lt;br /&gt;
** This is useful if you want the respondent to rank a number of items on a 1 to n scale and to force each rank to be unique. Example: order items A, B and C in order of preference will accept: &#039;&#039;A1, B3 and C2&#039;&#039; or &#039;&#039;A3, B2 and C1&#039;&#039;, but &#039;&#039;it will not be possible&#039;&#039; for the respondent to enter: &#039;&#039;A1, B1, C2&#039;&#039; or &#039;&#039;A1, B2, C2,&#039;&#039; etc.&lt;br /&gt;
** Used in conjunction with [[#anchor_one|named degrees]], this &#039;&#039;&#039;No duplicate choices&#039;&#039;&#039; option can also be useful if you want the respondent to match items with named degrees, e.g. the colors &#039;&#039;red, blue, yellow&#039;&#039; with a set of physiological responses: &#039;&#039;excitement, tranquillity, concentration&#039;&#039; where &#039;&#039;&#039;one&#039;&#039;&#039; color can only match &#039;&#039;&#039;one&#039;&#039;&#039; physiological response.&lt;br /&gt;
* &#039;&#039;&#039;Osgood&#039;&#039;&#039;&amp;lt;nowiki&amp;gt;: Choose this to create a question of the &amp;lt;/nowiki&amp;gt;[http://en.wikipedia.org/wiki/Semantic_differential Osgood&#039;s semantic differential] type. This parameter must be used in conjunction with [[#anchor_one|named degrees]].&lt;br /&gt;
&lt;br /&gt;
====Possible answers====&lt;br /&gt;
Examples.&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width: 100%&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
! style=&amp;quot;width: 50%&amp;quot; scope=&amp;quot;col&amp;quot; valign=&amp;quot;top&amp;quot; | Editing Mode&lt;br /&gt;
! style=&amp;quot;width: 50%&amp;quot; scope=&amp;quot;col&amp;quot; valign=&amp;quot;top&amp;quot; | Questionnaire View&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
&#039;&#039;&#039; Ex. 1 Rate&#039;&#039;&#039; (single line) &amp;lt;br /&amp;gt; &#039;&#039;Possible answers&#039;&#039; -&amp;gt; &#039;&#039;&#039;Enter a blank space or a short &amp;quot;label&amp;quot;.&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Settings: &#039;&#039;&#039;&amp;lt;br /&amp;gt;&#039;&#039;&#039; Nb of scale items &#039;&#039;&#039; = 5 (5 columns numbered 1...5);&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Type of rate scale&#039;&#039;&#039;&#039;&#039; = &#039;&#039;Normal&#039;&#039; (N/A column not needed here). &amp;lt;br /&amp;gt;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
[[Image:05-08-2013_13-53-43.jpg|400px]]&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
&#039;&#039;&#039; Ex. 2 Rate &#039;&#039;&#039; (several lines)&amp;lt;br /&amp;gt; &#039;&#039;Possible answers&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Blackboard&amp;lt;br /&amp;gt;Desire2Learn&amp;lt;br /&amp;gt;Moodle&amp;lt;br /&amp;gt;Sakai&amp;lt;br /&amp;gt;WebCT&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Settings: &amp;lt;br /&amp;gt;&#039;&#039; Nb of scale items &#039;&#039;&#039;&#039;&#039; = 4 (4 columns numbered 1...4)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Type of rate scale&#039;&#039;&#039;&#039;&#039; = &#039;&#039; N/A column &#039;&#039;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
[[Image:05-08-2013 13-50-05.jpg]]&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
&#039;&#039;&#039; Ex. 2a Rate (&amp;quot;ordering&amp;quot;) &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This option makes it impossible to click more than one radio button per column; it is thus equivalent to an &amp;quot;ordering&amp;quot; question type.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Settings: &#039;&#039;&#039;&amp;lt;br /&amp;gt;&#039;&#039;&#039;&#039;&#039; Nb of scale items &#039;&#039;&#039;&#039;&#039; = 3 (3 columns numbered 1...3) &amp;lt;br /&amp;gt;&#039;&#039;&#039;&#039;&#039; Type of rate scale&#039;&#039;&#039;&#039;&#039; = &#039;&#039;No duplicate choices&#039;&#039;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
[[Image:05-08-2013 13-59-31.jpg|400px]]&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
&#039;&#039;&#039; Ex. 3 Rate &#039;&#039;with named degrees &#039;&#039; &#039;&#039;&#039;&amp;lt;br /&amp;gt; &lt;br /&gt;
&#039;&#039;Question text&#039;&#039; : How would you rate the ease of use for each of the following items based on your experience with Moodle?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;Possible answers&#039;&#039;:&amp;lt;br /&amp;gt;&lt;br /&gt;
Formatting Your Course&amp;lt;br /&amp;gt;&lt;br /&gt;
Laying out Your Course&amp;lt;br /&amp;gt;&lt;br /&gt;
Number of Clicks to Access Needed Content&amp;lt;br /&amp;gt;&lt;br /&gt;
Adding Content&amp;lt;br /&amp;gt;&lt;br /&gt;
Ability to Add/Change Themes/Appearance&amp;lt;br /&amp;gt;&lt;br /&gt;
Overall Navigation of Moodle&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Named degrees&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
4=Very easy to use&amp;lt;br /&amp;gt;&lt;br /&gt;
3=Easy to use&amp;lt;br /&amp;gt;&lt;br /&gt;
2=Somewhat difficult to use&amp;lt;br /&amp;gt;&lt;br /&gt;
1=Difficult to use&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Settings: &#039;&#039;&#039;&amp;lt;br /&amp;gt;&#039;&#039;&#039;&#039;&#039; Nb of scale items &#039;&#039;&#039;&#039;&#039; = 4 (4 named columns) &amp;lt;br /&amp;gt;&#039;&#039;&#039;&#039;&#039; Type of rate scale &#039;&#039;&#039;&#039;&#039; = &#039;&#039; Normal &#039;&#039; (N/A column not needed here)&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
[[Image:05-08-2013 14-04-00.jpg|600px]]&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
&#039;&#039;&#039; Ex. 3b Rate &#039;&#039;with named degrees &#039;&#039; &#039;&#039;&#039;&amp;lt;br /&amp;gt; &#039;&#039;Possible answers&#039;&#039;:&amp;lt;br /&amp;gt;&lt;br /&gt;
formatting::Formatting Your Course&amp;lt;br /&amp;gt;&lt;br /&gt;
layout::Laying out Your Course&amp;lt;br /&amp;gt;&lt;br /&gt;
clicks::Number of Clicks to Access Needed Content&amp;lt;br /&amp;gt;&lt;br /&gt;
addcontent::Adding Content&amp;lt;br /&amp;gt;&lt;br /&gt;
appearance::Ability to Add/Change Themes/Appearance&amp;lt;br /&amp;gt;&lt;br /&gt;
navigation::Overall Navigation of Moodle&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Named degrees&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
4=Very easy to use&amp;lt;br /&amp;gt;&lt;br /&gt;
3=Easy to use&amp;lt;br /&amp;gt;&lt;br /&gt;
2=Somewhat difficult to use&amp;lt;br /&amp;gt;&lt;br /&gt;
1=Difficult to use&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
If the choice options text is fairly long, you may use shorter &amp;quot;labels&amp;quot; immediately followed by two colons (::).&lt;br /&gt;
The labels &amp;quot;formatting&amp;quot;, &amp;quot;layout&amp;quot;, &amp;quot;clicks&amp;quot; etc. will be saved to the columns headings in the Download as text format operation, instead of the longer labels which will be displayed to the questionnaire respondent.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Please note&#039;&#039;&#039; that in former versions of Questionnaire the separator between &amp;quot;short label&amp;quot; and &amp;quot;options text&amp;quot; used to be the equal sign (=). In Questionnaire 2.5 and later, please use two colons (::) as a separator.&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
&#039;&#039;&#039; Ex. 4 [http://en.wikipedia.org/wiki/Semantic_differential Osgood&#039;s Semantic differential] &#039;&#039;&#039;&#039; &#039;&#039;&#039;&amp;lt;br /&amp;gt; Possible answers.&lt;br /&gt;
&lt;br /&gt;
1=--&amp;lt;br /&amp;gt; 2=-&amp;lt;br /&amp;gt; 3=±&amp;lt;br /&amp;gt; 4=+&amp;lt;br /&amp;gt; 5=++&amp;lt;br /&amp;gt; weak|strong&amp;lt;br /&amp;gt; cold|warm&amp;lt;br /&amp;gt; cowardly|brave&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Settings: &#039;&#039;&#039;&amp;lt;br /&amp;gt;&#039;&#039;&#039;&#039;&#039; Nb of scale items &#039;&#039;&#039;&#039;&#039; = 5 (5 named columns) &amp;lt;br /&amp;gt;&#039;&#039;&#039;&#039;&#039; Type of rate scale &#039;&#039;&#039;&#039;&#039; = &#039;&#039;Osgood&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Note.- &#039;&#039;&#039; To separate the pairs of words you must use a pipe character &#039;&#039;&#039;&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
[[Image:05-08-2013 14-06-54.jpg]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes.-&#039;&#039;&#039; &amp;lt;span id=&amp;quot;anchor_one&amp;quot;&amp;gt;&#039;&#039;&#039;named degrees&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For this question type you have two display options. The default option displays the [http://en.wikipedia.org/wiki/Likert_scale Likert] scale degrees as numbers (1...5). If you prefer to have named degrees instead of numbers, you&#039;ll have to enter those names in the &#039;&#039;&#039;&#039;&#039;Named degrees&#039;&#039;&#039;&#039;&#039; list (see &#039;&#039;&#039;&#039;&#039;Example 3 &#039;&#039;&#039;&#039;&#039; above). On each line of &amp;quot;Named degrees&amp;quot; enter the degree number, &#039;&#039;immediately followed&#039;&#039; by the equal sign &#039;&#039;&#039;&amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt;&#039;&#039;&#039; &#039;&#039;immediately followed&#039;&#039; by the name you want to give to that degree.&lt;br /&gt;
&lt;br /&gt;
If you plan to use the &amp;quot;Personality Test&amp;quot; feature in your questionnaire, the number preceding each named degree will be used to calculate the &amp;quot;score&amp;quot; of the section that includes this question. See https://docs.moodle.org/402/en/mod/questionnaire/personality_test#Questions_2.&lt;br /&gt;
&lt;br /&gt;
If &#039;&#039;the number of named degrees&#039;&#039; in the possible answers list &#039;&#039;is different from the number determined by the value you entered&#039;&#039; in the &#039;&#039;&#039;Nb of scale items&#039;&#039;&#039; field, this will be automatically adjusted when you save the question.&lt;br /&gt;
&lt;br /&gt;
Example #3b shows a possible &amp;quot;hidden&amp;quot; option, for exporting - in responses - shorter label instead of the longer text values. If you never export your data for studying it in stats packages you won&#039;t need this option. Please note that the example is provided here for the &#039;&#039;&#039;Rate &#039;&#039;with named degrees&#039;&#039;&#039;&#039;&#039; question sub-type but it works for all Rate question sub-types except Osgood which requires short left and right options anyway.&lt;br /&gt;
&lt;br /&gt;
===Text Box===&lt;br /&gt;
&lt;br /&gt;
For the Text Box question type, enter the Input Box length and the Maximum text length of text to be entered by respondent.&lt;br /&gt;
&lt;br /&gt;
Default values are 20 characters for the Input Box width and 25 characters for the maximum length of text entered.&lt;br /&gt;
&lt;br /&gt;
===Yes/No===&lt;br /&gt;
&lt;br /&gt;
==Manage questions==&lt;br /&gt;
&lt;br /&gt;
In the &#039;&#039;&#039;Manage questions&#039;&#039;&#039; section of the Edit Questions page, you can conduct a number of operations on a Questionnaire&#039;s questions. Normally you should never add questions or delete questions in a questionnaire that is live in a moodle course, and which some students may have already responded to.&lt;br /&gt;
&lt;br /&gt;
You can Move a question to a different position in the Questionnaire. If your questionnaire contains some &amp;quot;conditional branching&amp;quot; questions, you may not be able to move some of the parent or child questions to some positions which would ruin the branching.&lt;br /&gt;
&lt;br /&gt;
You can Edit a question, but again, be extra careful when editing questions once students have started to complete a questionnaire.&lt;br /&gt;
&lt;br /&gt;
If you try to Delete a child or parent question (in a Conditional branching questionnaire), you will be warned of the possible consequences of those deletions.&lt;br /&gt;
&lt;br /&gt;
By clicking on the Green or Red dots, you can switch the &amp;quot;Response required&amp;quot; status of questions.&lt;br /&gt;
&lt;br /&gt;
Please note that the numbers in front of each question in this interface are &#039;&#039;not&#039;&#039; the question numbers that will be displayed when answering the questionnaire. Here, these numbers indicate the question&#039;s position, and even non-real questions such as Labels and Page Breaks have a position number.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Teacher]]&lt;br /&gt;
&lt;br /&gt;
[[es:Editando preguntas de un cuestionario]]&lt;br /&gt;
[[fr:Ajouter_des_questions]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Workshop_grading_strategies&amp;diff=140813</id>
		<title>Workshop grading strategies</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Workshop_grading_strategies&amp;diff=140813"/>
		<updated>2021-07-14T13:24:06Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Text replacement - &amp;quot;class=&amp;quot;nicetable&amp;quot;&amp;quot; to &amp;quot;class=&amp;quot;wikitable&amp;quot;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Workshop}}&lt;br /&gt;
Simply said, selected grading strategy determines how the assessment form may look like And how the grade for a submission given by a certain assessment is calculated based on the assessment form. Workshop ships with four standard grading strategies. More strategies can be developed as pluggable extensions.&lt;br /&gt;
&lt;br /&gt;
== Accumulative grading strategy ==&lt;br /&gt;
[[Image:Accumulative assessment form.png|200px|thumb|Assessment form using accumulative grading]]&lt;br /&gt;
In this case, the assessment form consists of a set of criteria. Each criterion is graded separately using either a number grade (eg out of 100) or a scale (using either one of site-wide scale or a scale defined in a course). Each criterion can have its weight set. Reviewers can put comments to all assessed criteria.&lt;br /&gt;
&lt;br /&gt;
When calculating the total grade for the submission, the grades for particular criteria are firstly normalized to a range from 0% to 100%. Then the total grade by a given assessment is calculated as weighted mean of normalized grades. Scales are considered as grades from 0 to M-1, where M is the number of scale items.&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;G_s = \frac{\sum_{i=1}^N \frac{g_i}{max_i} w_i }{\sum_{i=1}^N w_i}&amp;lt;/math&amp;gt;&lt;br /&gt;
: where &amp;lt;math&amp;gt;g_i \in \mathbb{N}&amp;lt;/math&amp;gt; is the grade given to the i-th criterion, &amp;lt;math&amp;gt;max_i \in \mathbb{N}&amp;lt;/math&amp;gt; is the maximal possible grade of the i-th criterion, &amp;lt;math&amp;gt;w_i \in \mathbb{N} &amp;lt;/math&amp;gt; is the weight of the i-th criterion and &amp;lt;math&amp;gt;N \in \mathbb{N} &amp;lt;/math&amp;gt; is the number of criteria in the assessment form.&lt;br /&gt;
&lt;br /&gt;
It is important to realize that the influence of a particular criterion is determined by its weight only, not the grade type or range used. Let us have three criteria in the form, first using 0-100 grade, the second 0-20 grade and the third using a three items scale. If they all have the same weight, then giving grade 50 in the first criteria has the same impact as giving grade 10 for the second criteria.&lt;br /&gt;
&lt;br /&gt;
Take the case above as an example. Suppose that the third criterion uses &#039;&#039;scale: 6 levels&#039;&#039;. An assessor gives grade 90 for the first criterion (or aspect 1), grade 16 for the second criterion and grade 9 &#039;&#039;very good&#039;&#039; for the last criterion. And the weights of the three criteria are 1, 2, and 3, respectively. Because for the third criterion, the scale has 6 items and grade 9 &#039;&#039;very good&#039;&#039; is the second one of the grade sequence ordered from highest to lowest, grade 9 will be mapped to 4. That is, in the formula above, g3 = 4 and max3 = 5.Then the final grade given by this assessment will be:&lt;br /&gt;
[[Image: Accumulative formula.png|left]]&amp;lt;br clear=&amp;quot;all&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Comments ==&lt;br /&gt;
[[Image:Comments assessment form.png|200px|thumb|right|Assessment form using comments]]&lt;br /&gt;
The assessment form is similar to the one used in accumulative grading strategy but no grades can be given, just comments. The total grade for the assessed submission is always set to 100%. This strategy can be effective in repetitive workflows when the submissions are firstly just commented by reviewers to provide initial feedback to the authors. Then Workshop is switched back to the submission phase and the authors can improve it according the comments. Then the grading strategy can be changed to another one using proper grading and submissions are assessed again using a different assessment form.&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Number of errors ==&lt;br /&gt;
[[Image:Numoferror assessment form.png|200px|thumb|right|Assessment form using Number of Errors]]&lt;br /&gt;
In Moodle 1.x, this was called Error banded strategy. The assessment form consists of several assertions, each of them can be marked as passed or failed by the reviewer. Various words can be set to express the pass or failure state - eg Yes/No, Present/Missing, Good/Poor, etc.&lt;br /&gt;
&lt;br /&gt;
The grade given by a particular assessment is calculated from the weighted count of negative assessment responses (failed assertions). Here, the &#039;&#039;weighted count&#039;&#039; means that a response with weight &amp;lt;math&amp;gt;w_i&amp;lt;/math&amp;gt; is counted &amp;lt;math&amp;gt;w_i&amp;lt;/math&amp;gt;-times. Course facilitators define a mapping table that converts the number of failed assertions to a percent grade for the given submission. Zero failed assertion is always mapped to 100% grade.&lt;br /&gt;
&lt;br /&gt;
This strategy may be used to make sure that certain criteria were addressed in the submission. Examples of such assessment assertions are: &#039;&#039;Has less than 3 spelling errors&#039;&#039;, &#039;&#039;Has no formatting issues&#039;&#039;, &#039;&#039;Has creative ideas&#039;&#039;, &#039;&#039;Meets length requirements&#039;&#039; etc. This assessment method is considered as easier for reviewers to understand and deal with. Therefore it is suitable even for younger participants or those just starting with peer assessment, while still producing quite objective results.&lt;br /&gt;
&lt;br /&gt;
You can edit the original assessment form by following the steps below:&lt;br /&gt;
# Write down the corresponding description for each assertion in the blank. Then fill in the blanks of &#039;&#039;word for the error&#039;&#039; and &#039;&#039;word for the success&#039;&#039;. Set the weight for each assertion. As you can see, the grade mapping table is still blank now.&lt;br /&gt;
# Click the ‘save and close’ button at the end of this page.&lt;br /&gt;
# Click the ‘Edit assessment form’ link at the shade area titled &#039;&#039;setup phase&#039;&#039; in the upper part of this page and view the assessment form again. At this time, you can see that the grade mapping table has already been set. (&#039;&#039;Note&#039;&#039;: Initially all the field are blank. You need to choose the right value from each list to make this grading strategy work properly.)&lt;br /&gt;
[[Image:Numberoferrors grade mapping table.png|300px|thumb|none|grade mapping table]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, if an assessment form contains three assertions:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Assertion No.&lt;br /&gt;
! Content&lt;br /&gt;
! Pass or failure state&lt;br /&gt;
! Weight&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Has the suitable title&lt;br /&gt;
| Yes/No&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Has creative ideas&lt;br /&gt;
| Present/Miss&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| The abstract is well-written&lt;br /&gt;
| Yes/No&lt;br /&gt;
| 3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the example above, suppose that a reviewer gives one certain work &#039;&#039;Yes/Miss/Yes&#039;&#039; as the assessment. Since the submission only fails to meet the second criterion and the weight of the second criterion is 2, the total number of errors will be 2. Thus the grade for submission given by this assessment is 66%. Suppose that the maximum grade for submission set in &#039;&#039;grade settings&#039;&#039; is 100, therefore the final grade for this submission given by this assessment is grade 66.&lt;br /&gt;
&lt;br /&gt;
== Rubric ==&lt;br /&gt;
[[Image:Rubric assessmentform list.png|200px|thumb|right|Assessment form in list mode]]&lt;br /&gt;
See [http://en.wikipedia.org/wiki/Rubric_(academic) the description] of this scoring tool at Wikipedia. The rubric assessment form consists of a set of criteria. For each criterion, several ordered descriptive levels are provided. A number grade is assigned to each of these levels.  The reviewer chooses which level answers/describes the given criterion best.&lt;br /&gt;
&lt;br /&gt;
The final grade is aggregated as&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;G_s = \frac{\sum_{i=1}^N (g_i - min_i) }{\sum_{i=1}^N (max_i - min_i)}&amp;lt;/math&amp;gt;&lt;br /&gt;
: where &amp;lt;math&amp;gt;g_i \in \mathbb{N}&amp;lt;/math&amp;gt; is the grade given to the i-th criterion, &amp;lt;math&amp;gt;min_i \in \mathbb{N}&amp;lt;/math&amp;gt; is the minimal possible grade of the i-th criterion, &amp;lt;math&amp;gt;max_i \in \mathbb{N}&amp;lt;/math&amp;gt; is the maximal possible grade of the i-th criterion and &amp;lt;math&amp;gt;N \in \mathbb{N} &amp;lt;/math&amp;gt; is the number of criteria in the rubric.&lt;br /&gt;
[[Image:Rubric assessmentform grid.png|200px|thumb|right|Assessment Form in grid mode]]&lt;br /&gt;
Example of a single criterion can be: &#039;&#039;Overall quality of the paper&#039;&#039; with the levels &#039;&#039;5 - An excellent paper&#039;&#039;, &#039;&#039;3 - A mediocre paper&#039;&#039;, &#039;&#039;0 - A weak paper&#039;&#039; (the number represent the grade).&lt;br /&gt;
&lt;br /&gt;
There are two modes how the assessment form can be rendered - either in common grid form or in a list form. It is safe to switch the representation of the rubric any time.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Example of calculation:&#039;&#039; let us have a rubric with two criteria, which both have four levels 1, 2, 3, 4. The reviewer chooses level with the grade 2 for the first criterion and the grade 3 for the second criterion. Then the final grade is:&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;G_s = \frac{(2 - 1) + (3 - 1)}{(4 - 1) + (4 - 1)} = \frac{3}{6} = 50 %&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that this calculation may be different from how you intuitively use rubric. For example, when the reviewer in the previous example chose both levels with the grade 1, the plain sum would be 2 points. But that is actually the lowest possible score so it maps to the grade 0. To avoid confusion, it is recommended to always include a level with the grade 0 in the rubric definition.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note on backwards compatibility:&#039;&#039;&#039; This strategy merges the legacy Rubric and Criterion strategies from Moodle 1.x into a single one. Conceptually, legacy Criterion was just one dimension of Rubric. In Workshop 1.x, Rubric could have several criteria (categories) but were limited to a fixed scale with 0-4 points. On the other hand, Criterion strategy in Workshop 1.9 could use custom scale, but was limited to a single aspect of assessment. The new Rubric strategy combines the old two. To mimic the legacy behaviour, the old Workshop are automatically upgraded so that:&lt;br /&gt;
&lt;br /&gt;
* Criterion strategy from 1.9 are replaced with Rubric 2.0 using just one dimension&lt;br /&gt;
* Rubric from 1.9 are by Rubric 2.0 by using point scale 0-4 for every criterion.&lt;br /&gt;
&lt;br /&gt;
In Moodle 1.9, reviewer could suggest an optional adjustment to a final grade. This is not supported any more. Eventually this may be supported in the future versions again as a standard feature for all grading strategies, not only rubric.&lt;br /&gt;
&lt;br /&gt;
==Experiencing Real Workshop==&lt;br /&gt;
If you would like to try out a real workshop, please log in to the [http://school.moodledemo.net/ School demo Moodle] with the username &#039;&#039;teacher&#039;&#039; and password &#039;&#039;moodle&#039;&#039;. You can access the different stages of and  explore the grading and phases of a [http://school.moodledemo.net/mod/workshop/view.php?id=651 completed workshop with data] on My home country.&lt;br /&gt;
&lt;br /&gt;
[[es:Estrategias de calificación de taller]]&lt;br /&gt;
[[de:Bewertungsstrategien bei gegenseitigen Beurteilungen]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Tutorship_module&amp;diff=140812</id>
		<title>Tutorship module</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Tutorship_module&amp;diff=140812"/>
		<updated>2021-07-14T13:24:06Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Text replacement - &amp;quot;class=&amp;quot;nicetable&amp;quot;&amp;quot; to &amp;quot;class=&amp;quot;wikitable&amp;quot;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Tutorship&#039;&#039;&#039; is a schedule tutoring sessions module for Moodle, where teachers and students can make appointments for tutoring interviews within a timetable view.&lt;br /&gt;
&lt;br /&gt;
It helps to administrate and schedule tutoring hours, it allows students to make appointments with teachers for tutoring interview sessions, from a configurable time slots timetable view. Teachers can design their module timetable in order to offer the students a tutorship timetable, so that they can see and make appointments by requesting any available timetable slot. &lt;br /&gt;
&lt;br /&gt;
It was first developed under Moodle version 2.0 in November 2010. It is contributed by [http://moodle.org/user/profile.php?id=1116685 Alejandro Michavila].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
There are three different views depending on user roll:&lt;br /&gt;
;Teachers: Can manage up to three different timetables, adjust the settings that will be applied for all timetables, and they can do it within any course the teacher is enrolled in.&lt;br /&gt;
;Students: Can request or cancell time slots from the teacher&#039;s timetable, where current week is show by default, but next week is also available for viewing.&lt;br /&gt;
;Administrators: Can adjust initial module settings before any teacher adds any instance to any course.&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
=== General features ===&lt;br /&gt;
&lt;br /&gt;
* Email notifications.&lt;br /&gt;
&lt;br /&gt;
* Supported English and Spanish languages.&lt;br /&gt;
&lt;br /&gt;
* Help icons on the Tutorship&#039;s elements like header or name field.&lt;br /&gt;
&lt;br /&gt;
* Display error notifications to inform user, in case an error took place.&lt;br /&gt;
&lt;br /&gt;
* Records user activity to enable audit.&lt;br /&gt;
&lt;br /&gt;
* Compatibility from 2.0 upwards.&lt;br /&gt;
&lt;br /&gt;
=== Student features ===&lt;br /&gt;
&lt;br /&gt;
* Students can choose the teacher they want to see timetable from.&lt;br /&gt;
&lt;br /&gt;
* Students can click on the time slot they want to reserve, and they can cancell their requests.&lt;br /&gt;
&lt;br /&gt;
* Current week and next week time slots view from Tutorship timetable.&lt;br /&gt;
&lt;br /&gt;
* Can reserve slots from tomorrow to next week&#039;s friday, up to a maximum of 4 reserves (depends on teacher&#039;s timetable configuration).&lt;br /&gt;
&lt;br /&gt;
* Students will receive in their email box a confirmation or cancellation of their request, and they can also see confirmation from the timetable view.&lt;br /&gt;
&lt;br /&gt;
=== Teacher features ===&lt;br /&gt;
&lt;br /&gt;
* Current week and next week time slots view from Tutorship timetable.&lt;br /&gt;
&lt;br /&gt;
* Can confirm or cancell reservations from the timetable view.&lt;br /&gt;
&lt;br /&gt;
* Can edit the timetable and can save up to three timetables.&lt;br /&gt;
&lt;br /&gt;
* Can adjust settings to all timetables, like: enable/disable sending mail to teacher, send automatic confirmations to students requests, set the number of reservation request per student (up to 4 as maximum), enable or disable student requests (students will not have the reserve link).&lt;br /&gt;
&lt;br /&gt;
=== Administrator features ===&lt;br /&gt;
&lt;br /&gt;
* Global settings can be adjusted from the module settings page at Administration &amp;gt; Modules &amp;gt; Activities &amp;gt; Tutorship.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Here is a basic outline of the installation process:&lt;br /&gt;
&lt;br /&gt;
# DO NOT PANIC!&lt;br /&gt;
# Unzip the archive and read this file.&lt;br /&gt;
# Move the files into your Moodle mod Web directory in moodle/mod.&lt;br /&gt;
# Visit Settings &amp;gt; Site Administration &amp;gt; Notifications, you should find the module&#039;s tables successfully created.&lt;br /&gt;
# Go to Site Administration &amp;gt; Modules &amp;gt; Activities &amp;gt; Manage activities, and you should find that the tutorship has been added to the list of installed modules.&lt;br /&gt;
# Make your global settings adjustments before adding any instance.&lt;br /&gt;
# You may now proceed to add a new instance of tutorship to a course.&lt;br /&gt;
&lt;br /&gt;
== Uninstallation ==&lt;br /&gt;
&lt;br /&gt;
Here is a basic outline of the uninstallation process:&lt;br /&gt;
&lt;br /&gt;
# DO YOU REALLY WANT TO UNINSTALL?&lt;br /&gt;
# Go to Site Administration &amp;gt; Modules &amp;gt; Activities &amp;gt; Manage activities, and delete your Activity module.&lt;br /&gt;
# You may now proceed to remove the module files from moodle/mod.&lt;br /&gt;
&lt;br /&gt;
== Synopsis ==&lt;br /&gt;
&lt;br /&gt;
=== If you are a student ===&lt;br /&gt;
&lt;br /&gt;
*Go to a course and click on the instance name, could be some name like &amp;quot;Tutoring schedule timetable&amp;quot;, but if you are not sure, you can see the module logo at tutorship/pix/ path, see package structure for further details.&lt;br /&gt;
&lt;br /&gt;
*Select a teacher from the list and turing current week timetable will be shown.&lt;br /&gt;
&lt;br /&gt;
*You can choose to see current or next week available slots.&lt;br /&gt;
&lt;br /&gt;
*If teacher has enabled student tutorship session request, then you can request any available slot.&lt;br /&gt;
&lt;br /&gt;
*You can also cancell your reques&lt;br /&gt;
&lt;br /&gt;
=== If you are a teacher ===&lt;br /&gt;
&lt;br /&gt;
*Click on &amp;quot;Turn editing on&amp;quot; and select &amp;quot;Tutorship&amp;quot; from the &amp;quot;Add an activity&amp;quot; list. Type the name for your instance that will be shown to everybody or leave the &amp;quot;Tutoring schedule timetable&amp;quot; default name. Now it is ready to use.&lt;br /&gt;
&lt;br /&gt;
*Go to any course you are enrolled and click on the module instance name, you will see your tutoring timetable as students see it, or empty if no timetable has been created yet.&lt;br /&gt;
&lt;br /&gt;
* To create a timetable go to edit and select the period you want your timetable be related to.&lt;br /&gt;
&lt;br /&gt;
* You can have three different timetables, one per period.&lt;br /&gt;
&lt;br /&gt;
* You can enable or disable any time slot you want to offer as a tutoring session, it will be shown on your tutoring timetable.&lt;br /&gt;
&lt;br /&gt;
* You can adjust your settings common to all timetables.&lt;br /&gt;
&lt;br /&gt;
=== If you are an administrator ===&lt;br /&gt;
&lt;br /&gt;
*Click on Administration &amp;gt; Modules &amp;gt; Activities &amp;gt; Tutorship and edit the module global configuration, taking in mind not to have any instance added to any course. Global configuration should be edited before any module instance is added to any course, otherwise negative consecuences will take place.&lt;br /&gt;
&lt;br /&gt;
== Screanshots ==&lt;br /&gt;
&lt;br /&gt;
[[Image:Tutorship1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Tutorship2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Tutorship3.png|700px]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Tutorship4.png|700px]]&lt;br /&gt;
&lt;br /&gt;
== Package structure ==&lt;br /&gt;
&lt;br /&gt;
  tutorship/&lt;br /&gt;
   |_ view.php           - Prints a general view of tutorship.&lt;br /&gt;
   |_ teacherview.php    - Prints a particular teacher view of tutorship.&lt;br /&gt;
   |_ studentview.php    - Prints a particular student view of tutorship.&lt;br /&gt;
   |_ locallib.php       - Internal library of functions for module tutorship.&lt;br /&gt;
   |_ lib.php            - Library of interface functions for tutorship.&lt;br /&gt;
   |_ index.php          - Prints all instances provided in a course.&lt;br /&gt;
   |_ version.php        - Defines the version of tutorship.&lt;br /&gt;
   |_ mod_form.php       - The instance configuration form.&lt;br /&gt;
   |_ settings.php       - The module configuration variables.&lt;br /&gt;
   |_ COPYING.txt        - A copy of the GNU General Public License.&lt;br /&gt;
   |_ README.txt         - This info text file.&lt;br /&gt;
   |_ lang/en/&lt;br /&gt;
   |    |_ tutorship.php - English strings for tutorship.&lt;br /&gt;
   |_ lang/es/&lt;br /&gt;
   |    |_ tutorship.php - Spanish strings for tutorship.&lt;br /&gt;
   |_ pix/&lt;br /&gt;
   |    |_ icon.gif      - An instance icon.&lt;br /&gt;
   |_ db/&lt;br /&gt;
        |_ upgrade.php   - The upgrade tacking file.&lt;br /&gt;
        |_ install.xml   - The data base schema definition file.&lt;br /&gt;
        |_ access.php    - The tutorship capabilities definition file.&lt;br /&gt;
        |_ log.php       - Defines log events.&lt;br /&gt;
        |_ uninstall.php - Executed after the uninstall process.&lt;br /&gt;
&lt;br /&gt;
== Database schema ==&lt;br /&gt;
&lt;br /&gt;
[[Image:Tutorship.png]]&lt;br /&gt;
&lt;br /&gt;
Here is the Dia file: [[Media:Tutorship.dia]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Table&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| tutorship&lt;br /&gt;
| The main instance table.&lt;br /&gt;
|-&lt;br /&gt;
| tutorship_timetables&lt;br /&gt;
| The teacher&#039;s timetable with their timeslots.&lt;br /&gt;
|-&lt;br /&gt;
| tutorship_reserves&lt;br /&gt;
| The student&#039;s reserved timeslots.&lt;br /&gt;
|-&lt;br /&gt;
| tutorship_configs&lt;br /&gt;
| The teacher&#039;s timetable configurations.&lt;br /&gt;
|-&lt;br /&gt;
| tutorship_periods&lt;br /&gt;
| The timetable&#039;s periods.&lt;br /&gt;
|-&lt;br /&gt;
| tutorship_timeslots&lt;br /&gt;
| All the possible timeslots within a week.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Languages supported ==&lt;br /&gt;
&lt;br /&gt;
*English.&lt;br /&gt;
*Spanish.&lt;br /&gt;
&lt;br /&gt;
== Supported versions ==&lt;br /&gt;
&lt;br /&gt;
* 2.0.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
*[http://download.moodle.org/download.php/plugins/mod/tutorship.zip Download latest version]&lt;br /&gt;
*[http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=4347 Modules and plugins database entry]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=161889 Forum discussion]&lt;br /&gt;
*[http://cvs.moodle.org/contrib/plugins/mod/tutorship Browse through the code]&lt;br /&gt;
*[http://tracker.moodle.org/browse/CONTRIB/component/10763 Bugs and issues]&lt;br /&gt;
*[https://docs.moodle.org/en/Installing_contributed_modules_or_plugins Installing contributed modules or plugins]&lt;br /&gt;
&lt;br /&gt;
[[Category: Contributed code]]&lt;br /&gt;
[[es:Modulo_tutorship]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=MRBS_block/import&amp;diff=140811</id>
		<title>MRBS block/import</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=MRBS_block/import&amp;diff=140811"/>
		<updated>2021-07-14T13:24:05Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Text replacement - &amp;quot;class=&amp;quot;nicetable&amp;quot;&amp;quot; to &amp;quot;class=&amp;quot;wikitable&amp;quot;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This feature works in a similar way to flatfile enrolement; it is enabled by configuring a file location in the module settings. Once there is a location set, that location will be checked every time cron runs and if a file is found it will be processed.&lt;br /&gt;
&lt;br /&gt;
All existing imported bookings will be deleted from the database before the new import is processed- this is done so that a timetable can be imported regularly, ensuring that mrbs is kept up to date. Any imported bookings that have been edited will not be deleted and will not be re-imported, however any deleted bookings will be re-imported.&lt;br /&gt;
&lt;br /&gt;
The file should be a csv file, without a header row, containing the following fields:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Start time&lt;br /&gt;
!End time&lt;br /&gt;
!Date of first session&lt;br /&gt;
!Weekpattern&lt;br /&gt;
!Room name&lt;br /&gt;
!Username&lt;br /&gt;
!Name&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|hh:mm format, if periods are used then see the section below&lt;br /&gt;
|hh:mm format, if periods are used then see the section below&lt;br /&gt;
|YYYY/MM/DD format&lt;br /&gt;
|This field enables a session to be repeated weekly, missing out weeks for holidays etc. To make a single booking just put 1 in this field, otherwise enter a string of 1s and spaces (each 1 representing a booking, each space representing a week without a booking). This string can be as long as required.&lt;br /&gt;
|must be the same as that held in the mrbs_room table&lt;br /&gt;
|this field is used to link the booking to a moodle user. It is not case sensitive and will not cause an error if no matching user is found (however if this is the case then only mrbs admins will be able to edit the booking)&lt;br /&gt;
|the name for the booking to have. If you want to take advantage of some other features then you should set this to the shortname of the course the booking is for (if there is a moodle course for it)&lt;br /&gt;
|a description for the booking&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Times when periods are enabled====&lt;br /&gt;
MRBS stores period times as minutes past midnight, 00:00 is the time period1 starts, 00:01 is the time period1 ends and period 2 starts etc.&lt;br /&gt;
&lt;br /&gt;
== Other pages about MRBS block ==&lt;br /&gt;
* [[MRBS block|Main page]]&lt;br /&gt;
* [[MRBS_block/forcebook|Force booking]]&lt;br /&gt;
* [[MRBS_block/usertt|User timetables]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Development:External_services_security&amp;diff=140810</id>
		<title>Development:External services security</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Development:External_services_security&amp;diff=140810"/>
		<updated>2021-07-14T13:24:05Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Text replacement - &amp;quot;class=&amp;quot;nicetable&amp;quot;&amp;quot; to &amp;quot;class=&amp;quot;wikitable&amp;quot;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Moodle_2.0}}&lt;br /&gt;
&lt;br /&gt;
Descriptions of security framework for web services, also used for RSS feeds, embedded application and similar parts that can not use normal HTTP cookies.&lt;br /&gt;
&lt;br /&gt;
=Overview=&lt;br /&gt;
&lt;br /&gt;
Current solutions:&lt;br /&gt;
* user keys for gradebook import and export - see require_user_key_login() and db table &#039;&#039;user_private_key&#039;&#039;&lt;br /&gt;
* open RSS feeds - no security at all&lt;br /&gt;
* chat_sid tokens - generated separately for each user in each chat&lt;br /&gt;
* calendar export - hash from user name, password and salt&lt;br /&gt;
* hacky cookie emulation in visual gradebook plugin&lt;br /&gt;
&lt;br /&gt;
=Design=&lt;br /&gt;
&lt;br /&gt;
==Different uses==&lt;br /&gt;
The external API may be used from different places:&lt;br /&gt;
# directly from PHP - no authentication, current user session is used ($USER, $SESSION)&lt;br /&gt;
# simple web service layer - easy to use and setup WS layer designed for interaction with enterprise systems (each having own single purpose user account), the protocol is stateless, username and password is sent with each request; security is enforced on multiple levels&lt;br /&gt;
# full WS layer with token authentication - it is more flexible and enables normal users to use some restricted parts of the WS APIs, performance might be significantly improved by emulation of sessions&lt;br /&gt;
# when embedding external applications - external application receives unique token which is used instead of normal browser session cookie, the session is linked to the current user session in browser, the token is automatically invalidated after logout&lt;br /&gt;
# RSS feeds, iCals, etc. - token login, no permanent session&lt;br /&gt;
&lt;br /&gt;
==API layers==&lt;br /&gt;
&lt;br /&gt;
Three layers:&lt;br /&gt;
# external server interface (SOAP, REST, RSS, etc.) - deals with tokens, emulates user session, parameter processing&lt;br /&gt;
# public PHP API - functions usable directly from PHP, list generated from inline PHP docs, need to verify &#039;&#039;&#039;all&#039;&#039;&#039; parameters and access control, may access $USER, should not manipulate $SESSION directly, must not read $_POST or $_GET&lt;br /&gt;
# low level internal API - as fast as possible, basic param validation, no access control, must not touch $USER, $SESSION, $_GET or $_POST, must not use has_capability() or require_login()!&lt;br /&gt;
&lt;br /&gt;
==Context restrictions==&lt;br /&gt;
Context restriction of token validity should be effective against security problems in external applications interacting with Moodle. Some external applications do not have any access to http cookies, solution is to create temporary tokens. Context restrictions would allow us to grant external access to individual activities, courses ,etc..&lt;br /&gt;
&lt;br /&gt;
=Implementation=&lt;br /&gt;
&lt;br /&gt;
==PHP API==&lt;br /&gt;
This simplest case of using the external API. The calling call has to make sure the current $USER and $SESSION is valid. Optionally the caller may set up the context restriction manually. This should be the easiest way to start with Moodle modifications and integration with other PHP software.&lt;br /&gt;
&lt;br /&gt;
==Simplified web services==&lt;br /&gt;
This type of web service is using simple username+password authentication (in future could be username+certificate). The communication integrity/privacy can be protected using https. Each external application is using own user account. These user accounts can not be used for normal login into moodle vie web interface.&lt;br /&gt;
&lt;br /&gt;
This type of WS is intended primarily for integration with student information systems or other enterprise software.&lt;br /&gt;
&lt;br /&gt;
===webservice auth plugin===&lt;br /&gt;
It is recommended to create separate user for each external application. The benefit of this auth type is that it can not be used for normal log-in from the web interface.&lt;br /&gt;
&lt;br /&gt;
Several people questioned the security of sending username+password with each request - it is not a problem because this password is used only for web services, it can not be used for anything else. This means that the password is effectively a standard authentication token ;-) We coudl replace this password by a public certificate stored in the user profile field.&lt;br /&gt;
&lt;br /&gt;
===WS entry point===&lt;br /&gt;
Separate php file /webservice/xxx/simpleserver.php&lt;br /&gt;
&lt;br /&gt;
===external_services_users table===&lt;br /&gt;
Specifies which user may use each external service when restrictedusers flag set in service.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Default&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;id&#039;&#039;&#039; &lt;br /&gt;
| int(10)&lt;br /&gt;
| auto-incrementing&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;externalserviceid&#039;&#039;&#039; &lt;br /&gt;
| int(10)&lt;br /&gt;
| &lt;br /&gt;
| foreign key, reference external_services.id&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;userid&#039;&#039;&#039; &lt;br /&gt;
| int(10)&lt;br /&gt;
| &lt;br /&gt;
| foreign key, reference user.id&lt;br /&gt;
|-&lt;br /&gt;
| iprestriction &lt;br /&gt;
| varchar(255)&lt;br /&gt;
| NULL&lt;br /&gt;
| restrict access to some ips or subnets only&lt;br /&gt;
|-&lt;br /&gt;
| validuntil &lt;br /&gt;
| int(10)&lt;br /&gt;
| NULL&lt;br /&gt;
| invalidate after (once the date is reached the user cannot access the service)&lt;br /&gt;
|-&lt;br /&gt;
| timecreated &lt;br /&gt;
| int(10)&lt;br /&gt;
|&lt;br /&gt;
| time when this record added (date of the user/service relation creation)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Steps needed to configure simple web service access===&lt;br /&gt;
&lt;br /&gt;
# enable web services&lt;br /&gt;
# create new service in some local plug-ip (add code into /local/yourplugin/db/services.php) or manually add new service with some functions&lt;br /&gt;
# add new user, set auth plugin to &#039;&#039;&#039;webservice&#039;&#039;&#039; (normal add user UI)&lt;br /&gt;
# enable web service layer plugin (admin UI)&lt;br /&gt;
# optionally add user into list of users that are allowed to use specific external services (admin UI)&lt;br /&gt;
# set up user permissions needed in function implementations. All required capabilities should be listed in the external function description.&lt;br /&gt;
# set up permission to use specific web services (optional, services do not need to specify required capability)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#Log as admin&lt;br /&gt;
#Add a new user&lt;br /&gt;
#Enable the Web Service Authentication plugin&lt;br /&gt;
#In the new user profil, change authentication method for web services&lt;br /&gt;
#In advance feature, enable web services&lt;br /&gt;
#In Plugin/Web Services/Manage protocol, enable the protocol you need&lt;br /&gt;
#In Plugin/Web Services/External Services, Add a new service, activate it and add some function to this service.&lt;br /&gt;
#If the selected service has restricted user option activated, assign the new user to this service&lt;br /&gt;
#If the selected service has required capability, assign this capability to the new user&lt;br /&gt;
#Assign the capability to use the selected protocol - you&#039;ll probably want to create a Web Service role for that&lt;br /&gt;
#the new user can now access web service from the enabled protocol with his username/password&lt;br /&gt;
&lt;br /&gt;
==General web services==&lt;br /&gt;
&lt;br /&gt;
More flexible than the WS with simplified authentication and setup. The performance may be significantly improved by emulation of sessions. The authentication is based on security tokens (user, context and purpose specific) that are generated in normal Moodle interface and then used in other external applications that are using our web services. This allows us to give only partial access to some parts of WS api, external applications and services do not need to be fully trusted.&lt;br /&gt;
&lt;br /&gt;
The main drawback is that the complex configuration does not encourage admins to keep everything secured.&lt;br /&gt;
&lt;br /&gt;
===external_tokens===&lt;br /&gt;
Stores permanent tokens for cookieless access, script runs without real session. (Later might have to add emulated session for performance reasons.)&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Default&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;id&#039;&#039;&#039; &lt;br /&gt;
| int(10)&lt;br /&gt;
| auto-incrementing&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;token&#039;&#039;&#039; &lt;br /&gt;
| varchar(128)&lt;br /&gt;
| &lt;br /&gt;
| private access key value&lt;br /&gt;
|-&lt;br /&gt;
| tokentype &lt;br /&gt;
| int(3)&lt;br /&gt;
| &lt;br /&gt;
| type of token: 0=permanent, no session; 1=linked to current browser session via sid; 2=permanent, with emulated session&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10)&lt;br /&gt;
| &lt;br /&gt;
| foreign key, references user.id&lt;br /&gt;
|-&lt;br /&gt;
| creatorid&lt;br /&gt;
| int(10)&lt;br /&gt;
| the token creator (an administrator)&lt;br /&gt;
| foreign key, references user.id&lt;br /&gt;
|-&lt;br /&gt;
| externalserviceid &lt;br /&gt;
| int(10)&lt;br /&gt;
| &lt;br /&gt;
| foreign key, references external_services.id&lt;br /&gt;
|-&lt;br /&gt;
| sid &lt;br /&gt;
| varchar(128)&lt;br /&gt;
| NULL&lt;br /&gt;
| links to browser or emulated session&lt;br /&gt;
|-&lt;br /&gt;
| contextid&lt;br /&gt;
| int(10)&lt;br /&gt;
|&lt;br /&gt;
| security restriction, token usable only in this context, references context.id&lt;br /&gt;
|-&lt;br /&gt;
| iprestriction&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| NULL&lt;br /&gt;
| IP address restriction, list of allowed addresses&lt;br /&gt;
|-&lt;br /&gt;
| validuntil &lt;br /&gt;
| int(10)&lt;br /&gt;
| NULL&lt;br /&gt;
| timestampt - valid until date&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| &lt;br /&gt;
| time when key created&lt;br /&gt;
|-&lt;br /&gt;
| lastaccess&lt;br /&gt;
| int(10)&lt;br /&gt;
| &lt;br /&gt;
| time when key last used for access&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Steps needed to configure general web service access===&lt;br /&gt;
&lt;br /&gt;
# enable general web services - global switch affecting all general web services (admin UI)&lt;br /&gt;
# enable web service layer plugins (admin UI)&lt;br /&gt;
# setup user permission which allows them to create tokens in some specific context for some specific purpose (roles UI)&lt;br /&gt;
# set up user permissions needed in function implementations&lt;br /&gt;
# set up permission to use specific web services (optional, services do not need to specify required capability)&lt;br /&gt;
# each user must create permanent token in specific context for specific purpose (user UI)&lt;br /&gt;
# user must copy/past this token to external application&lt;br /&gt;
&lt;br /&gt;
==== Random all-time valid token ====&lt;br /&gt;
A user can use the same token to call a web service. We call this token an all-time valid token.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Specificity&#039;&#039;&#039;&lt;br /&gt;
* A token can be created by a Moodle administrator (administration page) or a simple Moodle user (user profil). &lt;br /&gt;
* An administrator has the ability to create a token for another Moodle user but not for himself neither for another administrator (for security purpose). &lt;br /&gt;
* A token is always linked to a Moodle user. &lt;br /&gt;
* A token cannot be linked to an administrator .&lt;br /&gt;
* A Moodle user create his own token on his profil page.&lt;br /&gt;
* To create a token, a user need &amp;quot;moodle/webservice:createtoken&amp;quot; capability.&lt;br /&gt;
* An administrator create token for other on a web service token page.&lt;br /&gt;
* An administrator cannot see token that he didn&#039;t create.&lt;br /&gt;
* A token is generated randomly and is long enough.&lt;br /&gt;
* A token can be used by an external web application. (by browser) &lt;br /&gt;
* A token can be used by a mobile application. (i.e. iphone native application)&lt;br /&gt;
* A token is sent by the external application at the same time that the function parameters are sent.&lt;br /&gt;
* When the user create a token, he must select a service (to link the token to a service). Only services that the user has capability on are displayed.&lt;br /&gt;
* &#039;&#039;ip restriction&#039;&#039; and &#039;&#039;valid until&#039;&#039; fields are optional.&lt;br /&gt;
* A Moodle user must select an aera on which the token can be valid. (course, ...) - TBD - unclear yet&lt;br /&gt;
* A user can only see token string if https is enabled.&lt;br /&gt;
* A token can be linked to only one service.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Administration: token management (valid until field is missing here):&amp;lt;br/&amp;gt;&lt;br /&gt;
[[Image:Admin_token.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Administration: create token:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[Image:Create_token.png]]&lt;br /&gt;
&lt;br /&gt;
==Application embedding==&lt;br /&gt;
&lt;br /&gt;
Similar to general WS, the token is linked to current session - when user logs out, the external token is immediately invalidated. The administration is much easier and the tokens are usually created automatically.&lt;br /&gt;
&lt;br /&gt;
The external applications maybe be embedded into browser or they can be launched as separate programs (ex.: Java Web Start, Flex, external media players, etc.)&lt;br /&gt;
&lt;br /&gt;
It is not necessary to use WS layers defined in /webservices/xxx/, the same infrastructure may be used in all ajax scripts that do not have access to browser cookies.&lt;br /&gt;
&lt;br /&gt;
==RSS, iCALs and other feeds==&lt;br /&gt;
&lt;br /&gt;
All cookie-less scripts such as RSS can use the external API and together with the permanent tokens. In fact ATOM is a nice example of RESTful protocol :-)&lt;br /&gt;
&lt;br /&gt;
=See also=&lt;br /&gt;
* [[Development:Web services]]&lt;br /&gt;
* [[Development:External services description]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Web Services]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Using_Workshop&amp;diff=140809</id>
		<title>Using Workshop</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Using_Workshop&amp;diff=140809"/>
		<updated>2021-07-14T13:24:04Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Text replacement - &amp;quot;class=&amp;quot;nicetable&amp;quot;&amp;quot; to &amp;quot;class=&amp;quot;wikitable&amp;quot;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Workshop}}&lt;br /&gt;
This page explains how students and teachers can use the [[Workshop activity]] and explores ways to make the most of it in your Moodle course.&lt;br /&gt;
==Workshop phases==&lt;br /&gt;
&lt;br /&gt;
The work flow for the Workshop module can be viewed as having five phases.  The typical workshop activity can cover days or even weeks.  The teacher switches the activity from one phase to another.&lt;br /&gt;
&lt;br /&gt;
The typical workshop follows a straight path from Setup to, Submission, Assessment, Grading/Evaluation, and ending with the Closed phase.  However, an advanced recursive path is also possible.&lt;br /&gt;
&lt;br /&gt;
The progress of the activity is visualized in so called Workshop planner tool. It displays all Workshop phases and highlights the current one. It also lists all the tasks the user has in the current phase with the information of whether the task is finished or not yet finished or even failed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Setup phase===&lt;br /&gt;
&lt;br /&gt;
In this initial phase, Workshop participants cannot do anything (neither modify their submissions nor their assessments). Course facilitators use this phase to change workshop settings, modify the grading strategy of tweak assessment forms. You can switch to this phase any time you need to change the Workshop setting and prevent users from modifying their work.&lt;br /&gt;
&lt;br /&gt;
===Submission phase===&lt;br /&gt;
&lt;br /&gt;
In the submission phase, Workshop participants submit their work. Access control dates can be set so that even if the Workshop is in this phase, submitting is restricted to the given time frame only. Submission start date (and time), submission end date (and time) or both can be specified.&lt;br /&gt;
&lt;br /&gt;
The workshop submissions report allows teachers to see who has submitted and who has not, and to filter by submission and last modified:&lt;br /&gt;
&lt;br /&gt;
[[File:workshopsubmisisonsreport.png|thumb|604px|center]]&lt;br /&gt;
&lt;br /&gt;
A student is able to delete their own submission as long as they can still edit it and it has not been assessed. A teacher can delete any submission at any time, however if it has been assessed, they will be warned that the assessments will also be deleted and reviewers&#039; grades may be affected.&lt;br /&gt;
&lt;br /&gt;
===Assessment phase===&lt;br /&gt;
&lt;br /&gt;
If the Workshop uses peer assessment feature, this is the phase when Workshop participants assess the submissions allocated to them for the review. As in the submission phase, access can be controlled by specified date and time since when and/or until when the assessment is allowed.&lt;br /&gt;
&lt;br /&gt;
===Grading evaluation phase===&lt;br /&gt;
&lt;br /&gt;
The major task during this phase is to calculate the final grades for submissions and for assessments and provide feedback for authors and reviewers. Workshop participants cannot modify their submissions or their assessments in this phase any more. Course facilitators can manually override the calculated grades. Also, selected submissions can be set as published so they become available to all Workshop participants in the next phase. See [[Workshop FAQ]] for instructions on how to publish submissions.&lt;br /&gt;
&lt;br /&gt;
===Closed===&lt;br /&gt;
&lt;br /&gt;
[[File:workshop final grades.png|thumb|center|500px|A closed workshop]]&lt;br /&gt;
&lt;br /&gt;
Whenever the Workshop is being switched into this phase, the final grades calculated in the previous phase are pushed into the course [[Gradebook]].This will result in the Workshop grades appearing in the Gradebook and in the workshop. Participants may view their submissions, their submission assessments and eventually other published submissions in this phase.&lt;br /&gt;
&lt;br /&gt;
==Workshop grading==&lt;br /&gt;
&lt;br /&gt;
The grades for a Workshop activity are obtained gradually over several stages and are then finalised. The following scheme illustrates the process (with information about grade values stored in the database).&lt;br /&gt;
&lt;br /&gt;
[[Image:workshop_grades_calculation.png|400px|thumb|left|The scheme of grades calculation in Workshop]]&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Participants get two grades which are calculated during the Grading evaluation phase. The teacher can edit these grades while still in this phase. They will not go to the gradebook until the workshop is closed in the final phase. Note that it is possible to move between phases and even when the workshop is closed, grades could be changed directly in the gradebook  if necessary.&lt;br /&gt;
&lt;br /&gt;
The table below explains how the grades display:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| - (-) &amp;lt; Alice&lt;br /&gt;
| There is an assessment allocated to be done by Alice, but it has been neither assessed nor evaluated yet&lt;br /&gt;
|-&lt;br /&gt;
| 68 (-) &amp;lt; Alice&lt;br /&gt;
| Alice assessed the submission, giving the grade for submission 68. The grade for assessment (grading grade) has not been evaluated yet.&lt;br /&gt;
|-&lt;br /&gt;
| 23 (-) &amp;gt; Bob&lt;br /&gt;
| Bob&#039;s submission was assessed by a peer, receiving the grade for submission 23. The grade for this assessment has not been evaluated yet.&lt;br /&gt;
|-&lt;br /&gt;
| 76 (12) &amp;lt; Cindy&lt;br /&gt;
| Cindy assessed the submission, giving the grade 76. The grade for this assessment has been evaluated 12.&lt;br /&gt;
|-&lt;br /&gt;
| 67 (8) @ 4 &amp;lt; David&lt;br /&gt;
| David assessed the submission, giving the grade for submission 67, receiving the grade for this assessment 8. His assessment has weight 4&lt;br /&gt;
|-&lt;br /&gt;
| 80 (&amp;lt;del&amp;gt;20&amp;lt;/del&amp;gt; / &amp;lt;ins&amp;gt;17&amp;lt;/ins&amp;gt;) &amp;gt; Eve&lt;br /&gt;
| Eve&#039;s submission was assessed by a peer. Eve&#039;s submission received 80 and the grade for this assessment was calculated to 20. Teacher has overridden the grading grade to 17, probably with an explanation for the reviewer.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Grade for submission ===&lt;br /&gt;
&lt;br /&gt;
The final grade for every submission is calculated as weighted mean of particular assessment grades given by all reviewers of this submission. The value is rounded to a number of decimal places set in the Workshop settings form. The teacher can influence the grade in two ways:&lt;br /&gt;
&lt;br /&gt;
* by providing their own assessment, possibly with a higher weight than usual peer reviewers have&lt;br /&gt;
* by overriding the grade to a fixed value&lt;br /&gt;
&lt;br /&gt;
=== Grade for assessment ===&lt;br /&gt;
&lt;br /&gt;
The grade for assessment tries to estimate the quality of assessments that the participant gave to the peers. This grade (also known as &#039;&#039;grading grade&#039;&#039;) is calculated by the artificial intelligence hidden within the Workshop module as it tries to do a typical teacher&#039;s job.&lt;br /&gt;
&lt;br /&gt;
During the grading evaluation phase, a Workshop subplugin is used to calculate the grades for assessment. Currently there is only one standard subplugin available called &#039;&#039;Comparison with the best assessment&#039;&#039; (other grading evaluation plugins can be found in the [https://moodle.org/plugins/browse.php?list=category&amp;amp;id=17 Moodle plugins directory]). The following text describes the method used by this subplugin.&lt;br /&gt;
&lt;br /&gt;
Grades for assessment are displayed in the brackets () in the Workshop grades report. The final grade for assessment is calculated as the average of particular grading grades.&lt;br /&gt;
&lt;br /&gt;
There is not a single formula to describe the calculation. However the process is deterministic. The workshop picks one of the assessments as the &#039;&#039;best&#039;&#039; one - that is closest to the mean of all assessments - and gives it a grade of 100%. Then it measures the &#039;distance&#039; of all other assessments from this best one and gives them lower grades depending on how different they are from the best assessment (given that the best one represents a consensus of the majority of assessors). The parameter of the calculation is how strict we should be, that is how quickly the grades fall down if they differ from the best one.&lt;br /&gt;
&lt;br /&gt;
If there are just two assessments per submission, the workshop cannot decide which of them is &#039;correct&#039;. Imagine you have two reviewers - Alice and Bob. They both assess Cindy&#039;s submission. Alice says it is  rubbish and Bob says it is excellent. There is no way of deciding who is right. So the workshop simply says - OK, you are both right and I will give you both a grade of 100% for this assessment. To prevent this, you have two options:&lt;br /&gt;
&lt;br /&gt;
* Either you have to provide an additional assessment so the number of assessors (reviewers) is odd and workshop will be able to pick the best one. Typically, the teacher comes and provide their own assessment of the submission to judge it&lt;br /&gt;
* Or you may decide that you trust one of the reviewers more. For example you know that Alice is much better in assessing than Bob is. In that case, you can increase the weight of Alice&#039;s assessment, let us say to &amp;quot;2&amp;quot; (instead of default &amp;quot;1&amp;quot;). For the purposes of calculation, Alice&#039;s assessment will be considered as if there were two reviewers having the exactly same opinion and therefore it is likely to be picked as the best one.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;It&#039;s not final grades that are compared&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It is very important to know that the grading evaluation subplugin &#039;&#039;Comparison with the best assessment&#039;&#039; does not compare the final grades. Regardless of the grading strategy used, every filled assessment form can be seen as an n-dimensional vector of normalized values. So the subplugin compares responses to all assessment form dimensions (criteria, assertions, ...). Then it calculates the distance of two assessments, using the variance statistics.&lt;br /&gt;
&lt;br /&gt;
To demonstrate this with an example, let us say you use the grading strategy Number of errors to peer-assess research essays. This strategy uses a simple list of assertions and the reviewer (assessor) just checks if the given assertion is passed or failed. Let us say you define the assessment form using three criteria:&lt;br /&gt;
&lt;br /&gt;
# Does the author state the goal of the research clearly? (yes/no)&lt;br /&gt;
# Is the research methodology described? (yes/no)&lt;br /&gt;
# Are references properly cited? (yes/no)&lt;br /&gt;
&lt;br /&gt;
Let us say the author gets 100% grade if all criteria are passed (that is answered &amp;quot;yes&amp;quot; by the assessor), 75% if only two criteria are passed, 25% if only one criterion is passed and 0% if the reviewer gives &#039;no&#039; for all three statements.&lt;br /&gt;
&lt;br /&gt;
Now imagine the work by Daniel is assessed by three colleagues - Alice, Bob and Cindy. They all give individual responses to the criteria in order:&lt;br /&gt;
&lt;br /&gt;
* Alice: yes / yes / no&lt;br /&gt;
* Bob: yes / yes / no&lt;br /&gt;
* Cindy: no / yes / yes&lt;br /&gt;
&lt;br /&gt;
As you can see, they all gave 75% grade to the submission. But Alice and Bob agree in individual responses, too, while the responses in Cindy&#039;s assessment are different. The evaluation method &#039;&#039;Comparison with the best assessment&#039;&#039; tries to imagine, how a hypothetical absolutely fair assessment would look like. In the [[Development:Workshop 2.0 specification]], David refers to it as &amp;quot;how would Zeus assess this submission?&amp;quot; and we estimate it would be something like this (we have no other way):&lt;br /&gt;
&lt;br /&gt;
* Zeus 66% yes / 100% yes / 33% yes&lt;br /&gt;
&lt;br /&gt;
Then we try to find those assessments that are closest to this theoretically objective assessment. We realize that Alice and Bob are the best ones and give 100% grade for assessment to them. Then we calculate how much far Cindy&#039;s assessment is from the best one. As you can see, Cindy&#039;s response matches the best one in only one criterion of the three so Cindy&#039;s grade for assessment will not be as high.&lt;br /&gt;
&lt;br /&gt;
The same logic applies to all other grading strategies, adequately. The conclusion is that the grade given by the best assessor does not need to be the one closest to the average as the assessments are compared at the level of individual responses, and not the final grades.&lt;br /&gt;
&lt;br /&gt;
==Groups and Workshop==&lt;br /&gt;
When a workshop is used in a course using separate or visible groups and groupings, it is possible to filter by group in a drop-down menu at the Assessment phase, manual allocation page, grades report and so on. &lt;br /&gt;
&lt;br /&gt;
[[File:workshopdropdown.png |thumb|none|upright=2.0|alt=&amp;quot;Group filtering&amp;quot; | Group filtering drop down]]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[http://school.moodledemo.net/mod/workshop/view.php?id=651 Example workshop with data] Log in with username &#039;&#039;teacher&#039;&#039;/password &#039;&#039;moodle&#039;&#039; and explore the grading and phases of a completed workshop on the Moodle School demo site.&lt;br /&gt;
&lt;br /&gt;
* [http://www.ascilite.org.au/conferences/wellington12/2012/images/custom/cox,_julian_moodle.pdf Research paper] &#039;&#039;Moodle Workshop activities support peer review in Year 1 Science: present and future&#039;&#039; by Julian M Cox, John Paul Posada and Russell Waldron&lt;br /&gt;
* Using Moodle [http://moodle.org/mod/forum/view.php?id=740 Workshop module forum]&lt;br /&gt;
* Using Moodle forum discussion [http://moodle.org/mod/forum/discuss.php?d=153268] where David explains a particular Workshop results&lt;br /&gt;
&lt;br /&gt;
[[de:Gegenseitige Beurteilung nutzen]]&lt;br /&gt;
[[es:Uso de taller]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Dataform_search_sort&amp;diff=140808</id>
		<title>Dataform search sort</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Dataform_search_sort&amp;diff=140808"/>
		<updated>2021-07-14T13:24:04Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Text replacement - &amp;quot;class=&amp;quot;nicetable&amp;quot;&amp;quot; to &amp;quot;class=&amp;quot;wikitable&amp;quot;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Dataform}}&lt;br /&gt;
{{Dataform Docs Note 1}}&lt;br /&gt;
==Using filters==&lt;br /&gt;
&lt;br /&gt;
Provided the activity creator has added the filtering options to the view, you can filter and sort the displayed list of entries by &lt;br /&gt;
*applying a predefined filter (if exist)&lt;br /&gt;
*using the quick search and per page options (Quick filter)&lt;br /&gt;
*creating and applying your own advanced filters (My saved filters)&lt;br /&gt;
&lt;br /&gt;
[[File:df-filter-display-menus.png]]&lt;br /&gt;
&lt;br /&gt;
All filters are available from the filters menu dropdown. &lt;br /&gt;
To apply a filter, select the desired filter from the list. To un-apply the currently selected filter, select &#039;Choose...&#039;. &lt;br /&gt;
&lt;br /&gt;
[[File:df-filter-display-menu-options.png]]&lt;br /&gt;
&lt;br /&gt;
==The Quick filter==&lt;br /&gt;
To display only entries that &#039;&#039;&#039;contain&#039;&#039;&#039; a certain text content in any of the (view) fields enter the text in the &#039;Search&#039; input box and press Enter. This will create the Quick filter (or update it if it already exists) and apply it to the view (the Quick filter will show as selected in the filters menu). If you want to clear the search criterion from the Quick filter, clear the input box and press Enter.&lt;br /&gt;
&lt;br /&gt;
To display only a certain number of entries per page, select the desired number in the Per page dropdown. Similar to the &#039;Search&#039;, a Quick filter will be created (or updated) and applied. If you want to clear the paging from the Quick filter, select &#039;Choose...&#039; in the &#039;Per page&#039; dropdown.&lt;br /&gt;
&lt;br /&gt;
You have only one Quick filter and it is updated whenever you use the &#039;Search&#039; and &#039;Per page&#039; options. If you want to completely remove the Quick filter from the list, select &#039;* Reset quick filter&#039; in the filters menu.&lt;br /&gt;
==The Advanced (user) filter==&lt;br /&gt;
If Advanced filters are enabled in a view you can click the &#039;Advanced filter&#039; link to open the advanced filter form. You can edit one of your saved advanced filters by first applying it to the view and then clicking the &#039;Advanced filter&#039; link.&lt;br /&gt;
&lt;br /&gt;
The advanced filter form allows you to add sort and search criteria on the view fields. In most cases you search/sort the field content. Some fields may have more than one search/sort element. &lt;br /&gt;
&lt;br /&gt;
To define a sort criterion select the field element and the sort order (ascending|descending). The sort order dropdown of the criterion is disabled until to select the element. You can define multiple criteria and input fields for further criteria will be added to the form after filling the displayed ones and saving changes.&lt;br /&gt;
&lt;br /&gt;
To define a search criterion:&lt;br /&gt;
*select AND|OR – Retrieved entries will match all AND criteria and at least one of the the OR criteria.&lt;br /&gt;
*select field – Field element.&lt;br /&gt;
*select IS|NOT – With NOT only entries that do not match the criterion will be retrieved.&lt;br /&gt;
*select operator&lt;br /&gt;
**Empty&lt;br /&gt;
**Equal&lt;br /&gt;
**Greater than&lt;br /&gt;
**Less than&lt;br /&gt;
**Greater or equal&lt;br /&gt;
**Less or equal&lt;br /&gt;
**Between&lt;br /&gt;
**Contains&lt;br /&gt;
**In&lt;br /&gt;
*Enter search string – See list below for special search string formats in some fields.&lt;br /&gt;
&lt;br /&gt;
When editing a saved filter you can either update that filter or add a new filter. You can save up to 5 filters per view. Adding further filters will drop older ones from the list.&lt;br /&gt;
&lt;br /&gt;
[[File:df-filter-advanced-form.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Searchable/Sortable fields===&lt;br /&gt;
This list includes only internal and standard fields. For search/sort options of add-on fields please consult the respective field&#039;s page.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;  style=&amp;quot;background-color:inherit;border:0;&amp;quot;   &lt;br /&gt;
{{Dataform searchable sortable field table row |  | [[Dataformfield entryactions|Entry actions]] | N/A }}&lt;br /&gt;
{{Dataform searchable sortable field table row |#F6F6F6| [[Dataformfield entryauthor|Entry author]] | {{Dataformfield entryauthor search sort}} }}&lt;br /&gt;
{{Dataform searchable sortable field table row |  | [[Dataformfield entrygroup|Entry group]] | {{Dataformfield entrygroup search sort}} }}&lt;br /&gt;
{{Dataform searchable sortable field table row |#F6F6F6| [[Dataformfield entrytime|Entry time]] | {{Dataformfield entrytime search sort}} }}&lt;br /&gt;
{{Dataform searchable sortable field table row |  | [[Dataformfield checkbox|Checkbox]] | {{Dataformfield checkbox search sort}} }}&lt;br /&gt;
{{Dataform searchable sortable field table row |#F6F6F6| [[Dataformfield commentmdl|Comment Mdl]] | {{Dataformfield commentmdl search sort}} }}&lt;br /&gt;
{{Dataform searchable sortable field table row |  | [[Dataformfield entrystate|Entry state]] | {{Dataformfield entrystate search sort}} }}&lt;br /&gt;
{{Dataform searchable sortable field table row |#F6F6F6| [[Dataformfield file|File]] | {{Dataformfield file search sort}} }}&lt;br /&gt;
{{Dataform searchable sortable field table row |  | [[Dataformfield number|Number]] | {{Dataformfield number search sort}} }}&lt;br /&gt;
{{Dataform searchable sortable field table row |#F6F6F6| [[Dataformfield picture|Picture]] | {{Dataformfield picture search sort}} }}&lt;br /&gt;
{{Dataform searchable sortable field table row |  | [[Dataformfield radiobutton|Radio button]] | {{Dataformfield radiobutton search sort}} }}&lt;br /&gt;
{{Dataform searchable sortable field table row |#F6F6F6| [[Dataformfield ratingmdl|Rating Mdl]] | {{Dataformfield ratingmdl search sort}}  }}&lt;br /&gt;
{{Dataform searchable sortable field table row |  | [[Dataformfield select|Select]] | {{Dataformfield select search sort}} }}&lt;br /&gt;
{{Dataform searchable sortable field table row |#F6F6F6| [[Dataformfield selectmulti|Select (multiple)]] | {{Dataformfield selectmulti search sort}} }}&lt;br /&gt;
{{Dataform searchable sortable field table row |  | [[Dataformfield text|Text]] | {{Dataformfield text search sort}} }}&lt;br /&gt;
{{Dataform searchable sortable field table row |#F6F6F6| [[Dataformfield textarea|Text area]] | {{Dataformfield textarea search sort}} }}&lt;br /&gt;
{{Dataform searchable sortable field table row |  | [[Dataformfield time|Time]] | {{Dataformfield time search sort}} }}&lt;br /&gt;
{{Dataform searchable sortable field table row |#F6F6F6| [[Dataformfield url|Url]] | {{Dataformfield url search sort}} }}&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=DragMath_equation_editor&amp;diff=140807</id>
		<title>DragMath equation editor</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=DragMath_equation_editor&amp;diff=140807"/>
		<updated>2021-07-14T13:24:03Z</updated>

		<summary type="html">&lt;p&gt;Mudrd8mz: Text replacement - &amp;quot;class=&amp;quot;nicetable&amp;quot;&amp;quot; to &amp;quot;class=&amp;quot;wikitable&amp;quot;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&#039;&#039;&#039;WARNING:&#039;&#039;&#039;  To use DragMath, you need to activate the TeX filter in Moodle.  End users will also need to have a recent Java Runtime Environment installed.   DragMath is no longer available in the new Atto editor introduced in Moodle 2.7. DragMath was available in the TinyMCE editor in Moodle 2.7, it is not distributed in Moodle 2.8 and later.  It is available elsewhere as a third-party plugin which may be downloaded and installed by an administrator.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
To quote the W3C [http://www.w3.org/Math/Software/mathml_software_cat_editors.html]:&lt;br /&gt;
 This is an open-source drag and drop equation editor written in Java.&lt;br /&gt;
 Once an expression is created the user can convert it into a variety &lt;br /&gt;
 of different linear syntax for mathematics, including MathML, LaTeX,&lt;br /&gt;
 Maple, Maxima or any user defined style.&lt;br /&gt;
Created by Christoper Sangwin and Alexander Billingsley at the University of Birmingham as part of the [http://www.stack.bham.ac.uk STACK project],  DragMath allows students to build mathematical expressions using a graphical drag-and-drop interface similar in appearance to that available in a number of office productivity suites. &lt;br /&gt;
&lt;br /&gt;
John Isner initially created and maintained several files that allowed for integration of DragMath with HTMLArea, Moodle&#039;s editor in 2007.  DragMath was then maintained by Marc Grober until it was integrated into core Moodle with the release of Moodle 2.0. An outgrowth of the development to integrate DragMath into tinyMCE has been the development of SEE by Mauno Korpelainen (a link to those plugins can be found below.) &lt;br /&gt;
&lt;br /&gt;
To use DragMath, users must have the Java Runtime Environment (JRE) version 1.5 or higher installed on their desktop computers.  Most systems come with the JRE as standard equipment, so you may not have to do anything. If you need to install the JRE manually, you can download it from [http://java.com/en/download/index.jsp here].  Note that the JRE is variously known as Java software for your computer, Java Runtime Environment, the Java Runtime, Runtime Environment, Runtime, Java Virtual Machine, Virtual Machine, Java VM, JVM, VM, or Java download.  &lt;br /&gt;
 &lt;br /&gt;
You can see a demo of the DragMath editor [http://www.dragmath.bham.ac.uk/ here].  The DragMath interface is highly intuitive and anyone can be using it productively after a few minutes of trial-and-error.  If you have questions about the editor, there is a short manual [http://www.dragmath.bham.ac.uk/doc/index.html here]  which also discusses the various configuration options, some of which are mentioned briefly below.&lt;br /&gt;
&lt;br /&gt;
==Using DragMath==&lt;br /&gt;
DragMath is based on the simple idea that the User who does not know a lot of TeX (pronounced Tech) can still create mathematical formula for publishing. In this case, Moodle is the dispaly agent so the TeX formulae are then rendered to a Moodle screen. This essentially means that with little experience, any Junior High Maths teacher can generate all the formulae they need for most aspects of Maths in Moodle.&lt;br /&gt;
&lt;br /&gt;
===Creating simple expressions===&lt;br /&gt;
&lt;br /&gt;
To begin, click on the DragMath insertion button. This opens The DragMath interface. &lt;br /&gt;
&lt;br /&gt;
[[Image:dragmath02.png|thumb|200px|center|Opening Dragmath]] &lt;br /&gt;
&lt;br /&gt;
The toolbar is different than you may expect, we are used to nice neat rows of buttons, but Dragmath has to use tabs. Each tab is tab is a collection of &amp;quot;templates&amp;quot;, that is each symbol is a &amp;quot;template&amp;quot; and can be dragged and dropped onto the work space.&lt;br /&gt;
&lt;br /&gt;
[[Image:dragmath01.png|thumb|200px|center|The DragMath Interface]] &lt;br /&gt;
&lt;br /&gt;
To end editing and insert the script into the Moodle page, click the Insert button. This simple, but not simplistic, interface is a strength of DragMath. It make it easy for even novices to create complex formulae.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
| colspan=&amp;quot;4&amp;quot;|&#039;&#039;&#039;A sequence for DragMath - click an image to enlarge&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|[[Image:dragmath04f.png|thumb|150px|Select the Tab with the symbols required]]&lt;br /&gt;
|[[Image:dragmath03.png|thumb|150px|Click, hold then drag&#039;n&#039;drop a symbol]]&lt;br /&gt;
|[[Image:dragmath04.png|thumb|150px|Enter the values, select an operation symbol]]&lt;br /&gt;
|[[Image:dragmath04a.png|thumb|150px|Select another symbol and drag&#039;n&#039;drop]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Image:dragmath04b.png|thumb|150px|Add an equal (or other) sign]]&lt;br /&gt;
|[[Image:dragmath04c.png|thumb|150px|Add in a variable, (chi in this case) ]]&lt;br /&gt;
|[[Image:dragmath04d.png|thumb|150px|Click Insert]]&lt;br /&gt;
|[[Image:dragmath04e.png|thumb|150px|See the encoded result in the editing dialog.]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This same sequence of operations apply equally for all formulae, all insertions, no matter how complex they become. &lt;br /&gt;
&lt;br /&gt;
You can insert a template from the toolbar by drag and drop or by a click on the template in the tab, then clicking in the workspace.&lt;br /&gt;
&lt;br /&gt;
===Creating more complex expressions===&lt;br /&gt;
&lt;br /&gt;
More complex expressions are pretty much more of the same as above. Creating a simple multiplication table matrix, for example, seems complex,but in DragNath, it is actually simple:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
| colspan=&amp;quot;4&amp;quot;|&#039;&#039;&#039;A sequence for a simple Multiplication Matrice in DragMath - click an image to enlarge&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|[[Image:dragmath05.png|thumb|150px|Select the Tab and add in the multiplier]]&lt;br /&gt;
|[[Image:dragmath05a.png|thumb|150px|Click, hold then drag&#039;n&#039;drop the Matrix symbol]]&lt;br /&gt;
|[[Image:dragmath05b.png|thumb|150px|Enter the values, select a equal symbol]]&lt;br /&gt;
|[[Image:dragmath05c.png|thumb|150px|Add in the rows required]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Image:dragmath05d.png|thumb|150px|Add in the columns required]]&lt;br /&gt;
|[[Image:dragmath05e.png|thumb|150px|Edit the Matrice ]]&lt;br /&gt;
|[[Image:dragmath05f.png|thumb|150px|Add the equal symbol]]&lt;br /&gt;
|[[Image:dragmath05g.png|thumb|150px|Add and edit in the second Matrice.]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Locally saving and restoring a DragMath expression===&lt;br /&gt;
When you press the Insert button, DragMath inserts the export string into your text and the DragMath window closes. &#039;&#039;The exported string can no longer be manipulated using DragMath.&#039;&#039;  If you decide to change the string, you have two options:&lt;br /&gt;
*delete the string (including the dollar signs or other token) and completely recreate it using DragMath&lt;br /&gt;
*edit the expression by hand&lt;br /&gt;
You can not tell DragMath to re-read the expression and show it again in two dimensions.  This is a theoretical limitation, not a limitation of DragMath.&lt;br /&gt;
&lt;br /&gt;
But suppose the expression is very complicated.  It would be impractical to start over just to make a simple change.  Before you Insert the expression, you can save a copy of the expression (a .drgm file) to your local disk using the Save button (see screenshot).  Later, if you need to make a change, you open the saved .drgm file.&lt;br /&gt;
&lt;br /&gt;
[[Image:Dragmath_save_and_restore.png|DragMath instructions]]&lt;br /&gt;
&lt;br /&gt;
A .drgm file contains three-dimensional representation of your mathematical expression.  It is a binary file that can only be opened by DragMath.&lt;br /&gt;
===Additional Editing===&lt;br /&gt;
&lt;br /&gt;
There are times when &#039;&#039;&#039;DragMath&#039;&#039;&#039; is not going to have a symbol or something you might want. Or perhaps you left something out of the DragMath constuctor, so you want to include it manually. Most likely, for something like the matrix created earlier, I want to go to 15, which means I have to change the structure of the matrix, and edit in some numbers. This is easily done with a little forethought. Copy and paste and delete or edit what you want and do not want.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
| colspan=&amp;quot;4&amp;quot;|&#039;&#039;&#039;Manually editing a DragMath construction  - click an image to enlarge&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|[[Image:dragmath06a.png|thumb|150px|Select, copy and paste the original matrix]]&lt;br /&gt;
|[[Image:dragmath06b.png|thumb|150px|Edit to what is actually required]]&lt;br /&gt;
|[[Image:dragmath06c.png|thumb|150px|Delete the original matrix]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Sometimes however, you just want to include something you forgot, or rather, add something that was not there in the first place. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
| colspan=&amp;quot;4&amp;quot;|&#039;&#039;&#039;Accurately editing a DragMath construction manually  - click an image to enlarge&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|[[Image:dragmath06d.png|thumb|150px|Construct the original equation]]&lt;br /&gt;
|[[Image:dragmath06e.png|thumb|150px|Copy, then edit to what is actually required]]&lt;br /&gt;
|[[Image:dragmath06f.png|thumb|150px|Return to the edited page]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==What DragMath Does and How It Does It==&lt;br /&gt;
===Configuration files===&lt;br /&gt;
DragMath allows you to create your own configuration files.  That means it can be used to parse and display what you tell it to parse and display.  By way of example, DragMath comes with a number of configuration files,  one of which has been specifically designed to place doubledollar tokens before and after inserted text. We have seen a number of people change the TeX tokens in Modle using MathJax, and then become nonplussed that DragMath stops working.  No DragMath still works,  but it is likely inserting tokens that MathJax is not parsing. This can get confusing if you have more than one display technology in place.  DragMath allows you to alter the tokens it inserts, so you can quite easily, for example, have DragMath insert startmath or endmath if that is what you want to use for tokens.&lt;br /&gt;
===Language Files===&lt;br /&gt;
DragMath can also use quite a few languages.&lt;br /&gt;
==So! You want to use DragMath but don&#039;t want to use the TeX filter?==&lt;br /&gt;
===What?===&lt;br /&gt;
Yes.  Moodle devs decided that you should not use DragMath unless you used the Moodle TeX filter (yes, over objections from lots of folk.)  Does that mean that the TeX filter is the best way to go? Hardly.  The TeX filter is rather long in the tooth, desperately in need of revision, and essentially only provides a fallback to a mimetex binary if you have not installed a TeX distribution. There are lots of other options for Math display in Moodle,  may of them much easier to configure and use!&lt;br /&gt;
===Procedure===&lt;br /&gt;
====Decoupling DragMath from the Tex Filter====&lt;br /&gt;
Since default configuration of tinymce (the default editor) requires that TeX filter is enabled before Dragmath plugin can be used we need to edit file lib/editor/tinymce/lib.php&lt;br /&gt;
&lt;br /&gt;
First, make a copy of that file to make sure that you can revert back to the original. &lt;br /&gt;
&lt;br /&gt;
Second, open the file for editing (with an appropriate editor that will not do unseen things to the contents of your file)&lt;br /&gt;
&lt;br /&gt;
Third, locate lines 107-111:&lt;br /&gt;
&lt;br /&gt;
 if (array_key_exists(&#039;filter/tex&#039;, $filters)) {&lt;br /&gt;
 $xdragmath = &#039;dragmath,&#039;;&lt;br /&gt;
 } else {&lt;br /&gt;
 $xdragmath = &#039;&#039;;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Fourth, replace all those lines with this one line:&lt;br /&gt;
&lt;br /&gt;
 $xdragmath = &#039;dragmath,&#039;;&lt;br /&gt;
&lt;br /&gt;
removing the if statement that makes DragMath visible only if the TeX filter is turned on.&lt;br /&gt;
&lt;br /&gt;
Fifth, save the file.&lt;br /&gt;
&lt;br /&gt;
Sixth, replace the original file lib/editor/tinymce/lib.php with this modified version.&lt;br /&gt;
&lt;br /&gt;
====Setting up another display mechanism====&lt;br /&gt;
Now DragMath will show up in your editor,  but you have no way of displaying the TeX or other code that you might insert with DragMath. You can explore the docs and the Math forum and you will find quite a few other ways to display Math in Moodle.  One very popular way is to use MathJax. Under Moodle 2.x the AdditionalHtml field can be used to add the reference to MathJax and even do some configuration. &lt;br /&gt;
To accomplish this, as an administrator of your site go to: Site administration -&amp;gt; Appearance -&amp;gt; Additional HTML -&amp;gt; Within HEAD &lt;br /&gt;
Now, add &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;link rel=&amp;quot;stylesheet&amp;quot; type=&amp;quot;text/css&amp;quot; href=&amp;quot;http://jsxgraph.uni-bayreuth.de/distrib/jsxgraph.css&amp;quot; media=&amp;quot;screen&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;http://jsxgraph.uni-bayreuth.de/distrib/jsxgraphcore.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
 &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;http://jsxgraph.uni-bayreuth.de/distrib/GeonextReader.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
 &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML&amp;quot;&amp;gt;&lt;br /&gt;
 MathJax.Hub.Config({&lt;br /&gt;
    tex2jax: {&lt;br /&gt;
      inlineMath: [ [&#039;$$&#039;,&#039;$$&#039;], [&amp;quot;\\(&amp;quot;,&amp;quot;\\)&amp;quot;], [&#039;@i&#039;,&#039;@i&#039;] ], &lt;br /&gt;
      displayMath:[ [&amp;quot;\\[&amp;quot;,&amp;quot;\\[&amp;quot;], [&#039;@d&#039;,&#039;@d&#039;] ],&lt;br /&gt;
      processEscapes: true&lt;br /&gt;
    }&lt;br /&gt;
  });&lt;br /&gt;
 &amp;lt;/script&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
Save changes.&lt;br /&gt;
&lt;br /&gt;
Make sure that Tex filter and Algebra filter are disabled in Site administration &amp;gt; Plugins &amp;gt; Filters &amp;gt; Manage filters&lt;br /&gt;
&lt;br /&gt;
Your moodle 2 is now using MathJax from a cloud server in cdn.mathjax.org with given delimiters (in this example double dollars and @i  for inlineMath and @d for displayMath). You can choose to use other delimiters in configuration if you want or swap hat are there, BUT you may not use delimiters Moodle employs for other purposes and you need to be very careful of the syntax. You do not need to have the same token for beginning and end (for example,  one could use startmath and endmath as tokens. See http://mathjax.org for additional information on these and other parameters.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Wait!&amp;quot;, you say. &amp;quot;What about the first three lines I added to AdditionalHtml?&amp;quot; We thought you would never ask.  These lines add access to jsxgraph and GeoNextReader which you can find discussed in these forums and at the jsxgraph site, http://jsxgraph.uni-bayreuth.de/wp/ Consider this temporary, as you shoulod update the jsxgraph reference to use its cloud source. See a discussion here: http://jsxgraph.uni-bayreuth.de/wp/download/&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
* [[Advanced Maths Tools]] For an explanation of the SEE tools&lt;br /&gt;
* [[Using TeX Notation]] Some ideas and syntax&lt;br /&gt;
* [[TeX notation filter]] Turning TeX on&lt;br /&gt;
* [http://www.youtube.com/watch?v=mfc7umQ2xLA| A simple YouTube video] Constructing a simple equation. &lt;br /&gt;
&lt;br /&gt;
*[http://www.youtube.com/watch?feature=endscreen&amp;amp;NR=1&amp;amp;v=8wfjwJTa784|  Dragmath tutorial 1]  &lt;br /&gt;
*[http://www.youtube.com/watch?v=XIuMNrvsVN8|  Dragmath tutorial 2]  &lt;br /&gt;
*[http://www.youtube.com/watch?v=g98o0fpmosQ&amp;amp;feature=relmfu|  Dragmath tutorial 3]  &lt;br /&gt;
*[http://www.youtube.com/watch?v=88KN2Y-pJw0&amp;amp;feature=relmfu|  Dragmath tutorial 4]  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Discussion of the transition of DragMath to Moodle core: http://moodle.org/mod/forum/discuss.php?d=125977&amp;amp;parent=551794&lt;br /&gt;
&lt;br /&gt;
[[ca:DragMath_editor_d%27equacions]]&lt;br /&gt;
[[es:Editor de ecuación DragMath]]&lt;br /&gt;
[[fr:Dragmath]]&lt;/div&gt;</summary>
		<author><name>Mudrd8mz</name></author>
	</entry>
</feed>