<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.moodle.org/36/en/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Francois%40catalyst.net.nz</id>
	<title>MoodleDocs - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://docs.moodle.org/36/en/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Francois%40catalyst.net.nz"/>
	<link rel="alternate" type="text/html" href="https://docs.moodle.org/36/en/Special:Contributions/Francois@catalyst.net.nz"/>
	<updated>2026-04-17T12:45:12Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://docs.moodle.org/36/en/index.php?title=User:Francois_Marier&amp;diff=58061</id>
		<title>User:Francois Marier</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/36/en/index.php?title=User:Francois_Marier&amp;diff=58061"/>
		<updated>2009-06-15T22:44:56Z</updated>

		<summary type="html">&lt;p&gt;Francois@catalyst.net.nz: Link to my other sites&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Moodle developer at [http://www.catalyst.net.nz/moodle Catalyst IT]&lt;br /&gt;
&lt;br /&gt;
* Blog: http://feeding.cloud.geek.nz&lt;br /&gt;
* Twitter: http://twitter.com/fmarier&lt;br /&gt;
* Identica: http://identi.ca/fmarier&lt;br /&gt;
* Ohloh: http://www.ohloh.net/accounts/fmarier&lt;/div&gt;</summary>
		<author><name>Francois@catalyst.net.nz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/36/en/index.php?title=External_Search_block&amp;diff=54641</id>
		<title>External Search block</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/36/en/index.php?title=External_Search_block&amp;diff=54641"/>
		<updated>2009-04-22T01:56:27Z</updated>

		<summary type="html">&lt;p&gt;Francois@catalyst.net.nz: Add screenshots&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This block is used to allow teachers to provide their students with an easy way of using an external search engine from within a course page.&lt;br /&gt;
&lt;br /&gt;
[[Image:extsearch_block.png|center]]&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
&lt;br /&gt;
# Unpack the module into your Moodle installation in order to create a &amp;lt;tt&amp;gt;blocks/extsearch&amp;lt;/tt&amp;gt; directory&lt;br /&gt;
# Visit the &amp;lt;tt&amp;gt;/admin/index.php&amp;lt;/tt&amp;gt; page to trigger the module installation.&lt;br /&gt;
# Change the default options in the block configuration. For example, you will need to provide [http://www.digitalnz.org/dashboard/api_key your own API key] if you want to enable the Digital NZ search functionality.&lt;br /&gt;
&lt;br /&gt;
[[Image:extsearch_config.png|center]]&lt;br /&gt;
&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
* [http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=2337 Download]&lt;/div&gt;</summary>
		<author><name>Francois@catalyst.net.nz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/36/en/index.php?title=File:extsearch_config.png&amp;diff=54640</id>
		<title>File:extsearch config.png</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/36/en/index.php?title=File:extsearch_config.png&amp;diff=54640"/>
		<updated>2009-04-22T01:55:53Z</updated>

		<summary type="html">&lt;p&gt;Francois@catalyst.net.nz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Francois@catalyst.net.nz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/36/en/index.php?title=File:extsearch_block.png&amp;diff=54639</id>
		<title>File:extsearch block.png</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/36/en/index.php?title=File:extsearch_block.png&amp;diff=54639"/>
		<updated>2009-04-22T01:55:12Z</updated>

		<summary type="html">&lt;p&gt;Francois@catalyst.net.nz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Francois@catalyst.net.nz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/36/en/index.php?title=External_Search_block&amp;diff=54620</id>
		<title>External Search block</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/36/en/index.php?title=External_Search_block&amp;diff=54620"/>
		<updated>2009-04-22T00:09:54Z</updated>

		<summary type="html">&lt;p&gt;Francois@catalyst.net.nz: Link to the module and plugin page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This block is used to allow teachers to provide their students with an easy way of using an external search engine from within a course page.&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
&lt;br /&gt;
# Unpack the module into your Moodle installation in order to create a &amp;lt;tt&amp;gt;blocks/extsearch&amp;lt;/tt&amp;gt; directory&lt;br /&gt;
# Visit the &amp;lt;tt&amp;gt;/admin/index.php&amp;lt;/tt&amp;gt; page to trigger the module installation.&lt;br /&gt;
# Change the default options in the block configuration. For example, you will need to provide [http://www.digitalnz.org/dashboard/api_key your own API key] if you want to enable the Digital NZ search functionality.&lt;br /&gt;
&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
* [http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=2337 Download]&lt;/div&gt;</summary>
		<author><name>Francois@catalyst.net.nz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/36/en/index.php?title=External_Search_block&amp;diff=54619</id>
		<title>External Search block</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/36/en/index.php?title=External_Search_block&amp;diff=54619"/>
		<updated>2009-04-22T00:08:02Z</updated>

		<summary type="html">&lt;p&gt;Francois@catalyst.net.nz: Installation instructions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This block is used to allow teachers to provide their students with an easy&lt;br /&gt;
way of using an external search engine from within a course page.&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
&lt;br /&gt;
# Unpack the module into your Moodle installation in order to create a &amp;lt;tt&amp;gt;blocks/extsearch&amp;lt;/tt&amp;gt; directory&lt;br /&gt;
# Visit the &amp;lt;tt&amp;gt;/admin/index.php&amp;lt;/tt&amp;gt; page to trigger the module installation.&lt;br /&gt;
# Change the default options in the block configuration. For example, you will need to provide [http://www.digitalnz.org/dashboard/api_key your own API key] if you want to enable the Digital NZ search functionality.&lt;/div&gt;</summary>
		<author><name>Francois@catalyst.net.nz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/36/en/index.php?title=Development:Gradebook_improvements&amp;diff=47887</id>
		<title>Development:Gradebook improvements</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/36/en/index.php?title=Development:Gradebook_improvements&amp;diff=47887"/>
		<updated>2008-12-09T04:42:19Z</updated>

		<summary type="html">&lt;p&gt;Francois@catalyst.net.nz: more flexible export plugins&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Moodle 2.0}}&lt;br /&gt;
&lt;br /&gt;
Same aspects of gradebook were not fully solved in 1.9.x, this page tries to summarize potential improvements&lt;br /&gt;
&lt;br /&gt;
==Aggregation of hidden grades==&lt;br /&gt;
Overlook problem partially solve after the database freeze - workaround was to recalculate the grades on the fly so that users that can the hidden grades are ignored. This approach is expensive and can not be used in conditional activities, grade exports, etc.&lt;br /&gt;
&lt;br /&gt;
Solution is to add new flag into grade categories - &#039;&#039;aggregate hidden grades&#039;&#039;. Having two values for each grade would be too complex, selective agrragation should solve most of the problems and should be reasonably backwards compatible.&lt;br /&gt;
&lt;br /&gt;
==Final grading in activities==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Effectiveness of grading interface==&lt;br /&gt;
&lt;br /&gt;
==Tracking of submission dates==&lt;br /&gt;
&lt;br /&gt;
==Exports: more flexibility==&lt;br /&gt;
&lt;br /&gt;
Two aspects of the 1.9 export plugin have been criticised by some of Catalyst&#039;s clients:&lt;br /&gt;
&lt;br /&gt;
* the fact that grade exports are tied to a course&lt;br /&gt;
* the default user profile columns are not all needed and some custom ones would be necessary&lt;br /&gt;
&lt;br /&gt;
Therefore I propose the following changes:&lt;br /&gt;
* removing the export plugin dependency on a single course by converting to an array of courses (see [http://tracker.moodle.org/browse/MDL-17420] )&lt;br /&gt;
* making the user-related columns customisable (see [http://tracker.moodle.org/browse/MDL-17346])&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [[Development:Tim&#039;s_Gradebook_thoughts|Tim&#039;s Gradebook thoughts]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;/div&gt;</summary>
		<author><name>Francois@catalyst.net.nz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/36/en/index.php?title=Face-to-face_FAQ&amp;diff=46281</id>
		<title>Face-to-face FAQ</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/36/en/index.php?title=Face-to-face_FAQ&amp;diff=46281"/>
		<updated>2008-11-05T21:11:43Z</updated>

		<summary type="html">&lt;p&gt;Francois@catalyst.net.nz: how to edit default email messages&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Facetoface}}&lt;br /&gt;
&lt;br /&gt;
Here is a collection of questions that were asked on the [http://moodle.org/mod/forum/view.php?id=7136 forum] or through other means.&lt;br /&gt;
&lt;br /&gt;
==Where do I include the Manager&#039;s email address for notification?==&lt;br /&gt;
&lt;br /&gt;
Using the Moodle 1.8 version of the Face-to-face module, the way we do this is through the &amp;quot;MSN messenger&amp;quot; field on the user profile page. So instead of storing your MSN user account, this field stores your manager&#039;s email address.&lt;br /&gt;
&lt;br /&gt;
Starting with the Moodle 1.9 version of the Face-to-face module, a custom field called &amp;quot;Manager&#039;s email&amp;quot; is added to the user profile page.&lt;br /&gt;
&lt;br /&gt;
==How do I setup a wait listed session?==&lt;br /&gt;
&lt;br /&gt;
A &#039;wait-listed session&#039; in the Face-to-face module is a session for which no date is currently set. Users can then register their interest in attending a Face-to-face course even if it&#039;s not offered at this time.&lt;br /&gt;
&lt;br /&gt;
There is no way at this time to &amp;quot;exceed&amp;quot; the capacity of a given session but this can be approximated by adding a second session without a date on which users can sign-up if the other one is full.&lt;br /&gt;
&lt;br /&gt;
See this [http://moodle.org/mod/forum/discuss.php?d=96118 forum thread] for more information.&lt;br /&gt;
&lt;br /&gt;
==How can I use Face-to-face in a course?==&lt;br /&gt;
===Blended course===&lt;br /&gt;
Here is a blended, train the trainer course. &lt;br /&gt;
*Topic 1. The trainees receive initial information by 2 Lessons. They complete an off line assignment and email that to the instructor. There is a forum where the trainees are expected to participate and help each other. &lt;br /&gt;
*Topic 2. The trainees receive more information by a lesson, are asked to create outcomes for a training topic and then arrive at their first face to face lab. This lab is offered in two different locations at different dates and times.  &lt;br /&gt;
*Topic 3. This is the Capstone.  Here they take the work they started in the first lab and expand it.  In a smaller face-to-face sessions they will get a chance to see and critique other trainee&#039;s lesson.  The instructor will post all assignments for everyone to see and download.  &lt;br /&gt;
*Topic 4. At a later time, trainees take a quiz  and fill out a survey.&lt;br /&gt;
*Topic 5. They receive a certificate based upon their overall score.&lt;br /&gt;
[[Image:Face2Face in a course 1.png|center|frame|Blended course example]]&lt;br /&gt;
&lt;br /&gt;
==How to modify the master copy of the confirmation emails?==&lt;br /&gt;
&lt;br /&gt;
To modify the default message for any of the emails sent out, simply a local customisation to the appropriate language pack using the normal mechanism:&lt;br /&gt;
&lt;br /&gt;
# Go to the Administration area&lt;br /&gt;
# Click on Language, then &amp;quot;Language editing&amp;quot;&lt;br /&gt;
# Select the desired &amp;quot;Current language&amp;quot;&lt;br /&gt;
# Click on &amp;quot;Edit words and phrases&amp;quot;&lt;br /&gt;
# In the &amp;quot;Choose file to edit&amp;quot; drop-down, scroll to the very bottom and select &amp;quot;facetoface.php (mod/facetoface)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
From there, you can change any of the strings you want.&lt;/div&gt;</summary>
		<author><name>Francois@catalyst.net.nz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/36/en/index.php?title=Development:Admin_reports&amp;diff=43281</id>
		<title>Development:Admin reports</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/36/en/index.php?title=Development:Admin_reports&amp;diff=43281"/>
		<updated>2008-09-09T06:23:28Z</updated>

		<summary type="html">&lt;p&gt;Francois@catalyst.net.nz: typo in a heading&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&lt;br /&gt;
An admin report is a folder of code under admin/report. For example, you might make a folder in there called &#039;&#039;&#039;myreport&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
In there, the only code you are required to have is an index.php file. This will normally display a simple HTML form for controlling the report, and, the code for displaying the report. You will probably also want a language file, which would be called lang/en_utf8/report_myreport.php following the example above. &lt;br /&gt;
&lt;br /&gt;
In addition, you can add any other PHP code you like, and then link people to it from index.php.&lt;br /&gt;
&lt;br /&gt;
So, the minimal code layout is:&lt;br /&gt;
&lt;br /&gt;
 admin/&lt;br /&gt;
   ...&lt;br /&gt;
   report/&lt;br /&gt;
     backups/&lt;br /&gt;
     capability/&lt;br /&gt;
     ...&lt;br /&gt;
     myreport/&lt;br /&gt;
       lang/&lt;br /&gt;
         en_utf8/&lt;br /&gt;
           report_myreport.php&lt;br /&gt;
       index.php&lt;br /&gt;
     ...&lt;br /&gt;
  ...&lt;br /&gt;
&lt;br /&gt;
==What to do in index.php==&lt;br /&gt;
&lt;br /&gt;
The simplest way to work this out is by example. You should look at some of the reports that ship with Moodle. [http://cvs.moodle.org/moodle/admin/report/capability/index.php?view=markup admin/report/capability], is a good one to start with. Let us go through that example to see what is there (I will put into italics the bits that are more advanced - the things that the capability report does, but which a simple report will not need to do.):&lt;br /&gt;
# Require some libraries. Admin reports will always need config.php and adminlib.php.&lt;br /&gt;
# Check the user is logged in and has appropriate permissions. &#039;&#039;(Normally admin reports are controlled by the &#039;moodle/site:viewreports&#039; capability, the capability report is a special case.)&#039;&#039;&lt;br /&gt;
# Get the parameters from the URL that control the report, and clean them up a bit.&lt;br /&gt;
# &#039;&#039;Include some JavaScript code that enhances the report for people with JavaScript turned on in their browser.&#039;&#039;&lt;br /&gt;
# Log this request.&lt;br /&gt;
# Print the page header. Since this is an administration page, we need to do this using the admin_externalpage... functions. You probably just need to copy these three lines exactly, then replace every occurrence of &#039;capability&#039; with your report name.&lt;br /&gt;
# Display a form to control the report.&lt;br /&gt;
# If the URL contains all the parameters needed to generate the report, do so, and display the results. &#039;&#039;(You don&#039;t need to understand the details of what the capability report is doing, because your report will do something different. However, the general structure will probably be the same: get some data out of the database, then display it.)&#039;&#039;&lt;br /&gt;
# Print the footer, using the admin_externalpage... function.&lt;br /&gt;
# &#039;&#039;Define some functions, if that is the best way to structure the code of your report. You could, of course, create a separate lib.php file inside your report folder.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==How your report gets included in the admin tree==&lt;br /&gt;
&lt;br /&gt;
By default, your report will be included in the admin tree under the &#039;Reports&#039; section, and it will only appear to people with the &#039;moodle/site:viewreports&#039; capability. If the report is in the &#039;&#039;myreport&#039;&#039; folder, then the report name will be get_string(&amp;quot;myreport&amp;quot;, &amp;quot;report_&#039;&#039;myreport&#039;&#039;&amp;quot;). The report name, needed for the call to admin_externalpage_setup, will be &amp;quot;report&#039;&#039;myreport&#039;&#039;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you want more control over how your report appears, for example, if you want it to appear somewhere other than under Reports, or if you want it to be controlled by another capability, then you can create a settings.php file. For example, for the capability report, there is a settings.php file that contains:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php  // $Id$&lt;br /&gt;
 $ADMIN-&amp;gt;add(&#039;&#039;&#039;&amp;quot;roles&amp;quot;&#039;&#039;&#039;, new admin_externalpage(&#039;reportcapability&#039;, get_string(&#039;capability&#039;, &#039;report_capability&#039;), &amp;quot;$CFG-&amp;gt;wwwroot/$CFG-&amp;gt;admin/report/capability/index.php&amp;quot;,&#039;&#039;&#039;&amp;quot;moodle/role:manage&amp;quot;&#039;&#039;&#039;));&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(The two non-standard bits there have been put into bold.)&lt;br /&gt;
&lt;br /&gt;
==Strings you must define in you lang/en_utf8/report_&#039;&#039;myreport&#039;&#039;.php==&lt;br /&gt;
&lt;br /&gt;
You just need to define&lt;br /&gt;
&lt;br /&gt;
 $string[&amp;quot;&#039;&#039;myreport&#039;&#039;&amp;quot;] = &#039;What my report is called&#039;;&lt;br /&gt;
&lt;br /&gt;
to make the report show up properly in the admin tree, but if your report does anything interesting, you will almost certainly need more.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=913 System images report] this is another very simple report, in contrib. Might be a good one to look at.&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;/div&gt;</summary>
		<author><name>Francois@catalyst.net.nz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/36/en/index.php?title=Development:Activity_Locking&amp;diff=41879</id>
		<title>Development:Activity Locking</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/36/en/index.php?title=Development:Activity_Locking&amp;diff=41879"/>
		<updated>2008-08-12T17:01:56Z</updated>

		<summary type="html">&lt;p&gt;Francois@catalyst.net.nz: Download link for the Moodle 1.9 version of AL&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Activity Locking is an external module which sets up conditions that a student must reach before they can start(unlock) a Moodle activity. These criterion generally include time spent, score or completed.   The conditions can be applied to more than one activity or resource for a each lock.   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Overview=&lt;br /&gt;
This page is an attempt to consolidate and explain the available activity locking (AL) code that is present for Moodle 1.5 to 1.7. This page will hopefully help explain all the available versions and their respective features. Some of the reference here will overlap with the existing MoodleDoc page covering [[Conditional activities]].&lt;br /&gt;
&lt;br /&gt;
=Types of activity locking code=&lt;br /&gt;
For the purpose of this MoodleDoc article: AL is any code that allows the user to make decisions on the next available resource or item the student will be able to use based on student events or quiz performance. There is some activity locking code that is very quick and dirty to simply lock future activities and then there is much more complex code based on the conditional activity though structure which attempts to progress the student through the course in a thought out progression based on activities and performance. Again we hope to clarify some of this here.&lt;br /&gt;
&lt;br /&gt;
==AL Branch 0.1 (Bernard Boucher)==&lt;br /&gt;
Bernard started all this with a hack to lock quiz and resources in [http://moodle.org/mod/forum/discuss.php?d=2948#12825 october 2003]. The certificate based on a quiz score was added in [http://moodle.org/mod/forum/discuss.php?d=9766#59875 september 2004] with version 0.7.  It was a great start!&lt;br /&gt;
&lt;br /&gt;
== AL Branch 2.0 for Moodle 1.6 (Stuart Mayor)==&lt;br /&gt;
*This has been virtually a complete rewrite and as such there are areas of functionality the were available in older versions of AL that are not in this.    &lt;br /&gt;
&lt;br /&gt;
* Conditional locking: Lock based on a user&#039;s performance in previous activities. You can also choose to unlock and activity if a user scores less than a certain grade.&lt;br /&gt;
* Show activity completion: The checkbox that appears before each activity to show it have been done.&lt;br /&gt;
* A variation on this  also hides future activities, see AL Branch 2.2 for Moodle 1.6 (John Gschnaidner-Chardelle Busch) below.&lt;br /&gt;
* Bernard Boucher reworked Stuart&#039;s version for Moolde 1.6, initially on June 20, 2006 and updated on July 10, 2006 posted [http://206.167.134.155/bb/authoring1/activityLocking2_0_for_1_6_july1006.zip &#039;&#039;&#039;Activity Locking V 2.0 for Moodle 1.6&#039;&#039;&#039;] on [http://moodle.org/mod/forum/discuss.php?d=46863#220125 Activity Locking v3 or v2 for testing only].&lt;br /&gt;
&lt;br /&gt;
*Downloaded the ..1.6_July10006.zip and installed it on a clean 1.6.3 localhost Windows XP machine.  The language file did not have all the required fields.  Spent time editing the lock.php file (not good at it) adding lines.  But it worked. --[[User:chris collman|chris collman]] 16:42, 20 October 2006 (CDT) &lt;br /&gt;
&lt;br /&gt;
===Installation for 2.1 for Moodle 1.6(Stuart Mayor)===&lt;br /&gt;
&#039;&#039;&#039;activitylocking20051201.zip&#039;&#039;&#039; the initial version&lt;br /&gt;
&lt;br /&gt;
* Firstly, you need the stable build of Moodle 1.6. This version of AL might work on earlier releases but I didn&#039;t write it with them in mind and I certainly can&#039;t support them.&lt;br /&gt;
Next, you need to modify one table in the database and add a new one (I use phpmyadmin for this). &lt;br /&gt;
&lt;br /&gt;
*I downloaded a copy of the above zip ..20051201.  Had to move the lang file from en to en_ut8f .  Worked on my 1.6.3 localhost test course.  --[[User:chris collman|chris collman]] 16:37, 20 October 2006 (CDT) &lt;br /&gt;
  &lt;br /&gt;
====Details of install====&lt;br /&gt;
* The table you need to modify is mdl_course_modules and you need to add the following fields:&lt;br /&gt;
completedbox TINYINT(1) UNSIGNED NOT NULL DEFAULT &#039;0&#039;&lt;br /&gt;
completedscore VARCHAR(255) NOT NULL&lt;br /&gt;
completedstyle VARCHAR(255) NOT NULL&lt;br /&gt;
lockedbox TINYINT(1) UNSIGNED NOT NULL DEFAULT &#039;1&#039;&lt;br /&gt;
lockedstyle VARCHAR(255) NOT NULL DEFAULT &#039;locked&#039;&lt;br /&gt;
lockedvisible TINYINT(1) UNSIGNED NOT NULL DEFAULT &#039;1&#039;&lt;br /&gt;
delay INT(10) UNSIGNED NOT NULL DEFAULT &#039;0&#039;&lt;br /&gt;
&lt;br /&gt;
* The table you need to create is as follows:&lt;br /&gt;
CREATE TABLE `mdl_course_locks` (&lt;br /&gt;
`id` int(10) unsigned NOT NULL auto_increment,&lt;br /&gt;
`courseid` int(10) unsigned NOT NULL default &#039;0&#039;,&lt;br /&gt;
`locktype` varchar(10) NOT NULL default &#039;&#039;,&lt;br /&gt;
`targetid` int(10) unsigned NOT NULL default &#039;0&#039;,&lt;br /&gt;
`locks` longtext NOT NULL,&lt;br /&gt;
PRIMARY KEY (`id`)&lt;br /&gt;
) TYPE=MyISAM COMMENT=&#039;Contains locks for sections and modules&#039;;&lt;br /&gt;
* Lastly, you need to copy the following files from the zip file:&lt;br /&gt;
lib/moodlelib.php to moodle/lib/moodlelib.php&lt;br /&gt;
lib/locklib.php to moodle/lib/locklib.php&lt;br /&gt;
course/lib.php to moodle/course/lib.php&lt;br /&gt;
course/lock.php to moodle/course/lock.php&lt;br /&gt;
course/mod.php to moodle/course/mod.php&lt;br /&gt;
course/settings.html to moodle/course/settings.html&lt;br /&gt;
pix/t/open.gif to moodle/pix/t/open.gif&lt;br /&gt;
pix/t/closed.gif to moodle/pix/t/closed.gif&lt;br /&gt;
lang/en/lock.php to moodle/lang/en/lock.php&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==AL Branch 2.2 for Moodle 1.6 (John Gschnaidner-Chardelle Busch and others)==&lt;br /&gt;
John&#039;s versionincludes the settings tab--making it possible to set the hide/visible options, as well as the completion (a checkmark in front of a resource/activity) options, says Chardelle.  &lt;br /&gt;
* A variation on  Stuart Mayor&#039;s 2.1, it hides topics dependent upon conditions set on specific activities/resources  &#039;&#039;&#039;ALV2_1_debug.ZIP&#039;&#039;&#039; (John). Had bug which Benard tweaked out.&lt;br /&gt;
* A build of Stuarts Mayor&#039;s 2.1 it locks and/or hides specific activities depending upon conditions set on specific activities/resources. Had bug which Benard tweaked out.&lt;br /&gt;
* A tweak by Bernard Boucher on June 27, 2006 was posted [http://moodle.org/mod/forum/discuss.php?d=35488&amp;amp;parent=222516 moodle/lib/locklib.php file] and called &#039;&#039;&#039;locklib.zip&#039;&#039;&#039; seems to fix known bug in both the above downloads.&lt;br /&gt;
&lt;br /&gt;
==AL Branch 2.4 for Moodle 1.6 (John Gschnaidner)==&lt;br /&gt;
Further development of the 2.2 as a hack (no installation function).&lt;br /&gt;
:&lt;br /&gt;
&#039;&#039;&#039;WARNING:&#039;&#039;&#039;&lt;br /&gt;
:Because of some changes, this version may &#039;&#039;&#039;not&#039;&#039;&#039; be completely compatible to previous versions!&lt;br /&gt;
Status:&lt;br /&gt;
:Released, but you still should try it &#039;&#039;&#039;before&#039;&#039;&#039; implementing it on a production server.&lt;br /&gt;
:&lt;br /&gt;
In this version:&lt;br /&gt;
* Supports module &#039;&#039;&#039;and&#039;&#039;&#039; section locks&lt;br /&gt;
* Parallel locking and completing modules &#039;&#039;&#039;and&#039;&#039;&#039; sections&lt;br /&gt;
* CSS style and checkbox for locking and completing&lt;br /&gt;
* Hide when locked&lt;br /&gt;
* Language support and help&lt;br /&gt;
* Readme for features and installation&lt;br /&gt;
* SQL commands for DB update&lt;br /&gt;
* Info on how to update the CSS style sheets&lt;br /&gt;
&lt;br /&gt;
FYI: Did a download on a clean complete package install of 1.6.3 localhost Windows XP.  Seemed to work. No editing neeed on lang/lock.php.  After unpacking file (see table below) and droping into moodle folder, went to database and imported the MySQL script found in moodle/course/MySQL.sql .  --[[User:chris collman|chris collman]] 16:32, 20 October 2006 (CDT)&lt;br /&gt;
&lt;br /&gt;
==AL Branch 3.s for Moodle 1.6 (Stuart Mayor)==&lt;br /&gt;
Similar to the 2.x versions. Major difference is that a question to the student unlocks activities.  Being actively developed and tested.&lt;br /&gt;
&lt;br /&gt;
==AL Branch 3.1 for Moodle 1.7  (Bernard Boucher &amp;amp; Stuart Mayor)==&lt;br /&gt;
Bernard has updated AL for 1.7 and it is being tested--[[User:chris collman|chris collman]] 07:18, 12 March 2007 (CDT)&lt;br /&gt;
&lt;br /&gt;
==CA Branch 1.0 for Moodle 1.5.2 (Borja Rubio Reyes)==&lt;br /&gt;
Details and discussed in the thread &amp;quot;[http://moodle.org/mod/forum/discuss.php?d=36697 NEW research on CONDITIONAL ACTIVITIES in Moodle]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Score Lock for Moodle 1.6x (John Gschnaidner)==&lt;br /&gt;
As announced, this is a ongoing development for Activity Locking v2.4, with a couple of new features.&lt;br /&gt;
For further information please refer to&lt;br /&gt;
:&amp;quot;[https://docs.moodle.org/en/Score_Lock moodle Docs: &#039;&#039;&#039;Score Lock&#039;&#039;&#039;]&amp;quot;&lt;br /&gt;
Score Lock is scheduled for beta release until middle of September 2006.&lt;br /&gt;
&lt;br /&gt;
= Table of Versions =&lt;br /&gt;
{| border=&amp;quot;3&amp;quot; padding=&amp;quot;4&amp;quot;&lt;br /&gt;
|+ Activity Locking updates&lt;br /&gt;
! -Version-  &lt;br /&gt;
! Moodle version&lt;br /&gt;
! Who&lt;br /&gt;
! Status&lt;br /&gt;
! MySql Install&lt;br /&gt;
! Docs&lt;br /&gt;
! Download&lt;br /&gt;
! Teacher Interface &lt;br /&gt;
! Hide Option&lt;br /&gt;
! Completion Box Option&lt;br /&gt;
! Section Lock &lt;br /&gt;
! Quiz Question &lt;br /&gt;
! Comments &lt;br /&gt;
! Feature &lt;br /&gt;
! Bug &lt;br /&gt;
|-----&lt;br /&gt;
| AL 3.0&lt;br /&gt;
| 1.5.2&lt;br /&gt;
| Stuart Mayor&lt;br /&gt;
| not finished&lt;br /&gt;
|&lt;br /&gt;
|[http://moodle.org/mod/forum/discuss.php?d=46863]&lt;br /&gt;
| [http://moodle.org/file.php/5/moddata/forum/678/214752/Activity_Locking_20060317.7z]&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Yes &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-----&lt;br /&gt;
| AL 2.5 ?&lt;br /&gt;
| 1.9&lt;br /&gt;
| Chardelle Busch, ProMoodle.com&lt;br /&gt;
| Enhanced&lt;br /&gt;
| Automatic&lt;br /&gt;
| [http://moodle.org/mod/forum/discuss.php?d=92731]&lt;br /&gt;
| [http://promoodle.com/index.php?option=com_docman&amp;amp;task=doc_download&amp;amp;gid=9&amp;amp;Itemid=65]&lt;br /&gt;
| Padlock Icons&lt;br /&gt;
| Yes&lt;br /&gt;
| Yes&lt;br /&gt;
| Yes&lt;br /&gt;
| No&lt;br /&gt;
| see above&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-----&lt;br /&gt;
| AL 2.4&lt;br /&gt;
| 1.6&lt;br /&gt;
| John Gschnaidner&lt;br /&gt;
| released&lt;br /&gt;
| manual&lt;br /&gt;
|[http://moodle.org/mod/forum/discuss.php?d=50835]&lt;br /&gt;
| [http://moodle.org/file.php/5/moddata/forum/678/241994/ALv2.4.7z]&lt;br /&gt;
| Tabs&lt;br /&gt;
| Yes&lt;br /&gt;
| Yes&lt;br /&gt;
| Yes&lt;br /&gt;
| Yes &lt;br /&gt;
| looks good&lt;br /&gt;
| &lt;br /&gt;
| [http://moodle.org/file.php/5/moddata/forum/678/244338/locking.php]&lt;br /&gt;
|-----&lt;br /&gt;
| AL 2.3&lt;br /&gt;
| 1.6&lt;br /&gt;
| Stuart Mayor&lt;br /&gt;
| Testing&lt;br /&gt;
| &lt;br /&gt;
| [http://moodle.org/mod/forum/discuss.php?d=35488]&lt;br /&gt;
| [http://moodle.org/file.php/5/moddata/forum/678/164285/activitylocking20051201.zip]&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Yes&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-----&lt;br /&gt;
| AL 2.2&lt;br /&gt;
| 1.6&lt;br /&gt;
| Gschnaidner, Mayor, Busch&lt;br /&gt;
| Testing&lt;br /&gt;
| &lt;br /&gt;
| [http://moodle.org/mod/forum/discuss.php?d=47906]&lt;br /&gt;
| &lt;br /&gt;
| Tabs&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Yes&lt;br /&gt;
| almost&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-----&lt;br /&gt;
| AL 2.0&lt;br /&gt;
| 1.8.2+&lt;br /&gt;
| Stuart Mayor, Bernard Boucher&lt;br /&gt;
| Updated&lt;br /&gt;
| Automatic&lt;br /&gt;
| [http://moodle.org/mod/forum/discuss.php?d=77907]&lt;br /&gt;
| [http://206.167.134.155/bb/authoring1/Activity_Locking_V2_0_for_182_Sept25_07.zip]&lt;br /&gt;
| Padlock Icons&lt;br /&gt;
| Yes&lt;br /&gt;
| Yes&lt;br /&gt;
| Yes&lt;br /&gt;
| No&lt;br /&gt;
| see above&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-----&lt;br /&gt;
| AL 2.0&lt;br /&gt;
| 1.8.2&lt;br /&gt;
| Stuart Mayor, Bernard Boucher&lt;br /&gt;
| Updated&lt;br /&gt;
| Automatic&lt;br /&gt;
| [http://moodle.org/mod/forum/discuss.php?d=77907]&lt;br /&gt;
| [http://206.167.134.155/bb/authoring1/Activity_Locking_V2_0_for_182_August13_07.zip]&lt;br /&gt;
| Padlock Icons&lt;br /&gt;
| Yes&lt;br /&gt;
| Yes&lt;br /&gt;
| Yes&lt;br /&gt;
| No&lt;br /&gt;
| see above&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-----&lt;br /&gt;
| AL 2.0&lt;br /&gt;
| 1.8.1&lt;br /&gt;
| Stuart Mayor, Bernard Boucher&lt;br /&gt;
| Updated&lt;br /&gt;
| Automatic&lt;br /&gt;
| [http://moodle.org/mod/forum/discuss.php?d=74477#p332097]&lt;br /&gt;
| [http://206.167.134.155/bb/authoring1/Activity_Locking_V2_0_for_181_June22_07.zip]&lt;br /&gt;
| Padlock Icons&lt;br /&gt;
| Yes&lt;br /&gt;
| Yes&lt;br /&gt;
| Yes&lt;br /&gt;
| No&lt;br /&gt;
| see above&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-----&lt;br /&gt;
| AL 2.0&lt;br /&gt;
| 1.7.1&lt;br /&gt;
| Stuart Mayor, Bernard Boucher&lt;br /&gt;
| Updated&lt;br /&gt;
| Automatic&lt;br /&gt;
| [http://moodle.org/mod/forum/discuss.php?d=65175#p300414]&lt;br /&gt;
| [http://206.167.134.155/bb/authoring1/Activity_Locking_V2_0_for_171_Feb1907.zip]&lt;br /&gt;
| Padlock Icons&lt;br /&gt;
| Yes&lt;br /&gt;
| Yes&lt;br /&gt;
| Yes&lt;br /&gt;
| No&lt;br /&gt;
| see above&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-----&lt;br /&gt;
| AL 2.0&lt;br /&gt;
| 1.7&lt;br /&gt;
| Stuart Mayor, Chris Throup &lt;br /&gt;
| Updated&lt;br /&gt;
| Automatic&lt;br /&gt;
| [http://moodle.org/mod/forum/discuss.php?d=65175#p300414]&lt;br /&gt;
| [http://moodle.org/file.php/5/moddata/forum/678/302505/Activity_Locking_for_Moodle_1.7_.zip]&lt;br /&gt;
| Padlock Icons&lt;br /&gt;
| Yes&lt;br /&gt;
| Yes&lt;br /&gt;
| Yes&lt;br /&gt;
| No&lt;br /&gt;
| see above&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-----&lt;br /&gt;
| AL 2.0&lt;br /&gt;
| 1.6&lt;br /&gt;
| Stuart Mayor, Bernard Boucher&lt;br /&gt;
| Updated&lt;br /&gt;
| Automatic&lt;br /&gt;
| [http://moodle.org/mod/forum/discuss.php?d=31627#152788]&lt;br /&gt;
| [http://206.167.134.155/bb/authoring1/activityLocking2_0_for_1_6_july1006.zip]&lt;br /&gt;
| Padlock Icons&lt;br /&gt;
| Yes&lt;br /&gt;
| Yes&lt;br /&gt;
| Yes&lt;br /&gt;
| No&lt;br /&gt;
| see above&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-----&lt;br /&gt;
| C A 1.0&lt;br /&gt;
| 1.5.2&lt;br /&gt;
| Borja Rubio Reyes, David Delgado&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| [http://moodle.org/mod/forum/discuss.php?d=36697]&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
| Yes&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=General installation instructions DRAFT=&lt;br /&gt;
==Short instructions==&lt;br /&gt;
#Find and download the correct version of AL for your version of Moodle.  This is a zip file.&lt;br /&gt;
#Extract the zipped file&#039;s folders and files in you Moodle root directory.  This will put the right files in their proper directory. &lt;br /&gt;
#As Administrator, go to the admin block for the Moodle site.  This should start the automatic install process.&lt;br /&gt;
&lt;br /&gt;
==Tips and FAQs==&lt;br /&gt;
*Activity Locking (AL) is a non-standard Moodle feature.  Testing on a Moodle that is similar to  your production Moodle is advisible. For example, a localhost installation.&lt;br /&gt;
*Since all versions of AL change the Moodle MySQL file structure, it is advisable to do a backup before installing AL.  &lt;br /&gt;
*Upgrading either Moodle or AL and things don&#039;t work?  A common forum suggestion is to reinstall AL with the proper version that is designed for the Moodle version.&lt;br /&gt;
*AL installs but does not seem to lock?  Be sure you are logged in as a student. Logging in as a teacher and then &amp;quot;viewing as as student&amp;quot; or changing roles to a student, will not give consistant results in Activity Locking.&lt;br /&gt;
*AL icons initially show in edit mode but then disappear. It has been reported that this occurs when AJAX is enabled in 1.8 - disable AJAX and they should reappear. (.../admin/settings.php?section=experimental)&lt;br /&gt;
&lt;br /&gt;
=See Also=&lt;br /&gt;
*[[Adding_activity_locks]] will give the reader an idea of what one of the flavors of Activity Locking looks like for a student and teacher setting it up.  &lt;br /&gt;
&lt;br /&gt;
Please visit the Moodle Forum for more information concerning Activity Locking and Conditional Activities-&lt;br /&gt;
&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=35488#220984:  AL v2.1-M1.6] titled Activity Locking v2.1 (for Moodle 1.6)&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=46863:  AL v3.0-Mx] titled Activity Locking v3&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=36697 AL v3.0-DD] titled NEW research on CONDITIONAL ACTIVITIES in Moodle&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=31627&amp;amp;parent=152788: AL v2.1 LALR]  titled Latest Activity Locking Release started 19 October 2005&lt;br /&gt;
* http://moodle.org/mod/forum/view.php?id=4295&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=47906&amp;amp;parent=221613 AL v2.1 wH1.6] titled Re: Certificate for 1.6 with security in Activity Modules forum&lt;br /&gt;
&lt;br /&gt;
There is a very specialized-limited type of activity locking under a lesson (activity) setting called dependency in 1.6.   See: *https://docs.moodle.org/en/Adding/editing_a_lesson#Dependent_on .  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;/div&gt;</summary>
		<author><name>Francois@catalyst.net.nz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/36/en/index.php?title=Face-to-face_FAQ&amp;diff=41382</id>
		<title>Face-to-face FAQ</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/36/en/index.php?title=Face-to-face_FAQ&amp;diff=41382"/>
		<updated>2008-08-05T02:42:59Z</updated>

		<summary type="html">&lt;p&gt;Francois@catalyst.net.nz: /* Where do I include the Manager&amp;#039;s email address for notification? */  new custom field for Manager&amp;#039;s email address&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Facetoface}}&lt;br /&gt;
&lt;br /&gt;
Here is a collection of questions that were asked on the [http://moodle.org/mod/forum/view.php?id=7136 forum] or through other means.&lt;br /&gt;
&lt;br /&gt;
==Where do I include the Manager&#039;s email address for notification?==&lt;br /&gt;
&lt;br /&gt;
Using the Moodle 1.8 version of the Face-to-face module, the way we do this is through the &amp;quot;MSN messenger&amp;quot; field on the user profile page. So instead of storing your MSN user account, this field stores your manager&#039;s email address.&lt;br /&gt;
&lt;br /&gt;
Starting with the Moodle 1.9 version of the Face-to-face module, a custom field called &amp;quot;Manager&#039;s email&amp;quot; is added to the user profile page.&lt;br /&gt;
&lt;br /&gt;
==How do I setup a wait listed session?==&lt;br /&gt;
&lt;br /&gt;
A &#039;wait-listed session&#039; in the Face-to-face module is a session for which no date is currently set. Users can then register their interest in attending a Face-to-face course even if it&#039;s not offered at this time.&lt;br /&gt;
&lt;br /&gt;
There is no way at this time to &amp;quot;exceed&amp;quot; the capacity of a given session but this can be approximated by adding a second session without a date on which users can sign-up if the other one is full.&lt;br /&gt;
&lt;br /&gt;
See this [http://moodle.org/mod/forum/discuss.php?d=96118 forum thread] for more information.&lt;/div&gt;</summary>
		<author><name>Francois@catalyst.net.nz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/36/en/index.php?title=Development:CVS_for_developers&amp;diff=36519</id>
		<title>Development:CVS for developers</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/36/en/index.php?title=Development:CVS_for_developers&amp;diff=36519"/>
		<updated>2008-05-22T00:12:08Z</updated>

		<summary type="html">&lt;p&gt;Francois@catalyst.net.nz: /* Tips and Hints */ how to change password or ssh key&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;CVS&#039;&#039;&#039; is the Concurrent Versioning System, a commonly-used way of managing source code for large software projects. CVS keeps all versions of all files so that nothing is ever lost, and usage by different people is tracked. It also provides ways to merge code if two or more people are working on the same file. All code and all versions are stored on a central server (in the case of Moodle, at cvs.moodle.org). The [http://cvsbook.red-bean.com/cvsbook.html CVS book] holds more information about CVS than you need.&lt;br /&gt;
&lt;br /&gt;
If you just want to download Moodle using CVS to run a site, then you probably don&#039;t need this page - please see [[CVS for Administrators]] instead.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Joining the project as a developer==&lt;br /&gt;
&lt;br /&gt;
So, you&#039;ve been offered CVS write access to help us develop and maintain Moodle!  Welcome aboard!&lt;br /&gt;
&lt;br /&gt;
To be able to write changes into [http://cvs.moodle.org/ Moodle&#039;s CVS archive], you first need to have an account on the server.  Only trusted developers get these accounts.  To request access, go to the &amp;quot;Apply for CVS Access&amp;quot; tab on the CVS page on Moodle.org (http://moodle.org/cvs).  Tell us what modules you&#039;d like to access (e.g. a language module), and why.  You&#039;ll receive notification in a day or so.&lt;br /&gt;
&lt;br /&gt;
With that done, you should have all the permissions you need, so you just need to set up your machine and download the current source code so you can start working on it. &lt;br /&gt;
&lt;br /&gt;
For the examples on this page, let&#039;s assume your username is &#039;&#039;&#039;myusername&#039;&#039;&#039; and your password is &#039;&#039;&#039;mypassword&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==CVS modules==&lt;br /&gt;
&lt;br /&gt;
Within CVS, the word &amp;quot;modules&amp;quot; refers to separate collections of code. In Moodle we have the following modules within our repository:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;moodle&#039;&#039;&#039; - the main Moodle source code&lt;br /&gt;
* &#039;&#039;&#039;lang&#039;&#039;&#039; - all the language packs&lt;br /&gt;
* &#039;&#039;&#039;[[Development:contrib|contrib]]&#039;&#039;&#039; - user contributions and other assorted code in development&lt;br /&gt;
* &#039;&#039;&#039;mysql&#039;&#039;&#039; - a customised phpMyAdmin to plug into Moodle for database admin&lt;br /&gt;
* &#039;&#039;&#039;windows-cron&#039;&#039;&#039; - a small package that makes cron possible on Windows systems&lt;br /&gt;
* &#039;&#039;&#039;docs&#039;&#039;&#039; - various extra user-contributed documentation&lt;br /&gt;
&lt;br /&gt;
Most people are working on the existing features in the moodle module, but many are also contributing new ideas in the contrib modules. Once code reaches a certain level of maturity in the contrib area, it can be migrated over into the main moodle tree.&lt;br /&gt;
&lt;br /&gt;
==Basic CVS commands==&lt;br /&gt;
&lt;br /&gt;
===CVS on Unix===&lt;br /&gt;
&lt;br /&gt;
Moodle CVS uses ssh as a transport layer for security, so you will have to set a CVS_RSH environment variable in your Unix shell. It&#039;s best to put these commands in your .bashrc or .cshrc so you don&#039;t have to type it all the time:&lt;br /&gt;
        setenv CVS_RSH ssh (for csh, tcsh etc)&lt;br /&gt;
        export CVS_RSH=ssh (for sh, bash etc)&lt;br /&gt;
&lt;br /&gt;
Next, you can check out the latest development version of Moodle using this (all one line). NOTE: Don&#039;t try to do run this first CVS command over an existing moodle installation: start fresh with a new directory!:&lt;br /&gt;
        cvs -z3 -d:ext:myusername@cvs.moodle.org:/cvsroot/moodle co moodle&lt;br /&gt;
&lt;br /&gt;
The command is similar for other CVS modules:&lt;br /&gt;
        cvs -z3 -d:ext:myusername@cvs.moodle.org:/cvsroot/moodle co contrib&lt;br /&gt;
&lt;br /&gt;
If you want to checkout a single plugin (attendance block as an example here) from contrib into the current directory, you can use:&lt;br /&gt;
        cvs -z3 -d:ext:myusername@cvs.moodle.org:/cvsroot/moodle co -d attendance contrib/plugins/blocks/attendance&lt;br /&gt;
&lt;br /&gt;
Note that you will be prompted for mypassword for each command unless you set up authorized keys.  Read [[Development:SSH_key|SSH Keys]] for more details on how to set those up.&lt;br /&gt;
&lt;br /&gt;
Now, you should have a new &#039;moodle&#039; directory. You can rename it and move it around if you like. Go into it:&lt;br /&gt;
        cd moodle&lt;br /&gt;
&lt;br /&gt;
All the latest Moodle files should be in there. You can now change files in your copy. To compare your files and directories against the main CVS copy on the server use cvs diff, e.g.:&lt;br /&gt;
        cvs diff -c config-dist.php&lt;br /&gt;
        cvs diff -c lang&lt;br /&gt;
&lt;br /&gt;
To fetch the latest updates from the server use:&lt;br /&gt;
        cvs update -dP&lt;br /&gt;
&lt;br /&gt;
To copy your new files back to the server you would do something like:&lt;br /&gt;
        cd lang/ca&lt;br /&gt;
        cvs commit&lt;br /&gt;
&lt;br /&gt;
You will be prompted to add some comments (depends on your default text editor).   Please write a meaningful, descriptive comment and &#039;&#039;&#039;always include the name of any tracker issues that talk about the issue you are fixing&#039;&#039;&#039; (eg &#039;&#039;&#039;MDL-XXXX&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
After that your changes will be sent to the CVS server and stored in the repository. Done!&lt;br /&gt;
&lt;br /&gt;
To save more time you can put default arguments into a file called .cvsrc in your home directory. For example, mine contains:&lt;br /&gt;
        diff -c&lt;br /&gt;
        update -dP&lt;br /&gt;
&lt;br /&gt;
Try &#039;cvs help&#039; for more details ...&lt;br /&gt;
&lt;br /&gt;
===CVS on Mac OSX===&lt;br /&gt;
&lt;br /&gt;
You can follow the same instructions as for Unix (above) in a terminal window. However, the cvs command is not installed by default in an OSX. You first need to install the XCode Tools. You should find this on your original installation disk. Failing that it can be downloaded (a fairly hefty download) from the Apple developer web site ([http://developer.apple.com]).&lt;br /&gt;
&lt;br /&gt;
===CVS on Windows===&lt;br /&gt;
&lt;br /&gt;
First, you need to download a completely fresh copy of Moodle using your developer account.&lt;br /&gt;
&lt;br /&gt;
1. Get TortoiseCVS from tortoisecvs.org and install it, then reboot. (Tortoise is not currently supported on vista but [http://www.syntevo.com/smartcvs/index.html SmartCVS] works well).&lt;br /&gt;
&lt;br /&gt;
2. Find or create a new folder somewhere where you want Moodle to be downloaded to.&lt;br /&gt;
&lt;br /&gt;
3. Right-mouse-click that folder and choose &amp;quot;CVS Checkout&amp;quot; from the menu. You should see a dialog box.&lt;br /&gt;
&lt;br /&gt;
4. Copy this text into the CVSROOT field (using your own username!):&lt;br /&gt;
&lt;br /&gt;
           :ext:myusername@cvs.moodle.org:/cvsroot/moodle&lt;br /&gt;
&lt;br /&gt;
5. Under the &amp;quot;Module&amp;quot; field, type &amp;quot;moodle&amp;quot; to get the latest development version of Moodle, &amp;quot;contrib&amp;quot; to get the contributions directory, or &amp;quot;mysql&amp;quot; to get the MySQL Admin module.&lt;br /&gt;
&lt;br /&gt;
6. Press the button: &amp;quot;OK&amp;quot; and everything should be downloaded.&lt;br /&gt;
&lt;br /&gt;
A dialog box should show all the files being downloaded, and after a while you should have a complete copy of Moodle. After this first checkout, you can fetch the latest updated files from the CVS server:&lt;br /&gt;
&lt;br /&gt;
# Right-mouse-click on your Moodle folder (or any file) and select &amp;quot;CVS Update&amp;quot;.&lt;br /&gt;
# Sit back and watch the logs scroll by. Take note of conflicts that may occur if your local code has changes that conflict with the incoming versions - you will need to edit these files and resolve the conflicts manually.&lt;br /&gt;
&lt;br /&gt;
After modifying files (you will notice their icons change from green to red!), you can commit them back to the CVS server like this:&lt;br /&gt;
&lt;br /&gt;
# Right-mouse-click on your Moodle folder (or any file) and select &amp;quot;CVS Commit...&amp;quot;.&lt;br /&gt;
# In the dialog box, type a clear description of the changes you are committing.  &#039;&#039;&#039;Always include the name of any tracker issues related to what you are fixing&#039;&#039;&#039; (eg &#039;&#039;&#039;MDL-XXXX&#039;&#039;&#039;).&lt;br /&gt;
# Click &amp;quot;OK&amp;quot;. Your changes will be sent to the server.&lt;br /&gt;
# If you create a folder, BE CAREFUL about using the &amp;quot;CVS Add&amp;quot; option as it will add the folder to CVS without requiring a commit. Once added, the folder cannot be removed from CVS even though it will be pruned so long as it is empty.&lt;br /&gt;
&lt;br /&gt;
Please note that as of April 15 2008, TortoiseCVS 1.10.6 might not work really well with Windows Vista. You could report bugs to TortoiseCVS site (hosted by SourceForge) or google &amp;quot;TortoiseCVS vista&amp;quot; for more details.&lt;br /&gt;
&lt;br /&gt;
==CVS commit messages==&lt;br /&gt;
&lt;br /&gt;
Every commit you make to CVS should have a commit message containing&lt;br /&gt;
* a tracker issue id like MDL-12345 (if necessary, create an issue before committing, the only exception is for very minor typos.)&lt;br /&gt;
* A brief description of the problem you are fixing. (If you are feeling lazy, you may be able to get away with copying and pasting the issue summary from the tracker.)&lt;br /&gt;
* If it is not immediately obvious, a brief summary of why this change fixes the problem. If a longer description is necessary,  you may also want to add more information to the tracker issue, or Moodle Docs, but the code changes + commit message should provide enough clues to how the fix works on their own.&lt;br /&gt;
&lt;br /&gt;
==Working with branches==&lt;br /&gt;
&lt;br /&gt;
This diagram shows how the main moodle module branches into different versions over time.&lt;br /&gt;
&lt;br /&gt;
[[Image:Cvstree.png|CVS tree]]&lt;br /&gt;
&lt;br /&gt;
To see all the current tags and branches that are available, use this command on any old file (such as index.php in the top moodle directory):&lt;br /&gt;
    cvs status -v index.php&lt;br /&gt;
&lt;br /&gt;
Some tagging guidelines:&lt;br /&gt;
* Tag and branch names should always be all upper-case.&lt;br /&gt;
* Tags and branches should ALWAYS be applied to the entire module (all of Moodle). Don&#039;t tag individual files or directories.&lt;br /&gt;
* We don&#039;t allow renaming of tags because people may be relying on them, so get them right the first time!&lt;br /&gt;
&lt;br /&gt;
===Trunk development===&lt;br /&gt;
&lt;br /&gt;
The Trunk of CVS is the main development version of Moodle. In CVS it is also known as the HEAD, or default branch.&lt;br /&gt;
&lt;br /&gt;
Moodle developers try to keep this stable as possible, but as it usually contains new code it probably has bugs and small instabilities.&lt;br /&gt;
&lt;br /&gt;
Every now and then we decide the product has enough features to make a release. At this time, the trunk is tagged with a MOODLE_XX_BETA tag (in case we ever want to roll back to that point) and a new branch is formed for the release, called MOODLE_XX_STABLE.&lt;br /&gt;
&lt;br /&gt;
A Beta package is also released at this point - it&#039;s for testers who don&#039;t use CVS but want to test the latest features and report bugs.&lt;br /&gt;
&lt;br /&gt;
===Stable branches for each release===&lt;br /&gt;
&lt;br /&gt;
As soon as the stable branch MOODLE_XX_STABLE is created, development efforts will fork into two streams for a while. Some people may continue working on new features in the trunk for the next release, but most developers should be concentrating on using the current STABLE branch and fixing bugs that are found in it.&lt;br /&gt;
&lt;br /&gt;
You can switch your local copy of Moodle to the STABLE version using the following command in Unix from the root directory:&lt;br /&gt;
    cvs update -dP -r MOODLE_XX_STABLE&lt;br /&gt;
&lt;br /&gt;
After that, all the commands described above will apply to that stable version. To return to the trunk version just issue:&lt;br /&gt;
    cvs update -dPA&lt;br /&gt;
&lt;br /&gt;
On Windows clients you should have a menu from which you can choose the branch.&lt;br /&gt;
&lt;br /&gt;
Once the new STABLE branch really stabilises, a release can be declared. Packages are created for distribution and the branch will be tagged (by Martin Dougiamas) with a tag named: MOODLE_XXX&lt;br /&gt;
&lt;br /&gt;
===Merging fixes===&lt;br /&gt;
&lt;br /&gt;
All bug fixes in any STABLE branch should be merged back into the trunk so that they become available in future versions of Moodle. A floating tag called MOODLE_XX_MERGED needs to be maintained to keep track of the last merge. The procedure for such a merge is as follows (I&#039;m using CVS on the Unix command line but the steps are the same for any CVS client):&lt;br /&gt;
&lt;br /&gt;
[[Image:Merging.png|thumb|right|300px|This diagram summarises the process]]&lt;br /&gt;
1. I highly recommend keeping one checked out copy of each stable branch and the trunk/head version locally to make it easier to jump between them.  Set them all up as virtual web sites on your development machine.  I use directories like /moodle/18, /moodle/19 /moodle/dev etc.&lt;br /&gt;
&lt;br /&gt;
2. Update to the latest stable version (I&#039;ll use XX in the example but it could be 18, 19 etc) for the relevant files, and do a cvs diff just to double-check exactly what you are checking in.  Note you only need to update the files/directories you are working in, but sometimes it help to update everything anyway just to do a final check on the functionality using the web.&lt;br /&gt;
&lt;br /&gt;
          cd /moodle/XX/user&lt;br /&gt;
          cvs update -dPA&lt;br /&gt;
          cvs diff -c file1.php file2.php&lt;br /&gt;
&lt;br /&gt;
3. If all looks OK, check in the fix to the stable branch.  Make sure that the commit message contains the bug tracker ID (eg MDL-1111) and a decent description of your thoughts on the fix.  If you don&#039;t specify a message in the command line, you&#039;ll be put into an editor to type one.&lt;br /&gt;
&lt;br /&gt;
          cvs commit -m &amp;quot;MDL-1234 Corrected a small typo in the user name field&amp;quot; file1.php file2.php&lt;br /&gt;
&lt;br /&gt;
4. Go to the very latest trunk version and make sure it&#039;s up-to-date.&lt;br /&gt;
          &lt;br /&gt;
          cd /moodle/dev/user&lt;br /&gt;
          cvs update -dPA&lt;br /&gt;
&lt;br /&gt;
5. Merge everything into your local copy of the trunk from your stable branch since the last merge.  You can use the same sequence of (4) and (5) to merge the changes into other stable branches too (to backport the fix to the previous stable versions).&lt;br /&gt;
&lt;br /&gt;
          cvs update -kk -j MOODLE_XX_MERGED -j MOODLE_XX_STABLE file1.php file2.php&lt;br /&gt;
&lt;br /&gt;
6. Carefully watch the update logs for conflicts, and fix every file that you see with a conflict.  Afterwards, it may help to just run a diff to make sure the result is what you expected:&lt;br /&gt;
&lt;br /&gt;
          cvs diff -c file1.php file2.php&lt;br /&gt;
&lt;br /&gt;
7. Check your merged local copy back into CVS trunk version&lt;br /&gt;
&lt;br /&gt;
          cvs commit -m &amp;quot;MDL-1234 Corrected a small typo in the user name field, merged from XX&amp;quot; file1.php file2.php&lt;br /&gt;
&lt;br /&gt;
8. Go back to your branch version&lt;br /&gt;
&lt;br /&gt;
          cd /moodle/XX/user&lt;br /&gt;
&lt;br /&gt;
9. Update the floating merge tag for the affected files (so that it matches MOODLE_XX_STABLE) so that this process can be repeated next time&lt;br /&gt;
&lt;br /&gt;
          cvs tag -RF MOODLE_XX_MERGED file1.php file2.php&lt;br /&gt;
&lt;br /&gt;
Finally, the values for $version in all the Moodle version.php files within the stable branch should not be updated at all if possible (except the last digit if absolutely necessary). The reason is that someone updating from a very stable version to the next very stable version could miss database upgrades that happened on the trunk.&lt;br /&gt;
&lt;br /&gt;
===Merging fixes with TortoiseCVS===&lt;br /&gt;
Situation: we did a fix on MOODLE_19_STABLE. We modified one file for this fix. This fix needs to be done on Moodle 1.8 and trunk(HEAD). All following CVS instructions will be applied on the file that we changed.&lt;br /&gt;
 &lt;br /&gt;
1. Update to the latest stable versions (HEAD included)&lt;br /&gt;
&lt;br /&gt;
          Right click on the moodle folder&lt;br /&gt;
          CVS update&lt;br /&gt;
          OK&lt;br /&gt;
&lt;br /&gt;
2. On your MOODLE19 branch: commit your fix &lt;br /&gt;
&lt;br /&gt;
          Right Click on the file&lt;br /&gt;
          CVS commit&lt;br /&gt;
          Enter a description: &amp;quot;MDL-XXXX bug fix description&amp;quot;&lt;br /&gt;
          OK&lt;br /&gt;
&lt;br /&gt;
3. On your HEAD repository: merge the changes&lt;br /&gt;
&lt;br /&gt;
          Right Click on the file&lt;br /&gt;
          CVS&amp;gt;&lt;br /&gt;
          Merge...&lt;br /&gt;
          Start: MOODLE_19_MERGED&lt;br /&gt;
          End  : MOODLE_19_STABLE&lt;br /&gt;
          OK&lt;br /&gt;
&lt;br /&gt;
4. If the resulting file have some conflicts, TortoiseCVS displays a red square on the file icon. Edit the file with your text editor and resolve the conflicts.&lt;br /&gt;
&lt;br /&gt;
5. Run a diff to make sure the result is what you expected&lt;br /&gt;
&lt;br /&gt;
          Right Click on the file&lt;br /&gt;
          CVS Diff&lt;br /&gt;
          OK&lt;br /&gt;
&lt;br /&gt;
6. Commit the fix&lt;br /&gt;
&lt;br /&gt;
          Right Click on the file&lt;br /&gt;
          CVS commit&lt;br /&gt;
          Enter a description: &amp;quot;MDL-XXXX bug fix description, merged from 19&amp;quot;&lt;br /&gt;
          OK&lt;br /&gt;
&lt;br /&gt;
We&#039;ve commit MOODLE_19_STABLE and trunk. It&#039;s now time to backport the change on MOODLE_18_STABLE.&lt;br /&gt;
On your MOODLE18 branch: reproduce step 3 to 6.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. On your MOODLE19 branch: update the floating merge tag for the affected file&lt;br /&gt;
&lt;br /&gt;
          Right Click on the file&lt;br /&gt;
          CVS&amp;gt;&lt;br /&gt;
          Tag...&lt;br /&gt;
          Tag: MOODLE_19_MERGED&lt;br /&gt;
          Select &#039;Move existing tag&#039;&lt;br /&gt;
          OK&lt;br /&gt;
&lt;br /&gt;
On your MOODLE18 branch: reproduce step 7 (with Tag: MOODLE_18_MERGED).&lt;br /&gt;
&lt;br /&gt;
===Feature branches for large changes===&lt;br /&gt;
&lt;br /&gt;
Occasionally, there may be a very large feature that needs to be checked in so several people can work on it, but it is too unstable to be included in the main development trunk.&lt;br /&gt;
&lt;br /&gt;
In these cases a short-term branch can be created to work on the feature, and then merged back into the main trunk as soon as possible. An example called MOODLE_19_WIDGET branch can be seen in the above diagram.&lt;br /&gt;
&lt;br /&gt;
If you need to do this for your new WIDGET feature, follow these steps:&lt;br /&gt;
&lt;br /&gt;
1. Discuss with other developers to make sure it&#039;s necessary!&lt;br /&gt;
&lt;br /&gt;
2. Make a new tag on the trunk (for all of moodle) called MOODLE_XX_WIDGET_PRE&lt;br /&gt;
&lt;br /&gt;
          cvs tag -R MOODLE_XX_WIDGET_PRE&lt;br /&gt;
&lt;br /&gt;
3. Create your branch called MOODLE_XX_WIDGET&lt;br /&gt;
&lt;br /&gt;
          cvs tag -Rb MOODLE_XX_WIDGET&lt;br /&gt;
&lt;br /&gt;
4. Work in that branch until the feature is reasonably stable. Commit as necessary.&lt;br /&gt;
&lt;br /&gt;
          cvs commit&lt;br /&gt;
&lt;br /&gt;
5. When ready, merge the whole branch into the trunk, fix conflicts, commit it to the trunk and then abandon the branch.&lt;br /&gt;
&lt;br /&gt;
          cvs update -dPA&lt;br /&gt;
          cvs update -kk -j MOODLE_XX_WIDGET&lt;br /&gt;
          cvs commit&lt;br /&gt;
&lt;br /&gt;
Good luck, be careful and have fun!&lt;br /&gt;
&lt;br /&gt;
==Who on earth is ...==&lt;br /&gt;
&lt;br /&gt;
Some of the people committing to the Moodle codebase have non-boring account names on the CVS server. If you are ever looking at a CVS commit, and wondering &amp;quot;who on earth is this purpleblob person?&amp;quot; This information is now available at: [http://moodle.org/mod/cvsadmin/view.php?cid=1 Moodle developers with write access].&lt;br /&gt;
&lt;br /&gt;
==Tips and Hints==&lt;br /&gt;
* [http://moodle.org/mod/cvsadmin/ Change your password or SSH key] (click on &amp;quot;Update my developer information&amp;quot;)&lt;br /&gt;
* [[Tracking Moodle CVS with git]]&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=34472 Merging Custom Moodle Code With Stable Releases]&lt;br /&gt;
* [[Unmerged files]]: To see if you&#039;ve forgotten to merge any file.&lt;br /&gt;
* [http://ximbiot.com/cvs/manual/ CVS Manual]&lt;br /&gt;
* [[Development:contrib|Introduction to the &#039;&#039;&#039;contrib&#039;&#039;&#039; area of CVS]]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [http://tracker.moodle.org/browse/MDLSITE-193 &amp;quot;All developers should switch to using the cvs.moodle.org alias&amp;quot;]&lt;br /&gt;
* [[CVS for Administrators]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer|CVS for developers]]&lt;br /&gt;
[[Category:Developer tools]]&lt;br /&gt;
&lt;br /&gt;
[[es:CVS para desarrolladores]]&lt;br /&gt;
[[fr:CVS pour développeurs]]&lt;br /&gt;
[[pt:CVS_para_programadores]]&lt;/div&gt;</summary>
		<author><name>Francois@catalyst.net.nz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/36/en/index.php?title=Face-to-face_FAQ&amp;diff=35481</id>
		<title>Face-to-face FAQ</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/36/en/index.php?title=Face-to-face_FAQ&amp;diff=35481"/>
		<updated>2008-05-01T00:14:29Z</updated>

		<summary type="html">&lt;p&gt;Francois@catalyst.net.nz: How do I setup a wait listed session?&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Facetoface}}&lt;br /&gt;
&lt;br /&gt;
Here is a collection of questions that were asked on the [http://moodle.org/mod/forum/view.php?id=7136 forum] or through other means.&lt;br /&gt;
&lt;br /&gt;
==Where do I include the Manager&#039;s email address for notification?==&lt;br /&gt;
&lt;br /&gt;
Currently, the way we do this is through the &amp;quot;MSN messenger&amp;quot; field on the user profile page.  So instead of storing the MSN user account, this field stores your manager&#039;s email address.&lt;br /&gt;
&lt;br /&gt;
We will hopefully change this to make use of the custom fields introduced in Moodle 1.8&lt;br /&gt;
&lt;br /&gt;
==How do I setup a wait listed session?==&lt;br /&gt;
&lt;br /&gt;
A &#039;wait-listed session&#039; in the Face-to-face module is a session for which no date is currently set. Users can then register their interest in attending a Face-to-face course even if it&#039;s not offered at this time.&lt;br /&gt;
&lt;br /&gt;
There is no way at this time to &amp;quot;exceed&amp;quot; the capacity of a given session but this can be approximated by adding a second session without a date on which users can sign-up if the other one is full.&lt;br /&gt;
&lt;br /&gt;
See this [http://moodle.org/mod/forum/discuss.php?d=96118 forum thread] for more information.&lt;/div&gt;</summary>
		<author><name>Francois@catalyst.net.nz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/36/en/index.php?title=Integrating_Face-to-face_sessions_on_the_course_page&amp;diff=34328</id>
		<title>Integrating Face-to-face sessions on the course page</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/36/en/index.php?title=Integrating_Face-to-face_sessions_on_the_course_page&amp;diff=34328"/>
		<updated>2008-03-31T00:22:58Z</updated>

		<summary type="html">&lt;p&gt;Francois@catalyst.net.nz: More explicit instructions, remove the patch&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Facetoface}}&lt;br /&gt;
&lt;br /&gt;
=Code to add=&lt;br /&gt;
&lt;br /&gt;
To display the session dates directly on the course page, you must add a couple of lines to the print_section() function in course/lib.php:&lt;br /&gt;
&lt;br /&gt;
 } elseif ($mod-&amp;gt;modname == &#039;facetoface&#039;) {&lt;br /&gt;
     include_once($CFG-&amp;gt;dirroot.&#039;/mod/facetoface/lib.php&#039;);&lt;br /&gt;
     echo facetoface_print_coursemodule_info($mod);&lt;br /&gt;
&lt;br /&gt;
=Where to add the code=&lt;br /&gt;
&lt;br /&gt;
In between this block:&lt;br /&gt;
&lt;br /&gt;
 if ($mod-&amp;gt;modname == &amp;quot;label&amp;quot;) {&lt;br /&gt;
&lt;br /&gt;
and the matching else clause:&lt;br /&gt;
&lt;br /&gt;
 } else { // Normal activity&lt;br /&gt;
&lt;br /&gt;
The code goes just above the &#039;else&#039; line just shown.&lt;br /&gt;
&lt;br /&gt;
On 1.9, it should be close to line 1347.&lt;br /&gt;
&lt;br /&gt;
=Result=&lt;br /&gt;
&lt;br /&gt;
It will look like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:Ftof01.png]]&lt;/div&gt;</summary>
		<author><name>Francois@catalyst.net.nz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/36/en/index.php?title=Face-to-face_FAQ&amp;diff=34084</id>
		<title>Face-to-face FAQ</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/36/en/index.php?title=Face-to-face_FAQ&amp;diff=34084"/>
		<updated>2008-03-27T22:26:28Z</updated>

		<summary type="html">&lt;p&gt;Francois@catalyst.net.nz: Add sidebar&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Facetoface}}&lt;br /&gt;
&lt;br /&gt;
Here is a collection of questions that were asked on the [http://moodle.org/mod/forum/view.php?id=7136 forum] or through other means.&lt;br /&gt;
&lt;br /&gt;
==Where do I include the Manager&#039;s email address for notification?==&lt;br /&gt;
&lt;br /&gt;
Currently, the way we do this is through the &amp;quot;MSN messenger&amp;quot; field on the user profile page.  So instead of storing the MSN user account, this field stores your manager&#039;s email address.&lt;br /&gt;
&lt;br /&gt;
We will hopefully change this to make use of the custom fields introduced in Moodle 1.8&lt;/div&gt;</summary>
		<author><name>Francois@catalyst.net.nz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/36/en/index.php?title=Face-to-face_FAQ&amp;diff=34083</id>
		<title>Face-to-face FAQ</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/36/en/index.php?title=Face-to-face_FAQ&amp;diff=34083"/>
		<updated>2008-03-27T22:25:43Z</updated>

		<summary type="html">&lt;p&gt;Francois@catalyst.net.nz: Where do I include the Manager&amp;#039;s email address for notification?&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here is a collection of questions that were asked on the [http://moodle.org/mod/forum/view.php?id=7136 forum] or through other means.&lt;br /&gt;
&lt;br /&gt;
==Where do I include the Manager&#039;s email address for notification?==&lt;br /&gt;
&lt;br /&gt;
Currently, the way we do this is through the &amp;quot;MSN messenger&amp;quot; field on the user profile page.  So instead of storing the MSN user account, this field stores your manager&#039;s email address.&lt;br /&gt;
&lt;br /&gt;
We will hopefully change this to make use of the custom fields introduced in Moodle 1.8&lt;/div&gt;</summary>
		<author><name>Francois@catalyst.net.nz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/36/en/index.php?title=Template:Facetoface&amp;diff=34082</id>
		<title>Template:Facetoface</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/36/en/index.php?title=Template:Facetoface&amp;diff=34082"/>
		<updated>2008-03-27T22:24:04Z</updated>

		<summary type="html">&lt;p&gt;Francois@catalyst.net.nz: add FAQ&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;sideblock right&amp;quot; style=&amp;quot;width: 15em;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;header&amp;quot;&amp;gt;[[Face-to-face module]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;content&amp;quot;&amp;gt;&lt;br /&gt;
* [[Face-to-face walk through|Walk through]]&lt;br /&gt;
* [[Creating a new Face-to-face session|Creating a new session]]&lt;br /&gt;
* [[Signing-up for a Face-to-face session|Signing-up for a session]]&lt;br /&gt;
* [[Integrating Face-to-face sessions on the course page|Integration with the course page]]&lt;br /&gt;
* [[Face-to-face FAQ|Frequently Asked Questions]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Francois@catalyst.net.nz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/36/en/index.php?title=Template:Facetoface&amp;diff=32920</id>
		<title>Template:Facetoface</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/36/en/index.php?title=Template:Facetoface&amp;diff=32920"/>
		<updated>2008-02-26T23:00:30Z</updated>

		<summary type="html">&lt;p&gt;Francois@catalyst.net.nz: Reduce width&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;sideblock right&amp;quot; style=&amp;quot;width: 15em;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;header&amp;quot;&amp;gt;[[Face-to-face module]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;content&amp;quot;&amp;gt;&lt;br /&gt;
* [[Face-to-face walk through|Walk through]]&lt;br /&gt;
* [[Creating a new Face-to-face session|Creating a new session]]&lt;br /&gt;
* [[Signing-up for a Face-to-face session|Signing-up for a session]]&lt;br /&gt;
* [[Integrating Face-to-face sessions on the course page|Integration with the course page]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Francois@catalyst.net.nz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/36/en/index.php?title=Integrating_Face-to-face_sessions_on_the_course_page&amp;diff=32919</id>
		<title>Integrating Face-to-face sessions on the course page</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/36/en/index.php?title=Integrating_Face-to-face_sessions_on_the_course_page&amp;diff=32919"/>
		<updated>2008-02-26T22:59:29Z</updated>

		<summary type="html">&lt;p&gt;Francois@catalyst.net.nz: Add sidebar&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Facetoface}}&lt;br /&gt;
&lt;br /&gt;
To display the session dates directly on the course page, add the following&lt;br /&gt;
code to the print_section() function in course/lib.php:&lt;br /&gt;
&lt;br /&gt;
 --- /cvs/moodle18/course/lib.php 2007-10-05 20:19:29.000000000 +1300&lt;br /&gt;
 +++ course/lib.php  2007-11-06 21:14:08.000000000 +1300&lt;br /&gt;
 @@ -1382,6 +1382,10 @@&lt;br /&gt;
                          echo &amp;quot;&amp;lt;/span&amp;gt;&amp;quot;;&lt;br /&gt;
                      }&lt;br /&gt;
 &lt;br /&gt;
 +                } elseif ($mod-&amp;gt;modname == &#039;facetoface&#039;) {&lt;br /&gt;
 +                    include_once($CFG-&amp;gt;dirroot.&#039;/mod/facetoface/lib.php&#039;);&lt;br /&gt;
 +                    echo facetoface_print_coursemodule_info($mod);&lt;br /&gt;
 +&lt;br /&gt;
                  } else { // Normal activity&lt;br /&gt;
 &lt;br /&gt;
                      //Accessibility: for files get description via icon.&lt;br /&gt;
&lt;br /&gt;
It will look like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:Ftof01.png]]&lt;/div&gt;</summary>
		<author><name>Francois@catalyst.net.nz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/36/en/index.php?title=Signing-up_for_a_Face-to-face_session&amp;diff=32918</id>
		<title>Signing-up for a Face-to-face session</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/36/en/index.php?title=Signing-up_for_a_Face-to-face_session&amp;diff=32918"/>
		<updated>2008-02-26T22:59:10Z</updated>

		<summary type="html">&lt;p&gt;Francois@catalyst.net.nz: Add sidebar&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Facetoface}}&lt;br /&gt;
&lt;br /&gt;
Students can sign-up for one of the sessions by clicking on the Face-to-face link in the course page (which brings them to the &amp;quot;upcoming sessions&amp;quot; page) and then clicking on the signup link next to the session they want.&lt;/div&gt;</summary>
		<author><name>Francois@catalyst.net.nz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/36/en/index.php?title=Creating_a_new_Face-to-face_session&amp;diff=32917</id>
		<title>Creating a new Face-to-face session</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/36/en/index.php?title=Creating_a_new_Face-to-face_session&amp;diff=32917"/>
		<updated>2008-02-26T22:59:01Z</updated>

		<summary type="html">&lt;p&gt;Francois@catalyst.net.nz: Add sidebar&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Facetoface}}&lt;br /&gt;
&lt;br /&gt;
Once you have added the Face-to-face activity to a course, you can add new sessions (as a teacher in that course or an administrator) by:&lt;br /&gt;
&lt;br /&gt;
* clicking on the Face-to-face activity to get to the page of &amp;quot;upcoming sessions&amp;quot;&lt;br /&gt;
* clicking on the &amp;quot;add session&amp;quot; link at the bottom of the table&lt;br /&gt;
&lt;br /&gt;
==Why is the &amp;quot;add sessions&amp;quot; button not visible to non-admin teachers?==&lt;br /&gt;
&lt;br /&gt;
Make sure your teachers have the following permission for that course:&lt;br /&gt;
&lt;br /&gt;
 mod/facetoface:editsessions&lt;br /&gt;
&lt;br /&gt;
Note that if you installed the face-to-face module on a running system AFTER you created the course, the permissions may not have been passed down to the teacher.&lt;/div&gt;</summary>
		<author><name>Francois@catalyst.net.nz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/36/en/index.php?title=Face-to-face_walk_through&amp;diff=32916</id>
		<title>Face-to-face walk through</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/36/en/index.php?title=Face-to-face_walk_through&amp;diff=32916"/>
		<updated>2008-02-26T22:58:49Z</updated>

		<summary type="html">&lt;p&gt;Francois@catalyst.net.nz: Add sidebar&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Facetoface}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The following is the walk through of the implementation of the Face to Face module at Inland Revenue in New Zealand.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Below&#039;&#039;&#039;, when staff visit the PowerPoint course page they are presented with three separate classroom based PowerPoint courses (101, 201 &amp;amp; 301).  Each is listed in its own topic on the same Moodle course page.  The screen shots below only shows the first topic - PowerPoint 101.&lt;br /&gt;
[[Image:Ftof01.png]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;Below&#039;&#039;&#039;, the staff member has clicked on the session offered on 15 August and is then asked to sign up or cancel. Note, in this screen shot the duration time has not been entered - this needs to be manually set as the booking can be for multiple days and varying time slots.&lt;br /&gt;
[[Image:Ftof02.png]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;Below&#039;&#039;&#039;, the staff member has clicked on sign up and is asked to confirm their manager&#039;s email address.  In the screen shot below this information is already known and the staff member needs only to confirm that it is correct.&lt;br /&gt;
[[Image:Ftof03.png]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;Below&#039;&#039;&#039;, on-screen confirmation of the completed booking.&lt;br /&gt;
[[Image:Ftof04.png]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;Below&#039;&#039;&#039;, the course page is now redrawn and in place of the upcoming session dates is the session they have booked.&lt;br /&gt;
[[Image:Ftof05.png]]&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;Below&#039;&#039;&#039;, from here they can see, who else has booked on this session.&lt;br /&gt;
[[Image:Ftof06.png]]&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;Below&#039;&#039;&#039;, and they can cancel their booking.&lt;br /&gt;
[[Image:Ftof07.png]]&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;Below&#039;&#039;&#039;, they also receive an email message confirming the booking.  This email message is re-sent with the header &amp;quot;Reminder&amp;quot; a settable number of days in advance of the session.&lt;br /&gt;
[[Image:Ftof08.png]]&lt;/div&gt;</summary>
		<author><name>Francois@catalyst.net.nz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/36/en/index.php?title=Creating_a_new_Face-to-face_session&amp;diff=32913</id>
		<title>Creating a new Face-to-face session</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/36/en/index.php?title=Creating_a_new_Face-to-face_session&amp;diff=32913"/>
		<updated>2008-02-26T22:52:02Z</updated>

		<summary type="html">&lt;p&gt;Francois@catalyst.net.nz: add a note about permissions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Once you have added the Face-to-face activity to a course, you can add new sessions (as a teacher in that course or an administrator) by:&lt;br /&gt;
&lt;br /&gt;
* clicking on the Face-to-face activity to get to the page of &amp;quot;upcoming sessions&amp;quot;&lt;br /&gt;
* clicking on the &amp;quot;add session&amp;quot; link at the bottom of the table&lt;br /&gt;
&lt;br /&gt;
==Why is the &amp;quot;add sessions&amp;quot; button not visible to non-admin teachers?==&lt;br /&gt;
&lt;br /&gt;
Make sure your teachers have the following permission for that course:&lt;br /&gt;
&lt;br /&gt;
 mod/facetoface:editsessions&lt;br /&gt;
&lt;br /&gt;
Note that if you installed the face-to-face module on a running system AFTER you created the course, the permissions may not have been passed down to the teacher.&lt;/div&gt;</summary>
		<author><name>Francois@catalyst.net.nz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/36/en/index.php?title=Face-to-face_module&amp;diff=32912</id>
		<title>Face-to-face module</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/36/en/index.php?title=Face-to-face_module&amp;diff=32912"/>
		<updated>2008-02-26T22:46:38Z</updated>

		<summary type="html">&lt;p&gt;Francois@catalyst.net.nz: Move contents to separate pages&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Facetoface}}&lt;br /&gt;
&lt;br /&gt;
Face-to-face activities are used to keep track of in-person trainings which require advance booking.&lt;br /&gt;
&lt;br /&gt;
Each activity is offered in one or more identical sessions. These sessions can be given over multiple days.&lt;br /&gt;
&lt;br /&gt;
Reminder messages are sent to users and their managers a few days before the session is scheduled to start. Confirmation messages are sent when users sign-up for a session or cancel.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=995 Download]&lt;br /&gt;
* [http://moodle.org/mod/forum/view.php?id=7136 Forum]: get help and read annoucements&lt;br /&gt;
* [http://tracker.moodle.org/secure/IssueNavigator.jspa?reset=true&amp;amp;&amp;amp;pid=10033&amp;amp;component=10250&amp;amp;sorter/field=issuekey&amp;amp;sorter/order=DESC Bug tracker]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributed code]]&lt;/div&gt;</summary>
		<author><name>Francois@catalyst.net.nz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/36/en/index.php?title=Integrating_Face-to-face_sessions_on_the_course_page&amp;diff=32911</id>
		<title>Integrating Face-to-face sessions on the course page</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/36/en/index.php?title=Integrating_Face-to-face_sessions_on_the_course_page&amp;diff=32911"/>
		<updated>2008-02-26T22:45:30Z</updated>

		<summary type="html">&lt;p&gt;Francois@catalyst.net.nz: Add one of IRD&amp;#039;s images&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;To display the session dates directly on the course page, add the following&lt;br /&gt;
code to the print_section() function in course/lib.php:&lt;br /&gt;
&lt;br /&gt;
 --- /cvs/moodle18/course/lib.php 2007-10-05 20:19:29.000000000 +1300&lt;br /&gt;
 +++ course/lib.php  2007-11-06 21:14:08.000000000 +1300&lt;br /&gt;
 @@ -1382,6 +1382,10 @@&lt;br /&gt;
                          echo &amp;quot;&amp;lt;/span&amp;gt;&amp;quot;;&lt;br /&gt;
                      }&lt;br /&gt;
 &lt;br /&gt;
 +                } elseif ($mod-&amp;gt;modname == &#039;facetoface&#039;) {&lt;br /&gt;
 +                    include_once($CFG-&amp;gt;dirroot.&#039;/mod/facetoface/lib.php&#039;);&lt;br /&gt;
 +                    echo facetoface_print_coursemodule_info($mod);&lt;br /&gt;
 +&lt;br /&gt;
                  } else { // Normal activity&lt;br /&gt;
 &lt;br /&gt;
                      //Accessibility: for files get description via icon.&lt;br /&gt;
&lt;br /&gt;
It will look like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:Ftof01.png]]&lt;/div&gt;</summary>
		<author><name>Francois@catalyst.net.nz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/36/en/index.php?title=Integrating_Face-to-face_sessions_on_the_course_page&amp;diff=32910</id>
		<title>Integrating Face-to-face sessions on the course page</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/36/en/index.php?title=Integrating_Face-to-face_sessions_on_the_course_page&amp;diff=32910"/>
		<updated>2008-02-26T22:44:25Z</updated>

		<summary type="html">&lt;p&gt;Francois@catalyst.net.nz: Moved from &amp;quot;Face-to-face module&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
To display the session dates directly on the course page, add the following&lt;br /&gt;
code to the print_section() function in course/lib.php:&lt;br /&gt;
&lt;br /&gt;
 --- /cvs/moodle18/course/lib.php 2007-10-05 20:19:29.000000000 +1300&lt;br /&gt;
 +++ course/lib.php  2007-11-06 21:14:08.000000000 +1300&lt;br /&gt;
 @@ -1382,6 +1382,10 @@&lt;br /&gt;
                          echo &amp;quot;&amp;lt;/span&amp;gt;&amp;quot;;&lt;br /&gt;
                      }&lt;br /&gt;
 &lt;br /&gt;
 +                } elseif ($mod-&amp;gt;modname == &#039;facetoface&#039;) {&lt;br /&gt;
 +                    include_once($CFG-&amp;gt;dirroot.&#039;/mod/facetoface/lib.php&#039;);&lt;br /&gt;
 +                    echo facetoface_print_coursemodule_info($mod);&lt;br /&gt;
 +&lt;br /&gt;
                  } else { // Normal activity&lt;br /&gt;
 &lt;br /&gt;
                      //Accessibility: for files get description via icon.&lt;/div&gt;</summary>
		<author><name>Francois@catalyst.net.nz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/36/en/index.php?title=Signing-up_for_a_Face-to-face_session&amp;diff=32909</id>
		<title>Signing-up for a Face-to-face session</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/36/en/index.php?title=Signing-up_for_a_Face-to-face_session&amp;diff=32909"/>
		<updated>2008-02-26T22:44:07Z</updated>

		<summary type="html">&lt;p&gt;Francois@catalyst.net.nz: Moved from &amp;quot;Face-to-face module&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Students can sign-up for one of the sessions by clicking on the Face-to-face link in the course page (which brings them to the &amp;quot;upcoming sessions&amp;quot; page) and then clicking on the signup link next to the session they want.&lt;/div&gt;</summary>
		<author><name>Francois@catalyst.net.nz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/36/en/index.php?title=Creating_a_new_Face-to-face_session&amp;diff=32908</id>
		<title>Creating a new Face-to-face session</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/36/en/index.php?title=Creating_a_new_Face-to-face_session&amp;diff=32908"/>
		<updated>2008-02-26T22:43:37Z</updated>

		<summary type="html">&lt;p&gt;Francois@catalyst.net.nz: Moved from &amp;quot;Face-to-face module&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Once you have added the Face-to-face activity to a course, you can add new sessions (as a teacher in that course or an administrator) by:&lt;br /&gt;
&lt;br /&gt;
* clicking on the Face-to-face activity to get to the page of &amp;quot;upcoming sessions&amp;quot;&lt;br /&gt;
* clicking on the &amp;quot;add session&amp;quot; link at the bottom of the table&lt;/div&gt;</summary>
		<author><name>Francois@catalyst.net.nz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/36/en/index.php?title=Face-to-face_walk_through&amp;diff=32907</id>
		<title>Face-to-face walk through</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/36/en/index.php?title=Face-to-face_walk_through&amp;diff=32907"/>
		<updated>2008-02-26T22:42:21Z</updated>

		<summary type="html">&lt;p&gt;Francois@catalyst.net.nz: Moved from &amp;quot;Face-to-face module&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;The following is the walk through of the implementation of the Face to Face module at Inland Revenue in New Zealand.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Below&#039;&#039;&#039;, when staff visit the PowerPoint course page they are presented with three separate classroom based PowerPoint courses (101, 201 &amp;amp; 301).  Each is listed in its own topic on the same Moodle course page.  The screen shots below only shows the first topic - PowerPoint 101.&lt;br /&gt;
[[Image:Ftof01.png]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;Below&#039;&#039;&#039;, the staff member has clicked on the session offered on 15 August and is then asked to sign up or cancel. Note, in this screen shot the duration time has not been entered - this needs to be manually set as the booking can be for multiple days and varying time slots.&lt;br /&gt;
[[Image:Ftof02.png]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;Below&#039;&#039;&#039;, the staff member has clicked on sign up and is asked to confirm their manager&#039;s email address.  In the screen shot below this information is already known and the staff member needs only to confirm that it is correct.&lt;br /&gt;
[[Image:Ftof03.png]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;Below&#039;&#039;&#039;, on-screen confirmation of the completed booking.&lt;br /&gt;
[[Image:Ftof04.png]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;Below&#039;&#039;&#039;, the course page is now redrawn and in place of the upcoming session dates is the session they have booked.&lt;br /&gt;
[[Image:Ftof05.png]]&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;Below&#039;&#039;&#039;, from here they can see, who else has booked on this session.&lt;br /&gt;
[[Image:Ftof06.png]]&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;Below&#039;&#039;&#039;, and they can cancel their booking.&lt;br /&gt;
[[Image:Ftof07.png]]&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;Below&#039;&#039;&#039;, they also receive an email message confirming the booking.  This email message is re-sent with the header &amp;quot;Reminder&amp;quot; a settable number of days in advance of the session.&lt;br /&gt;
[[Image:Ftof08.png]]&lt;/div&gt;</summary>
		<author><name>Francois@catalyst.net.nz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/36/en/index.php?title=Template:Facetoface&amp;diff=32906</id>
		<title>Template:Facetoface</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/36/en/index.php?title=Template:Facetoface&amp;diff=32906"/>
		<updated>2008-02-26T22:41:03Z</updated>

		<summary type="html">&lt;p&gt;Francois@catalyst.net.nz: increase block width&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;sideblock right&amp;quot; style=&amp;quot;width: 20em;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;header&amp;quot;&amp;gt;[[Face-to-face module]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;content&amp;quot;&amp;gt;&lt;br /&gt;
* [[Face-to-face walk through|Walk through]]&lt;br /&gt;
* [[Creating a new Face-to-face session|Creating a new session]]&lt;br /&gt;
* [[Signing-up for a Face-to-face session|Signing-up for a session]]&lt;br /&gt;
* [[Integrating Face-to-face sessions on the course page|Integration with the course page]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Francois@catalyst.net.nz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/36/en/index.php?title=Template:Facetoface&amp;diff=32905</id>
		<title>Template:Facetoface</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/36/en/index.php?title=Template:Facetoface&amp;diff=32905"/>
		<updated>2008-02-26T22:40:34Z</updated>

		<summary type="html">&lt;p&gt;Francois@catalyst.net.nz: Avoid linking to generic page names&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;sideblock right&amp;quot; style=&amp;quot;width: 18em;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;header&amp;quot;&amp;gt;[[Face-to-face module]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;content&amp;quot;&amp;gt;&lt;br /&gt;
* [[Face-to-face walk through|Walk through]]&lt;br /&gt;
* [[Creating a new Face-to-face session|Creating a new session]]&lt;br /&gt;
* [[Signing-up for a Face-to-face session|Signing-up for a session]]&lt;br /&gt;
* [[Integrating Face-to-face sessions on the course page|Integration with the course page]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Francois@catalyst.net.nz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/36/en/index.php?title=Template:Facetoface&amp;diff=32904</id>
		<title>Template:Facetoface</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/36/en/index.php?title=Template:Facetoface&amp;diff=32904"/>
		<updated>2008-02-26T22:36:29Z</updated>

		<summary type="html">&lt;p&gt;Francois@catalyst.net.nz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;sideblock right&amp;quot; style=&amp;quot;width: 12em;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;header&amp;quot;&amp;gt;[[Face-to-face module]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;content&amp;quot;&amp;gt;&lt;br /&gt;
* [[Walk through]]&lt;br /&gt;
* [[Creating a new session]]&lt;br /&gt;
* [[Signing-up for a session]]&lt;br /&gt;
* [[Integration with the course page]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Francois@catalyst.net.nz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/36/en/index.php?title=Face-to-face_module&amp;diff=32473</id>
		<title>Face-to-face module</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/36/en/index.php?title=Face-to-face_module&amp;diff=32473"/>
		<updated>2008-02-20T05:21:43Z</updated>

		<summary type="html">&lt;p&gt;Francois@catalyst.net.nz: First draft&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Face-to-face activities are used to keep track of in-person trainings which require advance booking.&lt;br /&gt;
&lt;br /&gt;
Each activity is offered in one or more identical sessions. These sessions can be given over multiple days.&lt;br /&gt;
&lt;br /&gt;
Reminder messages are sent to users and their managers a few days before the session is scheduled to start. Confirmation messages are sent when users sign-up for a session or cancel.&lt;br /&gt;
&lt;br /&gt;
= Creating a new session =&lt;br /&gt;
&lt;br /&gt;
Once you have added the Face-to-face activity to a course, you can add new sessions (as a teacher in that course or an administrator) by:&lt;br /&gt;
&lt;br /&gt;
* clicking on the Face-to-face activity to get to the page of &amp;quot;upcoming sessions&amp;quot;&lt;br /&gt;
* clicking on the &amp;quot;add session&amp;quot; link at the bottom of the table&lt;br /&gt;
&lt;br /&gt;
= Signing-up for a session =&lt;br /&gt;
&lt;br /&gt;
Students can sign-up for one of the sessions by clicking on the Face-to-face link in the course page (which brings them to the &amp;quot;upcoming sessions&amp;quot; page) and then clicking on the signup link next to the session they want.&lt;br /&gt;
&lt;br /&gt;
= Integration with the course page =&lt;br /&gt;
&lt;br /&gt;
To display the session dates directly on the course page, add the following&lt;br /&gt;
code to the print_section() function in course/lib.php:&lt;br /&gt;
&lt;br /&gt;
 --- /cvs/moodle18/course/lib.php 2007-10-05 20:19:29.000000000 +1300&lt;br /&gt;
 +++ course/lib.php  2007-11-06 21:14:08.000000000 +1300&lt;br /&gt;
 @@ -1382,6 +1382,10 @@&lt;br /&gt;
                          echo &amp;quot;&amp;lt;/span&amp;gt;&amp;quot;;&lt;br /&gt;
                      }&lt;br /&gt;
 &lt;br /&gt;
 +                } elseif ($mod-&amp;gt;modname == &#039;facetoface&#039;) {&lt;br /&gt;
 +                    include_once($CFG-&amp;gt;dirroot.&#039;/mod/facetoface/lib.php&#039;);&lt;br /&gt;
 +                    echo facetoface_print_coursemodule_info($mod);&lt;br /&gt;
 +&lt;br /&gt;
                  } else { // Normal activity&lt;br /&gt;
 &lt;br /&gt;
                      //Accessibility: for files get description via icon.&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
&lt;br /&gt;
* [http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=995 Download]&lt;br /&gt;
* [http://moodle.org/mod/forum/view.php?id=7136 Forum]: get help and read annoucements&lt;br /&gt;
* [http://tracker.moodle.org/secure/IssueNavigator.jspa?reset=true&amp;amp;&amp;amp;pid=10033&amp;amp;component=10250&amp;amp;sorter/field=issuekey&amp;amp;sorter/order=DESC Bug tracker]&lt;/div&gt;</summary>
		<author><name>Francois@catalyst.net.nz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/36/en/index.php?title=Development:Roles&amp;diff=26247</id>
		<title>Development:Roles</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/36/en/index.php?title=Development:Roles&amp;diff=26247"/>
		<updated>2007-08-23T05:09:59Z</updated>

		<summary type="html">&lt;p&gt;Francois@catalyst.net.nz: /* Programming Interface */ remove extra bracket&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Moodle 1.7}}&lt;br /&gt;
&#039;&#039;&#039;Roles and permissions&#039;&#039;&#039; is in Moodle 1.7 onwards.&lt;br /&gt;
&lt;br /&gt;
==Definitions==&lt;br /&gt;
&lt;br /&gt;
A role is an identifier of the user&#039;s status in some context. For example: Teacher, Student and Forum moderator are examples of roles.&lt;br /&gt;
&lt;br /&gt;
A capability is a description of some particular Moodle feature. Capabilities are associated with roles. For example, &#039;&#039;mod/forum:replypost&#039;&#039; is a capability.&lt;br /&gt;
&lt;br /&gt;
A permission is some value that is assigned for a capability for a particular role.  For example, allow or prevent.&lt;br /&gt;
&lt;br /&gt;
A context is a &amp;quot;space&amp;quot; in the Moodle, such as courses, activity modules, blocks etc.&lt;br /&gt;
&lt;br /&gt;
==The existing system==&lt;br /&gt;
&lt;br /&gt;
In versions prior to v1.7, Moodle uses a fixed set of roles i.e. primary admin, admins, course creators, editing teachers, non-editing teachers, students, and guests. For each role, the capability or actions that they can perform are fixed. For example, the role student allows the user to submit an assignment, but doesn&#039;t allow the user to browse/edit other users&#039; work. By using this setup we limit ourselves to a rather rigid set of capabilities for each role. If we want, say a particular student or group to be able to mark assignments in a particular course, we can&#039;t do that without giving these users teacher privileges.&lt;br /&gt;
&lt;br /&gt;
==The new roles and capability system==&lt;br /&gt;
&lt;br /&gt;
With v1.7 and greater, Moodle introduces a roles and capabilities system.&lt;br /&gt;
&lt;br /&gt;
Role has two primary functions:&lt;br /&gt;
# define list of permissions - role definition is global for all contexts, but can be changed by local context overrides&lt;br /&gt;
# replace old course enrolments - role assignment in course context is simitar to the old enrolment process&lt;br /&gt;
&lt;br /&gt;
The new system will allow authorized users to define an arbitrary number of roles (eg a teacher) &lt;br /&gt;
&lt;br /&gt;
A role consists of a list of permissions for different possible actions within Moodle (eg delete discussions, add activities etc)&lt;br /&gt;
&lt;br /&gt;
Roles can be applied to users in a context (eg assign Fred as a teacher in a particular course)&lt;br /&gt;
&lt;br /&gt;
Here are the possible contexts, listed from the most general to the most specific. &lt;br /&gt;
&lt;br /&gt;
#CONTEXT_SYSTEM       -- the whole site&lt;br /&gt;
#CONTEXT_PERSONAL     -- yourself&lt;br /&gt;
#CONTEXT_USER         -- another user&lt;br /&gt;
#CONTEXT_COURSECAT    -- a course category&lt;br /&gt;
#CONTEXT_COURSE       -- a course&lt;br /&gt;
#CONTEXT_GROUP        -- a group&lt;br /&gt;
#CONTEXT_MODULE       -- an activity module&lt;br /&gt;
#CONTEXT_BLOCK        -- a block&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle-contexts-1.8.png|right|thumb|A diagram of the contexts in Moodle 1.8, based on the [[Talk:Roles_and_capabilities|text diagram by Martin Dougiamas]]. Click on the diagram to see a more detailed view of it.]]&lt;br /&gt;
&lt;br /&gt;
An authorized user will be able to assign an arbitrary number of roles to each user in any context.&lt;br /&gt;
&lt;br /&gt;
Capabilities can have the following permissions:&lt;br /&gt;
&lt;br /&gt;
#CAP_INHERIT&lt;br /&gt;
#CAP_ALLOW&lt;br /&gt;
#CAP_PREVENT&lt;br /&gt;
#CAP_PROHIBIT&lt;br /&gt;
&lt;br /&gt;
If no permission is defined, then the capability permission is inherited from a context that is more general than the current context. If we define different permission values for the same capability in different contexts, we say that we are overriding the capability in the more specific context.&lt;br /&gt;
&lt;br /&gt;
Since the capabilities in each role could be different, there could be conflict in capabilities. This is resolved by enforcing the rule that the capability defined for a more specific context will win, unless a prohibit is encountered in a less specific context.&lt;br /&gt;
&lt;br /&gt;
For example, Mark has a student role at course level, which allows him to write into a wiki. But Mark also got assigned a Visitor role at a module context level (for a particular wiki) which prevents him from writing to the wiki (read only). Therefore, for this particular wiki, Mark will not be able to write to the wiki since the more specific context wins.&lt;br /&gt;
&lt;br /&gt;
If we set a PROHIBIT on a capability, it means that the capability cannot be overridden and will ALWAYS  have a permission of prevent (deny). Prohibit always wins.   For example, Jeff has a naughty student role that prohibits him from postings in any forums (for the whole site), but he&#039;s also assigned a facilitator role in &amp;quot;Science forum&amp;quot; in the course Science and Math 101. Since prohibit always wins, Jeff is unable to post in &amp;quot;Science forum&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Allow and prevent will cancel each other out if set for the same capability at the same context level. If this happens, we refer to the previous context level to determine the permission for the capability.&lt;br /&gt;
&lt;br /&gt;
This may sound more complex than it really is in practice.  The upshot is that the system can be flexible enough to allow pretty much any combination of permissions.&lt;br /&gt;
&lt;br /&gt;
==Upgrading from 1.6==&lt;br /&gt;
&lt;br /&gt;
A smooth upgrade will be provided with 1.7. The existing roles (admin, teacher, student, etc), and the existing capabilities will be automatically retained.  This is done by creating default roles at site/course levels, and assigning the current users to these roles accordingly. The default roles will have default capabilities associated with them, mirroring what we have  in 1.6.   With no modifications, Moodle will operate exactly the same before and after the upgrade.&lt;br /&gt;
&lt;br /&gt;
===Admins===&lt;br /&gt;
&lt;br /&gt;
Admin users will be assigned the default legacy admin role in the system (site) context&lt;br /&gt;
&lt;br /&gt;
===Course Creators===&lt;br /&gt;
&lt;br /&gt;
Course Creators will be assigned the default legacy course creator role in the system (site) context&lt;br /&gt;
&lt;br /&gt;
===Teachers===&lt;br /&gt;
&lt;br /&gt;
Users who were teachers will be assigned the default legacy teacher role (or non-editing teacher role) in all courses they were teacher.&lt;br /&gt;
&lt;br /&gt;
===Students===&lt;br /&gt;
&lt;br /&gt;
Users who were students will be assigned the default student role in all courses they were student.&lt;br /&gt;
&lt;br /&gt;
===Guests===&lt;br /&gt;
&lt;br /&gt;
There will still be a single guest user with no default role at site level.   For each course that allows guest access, the guest role will be assigned to the guest user for that course context.   The guest control for the course will be modified from three to two options (guests always need to enter enrolment key - on/off).  This setting is checked as now to force guests to enter key.&lt;br /&gt;
&lt;br /&gt;
==Capabilities==&lt;br /&gt;
&lt;br /&gt;
This will be a comprehensive list of capabilities (it&#039;s not complete yet). It is important that capability names are unique.&lt;br /&gt;
&lt;br /&gt;
===Core-level Capabilities===&lt;br /&gt;
&lt;br /&gt;
Moodle core capability names start with &#039;moodle/&#039;.  The next word indicates what type of core capability it is, and the last word is the actual capability itself.  The capabilities for the Moodle core are defined in lib/db/access.php&lt;br /&gt;
&lt;br /&gt;
#moodle/legacy:guest - legacy capabilities are used to transition existing users to the new roles system during the upgrade to Moodle 1.7&lt;br /&gt;
#moodle/legacy:student&lt;br /&gt;
#moodle/legacy:teacher&lt;br /&gt;
#moodle/legacy:editingteacher&lt;br /&gt;
#moodle/legacy:coursecreator&lt;br /&gt;
#moodle/legacy:admin&lt;br /&gt;
#moodle/site:doanything - special capability, meant for admins, if is set, overrides all other capability settings&lt;br /&gt;
#moodle/site:config - applicable in admin/index.php and config.php (might break down later) : 1)admin/config.php 2)admin/configure.php 3)blocks/admin/block_admin.php load_content_for_site()&lt;br /&gt;
#moodle/site:readallmessages - reads all messages and history&lt;br /&gt;
#moodle/site:approvecourse - approves a pending course&lt;br /&gt;
#moodle/site:manageblocks - adding/removing/editing blocks (site, course contexts only for now) : 1)_add_edit_controls moodleblock.class.php &lt;br /&gt;
#moodle/site:backup - can create a course backup : 1)course/category.php 2)block_admin.php&lt;br /&gt;
#moodle/site:restore - can restore into this context : 1)course/category.php 2)block_admin.php&lt;br /&gt;
#moodle/site:import - can import other courses into this context : 1)block_admin.php&lt;br /&gt;
#moodle/site:accessallgroups - able to access all groups irrespective of what group the user is in&lt;br /&gt;
#moodle/site:accessdb - directly accessing db (phpmyadmin)&lt;br /&gt;
#moodle/site:viewfullnames - able to see fullnames of other users&lt;br /&gt;
#moodle/site:viewparticipants - able to view participants&lt;br /&gt;
#moodle/site:viewreports - able to view site/course reports&lt;br /&gt;
#moodle/site:trustcontent - ability to use trusttext feature and bypass cleaning in specific areas&lt;br /&gt;
#moodle/site:uploadusers - ability to upload/update users from text file; moodle/role:assign capability is needed for course enrolling&lt;br /&gt;
#moodle/blog:view - read blogs (usable in system or course context)&lt;br /&gt;
#moodle/blog:create - write new blog posts (usable in system context only)&lt;br /&gt;
#moodle/blog:manageofficialtags - create/delete official blog tags that others can use (usable in system context only)&lt;br /&gt;
#moodle/blog:managepersonaltags - delete personal blog tags that others can use (usable in system context only) Note: users can always add own personal tags. This setting should be off for students by default.&lt;br /&gt;
#moodle/blog:manageentries - edit/delete all blog entries (usable in system context only)&lt;br /&gt;
#moodle/course:setcurrentsection - mark course section&lt;br /&gt;
#moodle/course:create - create courses : 1)course/edit.php 2)course/category.php 3)course/index.php&lt;br /&gt;
#moodle/course:delete - create courses : 1)course/category.php&lt;br /&gt;
#moodle/course:update - update course settings&lt;br /&gt;
#moodle/course:view - can use this to find participants&lt;br /&gt;
#moodle/course:viewparticipants - allows a user to view participant list&lt;br /&gt;
#moodle/course:viewscales - view scales (i.e. in a help window?) : 1)course/scales.php&lt;br /&gt;
#moodle/course:manageactivities - adding/removing/editing activities and resources (don&#039;t think it makes any sense to split these)&lt;br /&gt;
#moodle/course:managescales - add, delete, edit scales, move scales up and down : 1)blocks/block_admin.php 2)course/scales.php&lt;br /&gt;
#moodle/course:managegroups - managing groups, add, edit, delete : 1)course/groups.php 2)course/group.php&lt;br /&gt;
#moodle/course:managefiles - manage course files and folders&lt;br /&gt;
#moodle/course:managequestions - manage course questions&lt;br /&gt;
#moodle/course:managemetacourse - manage child courses in metacourse&lt;br /&gt;
#moodle/course:reset - able to reset the course&lt;br /&gt;
#moodle/course:useremail - Can use the enable/disable email stuff&lt;br /&gt;
#moodle/course:visibility - hide/show courses : 1)course/category.php&lt;br /&gt;
#moodle/course:viewhiddencourses - see hidden courses&lt;br /&gt;
#moodle/course:activityvisibility - hide/show activities within a course&lt;br /&gt;
#moodle/course:viewhiddenactivities - able to see activities that have been hidden&lt;br /&gt;
#moodle/course:sectionvisibility - hide/show sections&lt;br /&gt;
#moodle/course:viewhiddensections - view hidden sections&lt;br /&gt;
#moodle/course:viewcoursegrades - views all grades in course&lt;br /&gt;
#moodle/course:viewhiddenuserfields - view all hidden user fields&lt;br /&gt;
#moodle/course:managegrades - manages grades settings in course&lt;br /&gt;
#moodle/category:create - create category : 1)course/index.php&lt;br /&gt;
#moodle/category:delete - delete category : 1)course/index.php&lt;br /&gt;
#moodle/category:update - update category settings (sort and rename) this is currently an admin capability : 1)course/category.php&lt;br /&gt;
#moodle/category:visibility - hide/show categories : 1)course/index.php&lt;br /&gt;
#moodle/user:viewusergrades - view your own, or other user&#039;s grades (with specified context)&lt;br /&gt;
#moodle/user:create - create user : 1) user/edit.php&lt;br /&gt;
#moodle/user:delete - delete user : 1) admin/user.php&lt;br /&gt;
#moodle/user:readuserblogs - read blog entries&lt;br /&gt;
#moodle/user:update - update user settings : 1) user/edit.php&lt;br /&gt;
#moodle/user:viewdetails - view personally-identifying user details (e.g. name, photo).&lt;br /&gt;
#moodle/user:viewhiddendetails - view user details marked as &amp;quot;hidden&amp;quot;&lt;br /&gt;
#moodle/calendar:manageownentries - create/edit/delete &lt;br /&gt;
#moodle/calendar:manageentries - create/edit/delete&lt;br /&gt;
#moodle/role:assign - assign roles to users&lt;br /&gt;
#moodle/role:override - can override role capabilities (depending on context)&lt;br /&gt;
#moodle/role:manage - create/edit/delete roles, set capability permissions for each role&lt;br /&gt;
#moodle/role:unassignself - unassign yourself from your own roles&lt;br /&gt;
#moodle/role:viewhiddenassigns - view role assignments that have been marked as hidden&lt;br /&gt;
#moodle/question:import - imports questions (course level?) - Yes, question permissions currently need to be course-level.--[[User:Tim Hunt|Tim Hunt]]&lt;br /&gt;
#moodle/question:export - exports questions (course level?)&lt;br /&gt;
#moodle/question:managecateory - add/delete/edit question categories (course level?)&lt;br /&gt;
#moodle/question:manage - add/edit/delete a question (course level)&lt;br /&gt;
&lt;br /&gt;
===User-level Capabilities===&lt;br /&gt;
# moodle/user:readuserposts -read individual user posts on profile page (parent?)&lt;br /&gt;
# moodle/user:readuserblogs -read individual user blogs on profile page (parent?)&lt;br /&gt;
# moodle/user:viewuseractivitiesreport-read individual activity report on profile page (parent?)&lt;br /&gt;
# moodle/user:editprofile - edit profile (normally used in CONTEXT_USERID and CONTEXT_SYSTEM)&lt;br /&gt;
&lt;br /&gt;
===Module-level Capabilities===&lt;br /&gt;
The capabilities are cached into a database table when a module is installed or updated. Whenever the capability definitions are updated, the module version number should be bumped up so that the database table can be updated.&lt;br /&gt;
&lt;br /&gt;
The naming convention for capabilities that are specific to modules and blocks is &#039;mod/mod_name:capability&#039;.  The part before the colon is the full path to the module in the Moodle code.  The module capabilities are defined in mod/mod_name/db/access.php.&lt;br /&gt;
&lt;br /&gt;
#Assignment&lt;br /&gt;
##mod/assignment:view- reading the assignment description&lt;br /&gt;
##mod/assignment:submit - turn assignment in&lt;br /&gt;
##mod/assignment:grade - grading, viewing of list of submitted assignments&lt;br /&gt;
#Chat&lt;br /&gt;
##mod/chat:chat - allows a user to participate in this chat&lt;br /&gt;
##mod/chat:readlog - allows a user to read past chat session logs&lt;br /&gt;
##mod/chat:deletelog - allows a user to delete past chat logs&lt;br /&gt;
#Choice&lt;br /&gt;
##mod/choice:choose - make a choice&lt;br /&gt;
##mod/choice:readresponses - read all responses&lt;br /&gt;
##mod/choice:deleteresponses - deletes all responses&lt;br /&gt;
##mod/choice:downloadresponses - download responses&lt;br /&gt;
#Database&lt;br /&gt;
##mod/data:viewentry - reads other people&#039;s entry&lt;br /&gt;
##mod/data:writeentry - add / edit and delete (own) entries&lt;br /&gt;
##mod/data:managetemplates - add, delete, edit fields and templates&lt;br /&gt;
##mod/data:manageentries - edit/delete all entries&lt;br /&gt;
##mod/data:comment - comment&lt;br /&gt;
##mod/data:managecomments - edit/delete all comments&lt;br /&gt;
##mod/data:rate - rate an entry&lt;br /&gt;
##mod/data:viewrating&lt;br /&gt;
##mod/data:approve - approves an entry&lt;br /&gt;
##mod/data:uploadentries - batch upload of entries&lt;br /&gt;
#Exercise&lt;br /&gt;
##mod/exercise:assess&lt;br /&gt;
#Forum&lt;br /&gt;
##mod/forum:viewdiscussion&lt;br /&gt;
##mod/forum:viewdiscussionsfromallgroups&lt;br /&gt;
##mod/forum:viewhiddentimedposts&lt;br /&gt;
##mod/forum:startdiscussion&lt;br /&gt;
##mod/forum:replypost&lt;br /&gt;
##mod/forum:viewrating&lt;br /&gt;
##mod/forum:viewanyrating&lt;br /&gt;
##mod/forum:rate&lt;br /&gt;
##mod/forum:createattachment&lt;br /&gt;
##mod/forum:deleteownpost&lt;br /&gt;
##mod/forum:deleteanypost&lt;br /&gt;
##mod/forum:splitdiscussions&lt;br /&gt;
##mod/forum:movediscussions&lt;br /&gt;
##mod/forum:editanypost&lt;br /&gt;
##mod/forum:viewqandawithoutposting&lt;br /&gt;
##mod/forum:viewsubscribers&lt;br /&gt;
##mod/forum:managesubscriptions&lt;br /&gt;
##mod/forum:throttlingapplies&lt;br /&gt;
#Glossary&lt;br /&gt;
##mod/glossary:write - add entries&lt;br /&gt;
##mod/glossary:manageentries - add, edit, delete entries&lt;br /&gt;
##mod/glossary:managecategories - create, delete, edit categories&lt;br /&gt;
##mod/glossary:comment - comment on an entry&lt;br /&gt;
##mod/glossary:managecomments - edit, delete comments&lt;br /&gt;
##mod/glossary:import - import glossaries&lt;br /&gt;
##mod/glossary:export - export glossaries&lt;br /&gt;
##mod/glossary:approve - approve glossaries&lt;br /&gt;
##mod/glossary:rate - rates glossary&lt;br /&gt;
##mod/glossary:viewrating - view ratings&lt;br /&gt;
#Hotpot&lt;br /&gt;
##mod/hotpot:attempt - attempt a hotpot&lt;br /&gt;
##mod/hotpot:viewreport - review and view reports&lt;br /&gt;
##mod/hotpot:grade - (grade? and) regrade&lt;br /&gt;
##mod/hotpot:deleteattempt - deletes attempts&lt;br /&gt;
#Label&lt;br /&gt;
##none&lt;br /&gt;
#Lams&lt;br /&gt;
##mod/lams:participate - original student&lt;br /&gt;
##mod/lams:manage - original teacher&lt;br /&gt;
#Lesson&lt;br /&gt;
##mod/lesson:edit - add and edit pages&lt;br /&gt;
##mod/lesson:manage - view student attempts&lt;br /&gt;
#Quiz&lt;br /&gt;
##mod/quiz:grade - comment, override grade, manual grade&lt;br /&gt;
##mod/quiz:preview - previews the quiz&lt;br /&gt;
##mod/quiz:viewreports - view quiz result reports&lt;br /&gt;
##mod/quiz:manage - add/delete/move (up or down) questions for a quiz&lt;br /&gt;
##mod/quiz:attempt - attempt the quiz--[[User:Tim Hunt|Tim Hunt]]&lt;br /&gt;
#Resource&lt;br /&gt;
#Scorm&lt;br /&gt;
##mod/scorm:viewgrades&lt;br /&gt;
#Survey&lt;br /&gt;
##mod/survey:download - downloads survery result&lt;br /&gt;
##mod/survey:participate - participate/ do survey&lt;br /&gt;
##mod/survey:readresponses - read all user&#039;s responese&lt;br /&gt;
#Wiki&lt;br /&gt;
##mod/wiki:participate - original student, meaning depends of type and course setting&lt;br /&gt;
##mod/wiki:manage - original teacher, manages assigned group; moodle/site:accessallgroups is needed to manage all groups &lt;br /&gt;
##(Waiting on new wiki)&lt;br /&gt;
#Workshop&lt;br /&gt;
##mod/workshop:participate - original student, allows user to submit and assess&lt;br /&gt;
##mod/workshop:manage - original teacher, user can manage others&lt;br /&gt;
##(Waiting on new Workshop)&lt;br /&gt;
&lt;br /&gt;
===Enrolment-level Capabilities===&lt;br /&gt;
&lt;br /&gt;
The naming convention for capabilities that are specific to enrolment is &#039;enrol/enrol_name:capability&#039;. The enrolment capabilities are defined in enrol/enrol_name/db/access.php.&lt;br /&gt;
&lt;br /&gt;
#Authorize.net Payment Gateway &lt;br /&gt;
##enrol/authorize:managepayments - manage user payments, capture, void, refund, delete etc.&lt;br /&gt;
&lt;br /&gt;
===Blocks===&lt;br /&gt;
#activity_modules&lt;br /&gt;
##None&lt;br /&gt;
#admin&lt;br /&gt;
#admin_2&lt;br /&gt;
#admin_bookmarks&lt;br /&gt;
#blog_menu&lt;br /&gt;
#blog_tags&lt;br /&gt;
#calendar_month&lt;br /&gt;
#calendar_upcoming&lt;br /&gt;
#course_list&lt;br /&gt;
#course_summary&lt;br /&gt;
#glossary_random&lt;br /&gt;
#html&lt;br /&gt;
#loancalc&lt;br /&gt;
#login&lt;br /&gt;
#messages&lt;br /&gt;
#news_items&lt;br /&gt;
#online_users&lt;br /&gt;
#participants&lt;br /&gt;
#quiz_results&lt;br /&gt;
#recent_activity&lt;br /&gt;
#rss_client&lt;br /&gt;
##block/rss_client:createprivatefeeds&lt;br /&gt;
##block/rss_client:createsharedfeeds&lt;br /&gt;
##block/rss_client:manageownfeeds&lt;br /&gt;
##block/rss_client:manageanyfeeds&lt;br /&gt;
#search&lt;br /&gt;
#search_forums&lt;br /&gt;
#section_links&lt;br /&gt;
#site_main_menu&lt;br /&gt;
#social_activities&lt;br /&gt;
&lt;br /&gt;
===Questions===&lt;br /&gt;
I am adding question categories here because they seem to have been forgotten in the whole scheme of things since having been removed from the quiz module itself. I&#039;ve made a suggestion on how these could be handled in [http://www.moodle.org/bugs/bug.php?op=show&amp;amp;bugid=6118&amp;amp;pos= bug 6118].&lt;br /&gt;
&lt;br /&gt;
See [http://moodle.org/mod/forum/discuss.php?d=51143 this forum thread] for a discussion about the current problems wth publishing question categories.[[User:Tim Hunt|Tim Hunt]] 18:50, 8 August 2006 (WST)&lt;br /&gt;
&lt;br /&gt;
==Programming Interface==&lt;br /&gt;
&lt;br /&gt;
Although the Roles system may look complicated at first glance, implementing it in Moodle code is fairly simple.&lt;br /&gt;
&lt;br /&gt;
* You need to define each capability once, so that Moodle can upgrade existing roles to take advantage of it.  You do this in an access.php inside the db folder of any module (eg see mod/forum/db/access.php).  The array contains entries like this (note the descriptions for the legacy roles which provides forward compatibility):&lt;br /&gt;
    &#039;mod/forum:viewforum&#039; =&amp;gt; array(&lt;br /&gt;
        &#039;captype&#039; =&amp;gt; &#039;read&#039;,&lt;br /&gt;
        &#039;contextlevel&#039; =&amp;gt; CONTEXT_MODULE,&lt;br /&gt;
        &#039;legacy&#039; =&amp;gt; array(&lt;br /&gt;
            &#039;guest&#039; =&amp;gt; CAP_PREVENT,&lt;br /&gt;
            &#039;student&#039; =&amp;gt; CAP_ALLOW,&lt;br /&gt;
            &#039;teacher&#039; =&amp;gt; CAP_ALLOW,&lt;br /&gt;
            &#039;editingteacher&#039; =&amp;gt; CAP_ALLOW,&lt;br /&gt;
            &#039;coursecreator&#039; =&amp;gt; CAP_ALLOW,&lt;br /&gt;
            &#039;admin&#039; =&amp;gt; CAP_ALLOW&lt;br /&gt;
        )&lt;br /&gt;
    ),&lt;br /&gt;
* To load/change these capabilities you need to bump the module version.   There&#039;s no need to provide changes or differences as Moodle will scan the whole array and sort it out.&lt;br /&gt;
* On each page you need to find the context the user is working in, using the get_context_instance() function.  For example, in the forum module:&lt;br /&gt;
&lt;br /&gt;
  $context = get_context_instance(CONTEXT_MODULE, $cm-&amp;gt;id);&lt;br /&gt;
* or to at the course level:&lt;br /&gt;
  $context = get_context_instance(CONTEXT_COURSE, $id);&lt;br /&gt;
* Then, whenever you want to check that the current user has rights to do something, call has_capability() like this:&lt;br /&gt;
    if (!has_capability(&#039;mod/forum:viewforum&#039;, $context)) {&lt;br /&gt;
        print_error(&#039;nopermissiontoviewforum&#039;);&lt;br /&gt;
    }&lt;br /&gt;
* If you just want to assert a capability and then finish with an error message if it&#039;s not met (as we did above), then a shorter way it to use require_capability() like this:&lt;br /&gt;
&lt;br /&gt;
    require_capability(&#039;mod/forum:viewforum&#039;, $context);&lt;br /&gt;
&lt;br /&gt;
* Note that there are extra parameters you can specify to get a custom error message, otherwise users get an automated &amp;quot;No permissions&amp;quot; message that lists the permission they were missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As a result of the new Roles System, all calls to isadmin(), iscoursecreator, isteacheredit(), isteacher(), isstudent(), and isguest() will have to be replaced with calls to has_capability() or require_capability().   However, these functions will be retained for some backward compatibility with old code, using the legacy capabilities to try and work out what to do.&lt;br /&gt;
&lt;br /&gt;
==Metacourses==&lt;br /&gt;
&lt;br /&gt;
The behaviour of metacourses in Moodle 1.7 changed slightly, in that where it used to just synch students from child courses to the parent course, it will now synch ALL roles. Teachers etc of the child courses will have the same role in the meta course. Technically metacourse synchronises all role assignments in CONTEXT_COURSE with its child courses; the only exception are users with moodle/course:managemetacourse capability, these users are synchronized only upwards, they are not unenrolled from metacourse when unenroling from child course or when removing the child from metacourse.&lt;br /&gt;
&lt;br /&gt;
In order to import/enrol other courses into metacoure you need to have moodle/course:managemetacourse capability. You can add manually only participants with moodle/course:managemetacourse, all other participants are automatically synced with child courses - if you try to manually enrol user without this capability error is displayed. Similar error is shown also when you try to manually unenrol participant from meta course while still being enrolled in child course.&lt;br /&gt;
&lt;br /&gt;
Sample setup:&lt;br /&gt;
* metacourse manager has been assigned role with moodle/course:managemetacourse capability in system or course category context&lt;br /&gt;
* students are enrolled in several child courses&lt;br /&gt;
* teachers are enrolled in separate child course(s)&lt;br /&gt;
&lt;br /&gt;
==Problem areas we are working on ==&lt;br /&gt;
&lt;br /&gt;
===Student view===&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Student view&amp;quot; button has been removed completely.&lt;br /&gt;
&lt;br /&gt;
If there is time and a secure way can be found, it will be replaced by a menu to let the user assume a temporary role in the context of that course.&lt;br /&gt;
&lt;br /&gt;
===Teacher forum===&lt;br /&gt;
&lt;br /&gt;
Teacher forums were always a curious exception to normal forums, as they were not part of a course as such, and were not backed up.&lt;br /&gt;
&lt;br /&gt;
We&#039;re taking the opportunity to rectify this.   The upgrade converts teacher forums with content to normal forums in section 0 of the course, and ensures that only teachers can access them.  If the teacher forum had not been used in the course then it&#039;s not converted and will just dissappear.&lt;br /&gt;
&lt;br /&gt;
===Enrolment plugins===&lt;br /&gt;
&lt;br /&gt;
====Process of logging in====&lt;br /&gt;
&lt;br /&gt;
# load_user_capability() is called to load all the capabilities&lt;br /&gt;
# check_enrolment_plugins() is called at the top of load_user_capability() to check all the enrolment plugins.&lt;br /&gt;
# For each active plugin:&lt;br /&gt;
##Check for setup_enrolments($user) and run it.  This function will do all the processing needed to assign or unassign roles from the current user.&lt;br /&gt;
# load_user_capability() continues and loads up all the roles&lt;br /&gt;
# load_defaultuser_role() is called to add default site permissions (all users)&lt;br /&gt;
&lt;br /&gt;
====Process of checking access to a course====&lt;br /&gt;
&lt;br /&gt;
require_login($course-&amp;gt;id) is called by the script and has logic like this:&lt;br /&gt;
&lt;br /&gt;
# Is the user a guest at site level?&lt;br /&gt;
## Yes: Does the course allow guests?&lt;br /&gt;
### Yes: return true (and further capabilities are checked by the script)&lt;br /&gt;
### No:  send the user to course/enrol.php for enrolment&lt;br /&gt;
## No: continue below&lt;br /&gt;
&lt;br /&gt;
# Does the user have moodle/course:view in that (course) context?&lt;br /&gt;
## Yes: then they can enter (and further capabilities are checked by the script)&lt;br /&gt;
##  No: is guest access allowed on the course?&lt;br /&gt;
### Yes: assign temporary guest role to that user for that context (in session cache).&lt;br /&gt;
### No: send the user to course/enrol.php for enrolment.&lt;br /&gt;
&lt;br /&gt;
====Process of enrolling====&lt;br /&gt;
&lt;br /&gt;
(more soon)&lt;br /&gt;
&lt;br /&gt;
==Scenario brainstorming==&lt;br /&gt;
&lt;br /&gt;
This section is for brainstorming some example roles that we would like to support.  Note some of these *may* not be possible in 1.7.&lt;br /&gt;
&lt;br /&gt;
===Student===&lt;br /&gt;
Obviously.&lt;br /&gt;
&lt;br /&gt;
===Site Designers===&lt;br /&gt;
Is there a role for people involved in how the site looks but not full administrators? Thinking here of online control of themes rather than FTP theme uploading. But in either case they caneditlogos, caneditcss, candeditlevelatwhichthemeapplies.&lt;br /&gt;
&lt;br /&gt;
===Educational Authority Adviser===&lt;br /&gt;
Someone who would want to browse the site and may be asked to comment or contribute to particular discussions or developments in school. Access for this role would be controlled by the school in the case of school level moodles but may be different if there were to be a Local Authority wide Moodle.&lt;br /&gt;
&lt;br /&gt;
===Educational Inspector===&lt;br /&gt;
Someone who will visit the site to verify the school&#039;s self review that comments on home school relationships, extending the classroom etc. They may want to see summaries of usage and reports from surveys garnering parent and pupil views.&lt;br /&gt;
&lt;br /&gt;
===Second Marker / Moderator===&lt;br /&gt;
A teacher within ths site that has access to assignments and quizzes from another teacher&#039;s course for second marking purposes. This may need additional functionality adding to the assignment module so that two sets of grades/feedback can be given to one set of assignments.&lt;br /&gt;
&lt;br /&gt;
===Peer observer of teaching===&lt;br /&gt;
Many institutions encourage peer observation of teaching, to encourage reflection on practice. In online environments this will be similar to moderation or inspection. The peer observer would need to be able to experience the course &amp;quot;as a student&amp;quot;, but also to be able to view summaries of usage, transcripts of interactions (forums/surveys/polls etc), grades assigned (e.g. in assignments).&lt;br /&gt;
&lt;br /&gt;
===External Examiner===&lt;br /&gt;
Has all the rights of inspectors, but would also need to be able to review assignments and feedback, view forums, glossaries etc. However, would not want to post, feedback onto the site at all.&lt;br /&gt;
&lt;br /&gt;
===Parent===&lt;br /&gt;
A parent will have one or more children in one or more institutions which could be using one or more moodle instances or a mixture of Learning Platforms. A parent&#039;s role will vary depending on the age of their children and whether they are contributing as a parent or a school supporter.&lt;br /&gt;
&lt;br /&gt;
In Early Years (EY=3+4 yr olds) and Key Stage 1 (KS1=5+6 yr olds) they may play/learn on an activity or write for the child. Parents often interpret homework tasks and read to their children perhaps filling in a joint reading diary. In Key Stage 2 (KS2=7-11 yr olds) parents would be more monitoring but may join in as well.&lt;br /&gt;
&lt;br /&gt;
In Key stages 3 (KS3=12-14 yr olds) and 4 (KS4=15+16 yr olds) this changes to more of a monitoring/awareness role where a parent would expect to have a summary report of attendance, attainment and general achievement on a weekly/monthly/termly or annual basis. Parents will often be asked to sign and write back comments about this review report.&lt;br /&gt;
&lt;br /&gt;
In all Key Stages there is a great need for parents to receive communication from the school which they can confirm they have received by signing a form. In some cases this may also involve making choices from a list. It may also involve payment for a trip or disco being returned so there could be the possibility of electronic payments. Also in all Key Satges there may be a home-school agreement which may be signed up to. Could this form part of a site policy system that incorporates a tickable list of activities the parent agrees to the child using (blogs/wikis/forums etc.)?&lt;br /&gt;
&lt;br /&gt;
Parent&#039;s evenings often involve complex booking systems that attempt to get parent&#039;s and teachers together. Easy for EY/KS1/KS2 very difficult for KS3/KS4. Wow would this help if it was built into the Learning Platform.&lt;br /&gt;
&lt;br /&gt;
In some cases there needs to be confidential communication between the parent and the teacher without the child being party to this. It may involve teaching and learning but could also involve a behaviour or medical issue. Often this may be done via a sealed letter or face to face. &lt;br /&gt;
&lt;br /&gt;
The latest incarnation of OfSTED with the Self Review Framework (SEF) there is a greater emphasis on schools gathering parent voice via surveys and discussion. There is a clear match here with parents have access to parental votes, questionnaires and discussions and for schools to be able to publish news, results and reports back to parents.&lt;br /&gt;
&lt;br /&gt;
In the UK the LP framework and agenda as being pushed by the DfES via Becta emphasises that within the mandatory groups and roles functionality the parent role is likely to be required to meet the LP Framework procurement standard.&lt;br /&gt;
&lt;br /&gt;
Again in the UK, parents have their own independent right of access to a child&#039;s educational records. Obviously, children&#039;s records must not be made available to other parties, including the parents of other children in the same class. Thus it would be necessary to associate parent accounts with their own child&#039;s accounts in such a way that they could, if so desired, have read access to their child&#039;s grades, answers and contributions, but generally not those of other children - this may be problematic in the case of wiki activities or forum posts.&lt;br /&gt;
&lt;br /&gt;
There is some concern that children&#039;s forum contributions etc may be constrained if their parents are able to read all that they write; this may be particularly problematic in areas such as Personal, Social and Health Education (PSHE), where some schools may choose to use obfuscated usernames.&lt;br /&gt;
&lt;br /&gt;
===Manager===&lt;br /&gt;
&#039;&#039;Please add text here...&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Weekly Seminar Leader===&lt;br /&gt;
&#039;&#039;In a university seminar, typically 8-15 students in their 3rd/4th year, each student is responsible for leading one topic in a study series.  I ask each student to research 5-10 resources, then give a powerpoint presentation to the other students.  This is followed by an in-class discussion and then online homework.  The homework involves some fun quiz questions and then some reflective journal questions.  I ask each seminar leader to prepare the quiz questions and journal questions as well as their presentation.  To do that, I would like to assign activity-making/authoring roles to the student--either for a short period, or for duration of the whole course.  Thus &amp;quot;Allow Quiz Authoring Role&amp;quot; or &amp;quot;Allow Assignment Authoring Role&amp;quot; at the course level or, if possible, even the Topic level (in a topic or week format course) would be important.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Mentor/Mentee===&lt;br /&gt;
&#039;&#039;Please add text here...&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Community-Designed Rating Criteria===&lt;br /&gt;
&#039;&#039;The gradebook tends to be the domain of the teacher.  What if community/peer ratings/marks could also be entered there? What if peer assessment criteria could be designed by the students, not just the teacher?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Visitor===&lt;br /&gt;
&lt;br /&gt;
This would be a role whereby one could allow a visitor to visit one&#039;s classroom. This might be a colleague interested in seeing your course, or a journalist who might be writing an article about one&#039;s site. They should not be able to see the names of any students anywhere (eg recent activity, forum posts) for privacy reasons. They should be able to try out things like quizzes, and lessons but no grades would be recorded (like in teacher preview mode). They would not be able to participate in choices and forums but could view them. It would be read only in a way like former-student role below but without access to a particular student&#039;s records that former student role would grant.&lt;br /&gt;
&lt;br /&gt;
===Guest Speaker===&lt;br /&gt;
&lt;br /&gt;
This role would be similar to the Visitor role above, but would allow seeing student names, and also allow both reading and posting to a specific forum or forums. We often have &amp;quot;guest speakers&amp;quot; who read and respond to student forum posts. Right now we have to add them as students, which isn&#039;t ideal.&lt;br /&gt;
&lt;br /&gt;
===Former Student===&lt;br /&gt;
This role would be of particular use for courses with rolling enrollments. This role would be one where a student had completed all of the requirements of a course (ie assignments, quizzes etc.) but wished to have continued access to the course material for review or consultation. The key factor is that one would give access to the completed student to the notes he read, his work and the teacher&#039;s comments on it, but he would not be allowed to do anything that would take up the teacher&#039;s time. In other words, a sort-of read-only access to the course. How forums, which might contain pertinent information and would continue to grow, would be handled is a question. Perhaps the student would be shown only what was in the forums at the time he completed the course. He would not be allowed to see any new posts or add any himself. Same thing for database and glossary entries. In other words, a snapshot of the course at the time his regular enrollment ended. He shouldn&#039;t be able to see the names or profiles of any newly enrolled students for privacy reasons-hence the restrictions on forum access. One issue that would have to be dealt with would be changes to existing modules-such as resources. Does the student get access to the module as it was or as it is? We have no versioning of resources in Moodle so this would be a problem. What about a teacher changing a quiz question so that the answer is different? What would a former student see?&lt;br /&gt;
&lt;br /&gt;
===Alumnus=== An ALUMNUS should be able to search for all other ALUMNI of the school, interact with them and be enrolled in a seperate course - which is like a META course with all the content of his learning and interaction - as well as capabilities to be a part of this ALUMNI only course.  All the teachers of courses during school years should automatically be a part of the ALUMNI course .. which means when an ALUMNUS is enrolled in a course, the original teachers of all his courses get enrolled ?  --[[User:Anil Sharma|Anil Sharma]] 20:54, 15 July 2006 (WST)&lt;br /&gt;
&lt;br /&gt;
===Librarian===&lt;br /&gt;
&lt;br /&gt;
Reference Librarians have an active role in most of the courses taught at some schools such as Earlham College (with Bibliographic Instruction). The Librarian role within Moodle could encompass default read access to all courses (unless prohibited by course teacher) and read access to all components of the course unless access is barred (again by teacher). The Librarians would also perhaps have a block called perhaps Reference Services or Reference Desk with write access where they could deposit resources. Also this block might have a chat applet whereby enrolled students could chat to the Reference Librarian on duty about their bibliographic research needs.&lt;br /&gt;
&lt;br /&gt;
In schools there is often a book review system. This may be covered by the lending system database but may not in which case a librarian may neeed to have a course area they can create a database template to handle the reviews in which case they may have a normal teacher style role? Off topic but course an integration with common schools database systems would be great.&lt;br /&gt;
&lt;br /&gt;
===Teacher===&lt;br /&gt;
&lt;br /&gt;
Teachers should have read access to other Teacher&#039;s courses unless explictly prohibited. They should be able to set parts of their own course to be totally private (perhaps even to admin?). Just as each activity can currently be set to have group access, each activity could have a permissions field. Teachers could set default permissions for all activities on their course (eg they might disallow Librarian access for example) and then change the access permission for an individual activity. &lt;br /&gt;
&lt;br /&gt;
I think that what is needed is a simple heirarchy of permissions and levels of granularity.&lt;br /&gt;
&lt;br /&gt;
I would take issue with &amp;quot;teachers should have read access to other teacher&#039;s courses unless explicitly prohibited.&amp;quot; This is a violation of the students&#039; privacy as how they perform and what they do in one class isn&#039;t the business of another teacher. Moreover, in the real world a teacher wouldn&#039;t suddenly go sit in on a colleague&#039;s class without asking permission first. I would not have appreciated such an invasion of privacy as either a teacher or a student. It could be an option, but shouldn&#039;t be default.--[[User:N Hansen|N Hansen]] 19:54, 12 June 2006 (WST)&lt;br /&gt;
&lt;br /&gt;
===Community Education Tutors/Trainers===&lt;br /&gt;
Teachers may be community adult education trainers making use of a school moodle so must only have access to their courses unless given access elsewhere. They would not necessarily get the default teacher privileges.&lt;br /&gt;
&lt;br /&gt;
===Secretary/Student Worker===&lt;br /&gt;
&lt;br /&gt;
We often have faculty who want their departmental secretary or student worker to scan and upload files and perhaps create resources. Currently they have to be given teacher access to the course. This is dangerous from a FERPA standpoint since they could easily get access to grades.&lt;br /&gt;
&lt;br /&gt;
===Teaching Assistant===&lt;br /&gt;
&lt;br /&gt;
Our Faculty frequently have undergraduate students acting as Teaching Assistants. These students need to be able to add resources, create assignments, and possibly grade assignments. However, due to FERPA they cannot have access to other students&#039; overall grade information. I think the requirements here are slightly different than those of Secretary/Student Worker&lt;br /&gt;
&lt;br /&gt;
===Student - FERPA rights===&lt;br /&gt;
&lt;br /&gt;
A student that has asserted their FERPA rights to non-disclosure.  Typically includes not publishing their name&lt;br /&gt;
in any public place.  Could include this student only being seen with an &amp;quot;alias&amp;quot; within course spaces.  Is this an attribute rather&lt;br /&gt;
than a role?&lt;br /&gt;
&lt;br /&gt;
===Help Desk===&lt;br /&gt;
&lt;br /&gt;
Help desk agents that have read access for the purposes of trouble shooting.  Some care in placing this role within a hierarchy&lt;br /&gt;
of inheritance is needed, full access will be problematic with FERPA.&lt;br /&gt;
&lt;br /&gt;
===Admin - Catgory based===&lt;br /&gt;
&lt;br /&gt;
Basically a person in between full Admin and Creator that has the permissions of an Admin but only with respect to courses and students. Currently a Creator has permissions site-wide which does not always meet the requirements of a given organisation (e.g. Department A may not be happy that a person from Department B can create/modify courses within Department A&#039;s area). The ability to designate a Creator within a specific category would allow areas to be set up for a faculty/department/organisation and allow the Admin for that area to create/delete courses, upload users, add site-wide entries to the calendar etc.&lt;br /&gt;
&lt;br /&gt;
===Process Roles===&lt;br /&gt;
&lt;br /&gt;
organising the learning process for a group you wish to have the choice to place students in differnt roles: examples of this are:&lt;br /&gt;
* Give a student the role of forum-moderator with edit and chunk-rights&lt;br /&gt;
* Give students different roles &amp;amp; rights in a Webquest design (and change these roles next week&lt;br /&gt;
* Give students different resources, depending of their roles in a rolegame/simulation&lt;br /&gt;
* Give a student the rights to create the section content of next week (and only that week..)&lt;br /&gt;
&lt;br /&gt;
==Things to finish for 1.7 Beta==&lt;br /&gt;
&#039;&#039;&#039;18 Sept 2006&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Remove core references to user_student, user_teacher, user_admin, user_coursecreator tables.  [Yu]&lt;br /&gt;
#Address function: isteacher, isadmin, isstudent [Yu]&lt;br /&gt;
#Remove &amp;quot;view&amp;quot; capabilities from all modules unless required [Vy]&lt;br /&gt;
#Remove all old references from remaining Blocks [Vy]&lt;br /&gt;
#Metacourses [Skodak]&lt;br /&gt;
#Add risks to GUI[Skodak]&lt;br /&gt;
#Enrolment plugins  [Martin and Alastair]&lt;br /&gt;
#[[Development:Stats_roles_1.7|Statistics]] [Penny]&lt;br /&gt;
#Fix Loginas&lt;br /&gt;
#Add category-level assigns [Yu]&lt;br /&gt;
#[[Development:Backup_roles_1.7|Backups]] [Eloy?]&lt;br /&gt;
&lt;br /&gt;
===Proposal for interface enhancement===&lt;br /&gt;
Martin asked some questions, here are my answers. The sketches below are not worked out proposals. Their task is to visualize the idea. The exact colours and functionality may be defined after possible agreement about the proposals. The Green, orange and red columns support the meaning of the options from &amp;quot;allow&amp;quot; to &amp;quot;prohibit&amp;quot; (If you may want to see larger images please click onto the image or the &amp;quot;Enlarge&amp;quot; icon below the image.)&lt;br /&gt;
&lt;br /&gt;
The list of possible settings is very long and &#039;&#039; &amp;quot;... the problem is not to overwhelm people with information&amp;quot; &#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
[[Image:01_moodle_define_roles_structured.png|thumb=01_moodle_define_roles_structured_pre.png]]&lt;br /&gt;
&lt;br /&gt;
1) One proposal is to use colour to structure the sections and the columns. Picture 1 shows that the user can keep a much better overview when the list is divided into meaningful different coloured columns and clear sections.&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both;&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:02_moodle_define_roles_collapsed.png|thumb=02_moodle_define_roles_collapsed_pre.png]]&lt;br /&gt;
&lt;br /&gt;
2) A second proposal is to reduce the amount of information the user is shown at the same time. The YUI interface library offers great support to show/hide sections of the page by clicking on specific elements. &lt;br /&gt;
&lt;br /&gt;
For example click on an icon beside the sub heading &amp;quot;Course categories&amp;quot; and show/hide all table rows with the CLASS &amp;quot;course-category&amp;quot;.&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both;&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:03_moodle_define_roles_tooltip.png|thumb=03_moodle_define_roles_tooltip_pre.png]]&lt;br /&gt;
&lt;br /&gt;
3) &#039;&#039; &amp;quot;The main problem is the last column for risk ... we were thinking of putting little icons in there ...&amp;quot; &#039;&#039;&lt;br /&gt;
Icons are good when they tell the user more about possible actions/meanings then the letters. I am not sure if this is the case here. For both - icons or letters - the YUI tool-tip function would be able to give the user valuable information about the meaning.&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both;&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*[[Development:Hardening new Roles system]]&lt;br /&gt;
*[[Development:Roles and modules]]&lt;br /&gt;
*Using Moodle course:&lt;br /&gt;
**[http://moodle.org/mod/forum/view.php?f=941 Roles and Capabilities forum]&lt;br /&gt;
**Key discussions at Using Moodle forums:&lt;br /&gt;
***[http://moodle.org/mod/forum/discuss.php?d=38788 Roles and Permissions architecture]&lt;br /&gt;
***[http://moodle.org/mod/forum/discuss.php?d=56302#256313 An example of admin roles as set in the database]&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer|Roles]]&lt;br /&gt;
[[Category:Roles]]&lt;br /&gt;
&lt;br /&gt;
[[fr:Developpement:Roles]]&lt;/div&gt;</summary>
		<author><name>Francois@catalyst.net.nz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/36/en/index.php?title=User:Francois_Marier&amp;diff=26232</id>
		<title>User:Francois Marier</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/36/en/index.php?title=User:Francois_Marier&amp;diff=26232"/>
		<updated>2007-08-23T02:39:44Z</updated>

		<summary type="html">&lt;p&gt;Francois@catalyst.net.nz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Moodle developer at [http://www.catalyst.net.nz Catalyst IT]&lt;/div&gt;</summary>
		<author><name>Francois@catalyst.net.nz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/36/en/index.php?title=Development:Roles_and_modules&amp;diff=26231</id>
		<title>Development:Roles and modules</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/36/en/index.php?title=Development:Roles_and_modules&amp;diff=26231"/>
		<updated>2007-08-23T02:38:14Z</updated>

		<summary type="html">&lt;p&gt;Francois@catalyst.net.nz: /* Sample code */  According to the blurb about has_capability above, this should be $context-&amp;gt;id and not $cm-&amp;gt;id&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a page for &#039;&#039;&#039;developers&#039;&#039;&#039; that describes how to make Moodle modules work under 1.7 roles system. =) For more background information, please read  [[Development:Roles]]. For any clarifications please post to the [http://moodle.org/mod/forum/view.php?f=941 Roles and Capabilities forum].&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
Moodle 1.6 and below uses 7 default roles, namely primary admin, admin, editing teachers, non-editing teachers, students and guests. The set of capabilities that users associated to these roles can perform is fixed. To check permissions, we normally use isteacheredit($courseid), isguest() etc. &lt;br /&gt;
&lt;br /&gt;
{{Moodle 1.7}}&lt;br /&gt;
Under the new 1.7 system, roles do not have a fixed set of capabilities anymore. We use a different function called has_capability() to check for specific capabilities, more on this later.&lt;br /&gt;
&lt;br /&gt;
==Context==&lt;br /&gt;
&lt;br /&gt;
Context is an important concept to make roles work. There are currently 8 levels&lt;br /&gt;
&lt;br /&gt;
 define(&#039;CONTEXT_SYSTEM&#039;, 10);&lt;br /&gt;
 define(&#039;CONTEXT_PERSONAL&#039;, 20);&lt;br /&gt;
 define(&#039;CONTEXT_USERID&#039;, 30);&lt;br /&gt;
 define(&#039;CONTEXT_COURSECAT&#039;, 40);&lt;br /&gt;
 define(&#039;CONTEXT_COURSE&#039;, 50);&lt;br /&gt;
 define(&#039;CONTEXT_GROUP&#039;, 60);&lt;br /&gt;
 define(&#039;CONTEXT_MODULE&#039;, 70);&lt;br /&gt;
 define(&#039;CONTEXT_BLOCK&#039;, 80);&lt;br /&gt;
&lt;br /&gt;
They are stored as a tuple [contextlevel][instanceid]. For example course with id =2 would be [50][2]. Module with id 495 would be [70][495].&lt;br /&gt;
&lt;br /&gt;
At module level, you only need to worry about CONTEXT_MODULE. Normally, foreach page accessible in your module you would need to load the module using get_context_instance(). The way to use it for modules is $context = get_context_instance(CONTEXT_MODULE, $cm-&amp;gt;id); where $cm is the course module object that you would normally have anyway. The contextid is needed for every permission check later on in all your pages.&lt;br /&gt;
&lt;br /&gt;
==The has_capability($capability, $contextid, $kill) function==&lt;br /&gt;
&lt;br /&gt;
inputs: &lt;br /&gt;
&lt;br /&gt;
$capability is the name of the capability&lt;br /&gt;
$contextid is normally $context-&amp;gt;id, the module context id&lt;br /&gt;
$kill set to 1 if you want to kill the page, it will throw an error and inform the user that required permission is missing. For example you place has_capability(&#039;forum_read&#039;, $context-&amp;gt;id, true) at the top of the page to prevent users from reading the whole page.&lt;br /&gt;
&lt;br /&gt;
This function looks up a capability for a given context and associated parents recursively. We are pretty much relying on this funciton alone to resolve all capability issues. Original isteacher(), isadmin(), isstudent() etc should all be changed accordingly. &lt;br /&gt;
&lt;br /&gt;
==Loading capabilities== - for now, this plan might change later&lt;br /&gt;
&lt;br /&gt;
Loading capabilities is done when a user first log in. Because it is quite an expensive call, we only load it once and stores everything in the session. So when has_capability() is called, it looks for the values stored in the session variable.&lt;br /&gt;
&lt;br /&gt;
==Code rewrite==&lt;br /&gt;
&lt;br /&gt;
Some modules might require some tiny rewrites because permission is only checked once at the top, for example some scripts only checks for isstudent() at the top. Now we are able to refine those capabilities, so we need to put the required code changes (add has_capability()) to where the specific capability is needed. For example, in a forum we check to see if user is a student before displaying a discussion page, now we need to check individual permissions for forum_read and forum_reply. &lt;br /&gt;
&lt;br /&gt;
==Sample code==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;// somewhere at the top, after getting $cm, load context&lt;br /&gt;
&lt;br /&gt;
$context = get_context_instance(CONTEXT_MODULE, $cm-&amp;gt;id); &lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
has_capability(&#039;forum_read&#039;, $context-&amp;gt;id, true); // kills this page if user is not allowed to read&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
if (has_capability(&#039;forum_reply&#039;, $context-&amp;gt;id) {&lt;br /&gt;
    print_reply_link();&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Core API==&lt;br /&gt;
&lt;br /&gt;
The core API is located at libdir/accesslib, if you would like to read it =)&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer|Roles and modules]]&lt;br /&gt;
[[Category:Roles]]&lt;/div&gt;</summary>
		<author><name>Francois@catalyst.net.nz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/36/en/index.php?title=Development:Roles&amp;diff=26230</id>
		<title>Development:Roles</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/36/en/index.php?title=Development:Roles&amp;diff=26230"/>
		<updated>2007-08-22T23:46:49Z</updated>

		<summary type="html">&lt;p&gt;Francois@catalyst.net.nz: /* Core-level Capabilities */ missing # in front of list item&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Moodle 1.7}}&lt;br /&gt;
&#039;&#039;&#039;Roles and permissions&#039;&#039;&#039; is in Moodle 1.7 onwards.&lt;br /&gt;
&lt;br /&gt;
==Definitions==&lt;br /&gt;
&lt;br /&gt;
A role is an identifier of the user&#039;s status in some context. For example: Teacher, Student and Forum moderator are examples of roles.&lt;br /&gt;
&lt;br /&gt;
A capability is a description of some particular Moodle feature. Capabilities are associated with roles. For example, &#039;&#039;mod/forum:replypost&#039;&#039; is a capability.&lt;br /&gt;
&lt;br /&gt;
A permission is some value that is assigned for a capability for a particular role.  For example, allow or prevent.&lt;br /&gt;
&lt;br /&gt;
A context is a &amp;quot;space&amp;quot; in the Moodle, such as courses, activity modules, blocks etc.&lt;br /&gt;
&lt;br /&gt;
==The existing system==&lt;br /&gt;
&lt;br /&gt;
In versions prior to v1.7, Moodle uses a fixed set of roles i.e. primary admin, admins, course creators, editing teachers, non-editing teachers, students, and guests. For each role, the capability or actions that they can perform are fixed. For example, the role student allows the user to submit an assignment, but doesn&#039;t allow the user to browse/edit other users&#039; work. By using this setup we limit ourselves to a rather rigid set of capabilities for each role. If we want, say a particular student or group to be able to mark assignments in a particular course, we can&#039;t do that without giving these users teacher privileges.&lt;br /&gt;
&lt;br /&gt;
==The new roles and capability system==&lt;br /&gt;
&lt;br /&gt;
With v1.7 and greater, Moodle introduces a roles and capabilities system.&lt;br /&gt;
&lt;br /&gt;
Role has two primary functions:&lt;br /&gt;
# define list of permissions - role definition is global for all contexts, but can be changed by local context overrides&lt;br /&gt;
# replace old course enrolments - role assignment in course context is simitar to the old enrolment process&lt;br /&gt;
&lt;br /&gt;
The new system will allow authorized users to define an arbitrary number of roles (eg a teacher) &lt;br /&gt;
&lt;br /&gt;
A role consists of a list of permissions for different possible actions within Moodle (eg delete discussions, add activities etc)&lt;br /&gt;
&lt;br /&gt;
Roles can be applied to users in a context (eg assign Fred as a teacher in a particular course)&lt;br /&gt;
&lt;br /&gt;
Here are the possible contexts, listed from the most general to the most specific. &lt;br /&gt;
&lt;br /&gt;
#CONTEXT_SYSTEM       -- the whole site&lt;br /&gt;
#CONTEXT_PERSONAL     -- yourself&lt;br /&gt;
#CONTEXT_USER         -- another user&lt;br /&gt;
#CONTEXT_COURSECAT    -- a course category&lt;br /&gt;
#CONTEXT_COURSE       -- a course&lt;br /&gt;
#CONTEXT_GROUP        -- a group&lt;br /&gt;
#CONTEXT_MODULE       -- an activity module&lt;br /&gt;
#CONTEXT_BLOCK        -- a block&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle-contexts-1.8.png|right|thumb|A diagram of the contexts in Moodle 1.8, based on the [[Talk:Roles_and_capabilities|text diagram by Martin Dougiamas]]. Click on the diagram to see a more detailed view of it.]]&lt;br /&gt;
&lt;br /&gt;
An authorized user will be able to assign an arbitrary number of roles to each user in any context.&lt;br /&gt;
&lt;br /&gt;
Capabilities can have the following permissions:&lt;br /&gt;
&lt;br /&gt;
#CAP_INHERIT&lt;br /&gt;
#CAP_ALLOW&lt;br /&gt;
#CAP_PREVENT&lt;br /&gt;
#CAP_PROHIBIT&lt;br /&gt;
&lt;br /&gt;
If no permission is defined, then the capability permission is inherited from a context that is more general than the current context. If we define different permission values for the same capability in different contexts, we say that we are overriding the capability in the more specific context.&lt;br /&gt;
&lt;br /&gt;
Since the capabilities in each role could be different, there could be conflict in capabilities. This is resolved by enforcing the rule that the capability defined for a more specific context will win, unless a prohibit is encountered in a less specific context.&lt;br /&gt;
&lt;br /&gt;
For example, Mark has a student role at course level, which allows him to write into a wiki. But Mark also got assigned a Visitor role at a module context level (for a particular wiki) which prevents him from writing to the wiki (read only). Therefore, for this particular wiki, Mark will not be able to write to the wiki since the more specific context wins.&lt;br /&gt;
&lt;br /&gt;
If we set a PROHIBIT on a capability, it means that the capability cannot be overridden and will ALWAYS  have a permission of prevent (deny). Prohibit always wins.   For example, Jeff has a naughty student role that prohibits him from postings in any forums (for the whole site), but he&#039;s also assigned a facilitator role in &amp;quot;Science forum&amp;quot; in the course Science and Math 101. Since prohibit always wins, Jeff is unable to post in &amp;quot;Science forum&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Allow and prevent will cancel each other out if set for the same capability at the same context level. If this happens, we refer to the previous context level to determine the permission for the capability.&lt;br /&gt;
&lt;br /&gt;
This may sound more complex than it really is in practice.  The upshot is that the system can be flexible enough to allow pretty much any combination of permissions.&lt;br /&gt;
&lt;br /&gt;
==Upgrading from 1.6==&lt;br /&gt;
&lt;br /&gt;
A smooth upgrade will be provided with 1.7. The existing roles (admin, teacher, student, etc), and the existing capabilities will be automatically retained.  This is done by creating default roles at site/course levels, and assigning the current users to these roles accordingly. The default roles will have default capabilities associated with them, mirroring what we have  in 1.6.   With no modifications, Moodle will operate exactly the same before and after the upgrade.&lt;br /&gt;
&lt;br /&gt;
===Admins===&lt;br /&gt;
&lt;br /&gt;
Admin users will be assigned the default legacy admin role in the system (site) context&lt;br /&gt;
&lt;br /&gt;
===Course Creators===&lt;br /&gt;
&lt;br /&gt;
Course Creators will be assigned the default legacy course creator role in the system (site) context&lt;br /&gt;
&lt;br /&gt;
===Teachers===&lt;br /&gt;
&lt;br /&gt;
Users who were teachers will be assigned the default legacy teacher role (or non-editing teacher role) in all courses they were teacher.&lt;br /&gt;
&lt;br /&gt;
===Students===&lt;br /&gt;
&lt;br /&gt;
Users who were students will be assigned the default student role in all courses they were student.&lt;br /&gt;
&lt;br /&gt;
===Guests===&lt;br /&gt;
&lt;br /&gt;
There will still be a single guest user with no default role at site level.   For each course that allows guest access, the guest role will be assigned to the guest user for that course context.   The guest control for the course will be modified from three to two options (guests always need to enter enrolment key - on/off).  This setting is checked as now to force guests to enter key.&lt;br /&gt;
&lt;br /&gt;
==Capabilities==&lt;br /&gt;
&lt;br /&gt;
This will be a comprehensive list of capabilities (it&#039;s not complete yet). It is important that capability names are unique.&lt;br /&gt;
&lt;br /&gt;
===Core-level Capabilities===&lt;br /&gt;
&lt;br /&gt;
Moodle core capability names start with &#039;moodle/&#039;.  The next word indicates what type of core capability it is, and the last word is the actual capability itself.  The capabilities for the Moodle core are defined in lib/db/access.php&lt;br /&gt;
&lt;br /&gt;
#moodle/legacy:guest - legacy capabilities are used to transition existing users to the new roles system during the upgrade to Moodle 1.7&lt;br /&gt;
#moodle/legacy:student&lt;br /&gt;
#moodle/legacy:teacher&lt;br /&gt;
#moodle/legacy:editingteacher&lt;br /&gt;
#moodle/legacy:coursecreator&lt;br /&gt;
#moodle/legacy:admin&lt;br /&gt;
#moodle/site:doanything - special capability, meant for admins, if is set, overrides all other capability settings&lt;br /&gt;
#moodle/site:config - applicable in admin/index.php and config.php (might break down later) : 1)admin/config.php 2)admin/configure.php 3)blocks/admin/block_admin.php load_content_for_site()&lt;br /&gt;
#moodle/site:readallmessages - reads all messages and history&lt;br /&gt;
#moodle/site:approvecourse - approves a pending course&lt;br /&gt;
#moodle/site:manageblocks - adding/removing/editing blocks (site, course contexts only for now) : 1)_add_edit_controls moodleblock.class.php &lt;br /&gt;
#moodle/site:backup - can create a course backup : 1)course/category.php 2)block_admin.php&lt;br /&gt;
#moodle/site:restore - can restore into this context : 1)course/category.php 2)block_admin.php&lt;br /&gt;
#moodle/site:import - can import other courses into this context : 1)block_admin.php&lt;br /&gt;
#moodle/site:accessallgroups - able to access all groups irrespective of what group the user is in&lt;br /&gt;
#moodle/site:accessdb - directly accessing db (phpmyadmin)&lt;br /&gt;
#moodle/site:viewfullnames - able to see fullnames of other users&lt;br /&gt;
#moodle/site:viewparticipants - able to view participants&lt;br /&gt;
#moodle/site:viewreports - able to view site/course reports&lt;br /&gt;
#moodle/site:trustcontent - ability to use trusttext feature and bypass cleaning in specific areas&lt;br /&gt;
#moodle/site:uploadusers - ability to upload/update users from text file; moodle/role:assign capability is needed for course enrolling&lt;br /&gt;
#moodle/blog:view - read blogs (usable in system or course context)&lt;br /&gt;
#moodle/blog:create - write new blog posts (usable in system context only)&lt;br /&gt;
#moodle/blog:manageofficialtags - create/delete official blog tags that others can use (usable in system context only)&lt;br /&gt;
#moodle/blog:managepersonaltags - delete personal blog tags that others can use (usable in system context only) Note: users can always add own personal tags. This setting should be off for students by default.&lt;br /&gt;
#moodle/blog:manageentries - edit/delete all blog entries (usable in system context only)&lt;br /&gt;
#moodle/course:setcurrentsection - mark course section&lt;br /&gt;
#moodle/course:create - create courses : 1)course/edit.php 2)course/category.php 3)course/index.php&lt;br /&gt;
#moodle/course:delete - create courses : 1)course/category.php&lt;br /&gt;
#moodle/course:update - update course settings&lt;br /&gt;
#moodle/course:view - can use this to find participants&lt;br /&gt;
#moodle/course:viewparticipants - allows a user to view participant list&lt;br /&gt;
#moodle/course:viewscales - view scales (i.e. in a help window?) : 1)course/scales.php&lt;br /&gt;
#moodle/course:manageactivities - adding/removing/editing activities and resources (don&#039;t think it makes any sense to split these)&lt;br /&gt;
#moodle/course:managescales - add, delete, edit scales, move scales up and down : 1)blocks/block_admin.php 2)course/scales.php&lt;br /&gt;
#moodle/course:managegroups - managing groups, add, edit, delete : 1)course/groups.php 2)course/group.php&lt;br /&gt;
#moodle/course:managefiles - manage course files and folders&lt;br /&gt;
#moodle/course:managequestions - manage course questions&lt;br /&gt;
#moodle/course:managemetacourse - manage child courses in metacourse&lt;br /&gt;
#moodle/course:reset - able to reset the course&lt;br /&gt;
#moodle/course:useremail - Can use the enable/disable email stuff&lt;br /&gt;
#moodle/course:visibility - hide/show courses : 1)course/category.php&lt;br /&gt;
#moodle/course:viewhiddencourses - see hidden courses&lt;br /&gt;
#moodle/course:activityvisibility - hide/show activities within a course&lt;br /&gt;
#moodle/course:viewhiddenactivities - able to see activities that have been hidden&lt;br /&gt;
#moodle/course:sectionvisibility - hide/show sections&lt;br /&gt;
#moodle/course:viewhiddensections - view hidden sections&lt;br /&gt;
#moodle/course:viewcoursegrades - views all grades in course&lt;br /&gt;
#moodle/course:viewhiddenuserfields - view all hidden user fields&lt;br /&gt;
#moodle/course:managegrades - manages grades settings in course&lt;br /&gt;
#moodle/category:create - create category : 1)course/index.php&lt;br /&gt;
#moodle/category:delete - delete category : 1)course/index.php&lt;br /&gt;
#moodle/category:update - update category settings (sort and rename) this is currently an admin capability : 1)course/category.php&lt;br /&gt;
#moodle/category:visibility - hide/show categories : 1)course/index.php&lt;br /&gt;
#moodle/user:viewusergrades - view your own, or other user&#039;s grades (with specified context)&lt;br /&gt;
#moodle/user:create - create user : 1) user/edit.php&lt;br /&gt;
#moodle/user:delete - delete user : 1) admin/user.php&lt;br /&gt;
#moodle/user:readuserblogs - read blog entries&lt;br /&gt;
#moodle/user:update - update user settings : 1) user/edit.php&lt;br /&gt;
#moodle/user:viewdetails - view personally-identifying user details (e.g. name, photo).&lt;br /&gt;
#moodle/user:viewhiddendetails - view user details marked as &amp;quot;hidden&amp;quot;&lt;br /&gt;
#moodle/calendar:manageownentries - create/edit/delete &lt;br /&gt;
#moodle/calendar:manageentries - create/edit/delete&lt;br /&gt;
#moodle/role:assign - assign roles to users&lt;br /&gt;
#moodle/role:override - can override role capabilities (depending on context)&lt;br /&gt;
#moodle/role:manage - create/edit/delete roles, set capability permissions for each role&lt;br /&gt;
#moodle/role:unassignself - unassign yourself from your own roles&lt;br /&gt;
#moodle/role:viewhiddenassigns - view role assignments that have been marked as hidden&lt;br /&gt;
#moodle/question:import - imports questions (course level?) - Yes, question permissions currently need to be course-level.--[[User:Tim Hunt|Tim Hunt]]&lt;br /&gt;
#moodle/question:export - exports questions (course level?)&lt;br /&gt;
#moodle/question:managecateory - add/delete/edit question categories (course level?)&lt;br /&gt;
#moodle/question:manage - add/edit/delete a question (course level)&lt;br /&gt;
&lt;br /&gt;
===User-level Capabilities===&lt;br /&gt;
# moodle/user:readuserposts -read individual user posts on profile page (parent?)&lt;br /&gt;
# moodle/user:readuserblogs -read individual user blogs on profile page (parent?)&lt;br /&gt;
# moodle/user:viewuseractivitiesreport-read individual activity report on profile page (parent?)&lt;br /&gt;
# moodle/user:editprofile - edit profile (normally used in CONTEXT_USERID and CONTEXT_SYSTEM)&lt;br /&gt;
&lt;br /&gt;
===Module-level Capabilities===&lt;br /&gt;
The capabilities are cached into a database table when a module is installed or updated. Whenever the capability definitions are updated, the module version number should be bumped up so that the database table can be updated.&lt;br /&gt;
&lt;br /&gt;
The naming convention for capabilities that are specific to modules and blocks is &#039;mod/mod_name:capability&#039;.  The part before the colon is the full path to the module in the Moodle code.  The module capabilities are defined in mod/mod_name/db/access.php.&lt;br /&gt;
&lt;br /&gt;
#Assignment&lt;br /&gt;
##mod/assignment:view- reading the assignment description&lt;br /&gt;
##mod/assignment:submit - turn assignment in&lt;br /&gt;
##mod/assignment:grade - grading, viewing of list of submitted assignments&lt;br /&gt;
#Chat&lt;br /&gt;
##mod/chat:chat - allows a user to participate in this chat&lt;br /&gt;
##mod/chat:readlog - allows a user to read past chat session logs&lt;br /&gt;
##mod/chat:deletelog - allows a user to delete past chat logs&lt;br /&gt;
#Choice&lt;br /&gt;
##mod/choice:choose - make a choice&lt;br /&gt;
##mod/choice:readresponses - read all responses&lt;br /&gt;
##mod/choice:deleteresponses - deletes all responses&lt;br /&gt;
##mod/choice:downloadresponses - download responses&lt;br /&gt;
#Database&lt;br /&gt;
##mod/data:viewentry - reads other people&#039;s entry&lt;br /&gt;
##mod/data:writeentry - add / edit and delete (own) entries&lt;br /&gt;
##mod/data:managetemplates - add, delete, edit fields and templates&lt;br /&gt;
##mod/data:manageentries - edit/delete all entries&lt;br /&gt;
##mod/data:comment - comment&lt;br /&gt;
##mod/data:managecomments - edit/delete all comments&lt;br /&gt;
##mod/data:rate - rate an entry&lt;br /&gt;
##mod/data:viewrating&lt;br /&gt;
##mod/data:approve - approves an entry&lt;br /&gt;
##mod/data:uploadentries - batch upload of entries&lt;br /&gt;
#Exercise&lt;br /&gt;
##mod/exercise:assess&lt;br /&gt;
#Forum&lt;br /&gt;
##mod/forum:viewdiscussion&lt;br /&gt;
##mod/forum:viewdiscussionsfromallgroups&lt;br /&gt;
##mod/forum:viewhiddentimedposts&lt;br /&gt;
##mod/forum:startdiscussion&lt;br /&gt;
##mod/forum:replypost&lt;br /&gt;
##mod/forum:viewrating&lt;br /&gt;
##mod/forum:viewanyrating&lt;br /&gt;
##mod/forum:rate&lt;br /&gt;
##mod/forum:createattachment&lt;br /&gt;
##mod/forum:deleteownpost&lt;br /&gt;
##mod/forum:deleteanypost&lt;br /&gt;
##mod/forum:splitdiscussions&lt;br /&gt;
##mod/forum:movediscussions&lt;br /&gt;
##mod/forum:editanypost&lt;br /&gt;
##mod/forum:viewqandawithoutposting&lt;br /&gt;
##mod/forum:viewsubscribers&lt;br /&gt;
##mod/forum:managesubscriptions&lt;br /&gt;
##mod/forum:throttlingapplies&lt;br /&gt;
#Glossary&lt;br /&gt;
##mod/glossary:write - add entries&lt;br /&gt;
##mod/glossary:manageentries - add, edit, delete entries&lt;br /&gt;
##mod/glossary:managecategories - create, delete, edit categories&lt;br /&gt;
##mod/glossary:comment - comment on an entry&lt;br /&gt;
##mod/glossary:managecomments - edit, delete comments&lt;br /&gt;
##mod/glossary:import - import glossaries&lt;br /&gt;
##mod/glossary:export - export glossaries&lt;br /&gt;
##mod/glossary:approve - approve glossaries&lt;br /&gt;
##mod/glossary:rate - rates glossary&lt;br /&gt;
##mod/glossary:viewrating - view ratings&lt;br /&gt;
#Hotpot&lt;br /&gt;
##mod/hotpot:attempt - attempt a hotpot&lt;br /&gt;
##mod/hotpot:viewreport - review and view reports&lt;br /&gt;
##mod/hotpot:grade - (grade? and) regrade&lt;br /&gt;
##mod/hotpot:deleteattempt - deletes attempts&lt;br /&gt;
#Label&lt;br /&gt;
##none&lt;br /&gt;
#Lams&lt;br /&gt;
##mod/lams:participate - original student&lt;br /&gt;
##mod/lams:manage - original teacher&lt;br /&gt;
#Lesson&lt;br /&gt;
##mod/lesson:edit - add and edit pages&lt;br /&gt;
##mod/lesson:manage - view student attempts&lt;br /&gt;
#Quiz&lt;br /&gt;
##mod/quiz:grade - comment, override grade, manual grade&lt;br /&gt;
##mod/quiz:preview - previews the quiz&lt;br /&gt;
##mod/quiz:viewreports - view quiz result reports&lt;br /&gt;
##mod/quiz:manage - add/delete/move (up or down) questions for a quiz&lt;br /&gt;
##mod/quiz:attempt - attempt the quiz--[[User:Tim Hunt|Tim Hunt]]&lt;br /&gt;
#Resource&lt;br /&gt;
#Scorm&lt;br /&gt;
##mod/scorm:viewgrades&lt;br /&gt;
#Survey&lt;br /&gt;
##mod/survey:download - downloads survery result&lt;br /&gt;
##mod/survey:participate - participate/ do survey&lt;br /&gt;
##mod/survey:readresponses - read all user&#039;s responese&lt;br /&gt;
#Wiki&lt;br /&gt;
##mod/wiki:participate - original student, meaning depends of type and course setting&lt;br /&gt;
##mod/wiki:manage - original teacher, manages assigned group; moodle/site:accessallgroups is needed to manage all groups &lt;br /&gt;
##(Waiting on new wiki)&lt;br /&gt;
#Workshop&lt;br /&gt;
##mod/workshop:participate - original student, allows user to submit and assess&lt;br /&gt;
##mod/workshop:manage - original teacher, user can manage others&lt;br /&gt;
##(Waiting on new Workshop)&lt;br /&gt;
&lt;br /&gt;
===Enrolment-level Capabilities===&lt;br /&gt;
&lt;br /&gt;
The naming convention for capabilities that are specific to enrolment is &#039;enrol/enrol_name:capability&#039;. The enrolment capabilities are defined in enrol/enrol_name/db/access.php.&lt;br /&gt;
&lt;br /&gt;
#Authorize.net Payment Gateway &lt;br /&gt;
##enrol/authorize:managepayments - manage user payments, capture, void, refund, delete etc.&lt;br /&gt;
&lt;br /&gt;
===Blocks===&lt;br /&gt;
#activity_modules&lt;br /&gt;
##None&lt;br /&gt;
#admin&lt;br /&gt;
#admin_2&lt;br /&gt;
#admin_bookmarks&lt;br /&gt;
#blog_menu&lt;br /&gt;
#blog_tags&lt;br /&gt;
#calendar_month&lt;br /&gt;
#calendar_upcoming&lt;br /&gt;
#course_list&lt;br /&gt;
#course_summary&lt;br /&gt;
#glossary_random&lt;br /&gt;
#html&lt;br /&gt;
#loancalc&lt;br /&gt;
#login&lt;br /&gt;
#messages&lt;br /&gt;
#news_items&lt;br /&gt;
#online_users&lt;br /&gt;
#participants&lt;br /&gt;
#quiz_results&lt;br /&gt;
#recent_activity&lt;br /&gt;
#rss_client&lt;br /&gt;
##block/rss_client:createprivatefeeds&lt;br /&gt;
##block/rss_client:createsharedfeeds&lt;br /&gt;
##block/rss_client:manageownfeeds&lt;br /&gt;
##block/rss_client:manageanyfeeds&lt;br /&gt;
#search&lt;br /&gt;
#search_forums&lt;br /&gt;
#section_links&lt;br /&gt;
#site_main_menu&lt;br /&gt;
#social_activities&lt;br /&gt;
&lt;br /&gt;
===Questions===&lt;br /&gt;
I am adding question categories here because they seem to have been forgotten in the whole scheme of things since having been removed from the quiz module itself. I&#039;ve made a suggestion on how these could be handled in [http://www.moodle.org/bugs/bug.php?op=show&amp;amp;bugid=6118&amp;amp;pos= bug 6118].&lt;br /&gt;
&lt;br /&gt;
See [http://moodle.org/mod/forum/discuss.php?d=51143 this forum thread] for a discussion about the current problems wth publishing question categories.[[User:Tim Hunt|Tim Hunt]] 18:50, 8 August 2006 (WST)&lt;br /&gt;
&lt;br /&gt;
==Programming Interface==&lt;br /&gt;
&lt;br /&gt;
Although the Roles system may look complicated at first glance, implementing it in Moodle code is fairly simple.&lt;br /&gt;
&lt;br /&gt;
* You need to define each capability once, so that Moodle can upgrade existing roles to take advantage of it.  You do this in an access.php inside the db folder of any module (eg see mod/forum/db/access.php).  The array contains entries like this (note the descriptions for the legacy roles which provides forward compatibility):&lt;br /&gt;
    &#039;mod/forum:viewforum&#039; =&amp;gt; array(&lt;br /&gt;
        &#039;captype&#039; =&amp;gt; &#039;read&#039;,&lt;br /&gt;
        &#039;contextlevel&#039; =&amp;gt; CONTEXT_MODULE,&lt;br /&gt;
        &#039;legacy&#039; =&amp;gt; array(&lt;br /&gt;
            &#039;guest&#039; =&amp;gt; CAP_PREVENT,&lt;br /&gt;
            &#039;student&#039; =&amp;gt; CAP_ALLOW,&lt;br /&gt;
            &#039;teacher&#039; =&amp;gt; CAP_ALLOW,&lt;br /&gt;
            &#039;editingteacher&#039; =&amp;gt; CAP_ALLOW,&lt;br /&gt;
            &#039;coursecreator&#039; =&amp;gt; CAP_ALLOW,&lt;br /&gt;
            &#039;admin&#039; =&amp;gt; CAP_ALLOW&lt;br /&gt;
        )&lt;br /&gt;
    ),&lt;br /&gt;
* To load/change these capabilities you need to bump the module version.   There&#039;s no need to provide changes or differences as Moodle will scan the whole array and sort it out.&lt;br /&gt;
* On each page you need to find the context the user is working in, using the get_context_instance() function.  For example, in the forum module:&lt;br /&gt;
&lt;br /&gt;
  $context = get_context_instance(CONTEXT_MODULE, $cm-&amp;gt;id);&lt;br /&gt;
* or to at the course level:&lt;br /&gt;
  $context = get_context_instance(CONTEXT_COURSE, $id));&lt;br /&gt;
* Then, whenever you want to check that the current user has rights to do something, call has_capability() like this:&lt;br /&gt;
    if (!has_capability(&#039;mod/forum:viewforum&#039;, $context)) {&lt;br /&gt;
        print_error(&#039;nopermissiontoviewforum&#039;);&lt;br /&gt;
    }&lt;br /&gt;
* If you just want to assert a capability and then finish with an error message if it&#039;s not met (as we did above), then a shorter way it to use require_capability() like this:&lt;br /&gt;
&lt;br /&gt;
    require_capability(&#039;mod/forum:viewforum&#039;, $context);&lt;br /&gt;
&lt;br /&gt;
* Note that there are extra parameters you can specify to get a custom error message, otherwise users get an automated &amp;quot;No permissions&amp;quot; message that lists the permission they were missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As a result of the new Roles System, all calls to isadmin(), iscoursecreator, isteacheredit(), isteacher(), isstudent(), and isguest() will have to be replaced with calls to has_capability() or require_capability().   However, these functions will be retained for some backward compatibility with old code, using the legacy capabilities to try and work out what to do.&lt;br /&gt;
&lt;br /&gt;
==Metacourses==&lt;br /&gt;
&lt;br /&gt;
The behaviour of metacourses in Moodle 1.7 changed slightly, in that where it used to just synch students from child courses to the parent course, it will now synch ALL roles. Teachers etc of the child courses will have the same role in the meta course. Technically metacourse synchronises all role assignments in CONTEXT_COURSE with its child courses; the only exception are users with moodle/course:managemetacourse capability, these users are synchronized only upwards, they are not unenrolled from metacourse when unenroling from child course or when removing the child from metacourse.&lt;br /&gt;
&lt;br /&gt;
In order to import/enrol other courses into metacoure you need to have moodle/course:managemetacourse capability. You can add manually only participants with moodle/course:managemetacourse, all other participants are automatically synced with child courses - if you try to manually enrol user without this capability error is displayed. Similar error is shown also when you try to manually unenrol participant from meta course while still being enrolled in child course.&lt;br /&gt;
&lt;br /&gt;
Sample setup:&lt;br /&gt;
* metacourse manager has been assigned role with moodle/course:managemetacourse capability in system or course category context&lt;br /&gt;
* students are enrolled in several child courses&lt;br /&gt;
* teachers are enrolled in separate child course(s)&lt;br /&gt;
&lt;br /&gt;
==Problem areas we are working on ==&lt;br /&gt;
&lt;br /&gt;
===Student view===&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Student view&amp;quot; button has been removed completely.&lt;br /&gt;
&lt;br /&gt;
If there is time and a secure way can be found, it will be replaced by a menu to let the user assume a temporary role in the context of that course.&lt;br /&gt;
&lt;br /&gt;
===Teacher forum===&lt;br /&gt;
&lt;br /&gt;
Teacher forums were always a curious exception to normal forums, as they were not part of a course as such, and were not backed up.&lt;br /&gt;
&lt;br /&gt;
We&#039;re taking the opportunity to rectify this.   The upgrade converts teacher forums with content to normal forums in section 0 of the course, and ensures that only teachers can access them.  If the teacher forum had not been used in the course then it&#039;s not converted and will just dissappear.&lt;br /&gt;
&lt;br /&gt;
===Enrolment plugins===&lt;br /&gt;
&lt;br /&gt;
====Process of logging in====&lt;br /&gt;
&lt;br /&gt;
# load_user_capability() is called to load all the capabilities&lt;br /&gt;
# check_enrolment_plugins() is called at the top of load_user_capability() to check all the enrolment plugins.&lt;br /&gt;
# For each active plugin:&lt;br /&gt;
##Check for setup_enrolments($user) and run it.  This function will do all the processing needed to assign or unassign roles from the current user.&lt;br /&gt;
# load_user_capability() continues and loads up all the roles&lt;br /&gt;
# load_defaultuser_role() is called to add default site permissions (all users)&lt;br /&gt;
&lt;br /&gt;
====Process of checking access to a course====&lt;br /&gt;
&lt;br /&gt;
require_login($course-&amp;gt;id) is called by the script and has logic like this:&lt;br /&gt;
&lt;br /&gt;
# Is the user a guest at site level?&lt;br /&gt;
## Yes: Does the course allow guests?&lt;br /&gt;
### Yes: return true (and further capabilities are checked by the script)&lt;br /&gt;
### No:  send the user to course/enrol.php for enrolment&lt;br /&gt;
## No: continue below&lt;br /&gt;
&lt;br /&gt;
# Does the user have moodle/course:view in that (course) context?&lt;br /&gt;
## Yes: then they can enter (and further capabilities are checked by the script)&lt;br /&gt;
##  No: is guest access allowed on the course?&lt;br /&gt;
### Yes: assign temporary guest role to that user for that context (in session cache).&lt;br /&gt;
### No: send the user to course/enrol.php for enrolment.&lt;br /&gt;
&lt;br /&gt;
====Process of enrolling====&lt;br /&gt;
&lt;br /&gt;
(more soon)&lt;br /&gt;
&lt;br /&gt;
==Scenario brainstorming==&lt;br /&gt;
&lt;br /&gt;
This section is for brainstorming some example roles that we would like to support.  Note some of these *may* not be possible in 1.7.&lt;br /&gt;
&lt;br /&gt;
===Student===&lt;br /&gt;
Obviously.&lt;br /&gt;
&lt;br /&gt;
===Site Designers===&lt;br /&gt;
Is there a role for people involved in how the site looks but not full administrators? Thinking here of online control of themes rather than FTP theme uploading. But in either case they caneditlogos, caneditcss, candeditlevelatwhichthemeapplies.&lt;br /&gt;
&lt;br /&gt;
===Educational Authority Adviser===&lt;br /&gt;
Someone who would want to browse the site and may be asked to comment or contribute to particular discussions or developments in school. Access for this role would be controlled by the school in the case of school level moodles but may be different if there were to be a Local Authority wide Moodle.&lt;br /&gt;
&lt;br /&gt;
===Educational Inspector===&lt;br /&gt;
Someone who will visit the site to verify the school&#039;s self review that comments on home school relationships, extending the classroom etc. They may want to see summaries of usage and reports from surveys garnering parent and pupil views.&lt;br /&gt;
&lt;br /&gt;
===Second Marker / Moderator===&lt;br /&gt;
A teacher within ths site that has access to assignments and quizzes from another teacher&#039;s course for second marking purposes. This may need additional functionality adding to the assignment module so that two sets of grades/feedback can be given to one set of assignments.&lt;br /&gt;
&lt;br /&gt;
===Peer observer of teaching===&lt;br /&gt;
Many institutions encourage peer observation of teaching, to encourage reflection on practice. In online environments this will be similar to moderation or inspection. The peer observer would need to be able to experience the course &amp;quot;as a student&amp;quot;, but also to be able to view summaries of usage, transcripts of interactions (forums/surveys/polls etc), grades assigned (e.g. in assignments).&lt;br /&gt;
&lt;br /&gt;
===External Examiner===&lt;br /&gt;
Has all the rights of inspectors, but would also need to be able to review assignments and feedback, view forums, glossaries etc. However, would not want to post, feedback onto the site at all.&lt;br /&gt;
&lt;br /&gt;
===Parent===&lt;br /&gt;
A parent will have one or more children in one or more institutions which could be using one or more moodle instances or a mixture of Learning Platforms. A parent&#039;s role will vary depending on the age of their children and whether they are contributing as a parent or a school supporter.&lt;br /&gt;
&lt;br /&gt;
In Early Years (EY=3+4 yr olds) and Key Stage 1 (KS1=5+6 yr olds) they may play/learn on an activity or write for the child. Parents often interpret homework tasks and read to their children perhaps filling in a joint reading diary. In Key Stage 2 (KS2=7-11 yr olds) parents would be more monitoring but may join in as well.&lt;br /&gt;
&lt;br /&gt;
In Key stages 3 (KS3=12-14 yr olds) and 4 (KS4=15+16 yr olds) this changes to more of a monitoring/awareness role where a parent would expect to have a summary report of attendance, attainment and general achievement on a weekly/monthly/termly or annual basis. Parents will often be asked to sign and write back comments about this review report.&lt;br /&gt;
&lt;br /&gt;
In all Key Stages there is a great need for parents to receive communication from the school which they can confirm they have received by signing a form. In some cases this may also involve making choices from a list. It may also involve payment for a trip or disco being returned so there could be the possibility of electronic payments. Also in all Key Satges there may be a home-school agreement which may be signed up to. Could this form part of a site policy system that incorporates a tickable list of activities the parent agrees to the child using (blogs/wikis/forums etc.)?&lt;br /&gt;
&lt;br /&gt;
Parent&#039;s evenings often involve complex booking systems that attempt to get parent&#039;s and teachers together. Easy for EY/KS1/KS2 very difficult for KS3/KS4. Wow would this help if it was built into the Learning Platform.&lt;br /&gt;
&lt;br /&gt;
In some cases there needs to be confidential communication between the parent and the teacher without the child being party to this. It may involve teaching and learning but could also involve a behaviour or medical issue. Often this may be done via a sealed letter or face to face. &lt;br /&gt;
&lt;br /&gt;
The latest incarnation of OfSTED with the Self Review Framework (SEF) there is a greater emphasis on schools gathering parent voice via surveys and discussion. There is a clear match here with parents have access to parental votes, questionnaires and discussions and for schools to be able to publish news, results and reports back to parents.&lt;br /&gt;
&lt;br /&gt;
In the UK the LP framework and agenda as being pushed by the DfES via Becta emphasises that within the mandatory groups and roles functionality the parent role is likely to be required to meet the LP Framework procurement standard.&lt;br /&gt;
&lt;br /&gt;
Again in the UK, parents have their own independent right of access to a child&#039;s educational records. Obviously, children&#039;s records must not be made available to other parties, including the parents of other children in the same class. Thus it would be necessary to associate parent accounts with their own child&#039;s accounts in such a way that they could, if so desired, have read access to their child&#039;s grades, answers and contributions, but generally not those of other children - this may be problematic in the case of wiki activities or forum posts.&lt;br /&gt;
&lt;br /&gt;
There is some concern that children&#039;s forum contributions etc may be constrained if their parents are able to read all that they write; this may be particularly problematic in areas such as Personal, Social and Health Education (PSHE), where some schools may choose to use obfuscated usernames.&lt;br /&gt;
&lt;br /&gt;
===Manager===&lt;br /&gt;
&#039;&#039;Please add text here...&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Weekly Seminar Leader===&lt;br /&gt;
&#039;&#039;In a university seminar, typically 8-15 students in their 3rd/4th year, each student is responsible for leading one topic in a study series.  I ask each student to research 5-10 resources, then give a powerpoint presentation to the other students.  This is followed by an in-class discussion and then online homework.  The homework involves some fun quiz questions and then some reflective journal questions.  I ask each seminar leader to prepare the quiz questions and journal questions as well as their presentation.  To do that, I would like to assign activity-making/authoring roles to the student--either for a short period, or for duration of the whole course.  Thus &amp;quot;Allow Quiz Authoring Role&amp;quot; or &amp;quot;Allow Assignment Authoring Role&amp;quot; at the course level or, if possible, even the Topic level (in a topic or week format course) would be important.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Mentor/Mentee===&lt;br /&gt;
&#039;&#039;Please add text here...&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Community-Designed Rating Criteria===&lt;br /&gt;
&#039;&#039;The gradebook tends to be the domain of the teacher.  What if community/peer ratings/marks could also be entered there? What if peer assessment criteria could be designed by the students, not just the teacher?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Visitor===&lt;br /&gt;
&lt;br /&gt;
This would be a role whereby one could allow a visitor to visit one&#039;s classroom. This might be a colleague interested in seeing your course, or a journalist who might be writing an article about one&#039;s site. They should not be able to see the names of any students anywhere (eg recent activity, forum posts) for privacy reasons. They should be able to try out things like quizzes, and lessons but no grades would be recorded (like in teacher preview mode). They would not be able to participate in choices and forums but could view them. It would be read only in a way like former-student role below but without access to a particular student&#039;s records that former student role would grant.&lt;br /&gt;
&lt;br /&gt;
===Guest Speaker===&lt;br /&gt;
&lt;br /&gt;
This role would be similar to the Visitor role above, but would allow seeing student names, and also allow both reading and posting to a specific forum or forums. We often have &amp;quot;guest speakers&amp;quot; who read and respond to student forum posts. Right now we have to add them as students, which isn&#039;t ideal.&lt;br /&gt;
&lt;br /&gt;
===Former Student===&lt;br /&gt;
This role would be of particular use for courses with rolling enrollments. This role would be one where a student had completed all of the requirements of a course (ie assignments, quizzes etc.) but wished to have continued access to the course material for review or consultation. The key factor is that one would give access to the completed student to the notes he read, his work and the teacher&#039;s comments on it, but he would not be allowed to do anything that would take up the teacher&#039;s time. In other words, a sort-of read-only access to the course. How forums, which might contain pertinent information and would continue to grow, would be handled is a question. Perhaps the student would be shown only what was in the forums at the time he completed the course. He would not be allowed to see any new posts or add any himself. Same thing for database and glossary entries. In other words, a snapshot of the course at the time his regular enrollment ended. He shouldn&#039;t be able to see the names or profiles of any newly enrolled students for privacy reasons-hence the restrictions on forum access. One issue that would have to be dealt with would be changes to existing modules-such as resources. Does the student get access to the module as it was or as it is? We have no versioning of resources in Moodle so this would be a problem. What about a teacher changing a quiz question so that the answer is different? What would a former student see?&lt;br /&gt;
&lt;br /&gt;
===Alumnus=== An ALUMNUS should be able to search for all other ALUMNI of the school, interact with them and be enrolled in a seperate course - which is like a META course with all the content of his learning and interaction - as well as capabilities to be a part of this ALUMNI only course.  All the teachers of courses during school years should automatically be a part of the ALUMNI course .. which means when an ALUMNUS is enrolled in a course, the original teachers of all his courses get enrolled ?  --[[User:Anil Sharma|Anil Sharma]] 20:54, 15 July 2006 (WST)&lt;br /&gt;
&lt;br /&gt;
===Librarian===&lt;br /&gt;
&lt;br /&gt;
Reference Librarians have an active role in most of the courses taught at some schools such as Earlham College (with Bibliographic Instruction). The Librarian role within Moodle could encompass default read access to all courses (unless prohibited by course teacher) and read access to all components of the course unless access is barred (again by teacher). The Librarians would also perhaps have a block called perhaps Reference Services or Reference Desk with write access where they could deposit resources. Also this block might have a chat applet whereby enrolled students could chat to the Reference Librarian on duty about their bibliographic research needs.&lt;br /&gt;
&lt;br /&gt;
In schools there is often a book review system. This may be covered by the lending system database but may not in which case a librarian may neeed to have a course area they can create a database template to handle the reviews in which case they may have a normal teacher style role? Off topic but course an integration with common schools database systems would be great.&lt;br /&gt;
&lt;br /&gt;
===Teacher===&lt;br /&gt;
&lt;br /&gt;
Teachers should have read access to other Teacher&#039;s courses unless explictly prohibited. They should be able to set parts of their own course to be totally private (perhaps even to admin?). Just as each activity can currently be set to have group access, each activity could have a permissions field. Teachers could set default permissions for all activities on their course (eg they might disallow Librarian access for example) and then change the access permission for an individual activity. &lt;br /&gt;
&lt;br /&gt;
I think that what is needed is a simple heirarchy of permissions and levels of granularity.&lt;br /&gt;
&lt;br /&gt;
I would take issue with &amp;quot;teachers should have read access to other teacher&#039;s courses unless explicitly prohibited.&amp;quot; This is a violation of the students&#039; privacy as how they perform and what they do in one class isn&#039;t the business of another teacher. Moreover, in the real world a teacher wouldn&#039;t suddenly go sit in on a colleague&#039;s class without asking permission first. I would not have appreciated such an invasion of privacy as either a teacher or a student. It could be an option, but shouldn&#039;t be default.--[[User:N Hansen|N Hansen]] 19:54, 12 June 2006 (WST)&lt;br /&gt;
&lt;br /&gt;
===Community Education Tutors/Trainers===&lt;br /&gt;
Teachers may be community adult education trainers making use of a school moodle so must only have access to their courses unless given access elsewhere. They would not necessarily get the default teacher privileges.&lt;br /&gt;
&lt;br /&gt;
===Secretary/Student Worker===&lt;br /&gt;
&lt;br /&gt;
We often have faculty who want their departmental secretary or student worker to scan and upload files and perhaps create resources. Currently they have to be given teacher access to the course. This is dangerous from a FERPA standpoint since they could easily get access to grades.&lt;br /&gt;
&lt;br /&gt;
===Teaching Assistant===&lt;br /&gt;
&lt;br /&gt;
Our Faculty frequently have undergraduate students acting as Teaching Assistants. These students need to be able to add resources, create assignments, and possibly grade assignments. However, due to FERPA they cannot have access to other students&#039; overall grade information. I think the requirements here are slightly different than those of Secretary/Student Worker&lt;br /&gt;
&lt;br /&gt;
===Student - FERPA rights===&lt;br /&gt;
&lt;br /&gt;
A student that has asserted their FERPA rights to non-disclosure.  Typically includes not publishing their name&lt;br /&gt;
in any public place.  Could include this student only being seen with an &amp;quot;alias&amp;quot; within course spaces.  Is this an attribute rather&lt;br /&gt;
than a role?&lt;br /&gt;
&lt;br /&gt;
===Help Desk===&lt;br /&gt;
&lt;br /&gt;
Help desk agents that have read access for the purposes of trouble shooting.  Some care in placing this role within a hierarchy&lt;br /&gt;
of inheritance is needed, full access will be problematic with FERPA.&lt;br /&gt;
&lt;br /&gt;
===Admin - Catgory based===&lt;br /&gt;
&lt;br /&gt;
Basically a person in between full Admin and Creator that has the permissions of an Admin but only with respect to courses and students. Currently a Creator has permissions site-wide which does not always meet the requirements of a given organisation (e.g. Department A may not be happy that a person from Department B can create/modify courses within Department A&#039;s area). The ability to designate a Creator within a specific category would allow areas to be set up for a faculty/department/organisation and allow the Admin for that area to create/delete courses, upload users, add site-wide entries to the calendar etc.&lt;br /&gt;
&lt;br /&gt;
===Process Roles===&lt;br /&gt;
&lt;br /&gt;
organising the learning process for a group you wish to have the choice to place students in differnt roles: examples of this are:&lt;br /&gt;
* Give a student the role of forum-moderator with edit and chunk-rights&lt;br /&gt;
* Give students different roles &amp;amp; rights in a Webquest design (and change these roles next week&lt;br /&gt;
* Give students different resources, depending of their roles in a rolegame/simulation&lt;br /&gt;
* Give a student the rights to create the section content of next week (and only that week..)&lt;br /&gt;
&lt;br /&gt;
==Things to finish for 1.7 Beta==&lt;br /&gt;
&#039;&#039;&#039;18 Sept 2006&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Remove core references to user_student, user_teacher, user_admin, user_coursecreator tables.  [Yu]&lt;br /&gt;
#Address function: isteacher, isadmin, isstudent [Yu]&lt;br /&gt;
#Remove &amp;quot;view&amp;quot; capabilities from all modules unless required [Vy]&lt;br /&gt;
#Remove all old references from remaining Blocks [Vy]&lt;br /&gt;
#Metacourses [Skodak]&lt;br /&gt;
#Add risks to GUI[Skodak]&lt;br /&gt;
#Enrolment plugins  [Martin and Alastair]&lt;br /&gt;
#[[Development:Stats_roles_1.7|Statistics]] [Penny]&lt;br /&gt;
#Fix Loginas&lt;br /&gt;
#Add category-level assigns [Yu]&lt;br /&gt;
#[[Development:Backup_roles_1.7|Backups]] [Eloy?]&lt;br /&gt;
&lt;br /&gt;
===Proposal for interface enhancement===&lt;br /&gt;
Martin asked some questions, here are my answers. The sketches below are not worked out proposals. Their task is to visualize the idea. The exact colours and functionality may be defined after possible agreement about the proposals. The Green, orange and red columns support the meaning of the options from &amp;quot;allow&amp;quot; to &amp;quot;prohibit&amp;quot; (If you may want to see larger images please click onto the image or the &amp;quot;Enlarge&amp;quot; icon below the image.)&lt;br /&gt;
&lt;br /&gt;
The list of possible settings is very long and &#039;&#039; &amp;quot;... the problem is not to overwhelm people with information&amp;quot; &#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
[[Image:01_moodle_define_roles_structured.png|thumb=01_moodle_define_roles_structured_pre.png]]&lt;br /&gt;
&lt;br /&gt;
1) One proposal is to use colour to structure the sections and the columns. Picture 1 shows that the user can keep a much better overview when the list is divided into meaningful different coloured columns and clear sections.&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both;&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:02_moodle_define_roles_collapsed.png|thumb=02_moodle_define_roles_collapsed_pre.png]]&lt;br /&gt;
&lt;br /&gt;
2) A second proposal is to reduce the amount of information the user is shown at the same time. The YUI interface library offers great support to show/hide sections of the page by clicking on specific elements. &lt;br /&gt;
&lt;br /&gt;
For example click on an icon beside the sub heading &amp;quot;Course categories&amp;quot; and show/hide all table rows with the CLASS &amp;quot;course-category&amp;quot;.&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both;&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:03_moodle_define_roles_tooltip.png|thumb=03_moodle_define_roles_tooltip_pre.png]]&lt;br /&gt;
&lt;br /&gt;
3) &#039;&#039; &amp;quot;The main problem is the last column for risk ... we were thinking of putting little icons in there ...&amp;quot; &#039;&#039;&lt;br /&gt;
Icons are good when they tell the user more about possible actions/meanings then the letters. I am not sure if this is the case here. For both - icons or letters - the YUI tool-tip function would be able to give the user valuable information about the meaning.&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both;&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*[[Development:Hardening new Roles system]]&lt;br /&gt;
*[[Development:Roles and modules]]&lt;br /&gt;
*Using Moodle course:&lt;br /&gt;
**[http://moodle.org/mod/forum/view.php?f=941 Roles and Capabilities forum]&lt;br /&gt;
**Key discussions at Using Moodle forums:&lt;br /&gt;
***[http://moodle.org/mod/forum/discuss.php?d=38788 Roles and Permissions architecture]&lt;br /&gt;
***[http://moodle.org/mod/forum/discuss.php?d=56302#256313 An example of admin roles as set in the database]&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer|Roles]]&lt;br /&gt;
[[Category:Roles]]&lt;br /&gt;
&lt;br /&gt;
[[fr:Developpement:Roles]]&lt;/div&gt;</summary>
		<author><name>Francois@catalyst.net.nz</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/36/en/index.php?title=Development:Roles&amp;diff=26229</id>
		<title>Development:Roles</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/36/en/index.php?title=Development:Roles&amp;diff=26229"/>
		<updated>2007-08-22T23:37:51Z</updated>

		<summary type="html">&lt;p&gt;Francois@catalyst.net.nz: /* The new roles and capability system */ typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Moodle 1.7}}&lt;br /&gt;
&#039;&#039;&#039;Roles and permissions&#039;&#039;&#039; is in Moodle 1.7 onwards.&lt;br /&gt;
&lt;br /&gt;
==Definitions==&lt;br /&gt;
&lt;br /&gt;
A role is an identifier of the user&#039;s status in some context. For example: Teacher, Student and Forum moderator are examples of roles.&lt;br /&gt;
&lt;br /&gt;
A capability is a description of some particular Moodle feature. Capabilities are associated with roles. For example, &#039;&#039;mod/forum:replypost&#039;&#039; is a capability.&lt;br /&gt;
&lt;br /&gt;
A permission is some value that is assigned for a capability for a particular role.  For example, allow or prevent.&lt;br /&gt;
&lt;br /&gt;
A context is a &amp;quot;space&amp;quot; in the Moodle, such as courses, activity modules, blocks etc.&lt;br /&gt;
&lt;br /&gt;
==The existing system==&lt;br /&gt;
&lt;br /&gt;
In versions prior to v1.7, Moodle uses a fixed set of roles i.e. primary admin, admins, course creators, editing teachers, non-editing teachers, students, and guests. For each role, the capability or actions that they can perform are fixed. For example, the role student allows the user to submit an assignment, but doesn&#039;t allow the user to browse/edit other users&#039; work. By using this setup we limit ourselves to a rather rigid set of capabilities for each role. If we want, say a particular student or group to be able to mark assignments in a particular course, we can&#039;t do that without giving these users teacher privileges.&lt;br /&gt;
&lt;br /&gt;
==The new roles and capability system==&lt;br /&gt;
&lt;br /&gt;
With v1.7 and greater, Moodle introduces a roles and capabilities system.&lt;br /&gt;
&lt;br /&gt;
Role has two primary functions:&lt;br /&gt;
# define list of permissions - role definition is global for all contexts, but can be changed by local context overrides&lt;br /&gt;
# replace old course enrolments - role assignment in course context is simitar to the old enrolment process&lt;br /&gt;
&lt;br /&gt;
The new system will allow authorized users to define an arbitrary number of roles (eg a teacher) &lt;br /&gt;
&lt;br /&gt;
A role consists of a list of permissions for different possible actions within Moodle (eg delete discussions, add activities etc)&lt;br /&gt;
&lt;br /&gt;
Roles can be applied to users in a context (eg assign Fred as a teacher in a particular course)&lt;br /&gt;
&lt;br /&gt;
Here are the possible contexts, listed from the most general to the most specific. &lt;br /&gt;
&lt;br /&gt;
#CONTEXT_SYSTEM       -- the whole site&lt;br /&gt;
#CONTEXT_PERSONAL     -- yourself&lt;br /&gt;
#CONTEXT_USER         -- another user&lt;br /&gt;
#CONTEXT_COURSECAT    -- a course category&lt;br /&gt;
#CONTEXT_COURSE       -- a course&lt;br /&gt;
#CONTEXT_GROUP        -- a group&lt;br /&gt;
#CONTEXT_MODULE       -- an activity module&lt;br /&gt;
#CONTEXT_BLOCK        -- a block&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle-contexts-1.8.png|right|thumb|A diagram of the contexts in Moodle 1.8, based on the [[Talk:Roles_and_capabilities|text diagram by Martin Dougiamas]]. Click on the diagram to see a more detailed view of it.]]&lt;br /&gt;
&lt;br /&gt;
An authorized user will be able to assign an arbitrary number of roles to each user in any context.&lt;br /&gt;
&lt;br /&gt;
Capabilities can have the following permissions:&lt;br /&gt;
&lt;br /&gt;
#CAP_INHERIT&lt;br /&gt;
#CAP_ALLOW&lt;br /&gt;
#CAP_PREVENT&lt;br /&gt;
#CAP_PROHIBIT&lt;br /&gt;
&lt;br /&gt;
If no permission is defined, then the capability permission is inherited from a context that is more general than the current context. If we define different permission values for the same capability in different contexts, we say that we are overriding the capability in the more specific context.&lt;br /&gt;
&lt;br /&gt;
Since the capabilities in each role could be different, there could be conflict in capabilities. This is resolved by enforcing the rule that the capability defined for a more specific context will win, unless a prohibit is encountered in a less specific context.&lt;br /&gt;
&lt;br /&gt;
For example, Mark has a student role at course level, which allows him to write into a wiki. But Mark also got assigned a Visitor role at a module context level (for a particular wiki) which prevents him from writing to the wiki (read only). Therefore, for this particular wiki, Mark will not be able to write to the wiki since the more specific context wins.&lt;br /&gt;
&lt;br /&gt;
If we set a PROHIBIT on a capability, it means that the capability cannot be overridden and will ALWAYS  have a permission of prevent (deny). Prohibit always wins.   For example, Jeff has a naughty student role that prohibits him from postings in any forums (for the whole site), but he&#039;s also assigned a facilitator role in &amp;quot;Science forum&amp;quot; in the course Science and Math 101. Since prohibit always wins, Jeff is unable to post in &amp;quot;Science forum&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Allow and prevent will cancel each other out if set for the same capability at the same context level. If this happens, we refer to the previous context level to determine the permission for the capability.&lt;br /&gt;
&lt;br /&gt;
This may sound more complex than it really is in practice.  The upshot is that the system can be flexible enough to allow pretty much any combination of permissions.&lt;br /&gt;
&lt;br /&gt;
==Upgrading from 1.6==&lt;br /&gt;
&lt;br /&gt;
A smooth upgrade will be provided with 1.7. The existing roles (admin, teacher, student, etc), and the existing capabilities will be automatically retained.  This is done by creating default roles at site/course levels, and assigning the current users to these roles accordingly. The default roles will have default capabilities associated with them, mirroring what we have  in 1.6.   With no modifications, Moodle will operate exactly the same before and after the upgrade.&lt;br /&gt;
&lt;br /&gt;
===Admins===&lt;br /&gt;
&lt;br /&gt;
Admin users will be assigned the default legacy admin role in the system (site) context&lt;br /&gt;
&lt;br /&gt;
===Course Creators===&lt;br /&gt;
&lt;br /&gt;
Course Creators will be assigned the default legacy course creator role in the system (site) context&lt;br /&gt;
&lt;br /&gt;
===Teachers===&lt;br /&gt;
&lt;br /&gt;
Users who were teachers will be assigned the default legacy teacher role (or non-editing teacher role) in all courses they were teacher.&lt;br /&gt;
&lt;br /&gt;
===Students===&lt;br /&gt;
&lt;br /&gt;
Users who were students will be assigned the default student role in all courses they were student.&lt;br /&gt;
&lt;br /&gt;
===Guests===&lt;br /&gt;
&lt;br /&gt;
There will still be a single guest user with no default role at site level.   For each course that allows guest access, the guest role will be assigned to the guest user for that course context.   The guest control for the course will be modified from three to two options (guests always need to enter enrolment key - on/off).  This setting is checked as now to force guests to enter key.&lt;br /&gt;
&lt;br /&gt;
==Capabilities==&lt;br /&gt;
&lt;br /&gt;
This will be a comprehensive list of capabilities (it&#039;s not complete yet). It is important that capability names are unique.&lt;br /&gt;
&lt;br /&gt;
===Core-level Capabilities===&lt;br /&gt;
&lt;br /&gt;
Moodle core capability names start with &#039;moodle/&#039;.  The next word indicates what type of core capability it is, and the last word is the actual capability itself.  The capabilities for the Moodle core are defined in lib/db/access.php&lt;br /&gt;
&lt;br /&gt;
#moodle/legacy:guest - legacy capabilities are used to transition existing users to the new roles system during the upgrade to Moodle 1.7&lt;br /&gt;
#moodle/legacy:student&lt;br /&gt;
#moodle/legacy:teacher&lt;br /&gt;
#moodle/legacy:editingteacher&lt;br /&gt;
#moodle/legacy:coursecreator&lt;br /&gt;
#moodle/legacy:admin&lt;br /&gt;
#moodle/site:doanything - special capability, meant for admins, if is set, overrides all other capability settings&lt;br /&gt;
#moodle/site:config - applicable in admin/index.php and config.php (might break down later) : 1)admin/config.php 2)admin/configure.php 3)blocks/admin/block_admin.php load_content_for_site()&lt;br /&gt;
#moodle/site:readallmessages - reads all messages and history&lt;br /&gt;
#moodle/site:approvecourse - approves a pending course&lt;br /&gt;
#moodle/site:manageblocks - adding/removing/editing blocks (site, course contexts only for now) : 1)_add_edit_controls moodleblock.class.php &lt;br /&gt;
#moodle/site:backup - can create a course backup : 1)course/category.php 2)block_admin.php&lt;br /&gt;
#moodle/site:restore - can restore into this context : 1)course/category.php 2)block_admin.php&lt;br /&gt;
#moodle/site:import - can import other courses into this context : 1)block_admin.php&lt;br /&gt;
#moodle/site:accessallgroups - able to access all groups irrespective of what group the user is in&lt;br /&gt;
#moodle/site:accessdb - directly accessing db (phpmyadmin)&lt;br /&gt;
#moodle/site:viewfullnames - able to see fullnames of other users&lt;br /&gt;
#moodle/site:viewparticipants - able to view participants&lt;br /&gt;
#moodle/site:viewreports - able to view site/course reports&lt;br /&gt;
#moodle/site:trustcontent - ability to use trusttext feature and bypass cleaning in specific areas&lt;br /&gt;
#moodle/site:uploadusers - ability to upload/update users from text file; moodle/role:assign capability is needed for course enrolling&lt;br /&gt;
#moodle/blog:view - read blogs (usable in system or course context)&lt;br /&gt;
#moodle/blog:create - write new blog posts (usable in system context only)&lt;br /&gt;
#moodle/blog:manageofficialtags - create/delete official blog tags that others can use (usable in system context only)&lt;br /&gt;
#moodle/blog:managepersonaltags - delete personal blog tags that others can use (usable in system context only) Note: users can always add own personal tags. This setting should be off for students by default.&lt;br /&gt;
#moodle/blog:manageentries - edit/delete all blog entries (usable in system context only)&lt;br /&gt;
#moodle/course:setcurrentsection - mark course section&lt;br /&gt;
#moodle/course:create - create courses : 1)course/edit.php 2)course/category.php 3)course/index.php&lt;br /&gt;
#moodle/course:delete - create courses : 1)course/category.php&lt;br /&gt;
#moodle/course:update - update course settings&lt;br /&gt;
#moodle/course:view - can use this to find participants&lt;br /&gt;
#moodle/course:viewparticipants - allows a user to view participant list&lt;br /&gt;
#moodle/course:viewscales - view scales (i.e. in a help window?) : 1)course/scales.php&lt;br /&gt;
#moodle/course:manageactivities - adding/removing/editing activities and resources (don&#039;t think it makes any sense to split these)&lt;br /&gt;
#moodle/course:managescales - add, delete, edit scales, move scales up and down : 1)blocks/block_admin.php 2)course/scales.php&lt;br /&gt;
#moodle/course:managegroups - managing groups, add, edit, delete : 1)course/groups.php 2)course/group.php&lt;br /&gt;
#moodle/course:managefiles - manage course files and folders&lt;br /&gt;
#moodle/course:managequestions - manage course questions&lt;br /&gt;
#moodle/course:managemetacourse - manage child courses in metacourse&lt;br /&gt;
#moodle/course:reset - able to reset the course&lt;br /&gt;
#moodle/course:useremail - Can use the enable/disable email stuff&lt;br /&gt;
#moodle/course:visibility - hide/show courses : 1)course/category.php&lt;br /&gt;
#moodle/course:viewhiddencourses - see hidden courses&lt;br /&gt;
#moodle/course:activityvisibility - hide/show activities within a course&lt;br /&gt;
#moodle/course:viewhiddenactivities - able to see activities that have been hidden&lt;br /&gt;
#moodle/course:sectionvisibility - hide/show sections&lt;br /&gt;
#moodle/course:viewhiddensections - view hidden sections&lt;br /&gt;
#moodle/course:viewcoursegrades - views all grades in course&lt;br /&gt;
#moodle/course:viewhiddenuserfields - view all hidden user fields&lt;br /&gt;
#moodle/course:managegrades - manages grades settings in course&lt;br /&gt;
#moodle/category:create - create category : 1)course/index.php&lt;br /&gt;
#moodle/category:delete - delete category : 1)course/index.php&lt;br /&gt;
#moodle/category:update - update category settings (sort and rename) this is currently an admin capability : 1)course/category.php&lt;br /&gt;
#moodle/category:visibility - hide/show categories : 1)course/index.php&lt;br /&gt;
#moodle/user:viewusergrades - view your own, or other user&#039;s grades (with specified context)&lt;br /&gt;
#moodle/user:create - create user : 1) user/edit.php&lt;br /&gt;
#moodle/user:delete - delete user : 1) admin/user.php&lt;br /&gt;
moodle/user:readuserblogs - read blog entries&lt;br /&gt;
#moodle/user:update - update user settings : 1) user/edit.php&lt;br /&gt;
#moodle/user:viewdetails - view personally-identifying user details (e.g. name, photo).&lt;br /&gt;
#moodle/user:viewhiddendetails - view user details marked as &amp;quot;hidden&amp;quot;&lt;br /&gt;
#moodle/calendar:manageownentries - create/edit/delete &lt;br /&gt;
#moodle/calendar:manageentries - create/edit/delete&lt;br /&gt;
#moodle/role:assign - assign roles to users&lt;br /&gt;
#moodle/role:override - can override role capabilities (depending on context)&lt;br /&gt;
#moodle/role:manage - create/edit/delete roles, set capability permissions for each role&lt;br /&gt;
#moodle/role:unassignself - unassign yourself from your own roles&lt;br /&gt;
#moodle/role:viewhiddenassigns - view role assignments that have been marked as hidden&lt;br /&gt;
#moodle/question:import - imports questions (course level?) - Yes, question permissions currently need to be course-level.--[[User:Tim Hunt|Tim Hunt]]&lt;br /&gt;
#moodle/question:export - exports questions (course level?)&lt;br /&gt;
#moodle/question:managecateory - add/delete/edit question categories (course level?)&lt;br /&gt;
#moodle/question:manage - add/edit/delete a question (course level)&lt;br /&gt;
&lt;br /&gt;
===User-level Capabilities===&lt;br /&gt;
# moodle/user:readuserposts -read individual user posts on profile page (parent?)&lt;br /&gt;
# moodle/user:readuserblogs -read individual user blogs on profile page (parent?)&lt;br /&gt;
# moodle/user:viewuseractivitiesreport-read individual activity report on profile page (parent?)&lt;br /&gt;
# moodle/user:editprofile - edit profile (normally used in CONTEXT_USERID and CONTEXT_SYSTEM)&lt;br /&gt;
&lt;br /&gt;
===Module-level Capabilities===&lt;br /&gt;
The capabilities are cached into a database table when a module is installed or updated. Whenever the capability definitions are updated, the module version number should be bumped up so that the database table can be updated.&lt;br /&gt;
&lt;br /&gt;
The naming convention for capabilities that are specific to modules and blocks is &#039;mod/mod_name:capability&#039;.  The part before the colon is the full path to the module in the Moodle code.  The module capabilities are defined in mod/mod_name/db/access.php.&lt;br /&gt;
&lt;br /&gt;
#Assignment&lt;br /&gt;
##mod/assignment:view- reading the assignment description&lt;br /&gt;
##mod/assignment:submit - turn assignment in&lt;br /&gt;
##mod/assignment:grade - grading, viewing of list of submitted assignments&lt;br /&gt;
#Chat&lt;br /&gt;
##mod/chat:chat - allows a user to participate in this chat&lt;br /&gt;
##mod/chat:readlog - allows a user to read past chat session logs&lt;br /&gt;
##mod/chat:deletelog - allows a user to delete past chat logs&lt;br /&gt;
#Choice&lt;br /&gt;
##mod/choice:choose - make a choice&lt;br /&gt;
##mod/choice:readresponses - read all responses&lt;br /&gt;
##mod/choice:deleteresponses - deletes all responses&lt;br /&gt;
##mod/choice:downloadresponses - download responses&lt;br /&gt;
#Database&lt;br /&gt;
##mod/data:viewentry - reads other people&#039;s entry&lt;br /&gt;
##mod/data:writeentry - add / edit and delete (own) entries&lt;br /&gt;
##mod/data:managetemplates - add, delete, edit fields and templates&lt;br /&gt;
##mod/data:manageentries - edit/delete all entries&lt;br /&gt;
##mod/data:comment - comment&lt;br /&gt;
##mod/data:managecomments - edit/delete all comments&lt;br /&gt;
##mod/data:rate - rate an entry&lt;br /&gt;
##mod/data:viewrating&lt;br /&gt;
##mod/data:approve - approves an entry&lt;br /&gt;
##mod/data:uploadentries - batch upload of entries&lt;br /&gt;
#Exercise&lt;br /&gt;
##mod/exercise:assess&lt;br /&gt;
#Forum&lt;br /&gt;
##mod/forum:viewdiscussion&lt;br /&gt;
##mod/forum:viewdiscussionsfromallgroups&lt;br /&gt;
##mod/forum:viewhiddentimedposts&lt;br /&gt;
##mod/forum:startdiscussion&lt;br /&gt;
##mod/forum:replypost&lt;br /&gt;
##mod/forum:viewrating&lt;br /&gt;
##mod/forum:viewanyrating&lt;br /&gt;
##mod/forum:rate&lt;br /&gt;
##mod/forum:createattachment&lt;br /&gt;
##mod/forum:deleteownpost&lt;br /&gt;
##mod/forum:deleteanypost&lt;br /&gt;
##mod/forum:splitdiscussions&lt;br /&gt;
##mod/forum:movediscussions&lt;br /&gt;
##mod/forum:editanypost&lt;br /&gt;
##mod/forum:viewqandawithoutposting&lt;br /&gt;
##mod/forum:viewsubscribers&lt;br /&gt;
##mod/forum:managesubscriptions&lt;br /&gt;
##mod/forum:throttlingapplies&lt;br /&gt;
#Glossary&lt;br /&gt;
##mod/glossary:write - add entries&lt;br /&gt;
##mod/glossary:manageentries - add, edit, delete entries&lt;br /&gt;
##mod/glossary:managecategories - create, delete, edit categories&lt;br /&gt;
##mod/glossary:comment - comment on an entry&lt;br /&gt;
##mod/glossary:managecomments - edit, delete comments&lt;br /&gt;
##mod/glossary:import - import glossaries&lt;br /&gt;
##mod/glossary:export - export glossaries&lt;br /&gt;
##mod/glossary:approve - approve glossaries&lt;br /&gt;
##mod/glossary:rate - rates glossary&lt;br /&gt;
##mod/glossary:viewrating - view ratings&lt;br /&gt;
#Hotpot&lt;br /&gt;
##mod/hotpot:attempt - attempt a hotpot&lt;br /&gt;
##mod/hotpot:viewreport - review and view reports&lt;br /&gt;
##mod/hotpot:grade - (grade? and) regrade&lt;br /&gt;
##mod/hotpot:deleteattempt - deletes attempts&lt;br /&gt;
#Label&lt;br /&gt;
##none&lt;br /&gt;
#Lams&lt;br /&gt;
##mod/lams:participate - original student&lt;br /&gt;
##mod/lams:manage - original teacher&lt;br /&gt;
#Lesson&lt;br /&gt;
##mod/lesson:edit - add and edit pages&lt;br /&gt;
##mod/lesson:manage - view student attempts&lt;br /&gt;
#Quiz&lt;br /&gt;
##mod/quiz:grade - comment, override grade, manual grade&lt;br /&gt;
##mod/quiz:preview - previews the quiz&lt;br /&gt;
##mod/quiz:viewreports - view quiz result reports&lt;br /&gt;
##mod/quiz:manage - add/delete/move (up or down) questions for a quiz&lt;br /&gt;
##mod/quiz:attempt - attempt the quiz--[[User:Tim Hunt|Tim Hunt]]&lt;br /&gt;
#Resource&lt;br /&gt;
#Scorm&lt;br /&gt;
##mod/scorm:viewgrades&lt;br /&gt;
#Survey&lt;br /&gt;
##mod/survey:download - downloads survery result&lt;br /&gt;
##mod/survey:participate - participate/ do survey&lt;br /&gt;
##mod/survey:readresponses - read all user&#039;s responese&lt;br /&gt;
#Wiki&lt;br /&gt;
##mod/wiki:participate - original student, meaning depends of type and course setting&lt;br /&gt;
##mod/wiki:manage - original teacher, manages assigned group; moodle/site:accessallgroups is needed to manage all groups &lt;br /&gt;
##(Waiting on new wiki)&lt;br /&gt;
#Workshop&lt;br /&gt;
##mod/workshop:participate - original student, allows user to submit and assess&lt;br /&gt;
##mod/workshop:manage - original teacher, user can manage others&lt;br /&gt;
##(Waiting on new Workshop)&lt;br /&gt;
&lt;br /&gt;
===Enrolment-level Capabilities===&lt;br /&gt;
&lt;br /&gt;
The naming convention for capabilities that are specific to enrolment is &#039;enrol/enrol_name:capability&#039;. The enrolment capabilities are defined in enrol/enrol_name/db/access.php.&lt;br /&gt;
&lt;br /&gt;
#Authorize.net Payment Gateway &lt;br /&gt;
##enrol/authorize:managepayments - manage user payments, capture, void, refund, delete etc.&lt;br /&gt;
&lt;br /&gt;
===Blocks===&lt;br /&gt;
#activity_modules&lt;br /&gt;
##None&lt;br /&gt;
#admin&lt;br /&gt;
#admin_2&lt;br /&gt;
#admin_bookmarks&lt;br /&gt;
#blog_menu&lt;br /&gt;
#blog_tags&lt;br /&gt;
#calendar_month&lt;br /&gt;
#calendar_upcoming&lt;br /&gt;
#course_list&lt;br /&gt;
#course_summary&lt;br /&gt;
#glossary_random&lt;br /&gt;
#html&lt;br /&gt;
#loancalc&lt;br /&gt;
#login&lt;br /&gt;
#messages&lt;br /&gt;
#news_items&lt;br /&gt;
#online_users&lt;br /&gt;
#participants&lt;br /&gt;
#quiz_results&lt;br /&gt;
#recent_activity&lt;br /&gt;
#rss_client&lt;br /&gt;
##block/rss_client:createprivatefeeds&lt;br /&gt;
##block/rss_client:createsharedfeeds&lt;br /&gt;
##block/rss_client:manageownfeeds&lt;br /&gt;
##block/rss_client:manageanyfeeds&lt;br /&gt;
#search&lt;br /&gt;
#search_forums&lt;br /&gt;
#section_links&lt;br /&gt;
#site_main_menu&lt;br /&gt;
#social_activities&lt;br /&gt;
&lt;br /&gt;
===Questions===&lt;br /&gt;
I am adding question categories here because they seem to have been forgotten in the whole scheme of things since having been removed from the quiz module itself. I&#039;ve made a suggestion on how these could be handled in [http://www.moodle.org/bugs/bug.php?op=show&amp;amp;bugid=6118&amp;amp;pos= bug 6118].&lt;br /&gt;
&lt;br /&gt;
See [http://moodle.org/mod/forum/discuss.php?d=51143 this forum thread] for a discussion about the current problems wth publishing question categories.[[User:Tim Hunt|Tim Hunt]] 18:50, 8 August 2006 (WST)&lt;br /&gt;
&lt;br /&gt;
==Programming Interface==&lt;br /&gt;
&lt;br /&gt;
Although the Roles system may look complicated at first glance, implementing it in Moodle code is fairly simple.&lt;br /&gt;
&lt;br /&gt;
* You need to define each capability once, so that Moodle can upgrade existing roles to take advantage of it.  You do this in an access.php inside the db folder of any module (eg see mod/forum/db/access.php).  The array contains entries like this (note the descriptions for the legacy roles which provides forward compatibility):&lt;br /&gt;
    &#039;mod/forum:viewforum&#039; =&amp;gt; array(&lt;br /&gt;
        &#039;captype&#039; =&amp;gt; &#039;read&#039;,&lt;br /&gt;
        &#039;contextlevel&#039; =&amp;gt; CONTEXT_MODULE,&lt;br /&gt;
        &#039;legacy&#039; =&amp;gt; array(&lt;br /&gt;
            &#039;guest&#039; =&amp;gt; CAP_PREVENT,&lt;br /&gt;
            &#039;student&#039; =&amp;gt; CAP_ALLOW,&lt;br /&gt;
            &#039;teacher&#039; =&amp;gt; CAP_ALLOW,&lt;br /&gt;
            &#039;editingteacher&#039; =&amp;gt; CAP_ALLOW,&lt;br /&gt;
            &#039;coursecreator&#039; =&amp;gt; CAP_ALLOW,&lt;br /&gt;
            &#039;admin&#039; =&amp;gt; CAP_ALLOW&lt;br /&gt;
        )&lt;br /&gt;
    ),&lt;br /&gt;
* To load/change these capabilities you need to bump the module version.   There&#039;s no need to provide changes or differences as Moodle will scan the whole array and sort it out.&lt;br /&gt;
* On each page you need to find the context the user is working in, using the get_context_instance() function.  For example, in the forum module:&lt;br /&gt;
&lt;br /&gt;
  $context = get_context_instance(CONTEXT_MODULE, $cm-&amp;gt;id);&lt;br /&gt;
* or to at the course level:&lt;br /&gt;
  $context = get_context_instance(CONTEXT_COURSE, $id));&lt;br /&gt;
* Then, whenever you want to check that the current user has rights to do something, call has_capability() like this:&lt;br /&gt;
    if (!has_capability(&#039;mod/forum:viewforum&#039;, $context)) {&lt;br /&gt;
        print_error(&#039;nopermissiontoviewforum&#039;);&lt;br /&gt;
    }&lt;br /&gt;
* If you just want to assert a capability and then finish with an error message if it&#039;s not met (as we did above), then a shorter way it to use require_capability() like this:&lt;br /&gt;
&lt;br /&gt;
    require_capability(&#039;mod/forum:viewforum&#039;, $context);&lt;br /&gt;
&lt;br /&gt;
* Note that there are extra parameters you can specify to get a custom error message, otherwise users get an automated &amp;quot;No permissions&amp;quot; message that lists the permission they were missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As a result of the new Roles System, all calls to isadmin(), iscoursecreator, isteacheredit(), isteacher(), isstudent(), and isguest() will have to be replaced with calls to has_capability() or require_capability().   However, these functions will be retained for some backward compatibility with old code, using the legacy capabilities to try and work out what to do.&lt;br /&gt;
&lt;br /&gt;
==Metacourses==&lt;br /&gt;
&lt;br /&gt;
The behaviour of metacourses in Moodle 1.7 changed slightly, in that where it used to just synch students from child courses to the parent course, it will now synch ALL roles. Teachers etc of the child courses will have the same role in the meta course. Technically metacourse synchronises all role assignments in CONTEXT_COURSE with its child courses; the only exception are users with moodle/course:managemetacourse capability, these users are synchronized only upwards, they are not unenrolled from metacourse when unenroling from child course or when removing the child from metacourse.&lt;br /&gt;
&lt;br /&gt;
In order to import/enrol other courses into metacoure you need to have moodle/course:managemetacourse capability. You can add manually only participants with moodle/course:managemetacourse, all other participants are automatically synced with child courses - if you try to manually enrol user without this capability error is displayed. Similar error is shown also when you try to manually unenrol participant from meta course while still being enrolled in child course.&lt;br /&gt;
&lt;br /&gt;
Sample setup:&lt;br /&gt;
* metacourse manager has been assigned role with moodle/course:managemetacourse capability in system or course category context&lt;br /&gt;
* students are enrolled in several child courses&lt;br /&gt;
* teachers are enrolled in separate child course(s)&lt;br /&gt;
&lt;br /&gt;
==Problem areas we are working on ==&lt;br /&gt;
&lt;br /&gt;
===Student view===&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Student view&amp;quot; button has been removed completely.&lt;br /&gt;
&lt;br /&gt;
If there is time and a secure way can be found, it will be replaced by a menu to let the user assume a temporary role in the context of that course.&lt;br /&gt;
&lt;br /&gt;
===Teacher forum===&lt;br /&gt;
&lt;br /&gt;
Teacher forums were always a curious exception to normal forums, as they were not part of a course as such, and were not backed up.&lt;br /&gt;
&lt;br /&gt;
We&#039;re taking the opportunity to rectify this.   The upgrade converts teacher forums with content to normal forums in section 0 of the course, and ensures that only teachers can access them.  If the teacher forum had not been used in the course then it&#039;s not converted and will just dissappear.&lt;br /&gt;
&lt;br /&gt;
===Enrolment plugins===&lt;br /&gt;
&lt;br /&gt;
====Process of logging in====&lt;br /&gt;
&lt;br /&gt;
# load_user_capability() is called to load all the capabilities&lt;br /&gt;
# check_enrolment_plugins() is called at the top of load_user_capability() to check all the enrolment plugins.&lt;br /&gt;
# For each active plugin:&lt;br /&gt;
##Check for setup_enrolments($user) and run it.  This function will do all the processing needed to assign or unassign roles from the current user.&lt;br /&gt;
# load_user_capability() continues and loads up all the roles&lt;br /&gt;
# load_defaultuser_role() is called to add default site permissions (all users)&lt;br /&gt;
&lt;br /&gt;
====Process of checking access to a course====&lt;br /&gt;
&lt;br /&gt;
require_login($course-&amp;gt;id) is called by the script and has logic like this:&lt;br /&gt;
&lt;br /&gt;
# Is the user a guest at site level?&lt;br /&gt;
## Yes: Does the course allow guests?&lt;br /&gt;
### Yes: return true (and further capabilities are checked by the script)&lt;br /&gt;
### No:  send the user to course/enrol.php for enrolment&lt;br /&gt;
## No: continue below&lt;br /&gt;
&lt;br /&gt;
# Does the user have moodle/course:view in that (course) context?&lt;br /&gt;
## Yes: then they can enter (and further capabilities are checked by the script)&lt;br /&gt;
##  No: is guest access allowed on the course?&lt;br /&gt;
### Yes: assign temporary guest role to that user for that context (in session cache).&lt;br /&gt;
### No: send the user to course/enrol.php for enrolment.&lt;br /&gt;
&lt;br /&gt;
====Process of enrolling====&lt;br /&gt;
&lt;br /&gt;
(more soon)&lt;br /&gt;
&lt;br /&gt;
==Scenario brainstorming==&lt;br /&gt;
&lt;br /&gt;
This section is for brainstorming some example roles that we would like to support.  Note some of these *may* not be possible in 1.7.&lt;br /&gt;
&lt;br /&gt;
===Student===&lt;br /&gt;
Obviously.&lt;br /&gt;
&lt;br /&gt;
===Site Designers===&lt;br /&gt;
Is there a role for people involved in how the site looks but not full administrators? Thinking here of online control of themes rather than FTP theme uploading. But in either case they caneditlogos, caneditcss, candeditlevelatwhichthemeapplies.&lt;br /&gt;
&lt;br /&gt;
===Educational Authority Adviser===&lt;br /&gt;
Someone who would want to browse the site and may be asked to comment or contribute to particular discussions or developments in school. Access for this role would be controlled by the school in the case of school level moodles but may be different if there were to be a Local Authority wide Moodle.&lt;br /&gt;
&lt;br /&gt;
===Educational Inspector===&lt;br /&gt;
Someone who will visit the site to verify the school&#039;s self review that comments on home school relationships, extending the classroom etc. They may want to see summaries of usage and reports from surveys garnering parent and pupil views.&lt;br /&gt;
&lt;br /&gt;
===Second Marker / Moderator===&lt;br /&gt;
A teacher within ths site that has access to assignments and quizzes from another teacher&#039;s course for second marking purposes. This may need additional functionality adding to the assignment module so that two sets of grades/feedback can be given to one set of assignments.&lt;br /&gt;
&lt;br /&gt;
===Peer observer of teaching===&lt;br /&gt;
Many institutions encourage peer observation of teaching, to encourage reflection on practice. In online environments this will be similar to moderation or inspection. The peer observer would need to be able to experience the course &amp;quot;as a student&amp;quot;, but also to be able to view summaries of usage, transcripts of interactions (forums/surveys/polls etc), grades assigned (e.g. in assignments).&lt;br /&gt;
&lt;br /&gt;
===External Examiner===&lt;br /&gt;
Has all the rights of inspectors, but would also need to be able to review assignments and feedback, view forums, glossaries etc. However, would not want to post, feedback onto the site at all.&lt;br /&gt;
&lt;br /&gt;
===Parent===&lt;br /&gt;
A parent will have one or more children in one or more institutions which could be using one or more moodle instances or a mixture of Learning Platforms. A parent&#039;s role will vary depending on the age of their children and whether they are contributing as a parent or a school supporter.&lt;br /&gt;
&lt;br /&gt;
In Early Years (EY=3+4 yr olds) and Key Stage 1 (KS1=5+6 yr olds) they may play/learn on an activity or write for the child. Parents often interpret homework tasks and read to their children perhaps filling in a joint reading diary. In Key Stage 2 (KS2=7-11 yr olds) parents would be more monitoring but may join in as well.&lt;br /&gt;
&lt;br /&gt;
In Key stages 3 (KS3=12-14 yr olds) and 4 (KS4=15+16 yr olds) this changes to more of a monitoring/awareness role where a parent would expect to have a summary report of attendance, attainment and general achievement on a weekly/monthly/termly or annual basis. Parents will often be asked to sign and write back comments about this review report.&lt;br /&gt;
&lt;br /&gt;
In all Key Stages there is a great need for parents to receive communication from the school which they can confirm they have received by signing a form. In some cases this may also involve making choices from a list. It may also involve payment for a trip or disco being returned so there could be the possibility of electronic payments. Also in all Key Satges there may be a home-school agreement which may be signed up to. Could this form part of a site policy system that incorporates a tickable list of activities the parent agrees to the child using (blogs/wikis/forums etc.)?&lt;br /&gt;
&lt;br /&gt;
Parent&#039;s evenings often involve complex booking systems that attempt to get parent&#039;s and teachers together. Easy for EY/KS1/KS2 very difficult for KS3/KS4. Wow would this help if it was built into the Learning Platform.&lt;br /&gt;
&lt;br /&gt;
In some cases there needs to be confidential communication between the parent and the teacher without the child being party to this. It may involve teaching and learning but could also involve a behaviour or medical issue. Often this may be done via a sealed letter or face to face. &lt;br /&gt;
&lt;br /&gt;
The latest incarnation of OfSTED with the Self Review Framework (SEF) there is a greater emphasis on schools gathering parent voice via surveys and discussion. There is a clear match here with parents have access to parental votes, questionnaires and discussions and for schools to be able to publish news, results and reports back to parents.&lt;br /&gt;
&lt;br /&gt;
In the UK the LP framework and agenda as being pushed by the DfES via Becta emphasises that within the mandatory groups and roles functionality the parent role is likely to be required to meet the LP Framework procurement standard.&lt;br /&gt;
&lt;br /&gt;
Again in the UK, parents have their own independent right of access to a child&#039;s educational records. Obviously, children&#039;s records must not be made available to other parties, including the parents of other children in the same class. Thus it would be necessary to associate parent accounts with their own child&#039;s accounts in such a way that they could, if so desired, have read access to their child&#039;s grades, answers and contributions, but generally not those of other children - this may be problematic in the case of wiki activities or forum posts.&lt;br /&gt;
&lt;br /&gt;
There is some concern that children&#039;s forum contributions etc may be constrained if their parents are able to read all that they write; this may be particularly problematic in areas such as Personal, Social and Health Education (PSHE), where some schools may choose to use obfuscated usernames.&lt;br /&gt;
&lt;br /&gt;
===Manager===&lt;br /&gt;
&#039;&#039;Please add text here...&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Weekly Seminar Leader===&lt;br /&gt;
&#039;&#039;In a university seminar, typically 8-15 students in their 3rd/4th year, each student is responsible for leading one topic in a study series.  I ask each student to research 5-10 resources, then give a powerpoint presentation to the other students.  This is followed by an in-class discussion and then online homework.  The homework involves some fun quiz questions and then some reflective journal questions.  I ask each seminar leader to prepare the quiz questions and journal questions as well as their presentation.  To do that, I would like to assign activity-making/authoring roles to the student--either for a short period, or for duration of the whole course.  Thus &amp;quot;Allow Quiz Authoring Role&amp;quot; or &amp;quot;Allow Assignment Authoring Role&amp;quot; at the course level or, if possible, even the Topic level (in a topic or week format course) would be important.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Mentor/Mentee===&lt;br /&gt;
&#039;&#039;Please add text here...&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Community-Designed Rating Criteria===&lt;br /&gt;
&#039;&#039;The gradebook tends to be the domain of the teacher.  What if community/peer ratings/marks could also be entered there? What if peer assessment criteria could be designed by the students, not just the teacher?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Visitor===&lt;br /&gt;
&lt;br /&gt;
This would be a role whereby one could allow a visitor to visit one&#039;s classroom. This might be a colleague interested in seeing your course, or a journalist who might be writing an article about one&#039;s site. They should not be able to see the names of any students anywhere (eg recent activity, forum posts) for privacy reasons. They should be able to try out things like quizzes, and lessons but no grades would be recorded (like in teacher preview mode). They would not be able to participate in choices and forums but could view them. It would be read only in a way like former-student role below but without access to a particular student&#039;s records that former student role would grant.&lt;br /&gt;
&lt;br /&gt;
===Guest Speaker===&lt;br /&gt;
&lt;br /&gt;
This role would be similar to the Visitor role above, but would allow seeing student names, and also allow both reading and posting to a specific forum or forums. We often have &amp;quot;guest speakers&amp;quot; who read and respond to student forum posts. Right now we have to add them as students, which isn&#039;t ideal.&lt;br /&gt;
&lt;br /&gt;
===Former Student===&lt;br /&gt;
This role would be of particular use for courses with rolling enrollments. This role would be one where a student had completed all of the requirements of a course (ie assignments, quizzes etc.) but wished to have continued access to the course material for review or consultation. The key factor is that one would give access to the completed student to the notes he read, his work and the teacher&#039;s comments on it, but he would not be allowed to do anything that would take up the teacher&#039;s time. In other words, a sort-of read-only access to the course. How forums, which might contain pertinent information and would continue to grow, would be handled is a question. Perhaps the student would be shown only what was in the forums at the time he completed the course. He would not be allowed to see any new posts or add any himself. Same thing for database and glossary entries. In other words, a snapshot of the course at the time his regular enrollment ended. He shouldn&#039;t be able to see the names or profiles of any newly enrolled students for privacy reasons-hence the restrictions on forum access. One issue that would have to be dealt with would be changes to existing modules-such as resources. Does the student get access to the module as it was or as it is? We have no versioning of resources in Moodle so this would be a problem. What about a teacher changing a quiz question so that the answer is different? What would a former student see?&lt;br /&gt;
&lt;br /&gt;
===Alumnus=== An ALUMNUS should be able to search for all other ALUMNI of the school, interact with them and be enrolled in a seperate course - which is like a META course with all the content of his learning and interaction - as well as capabilities to be a part of this ALUMNI only course.  All the teachers of courses during school years should automatically be a part of the ALUMNI course .. which means when an ALUMNUS is enrolled in a course, the original teachers of all his courses get enrolled ?  --[[User:Anil Sharma|Anil Sharma]] 20:54, 15 July 2006 (WST)&lt;br /&gt;
&lt;br /&gt;
===Librarian===&lt;br /&gt;
&lt;br /&gt;
Reference Librarians have an active role in most of the courses taught at some schools such as Earlham College (with Bibliographic Instruction). The Librarian role within Moodle could encompass default read access to all courses (unless prohibited by course teacher) and read access to all components of the course unless access is barred (again by teacher). The Librarians would also perhaps have a block called perhaps Reference Services or Reference Desk with write access where they could deposit resources. Also this block might have a chat applet whereby enrolled students could chat to the Reference Librarian on duty about their bibliographic research needs.&lt;br /&gt;
&lt;br /&gt;
In schools there is often a book review system. This may be covered by the lending system database but may not in which case a librarian may neeed to have a course area they can create a database template to handle the reviews in which case they may have a normal teacher style role? Off topic but course an integration with common schools database systems would be great.&lt;br /&gt;
&lt;br /&gt;
===Teacher===&lt;br /&gt;
&lt;br /&gt;
Teachers should have read access to other Teacher&#039;s courses unless explictly prohibited. They should be able to set parts of their own course to be totally private (perhaps even to admin?). Just as each activity can currently be set to have group access, each activity could have a permissions field. Teachers could set default permissions for all activities on their course (eg they might disallow Librarian access for example) and then change the access permission for an individual activity. &lt;br /&gt;
&lt;br /&gt;
I think that what is needed is a simple heirarchy of permissions and levels of granularity.&lt;br /&gt;
&lt;br /&gt;
I would take issue with &amp;quot;teachers should have read access to other teacher&#039;s courses unless explicitly prohibited.&amp;quot; This is a violation of the students&#039; privacy as how they perform and what they do in one class isn&#039;t the business of another teacher. Moreover, in the real world a teacher wouldn&#039;t suddenly go sit in on a colleague&#039;s class without asking permission first. I would not have appreciated such an invasion of privacy as either a teacher or a student. It could be an option, but shouldn&#039;t be default.--[[User:N Hansen|N Hansen]] 19:54, 12 June 2006 (WST)&lt;br /&gt;
&lt;br /&gt;
===Community Education Tutors/Trainers===&lt;br /&gt;
Teachers may be community adult education trainers making use of a school moodle so must only have access to their courses unless given access elsewhere. They would not necessarily get the default teacher privileges.&lt;br /&gt;
&lt;br /&gt;
===Secretary/Student Worker===&lt;br /&gt;
&lt;br /&gt;
We often have faculty who want their departmental secretary or student worker to scan and upload files and perhaps create resources. Currently they have to be given teacher access to the course. This is dangerous from a FERPA standpoint since they could easily get access to grades.&lt;br /&gt;
&lt;br /&gt;
===Teaching Assistant===&lt;br /&gt;
&lt;br /&gt;
Our Faculty frequently have undergraduate students acting as Teaching Assistants. These students need to be able to add resources, create assignments, and possibly grade assignments. However, due to FERPA they cannot have access to other students&#039; overall grade information. I think the requirements here are slightly different than those of Secretary/Student Worker&lt;br /&gt;
&lt;br /&gt;
===Student - FERPA rights===&lt;br /&gt;
&lt;br /&gt;
A student that has asserted their FERPA rights to non-disclosure.  Typically includes not publishing their name&lt;br /&gt;
in any public place.  Could include this student only being seen with an &amp;quot;alias&amp;quot; within course spaces.  Is this an attribute rather&lt;br /&gt;
than a role?&lt;br /&gt;
&lt;br /&gt;
===Help Desk===&lt;br /&gt;
&lt;br /&gt;
Help desk agents that have read access for the purposes of trouble shooting.  Some care in placing this role within a hierarchy&lt;br /&gt;
of inheritance is needed, full access will be problematic with FERPA.&lt;br /&gt;
&lt;br /&gt;
===Admin - Catgory based===&lt;br /&gt;
&lt;br /&gt;
Basically a person in between full Admin and Creator that has the permissions of an Admin but only with respect to courses and students. Currently a Creator has permissions site-wide which does not always meet the requirements of a given organisation (e.g. Department A may not be happy that a person from Department B can create/modify courses within Department A&#039;s area). The ability to designate a Creator within a specific category would allow areas to be set up for a faculty/department/organisation and allow the Admin for that area to create/delete courses, upload users, add site-wide entries to the calendar etc.&lt;br /&gt;
&lt;br /&gt;
===Process Roles===&lt;br /&gt;
&lt;br /&gt;
organising the learning process for a group you wish to have the choice to place students in differnt roles: examples of this are:&lt;br /&gt;
* Give a student the role of forum-moderator with edit and chunk-rights&lt;br /&gt;
* Give students different roles &amp;amp; rights in a Webquest design (and change these roles next week&lt;br /&gt;
* Give students different resources, depending of their roles in a rolegame/simulation&lt;br /&gt;
* Give a student the rights to create the section content of next week (and only that week..)&lt;br /&gt;
&lt;br /&gt;
==Things to finish for 1.7 Beta==&lt;br /&gt;
&#039;&#039;&#039;18 Sept 2006&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Remove core references to user_student, user_teacher, user_admin, user_coursecreator tables.  [Yu]&lt;br /&gt;
#Address function: isteacher, isadmin, isstudent [Yu]&lt;br /&gt;
#Remove &amp;quot;view&amp;quot; capabilities from all modules unless required [Vy]&lt;br /&gt;
#Remove all old references from remaining Blocks [Vy]&lt;br /&gt;
#Metacourses [Skodak]&lt;br /&gt;
#Add risks to GUI[Skodak]&lt;br /&gt;
#Enrolment plugins  [Martin and Alastair]&lt;br /&gt;
#[[Development:Stats_roles_1.7|Statistics]] [Penny]&lt;br /&gt;
#Fix Loginas&lt;br /&gt;
#Add category-level assigns [Yu]&lt;br /&gt;
#[[Development:Backup_roles_1.7|Backups]] [Eloy?]&lt;br /&gt;
&lt;br /&gt;
===Proposal for interface enhancement===&lt;br /&gt;
Martin asked some questions, here are my answers. The sketches below are not worked out proposals. Their task is to visualize the idea. The exact colours and functionality may be defined after possible agreement about the proposals. The Green, orange and red columns support the meaning of the options from &amp;quot;allow&amp;quot; to &amp;quot;prohibit&amp;quot; (If you may want to see larger images please click onto the image or the &amp;quot;Enlarge&amp;quot; icon below the image.)&lt;br /&gt;
&lt;br /&gt;
The list of possible settings is very long and &#039;&#039; &amp;quot;... the problem is not to overwhelm people with information&amp;quot; &#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
[[Image:01_moodle_define_roles_structured.png|thumb=01_moodle_define_roles_structured_pre.png]]&lt;br /&gt;
&lt;br /&gt;
1) One proposal is to use colour to structure the sections and the columns. Picture 1 shows that the user can keep a much better overview when the list is divided into meaningful different coloured columns and clear sections.&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both;&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:02_moodle_define_roles_collapsed.png|thumb=02_moodle_define_roles_collapsed_pre.png]]&lt;br /&gt;
&lt;br /&gt;
2) A second proposal is to reduce the amount of information the user is shown at the same time. The YUI interface library offers great support to show/hide sections of the page by clicking on specific elements. &lt;br /&gt;
&lt;br /&gt;
For example click on an icon beside the sub heading &amp;quot;Course categories&amp;quot; and show/hide all table rows with the CLASS &amp;quot;course-category&amp;quot;.&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both;&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:03_moodle_define_roles_tooltip.png|thumb=03_moodle_define_roles_tooltip_pre.png]]&lt;br /&gt;
&lt;br /&gt;
3) &#039;&#039; &amp;quot;The main problem is the last column for risk ... we were thinking of putting little icons in there ...&amp;quot; &#039;&#039;&lt;br /&gt;
Icons are good when they tell the user more about possible actions/meanings then the letters. I am not sure if this is the case here. For both - icons or letters - the YUI tool-tip function would be able to give the user valuable information about the meaning.&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both;&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*[[Development:Hardening new Roles system]]&lt;br /&gt;
*[[Development:Roles and modules]]&lt;br /&gt;
*Using Moodle course:&lt;br /&gt;
**[http://moodle.org/mod/forum/view.php?f=941 Roles and Capabilities forum]&lt;br /&gt;
**Key discussions at Using Moodle forums:&lt;br /&gt;
***[http://moodle.org/mod/forum/discuss.php?d=38788 Roles and Permissions architecture]&lt;br /&gt;
***[http://moodle.org/mod/forum/discuss.php?d=56302#256313 An example of admin roles as set in the database]&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer|Roles]]&lt;br /&gt;
[[Category:Roles]]&lt;br /&gt;
&lt;br /&gt;
[[fr:Developpement:Roles]]&lt;/div&gt;</summary>
		<author><name>Francois@catalyst.net.nz</name></author>
	</entry>
</feed>