<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.moodle.org/dev/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Danielneis</id>
	<title>MoodleDocs - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://docs.moodle.org/dev/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Danielneis"/>
	<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/Special:Contributions/Danielneis"/>
	<updated>2026-06-28T11:06:19Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Setting_up_VSCode&amp;diff=61107</id>
		<title>Setting up VSCode</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Setting_up_VSCode&amp;diff=61107"/>
		<updated>2021-08-17T18:35:43Z</updated>

		<summary type="html">&lt;p&gt;Danielneis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://en.wikipedia.org/wiki/Visual_Studio_Code VSCode] is a an Integrated Development Environment from Microsoft available under the MIT License.&lt;br /&gt;
It works on Linux/Windows/OSX. It has a large number of plugins available, most entirely free/libre. It has good support&lt;br /&gt;
for Xdebug.&lt;br /&gt;
&lt;br /&gt;
== Debugging ==&lt;br /&gt;
[https://marketplace.visualstudio.com/items?itemName=felixfbecker.php-debug PHP Debug] adds debugging capability for PHP files, which is essential. Follow the extension&#039;s installation instructions. &lt;br /&gt;
&lt;br /&gt;
It allows the setting of breakpoints where the contents of variables can be inspected. Breakpoints can be conditional, e.g. break execution of a loop when a variable reaches a certain value.&lt;br /&gt;
&lt;br /&gt;
== Intellisense ==&lt;br /&gt;
[https://marketplace.visualstudio.com/items?itemName=bmewburn.vscode-intelephense-client PHP Intelephense] is the standard php plugin for [https://code.visualstudio.com/docs/editor/intellisense intellisense] features.&lt;br /&gt;
&lt;br /&gt;
== Linting ==&lt;br /&gt;
[https://en.wikipedia.org/wiki/Lint_(software) Linting] plugins will show wavy red lines under code that does not conform: &lt;br /&gt;
&lt;br /&gt;
[[File:phpcs_sniff.png|500px]]&lt;br /&gt;
&lt;br /&gt;
The linters used for development are:&lt;br /&gt;
* [https://marketplace.visualstudio.com/items?itemName=stylelint.vscode-stylelint stylelint] for CSS&lt;br /&gt;
* [https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint ESLint] for JS&lt;br /&gt;
* [https://marketplace.visualstudio.com/items?itemName=wongjn.php-sniffer PHP Sniffer] for PHP. It requires [https://github.com/squizlabs/PHP_CodeSniffer phpcs v3.* (package)] installed and configured to use moodle&#039;s standards.&lt;br /&gt;
&lt;br /&gt;
=== PHP CS ===&lt;br /&gt;
&lt;br /&gt;
1. Install PHP CS following steps described in https://docs.moodle.org/dev/CodeSniffer#Installing_PHP_CS (you may choose your favourite way to install and configure it).&lt;br /&gt;
&lt;br /&gt;
2. After installing PHP Sniffer, add the following setting to define standard PHP CS (if you haven&#039;t set it as default in your system):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;phpSniffer.standard&amp;quot;: &amp;quot;moodle&amp;quot;,&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Code Formatting ==&lt;br /&gt;
If you have [https://marketplace.visualstudio.com/items?itemName=wongjn.php-sniffer PHP Sniffer] installed, with PHP CS configured too, set it to be the default formatter:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// add this [php] key/value pair in vscode&#039;s user settings (settings.json):&lt;br /&gt;
{&lt;br /&gt;
  // ...&lt;br /&gt;
  &amp;quot;[php]&amp;quot;: {&lt;br /&gt;
    &amp;quot;editor.defaultFormatter&amp;quot;: &amp;quot;wongjn.php-sniffer&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Behat/Gherkin/Cucumber Formatting ==&lt;br /&gt;
This plugin offers colour syntax formatting for behat .feature files. &lt;br /&gt;
I have not found a plugin that will format .feature files consistent with the expected indentations&lt;br /&gt;
&lt;br /&gt;
https://marketplace.visualstudio.com/items?itemName=Blodwynn.featurehighlight&lt;br /&gt;
&lt;br /&gt;
== Automated testing ==&lt;br /&gt;
[https://marketplace.visualstudio.com/items?itemName=danilopolani.yet-another-phpunit Yet Another PHPUnit] lets you run automated tests from within vscode.&lt;br /&gt;
&lt;br /&gt;
It inserts a link just above the class name that says &#039;Run class tests&#039; which will run all the tests in a class and links above each function that says Run test that will run just that test.&lt;br /&gt;
&lt;br /&gt;
[[File:yet_another_phpunit.png]]&lt;br /&gt;
&lt;br /&gt;
== Docblocks ==&lt;br /&gt;
[https://marketplace.visualstudio.com/items?itemName=neilbrayfield.php-docblocker PHP DocBlocker] to create a docblock by typing /** at the top of a function and it grabs the parameters, including types if given and creates a PHPDoc block.&lt;br /&gt;
&lt;br /&gt;
== Moodle specific Snippets and autocomplete ==&lt;br /&gt;
[https://marketplace.visualstudio.com/items?itemName=MateuszLesiak.vscode-moodle-snippets Moodle - Snippets &amp;amp; Autocomplete] offers some useful Moodle specific code completion popups.&lt;br /&gt;
&lt;br /&gt;
== Auto trim trailing white space == &lt;br /&gt;
To ensure trailing white space is trimmed do the following &lt;br /&gt;
&lt;br /&gt;
Open VS User Settings (Preferences &amp;gt; Settings &amp;gt; User Settings tab).&lt;br /&gt;
Click the {} icon in the top-right part of the window. This will open a document.&lt;br /&gt;
&lt;br /&gt;
Add a new &amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&amp;quot;files.trimTrailingWhitespace&amp;quot;: true&amp;lt;/syntaxhighlight&amp;gt; setting to the User Settings document if it&#039;s not already there. &lt;br /&gt;
This is so you aren&#039;t editing the Default Setting directly, but instead adding to it.&lt;br /&gt;
&lt;br /&gt;
Save the User Settings file.&lt;br /&gt;
&lt;br /&gt;
== Develop over an ssh connection == &lt;br /&gt;
&lt;br /&gt;
With this plugin you can develop on a remote machine as if it were locally providing you have ssh login acces&lt;br /&gt;
&lt;br /&gt;
https://github.com/Microsoft/vscode-remote-release&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer tools|vscode]]&lt;/div&gt;</summary>
		<author><name>Danielneis</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Custom_fields_API&amp;diff=56593</id>
		<title>Custom fields API</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Custom_fields_API&amp;diff=56593"/>
		<updated>2019-10-31T15:37:31Z</updated>

		<summary type="html">&lt;p&gt;Danielneis: /* Add custom fields to the instance edit form */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Moodle 3.7}}&lt;br /&gt;
&lt;br /&gt;
== Custom fields API overview ==&lt;br /&gt;
&lt;br /&gt;
Custom fields API was added in Moodle 3.7. It allows to configure custom fields that can be added to various contexts. Each &#039;&#039;&#039;component&#039;&#039;&#039; (or plugin) that wants to use custom fields can define several &#039;&#039;&#039;areas&#039;&#039;&#039;. For example, &#039;core_course&#039; component defines an area &#039;course&#039; that allows to add custom fields to the courses, the same component can define another area &#039;coursecat&#039; that will allow to add custom fields to the course categories. Inside each area the component/plugin can decide whether to use or not to use &#039;&#039;&#039;itemid&#039;&#039;&#039;. For example, course custom fields are the same throughout the system and they don&#039;t use itemid (it is always 0). But there could be an activity module that would want to configure different custom fields for each individual instance of module, then this module would use the module id as the itemid, as in ([https://github.com/marinaglancy/moodle-mod_surveybuilder example]). This would allow to create modules similar to mod_data and mod_feedback where each instance has it&#039;s own set of fields.&lt;br /&gt;
&lt;br /&gt;
New plugin type &amp;quot;customfield&amp;quot; was also added as part of the Custom fields API. Additional types of custom fields can be installed into /customfield/field/ .&lt;br /&gt;
&lt;br /&gt;
== How to use custom fields ==&lt;br /&gt;
&lt;br /&gt;
Component/plugin that uses custom fields must define a &#039;&#039;&#039;handler class&#039;&#039;&#039; for each area and a &#039;&#039;&#039;configuration page&#039;&#039;&#039;. Handler class must be called &#039;&#039;&#039;&amp;lt;PLUGINNAME&amp;gt;/customfield/&amp;lt;AREA&amp;gt;_handler&#039;&#039;&#039; and be placed in autoloaded location (&amp;lt;PLUGINDIR&amp;gt;/classes/customfield/&amp;lt;AREA&amp;gt;_handler.php . This class must extend &#039;&#039;&#039;\core_customfield\handler&#039;&#039;&#039; . Configuration page may be located anywhere. For course custom fields configuration the admin settings page is used [https://github.com/moodle/moodle/blob/master/course/customfield.php /course/customfield.php]. If the area uses itemid this page should take itemid as a parameter.&lt;br /&gt;
&lt;br /&gt;
Handler has protected constructor, to get a handler call create() method. Some areas may choose to return a singleton here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$handler = HANDLERCLASS::create($itemid);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Configuration page contents will be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$output = $PAGE-&amp;gt;get_renderer(&#039;core_customfield&#039;);&lt;br /&gt;
$outputpage = new \core_customfield\output\management($handler);&lt;br /&gt;
echo $output-&amp;gt;render($outputpage);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Handler must implement all abstract methods (calculate configuration or instance context, check permissions to configure, view or edit) and also may choose to overwrite:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
handler::uses_categories()&lt;br /&gt;
handler::generate_category_name()&lt;br /&gt;
handler::config_form_definition() // For example, the course_handler adds &amp;quot;locked&amp;quot; and &amp;quot;visibility&amp;quot; settings that control who can edit or view the particular field.&lt;br /&gt;
handler::setup_edit_page() // Sets page context/url/breadcrumb for the customfield/edit.php page, in some cases it must be overridden.&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add custom fields to the instance edit form ===&lt;br /&gt;
&lt;br /&gt;
Custom fields are added to the &#039;&#039;&#039;instances&#039;&#039;&#039;. For example, course custom fields are added to the courses, so courseid is the instanceid. In the example of [https://github.com/marinaglancy/moodle-mod_surveybuilder mod_surveybuilder] we use $USER-&amp;gt;id as the instanceid (which means that in this example one user can fill the survey in one module only once). In each case of using custom fields there should be a clear concept of an &#039;&#039;&#039;instance&#039;&#039;&#039;. Instanceid is required to save the data but it may be empty when we render the instance edit form (for example, the course is not yet created).&lt;br /&gt;
&lt;br /&gt;
Developer must add custom fields callbacks to the instance edit form. If the instance is &amp;quot;made up&amp;quot; (like in mod_surveybuilder), a new form has to be created with &#039;id&#039; field in it that will refer to the instanceid.&lt;br /&gt;
&lt;br /&gt;
The following callbacks should be used in form definition, definition_after_data, validation and after form submission:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$handler-&amp;gt;instance_form_definition($mform)&lt;br /&gt;
$handler-&amp;gt;instance_form_before_set_data()&lt;br /&gt;
$handler-&amp;gt;instance_form_definition_after_data()&lt;br /&gt;
$handler-&amp;gt;instance_form_validation()&lt;br /&gt;
$handler-&amp;gt;instance_form_save($data)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code php&amp;gt;instance_form_save()&amp;lt;/code&amp;gt; method must be called after the form was saved as the &amp;lt;code php&amp;gt;$data&amp;lt;/code&amp;gt; parameter must have the &amp;lt;code php&amp;gt;id&amp;lt;/code&amp;gt;attribute.&lt;br /&gt;
&lt;br /&gt;
On deletion of an instance or on deletion of the whole item call:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$handler-&amp;gt;delete_instance()&lt;br /&gt;
$handler-&amp;gt;delete_all()&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Retrieving instances custom fields ===&lt;br /&gt;
&lt;br /&gt;
How custom fields are used depends entirely on the situation. The following handler methods will help you to retrieve custom fields values for the given instance(s):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$handler-&amp;gt;export_instance_data()&lt;br /&gt;
$handler-&amp;gt;export_instance_data_object()&lt;br /&gt;
$handler-&amp;gt;display_custom_fields_data()&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Additional methods for advanced usage:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$handler-&amp;gt;get_instance_data()&lt;br /&gt;
$handler-&amp;gt;get_instances_data()&lt;br /&gt;
$handler-&amp;gt;get_instance_data_for_backup()&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Method restore_instance_data_from_backup() exists in the handler class but not implemented&lt;br /&gt;
&lt;br /&gt;
To retrieve the list of custom fields used in the given component/area/itemid you can use:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$handler-&amp;gt;get_categories_with_fields()&lt;br /&gt;
$handler-&amp;gt;get_fields()&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
List of fields is cached in the handler and these two functions can be called multiple times.&lt;br /&gt;
&lt;br /&gt;
=== Privacy API ===&lt;br /&gt;
&lt;br /&gt;
Custom fields API does not export or delete any data because it does not know how custom fields are used, what data is considered user data and if it is considered private or shared data. &lt;br /&gt;
&lt;br /&gt;
Plugins that store user information in custom fields should link subsystem in their get_metadata:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$collection-&amp;gt;link_subsystem(&#039;core_customfield&#039;, &#039;privacy:metadata:customfieldpurpose&#039;);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And they can use the following methods in the export/delete functions:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
use core_customfield\privacy\provider as customfield_provider;&lt;br /&gt;
&lt;br /&gt;
customfield_provider::get_customfields_data_contexts()&lt;br /&gt;
customfield_provider::export_customfields_data()&lt;br /&gt;
customfield_provider::delete_customfields_data()&lt;br /&gt;
customfield_provider::delete_customfields_data_for_context()&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In case when custom fields configuration is considered to be user data (configuration means the definition of the fields, not the instance data), there are also couple of methods to help with privacy API implementations:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
customfield_provider::get_customfields_configuration_contexts()&lt;br /&gt;
customfield_provider::delete_customfields_configuration()&lt;br /&gt;
customfield_provider::delete_customfields_configuration_for_context()&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Export of configuration was not yet implemented at the time of writing this because of difficult implementation and very unclear use case. If it is needed please feel free to contribute to Moodle.&lt;br /&gt;
&lt;br /&gt;
== Custom fields plugins ==&lt;br /&gt;
&lt;br /&gt;
Custom fields plugin type was added to allow implement different types of custom fields (somehow similar to user profile fields plugin type). Plugins are located in &#039;&#039;&#039;/customfield/field/&#039;&#039;&#039; and the full frankenstyle name of the plugins start with &#039;&#039;&#039;customfield_&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Except for common [[Plugin files]] and tests the following classes must be present in customfield plugins (in respective autoloaded locations):&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
namespace customfield_&amp;lt;PLUGINNAME&amp;gt;;&lt;br /&gt;
class field_controller extends \core_customfield\field_controller;&lt;br /&gt;
class data_controller extends \core_customfield\data_controller;&lt;br /&gt;
&lt;br /&gt;
namespace customfield_&amp;lt;PLUGINNAME&amp;gt;\privacy;&lt;br /&gt;
class provider implements \core_privacy\local\metadata\null_provider, \core_customfield\privacy\customfield_provider;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
MDL-64626 - Custom fields API (Moodle 3.7+) implementations and improvements&lt;br /&gt;
&lt;br /&gt;
MDL-57898 - Add custom field types plugin and course custom fields functionality&lt;/div&gt;</summary>
		<author><name>Danielneis</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Custom_fields_API&amp;diff=56591</id>
		<title>Custom fields API</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Custom_fields_API&amp;diff=56591"/>
		<updated>2019-10-31T13:57:38Z</updated>

		<summary type="html">&lt;p&gt;Danielneis: fix typos&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Moodle 3.7}}&lt;br /&gt;
&lt;br /&gt;
== Custom fields API overview ==&lt;br /&gt;
&lt;br /&gt;
Custom fields API was added in Moodle 3.7. It allows to configure custom fields that can be added to various contexts. Each &#039;&#039;&#039;component&#039;&#039;&#039; (or plugin) that wants to use custom fields can define several &#039;&#039;&#039;areas&#039;&#039;&#039;. For example, &#039;core_course&#039; component defines an area &#039;course&#039; that allows to add custom fields to the courses, the same component can define another area &#039;coursecat&#039; that will allow to add custom fields to the course categories. Inside each area the component/plugin can decide whether to use or not to use &#039;&#039;&#039;itemid&#039;&#039;&#039;. For example, course custom fields are the same throughout the system and they don&#039;t use itemid (it is always 0). But there could be an activity module that would want to configure different custom fields for each individual instance of module, then this module would use the module id as the itemid, as in ([https://github.com/marinaglancy/moodle-mod_surveybuilder example]). This would allow to create modules similar to mod_data and mod_feedback where each instance has it&#039;s own set of fields.&lt;br /&gt;
&lt;br /&gt;
New plugin type &amp;quot;customfield&amp;quot; was also added as part of the Custom fields API. Additional types of custom fields can be installed into /customfield/field/ .&lt;br /&gt;
&lt;br /&gt;
== How to use custom fields ==&lt;br /&gt;
&lt;br /&gt;
Component/plugin that uses custom fields must define a &#039;&#039;&#039;handler class&#039;&#039;&#039; for each area and a &#039;&#039;&#039;configuration page&#039;&#039;&#039;. Handler class must be called &#039;&#039;&#039;&amp;lt;PLUGINNAME&amp;gt;/customfield/&amp;lt;AREA&amp;gt;_handler&#039;&#039;&#039; and be placed in autoloaded location (&amp;lt;PLUGINDIR&amp;gt;/classes/customfield/&amp;lt;AREA&amp;gt;_handler.php . This class must extend &#039;&#039;&#039;\core_customfield\handler&#039;&#039;&#039; . Configuration page may be located anywhere. For course custom fields configuration the admin settings page is used [https://github.com/moodle/moodle/blob/master/course/customfield.php /course/customfield.php]. If the area uses itemid this page should take itemid as a parameter.&lt;br /&gt;
&lt;br /&gt;
Handler has protected constructor, to get a handler call create() method. Some areas may choose to return a singleton here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$handler = HANDLERCLASS::create($itemid);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Configuration page contents will be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$output = $PAGE-&amp;gt;get_renderer(&#039;core_customfield&#039;);&lt;br /&gt;
$outputpage = new \core_customfield\output\management($handler);&lt;br /&gt;
echo $output-&amp;gt;render($outputpage);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Handler must implement all abstract methods (calculate configuration or instance context, check permissions to configure, view or edit) and also may choose to overwrite:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
handler::uses_categories()&lt;br /&gt;
handler::generate_category_name()&lt;br /&gt;
handler::config_form_definition() // For example, the course_handler adds &amp;quot;locked&amp;quot; and &amp;quot;visibility&amp;quot; settings that control who can edit or view the particular field.&lt;br /&gt;
handler::setup_edit_page() // Sets page context/url/breadcrumb for the customfield/edit.php page, in some cases it must be overridden.&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add custom fields to the instance edit form ===&lt;br /&gt;
&lt;br /&gt;
Custom fields are added to the &#039;&#039;&#039;instances&#039;&#039;&#039;. For example, course custom fields are added to the courses, so courseid is the instanceid. In the example of [https://github.com/marinaglancy/moodle-mod_surveybuilder mod_surveybuilder] we use $USER-&amp;gt;id as the instanceid (which means that in this example one user can fill the survey in one module only once). In each case of using custom fields there should be a clear concept of an &#039;&#039;&#039;instance&#039;&#039;&#039;. Instanceid is required to save the data but it may be empty when we render the instance edit form (for example, the course is not yet created).&lt;br /&gt;
&lt;br /&gt;
Developer must add custom fields callbacks to the instance edit form. If the instance is &amp;quot;made up&amp;quot; (like in mod_surveybuilder), a new form has to be created with &#039;id&#039; field in it that will refer to the instanceid.&lt;br /&gt;
&lt;br /&gt;
The following callbacks should be used in form definition, definition_after_data, validation and after form submission:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$handler-&amp;gt;instance_form_definition()&lt;br /&gt;
$handler-&amp;gt;instance_form_before_set_data()&lt;br /&gt;
$handler-&amp;gt;instance_form_definition_after_data()&lt;br /&gt;
$handler-&amp;gt;instance_form_validation()&lt;br /&gt;
$handler-&amp;gt;instance_form_save()&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On deletion of an instance or on deletion of the whole item call:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$handler-&amp;gt;delete_instance()&lt;br /&gt;
$handler-&amp;gt;delete_all()&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Retrieving instances custom fields ===&lt;br /&gt;
&lt;br /&gt;
How custom fields are used depends entirely on the situation. The following handler methods will help you to retrieve custom fields values for the given instance(s):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$handler-&amp;gt;export_instance_data()&lt;br /&gt;
$handler-&amp;gt;export_instance_data_object()&lt;br /&gt;
$handler-&amp;gt;display_custom_fields_data()&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Additional methods for advanced usage:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$handler-&amp;gt;get_instance_data()&lt;br /&gt;
$handler-&amp;gt;get_instances_data()&lt;br /&gt;
$handler-&amp;gt;get_instance_data_for_backup()&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Method restore_instance_data_from_backup() exists in the handler class but not implemented&lt;br /&gt;
&lt;br /&gt;
To retrieve the list of custom fields used in the given component/area/itemid you can use:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$handler-&amp;gt;get_categories_with_fields()&lt;br /&gt;
$handler-&amp;gt;get_fields()&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
List of fields is cached in the handler and these two functions can be called multiple times.&lt;br /&gt;
&lt;br /&gt;
=== Privacy API ===&lt;br /&gt;
&lt;br /&gt;
Custom fields API does not export or delete any data because it does not know how custom fields are used, what data is considered user data and if it is considered private or shared data. &lt;br /&gt;
&lt;br /&gt;
Plugins that store user information in custom fields should link subsystem in their get_metadata:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$collection-&amp;gt;link_subsystem(&#039;core_customfield&#039;, &#039;privacy:metadata:customfieldpurpose&#039;);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And they can use the following methods in the export/delete functions:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
use core_customfield\privacy\provider as customfield_provider;&lt;br /&gt;
&lt;br /&gt;
customfield_provider::get_customfields_data_contexts()&lt;br /&gt;
customfield_provider::export_customfields_data()&lt;br /&gt;
customfield_provider::delete_customfields_data()&lt;br /&gt;
customfield_provider::delete_customfields_data_for_context()&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In case when custom fields configuration is considered to be user data (configuration means the definition of the fields, not the instance data), there are also couple of methods to help with privacy API implementations:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
customfield_provider::get_customfields_configuration_contexts()&lt;br /&gt;
customfield_provider::delete_customfields_configuration()&lt;br /&gt;
customfield_provider::delete_customfields_configuration_for_context()&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Export of configuration was not yet implemented at the time of writing this because of difficult implementation and very unclear use case. If it is needed please feel free to contribute to Moodle.&lt;br /&gt;
&lt;br /&gt;
== Custom fields plugins ==&lt;br /&gt;
&lt;br /&gt;
Custom fields plugin type was added to allow implement different types of custom fields (somehow similar to user profile fields plugin type). Plugins are located in &#039;&#039;&#039;/customfield/field/&#039;&#039;&#039; and the full frankenstyle name of the plugins start with &#039;&#039;&#039;customfield_&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Except for common [[Plugin files]] and tests the following classes must be present in customfield plugins (in respective autoloaded locations):&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
namespace customfield_&amp;lt;PLUGINNAME&amp;gt;;&lt;br /&gt;
class field_controller extends \core_customfield\field_controller;&lt;br /&gt;
class data_controller extends \core_customfield\data_controller;&lt;br /&gt;
&lt;br /&gt;
namespace customfield_&amp;lt;PLUGINNAME&amp;gt;\privacy;&lt;br /&gt;
class provider implements \core_privacy\local\metadata\null_provider, \core_customfield\privacy\customfield_provider;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
MDL-64626 - Custom fields API (Moodle 3.7+) implementations and improvements&lt;br /&gt;
&lt;br /&gt;
MDL-57898 - Add custom field types plugin and course custom fields functionality&lt;/div&gt;</summary>
		<author><name>Danielneis</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Writing_PHPUnit_tests&amp;diff=55893</id>
		<title>Writing PHPUnit tests</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Writing_PHPUnit_tests&amp;diff=55893"/>
		<updated>2019-04-11T11:08:03Z</updated>

		<summary type="html">&lt;p&gt;Danielneis: fix typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Moodle 2.3}}&lt;br /&gt;
&lt;br /&gt;
Moodle PHPUnit integration is designed to allow easy adding of new tests. At the start of each test the state is automatically reset to fresh new installation (unless explicitly told not to reset).&lt;br /&gt;
&lt;br /&gt;
=Testcase classes=&lt;br /&gt;
&lt;br /&gt;
There are three basic test class that are supposed to used in all Moodle unit tests - basic_testcase, advanced_testcase and provider_testcase. &#039;&#039;&#039;Please note it is strongly recommended to put only one testcase into each class file.&#039;&#039;&#039;&lt;br /&gt;
;basic_testcase : Very simple tests that do not modify database, dataroot or any PHP globals. It can be used for example when trying examples from the official PHPUnit tutorial.&lt;br /&gt;
;advanced_testcase : Enhanced testcase class enhanced for easy testing of Moodle code.&lt;br /&gt;
;provider_testcase: Enhanced testcase class, enhanced for easy testing of [[Privacy API|Privacy Providers]].&lt;br /&gt;
&lt;br /&gt;
There is a fourth testcase class that is specially designed for testing of our Moodle database layer, it should not be used for other purposes.&lt;br /&gt;
&lt;br /&gt;
== Assertions ==&lt;br /&gt;
&lt;br /&gt;
The complete list of assertions can be found in the [http://www.phpunit.de/manual/3.7/en/appendixes.assertions.html phpunit manual].&lt;br /&gt;
==Sample plugin testcase==&lt;br /&gt;
&lt;br /&gt;
PHPUnit tests are located in &amp;lt;code&amp;gt;tests/*_test.php&amp;lt;/code&amp;gt; files in your plugin, for example mod/myplugin/tests/sample_test.php, the file should contain only one class that extends &amp;lt;code&amp;gt;advanced_testcase&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
 class mod_myplugin_sample_testcase extends advanced_testcase {&lt;br /&gt;
     public function test_adding() {&lt;br /&gt;
         $this-&amp;gt;assertEquals(2, 1+2);&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [[PHPUnit integration#Class and file naming rules]] for more information.&lt;br /&gt;
&lt;br /&gt;
==Inclusion of Moodle library files==&lt;br /&gt;
&lt;br /&gt;
If you want to include some Moodle library files you should always declare &#039;&#039;&#039;global $CFG&#039;&#039;&#039;. The reason is that testcase files may be included from non-moodle code which does not make the global $CFG available automatically.&lt;br /&gt;
&lt;br /&gt;
==Automatic state reset==&lt;br /&gt;
By default after each test Moodle database and dataroot is automatically reset to the original state which was present right after installation. make sure to use $this-&amp;gt;resetAfterTest() to indicate that the database or changes of standard global variables are expected.&lt;br /&gt;
&lt;br /&gt;
If you received the error &amp;quot;Warning: unexpected database modification, resetting DB state&amp;quot; it is because the test is not using $this-&amp;gt;resetAfterTest().&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
 class mod_myplugin_testcase extends advanced_testcase {&lt;br /&gt;
     public function test_deleting() {&lt;br /&gt;
         global $DB;&lt;br /&gt;
         $this-&amp;gt;resetAfterTest(true);&lt;br /&gt;
         $DB-&amp;gt;delete_records(&#039;user&#039;);&lt;br /&gt;
         $this-&amp;gt;assertEmpty($DB-&amp;gt;get_records(&#039;user&#039;));&lt;br /&gt;
     }&lt;br /&gt;
     public function test_user_table_was_reset() {&lt;br /&gt;
         global $DB;&lt;br /&gt;
         $this-&amp;gt;assertEquals(2, $DB-&amp;gt;count_records(&#039;user&#039;, array()));&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Generators=&lt;br /&gt;
&lt;br /&gt;
Tests that need to modify default installation may use generators to create new courses, users, etc. All examples on this page should be used from test methods of a test class derived from advanced_testcase.&lt;br /&gt;
&lt;br /&gt;
Note if you are using PHPUnit [https://phpunit.de/manual/current/en/writing-tests-for-phpunit.html#writing-tests-for-phpunit.data-providers @dataProvider] functions to provide parameters to unit tests, you can not use the data generator or change the user etc in the data provider function.&lt;br /&gt;
&lt;br /&gt;
==Creating users==&lt;br /&gt;
At the start of each test there are only two users present - guest and administrator. If you need to add more test accounts use:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
 $user = $this-&amp;gt;getDataGenerator()-&amp;gt;create_user();&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may also specify properties of the user account, for example:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
 $user1 = $this-&amp;gt;getDataGenerator()-&amp;gt;create_user(array(&#039;email&#039;=&amp;gt;&#039;user1@example.com&#039;, &#039;username&#039;=&amp;gt;&#039;user1&#039;));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By default no user is logged-in, use setUser() method to change current $USER value:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
 $this-&amp;gt;setUser($user1);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Guest and admin accounts have a shortcut methods:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
 $this-&amp;gt;setGuestUser();&lt;br /&gt;
 $this-&amp;gt;setAdminUser();&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Null can be used to set current user back to not-logged-in:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
 $this-&amp;gt;setUser(null);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Creating course categories==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
 $category1 = $this-&amp;gt;getDataGenerator()-&amp;gt;create_category();&lt;br /&gt;
 $category2 = $this-&amp;gt;getDataGenerator()-&amp;gt;create_category(array(&#039;name&#039;=&amp;gt;&#039;Some subcategory&#039;, &#039;parent&#039;=&amp;gt;$category1-&amp;gt;id));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Creating courses==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
 $course1 = $this-&amp;gt;getDataGenerator()-&amp;gt;create_course();&lt;br /&gt;
 &lt;br /&gt;
 $category = $this-&amp;gt;getDataGenerator()-&amp;gt;create_category();&lt;br /&gt;
 $course2 = $this-&amp;gt;getDataGenerator()-&amp;gt;create_course(array(&#039;name&#039;=&amp;gt;&#039;Some course&#039;, &#039;category&#039;=&amp;gt;$category-&amp;gt;id));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Creating activities==&lt;br /&gt;
&lt;br /&gt;
Some activity plugins include instance generators. The generator class are defined in plugindirectory/tests/generator/lib.php.&lt;br /&gt;
&lt;br /&gt;
Example of creation of new course with one page resource:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
 $course = $this-&amp;gt;getDataGenerator()-&amp;gt;create_course();&lt;br /&gt;
 $generator = $this-&amp;gt;getDataGenerator()-&amp;gt;get_plugin_generator(&#039;mod_page&#039;);&lt;br /&gt;
 $generator-&amp;gt;create_instance(array(&#039;course&#039;=&amp;gt;$course-&amp;gt;id));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following is functionally the same, but a bit shorter:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
 $course = $this-&amp;gt;getDataGenerator()-&amp;gt;create_course();&lt;br /&gt;
 $page = $this-&amp;gt;getDataGenerator()-&amp;gt;create_module(&#039;page&#039;, array(&#039;course&#039; =&amp;gt; $course-&amp;gt;id));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Creating cohorts==&lt;br /&gt;
{{Moodle 2.4}}&lt;br /&gt;
Since 2.4 there the data generator supports creation of new cohorts.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
 $cohort = $this-&amp;gt;getDataGenerator()-&amp;gt;create_cohort();&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Simplified user enrolments==&lt;br /&gt;
{{Moodle 2.4}}&lt;br /&gt;
Instead of standard enrolment API it is possible to use simplified method in data generator. It is intended to be used with self and manual enrolment plugins.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$this-&amp;gt;getDataGenerator()-&amp;gt;enrol_user($userid, $courseid);&lt;br /&gt;
$this-&amp;gt;getDataGenerator()-&amp;gt;enrol_user($userid, $courseid, $teacherroleid);&lt;br /&gt;
$this-&amp;gt;getDataGenerator()-&amp;gt;enrol_user($userid, $courseid, $teacherroleid, &#039;manual&#039;);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Creating scales==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$this-&amp;gt;getDataGenerator()-&amp;gt;create_scale();&lt;br /&gt;
$this-&amp;gt;getDataGenerator()-&amp;gt;create_scale(array(&#039;name&#039; =&amp;gt; $name, &#039;scale&#039; =&amp;gt; $scale, &#039;courseid&#039; =&amp;gt; $courseid, &#039;userid&#039; =&amp;gt; $userid, &#039;description&#039; =&amp;gt; description, &#039;descriptionformat&#039; =&amp;gt; $descriptionformat));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Creating roles==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$this-&amp;gt;getDataGenerator()-&amp;gt;create_role();&lt;br /&gt;
$this-&amp;gt;getDataGenerator()-&amp;gt;create_role(array(&#039;shortname&#039; =&amp;gt; $shortname, &#039;name&#039; =&amp;gt; $name, &#039;description&#039; =&amp;gt; description, &#039;archetype&#039; =&amp;gt; $archetype));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Creating tags==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$this-&amp;gt;getDataGenerator()-&amp;gt;create_tag();&lt;br /&gt;
$this-&amp;gt;getDataGenerator()-&amp;gt;create_tag(array(&lt;br /&gt;
    &#039;userid&#039; =&amp;gt; $userid, &lt;br /&gt;
    &#039;rawname&#039; =&amp;gt; $rawname,&lt;br /&gt;
    &#039;name&#039; =&amp;gt; $name, &lt;br /&gt;
    &#039;description&#039; =&amp;gt; $description, &lt;br /&gt;
    &#039;descriptionformat&#039; =&amp;gt; $descriptionformat,&lt;br /&gt;
    &#039;flag&#039; =&amp;gt; $flag&lt;br /&gt;
));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Groups==&lt;br /&gt;
&lt;br /&gt;
===Creating groups===&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$this-&amp;gt;getDataGenerator()-&amp;gt;create_group(array(&#039;courseid&#039; =&amp;gt; $courseid));&lt;br /&gt;
$this-&amp;gt;getDataGenerator()-&amp;gt;create_group(array(&#039;courseid&#039; =&amp;gt; $courseid, &#039;name&#039; =&amp;gt; $name, &#039;description&#039; =&amp;gt; $description, &#039;descriptionformat&#039; =&amp;gt; $descriptionformat));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Adding users to groups===&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$this-&amp;gt;getDataGenerator()-&amp;gt;create_group_member(array(&#039;userid&#039; =&amp;gt; $userid, &#039;groupid&#039; =&amp;gt; $groupid));&lt;br /&gt;
$this-&amp;gt;getDataGenerator()-&amp;gt;create_group_member(array(&#039;userid&#039; =&amp;gt; $userid, &#039;groupid&#039; =&amp;gt; $groupid, &#039;component&#039; =&amp;gt; $component, &#039;itemid&#039; =&amp;gt; $itemid));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Creating groupings===&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$this-&amp;gt;getDataGenerator()-&amp;gt;create_grouping(array(&#039;courseid&#039; =&amp;gt; $courseid));&lt;br /&gt;
$this-&amp;gt;getDataGenerator()-&amp;gt;create_grouping(array(&#039;courseid&#039; =&amp;gt; $courseid, &#039;name&#039; =&amp;gt; $name, &#039;description&#039; =&amp;gt; $description, &#039;descriptionformat&#039; =&amp;gt; $descriptionformat));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Adding groups to groupings===&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$this-&amp;gt;getDataGenerator()-&amp;gt;create_grouping_group(array(&#039;groupingid&#039; =&amp;gt; $groupingid, &#039;groupid&#039; =&amp;gt; $groupid));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Repositories==&lt;br /&gt;
&lt;br /&gt;
===Creating repository instances===&lt;br /&gt;
{{Moodle 2.5}}&lt;br /&gt;
Some respository plugins include instance generators. The generator class are defined in plugindirectory/tests/generator/lib.php..&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$this-&amp;gt;getDataGenerator()-&amp;gt;create_repository($type, $record, $options);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Creating repository types===&lt;br /&gt;
{{Moodle 2.5}}&lt;br /&gt;
Some respository plugins include type generators. The generator class are defined in plugindirectory/tests/generator/lib.php..&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$this-&amp;gt;getDataGenerator()-&amp;gt;create_repository_type($type, $record, $options);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Creating grades==&lt;br /&gt;
&lt;br /&gt;
===Grade categories===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$this-&amp;gt;getDataGenerator()-&amp;gt;create_grade_category(array(&#039;courseid&#039; =&amp;gt; $courseid));&lt;br /&gt;
$this-&amp;gt;getDataGenerator()-&amp;gt;create_grade_category(array(&#039;courseid&#039; =&amp;gt; $courseid, &#039;fullname&#039; =&amp;gt; $fullname));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Grade items===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$this-&amp;gt;getDataGenerator()-&amp;gt;create_grade_item();&lt;br /&gt;
$this-&amp;gt;getDataGenerator()-&amp;gt;create_grade_item(array(&#039;itemtype&#039; =&amp;gt; $itemtype, &#039;itemname&#039; =&amp;gt; $itemname, &#039;outcomeid&#039; =&amp;gt; $outcomeid, &#039;scaleid&#039; =&amp;gt; $scaleid, &#039;gradetype&#039; =&amp;gt; $gradetype));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Outcomes===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$this-&amp;gt;getDataGenerator()-&amp;gt;create_grade_outcome();&lt;br /&gt;
$this-&amp;gt;getDataGenerator()-&amp;gt;create_grade_item(array(&#039;fullname&#039; =&amp;gt; $fullname));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Other types of plugin==&lt;br /&gt;
{{Moodle 2.5}}&lt;br /&gt;
Any other type of plugin can have a generator. The generator class should extend component_generator_base, and then you can get an instance using $mygenerator = $this-&amp;gt;getDataGenerator()-&amp;gt;get_plugin_generator($frankenstylecomponentname);&lt;br /&gt;
&lt;br /&gt;
For some types of plugin, like mod documented above, there may be a more specific class than component_generator_base to extend, like testing_module_generator. That will give a consistent set of method names to use. Otherwise, you can create whatever methods you like on your generator, to create the different things you need to work whith.&lt;br /&gt;
&lt;br /&gt;
=Long tests=&lt;br /&gt;
&lt;br /&gt;
All standard test should execute as fast as possible. Tests that take a loner time to execute (&amp;gt;10s) or are otherwise expensive (such as querying external servers that might be flooded by all dev machines) should be execute only when PHPUNIT_LONGTEST is true. This constant can be set in phpunit.xml or directly in config.php.&lt;br /&gt;
&lt;br /&gt;
=Large test data=&lt;br /&gt;
See advanced_testcase::createXMLDataSet() and advanced_testcase::createCsvDataSet() and related functions there for easier ways to manage large test data sets within files rather than arrays in code. See [[PHPUnit_integration#Extra_methods]]&lt;br /&gt;
&lt;br /&gt;
=Testing sending of messages=&lt;br /&gt;
{{Moodle 2.4}}&lt;br /&gt;
You can temporarily redirect all messages sent via message_send() to a message sink object. This allows developers to verify that the tested code is sending expected messages.&lt;br /&gt;
&lt;br /&gt;
To test code using messaging first disable the use of transactions and then redirect the messaging into a new message sink, you can inspect the results later.&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$this-&amp;gt;preventResetByRollback();&lt;br /&gt;
$sink = $this-&amp;gt;redirectMessages();&lt;br /&gt;
//... code that is sending messages&lt;br /&gt;
$messages = $sink-&amp;gt;get_messages();&lt;br /&gt;
$this-&amp;gt;assertEquals(3, count($messages));&lt;br /&gt;
//.. test messages were generated in correct order with appropriate content&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Testing sending of emails=&lt;br /&gt;
{{Moodle 2.6}}&lt;br /&gt;
You can temporarily redirect emails sent via email_to_user() to a email message sink object. This allows developers to verify that the tested code is sending expected emails.&lt;br /&gt;
&lt;br /&gt;
To test code using messaging first unset &#039;noemailever&#039; setting and then redirect the emails into a new message sink where you can inspect the results later.&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
unset_config(&#039;noemailever&#039;);&lt;br /&gt;
$sink = $this-&amp;gt;redirectEmails();&lt;br /&gt;
//... code that is sending email&lt;br /&gt;
$messages = $sink-&amp;gt;get_messages();&lt;br /&gt;
$this-&amp;gt;assertEquals(1, count($messages));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Logstores=&lt;br /&gt;
You can test events which were written to a logstore, but you must disable transactions, enable at least one valid logstore, and disable logstore buffering to ensure that the events are written to the database before the tests execute.&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$this-&amp;gt;preventResetByRollback();&lt;br /&gt;
set_config(&#039;enabled_stores&#039;, &#039;logstore_standard&#039;, &#039;tool_log&#039;);&lt;br /&gt;
set_config(&#039;buffersize&#039;, 0, &#039;logstore_standard&#039;);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Best practice=&lt;br /&gt;
&lt;br /&gt;
There are several best practices, suggestions, and things to avoid which you should consider when writing unit tests. Some of these are described below.&lt;br /&gt;
&lt;br /&gt;
==Keep use of resetAfterTest to a minimum==&lt;br /&gt;
Although many of the examples described above use the &amp;lt;code&amp;gt;resetAfterTest&amp;lt;/code&amp;gt; nomenclature to reset the database and filesystem after your test completes, you should ideally not use this unless you have to.&lt;br /&gt;
Generally speaking you should aim to write code which is mockable, and does not require real fixtures.&lt;br /&gt;
Use of resetAfterTest will also slow your tests down.&lt;br /&gt;
&lt;br /&gt;
==Be careful with shared setUp and instance variables== &lt;br /&gt;
&lt;br /&gt;
You should be careful of how you create and use instance variables in PHPUnit tests for two main reasons:&lt;br /&gt;
&lt;br /&gt;
Firstly, if you create any fixtures in the setUp, or call the resetAfterTest function, these fixtures and conditions will apply for _all_ tests in the testsuite.&lt;br /&gt;
You will not be able to add another test to the suite which does not require these conditions without those conditions being fulfilled anyway.&lt;br /&gt;
This can lead to slow tests.&lt;br /&gt;
&lt;br /&gt;
Secondly, because of the way in which PHPUnit operates. it creates an instance of each testcase during its bootstrap phase. These are stored in memory until the _entire suite_ completes.&lt;br /&gt;
This means that any fixture which is setup and not actively discarded will not be garbage collected and lead to memory bloat.&lt;br /&gt;
In severe cases this can lead to memory exhaustion.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Make use of the dataProvider functionality==&lt;br /&gt;
&lt;br /&gt;
The dataProvider functionality of PHPUnit is an extremely powerful and useful feature which allows you to verify a function quickly and easily with a range of different conditions.&lt;br /&gt;
However, the following rules should be followed when using dataProviders:&lt;br /&gt;
* Keep addition of resettable data requring resetAfterTest to a minimum - this will lead to many slow tests&lt;br /&gt;
* You can only _describe_ data in a dataProvider, you cannot create the data. The dataProvider is called after the testSuite is instantiated, but before any tests are run. Each test will run a full setUp and tearDown, which will destroy any data which was created.&lt;br /&gt;
=Extra test settings=&lt;br /&gt;
&lt;br /&gt;
Usually the test should not interact with any external systems and it should work the same on all systems. But sometimes you need to specify some option for connection to external systems or system configuration. It is intentionally not possible to use $CFG settings from config.php.&lt;br /&gt;
&lt;br /&gt;
There are several ways how to inject your custom settings:&lt;br /&gt;
* define test setting constants in your phpunit.xml file&lt;br /&gt;
* define test setting constants in your config.php&lt;br /&gt;
&lt;br /&gt;
These constants may be then used in your test or plugin code.&lt;br /&gt;
&lt;br /&gt;
=Upgrading unit tests to work with Moodle 3.7 and up (PHPUnit 7.5)=&lt;br /&gt;
{{Moodle 3.7}}&lt;br /&gt;
&lt;br /&gt;
With Moodle 3.7, &#039;&#039;&#039;PHPUnit was upgraded to 7.5&#039;&#039;&#039; (from 6.x being used in older version). This was done to better align the testing environment with PHP versions supported by Moodle 3.7 (7.1, 7.2 and 7.3). (see MDL-65204 and linked issues for more details). While internally [https://phpunit.de/announcements/phpunit-7.html a lot of things changed with PHPUnit 7] (PHP 7.1-isms, typed signatures, void returns, assertEquals() changes), thanks to our &#039;&#039;&#039;wrapping layer&#039;&#039;&#039; (basic and advanced testcases...) impact expected into old existing unit tests is expected to be reduced and upgrades, easy to achieve.&lt;br /&gt;
&lt;br /&gt;
To find more information about the changes coming with PHPUnit 7, it&#039;s recommended to read the following resources:&lt;br /&gt;
* [https://phpunit.de/announcements/phpunit-7.html  PHPUnit 7 release Announcement].&lt;br /&gt;
* [https://github.com/sebastianbergmann/phpunit/blob/7.5/ChangeLog-7.5.md Detailed changelog of the release], paying special attention to the added, deprecated, changed and deleted sections.&lt;br /&gt;
* [https://phpunit.readthedocs.io/en/7.5/ Official PHPUnit manual].&lt;br /&gt;
* Changes performed into core, mainly: new, stricter, signatures ([https://github.com/moodle/moodle/commit/26218b7 26218b7]) and assertEquals() changes, specially important when comparing strings, now performed using strict (===) equals ([https://github.com/moodle/moodle/commit/85f47ba 85f47ba]).&lt;br /&gt;
&lt;br /&gt;
=Upgrading unit tests to work with Moodle 3.4 and up (PHPUnit 6)=&lt;br /&gt;
{{Moodle 3.4}}&lt;br /&gt;
&lt;br /&gt;
With Moodle 3.4, &#039;&#039;&#039;PHPUnit was upgraded to 6.4&#039;&#039;&#039; (from 5.5 being used in older version). This was done to better align the testing environment with PHP versions supported by Moodle 3.4 (7.0, 7.1 and 7.2). (see MDL-60611 and linked issues for more details). While internally [https://github.com/sebastianbergmann/phpunit/wiki/Release-Announcement-for-PHPUnit-6.0.0#backwards-compatibility-issues a lot of things changed with PHPUnit 6] (namespaced classes being the more noticeable), thanks to our &#039;&#039;&#039;wrapping layer&#039;&#039;&#039; (basic and advanced testcases...) impact expected into old existing unit tests is expected to be reduced and upgrades, easy to achieve.&lt;br /&gt;
&lt;br /&gt;
Still, in &#039;&#039;&#039;some cases, it will impossible to maintain compatibility&#039;&#039;&#039; of tests between old (pre 3.4) tests and new ones, especially &#039;&#039;&#039;when direct use of any phpunit class is performed&#039;&#039;&#039;. Luckily, both travis and CI tests will detect this situation and it shouldn&#039;t be hard to keep all supported branches in core passing ok. Plugins may be trickier, if the same branch is attempting to work against multiple core branches and they are using some phpunit class directly.&lt;br /&gt;
&lt;br /&gt;
To find more information about the changes coming with PHPUnit 6, it&#039;s recommended to read the following resources:&lt;br /&gt;
* [https://thephp.cc/news/2017/02/migrating-to-phpunit-6 A very good mini-guide] showing all the important changes.&lt;br /&gt;
* [https://github.com/sebastianbergmann/phpunit/wiki/Release-Announcement-for-PHPUnit-6.0.0#backwards-compatibility-issues PHPUnit 6 release Announcement].&lt;br /&gt;
* [https://github.com/sebastianbergmann/phpunit/blob/6.0/ChangeLog-6.0.md#600---2017-02-03 Detailed changelog of the release], paying special attention to the changed and deleted sections.&lt;br /&gt;
* Changes performed into core, mainly: namespace class renaming ([https://github.com/moodle/moodle/commit/801a372dadb6e11c8781547603e3f0a59ce5638f 801a372]) and deprecated stuff ([https://github.com/moodle/moodle/commit/796e48a58bf18533bdca423fff7949ab119101c4 796e48a])&lt;br /&gt;
&lt;br /&gt;
=See also=&lt;br /&gt;
* [[PHPUnit integration]]&lt;br /&gt;
* [[PHPUnit]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Unit testing]]&lt;/div&gt;</summary>
		<author><name>Danielneis</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Access_API&amp;diff=55750</id>
		<title>Access API</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Access_API&amp;diff=55750"/>
		<updated>2019-03-15T17:11:32Z</updated>

		<summary type="html">&lt;p&gt;Danielneis: /* Context fetching */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Moodle_2.2}}The Access API gives you functions so you can determine what the current user is allowed to do. It also allows modules to extend Moodle with new capabilities. &lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
Moodle is using a role based access control model. Most entities in Moodle (system, users, course categories, courses, modules and blocks) are represented by contexts that are arranged in a tree like hierarchy called context tree. Role is a set of capability definitions, each capability usually represents an ability of user to do something. Roles are defined at the top most system context level. Role definitions can be overridden at lower context levels. User access control is calculated from the definitions of roles assigned to users.&lt;br /&gt;
&lt;br /&gt;
All users that did not log-in yet automatically get the default role defined in $CFG-&amp;gt;notloggedinroleid, it is not possible to assign any other role to this non-existent user id. There is one special guest user account that is used when user logs in using the guest login button or when guest autologin is enabled. Again you can not assign any roles to the guest account directly, this account gets the $CFG-&amp;gt;guestroleid automatically. All other authenticated users get the default user role specified in $CFG-&amp;gt;defaultuserroleid and in the frontpage context the role specified in $CFG-&amp;gt;defaultfrontpageroleid.&lt;br /&gt;
&lt;br /&gt;
==How to define new capabilities in plugins==&lt;br /&gt;
&lt;br /&gt;
Capabilities are defined by $capabilities array defined in db/access.php files. The name of the capability consists of &amp;quot;plugintype/pluginname:capabilityname&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
 $capabilities = array(&lt;br /&gt;
    &#039;mod/folder:managefiles&#039; =&amp;gt; array(&lt;br /&gt;
        &#039;riskbitmask&#039; =&amp;gt; RISK_SPAM,&lt;br /&gt;
        &#039;captype&#039; =&amp;gt; &#039;write&#039;,&lt;br /&gt;
        &#039;contextlevel&#039; =&amp;gt; CONTEXT_MODULE,&lt;br /&gt;
        &#039;archetypes&#039; =&amp;gt; array(&lt;br /&gt;
            &#039;editingteacher&#039; =&amp;gt; CAP_ALLOW&lt;br /&gt;
        )&lt;br /&gt;
    ),&lt;br /&gt;
 );&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where the meaning of array keys is:&lt;br /&gt;
* riskbitmask - associated risks. These are explained on [[Hardening new Roles system]].&lt;br /&gt;
* captype - &#039;&#039;read&#039;&#039; or &#039;&#039;write&#039;&#039; capability type, for security reasons system prevents all write capabilities for guest account and not-logged-in users&lt;br /&gt;
* contextlevel - specified as context level constant. Declares the typical context level where this capability is checked. This capability can be checked with contexts that are at a lower level (e.g. &#039;moodle/site:accessallgroups&#039; - could be checked with CONTEXT_MODULE).&lt;br /&gt;
* archetypes - specifies defaults for roles with standard archetypes, this is used in installs, upgrades and when resetting roles (it is recommended to use only CAP_ALLOW here).  Archetypes are defined in mdl_role table.  See also [[Role archetypes]].&lt;br /&gt;
* clonepermissionsfrom - when you are adding a new capability, you can tell Moodle to copy the permissions for each role from the current settings for another capabilty. This may give better defaults than just using archetypes for administrators who have heavily customised their roles configuration. The full syntax is: &amp;lt;tt&amp;gt;&#039;clonepermissionsfrom&#039; =&amp;gt; &#039;moodle/quiz:attempt&#039;,&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &#039;&#039;In releases before May 2012 clonepermissionsfrom works only inside individual plugins or only in core, in later releases plugins may also clone permissions from core, success of other cloning operations depends on upgrade order.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It is necessary to bump up plugin version number after any change in db/access.php, so that the upgrade scripts can make the necessary changes to the database.  To run the upgrade scripts, log in to Moodle as administrator, navigate to the site home page, and follow the instructions.  (If you need to test the upgrade script without changing the plugin version, it is also possible to set back the version number in the mdl_block or mdl_modules table in the database.)&lt;br /&gt;
&lt;br /&gt;
The capability names are defined in plugin language files, the name of the string consists of &amp;quot;pluginname:capabilityname&amp;quot;, in the example above it would be:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$string[&#039;folder:managefiles&#039;] = &#039;Manage files in folder module&#039;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Useful functions and classes==&lt;br /&gt;
&lt;br /&gt;
===Context fetching===&lt;br /&gt;
&lt;br /&gt;
In plugins context instances are usually only instantiated because they are instantiated and deleted automatically by the system.&lt;br /&gt;
&lt;br /&gt;
Fetching by object id:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$systemcontext = context_system::instance();&lt;br /&gt;
$usercontext = context_user::instance($user-&amp;gt;id);&lt;br /&gt;
$categorycontext = context_coursecat::instance($category-&amp;gt;id);&lt;br /&gt;
$coursecontext = context_course::instance($course-&amp;gt;id);&lt;br /&gt;
$contextmodule = context_module::instance($cm-&amp;gt;id);&lt;br /&gt;
$contextblock = context_block::instance($this-&amp;gt;instance-&amp;gt;id);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fetching by context id:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$context = context::instance_by_id($contextid);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* by default exception is thrown if context can not be created&lt;br /&gt;
* deleted users do not have contexts any more&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are multiple deprecated context related functions since 2.2, it is not necessary to replace them immediately. The following two functions are equivalent to the context fetching examples above:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
function get_context_instance($contextlevel, $instance = 0, $strictness = IGNORE_MISSING)&lt;br /&gt;
function get_context_instance_by_id($id, $strictness = IGNORE_MISSING)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Determining that a user has a given capability===&lt;br /&gt;
&lt;br /&gt;
When implementing access control always ask &amp;quot;Does the user have capability to do something?&amp;quot;. It is incorrect to ask &amp;quot;Does the user have a role somewhere?&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====has_capability()====&lt;br /&gt;
has_capability() is the most important function:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
 function has_capability($capability, context $context, $user = null, $doanything = true)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check whether a user has a particular capability in a given context. For example:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$context = context_module::instance($cm-&amp;gt;id);&lt;br /&gt;
has_capability(&#039;mod/folder:managefiles&#039;, $context)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By default checks the capabilities of the current user, but you can pass a different userid. By default will return true for admin users, it is not recommended to use false here.&lt;br /&gt;
&lt;br /&gt;
====require_capability()====&lt;br /&gt;
Function require_capability() is very similar, it is throwing access control exception if user does not have the capability.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
function require_capability($capability, context $context, $userid = null, $doanything = true, $errormessage = &#039;nopermissions&#039;, $stringfile = &#039;&#039;) {&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Enrolment functions===&lt;br /&gt;
&lt;br /&gt;
See [[Enrolment API]].&lt;br /&gt;
&lt;br /&gt;
===Other related functions===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
 function require_login($courseorid = NULL, $autologinguest = true, $cm = NULL, $setwantsurltome = true, $preventredirect = false)&lt;br /&gt;
 function require_course_login($courseorid, $autologinguest = true, $cm = NULL, $setwantsurltome = true, $preventredirect = false)&lt;br /&gt;
 function get_users_by_capability(context $context, $capability, $fields = &#039;&#039;, $sort = &#039;&#039;, $limitfrom = &#039;&#039;, $limitnum = &#039;&#039;,&lt;br /&gt;
                                  $groups = &#039;&#039;, $exceptions = &#039;&#039;, $doanything_ignored = null, $view_ignored = null, $useviewallgroups = false)&lt;br /&gt;
 function isguestuser($user = null)&lt;br /&gt;
 function isloggedin()&lt;br /&gt;
 function is_siteadmin($user_or_id = null)&lt;br /&gt;
 function is_guest(context $context, $user = null)&lt;br /&gt;
 function is_viewing(context $context, $user = null, $withcapability = &#039;&#039;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====require_login()====&lt;br /&gt;
&lt;br /&gt;
Each plugin script should include require_login() or require_course_login() after setting up PAGE-&amp;gt;url.&lt;br /&gt;
&lt;br /&gt;
This function does following:&lt;br /&gt;
* it verifies that user is logged in before accessing any course or activities (not-logged-in users can not enter any courses).&lt;br /&gt;
* user is logged in as gu&lt;br /&gt;
* verify access to hidden courses and activities&lt;br /&gt;
* if an activity is specified, verify any [[Availability API|availability restrictions]] for the activity&lt;br /&gt;
* verify that user is either enrolled or has capability &#039;moodle/course:view&#039; or some enrol plugin gives them temporary guest access&lt;br /&gt;
* logs access to courses&lt;br /&gt;
&lt;br /&gt;
====require_course_login()====&lt;br /&gt;
&lt;br /&gt;
This function is supposed to be used only in activities that want to allow read access to content on the frontpage without logging-in. For example view resource files, reading of glossary  entries, etc.&lt;br /&gt;
&lt;br /&gt;
====isguestuser(), isloggedin() and is_siteadmin()====&lt;br /&gt;
&lt;br /&gt;
These function were previously needed for limiting of access of special accounts. It is usually not necessary any more, because any &#039;&#039;&#039;write&#039;&#039;&#039; or &#039;&#039;&#039;risky&#039;&#039;&#039; capabilities are now automatically prevented in has_capability().&lt;br /&gt;
&lt;br /&gt;
It is strongly discouraged to use is_siteadmin() in activity modules, please use standard capabilities and enrolment status instead.&lt;br /&gt;
&lt;br /&gt;
====is_guest(), is_viewing() and is_enrolled()====&lt;br /&gt;
&lt;br /&gt;
In order to access course data one of these functions must return true for user:&lt;br /&gt;
* is_enrolled() - user has active record in user_enrolments table&lt;br /&gt;
* is_viewing() - user has &#039;moodle/course:view&#039; capability (may access course, but is not considered to be participant)&lt;br /&gt;
* is_guest() - user was given temporary guest access by some enrolment plugin&lt;br /&gt;
&lt;br /&gt;
====get_users_by_capability()====&lt;br /&gt;
&lt;br /&gt;
This method returns list of users with given capability, it ignores enrolment status and should be used only above the course context.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Core APIs]]&lt;br /&gt;
* [[Roles]]&lt;br /&gt;
* [[Role archetypes]]&lt;br /&gt;
* [[Hardening new Roles system]]&lt;br /&gt;
* [[Roles and modules]]&lt;br /&gt;
* [[NEWMODULE Adding capabilities]]&lt;br /&gt;
* [[New permissions evaluation in 2.0]]&lt;br /&gt;
* [https://moodle.org/mod/forum/discuss.php?d=257611 (Forums) How to check if current user is student?]&lt;br /&gt;
&lt;br /&gt;
[[Category:API]]&lt;/div&gt;</summary>
		<author><name>Danielneis</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=PHPUnit&amp;diff=54825</id>
		<title>PHPUnit</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=PHPUnit&amp;diff=54825"/>
		<updated>2018-09-24T18:19:01Z</updated>

		<summary type="html">&lt;p&gt;Danielneis: /* Running a single test quickly */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Moodle 2.3}}&lt;br /&gt;
&lt;br /&gt;
=What is PHPUnit=&lt;br /&gt;
PHPUnit by Sebastian Bergmann is an advanced unit testing framework for PHP. It is installed as Composer dependency and is not part of Moodle installation. To run PHPUnit tests, you have to manually install it on your development computer or test server.&lt;br /&gt;
&lt;br /&gt;
Read the excellent guide at&lt;br /&gt;
* [http://phpunit.de/manual/current/en/index.html PHPUnit Manual]&lt;br /&gt;
&lt;br /&gt;
=Installation of PHPUnit via Composer=&lt;br /&gt;
&lt;br /&gt;
* Install Composer&lt;br /&gt;
&lt;br /&gt;
Instructions for installing composer on all platforms are here: https://getcomposer.org/download/&lt;br /&gt;
&lt;br /&gt;
Install the composer.phar file to your moodle folder.&lt;br /&gt;
&lt;br /&gt;
* Execute Composer installer&lt;br /&gt;
&lt;br /&gt;
 cd /your/moodle/dirroot&lt;br /&gt;
&lt;br /&gt;
 php composer.phar install&lt;br /&gt;
&lt;br /&gt;
(If that gives you connection problems try...)&lt;br /&gt;
&lt;br /&gt;
 php composer.phar install --prefer-source&lt;br /&gt;
&lt;br /&gt;
Troubleshooting:&lt;br /&gt;
* On Windows if you are behind a proxy you will need to setup an environment variable called HTTP_PROXY with a value detailing your HTTP Proxy address and port before composer will correctly download files.&lt;br /&gt;
* You may be prompted for github credentials when installing composer dependencies.&lt;br /&gt;
** This is used to generate an personal access token to avoid being rate limited by github.&lt;br /&gt;
** If you have Two Factor Authentication enabled on your github account, or do not wish to supply your own credentials you will need to generate a token manually:&lt;br /&gt;
*** Visit https://github.com/settings/applications and request personal access token&lt;br /&gt;
*** Copy this token and add it to your [https://gist.github.com/andrewnicols/c5377ed25a9df1006ce1 ~/.composer/config.json]&lt;br /&gt;
** ( See [https://github.com/composer/composer/issues/2280 composer issue #2280] for further details of this bug.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Detailed instructions:&lt;br /&gt;
* [http://getcomposer.org/doc/00-intro.md Composer documentation]&lt;br /&gt;
&lt;br /&gt;
Detailed instructions:&lt;br /&gt;
* [[PHPUnit installation in Windows]]&lt;br /&gt;
* [[PHPUnit installation in OS X]]&lt;br /&gt;
&lt;br /&gt;
== Uninstalling previous PEAR based version ==&lt;br /&gt;
&lt;br /&gt;
Before using composer, this page used to suggest to install phpunit via PEAR. If you did so, you may wish to uninstall that package now. This should work:&lt;br /&gt;
&lt;br /&gt;
   $ pear uninstall phpunit/DbUnit&lt;br /&gt;
   $ pear uninstall phpunit/PHPUnit&lt;br /&gt;
&lt;br /&gt;
=Initialisation of test environment=&lt;br /&gt;
&lt;br /&gt;
Our PHPUnit integration requires a dedicated database and dataroot.  First, add a new dataroot directory and prefix into your config.php, you can find examples in config-dist.php (scroll down to &#039;Section 9&#039;).&lt;br /&gt;
&lt;br /&gt;
 $CFG-&amp;gt;phpunit_prefix = &#039;phpu_&#039;;&lt;br /&gt;
 $CFG-&amp;gt;phpunit_dataroot = &#039;/home/example/phpu_moodledata&#039;;&lt;br /&gt;
&lt;br /&gt;
Some PHPUnit tests require a live internet connection. If your system does not have a direct connection to the Internet, you also need to specify your proxy in config.php - even though you normally specify it by using the admin settings user interface. (If you do not use a proxy, you can skip this step.) Check the settings on the relevant admin settings page, or from the mdl_config table in your database, if you are unsure of the correct values.&lt;br /&gt;
 &lt;br /&gt;
 // Normal proxy settings&lt;br /&gt;
 $CFG-&amp;gt;proxyhost = &#039;wwwcache.example.org&#039;;&lt;br /&gt;
 $CFG-&amp;gt;proxyport = 80;&lt;br /&gt;
 $CFG-&amp;gt;proxytype = &#039;HTTP&#039;;&lt;br /&gt;
 $CFG-&amp;gt;proxybypass = &#039;localhost, 127.0.0.1, .example.org&#039;;&lt;br /&gt;
 // Omit the next lines if your proxy doesn&#039;t need a username/password:&lt;br /&gt;
 $CFG-&amp;gt;proxyuser = &#039;systemusername&#039;;&lt;br /&gt;
 $CFG-&amp;gt;proxypassword = &#039;systempassword&#039;;&lt;br /&gt;
&lt;br /&gt;
From Moodle 2.8.5 onwards, you can also provide specific database settings for unit testing (if these are not provided, the standard database settings will be used):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$CFG-&amp;gt;phpunit_dbtype    = &#039;pgsql&#039;;      // &#039;pgsql&#039;, &#039;mariadb&#039;, &#039;mysqli&#039;, &#039;mssql&#039;, &#039;sqlsrv&#039; or &#039;oci&#039;&lt;br /&gt;
$CFG-&amp;gt;phpunit_dblibrary = &#039;native&#039;;     // &#039;native&#039; only at the moment&lt;br /&gt;
$CFG-&amp;gt;phpunit_dbhost    = &#039;127.0.0.1&#039;;  // eg &#039;localhost&#039; or &#039;db.isp.com&#039; or IP&lt;br /&gt;
$CFG-&amp;gt;phpunit_dbname    = &#039;mytestdb&#039;;     // database name, eg moodle&lt;br /&gt;
$CFG-&amp;gt;phpunit_dbuser    = &#039;postgres&#039;;   // your database username&lt;br /&gt;
$CFG-&amp;gt;phpunit_dbpass    = &#039;some_password&#039;;   // your database password&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you need to initialise the test environment using following command.&lt;br /&gt;
&lt;br /&gt;
 cd /home/example/moodle&lt;br /&gt;
 php admin/tool/phpunit/cli/init.php&lt;br /&gt;
&lt;br /&gt;
This command has to be repeated after any upgrade, plugin (un)installation or if you have added tests to a plugin you are developing:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; make sure that your php cli executable (or the one you want to use) is correctly on your path as the individual init scripts will call it repeatedly. Also, ensure en_AU locale is installed on your server.&lt;br /&gt;
&lt;br /&gt;
== LDAP ==&lt;br /&gt;
If you want to run LDAP unit tests you must have a working, configured LDAP environment on your test server. There must be a basic LDAP tree structure in place or tests will fail with &amp;quot;Search: No such object&amp;quot;. Build an LDAP tree structure in a new shell prompt:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ldapadd -H ldap://127.0.0.1 -D &amp;quot;cn=admin,dc=yourcomputer,dc=local&amp;quot; -W&lt;br /&gt;
dn:dc=yourcomputer,dc=local&lt;br /&gt;
objectClass:dcObject&lt;br /&gt;
objectClass:organizationalUnit&lt;br /&gt;
dc:yourcomputer&lt;br /&gt;
ou:YOURCOMPUTER&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In config.php tell Moodle where to look for your test LDAP environment:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Constants for auth/ldap tests.&lt;br /&gt;
define(&#039;TEST_AUTH_LDAP_HOST_URL&#039;, &#039;ldap://127.0.0.1&#039;);&lt;br /&gt;
define(&#039;TEST_AUTH_LDAP_BIND_DN&#039;, &#039;cn=admin,dc=yourcomputer,dc=local&#039;);&lt;br /&gt;
define(&#039;TEST_AUTH_LDAP_BIND_PW&#039;, &#039;*&#039;);&lt;br /&gt;
define(&#039;TEST_AUTH_LDAP_DOMAIN&#039;, &#039;dc=yourcomputer,dc=local&#039;);&lt;br /&gt;
&lt;br /&gt;
// Constants for enrol/ldap tests.&lt;br /&gt;
define(&#039;TEST_ENROL_LDAP_HOST_URL&#039;, &#039;ldap://127.0.0.1&#039;);&lt;br /&gt;
define(&#039;TEST_ENROL_LDAP_BIND_DN&#039;, &#039;cn=admin,dc=yourcomputer,dc=local&#039;);&lt;br /&gt;
define(&#039;TEST_ENROL_LDAP_BIND_PW&#039;, &#039;*&#039;);&lt;br /&gt;
define(&#039;TEST_ENROL_LDAP_DOMAIN&#039;, &#039;dc=yourcomputer,dc=local&#039;);&lt;br /&gt;
&lt;br /&gt;
// Constants for lib/ldap tests.&lt;br /&gt;
define(&#039;TEST_LDAPLIB_HOST_URL&#039;, &#039;ldap://127.0.0.1&#039;);&lt;br /&gt;
define(&#039;TEST_LDAPLIB_BIND_DN&#039;, &#039;cn=admin,dc=yourcomputer,dc=local&#039;);&lt;br /&gt;
define(&#039;TEST_LDAPLIB_BIND_PW&#039;, &#039;*&#039;);&lt;br /&gt;
define(&#039;TEST_LDAPLIB_DOMAIN&#039;, &#039;dc=yourcomputer,dc=local&#039;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Test execution=&lt;br /&gt;
&lt;br /&gt;
To execute all test suites from main configuration file execute the &amp;lt;code&amp;gt;vendor/bin/phpunit&amp;lt;/code&amp;gt; script from your &amp;lt;code&amp;gt;$CFG-&amp;gt;dirroot&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
 cd /home/example/moodle&lt;br /&gt;
 vendor/bin/phpunit&lt;br /&gt;
&lt;br /&gt;
The rest of examples uses &amp;lt;code&amp;gt;phpunit&amp;lt;/code&amp;gt;, please substitute it with &amp;lt;code&amp;gt;vendor/bin/phpunit&amp;lt;/code&amp;gt; or create a shortcut in your dirroot.&lt;br /&gt;
&lt;br /&gt;
In IDEs, you may need to specify the path to the PHPUnit configuration file. Use the absolute path to &amp;lt;code&amp;gt;phpunit.xml&amp;lt;/code&amp;gt; from your &amp;lt;code&amp;gt;$CFG-&amp;gt;dirroot&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There is an alternative script for running of tests via web interface: &amp;lt;code&amp;gt;admin/tool/phpunit/webrunner.php&amp;lt;/code&amp;gt;. Use this as the last resort only when you cannot use the command-line interface on your test server. It will most probably break due to permissions problems if you try to execute it both from command-line and from webrunner. This feature is not officially supported.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===How to run only some tests===&lt;br /&gt;
&lt;br /&gt;
==== Running a single test quickly ====&lt;br /&gt;
&lt;br /&gt;
The fastest way to run a single test is:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code php&amp;gt;&lt;br /&gt;
vendor/bin/phpunit my_test_class_name my/tests/filename.php&amp;lt;/code&amp;gt;&lt;br /&gt;
so, run this command in the CLI to see a real test in action:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
vendor/bin/phpunit core_cohort_cohortlib_testcase cohort/tests/cohortlib_test.php&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also run a single test method inside a class:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
vendor/bin/phpunit --filter methodName ClassName path/to/file.php&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is faster than other methods because it avoids the need to search for the test file, but you should be careful because it may be possible to run tests this way which are not included in the normal run. If you use this method, do at least one full test run (or --group run, as below) to ensure the test can be found.&lt;br /&gt;
&lt;br /&gt;
Please note the path name is optional if the testcase class and file names are standardised as described in [[Writing PHPUnit tests]].&lt;br /&gt;
&lt;br /&gt;
==== Using the @group annotation ====&lt;br /&gt;
&lt;br /&gt;
If you add annotations like&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
/**&lt;br /&gt;
 * Unit tests for {@link stack_cas_keyval}.&lt;br /&gt;
 * @group qtype_stack&lt;br /&gt;
 */&lt;br /&gt;
class qtype_stack_cas_keyval_exception_testcase extends basic_testcase {&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to all the classes in your plugin, then you can run just the tests for your plugin by doing&lt;br /&gt;
&lt;br /&gt;
 phpunit --group qtype_stack&lt;br /&gt;
&lt;br /&gt;
Therefore, it is suggested that you annotate all your tests with the Frankenstyle name of your plugin.&lt;br /&gt;
&lt;br /&gt;
==== Using multiple phpunit.xml files ====&lt;br /&gt;
&lt;br /&gt;
It&#039;s easy to create alternative phpunit.xml files defining which tests must be run together. For reference, take a look to the default /phpunit.xml available in your base directory once the testing environment has been initialised. After creating the custom file you will be able to run those tests with&lt;br /&gt;
&lt;br /&gt;
 vendor/bin/phpunit -c path/to/your/alternative/phpunit/file.xml&lt;br /&gt;
&lt;br /&gt;
Also, for commodity, you can use this command:&lt;br /&gt;
&lt;br /&gt;
 php admin/tool/phpunit/cli/util.php --buildcomponentconfigs&lt;br /&gt;
&lt;br /&gt;
It will, automatically, create one valid phpunit.xml file within each component (plugin or subsystem) and other important directories, so later you will be able to execute tests like&lt;br /&gt;
&lt;br /&gt;
 vendor/bin/phpunit -c mod/forum[/phpunit.xml]  // Note that it&#039;s not needed to specify the name of the file (if it is &#039;phpunit.xml&#039;).&lt;br /&gt;
 vendor/bin/phpunit -c question&lt;br /&gt;
 vendor/bin/phpunit -c question/type/calculated&lt;br /&gt;
 vendor/bin/phpunit -c backup&lt;br /&gt;
 vendor/bin/phpunit -c lib/dml&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
or, also&lt;br /&gt;
&lt;br /&gt;
 cd directory/with/phpunit.xml&lt;br /&gt;
 phpunit&lt;br /&gt;
&lt;br /&gt;
=External test resources=&lt;br /&gt;
{{Moodle 2.6}}&lt;br /&gt;
By default Moodle phpunit tests contact http://download.moodle.org server when testing curl related functionality. Optionally you may checkout a local copy of the test scripts and access it instead:&lt;br /&gt;
&lt;br /&gt;
# clone https://github.com/moodlehq/moodle-exttests to web directory&lt;br /&gt;
# add to your config.php or modify phpunit.xml file &amp;lt;code php&amp;gt;define(&#039;TEST_EXTERNAL_FILES_HTTP_URL&#039;, &#039;http://localhost/moodle-exttests&#039;);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Writing new tests=&lt;br /&gt;
* read [http://www.phpunit.de/manual/current/en/ official PHPUnit online documentation]&lt;br /&gt;
* see [[Writing PHPUnit tests]]&lt;br /&gt;
&lt;br /&gt;
=Conversion of existing SimpleTests=&lt;br /&gt;
* see [[SimpleTest conversion]]&lt;br /&gt;
&lt;br /&gt;
=PHPUnit support in IDEs=&lt;br /&gt;
&lt;br /&gt;
* [[Setting up Eclipse]]&lt;br /&gt;
* [[Setting up Netbeans]]&lt;br /&gt;
* [[Setting up PhpStorm]]&lt;br /&gt;
&lt;br /&gt;
=Common Unit Test Problems=&lt;br /&gt;
[[Common unit test problems]]&lt;br /&gt;
&lt;br /&gt;
=Performance=&lt;br /&gt;
&lt;br /&gt;
A typical run of full PHPUnit tests for Moodle 2.7 takes 10-20 minutes depending on the machine. If tests run slowly for you:&lt;br /&gt;
&lt;br /&gt;
* Ensure you are using a database and filesystem running on the same machine that is running the tests (not on a remote server).&lt;br /&gt;
* Apply developer-only performance settings to your database: [[Postgres Tuning For Developers]]&lt;br /&gt;
&lt;br /&gt;
=Command line tips=&lt;br /&gt;
&lt;br /&gt;
* Run all tests for a plugin (mod_mymodule in this example): vendor/bin/phpunit --testsuite=mod_mymodule_testsuite &lt;br /&gt;
* Run only named test: vendor/bin/phpunit --filter=test_my_test_function_name&lt;br /&gt;
* Display each test name before running it (useful e.g. if it crashes before the end and you want to know which test it was running at that point) vendor/bin/phpunit --debug (you will probably want to redirect this to a file as it gets very long).&lt;br /&gt;
&lt;br /&gt;
[[Category:Unit testing]]&lt;/div&gt;</summary>
		<author><name>Danielneis</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Javascript_Modules&amp;diff=54648</id>
		<title>Javascript Modules</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Javascript_Modules&amp;diff=54648"/>
		<updated>2018-08-21T16:28:05Z</updated>

		<summary type="html">&lt;p&gt;Danielneis: /* Install grunt */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Moodle 2.9}}&lt;br /&gt;
&lt;br /&gt;
= Javascript Modules =&lt;br /&gt;
&lt;br /&gt;
== What is a Javascript module and why do I care? ==&lt;br /&gt;
&lt;br /&gt;
A Javascript module is nothing more than a collection of Javascript code that can be used (reliably) from other pieces of Javascript. &lt;br /&gt;
&lt;br /&gt;
== Why should I package my code as a module? ==&lt;br /&gt;
&lt;br /&gt;
By packaging your code as a module you break your code up into smaller reusable pieces. This is good because:&lt;br /&gt;
&lt;br /&gt;
a) Each smaller piece is simpler to understand / debug&lt;br /&gt;
&lt;br /&gt;
b) Each smaller piece is simpler to test&lt;br /&gt;
&lt;br /&gt;
c) You can re-use common code instead of duplicating it&lt;br /&gt;
&lt;br /&gt;
= How do I write a Javascript module in Moodle? =&lt;br /&gt;
&lt;br /&gt;
Since version 2.9, Moodle supports Javascript modules written using the Asynchronous Module Definition ([https://github.com/amdjs/amdjs-api/wiki/AMD AMD]) API. This is a standard API for creating Javascript modules and you will find many useful third party libraries that are already using this format. &lt;br /&gt;
&lt;br /&gt;
To edit or create an AMD module in Moodle you need to do a couple of things. &lt;br /&gt;
&lt;br /&gt;
== Install grunt ==&lt;br /&gt;
&lt;br /&gt;
The AMD modules in Moodle must be processed by some build tools before they will be visible to your web browser. We use &amp;quot;[[grunt]]&amp;quot; as a build tool to wrap our different processes. Grunt is a build tool written in Javascript that runs in the &amp;quot;[http://nodejs.org/ nodejs]&amp;quot; environment.&lt;br /&gt;
&lt;br /&gt;
This means you first have to &#039;&#039;&#039;install nodejs&#039;&#039;&#039; - and its package manager [https://www.npmjs.com/ npm]. The details of how to install those packages will vary by operating system, but on Linux it&#039;s probably similar to &amp;quot;sudo apt-get install nodejs npm&amp;quot;. There are downloadable packages for other operating systems here: http://nodejs.org/download/. Moodle currently requires node &amp;quot;lts/carbon&amp;quot; (&amp;gt;=8.9 &amp;lt;9). &lt;br /&gt;
&lt;br /&gt;
Once this is done, you can &#039;&#039;&#039;run the command&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 npm install&lt;br /&gt;
 npm install -g grunt-cli&lt;br /&gt;
&lt;br /&gt;
from the top of the Moodle directory to install all of the required tools. (You may need extra permissions to use the -g option.)&lt;br /&gt;
&lt;br /&gt;
== Development mode ==&lt;br /&gt;
&lt;br /&gt;
To avoid having to constantly run grunt, make sure you set the following in your config.php&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
// Prevent JS caching&lt;br /&gt;
$CFG-&amp;gt;cachejs = false;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moodle will now run your module from the amd/src module. Don&#039;t forget to switch this off and run &#039;grunt&#039; before deploying the new version!&lt;br /&gt;
&lt;br /&gt;
In this mode - if you get a strange message in your javascript console like &amp;quot;No define call for core/first&amp;quot; it means you have a syntax error in the javascript you are developing. &lt;br /&gt;
Or, &amp;quot;No define call for theme_XXX/loader&amp;quot; as you are probably missing the &#039;src&#039; folder with relevant JS files. which might happen when you turn debugging ON on a theme that was bought, without &#039;src&#039; folder :-(&lt;br /&gt;
&lt;br /&gt;
== Running grunt ==&lt;br /&gt;
&lt;br /&gt;
You can run grunt in your plugin&#039;s &#039;amd&#039; directory and it will only operate on your modules. If you&#039;re having problems or just want to check your work it is worth running for the &#039;lint&#039; feature. This can find basic problems. This sub-directory support wont work on Windows unfortunately but there is an alternative: Run grunt from the top directory with the --root=path/to/dir to limit execution to a sub-directory.&lt;br /&gt;
&lt;br /&gt;
See [[Grunt#Running_grunt]] for more details of specific grunt commands which can be used.&lt;br /&gt;
&lt;br /&gt;
If you get the error message&lt;br /&gt;
&lt;br /&gt;
 /usr/bin/env: node: No such file or directory&lt;br /&gt;
&lt;br /&gt;
Then see the thread https://github.com/nodejs/node-v0.x-archive/issues/3911&lt;br /&gt;
&lt;br /&gt;
On Ubuntu 14.04 this fixed it for me:&lt;br /&gt;
&lt;br /&gt;
 sudo ln -fs /usr/bin/nodejs /usr/local/bin/node&lt;br /&gt;
&lt;br /&gt;
Note: Once you have run grunt and built your code, you will then need to purge Moodle caches otherwise the changes made to your minified files may not be picked up by Moodle.&lt;br /&gt;
&lt;br /&gt;
== Minimum (getting started) module for plugins ==&lt;br /&gt;
&lt;br /&gt;
This shows the absolute minimum module you need to get started adding modules to your plugins. It&#039;s actually quite simple...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code javascript&amp;gt;&lt;br /&gt;
// Put this file in path/to/plugin/amd/src&lt;br /&gt;
// You can call it anything you like&lt;br /&gt;
&lt;br /&gt;
define([&#039;jquery&#039;], function($) {&lt;br /&gt;
&lt;br /&gt;
    return {&lt;br /&gt;
        init: function() {&lt;br /&gt;
&lt;br /&gt;
            // Put whatever you like here. $ is available&lt;br /&gt;
            // to you as normal.&lt;br /&gt;
            $(&amp;quot;.someclass&amp;quot;).change(function() {&lt;br /&gt;
                alert(&amp;quot;It changed!!&amp;quot;);&lt;br /&gt;
            });&lt;br /&gt;
        }&lt;br /&gt;
    };&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This code passes the jquery module into our function (parameter $). There are a number of other useful modules available in Moodle, some of which you&#039;ll probably need in a practical application. See [[Useful_core_Javascript_modules]]. Simply list them in both the define() first parameter and the function callback. E.g.,&lt;br /&gt;
&amp;lt;code javascript&amp;gt;&lt;br /&gt;
    define([&#039;jquery&#039;, &#039;core/str&#039;, &#039;core/ajax&#039;], function($, str, ajax) {&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The idea here is that we will run the &#039;init&#039; function from our (PHP) code to set things up. This is called from PHP like this...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
    $PAGE-&amp;gt;requires-&amp;gt;js_call_amd(&#039;frankenstyle_path/your_js_filename&#039;, &#039;init&#039;);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Don&#039;t forget to supply the complete &#039;[[Frankenstyle]]&#039; path. The .js is not needed. &lt;br /&gt;
&lt;br /&gt;
js_call_amd takes a third parameter which is an &#039;&#039;array&#039;&#039; of parameters. These will translate to individual parameters in the &#039;init&#039; function call. For example...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
    $PAGE-&amp;gt;requires-&amp;gt;js_call_amd(&#039;block_iomad_company_admin/department_select&#039;, &#039;init&#039;, array($first, $last));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...calls&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code javascript&amp;gt;&lt;br /&gt;
    return {&lt;br /&gt;
        init: function(first, last) {&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more comprehensive explanation follows...&lt;br /&gt;
&lt;br /&gt;
== &amp;quot;Hello World&amp;quot; I am a Javascript Module ==&lt;br /&gt;
Lets now create a simple Javascript module so we can see how to lay things out. &lt;br /&gt;
&lt;br /&gt;
Each Javascript module is contained in a single source file in the &amp;lt;componentdir&amp;gt;/amd/src folder. The final name of the module is taken from the file name and the component name. E.g. block_overview/amd/src/helloworld.js would be a module named &amp;quot;block_overview/helloworld&amp;quot;. the name of the module is important when you want to call it from somewhere else in the code. &lt;br /&gt;
&lt;br /&gt;
After running grunt - the minified Javascript files are stored in the &amp;lt;componentdir&amp;gt;/amd/build folder. The javascript files are renamed to show that they are minified (helloworld.js becomes helloworld.min.js). &lt;br /&gt;
&lt;br /&gt;
Don&#039;t forget to add the built files (the ones in amd/build) to your git commits, or in production no-one will see your changes. &lt;br /&gt;
&lt;br /&gt;
Lets create a simple module now:&lt;br /&gt;
&lt;br /&gt;
blocks/overview/amd/src/helloworld.js&lt;br /&gt;
&amp;lt;code javascript&amp;gt;&lt;br /&gt;
// Standard license block omitted.&lt;br /&gt;
/*&lt;br /&gt;
 * @package    block_overview&lt;br /&gt;
 * @copyright  2015 Someone cool&lt;br /&gt;
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
 /**&lt;br /&gt;
  * @module block_overview/helloworld&lt;br /&gt;
  */&lt;br /&gt;
define([&#039;jquery&#039;], function($) {&lt;br /&gt;
&lt;br /&gt;
     /** &lt;br /&gt;
      * Give me blue.&lt;br /&gt;
      * @access private&lt;br /&gt;
      * @return {string}&lt;br /&gt;
      */&lt;br /&gt;
     var makeItBlue = function() {&lt;br /&gt;
          // We can use our jquery dependency here.&lt;br /&gt;
          return $(&#039;.blue&#039;).show();&lt;br /&gt;
     };&lt;br /&gt;
      &lt;br /&gt;
    /**&lt;br /&gt;
     * @constructor&lt;br /&gt;
     * @alias module:block_overview/helloworld&lt;br /&gt;
     */&lt;br /&gt;
    var greeting = function() {&lt;br /&gt;
        /** @access private */&lt;br /&gt;
        var privateThoughts = &#039;I like the colour blue&#039;;&lt;br /&gt;
        &lt;br /&gt;
        /** @access public */&lt;br /&gt;
        this.publicThoughts = &#039;I like the colour orange&#039;;&lt;br /&gt;
&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * A formal greeting.&lt;br /&gt;
     * @access public&lt;br /&gt;
     * @return {string}&lt;br /&gt;
     */&lt;br /&gt;
    greeting.prototype.formal = function() {&lt;br /&gt;
        return &#039;How do you do?&#039;;&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * An informal greeting.&lt;br /&gt;
     * @access public&lt;br /&gt;
     * @return {string}&lt;br /&gt;
     */&lt;br /&gt;
    greeting.prototype.informal = function() {&lt;br /&gt;
        return &#039;Wassup!&#039;;&lt;br /&gt;
    };&lt;br /&gt;
    return greeting;&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The most interesting line above is:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
define([&#039;jquery&#039;], function($) {&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All AMD modules must call &amp;quot;define()&amp;quot; as the first and only global scoped piece of code. This ensures the javascript code contains no global variables and will not conflict with any other loaded module. The name of the module does not need to be specified because it is determined from the filename and component (but it can be listed in a comment for JSDoc as shown here). &lt;br /&gt;
&lt;br /&gt;
The first argument to &amp;quot;define&amp;quot; is the list of dependencies for the module. This argument must be passed as an array, even if there is only one. In this example &amp;quot;jquery&amp;quot; is a dependency. &amp;quot;jquery&amp;quot; is shipped as a core module is available to all AMD modules. &lt;br /&gt;
&lt;br /&gt;
The second argument to &amp;quot;define&amp;quot; is the function that defines the module. This function will receive as arguments, each of the requested dependencies in the same order they were requested. In this example we receive JQuery as an argument and we name the variable &amp;quot;$&amp;quot; (it&#039;s a JQuery thing). We can then access JQuery normally through the $ variable which is in scope for any code in our module. &lt;br /&gt;
&lt;br /&gt;
The rest of the code in this example is a standard way to define a Javascript module with public/private variables and methods. There are many ways to do this, this is only one.&lt;br /&gt;
&lt;br /&gt;
It is important that we are returning &#039;greeting&#039;. If there is no return then your module will be declared as undefined.&lt;br /&gt;
&lt;br /&gt;
== Loading modules dynamically ==&lt;br /&gt;
What do you do if you don&#039;t know in advance which modules will be required? Stuffing all possible required modules in the define call is one solution, but it&#039;s ugly and it only works for code that is in an AMD module (what about inline code in the page?). AMD lets you load a dependency any time you like. &lt;br /&gt;
&amp;lt;code javascript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
// Load a new dependency.&lt;br /&gt;
require([&#039;mod_wiki/timer&#039;], function(timer) {&lt;br /&gt;
   // timer is available to do my bidding.&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Including an external javascript/jquery library ==&lt;br /&gt;
If you want to include a javascript / jquery library downloaded from the internet you can do so as follows:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning: if the library you download, supports AMD but is already &amp;quot;named&amp;quot; you will not be able to include it directly&#039;&#039;&#039;&lt;br /&gt;
e.g. &lt;br /&gt;
&amp;lt;code javascript&amp;gt;&lt;br /&gt;
        define(&amp;quot;typeahead.js&amp;quot;, *[ &amp;quot;jquery&amp;quot; ], function(a0) {&lt;br /&gt;
            return factory(a0);&lt;br /&gt;
        });&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
will not work, as moodle injects it&#039;s own define name when loading the library.&lt;br /&gt;
&lt;br /&gt;
If the library is in AMD format and has a define:&lt;br /&gt;
e.g. i want to include the jquery final countdown timer on my page ( hilios.github.io/jQuery.countdown/ )&lt;br /&gt;
* download the module in both normal and minified versions&lt;br /&gt;
* place the modules in your moodle install e.g. your custom theme dir, or plugin dir&lt;br /&gt;
* /theme/mytheme/amd/src/jquery.countdown.js&lt;br /&gt;
&lt;br /&gt;
you can now include the module and initialise it (there are multiple ways to do this)&lt;br /&gt;
php:&lt;br /&gt;
&lt;br /&gt;
1. Create your own AMD module and initialise it:&lt;br /&gt;
&lt;br /&gt;
In your PHP file:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$this-&amp;gt;page-&amp;gt;requires-&amp;gt;js_call_amd(&#039;theme_mytheme/countdowntimer&#039;, &#039;initialise&#039;, $params);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Javascript module:&lt;br /&gt;
&amp;lt;code javascript&amp;gt;&lt;br /&gt;
// /theme/mytheme/amd/src/countdowntimer.js&lt;br /&gt;
define([&#039;jquery&#039;, &#039;theme_mytheme/jquery.countdown&#039;], function($, c) {&lt;br /&gt;
    return {&lt;br /&gt;
        initialise: function ($params) {&lt;br /&gt;
           $(&#039;#clock&#039;).countdown(&#039;2020/10/10&#039;, function(event) {&lt;br /&gt;
             $(this).html(event.strftime(&#039;%D days %H:%M:%S&#039;));&lt;br /&gt;
           });&lt;br /&gt;
        }&lt;br /&gt;
    };&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. Put the javascript into a mustache template:&lt;br /&gt;
&amp;lt;code javascript&amp;gt;&lt;br /&gt;
// /theme/mytheme/templates/countdowntimer.mustache&lt;br /&gt;
&amp;lt;span id=&amp;quot;clock&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{#js}}&lt;br /&gt;
require([&#039;jquery&#039;, &#039;theme_mytheme/jquery.countdown&#039;], function($) {&lt;br /&gt;
           $(&#039;#clock&#039;).countdown(&#039;2020/10/10&#039;, function(event) {&lt;br /&gt;
             $(this).html(event.strftime(&#039;%D days %H:%M:%S&#039;));&lt;br /&gt;
           });&lt;br /&gt;
});&lt;br /&gt;
{{/js}}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. Call the javascript directly from php (although who would want to put javascript into php? ergh):&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$PAGE-&amp;gt;requires-&amp;gt;js_amd_inline(&#039;&lt;br /&gt;
require([&#039;theme_mytheme/jquery.countdown&#039;], function(min) {&lt;br /&gt;
           $(&#039;#clock&#039;).countdown(&#039;2020/10/10&#039;, function(event) {&lt;br /&gt;
             $(this).html(event.strftime(&#039;%D days %H:%M:%S&#039;));&lt;br /&gt;
           });&lt;br /&gt;
});&lt;br /&gt;
&#039;);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Embedding AMD code in a page ==&lt;br /&gt;
So you have created lots of cool Javascript modules. Great. How do we actually call them? Any javascript code that calls an AMD module must execute AFTER the requirejs module loader has finished loading. We have provided a function &amp;quot;js_call_amd&amp;quot; that will call a single function from an AMD module with parameters.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$PAGE-&amp;gt;requires-&amp;gt;js_call_amd($modulename, $functionname, $params);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
that will &amp;quot;do the right thing&amp;quot; with your block of AMD code and execute it at the end of the page, after our AMD module loader has loaded. &lt;br /&gt;
Notes:&lt;br /&gt;
* the $modulename is the &#039;componentname/modulename&#039; discussed above&lt;br /&gt;
* the $functionname is the name of a public function exposed by the amd module. &lt;br /&gt;
* the $params is an array of params passed as arguments to the function. These should be simple types that can be handled by json_encode (no recursive arrays, or complex classes please). &lt;br /&gt;
* if the size of the params array is too large (&amp;gt; 1Kb), this will produce a developer warning. Do not attempt to pass large amounts of data through this function, it will pollute the page size. A preferred approach is to pass css selectors for DOM elements that contain data-attributes for any required data, or fetch data via ajax in the background.&lt;br /&gt;
&lt;br /&gt;
AMD / JS code can also be embedded on a page via mustache templates&lt;br /&gt;
see here: https://docs.moodle.org/dev/Templates#What_if_a_template_contains_javascript.3F&lt;br /&gt;
&lt;br /&gt;
== But I have a mega JS file I don&#039;t want loaded on every page? ==&lt;br /&gt;
Loading all JS files at once and stuffing them in the browser cache is the right choice for MOST js files, there are probably some exceptions. For these files, you can rename the javascript file to end with the suffix &amp;quot;-lazy.js&amp;quot; which indicates that the module will not be loaded by default, it will be requested the first time it is used. There is no difference in usage for lazy loaded modules, the require() call looks exactly the same, it&#039;s just that the module name will also have the &amp;quot;-lazy&amp;quot; suffix.&lt;br /&gt;
&lt;br /&gt;
== Useful links ==&lt;br /&gt;
* [https://assets.moodlemoot.org/sites/15/20171004085436/JavaScript-AMD-with-RequireJS-presented-by-Daniel-Roperto-Catalyst.pdf JavaScript AMD with RequireJS] presented by Daniel Roperto, Catalyst. (MoodleMOOT AU 2017)&lt;br /&gt;
* [[Useful_core_Javascript_modules]]&lt;br /&gt;
*[[Guide_to_adding_third_party_jQuery_for_AMD]] by Patrick Thibaudeau (Oohoo.biz)&lt;br /&gt;
&lt;br /&gt;
[[Category:AJAX]]&lt;br /&gt;
[[Category:Javascript]]&lt;/div&gt;</summary>
		<author><name>Danielneis</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Using_the_File_API_in_Moodle_forms&amp;diff=54643</id>
		<title>Using the File API in Moodle forms</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Using_the_File_API_in_Moodle_forms&amp;diff=54643"/>
		<updated>2018-08-20T18:39:21Z</updated>

		<summary type="html">&lt;p&gt;Danielneis: /* Add file manager element */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Moodle 2.0}}&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
In Moodle 2.0 all files are stored in a central database accessible via the [[File API|File API]], and every file is associated with a component and a &amp;quot;file area&amp;quot; in Moodle, such as a particular module.&lt;br /&gt;
&lt;br /&gt;
A common use case is to provide a form (using Moodle&#039;s [[lib/formslib.php|Forms API]]) which allows users to upload or import files as attachments or media embedded into HTML.&lt;br /&gt;
&lt;br /&gt;
Normally this works like this:&lt;br /&gt;
# User starts creation or re-edits an existing item in Moodle (eg forum post, resource, glossary entry etc)&lt;br /&gt;
# User presses some sort of button to browse for new files to attach or embed&lt;br /&gt;
# User sees our &amp;quot;Choose file...&amp;quot; dialog, which contains one or more repository instances. &lt;br /&gt;
# User chooses a file, the corresponding [[Repository plugins|Repository plugin]] takes care of copying the file into a &amp;quot;draft file area&amp;quot; within Moodle&lt;br /&gt;
# File appears in the text or as an attachment in the form.&lt;br /&gt;
# When the user hits save, the [[File API|File API]] is invoked to move the file from the draft file area into a permanent file area associated with that data &lt;br /&gt;
&lt;br /&gt;
This document shows you exactly how to use Moodle forms to interact with users in a standard and secure way.&lt;br /&gt;
&lt;br /&gt;
If you just want to write code to manipulate Moodle files internally (without user input) then see [[File API]].&lt;br /&gt;
&lt;br /&gt;
==Form elements== &lt;br /&gt;
&lt;br /&gt;
In Moodle 2.0 there are three file-related form elements for interacting with users:&lt;br /&gt;
&lt;br /&gt;
# filemanager - the way to attach one or more files as a set&lt;br /&gt;
# editor - the way to specify a textarea with a HTML editor, and all the handling of images and movies within that HTML&lt;br /&gt;
# filepicker - a way to specify one file for the case when you want to process the file and throw it away &lt;br /&gt;
&lt;br /&gt;
In Moodle 1.9 there were two other types which are now &#039;&#039;&#039;deprecated&#039;&#039;&#039; (they work, but please do not use these anymore)&lt;br /&gt;
# file - used to just allow a normal file upload from the desktop only.&lt;br /&gt;
# htmleditor - this old method of embedding a HTML editor in a textarea is not able to support repositories etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===filepicker===&lt;br /&gt;
&lt;br /&gt;
File picker (&#039;&#039;filepicker&#039;&#039;) is a direct replacement of the older &#039;&#039;file&#039;&#039; formslib element. &lt;br /&gt;
&lt;br /&gt;
It is intended for situations when you want the user to upload &#039;&#039;&#039;one&#039;&#039;&#039; file so you can process it and delete it, such as when you are importing data from a CSV file.&lt;br /&gt;
If you want a file that remains part of the Moodle storage and will reappear when you reopen the form, then you should use a filemanager instead (and restrict it to a single file, if necessary).&lt;br /&gt;
&lt;br /&gt;
==== Using the filepicker element ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$mform-&amp;gt;addElement(&#039;filepicker&#039;, &#039;userfile&#039;, get_string(&#039;file&#039;), null,&lt;br /&gt;
                   array(&#039;maxbytes&#039; =&amp;gt; $maxbytes, &#039;accepted_types&#039; =&amp;gt; &#039;*&#039;));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Obtain the chosen file ====&lt;br /&gt;
&lt;br /&gt;
To get the contents of the file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$content = $mform-&amp;gt;get_file_content(&#039;userfile&#039;);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To get the name of the chosen file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$name = $mform-&amp;gt;get_new_filename(&#039;userfile&#039;);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To save the chosen file to the server filesystem (such as to moodledata folder):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$success = $mform-&amp;gt;save_file(&#039;userfile&#039;, $fullpath, $override);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To store the chosen file in the Moodle files pool:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$storedfile = $mform-&amp;gt;save_stored_file(&#039;userfile&#039;, ...);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== filemanager ===&lt;br /&gt;
&lt;br /&gt;
The File Manager element improves on file picker by allowing you to manage more than one file.  It is expected that the files will be stored permanently for future use (such as forum and glossary attachments).&lt;br /&gt;
&lt;br /&gt;
==== Add file manager element ====&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$mform-&amp;gt;addElement(&#039;filemanager&#039;, &#039;attachments&#039;, get_string(&#039;attachment&#039;, &#039;moodle&#039;), null,&lt;br /&gt;
                    array(&#039;subdirs&#039; =&amp;gt; 0, &#039;maxbytes&#039; =&amp;gt; $maxbytes, &#039;areamaxbytes&#039; =&amp;gt; 10485760, &#039;maxfiles&#039; =&amp;gt; 50,&lt;br /&gt;
                          &#039;accepted_types&#039; =&amp;gt; array(&#039;document&#039;), &#039;return_types&#039;=&amp;gt; FILE_INTERNAL | FILE_EXTERNAL));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here are the fields for filemanager:&lt;br /&gt;
&lt;br /&gt;
;&#039;filemanager&#039;:This is a filemanager element :)&lt;br /&gt;
;elementname:The unique name of the element in the form&lt;br /&gt;
;elementlabel:The label string that users see &lt;br /&gt;
;attributes:(leave it as null)&lt;br /&gt;
;options: an array of further options for the filepicker (see below)&lt;br /&gt;
&lt;br /&gt;
The options array can contain:&lt;br /&gt;
&lt;br /&gt;
;subdirs:(Default 1) Are subdirectories allowed?  (true or false)&lt;br /&gt;
;maxbytes:(Default 0) Restricts the size of each individual file.&lt;br /&gt;
;areamaxbytes:(Default 0) Restricts the total size of all the files.&lt;br /&gt;
;maxfiles:(Default -1) Restricts the total number of files.&lt;br /&gt;
;accepted_types:(Default *) You can specify what file types are accepted by filemanager.  All current file types are listed in this file: [http://cvs.moodle.org/moodle/lib/filestorage/file_types.mm moodle/lib/filestorage/file_types.mm].  This is a [http://freemind.sourceforge.net/wiki/index.php/Main_Page freemind] file: if it is edited the changes will be immediately reflected in Moodle.&lt;br /&gt;
&lt;br /&gt;
As of 2.3 file_types.mm is no longer used, instead the file types are listed in &amp;lt;code&amp;gt;get_mimetypes_array()&amp;lt;/code&amp;gt; in lib/classes/filetypes.php (https://github.com/moodle/moodle/blob/master/lib/classes/filetypes.php).&lt;br /&gt;
&lt;br /&gt;
Example usage:  &#039;&#039;&#039;array(&#039;audio&#039;, &#039;video&#039;, &#039;document&#039;)&#039;&#039;&#039;, you can include file extensions as well, for example: &#039;&#039;&#039;array(&#039;.txt&#039;, &#039;.jpg&#039;, &#039;audio&#039;)&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Load existing files into draft area ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
if (empty($entry-&amp;gt;id)) {&lt;br /&gt;
    $entry = new stdClass;&lt;br /&gt;
    $entry-&amp;gt;id = null;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$draftitemid = file_get_submitted_draft_itemid(&#039;attachments&#039;);&lt;br /&gt;
&lt;br /&gt;
file_prepare_draft_area($draftitemid, $context-&amp;gt;id, &#039;mod_glossary&#039;, &#039;attachment&#039;, $entry-&amp;gt;id,&lt;br /&gt;
                        array(&#039;subdirs&#039; =&amp;gt; 0, &#039;maxbytes&#039; =&amp;gt; $maxbytes, &#039;maxfiles&#039; =&amp;gt; 50));&lt;br /&gt;
&lt;br /&gt;
$entry-&amp;gt;attachments = $draftitemid;&lt;br /&gt;
&lt;br /&gt;
$mform-&amp;gt;set_data($entry);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Store updated set of files ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
if ($data = $mform-&amp;gt;get_data()) {&lt;br /&gt;
    // ... store or update $entry&lt;br /&gt;
    file_save_draft_area_files($data-&amp;gt;attachments, $context-&amp;gt;id, &#039;mod_glossary&#039;, &#039;attachment&#039;,&lt;br /&gt;
                   $entry-&amp;gt;id, array(&#039;subdirs&#039; =&amp;gt; 0, &#039;maxbytes&#039; =&amp;gt; $maxbytes, &#039;maxfiles&#039; =&amp;gt; 50));&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===editor===&lt;br /&gt;
There are two ways of using the editor element in code, the first one is easier but expects some standardized fields. The second method is more low level.&lt;br /&gt;
&lt;br /&gt;
====Simple use====&lt;br /&gt;
# name database fields: &#039;&#039;textfield&#039;&#039;, &#039;&#039;textfieldformat&#039;&#039; (and &#039;&#039;textfieldtrust&#039;&#039; if required)&lt;br /&gt;
# create options array.  note that context is the best, most local context you have available.&lt;br /&gt;
#:&amp;lt;code php&amp;gt;$textfieldoptions = array(&#039;trusttext&#039;=&amp;gt;true, &#039;subdirs&#039;=&amp;gt;true, &#039;maxfiles&#039;=&amp;gt;$maxfiles, &#039;maxbytes&#039;=&amp;gt;$maxbytes, &#039;context&#039;=&amp;gt;$context);&amp;lt;/code&amp;gt;&lt;br /&gt;
# add editor &#039;&#039;textfield_editor&#039;&#039; to moodle form, pass options through custom data in form constructor, set $data-&amp;gt;id to null if data not exist yet&lt;br /&gt;
#:&amp;lt;code php&amp;gt;$mform-&amp;gt;addElement(&#039;editor&#039;, &#039;textfield_editor&#039;, get_string(&#039;fieldname&#039;, &#039;somemodule&#039;), null, $textfieldoptions);&amp;lt;/code&amp;gt;&lt;br /&gt;
# prepare data&lt;br /&gt;
#:&amp;lt;code php&amp;gt;$data = file_prepare_standard_editor($data, &#039;textfield&#039;, $textfieldoptions, $context, &#039;mod_somemodule&#039;, &#039;somearea&#039;, $data-&amp;gt;id);&amp;lt;/code&amp;gt;&lt;br /&gt;
# get submitted data and after inserting/updating of data&lt;br /&gt;
#:&amp;lt;code php&amp;gt;$data = file_postupdate_standard_editor($data, &#039;textfield&#039;, $textfieldoptions, $context, &#039;mod_somemodule&#039;, &#039;somearea&#039;, $data-&amp;gt;id);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Real world examples are in mod/glossary/edit.php and mod/glossary/comment.php&lt;br /&gt;
&lt;br /&gt;
====Low level use====&lt;br /&gt;
&lt;br /&gt;
When using editor element you  need to preprocess and postprocess the data:&lt;br /&gt;
# detect if form was already submitted (usually means draft is area already exists) - &#039;&#039;file_get_submitted_draft_itemid()&#039;&#039;&lt;br /&gt;
# prepare draft file area, temporary storage of all files attached to the text - &#039;&#039;file_prepare_draft_area()&#039;&#039;&lt;br /&gt;
# convert encoded relative links to absolute links - &#039;&#039;file_prepare_draft_area()&#039;&#039;&lt;br /&gt;
# create form and set current data&lt;br /&gt;
# after submission the changed files must be merged back into original area - &#039;&#039;file_save_draft_area_files()&#039;&#039;&lt;br /&gt;
# absolute links have to be replaced by relative links - &#039;&#039;file_save_draft_area_files()&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=====Replace old htmleditor with editor=====&lt;br /&gt;
&lt;br /&gt;
The file picker has been integrated with with TinyMCE to make the editor element. This new element should support all types on editors and should be able to switch them on-the-fly. Instances of the old htmleditor element in your forms should be replaced by the new editor element, this may need adding of new format and trusttext columns. For example:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$mform-&amp;gt;addElement(&#039;editor&#039;, &#039;entry&#039;, get_string(&#039;definition&#039;, &#039;glossary&#039;), null,&lt;br /&gt;
        array(&#039;maxfiles&#039; =&amp;gt; EDITOR_UNLIMITED_FILES));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
The editor element can take following options: maxfiles, maxbytes, subdirs and changeformat. Please note that the embedded files is optional feature and is not expected be used everywhere.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: the editor element now includes text format option. You should no longer use the separate format element type.&lt;br /&gt;
&lt;br /&gt;
=====Prepare current data - text and files=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
if (empty($entry-&amp;gt;id)) {&lt;br /&gt;
  $entry = new object();&lt;br /&gt;
  $entry-&amp;gt;id = null;&lt;br /&gt;
  $entry-&amp;gt;definition = &#039;&#039;;&lt;br /&gt;
  $entry-&amp;gt;format = FORMAT_HTML;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$draftid_editor = file_get_submitted_draft_itemid(&#039;entry&#039;);&lt;br /&gt;
$currenttext = file_prepare_draft_area($draftid_editor, $context-&amp;gt;id, &#039;mod_glossary&#039;, &#039;entry&#039;,&lt;br /&gt;
                                       $entry-&amp;gt;id, array(&#039;subdirs&#039;=&amp;gt;true), $entry-&amp;gt;definition);&lt;br /&gt;
$entry-&amp;gt;entry = array(&#039;text&#039;=&amp;gt;$currenttext, &#039;format&#039;=&amp;gt;$entry-&amp;gt;format, &#039;itemid&#039;=&amp;gt;$draftid_editor);&lt;br /&gt;
&lt;br /&gt;
$mform-&amp;gt;set_data($entry);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If there are multiple files, they will share the same itemid.&lt;br /&gt;
&lt;br /&gt;
=====Obtain text, format and save draft files=====&lt;br /&gt;
&lt;br /&gt;
To retrieve editor content, you need to use following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
if ($fromform = $mform-&amp;gt;get_data()) {&lt;br /&gt;
    // content of editor&lt;br /&gt;
    $messagetext = $fromform-&amp;gt;entry[&#039;text&#039;];&lt;br /&gt;
    // format of content&lt;br /&gt;
    $messageformat  = $fromform-&amp;gt;entry[&#039;format&#039;];&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When a user selects a file using the file picker, the file is initially stored in a draft file area, and a URL is inserted into the HTML in the editor that lets the person editing the content (but no one else) see the file.&lt;br /&gt;
&lt;br /&gt;
When the user submits the form, we then need to save the draft files to the correct place in permanent storage. (Just like you have to call $DB-&amp;gt;update_record(&#039;tablename&#039;, $data); to have the other parts of the form submission stored correctly.)&lt;br /&gt;
&lt;br /&gt;
The save_files_from_draft_area function and replace absolute links with internal relative links do:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$messagetext = file_save_draft_area_files($draftid_editor, $context-&amp;gt;id, &#039;mod_glossary&#039;, &#039;entry&#039;,&lt;br /&gt;
                                          $entry-&amp;gt;id, array(&#039;subdirs&#039;=&amp;gt;true), $messagetext);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
; $context-&amp;gt;id, &#039;component&#039;, &#039;proper_file_area&#039; and $entry-&amp;gt;id : correspond to the contextid, filearea and itemid columns in the [[File_API#Table:_files|files table]].&lt;br /&gt;
; $messagetext : this is the message text. As the files are saved to the real file area, the URLs in this content are rewritten.&lt;br /&gt;
&lt;br /&gt;
All URLs in content that point to files managed to the File API are converted to a form that starts &#039;@@PLUGINFILE@@/&#039; before the content is stored in the database. That is what we mean by rewriting.&lt;br /&gt;
&lt;br /&gt;
== File serving==&lt;br /&gt;
&lt;br /&gt;
=== Convert internal relative links to absolute links ===&lt;br /&gt;
&lt;br /&gt;
Before text content is displayed to the user, any URLs in the &#039;@@PLUGINFILE@@/&#039; form in the content need to be rewritten to the real URL where the user can access the files. &lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$messagetext = file_rewrite_pluginfile_urls($messagetext, &#039;pluginfile.php&#039;,&lt;br /&gt;
        $context-&amp;gt;id, &#039;mod_mymodule&#039;, &#039;proper_file_area&#039;, $itemid);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
; $messagetext : is the content containing the @@PLUGINFILE@@ URLs from the database.&lt;br /&gt;
; &#039;pluginfile.php&#039; : there are a number of different scripts that can serve files with different permissions checks. You need to specify which one to use.&lt;br /&gt;
; $context-&amp;gt;id, &#039;mod_mymodule&#039;, &#039;proper_file_area&#039;, $itemid : uniquely identifies the file area, as before.&lt;br /&gt;
&lt;br /&gt;
=== Implement file serving access control ===&lt;br /&gt;
&lt;br /&gt;
Attachments and embedded images should have the same access control like the text itself, in majority of cases these files are served using pluginfile.php. Access control is defined in &#039;&#039;module/lib.php&#039;&#039; file in function &#039;&#039;module_pluginfile()&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== File browsing support ==&lt;br /&gt;
Only owner of each file area is allowed to use low level File API function to access files, other parts of Moodle should use file browsing API.&lt;br /&gt;
&lt;br /&gt;
Activities may specify browsing support in own module/lib.php file by implementing functions module_get_file_areas() and module_get_file_info().&lt;br /&gt;
&lt;br /&gt;
== Upgrading your code ==&lt;br /&gt;
Here I will attempt to describe some simple steps you can take to upgrade your file-handling form elements from pre-2.0 code to 2.0. We will use the example of glossary, since it has been used above.&lt;br /&gt;
&lt;br /&gt;
=== Preparing your options ===&lt;br /&gt;
Unless you are happy with the defaults, you will need to define an array of options for each file-handling form element. You could define it at different places, but it&#039;s best to put it in one place and make the array(s) available to other files if they need it. In the majority of cases, this will be in a file like edit.php&lt;br /&gt;
&lt;br /&gt;
Previous code in mod/glossary/edit.php:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$mform =&amp;amp; new mod_glossary_entry_form(null, compact(&#039;cm&#039;, &#039;glossary&#039;, &#039;hook&#039;, &#039;mode&#039;, &#039;e&#039;, &#039;context&#039;));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
New code:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$maxbytes = $course-&amp;gt;maxbytes;&lt;br /&gt;
// Could also use $CFG-&amp;gt;maxbytes if you are not coding within a course context&lt;br /&gt;
&lt;br /&gt;
$definitionoptions = array(&#039;subdirs&#039;=&amp;gt;false, &#039;maxfiles&#039;=&amp;gt;99, &#039;maxbytes&#039;=&amp;gt;$maxbytes, &#039;trusttext&#039;=&amp;gt;true,&lt;br /&gt;
                           &#039;context&#039;=&amp;gt;$context);&lt;br /&gt;
$attachmentoptions = array(&#039;subdirs&#039;=&amp;gt;false, &#039;maxfiles&#039;=&amp;gt;99, &#039;maxbytes&#039;=&amp;gt;$maxbytes);&lt;br /&gt;
$mform = new mod_glossary_entry_form(null, array(&#039;current&#039;=&amp;gt;$entry, &#039;cm&#039;=&amp;gt;$cm, &#039;glossary&#039;=&amp;gt;$glossary,&lt;br /&gt;
                                                 &#039;definitionoptions&#039;=&amp;gt;$definitionoptions, &lt;br /&gt;
                                                 &#039;attachmentoptions&#039;=&amp;gt;$attachmentoptions));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Note that the data being passed to the form constructor have changed also, but this is not part of the file API changes, I just include them to avoid confusion.&lt;br /&gt;
&lt;br /&gt;
These options are for the htmleditor (definition field) and the filemanager (attachment field). They are used by a file called edit_form.php.&lt;br /&gt;
&lt;br /&gt;
=== Element preparation ===&lt;br /&gt;
Before we look at this, however, we need to &amp;quot;prepare&amp;quot; the elements so that they can correctly display existing embedded images and attached files when you are editing a record instead of just creating one. So, let&#039;s take the code we&#039;ve got so far in edit.php and add to it:&lt;br /&gt;
&lt;br /&gt;
Currently upgraded code in edit.php:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$mform = new mod_glossary_entry_form(null, array(&lt;br /&gt;
        &#039;current&#039;=&amp;gt;$entry, &lt;br /&gt;
        &#039;cm&#039;=&amp;gt;$cm, &lt;br /&gt;
        &#039;glossary&#039;=&amp;gt;$glossary,&lt;br /&gt;
        &#039;definitionoptions&#039;=&amp;gt;$definitionoptions, &lt;br /&gt;
        &#039;attachmentoptions&#039;=&amp;gt;$attachmentoptions));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
New code with element preparation:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$entry = file_prepare_standard_editor($entry, &#039;definition&#039;, $definitionoptions, $context,&lt;br /&gt;
                                      &#039;mod_glossary&#039;, &#039;entry&#039;, $entry-&amp;gt;id);&lt;br /&gt;
$entry = file_prepare_standard_filemanager($entry, &#039;attachment&#039;, $attachmentoptions, $context,&lt;br /&gt;
                                           &#039;mod_glossary&#039;, &#039;attachment&#039;, $entry-&amp;gt;id);&lt;br /&gt;
$mform = new mod_glossary_entry_form(null, array(&#039;current&#039;=&amp;gt;$entry, &#039;cm&#039;=&amp;gt;$cm, &#039;glossary&#039;=&amp;gt;$glossary,&lt;br /&gt;
                                                 &#039;definitionoptions&#039;=&amp;gt;$definitionoptions, &lt;br /&gt;
                                                 &#039;attachmentoptions&#039;=&amp;gt;$attachmentoptions));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Things to note:&lt;br /&gt;
* $entry in this case is simply a stdClass object which may either represent a new glossary entry or an existing one.&lt;br /&gt;
* $entry-&amp;gt;id must be the unique identifier for the current object. If we are creating a new entry, it will be null, but in all cases it must be defined.&lt;br /&gt;
* These two functions (file_prepare_standard_editor and file_prepare_standard_filemanager) are shortcuts functions that take care of some of the tedious setting up for you, but they make a couple of assumptions:&lt;br /&gt;
*# You &#039;&#039;&#039;must&#039;&#039;&#039; name the form element as {element}_editor or {element}_filemanager (see next section)&lt;br /&gt;
*# You &#039;&#039;&#039;must&#039;&#039;&#039; have at least the following fields in the database: {element} and {element}summary, as described earlier in this documentation&lt;br /&gt;
&lt;br /&gt;
We can now look at the upgrades needed in the form definition file.&lt;br /&gt;
&lt;br /&gt;
=== Form definition ===&lt;br /&gt;
Previous code in mod/glossary/edit_form.php:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$mform-&amp;gt;addElement(&#039;htmleditor&#039;, &#039;definition&#039;, get_string(&#039;definition&#039;, &#039;glossary&#039;),&lt;br /&gt;
                    array(&#039;rows&#039;=&amp;gt;20));&lt;br /&gt;
$mform-&amp;gt;setType(&#039;definition&#039;, PARAM_RAW);&lt;br /&gt;
$mform-&amp;gt;addRule(&#039;definition&#039;, null, &#039;required&#039;, null, &#039;client&#039;);&lt;br /&gt;
$mform-&amp;gt;setHelpButton(&#039;definition&#039;, array(&#039;writing&#039;, &#039;richtext&#039;), false, &#039;editorhelpbutton&#039;);&lt;br /&gt;
$mform-&amp;gt;addElement(&#039;format&#039;);&lt;br /&gt;
// a bit further...&lt;br /&gt;
$this-&amp;gt;set_upload_manager(new upload_manager(&#039;attachment&#039;, true, false, $COURSE, false, 0,&lt;br /&gt;
                                             true, true, false));&lt;br /&gt;
$mform-&amp;gt;addElement(&#039;file&#039;, &#039;attachment&#039;, get_string(&#039;attachment&#039;, &#039;forum&#039;));&lt;br /&gt;
$mform-&amp;gt;setHelpButton(&#039;attachment&#039;, array(&#039;attachment&#039;, get_string(&#039;attachment&#039;, &#039;glossary&#039;),&lt;br /&gt;
                      &#039;glossary&#039;));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
New code:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$definitionoptions = $this-&amp;gt;_customdata[&#039;definitionoptions&#039;];&lt;br /&gt;
$attachmentoptions = $this-&amp;gt;_customdata[&#039;attachmentoptions&#039;];&lt;br /&gt;
// a bit further...&lt;br /&gt;
$mform-&amp;gt;addElement(&#039;editor&#039;, &#039;definition_editor&#039;, get_string(&#039;definition&#039;, &#039;glossary&#039;), null,&lt;br /&gt;
                   $definitionoptions);&lt;br /&gt;
$mform-&amp;gt;setType(&#039;definition_editor&#039;, PARAM_RAW);&lt;br /&gt;
$mform-&amp;gt;addRule(&#039;definition_editor&#039;, get_string(&#039;required&#039;), &#039;required&#039;, null, &#039;client&#039;);&lt;br /&gt;
// a bit further...&lt;br /&gt;
$mform-&amp;gt;addElement(&#039;filemanager&#039;, &#039;attachment_filemanager&#039;, get_string(&#039;attachment&#039;, &#039;glossary&#039;),&lt;br /&gt;
                   null, $attachmentoptions);&lt;br /&gt;
$mform-&amp;gt;setHelpButton(&#039;attachment_filemanager&#039;, array(&#039;attachment2&#039;,&lt;br /&gt;
                      get_string(&#039;attachment&#039;, &#039;glossary&#039;), &#039;glossary&#039;));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note the following:&lt;br /&gt;
* The format element and the help button are no longer required for the HTML editor element&lt;br /&gt;
* The name of the form element needs to be changed by adding &#039;_editor&#039; or &#039;_manager&#039; to the original name. This is a naming convention that is used by a couple of functions we will look at shortly&lt;br /&gt;
* Make sure $definitionoptions has context parameter, else system context is used and editor will not respect filter settings.&lt;br /&gt;
&lt;br /&gt;
=== Handling submitted data ===&lt;br /&gt;
The final step is to handle the submitted data properly, i.e. retrieve the files and save them to disk, associating them with the record we have just created (a glossary entry in our example). This happens in edit.php:&lt;br /&gt;
&lt;br /&gt;
Previous code in edit.php:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
// Section that updates an entry:&lt;br /&gt;
$todb-&amp;gt;id = $e;&lt;br /&gt;
$dir = glossary_file_area_name($todb);&lt;br /&gt;
if ($mform-&amp;gt;save_files($dir) and $newfilename = $mform-&amp;gt;get_new_filename()) {&lt;br /&gt;
    $todb-&amp;gt;attachment = $newfilename;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Section that adds an entry:&lt;br /&gt;
if ($todb-&amp;gt;id = insert_record(&amp;quot;glossary_entries&amp;quot;, $todb)) {&lt;br /&gt;
    $e = $todb-&amp;gt;id;&lt;br /&gt;
    $dir = glossary_file_area_name($todb);&lt;br /&gt;
    if ($mform-&amp;gt;save_files($dir) and $newfilename = $mform-&amp;gt;get_new_filename()) {&lt;br /&gt;
        set_field(&amp;quot;glossary_entries&amp;quot;, &amp;quot;attachment&amp;quot;, $newfilename, &amp;quot;id&amp;quot;, $todb-&amp;gt;id);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
New code:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
// $todb was renamed to $entry, and the code was refactored &lt;br /&gt;
// so that the file-handling code is only used once for either an add or an update action.&lt;br /&gt;
// If an entry is being added, $DB-&amp;gt;insert() has already been called, so we have a valid $entry-&amp;gt;id&lt;br /&gt;
$entry = file_postupdate_standard_editor($entry, &#039;definition&#039;, $definitionoptions, $context,&lt;br /&gt;
                                         &#039;mod_glossary&#039;, &#039;entry&#039;, $entry-&amp;gt;id);&lt;br /&gt;
$entry = file_postupdate_standard_filemanager($entry, &#039;attachment&#039;, $attachmentoptions, $context,&lt;br /&gt;
                                              &#039;mod_glossary&#039;, &#039;attachment&#039;, $entry-&amp;gt;id);&lt;br /&gt;
// store the updated value values&lt;br /&gt;
$DB-&amp;gt;update_record(&#039;glossary_entries&#039;, $entry);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Things to note:&lt;br /&gt;
* If you are adding a new record, you will still need to call update_record after calling the file_postupdate* functions&lt;br /&gt;
&lt;br /&gt;
=== Gotchas ===&lt;br /&gt;
A few things to keep in mind:&lt;br /&gt;
* Make sure that you instantiate the moodle form before any call to $OUTPUT-&amp;gt;header()&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[File API]]&lt;br /&gt;
* [[Using the file API]]&lt;br /&gt;
* [[Repository plugins]]&lt;br /&gt;
* [[Portfolio API]]&lt;br /&gt;
* MDL-14589 - File API Meta issue&lt;br /&gt;
* [https://moodle.org/mod/forum/discuss.php?d=207748 Adding a text editor to a Moodle form]&lt;br /&gt;
* [https://moodle.org/mod/forum/discuss.php?d=157953#p692822 Button actions in Moodle form]&lt;br /&gt;
* [https://moodle.org/mod/forum/discuss.php?d=351013#p1416554 File Picker]&lt;br /&gt;
* [https://github.com/CARLOSEDUARDOVIEIRA/moodle-uploadfile Example of filemanager in an activity module]&lt;br /&gt;
&lt;br /&gt;
[[Category:Files]]&lt;br /&gt;
[[Category:Repositories]]&lt;/div&gt;</summary>
		<author><name>Danielneis</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Using_the_File_API_in_Moodle_forms&amp;diff=54642</id>
		<title>Using the File API in Moodle forms</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Using_the_File_API_in_Moodle_forms&amp;diff=54642"/>
		<updated>2018-08-20T18:36:57Z</updated>

		<summary type="html">&lt;p&gt;Danielneis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Moodle 2.0}}&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
In Moodle 2.0 all files are stored in a central database accessible via the [[File API|File API]], and every file is associated with a component and a &amp;quot;file area&amp;quot; in Moodle, such as a particular module.&lt;br /&gt;
&lt;br /&gt;
A common use case is to provide a form (using Moodle&#039;s [[lib/formslib.php|Forms API]]) which allows users to upload or import files as attachments or media embedded into HTML.&lt;br /&gt;
&lt;br /&gt;
Normally this works like this:&lt;br /&gt;
# User starts creation or re-edits an existing item in Moodle (eg forum post, resource, glossary entry etc)&lt;br /&gt;
# User presses some sort of button to browse for new files to attach or embed&lt;br /&gt;
# User sees our &amp;quot;Choose file...&amp;quot; dialog, which contains one or more repository instances. &lt;br /&gt;
# User chooses a file, the corresponding [[Repository plugins|Repository plugin]] takes care of copying the file into a &amp;quot;draft file area&amp;quot; within Moodle&lt;br /&gt;
# File appears in the text or as an attachment in the form.&lt;br /&gt;
# When the user hits save, the [[File API|File API]] is invoked to move the file from the draft file area into a permanent file area associated with that data &lt;br /&gt;
&lt;br /&gt;
This document shows you exactly how to use Moodle forms to interact with users in a standard and secure way.&lt;br /&gt;
&lt;br /&gt;
If you just want to write code to manipulate Moodle files internally (without user input) then see [[File API]].&lt;br /&gt;
&lt;br /&gt;
==Form elements== &lt;br /&gt;
&lt;br /&gt;
In Moodle 2.0 there are three file-related form elements for interacting with users:&lt;br /&gt;
&lt;br /&gt;
# filemanager - the way to attach one or more files as a set&lt;br /&gt;
# editor - the way to specify a textarea with a HTML editor, and all the handling of images and movies within that HTML&lt;br /&gt;
# filepicker - a way to specify one file for the case when you want to process the file and throw it away &lt;br /&gt;
&lt;br /&gt;
In Moodle 1.9 there were two other types which are now &#039;&#039;&#039;deprecated&#039;&#039;&#039; (they work, but please do not use these anymore)&lt;br /&gt;
# file - used to just allow a normal file upload from the desktop only.&lt;br /&gt;
# htmleditor - this old method of embedding a HTML editor in a textarea is not able to support repositories etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===filepicker===&lt;br /&gt;
&lt;br /&gt;
File picker (&#039;&#039;filepicker&#039;&#039;) is a direct replacement of the older &#039;&#039;file&#039;&#039; formslib element. &lt;br /&gt;
&lt;br /&gt;
It is intended for situations when you want the user to upload &#039;&#039;&#039;one&#039;&#039;&#039; file so you can process it and delete it, such as when you are importing data from a CSV file.&lt;br /&gt;
If you want a file that remains part of the Moodle storage and will reappear when you reopen the form, then you should use a filemanager instead (and restrict it to a single file, if necessary).&lt;br /&gt;
&lt;br /&gt;
==== Using the filepicker element ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$mform-&amp;gt;addElement(&#039;filepicker&#039;, &#039;userfile&#039;, get_string(&#039;file&#039;), null,&lt;br /&gt;
                   array(&#039;maxbytes&#039; =&amp;gt; $maxbytes, &#039;accepted_types&#039; =&amp;gt; &#039;*&#039;));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Obtain the chosen file ====&lt;br /&gt;
&lt;br /&gt;
To get the contents of the file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$content = $mform-&amp;gt;get_file_content(&#039;userfile&#039;);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To get the name of the chosen file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$name = $mform-&amp;gt;get_new_filename(&#039;userfile&#039;);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To save the chosen file to the server filesystem (such as to moodledata folder):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$success = $mform-&amp;gt;save_file(&#039;userfile&#039;, $fullpath, $override);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To store the chosen file in the Moodle files pool:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$storedfile = $mform-&amp;gt;save_stored_file(&#039;userfile&#039;, ...);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== filemanager ===&lt;br /&gt;
&lt;br /&gt;
The File Manager element improves on file picker by allowing you to manage more than one file.  It is expected that the files will be stored permanently for future use (such as forum and glossary attachments).&lt;br /&gt;
&lt;br /&gt;
==== Add file manager element ====&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$mform-&amp;gt;addElement(&#039;filemanager&#039;, &#039;attachments&#039;, get_string(&#039;attachment&#039;, &#039;moodle&#039;), null,&lt;br /&gt;
                    array(&#039;subdirs&#039; =&amp;gt; 0, &#039;maxbytes&#039; =&amp;gt; $maxbytes, &#039;areamaxbytes&#039; =&amp;gt; 10485760, &#039;maxfiles&#039; =&amp;gt; 50,&lt;br /&gt;
                          &#039;accepted_types&#039; =&amp;gt; array(&#039;document&#039;), &#039;return_types&#039;=&amp;gt; FILE_INTERNAL | FILE_EXTERNAL));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here are the fields for filemanager:&lt;br /&gt;
&lt;br /&gt;
;&#039;filemanager&#039;:This is a filemanager element :)&lt;br /&gt;
;elementname:The unique name of the element in the form&lt;br /&gt;
;elementlabel:The label string that users see &lt;br /&gt;
;attributes:(leave it as null)&lt;br /&gt;
;options: an array of further options for the filepicker (see below)&lt;br /&gt;
&lt;br /&gt;
The options array can contain:&lt;br /&gt;
&lt;br /&gt;
;subdirs:(Default 1) Are subdirectories allowed?  (true or false)&lt;br /&gt;
;maxbytes:(Default 0) Restricts the size of each individual file.&lt;br /&gt;
;areamaxbytes:(Default 0) Restricts the total size of all the files.&lt;br /&gt;
;maxfiles:(Default -1) Restricts the total number of files.&lt;br /&gt;
;accepted_types:(Default *) You can specify what file types are accepted by filemanager.  All current file types are listed in this file: [http://cvs.moodle.org/moodle/lib/filestorage/file_types.mm moodle/lib/filestorage/file_types.mm].  This is a [http://freemind.sourceforge.net/wiki/index.php/Main_Page freemind] file: if it is edited the changes will be immediately reflected in Moodle.&lt;br /&gt;
&lt;br /&gt;
As of 2.3 file_types.mm is no longer used, instead the file types are listed in &amp;lt;code&amp;gt;get_mimetypes_array()&amp;lt;/code&amp;gt; in filelib.php (https://github.com/moodle/moodle/blob/master/lib/classes/filetypes.php).&lt;br /&gt;
&lt;br /&gt;
Example usage:  &#039;&#039;&#039;array(&#039;audio&#039;, &#039;video&#039;, &#039;document&#039;)&#039;&#039;&#039;, you can include file extensions as well, for example: &#039;&#039;&#039;array(&#039;.txt&#039;, &#039;.jpg&#039;, &#039;audio&#039;)&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Load existing files into draft area ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
if (empty($entry-&amp;gt;id)) {&lt;br /&gt;
    $entry = new stdClass;&lt;br /&gt;
    $entry-&amp;gt;id = null;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$draftitemid = file_get_submitted_draft_itemid(&#039;attachments&#039;);&lt;br /&gt;
&lt;br /&gt;
file_prepare_draft_area($draftitemid, $context-&amp;gt;id, &#039;mod_glossary&#039;, &#039;attachment&#039;, $entry-&amp;gt;id,&lt;br /&gt;
                        array(&#039;subdirs&#039; =&amp;gt; 0, &#039;maxbytes&#039; =&amp;gt; $maxbytes, &#039;maxfiles&#039; =&amp;gt; 50));&lt;br /&gt;
&lt;br /&gt;
$entry-&amp;gt;attachments = $draftitemid;&lt;br /&gt;
&lt;br /&gt;
$mform-&amp;gt;set_data($entry);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Store updated set of files ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
if ($data = $mform-&amp;gt;get_data()) {&lt;br /&gt;
    // ... store or update $entry&lt;br /&gt;
    file_save_draft_area_files($data-&amp;gt;attachments, $context-&amp;gt;id, &#039;mod_glossary&#039;, &#039;attachment&#039;,&lt;br /&gt;
                   $entry-&amp;gt;id, array(&#039;subdirs&#039; =&amp;gt; 0, &#039;maxbytes&#039; =&amp;gt; $maxbytes, &#039;maxfiles&#039; =&amp;gt; 50));&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===editor===&lt;br /&gt;
There are two ways of using the editor element in code, the first one is easier but expects some standardized fields. The second method is more low level.&lt;br /&gt;
&lt;br /&gt;
====Simple use====&lt;br /&gt;
# name database fields: &#039;&#039;textfield&#039;&#039;, &#039;&#039;textfieldformat&#039;&#039; (and &#039;&#039;textfieldtrust&#039;&#039; if required)&lt;br /&gt;
# create options array.  note that context is the best, most local context you have available.&lt;br /&gt;
#:&amp;lt;code php&amp;gt;$textfieldoptions = array(&#039;trusttext&#039;=&amp;gt;true, &#039;subdirs&#039;=&amp;gt;true, &#039;maxfiles&#039;=&amp;gt;$maxfiles, &#039;maxbytes&#039;=&amp;gt;$maxbytes, &#039;context&#039;=&amp;gt;$context);&amp;lt;/code&amp;gt;&lt;br /&gt;
# add editor &#039;&#039;textfield_editor&#039;&#039; to moodle form, pass options through custom data in form constructor, set $data-&amp;gt;id to null if data not exist yet&lt;br /&gt;
#:&amp;lt;code php&amp;gt;$mform-&amp;gt;addElement(&#039;editor&#039;, &#039;textfield_editor&#039;, get_string(&#039;fieldname&#039;, &#039;somemodule&#039;), null, $textfieldoptions);&amp;lt;/code&amp;gt;&lt;br /&gt;
# prepare data&lt;br /&gt;
#:&amp;lt;code php&amp;gt;$data = file_prepare_standard_editor($data, &#039;textfield&#039;, $textfieldoptions, $context, &#039;mod_somemodule&#039;, &#039;somearea&#039;, $data-&amp;gt;id);&amp;lt;/code&amp;gt;&lt;br /&gt;
# get submitted data and after inserting/updating of data&lt;br /&gt;
#:&amp;lt;code php&amp;gt;$data = file_postupdate_standard_editor($data, &#039;textfield&#039;, $textfieldoptions, $context, &#039;mod_somemodule&#039;, &#039;somearea&#039;, $data-&amp;gt;id);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Real world examples are in mod/glossary/edit.php and mod/glossary/comment.php&lt;br /&gt;
&lt;br /&gt;
====Low level use====&lt;br /&gt;
&lt;br /&gt;
When using editor element you  need to preprocess and postprocess the data:&lt;br /&gt;
# detect if form was already submitted (usually means draft is area already exists) - &#039;&#039;file_get_submitted_draft_itemid()&#039;&#039;&lt;br /&gt;
# prepare draft file area, temporary storage of all files attached to the text - &#039;&#039;file_prepare_draft_area()&#039;&#039;&lt;br /&gt;
# convert encoded relative links to absolute links - &#039;&#039;file_prepare_draft_area()&#039;&#039;&lt;br /&gt;
# create form and set current data&lt;br /&gt;
# after submission the changed files must be merged back into original area - &#039;&#039;file_save_draft_area_files()&#039;&#039;&lt;br /&gt;
# absolute links have to be replaced by relative links - &#039;&#039;file_save_draft_area_files()&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=====Replace old htmleditor with editor=====&lt;br /&gt;
&lt;br /&gt;
The file picker has been integrated with with TinyMCE to make the editor element. This new element should support all types on editors and should be able to switch them on-the-fly. Instances of the old htmleditor element in your forms should be replaced by the new editor element, this may need adding of new format and trusttext columns. For example:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$mform-&amp;gt;addElement(&#039;editor&#039;, &#039;entry&#039;, get_string(&#039;definition&#039;, &#039;glossary&#039;), null,&lt;br /&gt;
        array(&#039;maxfiles&#039; =&amp;gt; EDITOR_UNLIMITED_FILES));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
The editor element can take following options: maxfiles, maxbytes, subdirs and changeformat. Please note that the embedded files is optional feature and is not expected be used everywhere.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: the editor element now includes text format option. You should no longer use the separate format element type.&lt;br /&gt;
&lt;br /&gt;
=====Prepare current data - text and files=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
if (empty($entry-&amp;gt;id)) {&lt;br /&gt;
  $entry = new object();&lt;br /&gt;
  $entry-&amp;gt;id = null;&lt;br /&gt;
  $entry-&amp;gt;definition = &#039;&#039;;&lt;br /&gt;
  $entry-&amp;gt;format = FORMAT_HTML;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$draftid_editor = file_get_submitted_draft_itemid(&#039;entry&#039;);&lt;br /&gt;
$currenttext = file_prepare_draft_area($draftid_editor, $context-&amp;gt;id, &#039;mod_glossary&#039;, &#039;entry&#039;,&lt;br /&gt;
                                       $entry-&amp;gt;id, array(&#039;subdirs&#039;=&amp;gt;true), $entry-&amp;gt;definition);&lt;br /&gt;
$entry-&amp;gt;entry = array(&#039;text&#039;=&amp;gt;$currenttext, &#039;format&#039;=&amp;gt;$entry-&amp;gt;format, &#039;itemid&#039;=&amp;gt;$draftid_editor);&lt;br /&gt;
&lt;br /&gt;
$mform-&amp;gt;set_data($entry);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If there are multiple files, they will share the same itemid.&lt;br /&gt;
&lt;br /&gt;
=====Obtain text, format and save draft files=====&lt;br /&gt;
&lt;br /&gt;
To retrieve editor content, you need to use following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
if ($fromform = $mform-&amp;gt;get_data()) {&lt;br /&gt;
    // content of editor&lt;br /&gt;
    $messagetext = $fromform-&amp;gt;entry[&#039;text&#039;];&lt;br /&gt;
    // format of content&lt;br /&gt;
    $messageformat  = $fromform-&amp;gt;entry[&#039;format&#039;];&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When a user selects a file using the file picker, the file is initially stored in a draft file area, and a URL is inserted into the HTML in the editor that lets the person editing the content (but no one else) see the file.&lt;br /&gt;
&lt;br /&gt;
When the user submits the form, we then need to save the draft files to the correct place in permanent storage. (Just like you have to call $DB-&amp;gt;update_record(&#039;tablename&#039;, $data); to have the other parts of the form submission stored correctly.)&lt;br /&gt;
&lt;br /&gt;
The save_files_from_draft_area function and replace absolute links with internal relative links do:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$messagetext = file_save_draft_area_files($draftid_editor, $context-&amp;gt;id, &#039;mod_glossary&#039;, &#039;entry&#039;,&lt;br /&gt;
                                          $entry-&amp;gt;id, array(&#039;subdirs&#039;=&amp;gt;true), $messagetext);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
; $context-&amp;gt;id, &#039;component&#039;, &#039;proper_file_area&#039; and $entry-&amp;gt;id : correspond to the contextid, filearea and itemid columns in the [[File_API#Table:_files|files table]].&lt;br /&gt;
; $messagetext : this is the message text. As the files are saved to the real file area, the URLs in this content are rewritten.&lt;br /&gt;
&lt;br /&gt;
All URLs in content that point to files managed to the File API are converted to a form that starts &#039;@@PLUGINFILE@@/&#039; before the content is stored in the database. That is what we mean by rewriting.&lt;br /&gt;
&lt;br /&gt;
== File serving==&lt;br /&gt;
&lt;br /&gt;
=== Convert internal relative links to absolute links ===&lt;br /&gt;
&lt;br /&gt;
Before text content is displayed to the user, any URLs in the &#039;@@PLUGINFILE@@/&#039; form in the content need to be rewritten to the real URL where the user can access the files. &lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$messagetext = file_rewrite_pluginfile_urls($messagetext, &#039;pluginfile.php&#039;,&lt;br /&gt;
        $context-&amp;gt;id, &#039;mod_mymodule&#039;, &#039;proper_file_area&#039;, $itemid);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
; $messagetext : is the content containing the @@PLUGINFILE@@ URLs from the database.&lt;br /&gt;
; &#039;pluginfile.php&#039; : there are a number of different scripts that can serve files with different permissions checks. You need to specify which one to use.&lt;br /&gt;
; $context-&amp;gt;id, &#039;mod_mymodule&#039;, &#039;proper_file_area&#039;, $itemid : uniquely identifies the file area, as before.&lt;br /&gt;
&lt;br /&gt;
=== Implement file serving access control ===&lt;br /&gt;
&lt;br /&gt;
Attachments and embedded images should have the same access control like the text itself, in majority of cases these files are served using pluginfile.php. Access control is defined in &#039;&#039;module/lib.php&#039;&#039; file in function &#039;&#039;module_pluginfile()&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== File browsing support ==&lt;br /&gt;
Only owner of each file area is allowed to use low level File API function to access files, other parts of Moodle should use file browsing API.&lt;br /&gt;
&lt;br /&gt;
Activities may specify browsing support in own module/lib.php file by implementing functions module_get_file_areas() and module_get_file_info().&lt;br /&gt;
&lt;br /&gt;
== Upgrading your code ==&lt;br /&gt;
Here I will attempt to describe some simple steps you can take to upgrade your file-handling form elements from pre-2.0 code to 2.0. We will use the example of glossary, since it has been used above.&lt;br /&gt;
&lt;br /&gt;
=== Preparing your options ===&lt;br /&gt;
Unless you are happy with the defaults, you will need to define an array of options for each file-handling form element. You could define it at different places, but it&#039;s best to put it in one place and make the array(s) available to other files if they need it. In the majority of cases, this will be in a file like edit.php&lt;br /&gt;
&lt;br /&gt;
Previous code in mod/glossary/edit.php:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$mform =&amp;amp; new mod_glossary_entry_form(null, compact(&#039;cm&#039;, &#039;glossary&#039;, &#039;hook&#039;, &#039;mode&#039;, &#039;e&#039;, &#039;context&#039;));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
New code:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$maxbytes = $course-&amp;gt;maxbytes;&lt;br /&gt;
// Could also use $CFG-&amp;gt;maxbytes if you are not coding within a course context&lt;br /&gt;
&lt;br /&gt;
$definitionoptions = array(&#039;subdirs&#039;=&amp;gt;false, &#039;maxfiles&#039;=&amp;gt;99, &#039;maxbytes&#039;=&amp;gt;$maxbytes, &#039;trusttext&#039;=&amp;gt;true,&lt;br /&gt;
                           &#039;context&#039;=&amp;gt;$context);&lt;br /&gt;
$attachmentoptions = array(&#039;subdirs&#039;=&amp;gt;false, &#039;maxfiles&#039;=&amp;gt;99, &#039;maxbytes&#039;=&amp;gt;$maxbytes);&lt;br /&gt;
$mform = new mod_glossary_entry_form(null, array(&#039;current&#039;=&amp;gt;$entry, &#039;cm&#039;=&amp;gt;$cm, &#039;glossary&#039;=&amp;gt;$glossary,&lt;br /&gt;
                                                 &#039;definitionoptions&#039;=&amp;gt;$definitionoptions, &lt;br /&gt;
                                                 &#039;attachmentoptions&#039;=&amp;gt;$attachmentoptions));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Note that the data being passed to the form constructor have changed also, but this is not part of the file API changes, I just include them to avoid confusion.&lt;br /&gt;
&lt;br /&gt;
These options are for the htmleditor (definition field) and the filemanager (attachment field). They are used by a file called edit_form.php.&lt;br /&gt;
&lt;br /&gt;
=== Element preparation ===&lt;br /&gt;
Before we look at this, however, we need to &amp;quot;prepare&amp;quot; the elements so that they can correctly display existing embedded images and attached files when you are editing a record instead of just creating one. So, let&#039;s take the code we&#039;ve got so far in edit.php and add to it:&lt;br /&gt;
&lt;br /&gt;
Currently upgraded code in edit.php:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$mform = new mod_glossary_entry_form(null, array(&lt;br /&gt;
        &#039;current&#039;=&amp;gt;$entry, &lt;br /&gt;
        &#039;cm&#039;=&amp;gt;$cm, &lt;br /&gt;
        &#039;glossary&#039;=&amp;gt;$glossary,&lt;br /&gt;
        &#039;definitionoptions&#039;=&amp;gt;$definitionoptions, &lt;br /&gt;
        &#039;attachmentoptions&#039;=&amp;gt;$attachmentoptions));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
New code with element preparation:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$entry = file_prepare_standard_editor($entry, &#039;definition&#039;, $definitionoptions, $context,&lt;br /&gt;
                                      &#039;mod_glossary&#039;, &#039;entry&#039;, $entry-&amp;gt;id);&lt;br /&gt;
$entry = file_prepare_standard_filemanager($entry, &#039;attachment&#039;, $attachmentoptions, $context,&lt;br /&gt;
                                           &#039;mod_glossary&#039;, &#039;attachment&#039;, $entry-&amp;gt;id);&lt;br /&gt;
$mform = new mod_glossary_entry_form(null, array(&#039;current&#039;=&amp;gt;$entry, &#039;cm&#039;=&amp;gt;$cm, &#039;glossary&#039;=&amp;gt;$glossary,&lt;br /&gt;
                                                 &#039;definitionoptions&#039;=&amp;gt;$definitionoptions, &lt;br /&gt;
                                                 &#039;attachmentoptions&#039;=&amp;gt;$attachmentoptions));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Things to note:&lt;br /&gt;
* $entry in this case is simply a stdClass object which may either represent a new glossary entry or an existing one.&lt;br /&gt;
* $entry-&amp;gt;id must be the unique identifier for the current object. If we are creating a new entry, it will be null, but in all cases it must be defined.&lt;br /&gt;
* These two functions (file_prepare_standard_editor and file_prepare_standard_filemanager) are shortcuts functions that take care of some of the tedious setting up for you, but they make a couple of assumptions:&lt;br /&gt;
*# You &#039;&#039;&#039;must&#039;&#039;&#039; name the form element as {element}_editor or {element}_filemanager (see next section)&lt;br /&gt;
*# You &#039;&#039;&#039;must&#039;&#039;&#039; have at least the following fields in the database: {element} and {element}summary, as described earlier in this documentation&lt;br /&gt;
&lt;br /&gt;
We can now look at the upgrades needed in the form definition file.&lt;br /&gt;
&lt;br /&gt;
=== Form definition ===&lt;br /&gt;
Previous code in mod/glossary/edit_form.php:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$mform-&amp;gt;addElement(&#039;htmleditor&#039;, &#039;definition&#039;, get_string(&#039;definition&#039;, &#039;glossary&#039;),&lt;br /&gt;
                    array(&#039;rows&#039;=&amp;gt;20));&lt;br /&gt;
$mform-&amp;gt;setType(&#039;definition&#039;, PARAM_RAW);&lt;br /&gt;
$mform-&amp;gt;addRule(&#039;definition&#039;, null, &#039;required&#039;, null, &#039;client&#039;);&lt;br /&gt;
$mform-&amp;gt;setHelpButton(&#039;definition&#039;, array(&#039;writing&#039;, &#039;richtext&#039;), false, &#039;editorhelpbutton&#039;);&lt;br /&gt;
$mform-&amp;gt;addElement(&#039;format&#039;);&lt;br /&gt;
// a bit further...&lt;br /&gt;
$this-&amp;gt;set_upload_manager(new upload_manager(&#039;attachment&#039;, true, false, $COURSE, false, 0,&lt;br /&gt;
                                             true, true, false));&lt;br /&gt;
$mform-&amp;gt;addElement(&#039;file&#039;, &#039;attachment&#039;, get_string(&#039;attachment&#039;, &#039;forum&#039;));&lt;br /&gt;
$mform-&amp;gt;setHelpButton(&#039;attachment&#039;, array(&#039;attachment&#039;, get_string(&#039;attachment&#039;, &#039;glossary&#039;),&lt;br /&gt;
                      &#039;glossary&#039;));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
New code:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$definitionoptions = $this-&amp;gt;_customdata[&#039;definitionoptions&#039;];&lt;br /&gt;
$attachmentoptions = $this-&amp;gt;_customdata[&#039;attachmentoptions&#039;];&lt;br /&gt;
// a bit further...&lt;br /&gt;
$mform-&amp;gt;addElement(&#039;editor&#039;, &#039;definition_editor&#039;, get_string(&#039;definition&#039;, &#039;glossary&#039;), null,&lt;br /&gt;
                   $definitionoptions);&lt;br /&gt;
$mform-&amp;gt;setType(&#039;definition_editor&#039;, PARAM_RAW);&lt;br /&gt;
$mform-&amp;gt;addRule(&#039;definition_editor&#039;, get_string(&#039;required&#039;), &#039;required&#039;, null, &#039;client&#039;);&lt;br /&gt;
// a bit further...&lt;br /&gt;
$mform-&amp;gt;addElement(&#039;filemanager&#039;, &#039;attachment_filemanager&#039;, get_string(&#039;attachment&#039;, &#039;glossary&#039;),&lt;br /&gt;
                   null, $attachmentoptions);&lt;br /&gt;
$mform-&amp;gt;setHelpButton(&#039;attachment_filemanager&#039;, array(&#039;attachment2&#039;,&lt;br /&gt;
                      get_string(&#039;attachment&#039;, &#039;glossary&#039;), &#039;glossary&#039;));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note the following:&lt;br /&gt;
* The format element and the help button are no longer required for the HTML editor element&lt;br /&gt;
* The name of the form element needs to be changed by adding &#039;_editor&#039; or &#039;_manager&#039; to the original name. This is a naming convention that is used by a couple of functions we will look at shortly&lt;br /&gt;
* Make sure $definitionoptions has context parameter, else system context is used and editor will not respect filter settings.&lt;br /&gt;
&lt;br /&gt;
=== Handling submitted data ===&lt;br /&gt;
The final step is to handle the submitted data properly, i.e. retrieve the files and save them to disk, associating them with the record we have just created (a glossary entry in our example). This happens in edit.php:&lt;br /&gt;
&lt;br /&gt;
Previous code in edit.php:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
// Section that updates an entry:&lt;br /&gt;
$todb-&amp;gt;id = $e;&lt;br /&gt;
$dir = glossary_file_area_name($todb);&lt;br /&gt;
if ($mform-&amp;gt;save_files($dir) and $newfilename = $mform-&amp;gt;get_new_filename()) {&lt;br /&gt;
    $todb-&amp;gt;attachment = $newfilename;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Section that adds an entry:&lt;br /&gt;
if ($todb-&amp;gt;id = insert_record(&amp;quot;glossary_entries&amp;quot;, $todb)) {&lt;br /&gt;
    $e = $todb-&amp;gt;id;&lt;br /&gt;
    $dir = glossary_file_area_name($todb);&lt;br /&gt;
    if ($mform-&amp;gt;save_files($dir) and $newfilename = $mform-&amp;gt;get_new_filename()) {&lt;br /&gt;
        set_field(&amp;quot;glossary_entries&amp;quot;, &amp;quot;attachment&amp;quot;, $newfilename, &amp;quot;id&amp;quot;, $todb-&amp;gt;id);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
New code:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
// $todb was renamed to $entry, and the code was refactored &lt;br /&gt;
// so that the file-handling code is only used once for either an add or an update action.&lt;br /&gt;
// If an entry is being added, $DB-&amp;gt;insert() has already been called, so we have a valid $entry-&amp;gt;id&lt;br /&gt;
$entry = file_postupdate_standard_editor($entry, &#039;definition&#039;, $definitionoptions, $context,&lt;br /&gt;
                                         &#039;mod_glossary&#039;, &#039;entry&#039;, $entry-&amp;gt;id);&lt;br /&gt;
$entry = file_postupdate_standard_filemanager($entry, &#039;attachment&#039;, $attachmentoptions, $context,&lt;br /&gt;
                                              &#039;mod_glossary&#039;, &#039;attachment&#039;, $entry-&amp;gt;id);&lt;br /&gt;
// store the updated value values&lt;br /&gt;
$DB-&amp;gt;update_record(&#039;glossary_entries&#039;, $entry);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Things to note:&lt;br /&gt;
* If you are adding a new record, you will still need to call update_record after calling the file_postupdate* functions&lt;br /&gt;
&lt;br /&gt;
=== Gotchas ===&lt;br /&gt;
A few things to keep in mind:&lt;br /&gt;
* Make sure that you instantiate the moodle form before any call to $OUTPUT-&amp;gt;header()&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[File API]]&lt;br /&gt;
* [[Using the file API]]&lt;br /&gt;
* [[Repository plugins]]&lt;br /&gt;
* [[Portfolio API]]&lt;br /&gt;
* MDL-14589 - File API Meta issue&lt;br /&gt;
* [https://moodle.org/mod/forum/discuss.php?d=207748 Adding a text editor to a Moodle form]&lt;br /&gt;
* [https://moodle.org/mod/forum/discuss.php?d=157953#p692822 Button actions in Moodle form]&lt;br /&gt;
* [https://moodle.org/mod/forum/discuss.php?d=351013#p1416554 File Picker]&lt;br /&gt;
* [https://github.com/CARLOSEDUARDOVIEIRA/moodle-uploadfile Example of filemanager in an activity module]&lt;br /&gt;
&lt;br /&gt;
[[Category:Files]]&lt;br /&gt;
[[Category:Repositories]]&lt;/div&gt;</summary>
		<author><name>Danielneis</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Writing_PHPUnit_tests&amp;diff=54641</id>
		<title>Writing PHPUnit tests</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Writing_PHPUnit_tests&amp;diff=54641"/>
		<updated>2018-08-20T17:50:20Z</updated>

		<summary type="html">&lt;p&gt;Danielneis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Moodle 2.3}}&lt;br /&gt;
&lt;br /&gt;
Moodle PHPUnit integration is designed to allow easy adding of new tests. At the start of each test the state is automatically reset to fresh new installation (unless explicitly told not to reset).&lt;br /&gt;
&lt;br /&gt;
=Testcase classes=&lt;br /&gt;
&lt;br /&gt;
There are three basic test class that are supposed to used in all Moodle unit tests - basic_testcase, advanced_testcase and provider_testcase. &#039;&#039;&#039;Please note it is strongly recommended to put only one testcase into each class file.&#039;&#039;&#039;&lt;br /&gt;
;basic_testcase : Very simple tests that do not modify database, dataroot or any PHP globals. It can be used for example when trying examples from the official PHPUnit tutorial.&lt;br /&gt;
;advanced_testcase : Enhanced testcase class enhanced for easy testing of Moodle code.&lt;br /&gt;
;provider_testcase: Enhanced testcase class, enhanced for easy testing of [[Privacy API|Privacy Providers]].&lt;br /&gt;
&lt;br /&gt;
There is a fourth testcase class that is specially designed for testing of our Moodle database layer, it should not be used for other purposes.&lt;br /&gt;
&lt;br /&gt;
== Assertions ==&lt;br /&gt;
&lt;br /&gt;
The complete list of assertions can be found in the [http://www.phpunit.de/manual/3.7/en/appendixes.assertions.html phpunit manual].&lt;br /&gt;
==Sample plugin testcase==&lt;br /&gt;
&lt;br /&gt;
PHPUnit tests are located in &amp;lt;code&amp;gt;tests/*_test.php&amp;lt;/code&amp;gt; files in your plugin, for example mod/myplugin/tests/sample_test.php, the file should contain only one class that extends &amp;lt;code&amp;gt;advanced_testcase&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
 class mod_myplugin_sample_testcase extends advanced_testcase {&lt;br /&gt;
     public function test_adding() {&lt;br /&gt;
         $this-&amp;gt;assertEquals(2, 1+2);&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [[PHPUnit integration#Class and file naming rules]] for more information.&lt;br /&gt;
&lt;br /&gt;
==Inclusion of Moodle library files==&lt;br /&gt;
&lt;br /&gt;
If you want to include some Moodle library files you should always declare &#039;&#039;&#039;global $CFG&#039;&#039;&#039;. The reason is that testcase files may be included from non-moodle code which does not make the global $CFG available automatically.&lt;br /&gt;
&lt;br /&gt;
==Automatic state reset==&lt;br /&gt;
By default after each test Moodle database and dataroot is automatically reset to the original state which was present right after installation. make sure to use $this-&amp;gt;resetAfterTest() to indicate that the database or changes of standard global variables are expected.&lt;br /&gt;
&lt;br /&gt;
If you received the error &amp;quot;Warning: unexpected database modification, resetting DB state&amp;quot; it is because the test is not using $this-&amp;gt;resetAfterTest().&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
 class mod_myplugin_testcase extends advanced_testcase {&lt;br /&gt;
     public function test_deleting() {&lt;br /&gt;
         global $DB;&lt;br /&gt;
         $this-&amp;gt;resetAfterTest(true);&lt;br /&gt;
         $DB-&amp;gt;delete_records(&#039;user&#039;);&lt;br /&gt;
         $this-&amp;gt;assertEmpty($DB-&amp;gt;get_records(&#039;user&#039;));&lt;br /&gt;
     }&lt;br /&gt;
     public function test_user_table_was_reset() {&lt;br /&gt;
         global $DB;&lt;br /&gt;
         $this-&amp;gt;assertEquals(2, $DB-&amp;gt;count_records(&#039;user&#039;, array()));&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Generators=&lt;br /&gt;
&lt;br /&gt;
Tests that need to modify default installation may use generators to create new courses, users, etc. All examples on this page should be used from test methods of a test class derived from advanced_testcase.&lt;br /&gt;
&lt;br /&gt;
Note if you are using PHPUnit [https://phpunit.de/manual/current/en/writing-tests-for-phpunit.html#writing-tests-for-phpunit.data-providers @dataProvider] functions to provide parameters to unit tests, you can not use the data generator or change the user etc in the data provider function.&lt;br /&gt;
&lt;br /&gt;
==Creating users==&lt;br /&gt;
At the start of each test there are only two users present - guest and administrator. If you need to add more test accounts use:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
 $user = $this-&amp;gt;getDataGenerator()-&amp;gt;create_user();&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may also specify properties of the user account, for example:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
 $user1 = $this-&amp;gt;getDataGenerator()-&amp;gt;create_user(array(&#039;email&#039;=&amp;gt;&#039;user1@example.com&#039;, &#039;username&#039;=&amp;gt;&#039;user1&#039;));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By default no user is logged-in, use setUser() method to change current $USER value:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
 $this-&amp;gt;setUser($user1);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Guest and admin accounts have a shortcut methods:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
 $this-&amp;gt;setGuestUser();&lt;br /&gt;
 $this-&amp;gt;setAdminUser();&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Null can be used to set current user back to not-logged-in:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
 $this-&amp;gt;setUser(null);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Creating course categories==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
 $category1 = $this-&amp;gt;getDataGenerator()-&amp;gt;create_category();&lt;br /&gt;
 $category2 = $this-&amp;gt;getDataGenerator()-&amp;gt;create_category(array(&#039;name&#039;=&amp;gt;&#039;Some subcategory&#039;, &#039;parent&#039;=&amp;gt;$category1-&amp;gt;id));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Creating courses==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
 $course1 = $this-&amp;gt;getDataGenerator()-&amp;gt;create_course();&lt;br /&gt;
 &lt;br /&gt;
 $category = $this-&amp;gt;getDataGenerator()-&amp;gt;create_category();&lt;br /&gt;
 $course2 = $this-&amp;gt;getDataGenerator()-&amp;gt;create_course(array(&#039;name&#039;=&amp;gt;&#039;Some course&#039;, &#039;category&#039;=&amp;gt;$category-&amp;gt;id));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Creating activities==&lt;br /&gt;
&lt;br /&gt;
Some activity plugins include instance generators. The generator class are defined in plugindirectory/tests/generator/lib.php.&lt;br /&gt;
&lt;br /&gt;
Example of creation of new course with one page resource:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
 $course = $this-&amp;gt;getDataGenerator()-&amp;gt;create_course();&lt;br /&gt;
 $generator = $this-&amp;gt;getDataGenerator()-&amp;gt;get_plugin_generator(&#039;mod_page&#039;);&lt;br /&gt;
 $generator-&amp;gt;create_instance(array(&#039;course&#039;=&amp;gt;$course-&amp;gt;id));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following is functionally the same, but a bit shorter:&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
 $course = $this-&amp;gt;getDataGenerator()-&amp;gt;create_course();&lt;br /&gt;
 $page = $this-&amp;gt;getDataGenerator()-&amp;gt;create_module(&#039;page&#039;, array(&#039;course&#039; =&amp;gt; $course-&amp;gt;id));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Creating cohorts==&lt;br /&gt;
{{Moodle 2.4}}&lt;br /&gt;
Since 2.4 there the data generator supports creation of new cohorts.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
 $cohort = $this-&amp;gt;getDataGenerator()-&amp;gt;create_cohort();&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Simplified user enrolments==&lt;br /&gt;
{{Moodle 2.4}}&lt;br /&gt;
Instead of standard enrolment API it is possible to use simplified method in data generator. It is intended to be used with self and manual enrolment plugins.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$this-&amp;gt;getDataGenerator()-&amp;gt;enrol_user($userid, $courseid);&lt;br /&gt;
$this-&amp;gt;getDataGenerator()-&amp;gt;enrol_user($userid, $courseid, $teacherroleid);&lt;br /&gt;
$this-&amp;gt;getDataGenerator()-&amp;gt;enrol_user($userid, $courseid, $teacherroleid, &#039;manual&#039;);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Creating scales==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$this-&amp;gt;getDataGenerator()-&amp;gt;create_scale();&lt;br /&gt;
$this-&amp;gt;getDataGenerator()-&amp;gt;create_scale(array(&#039;name&#039; =&amp;gt; $name, &#039;scale&#039; =&amp;gt; $scale, &#039;courseid&#039; =&amp;gt; $courseid, &#039;userid&#039; =&amp;gt; $userid, &#039;description&#039; =&amp;gt; description, &#039;descriptionformat&#039; =&amp;gt; $descriptionformat));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Creating roles==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$this-&amp;gt;getDataGenerator()-&amp;gt;create_role();&lt;br /&gt;
$this-&amp;gt;getDataGenerator()-&amp;gt;create_role(array(&#039;shortname&#039; =&amp;gt; $shortname, &#039;name&#039; =&amp;gt; $name, &#039;description&#039; =&amp;gt; description, &#039;archetype&#039; =&amp;gt; $archetype));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Creating tags==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$this-&amp;gt;getDataGenerator()-&amp;gt;create_tag();&lt;br /&gt;
$this-&amp;gt;getDataGenerator()-&amp;gt;create_tag(array(&lt;br /&gt;
    &#039;userid&#039; =&amp;gt; $userid, &lt;br /&gt;
    &#039;rawname&#039; =&amp;gt; $rawname,&lt;br /&gt;
    &#039;name&#039; =&amp;gt; $name, &lt;br /&gt;
    &#039;description&#039; =&amp;gt; $description, &lt;br /&gt;
    &#039;descriptionformat&#039; =&amp;gt; $descriptionformat,&lt;br /&gt;
    &#039;flag&#039; =&amp;gt; $flag&lt;br /&gt;
));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Groups==&lt;br /&gt;
&lt;br /&gt;
===Creating groups===&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$this-&amp;gt;getDataGenerator()-&amp;gt;create_group(array(&#039;courseid&#039; =&amp;gt; $courseid));&lt;br /&gt;
$this-&amp;gt;getDataGenerator()-&amp;gt;create_group(array(&#039;courseid&#039; =&amp;gt; $courseid, &#039;name&#039; =&amp;gt; $name, &#039;description&#039; =&amp;gt; $description, &#039;descriptionformat&#039; =&amp;gt; $descriptionformat));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Adding users to groups===&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$this-&amp;gt;getDataGenerator()-&amp;gt;create_group_member(array(&#039;userid&#039; =&amp;gt; $userid, &#039;groupid&#039; =&amp;gt; $groupid));&lt;br /&gt;
$this-&amp;gt;getDataGenerator()-&amp;gt;create_group_member(array(&#039;userid&#039; =&amp;gt; $userid, &#039;groupid&#039; =&amp;gt; $groupid, &#039;component&#039; =&amp;gt; $component, &#039;itemid&#039; =&amp;gt; $itemid));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Creating groupings===&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$this-&amp;gt;getDataGenerator()-&amp;gt;create_grouping(array(&#039;courseid&#039; =&amp;gt; $courseid));&lt;br /&gt;
$this-&amp;gt;getDataGenerator()-&amp;gt;create_grouping(array(&#039;courseid&#039; =&amp;gt; $courseid, &#039;name&#039; =&amp;gt; $name, &#039;description&#039; =&amp;gt; $description, &#039;descriptionformat&#039; =&amp;gt; $descriptionformat));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Adding groups to groupings===&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$this-&amp;gt;getDataGenerator()-&amp;gt;create_grouping_group(array(&#039;groupingid&#039; =&amp;gt; $groupingid, &#039;groupid&#039; =&amp;gt; $groupid));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Repositories==&lt;br /&gt;
&lt;br /&gt;
===Creating repository instances===&lt;br /&gt;
{{Moodle 2.5}}&lt;br /&gt;
Some respository plugins include instance generators. The generator class are defined in plugindirectory/tests/generator/lib.php..&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$this-&amp;gt;getDataGenerator()-&amp;gt;create_repository($type, $record, $options);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Creating repository types===&lt;br /&gt;
{{Moodle 2.5}}&lt;br /&gt;
Some respository plugins include type generators. The generator class are defined in plugindirectory/tests/generator/lib.php..&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$this-&amp;gt;getDataGenerator()-&amp;gt;create_repository_type($type, $record, $options);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Creating grades==&lt;br /&gt;
&lt;br /&gt;
===Grade categories===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$this-&amp;gt;getDataGenerator()-&amp;gt;create_grade_category(array(&#039;courseid&#039; =&amp;gt; $courseid));&lt;br /&gt;
$this-&amp;gt;getDataGenerator()-&amp;gt;create_grade_category(array(&#039;courseid&#039; =&amp;gt; $courseid, &#039;fullname&#039; =&amp;gt; $fullname));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Grade items===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$this-&amp;gt;getDataGenerator()-&amp;gt;create_grade_item();&lt;br /&gt;
$this-&amp;gt;getDataGenerator()-&amp;gt;create_grade_item(array(&#039;itemtype&#039; =&amp;gt; $itemtype, &#039;itemname&#039; =&amp;gt; $itemname, &#039;outcomeid&#039; =&amp;gt; $outcomeid, &#039;scaleid&#039; =&amp;gt; $scaleid, &#039;gradetype&#039; =&amp;gt; $gradetype));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Outcomes===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$this-&amp;gt;getDataGenerator()-&amp;gt;create_grade_outcome();&lt;br /&gt;
$this-&amp;gt;getDataGenerator()-&amp;gt;create_grade_item(array(&#039;fullname&#039; =&amp;gt; $fullname));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Other types of plugin==&lt;br /&gt;
{{Moodle 2.5}}&lt;br /&gt;
Any other type of plugin can have a generator. The generator class should extend component_generator_base, and then you can get an instance using $mygenerator = $this-&amp;gt;getDataGenerator()-&amp;gt;get_plugin_generator($frankenstylecomponentname);&lt;br /&gt;
&lt;br /&gt;
For some types of plugin, like mod documented above, there may be a more specific class than component_generator_base to extend, like testing_module_generator. That will give a consistent set of method names to use. Otherwise, you can create whatever methods you like on your generator, to create the different things you need to work whith.&lt;br /&gt;
&lt;br /&gt;
=Long tests=&lt;br /&gt;
&lt;br /&gt;
All standard test should execute as fast as possible. Tests that take a loner time to execute (&amp;gt;10s) or are otherwise expensive (such as querying external servers that might be flooded by all dev machines) should be execute only when PHPUNIT_LONGTEST is true. This constant can be set in phpunit.xml or directly in config.php.&lt;br /&gt;
&lt;br /&gt;
=Large test data=&lt;br /&gt;
See advanced_testcase::createXMLDataSet() and advanced_testcase::createCsvDataSet() and related functions there for easier ways to manage large test data sets within files rather than arrays in code. See [[PHPUnit_integration#Extra_methods]]&lt;br /&gt;
&lt;br /&gt;
=Testing sending of messages=&lt;br /&gt;
{{Moodle 2.4}}&lt;br /&gt;
You can temporarily redirect all messages sent via message_send() to a message sink object. This allows developers to verify that the tested code is sending expected messages.&lt;br /&gt;
&lt;br /&gt;
To test code using messaging first disable the use of transactions and then redirect the messaging into a new message sink, you can inspect the results later.&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$this-&amp;gt;preventResetByRollback();&lt;br /&gt;
$sink = $this-&amp;gt;redirectMessages();&lt;br /&gt;
//... code that is sending messages&lt;br /&gt;
$messages = $sink-&amp;gt;get_messages();&lt;br /&gt;
$this-&amp;gt;assertEquals(3, count($messages));&lt;br /&gt;
//.. test messages were generated in correct order with appropriate content&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Testing sending of emails=&lt;br /&gt;
{{Moodle 2.6}}&lt;br /&gt;
You can temporarily redirect emails sent via email_to_user() to a email message sink object. This allows developers to verify that the tested code is sending expected emails.&lt;br /&gt;
&lt;br /&gt;
To test code using messaging first unset &#039;noemailever&#039; setting and then redirect the emails into a new message sink where you can inspect the results later.&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
unset_config(&#039;noemailever&#039;);&lt;br /&gt;
$sink = $this-&amp;gt;redirectEmails();&lt;br /&gt;
//... code that is sending email&lt;br /&gt;
$messages = $sink-&amp;gt;get_messages();&lt;br /&gt;
$this-&amp;gt;assertEquals(1, count($messages));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Logstores=&lt;br /&gt;
You can test events which were written to a logstore, but you must disable transactions, enable at least one valid logstore, and disable logstore buffering to ensure that the events are written to the database before the tests execute.&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$this-&amp;gt;preventResetByRollback();&lt;br /&gt;
set_config(&#039;enabled_stores&#039;, &#039;logstore_standard&#039;, &#039;tool_log&#039;);&lt;br /&gt;
set_config(&#039;buffersize&#039;, 0, &#039;logstore_standard&#039;);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Best practice=&lt;br /&gt;
&lt;br /&gt;
There are several best practices, suggestions, and things to avoid which you should consider when writing unit tests. Some of these are described below.&lt;br /&gt;
&lt;br /&gt;
==Keep use of resetAfterTest to a minimum==&lt;br /&gt;
Although many of the examples described above use the &amp;lt;code&amp;gt;resetAfterTest&amp;lt;/code&amp;gt; nomenclature to reset the database and filesystem after your test completes, you should ideally not use this unless you have to.&lt;br /&gt;
Generally speaking you should aim to write code which is mockable, and does not require real fixtures.&lt;br /&gt;
Use of resetAfterTest will also slow your tests down.&lt;br /&gt;
&lt;br /&gt;
==Be careful with shared setUp and instance variables== &lt;br /&gt;
&lt;br /&gt;
You should be careful of how you create and use instance variables in PHPUnit tests for two main reasons:&lt;br /&gt;
&lt;br /&gt;
Firstly, if you create any fixtures in the setUp, or call the resetAfterTest function, these fixtures and conditions will apply for _all_ tests in the testsuite.&lt;br /&gt;
You will not be able to add another test to the suite which does not require these conditions without those conditions being fulfilled anyway.&lt;br /&gt;
This can lead to slow tests.&lt;br /&gt;
&lt;br /&gt;
Secondly, because of the way in which PHPUnit operates. it creates an instance of each testcase during its bootstrap phase. These are stored in memory until the _entire suite_ completes.&lt;br /&gt;
This means that any fixture which is setup and not actively discarded will not be garbage collected and lead to memory bloat.&lt;br /&gt;
In severe cases this can lead to memory exhaustion.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Make use of the dataProvider functionality==&lt;br /&gt;
&lt;br /&gt;
The dataProvider functionality of PHPUnit is an extremely powerful and useful feature which allows you to verify a function quickly and easily with a range of different conditions.&lt;br /&gt;
However, the following rules should be followed when using dataProviders:&lt;br /&gt;
* Keep addition of resettable data requring resetAfterTest to a minimum - this will lead to many slow tests&lt;br /&gt;
* You can only _describe_ data in a dataProvider, you cannot create the data. The dataProvider is called after the testSuite is instantiated, but before any tests are run. Each test will run a full setUp and tearDown, which will destroy any data which was created.&lt;br /&gt;
=Extra test settings=&lt;br /&gt;
&lt;br /&gt;
Usually the test should not interact with any external systems and it should work the same on all systems. But sometimes you need to specify some option for connection to external systems or system configuration. It is intentionally not possible to use $CFG settings from config.php.&lt;br /&gt;
&lt;br /&gt;
There are several ways how to inject your custom settings:&lt;br /&gt;
* define test setting constants in your phpunit.xml file&lt;br /&gt;
* define test setting constants in your config.php&lt;br /&gt;
&lt;br /&gt;
These constants may be then used in your test or plugin code.&lt;br /&gt;
&lt;br /&gt;
=Upgrading unit tests to work with Moodle 3.4 and up (PHPUnit 6)=&lt;br /&gt;
{{Moodle 3.4}}&lt;br /&gt;
&lt;br /&gt;
With Moodle 3.4, &#039;&#039;&#039;PHPUnit was upgraded to 6.4&#039;&#039;&#039; (from 5.5 being used in older version). This was done to better align the testing environment with PHP versions supported by Moodle 3.4 (7.0, 7.1 and 7.2). (see MDL-60611 and linked issues for more details). While internally [https://github.com/sebastianbergmann/phpunit/wiki/Release-Announcement-for-PHPUnit-6.0.0#backwards-compatibility-issues a lot of things changed with PHPUnit 6] (namespaced classes being the more noticeable), thanks to our &#039;&#039;&#039;wrapping layer&#039;&#039;&#039; (basic and advanced testcases...) impact expected into old existing unit tests is expected to be reduced and upgrades, easy to achieve.&lt;br /&gt;
&lt;br /&gt;
Still, in &#039;&#039;&#039;some cases, it will impossible to maintain compatibility&#039;&#039;&#039; of tests between old (pre 3.4) tests and new ones, especially &#039;&#039;&#039;when direct use of any phpunit class is performed&#039;&#039;&#039;. Luckily, both travis and CI tests will detect this situation and it shouldn&#039;t be hard to keep all supported branches in core passing ok. Plugins may be trickier, if the same branch is attempting to work against multiple core branches and they are using some phpunit class directly.&lt;br /&gt;
&lt;br /&gt;
To find more information about the changes coming with PHPUnit 6, it&#039;s recommended to read the following resources:&lt;br /&gt;
* [https://thephp.cc/news/2017/02/migrating-to-phpunit-6 A very good mini-guide] showing all the important changes.&lt;br /&gt;
* [https://github.com/sebastianbergmann/phpunit/wiki/Release-Announcement-for-PHPUnit-6.0.0#backwards-compatibility-issues PHPUnit 6 release Announcement].&lt;br /&gt;
* [https://github.com/sebastianbergmann/phpunit/blob/6.0/ChangeLog-6.0.md#600---2017-02-03 Detailed changelog of the release], paying special attention to the changed and deleted sections.&lt;br /&gt;
* Changes performed into core, mainly: namespace class renaming ([https://github.com/moodle/moodle/commit/801a372dadb6e11c8781547603e3f0a59ce5638f 801a372]) and deprecated stuff ([https://github.com/moodle/moodle/commit/796e48a58bf18533bdca423fff7949ab119101c4 796e48a])&lt;br /&gt;
&lt;br /&gt;
=See also=&lt;br /&gt;
* [[PHPUnit integration]]&lt;br /&gt;
* [[PHPUnit]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Unit testing]]&lt;/div&gt;</summary>
		<author><name>Danielneis</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Security:Session_fixation&amp;diff=54640</id>
		<title>Security:Session fixation</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Security:Session_fixation&amp;diff=54640"/>
		<updated>2018-08-20T12:54:52Z</updated>

		<summary type="html">&lt;p&gt;Danielneis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{stub}}&lt;br /&gt;
&lt;br /&gt;
This page forms part of the [[Security|Moodle security guidelines]].&lt;br /&gt;
&lt;br /&gt;
==What is the danger?==&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Session Fixation is an attack that permits an attacker to hijack a valid user session. (...) . The attack consists of obtaining a valid session ID (e.g. by connecting to the application), inducing a user to authenticate himself with that session ID, and then hijacking the user-validated session by the knowledge of the used session ID. The attacker has to provide a legitimate Web application session ID and try to make the victim&#039;s browser use it. (...) The session fixation attack is a class of Session Hijacking, which steals the established session between the client and the Web Server after the user logs in. Instead, the Session Fixation attack fixes an established session on the victim&#039;s browser, so the attack starts before the user logs in.  &amp;quot; (OWASP - Session fixation) &lt;br /&gt;
&lt;br /&gt;
==How Moodle avoids this problem==&lt;br /&gt;
&lt;br /&gt;
==What you need to do in your code==&lt;br /&gt;
&lt;br /&gt;
==What you need to do as an administrator==&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [[Security]]&lt;br /&gt;
* [[Coding]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Security]]&lt;/div&gt;</summary>
		<author><name>Danielneis</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=XMLDB_editor&amp;diff=54637</id>
		<title>XMLDB editor</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=XMLDB_editor&amp;diff=54637"/>
		<updated>2018-08-17T13:55:58Z</updated>

		<summary type="html">&lt;p&gt;Danielneis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Location: &#039;&#039;Site administration &amp;gt; Development &amp;gt; XMLDB editor&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*The XMLDB editor is a tool for making the .xml files that specify how moodle should set up its database tables. Previously, developers had to make separate .sql install files for mysql and postgres, but now only database-neutral file is needed, which supports many more databases.&lt;br /&gt;
&lt;br /&gt;
*It makes the editing of tables/fields/keys/indexes almost a trivial task, allowing developers to spend  the time coding and improving things instead of fighting with XML files and the errors caused by manual editing (of course, developers are free to use such extra time as desired - beers, dance, books, music...) ;-)&lt;br /&gt;
&lt;br /&gt;
*All new &#039;&#039;install.xml&#039;&#039; files present under each &#039;&#039;db&#039;&#039; directory in Moodle can be edited (and we recommend it) with just some clicks and keystrokes. Those &#039;&#039;install.xml&#039;&#039; will contain all the info needed to generate the specific objects needed for each RDBMS supported. &lt;br /&gt;
&lt;br /&gt;
*Note: To be able to handle files properly, the web server needs write access to all &#039;&#039;db&#039;&#039; directories where the &#039;&#039;install.xml&#039;&#039; files reside (and to the files themselves, of course). If you cannot click either the load or create link, that means that you either have not created the /db directory, or that it is not writeable by the webserver.&lt;br /&gt;
&lt;br /&gt;
== Quick Start ==&lt;br /&gt;
&lt;br /&gt;
To use the XMLDB editor to create tables for a new plugin:&lt;br /&gt;
&lt;br /&gt;
TIP for moodle ver 2.8: it would seem you need a &amp;quot;version.php&amp;quot; and a &amp;quot;settings.php&amp;quot; file within your mod/mymodule/ folder, along with a &amp;quot;db&amp;quot; folder that has &amp;quot;WRITE PERMISSION&amp;quot; inside your mod/mymodule/ folder. i assume the 2 files version.php and settings.php are for security, so XMLDB editor does not get abused some how. i would also assume settings.php and version.php need to be filled out to some extent. if you have above things, then you should be able to find your &amp;quot;mod/mymodule/&amp;quot; and be able to click the &amp;quot;create&amp;quot; link.&lt;br /&gt;
&lt;br /&gt;
# Under your plugin&#039;s directory, create a &#039;&#039;&#039;&amp;lt;code&amp;gt;db&amp;lt;/code&amp;gt;&#039;&#039;&#039; directory, e.g. &#039;&#039;&#039;&amp;lt;code&amp;gt;mod/mymodule/db&amp;lt;/code&amp;gt;&#039;&#039;&#039;. Make sure the web server has write access to this directory.&lt;br /&gt;
# In Moodle, navigate to Site administration-&amp;gt;Development-&amp;gt;XMLDB editor&lt;br /&gt;
# You should now see &#039;&#039;&#039;&amp;lt;code&amp;gt;mod/mymodule/db&amp;lt;/code&amp;gt;&#039;&#039;&#039; in the list of XMLDB locations, and the &#039;&#039;&#039;Create&#039;&#039;&#039; link should now be clickable. (If you see your directory but none of the links are clickable, make sure the web server has write access to this directory!)&lt;br /&gt;
# Click &#039;&#039;&#039;Create&#039;&#039;&#039;. (This will create a blank install.xml file)&lt;br /&gt;
# Click &#039;&#039;&#039;Load&#039;&#039;&#039;. (This will load the contents of the install.xml file into memory)&lt;br /&gt;
# Click &#039;&#039;&#039;Edit&#039;&#039;&#039;.&lt;br /&gt;
# Now you can actually use the XMLDB editor, to create and edit tables for your plugin.&lt;br /&gt;
# When you&#039;re done, keep clicking &#039;&#039;&#039;Back&#039;&#039;&#039; and &#039;&#039;&#039;Back to Main&#039;&#039;&#039; until you get back to the list of XMLDB locations, and then click &#039;&#039;&#039;Save&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
This will create an &#039;&#039;install.xml&#039;&#039; file, which can be used to load your tables into the database in conjunction with a &#039;&#039;version.php&#039;&#039; file. See [[Installing_and_upgrading_plugin_database_tables]] for more information.&lt;br /&gt;
&lt;br /&gt;
After the initial installation of a plugin, for subsequent updates to the plugin&#039;s table structure you&#039;ll need to manually create an &#039;&#039;upgrade.php&#039;&#039; file in your module&#039;s &#039;&#039;db&#039;&#039; folder. The &#039;&#039;upgrade.php&#039;&#039; file should start off looking something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
function xmldb_mymodule_upgrade($oldversion) {&lt;br /&gt;
    global $CFG;&lt;br /&gt;
&lt;br /&gt;
    $result = TRUE;&lt;br /&gt;
&lt;br /&gt;
// Insert PHP code from XMLDB Editor here&lt;br /&gt;
&lt;br /&gt;
    return $result;&lt;br /&gt;
}&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To get the code for the &#039;// Insert PHP code here&#039; bit, open the XMLDB Editor and load the relevant &#039;&#039;install.xml&#039;&#039; file. &lt;br /&gt;
&lt;br /&gt;
Choose the &#039;View PHP Code&#039; option and then copy and paste the generated code.&lt;br /&gt;
&lt;br /&gt;
[[File:xmldbeditor-showphpcode.png]]&lt;br /&gt;
&lt;br /&gt;
== Use==&lt;br /&gt;
&lt;br /&gt;
*The XMLDB editor is pretty easy to use so there&#039;s no need for a complete guide here. Playing with it for a while is highly recommended, viewing how it works and how it modifies the &#039;&#039;install.xml&#039;&#039; files.&lt;br /&gt;
&lt;br /&gt;
*It&#039;s organised in a top-bottom structure, where you start &#039;&#039;loading&#039;&#039;&#039; (or &#039;&#039;creating&#039;&#039;) a new XMLDB file. Then, you can &#039;&#039;edit&#039;&#039; the file and its &#039;&#039;general structure&#039;&#039; will be shown. This structure has two types of elements, &#039;&#039;tables&#039;&#039; and &#039;&#039;statements&#039;&#039; and the XMLDB editor allows you to &#039;&#039;add&#039;&#039;, &#039;&#039;edit&#039;&#039;, &#039;&#039;delete&#039;&#039;, and &#039;&#039;move&#039;&#039; them easily. Also, for initial creation of tables, one small but effective &#039;&#039;&#039;reverse-enginery&#039;&#039;&#039; tool has been developed (only under MySQL) allowing you to retrofit any table from the DB to the XMLDB Editor.&lt;br /&gt;
&lt;br /&gt;
*Whilst editing tables you will see their &#039;&#039;fields&#039;&#039;, &#039;&#039;keys&#039;&#039; and &#039;&#039;indexes&#039;&#039; and you&#039;ll be able to handle all them easily. Note that some fields can be non-editable. This is because they are being used in some way (part of one key or index) and the idea is to warn you about that.&lt;br /&gt;
&lt;br /&gt;
*Fields can be edited and you can specify their &#039;&#039;name&#039;&#039;, &#039;&#039;type&#039;&#039;, &#039;&#039;length&#039;&#039;, &#039;&#039;decimals&#039;&#039;, &#039;&#039;null-ability&#039;&#039;, &#039;&#039;defaults&#039;&#039; and so on. Exactly the same for both &#039;&#039;keys&#039;&#039; and &#039;&#039;indexes&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
*Whilst editing statements, you must think about them like &amp;quot;collections of sentences&amp;quot;. Once you select the &#039;&#039;type&#039;&#039; (only inserts are allowed for now) and &#039;&#039;table&#039;&#039; you are interested in, you&#039;ll be able to introduce the exact values easily, being able to &#039;&#039;duplicate&#039;&#039; them easily to gain some speed if you have a lot of sentences in your development. Sentences can be &#039;&#039;edited&#039;&#039; and &#039;&#039;deleted&#039;&#039; easily too.&lt;br /&gt;
&lt;br /&gt;
*One interesting feature is that all the XMLDB editor pages allow you to enter a &#039;&#039;comment&#039;&#039; about the item being modified (table, index, key, field, statement). Use it as you wish, sure that it helps other developers to understand a bit more about the DB model.&lt;br /&gt;
&lt;br /&gt;
*If you define a field as an &#039;&#039;&#039;enum&#039;&#039;&#039;, you should provide the enum options as a comma-separated list, with each option surrounded by single quotes. Example: &#039;&#039;&#039;&amp;lt;code&amp;gt;&#039;option1&#039;,&#039;option2&#039;,&#039;option3&#039;&amp;lt;/code&amp;gt;&#039;&#039;&#039;. However, enum has been deprecated in Moodle 2.0, so it is probably better just to avoid enum types altogether.&lt;br /&gt;
&lt;br /&gt;
== Conventions ==&lt;br /&gt;
&lt;br /&gt;
Apart from the [[Database| Database Structures guidelines]], some more conventions should be followed:&lt;br /&gt;
&lt;br /&gt;
# About names:&lt;br /&gt;
## All lowercase names (tables, indexes, keys and fields).&lt;br /&gt;
## Table names and field names must use only a-z, 0-9 and _ chars. Max 28 characters.&lt;br /&gt;
## Key and index names under the XMLDB Files must be formed by concatenating the name of the fields present in the key/index with the &#039;&amp;quot;-&amp;quot; (minus) character.&lt;br /&gt;
## Primary key always must be named &amp;quot;primary&amp;quot; (this is one exception to the previous convention).&lt;br /&gt;
## It&#039;s highly recommended to avoid [[XMLDB_reserved_words|reserved words]] completely. We know we have some of them now but they should be completely out for next releases.&lt;br /&gt;
# About NULLS&lt;br /&gt;
## Avoid to create all the fields as NOT NULL with the &#039;&#039;silly&#039;&#039; default value &amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt; (empty string). The underlying code used to create tables will handle it properly but the XMLDB structure must be REAL. Read more in the [[XMLDB Problems#NOT NULL fields using a DEFAULT &#039;&#039; clause|Problems Page]].&lt;br /&gt;
# About FOREIGN KEYS&lt;br /&gt;
## Under the tables of every XMLDB file, you must define the existing &#039;&#039;&#039;Foreign Keys&#039;&#039;&#039; (FK) properly. This will allow everybody to know a bit better the structure, allow to evolve to a better constrained system in the future and will provide the underlying code with the needed info to create the proper indexes. &lt;br /&gt;
## Note that, if you define any field combination as FK you won&#039;t have to create any index on that fields, the code will do it automatically! &lt;br /&gt;
## Respect Convention 1.3&lt;br /&gt;
# About UNIQUE KEYS&lt;br /&gt;
## Declare any fields as UNIQUE KEY (UK) only if they are going to be used as target for one FK. Create unique indexes instead.&lt;br /&gt;
## Respect Convention 1.3&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[XMLDB defining an XML structure]]&lt;br /&gt;
*[[Installing and upgrading plugin database tables]]&lt;br /&gt;
*Using Moodle [http://moodle.org/mod/forum/discuss.php?d=82231 Using XMLDB editor] forum discussion&lt;br /&gt;
* [http://dev.moodle.org/mod/resource/view.php?id=55 Appendix B - The XMLDB Editor] from the Introduction to Moodle Programming course&lt;br /&gt;
&lt;br /&gt;
[[Category:XMLDB]]&lt;br /&gt;
[[Category:DB]]&lt;/div&gt;</summary>
		<author><name>Danielneis</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=File:xmldbeditor-showphpcode.png&amp;diff=54636</id>
		<title>File:xmldbeditor-showphpcode.png</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=File:xmldbeditor-showphpcode.png&amp;diff=54636"/>
		<updated>2018-08-17T13:54:20Z</updated>

		<summary type="html">&lt;p&gt;Danielneis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Danielneis</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=User_talk:Helen_Foster&amp;diff=23215</id>
		<title>User talk:Helen Foster</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=User_talk:Helen_Foster&amp;diff=23215"/>
		<updated>2010-09-20T13:54:39Z</updated>

		<summary type="html">&lt;p&gt;Danielneis: /* Renaming pages in pt_br wiki? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==deleting extra images==&lt;br /&gt;
Hi Helen - I am very shy at adding to the docs! ;)&lt;br /&gt;
I put some stuff on about conditional activities but I uploaded images which weren&#039;t clear so I changed them and now I don&#039;t know how to delete the first few which are no longer used on the page - could you delete the earlier, unused uploads please so they don&#039;t take up space and clutter the place up? (I couldn&#039;t find a &amp;quot;delete&amp;quot; instruction so I presume we can&#039;t) thanks - Mary [[User:Mary Cooch|Mary Cooch]]&lt;br /&gt;
: Hi Mary, if you upload a new version of the file with the same name it will replace the old one. At least I can&#039;t find any duplicates on your images&#039; pages ;-) And your files are all only some KB so they won&#039;t take up much disk space anyway. --[[User:Frank Ralf|Frank Ralf]] 10:19, 6 March 2010 (UTC)&lt;br /&gt;
:: Mary, many thanks for your contribution to [[Conditional activities]] :-) Frank is right in saying that new versions of images simply replace old ones, so there is no need for any deletion. If you upload an image then decide you don&#039;t want to use it at all, you can just type &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{Deletion}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; at the top of the page (as explained in [[MoodleDocs:Templates]]) then an admin will come along and delete it. --[[User:Helen Foster|Helen Foster]] 12:33, 8 March 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Deleting some attached files in JIRA ==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
&lt;br /&gt;
I made a bit of a mess at [http://tracker.moodle.org/browse/MDL-21110 http://tracker.moodle.org/browse/MDL-21110]. Would it be possible to delete all the attached files there so Penny or I can upload the current one and let Jira handle the versioning more sanely?&lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;br /&gt;
Matt&lt;br /&gt;
&lt;br /&gt;
:Done! --[[User:Helen Foster|Helen Foster]] 08:33, 5 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Creating new FAQ pages ==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
&lt;br /&gt;
I have successfully created a stub for a XML FAQ page (https://docs.moodle.org/en/XML_FAQ) but how do I get it promoted on https://docs.moodle.org/en/Category:FAQ ?&lt;br /&gt;
&lt;br /&gt;
I also would like to create an Import/Export FAQ for collecting all the information regarding Moodle import and export which is scattered in different forums.&lt;br /&gt;
&lt;br /&gt;
Regards,&lt;br /&gt;
[[User:Frank Ralf|Frank Ralf]]&lt;br /&gt;
&lt;br /&gt;
:Hi Helen will have to answer the Import/Export question.  I jumped in and added &amp;lt;nowiki&amp;gt;[[Category:FAQ]]&amp;lt;/nowiki&amp;gt; to the bottom of the page, which anyone can do. And took your hint and added a &amp;lt;nowiki&amp;gt;{{stub}}&amp;lt;/nowiki&amp;gt; template at the top.  Thanks for the XML work. Best --[[User:chris collman|chris collman]] 14:16, 3 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
::Hi Frank, thanks for your offer - an [[Import and export FAQ]] page would be great, thanks! --[[User:Helen Foster|Helen Foster]] 04:12, 4 December 2008 (CST)&lt;br /&gt;
:::Thanks to both of you! Helen, how did you get that nice Contents menu on your Import and export FAQ page? I couldn&#039;t figure that out from the source. --[[User:Frank Ralf|Frank Ralf]] 05:30, 4 December 2008 (CST) Problem solved, just found the documentation ;-) --[[User:Frank Ralf|Frank Ralf]] 05:43, 4 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
== Suggestion that is probably total overkill ==&lt;br /&gt;
&amp;lt;onlyinclude&amp;gt;&lt;br /&gt;
# Create a new FAQ namespace.&lt;br /&gt;
# In this namespace, create one page for each frequent question, where the contents of the page is the answer.&lt;br /&gt;
# Use our new knowledge of transclusions to build the FAQ lists by just pulling in pages from the FAQ namespace.&lt;br /&gt;
&lt;br /&gt;
The benefits of doing this are&lt;br /&gt;
* The same FAQ can appear in more than one list without copying-and-pasting.&lt;br /&gt;
* Each question gets a unique URL that so in the forums, we can point people to a page that just answers their specific question.&lt;br /&gt;
&lt;br /&gt;
Disadvantages&lt;br /&gt;
* Editing FAQ lists becomes incomprehensible to anyone who is not a MediaWiki geek.&lt;br /&gt;
&lt;br /&gt;
If we went this way, I would like to use B to build a new FAQ page: &amp;quot;Troubleshooting FAQ&amp;quot;. Might be a good idea anyway.&lt;br /&gt;
&amp;lt;/onlyinclude&amp;gt;&lt;br /&gt;
I hasten to say that I am not recommending this approach. The disadvantages could easily outweigh the advantages. I am simply pointing out a technical possibility that may be worth considering either now, or in the future.&amp;lt;onlyinclude&amp;gt;--[[User:Tim Hunt|Tim Hunt]] 07:11, 4 December 2008 (CST)&amp;lt;/onlyinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Just added [[MoodleDocs:Transclusion]].  Good thing I had my first cup of coffee, Tim&#039;s thoughtful post got me rubbing the sleep out of my eyes.  I wonder if I can get the partial transclusion of this section to work in Sandbox then in [[MoodleDocs_talk:Transclusion]]. Definitely a tool to be used with care. But Wowie Zowie ! --[[User:chris collman|chris collman]] 06:49, 5 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
:: Hello Tim, I think your suggested solution would indeed be overkill and would make maintaining FAQ too difficult. I see FAQ as an intermediary step between the unorganised kind of &amp;quot;documentation&amp;quot; which is provided in the forums towards &amp;quot;real&amp;quot; documentation. Therefore the ease of editing is crucial in my opinion. What about using Moodle&#039;s &#039;&#039;&#039;autolinking mechanism&#039;&#039;&#039; to automatically link to FAQ pages, e.g. if there is a mention of grades in the forums that would create an automatic link to Grades FAQ. I am quite new to Moodle, but couldn&#039;t that be done with setting up a kind of FAQ Glossary? --[[User:Frank Ralf|Frank Ralf]] 02:44, 16 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
::: Hi Tim, thanks for your suggestion, though I think it&#039;s overkill too!  The current FAQ pages have nice short titles which are easy to find and to include in forum posts. Having a page for each FAQ would result in really long URLs. Also, I think that when we point people to an FAQ page, and they have to look through it to find the answer to their question, they may well find answers to other questions they have. As other people have suggested, I think FAQ pages work well as start pages with links to lots of other pages i.e. they&#039;re kept fairly short, for example [[Contributed code FAQ]]. --[[User:Helen Foster|Helen Foster]] 04:49, 18 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
::: Frank, regarding autolinking to FAQ pages, have you come across the Moodle Docs filter on moodle.org? Please see the [[Moodle.org FAQ]] for more details. --[[User:Helen Foster|Helen Foster]] 04:49, 18 December 2008 (CST)&lt;br /&gt;
::::Helen, thanks for the hint. But isn&#039;t that the usual &#039;&#039;manual&#039;&#039; way of wiki linking? But on second thought that might really be the best way of linking to FAQ pages as it keeps getting the forums cluttered with too many (automatic) links. In fact, it just might be a matter of good practice to put advice of lasting value from the forums into a more structured form of documentation and nothing which could or should be done in an automatic and technical way... --[[User:Frank Ralf|Frank Ralf]] 05:11, 19 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
== Security Notification registration ==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
&lt;br /&gt;
It was suggested to me through the #moodle channel on freenode that I raise this concern with you.&lt;br /&gt;
&lt;br /&gt;
I&#039;m developing a moodle installation behind a firewall on a non-public URL and am interested in subscribing to security updates (prompted to check this after seeing a moodle vulnerability mentioned on Bugtraq). I had previously attempted to subscribe by registering our installation through the admin pages, however that registration was rejected as the site was located behind a firewall and not accessible.&lt;br /&gt;
&lt;br /&gt;
Due to that rejection, I wasn&#039;t subscribed to security updates.&lt;br /&gt;
&lt;br /&gt;
I now find myself in the unfortunate position where I cannot subscribe to security updates without having a public facing site (which I can&#039;t reasonably know is secure as I&#039;m not receiving security updates through your mailing list).&lt;br /&gt;
&lt;br /&gt;
The burden for those of us who have an internal site they&#039;re developing (or perhaps is in production) is that we must now create a public facing site to register for the sole purpose of receiving security updates. If the thought is that only parties interested in maintaining a moodle site should have access to those messages, perhaps a different measure could be put into place (a code that appears once moodle is installed, for example).&lt;br /&gt;
&lt;br /&gt;
I&#039;ve tried subscribing through sympa@lists.moodle.org, however that method does not work either.&lt;br /&gt;
&lt;br /&gt;
Could you please provide a process for folks like me to get on the security updates list without having to install moodle on a public web server first?&lt;br /&gt;
&lt;br /&gt;
Thanks!&lt;br /&gt;
&lt;br /&gt;
- P.&lt;br /&gt;
&lt;br /&gt;
:Hi Paul, how about subscribing to the [http://moodle.org/mod/forum/view.php?f=996 security announcements forum], where all important security issues are published. --[[User:Helen Foster|Helen Foster]] 04:34, 18 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
== Unseen (not hidden) activities==&lt;br /&gt;
Hi Helen (This is partly my attempt at practising here by the way!) I&#039;ve posted several times recently about the concept of &#039;unseen&#039; topics with resources that can be linked to on the course page where hidden ones wouldn&#039;t work. is there documentation about that somewhere here ? If so, where? Then I can point Moodlers to it next time.If not, shall I write it? Thanks - [[User: Mary Cooch|Mary Cooch]]&lt;br /&gt;
&lt;br /&gt;
:Hi Mary, I&#039;ve just had a quick look and can&#039;t find any documentation about unseen topics, so it would be helpful if you could write some, perhaps here: [[Course homepage]]. Thanks in advance :-) --[[User:Helen Foster|Helen Foster]] 17:20, 19 December 2008 (CST)&lt;br /&gt;
:Helen - please can you check what I have done as you know I&#039;m still a novice and don&#039;t want to put the wrong thing in the wrong place! Also, if you look on my usertalk Chris Colman said it might be useful on the html linking page? [[User: Mary Cooch|Mary Cooch]]&lt;br /&gt;
&lt;br /&gt;
== Downloading Moodle Core ==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
I came across Moodle just this morning, and read a little about its design, and loved it, it is perfect for the project Im starting.&lt;br /&gt;
&lt;br /&gt;
Ive gone to the download page, to download the Moodle core zip package, but when I click on the link to download I get the following message;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;A server error that affects your login session was detected. Please login again or restart your browser.&#039;&lt;br /&gt;
&lt;br /&gt;
( Continue )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I had a look around the FAQ pages, to see if there was anything on there, but it only mentions about people who already have moodle and are having this difficulty,&lt;br /&gt;
&lt;br /&gt;
Please could you send me an alternative link, &lt;br /&gt;
&lt;br /&gt;
Kind Regards&lt;br /&gt;
Andrew&lt;br /&gt;
:Hi Andrew, I left a comment on your [[User_talk:Andrew_Abel|user comment page]], just in case you were in a hurry to play with Moodle. --[[User:chris collman|chris collman]] 07:40, 1 January 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
::Hi Andrew, I hope you&#039;ve been successful in downloading Moodle by now. Chris, thanks for your helpful comments :-) --[[User:Helen Foster|Helen Foster]] 01:21, 2 January 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
== &amp;quot;experimental:&amp;quot; prefix ==&lt;br /&gt;
&lt;br /&gt;
[[User:Marc Grober|Marc Grober]] 12:00, 12 January 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
We started using experimental: as a prefix because there was some confusion about the use of Development: as a prefix.....&lt;br /&gt;
&lt;br /&gt;
In the Moodle docs, Development: appears to cover Moodle developer documentation, not docs under development,  so we wanted to use a prefix that connote that the docs were, as we suggest, &amp;quot;experimental&amp;quot; (i.e. not ready for prime time).   I had not come across [[Experimental|Experimental]] as the search is a bit temperamental and searching for the root, experiment, produced no result.....&lt;br /&gt;
&lt;br /&gt;
Perhaps we need a different topic name?&lt;br /&gt;
&lt;br /&gt;
I have encouraged AT to ask you to move these pages out of the experimental: topic but I think she feels they are not quite ready and I want to respect hre wishes on this.&lt;br /&gt;
&lt;br /&gt;
We also have some experimental pages under development with respect to gradebook &amp;quot;cases&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
I would encourage you to discuss the progress on all these pages with AT.&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
:Marc, thanks for your comments. The use of experimental: as a prefix is fine by me. Alternatively you could use a [[MoodleDocs:Templates|Moodle Docs template]] to add a message saying that the page is experimental. --[[User:Helen Foster|Helen Foster]] 02:41, 13 January 2009 (CST)&lt;br /&gt;
::Marc and Helen, something new to me.  I found 7 pages when I searched on &amp;quot;experimental:&amp;quot; and found 7 Article title matches.  6 started with &amp;quot;experimental:&amp;quot; and of course &amp;quot;Experimental&amp;quot;. Wondering if an alternative draft to Main Page should be done that way with the Experimental template.  :)--[[User:chris collman|chris collman]] 06:00, 13 January 2009 (CST)&lt;br /&gt;
:::Helen, thanks for moving some of the experimental: pages.  The page here, however, has yet to be moved: [https://docs.moodle.org/en/experimental:Getting_Help_Installing_and_Managing_Moodle]. Vis-a-vis topics/categories, I think it makes sense to have a category that is not searched by default so that users do not find materials that is not ready for prime time.  By the same token,  I think, as I mentioned above,  that Development: is problematic because it confuses as far as whether it is a topic for Developers or addresses material under development, which are really two different areas.  Likewise, as long as there is an Experimental page the use of experimental: could cause confusion.    I would argue for three distinct categories.... [[User:Marc Grober|Marc Grober]] 12:16, 24 January 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
::As I understood your (Helen&#039;s) comment (posted I don&#039;t recall where) you (Helen) were I think suggesting that what I was really suggesting was a new name space such that folks could develop documents that were not included in a default search.....  which I think is exactly what I was looking for....  So the question becomes can and should we do such a thing..... --[[User:Marc Grober|Marc Grober]] 23:44, 9 March 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::Marc, I guess you&#039;re referring to my forum post [http://moodle.org/mod/forum/discuss.php?d=115736#p509590 Re: Not including pages in the Moodle Docs search]. How about using a Moodle Docs template for now to indicate docs under development and add them to an appropriate category, then when there are sufficient pages to warrant it, we can create a new namespace and move all the pages into it. --[[User:Helen Foster|Helen Foster]] 11:46, 10 March 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
==Talk:Helen&#039;s page is over 32k==&lt;br /&gt;
FYI: I got that warning.  Maybe a subpage for the older stuff and a link, so we don&#039;t loose some stuff. Of course alternatively, if I deleted all my comments/questions, that would shorted it a lot :)  --[[User:chris collman|chris collman]] 06:04, 13 January 2009 (CST)&lt;br /&gt;
::Seriously, I would be happy to edit my posts here down to a nub or nothingness.  I think some of the language requests for help could be put in one heading and shortened, without losing anything.    --[[User:chris collman|chris collman]] 06:13, 13 January 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
:Chris, thanks for creating [[User talk:Helen Foster/1]]. I think it&#039;s a good solution :-) --[[User:Helen Foster|Helen Foster]] 02:51, 14 January 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*[[User talk:Helen Foster/1]] for older comments&lt;br /&gt;
&lt;br /&gt;
== Registered Users Bug with Mediawiki ==&lt;br /&gt;
&lt;br /&gt;
Hi, [[User_talk:David_Scotson#Moodle_Docs_stats|Way back in 2006 you mentioned]] a work-around for a bug resulting in registered users stats on [[Special:Statistics]] not updating properly. I think I am encountering this same bug on my internal wiki now. I know that was a long time ago, but do you remember what you did to fix it/what the work-around mentioned was?&lt;br /&gt;
Thanks,&lt;br /&gt;
--[[User:Adrian Archer|Adrian Archer]] 11:02, 4 March 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
:Hi Adrian, here are Eloy&#039;s workarounds (easy to do with phpMyAdmin):&lt;br /&gt;
&lt;br /&gt;
:# To refresh the count of pages, if it&#039;s not working: table: site_stats, field: ss_total_pages, setting it to -1 should force recalculation of pages&lt;br /&gt;
:# To refresh the count of registered users, delete the contents of the &amp;quot;cached statistics&amp;quot; table&lt;br /&gt;
&lt;br /&gt;
:Thanks to Eloy for recalling them :-) I hope you are able to upgrade to a newer MediaWiki version soon. --[[User:Helen Foster|Helen Foster]] 09:01, 5 March 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
::Thanks so much for the quick response, that sounds like it should work. I&#039;m actually using Version 1.13.3, so I guess the bug still exists. --[[User:Adrian Archer|Adrian Archer]] 09:17, 5 March 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
:::Hmm, Moodle Docs is actually using version 1.11.2, though we&#039;re hoping to upgrade very soon (MDLSITE-657). --[[User:Helen Foster|Helen Foster]] 09:35, 5 March 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
== Function if in grade calculations? ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hi Helen&lt;br /&gt;
&lt;br /&gt;
Thanks for your jobs.&lt;br /&gt;
&lt;br /&gt;
Sorry for my lousy english.&lt;br /&gt;
&lt;br /&gt;
I am trying to use the &amp;quot;if&amp;quot; function in &amp;quot;Grade calculations&amp;quot; in a similar way as is done in &amp;quot;opencalc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
do you know if this is possible?&lt;br /&gt;
&lt;br /&gt;
How to introduce a note of recovery, only for a few students, without changing the original calification?&lt;br /&gt;
&lt;br /&gt;
My email is trujillo@unex.es&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;br /&gt;
&lt;br /&gt;
== Using Moodle for Teachers ==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
&lt;br /&gt;
I teach math at Woodland Middle School  in Woodland, WA. I&#039;m also just beginning work with the Ubuntu Learning Project (name?). Is your book (Using Moodle - Teaching with the Popular Open Source Course Management System) available for download on Moodle Docs free to teachers? If so, is there some type of creative commons license? Or should we just link to Moodle Docs? I found your book extremely useful when I taught a 3-day Moodle Bootcamp to teachers this summer.&lt;br /&gt;
&lt;br /&gt;
Thanks, Mark Knudson&lt;br /&gt;
&lt;br /&gt;
:Hi Mark, glad to hear you found my book useful :-) It&#039;s available for download under the Creative Commons Attribution-Noncommercial-Share Alike licence here: [[Using Moodle book]]. --[[User:Helen Foster|Helen Foster]] 19:11, 21 September 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== PHP Settings by Moodle version ==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
&lt;br /&gt;
I&#039;m new to this community (and to Moodle) and am not sure how I should request an update to the documentation relating to a Moodle PHP extension requirement - specifically zlib.&lt;br /&gt;
I noticed that this page:&lt;br /&gt;
https://docs.moodle.org/no/Installering_av_Moodle has a section stating that &amp;quot;The zlib extension is required for zip/unzip functionality.&amp;quot; under the PHP Extensions and Libraries, but it doesn&#039;t exist here:&lt;br /&gt;
https://docs.moodle.org/en/PHP_settings_by_Moodle_version&lt;br /&gt;
&lt;br /&gt;
The PHP_settings_by_Moodle_version is a Stub and is waiting for review - I was thinking about updating it with the text from the https://docs.moodle.org/no/Installering_av_Moodle page.&lt;br /&gt;
&lt;br /&gt;
Looking for a little direction.&lt;br /&gt;
&lt;br /&gt;
Thanks!&lt;br /&gt;
Andy&lt;br /&gt;
&lt;br /&gt;
:Hi Andy,&lt;br /&gt;
&lt;br /&gt;
:Thanks for your kind offer to update the documentation [[PHP settings by Moodle version]]. Please feel free to go ahead and do so :-) (I asked in our developer chat and was informed that zlib is required for versions of Moodle up to 1.9 and Moodle 2.0 onwards will come with native PHP zip support so it needs the &amp;quot;zip&amp;quot; extension instead.)&lt;br /&gt;
&lt;br /&gt;
:For future reference, you&#039;re always welcome to edit pages in Moodle Docs and help improve our documentation. If you&#039;re not quite sure of something, you can leave a note in the page comments. Thanks again! --[[User:Helen Foster|Helen Foster]] 11:45, 20 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Query re Cool Course Competition ==&lt;br /&gt;
Two questions re the Cool Course Competition:&lt;br /&gt;
1) How can teachers know whether the modules and blocks they use are core or not? Is there a list somewhere?(2) Why are some entries in their own native theme, while most entries are using the competition site&#039;s theme? How can I upload my course so that it retains its own theme? Thanks, [[User:Thomas Brown|Thomas Brown]] 00:16, 16 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Hi Thomas, an easy way to check which modules and blocks are core i.e. included in the standard Moodle packages is to login to the [http://demo.moodle.net/ Moodle Demonstration Site] as an admin and check &#039;&#039;Administration &amp;gt; Modules &amp;gt; Activities &amp;gt; Manage activities&#039;&#039; and &#039;&#039;Administration &amp;gt; Modules &amp;gt; Blocks &amp;gt; Manage blocks&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
:Regarding the course theme, if you force a theme in the course settings, it will be used, otherwise the site theme will be used. --[[User:Helen Foster|Helen Foster]] 11:22, 16 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
::Do you mean the &amp;quot;Settings&amp;quot; page in the course&#039;s Admin block? My Settings page doesn&#039;t have any theme-related options. Did I look in the wrong place? tnx, [[User:Thomas Brown|Thomas Brown]] 23:55, 16 January 2010 (UTC)&lt;br /&gt;
:::It appears that the site admin can make a setting that allows teachers to force a theme -- so I can do that now. Which raises another question: Does my theme have to be installed on the Cool Course site for it to work there, or can my backup import the theme features and bring them along into the Cool Course site? tnx again, [[User:Thomas Brown|Thomas Brown]] 03:58, 18 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
::::Apologies for not mentioning that course themes need to be enabled by an admin in [[Theme settings]]; glad you figured things out! Yes, your theme needs to be installed on the competition site for it to work, as a course backup does not include theme features. All themes included in standard Moodle packages are available on the competition site. --[[User:Helen Foster|Helen Foster]] 09:32, 18 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I think I have a bigger problem now that my course is on the competition web site. None of the links to course resources work! I must have royally messed up my backup somehow. I included the resources in the backup, but...[[User:Thomas Brown|Thomas Brown]] 21:08, 18 January 2010 (UTC)&lt;br /&gt;
::Testing out the restore of my competition entry on my own site, I find that the html links that I&#039;ve put in the Topic Outline labels go to random id numbers, and so don&#039;t open the resources they&#039;re supposed to and give me a page not found browser error instead. However, if I simply click on edit for one of the labels, and then save it without changing anything, now suddenly all of the links are in working order. So, is it possible for me or someone else to do this fix on my competition entry, so that it starts working? While we&#039;re in there fixing it, can we change it to custom corners? Thanks yet again...[[User:Thomas Brown|Thomas Brown]] 21:48, 18 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::No worries, it&#039;s a good test for the course backup and restore process! I&#039;ve reported the problem you describe in the tracker - MDL-21380. --[[User:Helen Foster|Helen Foster]] 15:02, 19 January 2010 (UTC)&lt;br /&gt;
===Curious, why here?===&lt;br /&gt;
Firstly, thanks for the post here which drew my attention to coolcourses.moodle.org.  Really Cool and Neato.   Secondly, shouldn&#039;t most of this discussion be in the [http://coolcourses.moodle.org/mod/forum/view.php?id=3073 &amp;quot;Competition Lounge&amp;quot;]?   Thirdly, there were some special effects I am dying to know &amp;quot;how they do that?&amp;quot; and I just looked at each course in the first topic! Fourthly, thanks to all who contributed. --[[User:chris collman|chris collman]] 13:00, 21 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Hi Chris, just wondering why you never noticed the [http://moodle.org/mod/forum/discuss.php?d=135429 Cool Course Competition moodle.org news item]? Regarding the [http://coolcourses.moodle.org/mod/forum/view.php?id=3073 Competition lounge], the fact that it was only created a few hours ago probably explains why nobody has posted there yet. How about posting your &amp;quot;how they do that?&amp;quot; question and thanks there. --[[User:Helen Foster|Helen Foster]] 15:12, 21 January 2010 (UTC)&lt;br /&gt;
::I am just a stick in the mud sometimes.  I will take you up on your excellent suggestion. --[[User:chris collman|chris collman]] 16:46, 22 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==nln materials query ==&lt;br /&gt;
&lt;br /&gt;
Dear Helen,&lt;br /&gt;
Sorry to contact you this way - I have been recommended to you by several of your former colleagues on the ILT Champs list. I am conducting a research thesis at the University of Nottingham into the uptake and use of the nln materials amongst the FE sector, and have been advised that you would have an interesting view on this programme. If you could spare me a few minutes of your time to have a discussion, then please could you drop me an email at ttxla4@nottingham.ac.uk? Thank you very much. Rob Enbgelbright says &amp;quot;hello&amp;quot; btw. Many thanks, Laurel Armstrong&lt;br /&gt;
&lt;br /&gt;
:Hi Laurel, I&#039;ve just emailed you :-) --[[User:Helen Foster|Helen Foster]] 13:46, 1 February 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
==Jmol filter==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
&lt;br /&gt;
I noticed that you had updated the Jmol filter and wonder if you could tell me the status of this filter, and also the Jmol resource type and the Java Molecule Editor (for allowing students to add chemical structures as answers in quizzes).&lt;br /&gt;
Do they work in 1.9 and 2.0?&lt;br /&gt;
&lt;br /&gt;
On a similar note, there doesn&#039;t seem to be a direct way for students to put subscripts and superscripts into answers. I have resorted to adding a table of useful chemical symbols in the question, which students can copy and paste. Is there a setting somewhere that allows students to add formatted text?&lt;br /&gt;
&lt;br /&gt;
:Hi Mike, please see the comments on the [http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=87 Jmol resource type] for the latest information on it. You may also wish to contact Geoffrey Rowland.&lt;br /&gt;
&lt;br /&gt;
:Regarding adding chemical symbols, you may find the discussions listed in [[Chemistry/Biochemistry]] helpful. --[[User:Helen Foster|Helen Foster]] 14:58, 7 June 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== permission to edit brazilian portuguese version of docs.moodle.org ==&lt;br /&gt;
&lt;br /&gt;
Hello, Helen&lt;br /&gt;
&lt;br /&gt;
don&#039;t really know if you are the right person to ask, but, could you give me permission to edit brazilian portuguese version of docs.moodle.org ?&lt;br /&gt;
I help maintain the language pack along with Gilvan Marques, as you can see at http://cvs.moodle.org/lang/pt_br_utf8/?sortby=date#dirlist .&lt;br /&gt;
The last update of the home page was in august 2007, and also mention 1.8 as the current stable and focus of translators. I would like to make it a translated copy of the current english home page and also translate the release notes of 2.0 as first step...&lt;br /&gt;
&lt;br /&gt;
:Hi Daniel,&lt;br /&gt;
&lt;br /&gt;
:Thanks for your offer to edit the [https://docs.moodle.org/pt_br/P%C3%A1gina_principal Brazilian Portuguese Moodle Docs]. You should find that when you login you already have editing rights (all logged-in users can edit pages). --[[User:Helen Foster|Helen Foster]] 09:41, 25 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Brazilian docs home pagin &amp;quot;was protected against new editions&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
Hello, Helen&lt;br /&gt;
&lt;br /&gt;
i cannot edit that page because &amp;quot;This page was protected against new editions.&amp;quot;, and it only allows me to see and copy source code.&lt;br /&gt;
Could you unlock, please? Thanks, Daniel&lt;br /&gt;
&lt;br /&gt;
:Sorry I hadn&#039;t noticed that the homepage was protected. I&#039;ve just unlocked it now. --[[User:Helen Foster|Helen Foster]] 05:59, 30 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== About the new page I added on ForumNG ==&lt;br /&gt;
&lt;br /&gt;
Thanks for fixing it up and putting it in what I presume is a better place with a better name.  Now, questions about ettiquette: is this an OK page to have?  I&#039;m really pondering what is my voice (like wanting to promote ForumNG) vs Tim&#039;s voice (who fixed and answered the FAQ&#039;s and sort of speaks from the devlopers POV).  Stuff gets lost in Moodle.org forums.  Who would have looked in the developers forum for some of these conversations? Few people go to the tracker and vote.&lt;br /&gt;
&lt;br /&gt;
:Derek, thanks for creating documentation for [[ForumNG]]. I&#039;ve added a link to it from http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=2927 Thanks also for posting in the forum module forum and encouraging people to vote for the tracker issue. These are the best things you can do for new features you&#039;d like considered for inclusion in the Moodle core. --[[User:Helen Foster|Helen Foster]] 12:05, 9 August 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Thanks for this Helen, this is really cool.  No doubt you will notice another page I have created [Development:Forum_requirements] which is a little flag waving to see what is out there.  I do not think there is enough thought being put towards Forums - and digging around in the developer forums I can see why: no-one lkes the original code and it seems to much to either fix it or re-do it.  I am sad that key fixes/requests from 2006-7 are still launguishing in the tracker.  eg the edit time for Q&amp;amp;A forums.  So, maybe some conversaton can occur over the next months on &#039;&#039;What We&#039;d Like In Forums For 2.1&#039;&#039;.  :)  [[User:Derek Chirnside|Derek Chirnside]] 01:48, 10 August 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: Note that [[Activity_module_tests]] effectively has a list of current forum features.--[[User:Tim Hunt|Tim Hunt]] 07:26, 10 August 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Renaming pages in pt_br wiki? ==&lt;br /&gt;
&lt;br /&gt;
Hello, Helen&lt;br /&gt;
&lt;br /&gt;
i&#039;m writing to you to know the possibilities to rename some pages in brazilian wiki. I remember of a &amp;quot;move&amp;quot; functionality in mediawiki, maybe you could allow me to do so onnly in brazilian wiki? Or i can list you the page renames and you do the job? Basically is to translate some pages that were originally created in english.&lt;br /&gt;
Kind regards,&lt;br /&gt;
Daniel&lt;br /&gt;
&lt;br /&gt;
:Hi Daniel,&lt;br /&gt;
&lt;br /&gt;
: Thanks for your contributions to the Brazilian Portuguese wiki. I have just given you admin rights so you can move pages. --[[User:Helen Foster|Helen Foster]] 12:51, 20 September 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hello, Helen&lt;br /&gt;
&lt;br /&gt;
thank you for give me the admin rigths! I will do my best to do a good work. --[[User:Daniel Neis Araujo|Daniel Neis Araujo]] 13:54, 20 September 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Danielneis</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=User_talk:Helen_Foster&amp;diff=23213</id>
		<title>User talk:Helen Foster</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=User_talk:Helen_Foster&amp;diff=23213"/>
		<updated>2010-09-17T21:04:59Z</updated>

		<summary type="html">&lt;p&gt;Danielneis: /* Renaming pages in pt_br wiki? */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==deleting extra images==&lt;br /&gt;
Hi Helen - I am very shy at adding to the docs! ;)&lt;br /&gt;
I put some stuff on about conditional activities but I uploaded images which weren&#039;t clear so I changed them and now I don&#039;t know how to delete the first few which are no longer used on the page - could you delete the earlier, unused uploads please so they don&#039;t take up space and clutter the place up? (I couldn&#039;t find a &amp;quot;delete&amp;quot; instruction so I presume we can&#039;t) thanks - Mary [[User:Mary Cooch|Mary Cooch]]&lt;br /&gt;
: Hi Mary, if you upload a new version of the file with the same name it will replace the old one. At least I can&#039;t find any duplicates on your images&#039; pages ;-) And your files are all only some KB so they won&#039;t take up much disk space anyway. --[[User:Frank Ralf|Frank Ralf]] 10:19, 6 March 2010 (UTC)&lt;br /&gt;
:: Mary, many thanks for your contribution to [[Conditional activities]] :-) Frank is right in saying that new versions of images simply replace old ones, so there is no need for any deletion. If you upload an image then decide you don&#039;t want to use it at all, you can just type &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{Deletion}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; at the top of the page (as explained in [[MoodleDocs:Templates]]) then an admin will come along and delete it. --[[User:Helen Foster|Helen Foster]] 12:33, 8 March 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Deleting some attached files in JIRA ==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
&lt;br /&gt;
I made a bit of a mess at [http://tracker.moodle.org/browse/MDL-21110 http://tracker.moodle.org/browse/MDL-21110]. Would it be possible to delete all the attached files there so Penny or I can upload the current one and let Jira handle the versioning more sanely?&lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;br /&gt;
Matt&lt;br /&gt;
&lt;br /&gt;
:Done! --[[User:Helen Foster|Helen Foster]] 08:33, 5 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Creating new FAQ pages ==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
&lt;br /&gt;
I have successfully created a stub for a XML FAQ page (https://docs.moodle.org/en/XML_FAQ) but how do I get it promoted on https://docs.moodle.org/en/Category:FAQ ?&lt;br /&gt;
&lt;br /&gt;
I also would like to create an Import/Export FAQ for collecting all the information regarding Moodle import and export which is scattered in different forums.&lt;br /&gt;
&lt;br /&gt;
Regards,&lt;br /&gt;
[[User:Frank Ralf|Frank Ralf]]&lt;br /&gt;
&lt;br /&gt;
:Hi Helen will have to answer the Import/Export question.  I jumped in and added &amp;lt;nowiki&amp;gt;[[Category:FAQ]]&amp;lt;/nowiki&amp;gt; to the bottom of the page, which anyone can do. And took your hint and added a &amp;lt;nowiki&amp;gt;{{stub}}&amp;lt;/nowiki&amp;gt; template at the top.  Thanks for the XML work. Best --[[User:chris collman|chris collman]] 14:16, 3 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
::Hi Frank, thanks for your offer - an [[Import and export FAQ]] page would be great, thanks! --[[User:Helen Foster|Helen Foster]] 04:12, 4 December 2008 (CST)&lt;br /&gt;
:::Thanks to both of you! Helen, how did you get that nice Contents menu on your Import and export FAQ page? I couldn&#039;t figure that out from the source. --[[User:Frank Ralf|Frank Ralf]] 05:30, 4 December 2008 (CST) Problem solved, just found the documentation ;-) --[[User:Frank Ralf|Frank Ralf]] 05:43, 4 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
== Suggestion that is probably total overkill ==&lt;br /&gt;
&amp;lt;onlyinclude&amp;gt;&lt;br /&gt;
# Create a new FAQ namespace.&lt;br /&gt;
# In this namespace, create one page for each frequent question, where the contents of the page is the answer.&lt;br /&gt;
# Use our new knowledge of transclusions to build the FAQ lists by just pulling in pages from the FAQ namespace.&lt;br /&gt;
&lt;br /&gt;
The benefits of doing this are&lt;br /&gt;
* The same FAQ can appear in more than one list without copying-and-pasting.&lt;br /&gt;
* Each question gets a unique URL that so in the forums, we can point people to a page that just answers their specific question.&lt;br /&gt;
&lt;br /&gt;
Disadvantages&lt;br /&gt;
* Editing FAQ lists becomes incomprehensible to anyone who is not a MediaWiki geek.&lt;br /&gt;
&lt;br /&gt;
If we went this way, I would like to use B to build a new FAQ page: &amp;quot;Troubleshooting FAQ&amp;quot;. Might be a good idea anyway.&lt;br /&gt;
&amp;lt;/onlyinclude&amp;gt;&lt;br /&gt;
I hasten to say that I am not recommending this approach. The disadvantages could easily outweigh the advantages. I am simply pointing out a technical possibility that may be worth considering either now, or in the future.&amp;lt;onlyinclude&amp;gt;--[[User:Tim Hunt|Tim Hunt]] 07:11, 4 December 2008 (CST)&amp;lt;/onlyinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Just added [[MoodleDocs:Transclusion]].  Good thing I had my first cup of coffee, Tim&#039;s thoughtful post got me rubbing the sleep out of my eyes.  I wonder if I can get the partial transclusion of this section to work in Sandbox then in [[MoodleDocs_talk:Transclusion]]. Definitely a tool to be used with care. But Wowie Zowie ! --[[User:chris collman|chris collman]] 06:49, 5 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
:: Hello Tim, I think your suggested solution would indeed be overkill and would make maintaining FAQ too difficult. I see FAQ as an intermediary step between the unorganised kind of &amp;quot;documentation&amp;quot; which is provided in the forums towards &amp;quot;real&amp;quot; documentation. Therefore the ease of editing is crucial in my opinion. What about using Moodle&#039;s &#039;&#039;&#039;autolinking mechanism&#039;&#039;&#039; to automatically link to FAQ pages, e.g. if there is a mention of grades in the forums that would create an automatic link to Grades FAQ. I am quite new to Moodle, but couldn&#039;t that be done with setting up a kind of FAQ Glossary? --[[User:Frank Ralf|Frank Ralf]] 02:44, 16 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
::: Hi Tim, thanks for your suggestion, though I think it&#039;s overkill too!  The current FAQ pages have nice short titles which are easy to find and to include in forum posts. Having a page for each FAQ would result in really long URLs. Also, I think that when we point people to an FAQ page, and they have to look through it to find the answer to their question, they may well find answers to other questions they have. As other people have suggested, I think FAQ pages work well as start pages with links to lots of other pages i.e. they&#039;re kept fairly short, for example [[Contributed code FAQ]]. --[[User:Helen Foster|Helen Foster]] 04:49, 18 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
::: Frank, regarding autolinking to FAQ pages, have you come across the Moodle Docs filter on moodle.org? Please see the [[Moodle.org FAQ]] for more details. --[[User:Helen Foster|Helen Foster]] 04:49, 18 December 2008 (CST)&lt;br /&gt;
::::Helen, thanks for the hint. But isn&#039;t that the usual &#039;&#039;manual&#039;&#039; way of wiki linking? But on second thought that might really be the best way of linking to FAQ pages as it keeps getting the forums cluttered with too many (automatic) links. In fact, it just might be a matter of good practice to put advice of lasting value from the forums into a more structured form of documentation and nothing which could or should be done in an automatic and technical way... --[[User:Frank Ralf|Frank Ralf]] 05:11, 19 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
== Security Notification registration ==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
&lt;br /&gt;
It was suggested to me through the #moodle channel on freenode that I raise this concern with you.&lt;br /&gt;
&lt;br /&gt;
I&#039;m developing a moodle installation behind a firewall on a non-public URL and am interested in subscribing to security updates (prompted to check this after seeing a moodle vulnerability mentioned on Bugtraq). I had previously attempted to subscribe by registering our installation through the admin pages, however that registration was rejected as the site was located behind a firewall and not accessible.&lt;br /&gt;
&lt;br /&gt;
Due to that rejection, I wasn&#039;t subscribed to security updates.&lt;br /&gt;
&lt;br /&gt;
I now find myself in the unfortunate position where I cannot subscribe to security updates without having a public facing site (which I can&#039;t reasonably know is secure as I&#039;m not receiving security updates through your mailing list).&lt;br /&gt;
&lt;br /&gt;
The burden for those of us who have an internal site they&#039;re developing (or perhaps is in production) is that we must now create a public facing site to register for the sole purpose of receiving security updates. If the thought is that only parties interested in maintaining a moodle site should have access to those messages, perhaps a different measure could be put into place (a code that appears once moodle is installed, for example).&lt;br /&gt;
&lt;br /&gt;
I&#039;ve tried subscribing through sympa@lists.moodle.org, however that method does not work either.&lt;br /&gt;
&lt;br /&gt;
Could you please provide a process for folks like me to get on the security updates list without having to install moodle on a public web server first?&lt;br /&gt;
&lt;br /&gt;
Thanks!&lt;br /&gt;
&lt;br /&gt;
- P.&lt;br /&gt;
&lt;br /&gt;
:Hi Paul, how about subscribing to the [http://moodle.org/mod/forum/view.php?f=996 security announcements forum], where all important security issues are published. --[[User:Helen Foster|Helen Foster]] 04:34, 18 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
== Unseen (not hidden) activities==&lt;br /&gt;
Hi Helen (This is partly my attempt at practising here by the way!) I&#039;ve posted several times recently about the concept of &#039;unseen&#039; topics with resources that can be linked to on the course page where hidden ones wouldn&#039;t work. is there documentation about that somewhere here ? If so, where? Then I can point Moodlers to it next time.If not, shall I write it? Thanks - [[User: Mary Cooch|Mary Cooch]]&lt;br /&gt;
&lt;br /&gt;
:Hi Mary, I&#039;ve just had a quick look and can&#039;t find any documentation about unseen topics, so it would be helpful if you could write some, perhaps here: [[Course homepage]]. Thanks in advance :-) --[[User:Helen Foster|Helen Foster]] 17:20, 19 December 2008 (CST)&lt;br /&gt;
:Helen - please can you check what I have done as you know I&#039;m still a novice and don&#039;t want to put the wrong thing in the wrong place! Also, if you look on my usertalk Chris Colman said it might be useful on the html linking page? [[User: Mary Cooch|Mary Cooch]]&lt;br /&gt;
&lt;br /&gt;
== Downloading Moodle Core ==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
I came across Moodle just this morning, and read a little about its design, and loved it, it is perfect for the project Im starting.&lt;br /&gt;
&lt;br /&gt;
Ive gone to the download page, to download the Moodle core zip package, but when I click on the link to download I get the following message;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;A server error that affects your login session was detected. Please login again or restart your browser.&#039;&lt;br /&gt;
&lt;br /&gt;
( Continue )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I had a look around the FAQ pages, to see if there was anything on there, but it only mentions about people who already have moodle and are having this difficulty,&lt;br /&gt;
&lt;br /&gt;
Please could you send me an alternative link, &lt;br /&gt;
&lt;br /&gt;
Kind Regards&lt;br /&gt;
Andrew&lt;br /&gt;
:Hi Andrew, I left a comment on your [[User_talk:Andrew_Abel|user comment page]], just in case you were in a hurry to play with Moodle. --[[User:chris collman|chris collman]] 07:40, 1 January 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
::Hi Andrew, I hope you&#039;ve been successful in downloading Moodle by now. Chris, thanks for your helpful comments :-) --[[User:Helen Foster|Helen Foster]] 01:21, 2 January 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
== &amp;quot;experimental:&amp;quot; prefix ==&lt;br /&gt;
&lt;br /&gt;
[[User:Marc Grober|Marc Grober]] 12:00, 12 January 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
We started using experimental: as a prefix because there was some confusion about the use of Development: as a prefix.....&lt;br /&gt;
&lt;br /&gt;
In the Moodle docs, Development: appears to cover Moodle developer documentation, not docs under development,  so we wanted to use a prefix that connote that the docs were, as we suggest, &amp;quot;experimental&amp;quot; (i.e. not ready for prime time).   I had not come across [[Experimental|Experimental]] as the search is a bit temperamental and searching for the root, experiment, produced no result.....&lt;br /&gt;
&lt;br /&gt;
Perhaps we need a different topic name?&lt;br /&gt;
&lt;br /&gt;
I have encouraged AT to ask you to move these pages out of the experimental: topic but I think she feels they are not quite ready and I want to respect hre wishes on this.&lt;br /&gt;
&lt;br /&gt;
We also have some experimental pages under development with respect to gradebook &amp;quot;cases&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
I would encourage you to discuss the progress on all these pages with AT.&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
:Marc, thanks for your comments. The use of experimental: as a prefix is fine by me. Alternatively you could use a [[MoodleDocs:Templates|Moodle Docs template]] to add a message saying that the page is experimental. --[[User:Helen Foster|Helen Foster]] 02:41, 13 January 2009 (CST)&lt;br /&gt;
::Marc and Helen, something new to me.  I found 7 pages when I searched on &amp;quot;experimental:&amp;quot; and found 7 Article title matches.  6 started with &amp;quot;experimental:&amp;quot; and of course &amp;quot;Experimental&amp;quot;. Wondering if an alternative draft to Main Page should be done that way with the Experimental template.  :)--[[User:chris collman|chris collman]] 06:00, 13 January 2009 (CST)&lt;br /&gt;
:::Helen, thanks for moving some of the experimental: pages.  The page here, however, has yet to be moved: [https://docs.moodle.org/en/experimental:Getting_Help_Installing_and_Managing_Moodle]. Vis-a-vis topics/categories, I think it makes sense to have a category that is not searched by default so that users do not find materials that is not ready for prime time.  By the same token,  I think, as I mentioned above,  that Development: is problematic because it confuses as far as whether it is a topic for Developers or addresses material under development, which are really two different areas.  Likewise, as long as there is an Experimental page the use of experimental: could cause confusion.    I would argue for three distinct categories.... [[User:Marc Grober|Marc Grober]] 12:16, 24 January 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
::As I understood your (Helen&#039;s) comment (posted I don&#039;t recall where) you (Helen) were I think suggesting that what I was really suggesting was a new name space such that folks could develop documents that were not included in a default search.....  which I think is exactly what I was looking for....  So the question becomes can and should we do such a thing..... --[[User:Marc Grober|Marc Grober]] 23:44, 9 March 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::Marc, I guess you&#039;re referring to my forum post [http://moodle.org/mod/forum/discuss.php?d=115736#p509590 Re: Not including pages in the Moodle Docs search]. How about using a Moodle Docs template for now to indicate docs under development and add them to an appropriate category, then when there are sufficient pages to warrant it, we can create a new namespace and move all the pages into it. --[[User:Helen Foster|Helen Foster]] 11:46, 10 March 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
==Talk:Helen&#039;s page is over 32k==&lt;br /&gt;
FYI: I got that warning.  Maybe a subpage for the older stuff and a link, so we don&#039;t loose some stuff. Of course alternatively, if I deleted all my comments/questions, that would shorted it a lot :)  --[[User:chris collman|chris collman]] 06:04, 13 January 2009 (CST)&lt;br /&gt;
::Seriously, I would be happy to edit my posts here down to a nub or nothingness.  I think some of the language requests for help could be put in one heading and shortened, without losing anything.    --[[User:chris collman|chris collman]] 06:13, 13 January 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
:Chris, thanks for creating [[User talk:Helen Foster/1]]. I think it&#039;s a good solution :-) --[[User:Helen Foster|Helen Foster]] 02:51, 14 January 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*[[User talk:Helen Foster/1]] for older comments&lt;br /&gt;
&lt;br /&gt;
== Registered Users Bug with Mediawiki ==&lt;br /&gt;
&lt;br /&gt;
Hi, [[User_talk:David_Scotson#Moodle_Docs_stats|Way back in 2006 you mentioned]] a work-around for a bug resulting in registered users stats on [[Special:Statistics]] not updating properly. I think I am encountering this same bug on my internal wiki now. I know that was a long time ago, but do you remember what you did to fix it/what the work-around mentioned was?&lt;br /&gt;
Thanks,&lt;br /&gt;
--[[User:Adrian Archer|Adrian Archer]] 11:02, 4 March 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
:Hi Adrian, here are Eloy&#039;s workarounds (easy to do with phpMyAdmin):&lt;br /&gt;
&lt;br /&gt;
:# To refresh the count of pages, if it&#039;s not working: table: site_stats, field: ss_total_pages, setting it to -1 should force recalculation of pages&lt;br /&gt;
:# To refresh the count of registered users, delete the contents of the &amp;quot;cached statistics&amp;quot; table&lt;br /&gt;
&lt;br /&gt;
:Thanks to Eloy for recalling them :-) I hope you are able to upgrade to a newer MediaWiki version soon. --[[User:Helen Foster|Helen Foster]] 09:01, 5 March 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
::Thanks so much for the quick response, that sounds like it should work. I&#039;m actually using Version 1.13.3, so I guess the bug still exists. --[[User:Adrian Archer|Adrian Archer]] 09:17, 5 March 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
:::Hmm, Moodle Docs is actually using version 1.11.2, though we&#039;re hoping to upgrade very soon (MDLSITE-657). --[[User:Helen Foster|Helen Foster]] 09:35, 5 March 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
== Function if in grade calculations? ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hi Helen&lt;br /&gt;
&lt;br /&gt;
Thanks for your jobs.&lt;br /&gt;
&lt;br /&gt;
Sorry for my lousy english.&lt;br /&gt;
&lt;br /&gt;
I am trying to use the &amp;quot;if&amp;quot; function in &amp;quot;Grade calculations&amp;quot; in a similar way as is done in &amp;quot;opencalc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
do you know if this is possible?&lt;br /&gt;
&lt;br /&gt;
How to introduce a note of recovery, only for a few students, without changing the original calification?&lt;br /&gt;
&lt;br /&gt;
My email is trujillo@unex.es&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;br /&gt;
&lt;br /&gt;
== Using Moodle for Teachers ==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
&lt;br /&gt;
I teach math at Woodland Middle School  in Woodland, WA. I&#039;m also just beginning work with the Ubuntu Learning Project (name?). Is your book (Using Moodle - Teaching with the Popular Open Source Course Management System) available for download on Moodle Docs free to teachers? If so, is there some type of creative commons license? Or should we just link to Moodle Docs? I found your book extremely useful when I taught a 3-day Moodle Bootcamp to teachers this summer.&lt;br /&gt;
&lt;br /&gt;
Thanks, Mark Knudson&lt;br /&gt;
&lt;br /&gt;
:Hi Mark, glad to hear you found my book useful :-) It&#039;s available for download under the Creative Commons Attribution-Noncommercial-Share Alike licence here: [[Using Moodle book]]. --[[User:Helen Foster|Helen Foster]] 19:11, 21 September 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== PHP Settings by Moodle version ==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
&lt;br /&gt;
I&#039;m new to this community (and to Moodle) and am not sure how I should request an update to the documentation relating to a Moodle PHP extension requirement - specifically zlib.&lt;br /&gt;
I noticed that this page:&lt;br /&gt;
https://docs.moodle.org/no/Installering_av_Moodle has a section stating that &amp;quot;The zlib extension is required for zip/unzip functionality.&amp;quot; under the PHP Extensions and Libraries, but it doesn&#039;t exist here:&lt;br /&gt;
https://docs.moodle.org/en/PHP_settings_by_Moodle_version&lt;br /&gt;
&lt;br /&gt;
The PHP_settings_by_Moodle_version is a Stub and is waiting for review - I was thinking about updating it with the text from the https://docs.moodle.org/no/Installering_av_Moodle page.&lt;br /&gt;
&lt;br /&gt;
Looking for a little direction.&lt;br /&gt;
&lt;br /&gt;
Thanks!&lt;br /&gt;
Andy&lt;br /&gt;
&lt;br /&gt;
:Hi Andy,&lt;br /&gt;
&lt;br /&gt;
:Thanks for your kind offer to update the documentation [[PHP settings by Moodle version]]. Please feel free to go ahead and do so :-) (I asked in our developer chat and was informed that zlib is required for versions of Moodle up to 1.9 and Moodle 2.0 onwards will come with native PHP zip support so it needs the &amp;quot;zip&amp;quot; extension instead.)&lt;br /&gt;
&lt;br /&gt;
:For future reference, you&#039;re always welcome to edit pages in Moodle Docs and help improve our documentation. If you&#039;re not quite sure of something, you can leave a note in the page comments. Thanks again! --[[User:Helen Foster|Helen Foster]] 11:45, 20 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Query re Cool Course Competition ==&lt;br /&gt;
Two questions re the Cool Course Competition:&lt;br /&gt;
1) How can teachers know whether the modules and blocks they use are core or not? Is there a list somewhere?(2) Why are some entries in their own native theme, while most entries are using the competition site&#039;s theme? How can I upload my course so that it retains its own theme? Thanks, [[User:Thomas Brown|Thomas Brown]] 00:16, 16 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Hi Thomas, an easy way to check which modules and blocks are core i.e. included in the standard Moodle packages is to login to the [http://demo.moodle.net/ Moodle Demonstration Site] as an admin and check &#039;&#039;Administration &amp;gt; Modules &amp;gt; Activities &amp;gt; Manage activities&#039;&#039; and &#039;&#039;Administration &amp;gt; Modules &amp;gt; Blocks &amp;gt; Manage blocks&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
:Regarding the course theme, if you force a theme in the course settings, it will be used, otherwise the site theme will be used. --[[User:Helen Foster|Helen Foster]] 11:22, 16 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
::Do you mean the &amp;quot;Settings&amp;quot; page in the course&#039;s Admin block? My Settings page doesn&#039;t have any theme-related options. Did I look in the wrong place? tnx, [[User:Thomas Brown|Thomas Brown]] 23:55, 16 January 2010 (UTC)&lt;br /&gt;
:::It appears that the site admin can make a setting that allows teachers to force a theme -- so I can do that now. Which raises another question: Does my theme have to be installed on the Cool Course site for it to work there, or can my backup import the theme features and bring them along into the Cool Course site? tnx again, [[User:Thomas Brown|Thomas Brown]] 03:58, 18 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
::::Apologies for not mentioning that course themes need to be enabled by an admin in [[Theme settings]]; glad you figured things out! Yes, your theme needs to be installed on the competition site for it to work, as a course backup does not include theme features. All themes included in standard Moodle packages are available on the competition site. --[[User:Helen Foster|Helen Foster]] 09:32, 18 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I think I have a bigger problem now that my course is on the competition web site. None of the links to course resources work! I must have royally messed up my backup somehow. I included the resources in the backup, but...[[User:Thomas Brown|Thomas Brown]] 21:08, 18 January 2010 (UTC)&lt;br /&gt;
::Testing out the restore of my competition entry on my own site, I find that the html links that I&#039;ve put in the Topic Outline labels go to random id numbers, and so don&#039;t open the resources they&#039;re supposed to and give me a page not found browser error instead. However, if I simply click on edit for one of the labels, and then save it without changing anything, now suddenly all of the links are in working order. So, is it possible for me or someone else to do this fix on my competition entry, so that it starts working? While we&#039;re in there fixing it, can we change it to custom corners? Thanks yet again...[[User:Thomas Brown|Thomas Brown]] 21:48, 18 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::No worries, it&#039;s a good test for the course backup and restore process! I&#039;ve reported the problem you describe in the tracker - MDL-21380. --[[User:Helen Foster|Helen Foster]] 15:02, 19 January 2010 (UTC)&lt;br /&gt;
===Curious, why here?===&lt;br /&gt;
Firstly, thanks for the post here which drew my attention to coolcourses.moodle.org.  Really Cool and Neato.   Secondly, shouldn&#039;t most of this discussion be in the [http://coolcourses.moodle.org/mod/forum/view.php?id=3073 &amp;quot;Competition Lounge&amp;quot;]?   Thirdly, there were some special effects I am dying to know &amp;quot;how they do that?&amp;quot; and I just looked at each course in the first topic! Fourthly, thanks to all who contributed. --[[User:chris collman|chris collman]] 13:00, 21 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Hi Chris, just wondering why you never noticed the [http://moodle.org/mod/forum/discuss.php?d=135429 Cool Course Competition moodle.org news item]? Regarding the [http://coolcourses.moodle.org/mod/forum/view.php?id=3073 Competition lounge], the fact that it was only created a few hours ago probably explains why nobody has posted there yet. How about posting your &amp;quot;how they do that?&amp;quot; question and thanks there. --[[User:Helen Foster|Helen Foster]] 15:12, 21 January 2010 (UTC)&lt;br /&gt;
::I am just a stick in the mud sometimes.  I will take you up on your excellent suggestion. --[[User:chris collman|chris collman]] 16:46, 22 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==nln materials query ==&lt;br /&gt;
&lt;br /&gt;
Dear Helen,&lt;br /&gt;
Sorry to contact you this way - I have been recommended to you by several of your former colleagues on the ILT Champs list. I am conducting a research thesis at the University of Nottingham into the uptake and use of the nln materials amongst the FE sector, and have been advised that you would have an interesting view on this programme. If you could spare me a few minutes of your time to have a discussion, then please could you drop me an email at ttxla4@nottingham.ac.uk? Thank you very much. Rob Enbgelbright says &amp;quot;hello&amp;quot; btw. Many thanks, Laurel Armstrong&lt;br /&gt;
&lt;br /&gt;
:Hi Laurel, I&#039;ve just emailed you :-) --[[User:Helen Foster|Helen Foster]] 13:46, 1 February 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
==Jmol filter==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
&lt;br /&gt;
I noticed that you had updated the Jmol filter and wonder if you could tell me the status of this filter, and also the Jmol resource type and the Java Molecule Editor (for allowing students to add chemical structures as answers in quizzes).&lt;br /&gt;
Do they work in 1.9 and 2.0?&lt;br /&gt;
&lt;br /&gt;
On a similar note, there doesn&#039;t seem to be a direct way for students to put subscripts and superscripts into answers. I have resorted to adding a table of useful chemical symbols in the question, which students can copy and paste. Is there a setting somewhere that allows students to add formatted text?&lt;br /&gt;
&lt;br /&gt;
:Hi Mike, please see the comments on the [http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=87 Jmol resource type] for the latest information on it. You may also wish to contact Geoffrey Rowland.&lt;br /&gt;
&lt;br /&gt;
:Regarding adding chemical symbols, you may find the discussions listed in [[Chemistry/Biochemistry]] helpful. --[[User:Helen Foster|Helen Foster]] 14:58, 7 June 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== permission to edit brazilian portuguese version of docs.moodle.org ==&lt;br /&gt;
&lt;br /&gt;
Hello, Helen&lt;br /&gt;
&lt;br /&gt;
don&#039;t really know if you are the right person to ask, but, could you give me permission to edit brazilian portuguese version of docs.moodle.org ?&lt;br /&gt;
I help maintain the language pack along with Gilvan Marques, as you can see at http://cvs.moodle.org/lang/pt_br_utf8/?sortby=date#dirlist .&lt;br /&gt;
The last update of the home page was in august 2007, and also mention 1.8 as the current stable and focus of translators. I would like to make it a translated copy of the current english home page and also translate the release notes of 2.0 as first step...&lt;br /&gt;
&lt;br /&gt;
:Hi Daniel,&lt;br /&gt;
&lt;br /&gt;
:Thanks for your offer to edit the [https://docs.moodle.org/pt_br/P%C3%A1gina_principal Brazilian Portuguese Moodle Docs]. You should find that when you login you already have editing rights (all logged-in users can edit pages). --[[User:Helen Foster|Helen Foster]] 09:41, 25 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Brazilian docs home pagin &amp;quot;was protected against new editions&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
Hello, Helen&lt;br /&gt;
&lt;br /&gt;
i cannot edit that page because &amp;quot;This page was protected against new editions.&amp;quot;, and it only allows me to see and copy source code.&lt;br /&gt;
Could you unlock, please? Thanks, Daniel&lt;br /&gt;
&lt;br /&gt;
:Sorry I hadn&#039;t noticed that the homepage was protected. I&#039;ve just unlocked it now. --[[User:Helen Foster|Helen Foster]] 05:59, 30 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== About the new page I added on ForumNG ==&lt;br /&gt;
&lt;br /&gt;
Thanks for fixing it up and putting it in what I presume is a better place with a better name.  Now, questions about ettiquette: is this an OK page to have?  I&#039;m really pondering what is my voice (like wanting to promote ForumNG) vs Tim&#039;s voice (who fixed and answered the FAQ&#039;s and sort of speaks from the devlopers POV).  Stuff gets lost in Moodle.org forums.  Who would have looked in the developers forum for some of these conversations? Few people go to the tracker and vote.&lt;br /&gt;
&lt;br /&gt;
:Derek, thanks for creating documentation for [[ForumNG]]. I&#039;ve added a link to it from http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=2927 Thanks also for posting in the forum module forum and encouraging people to vote for the tracker issue. These are the best things you can do for new features you&#039;d like considered for inclusion in the Moodle core. --[[User:Helen Foster|Helen Foster]] 12:05, 9 August 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Thanks for this Helen, this is really cool.  No doubt you will notice another page I have created [Development:Forum_requirements] which is a little flag waving to see what is out there.  I do not think there is enough thought being put towards Forums - and digging around in the developer forums I can see why: no-one lkes the original code and it seems to much to either fix it or re-do it.  I am sad that key fixes/requests from 2006-7 are still launguishing in the tracker.  eg the edit time for Q&amp;amp;A forums.  So, maybe some conversaton can occur over the next months on &#039;&#039;What We&#039;d Like In Forums For 2.1&#039;&#039;.  :)  [[User:Derek Chirnside|Derek Chirnside]] 01:48, 10 August 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: Note that [[Activity_module_tests]] effectively has a list of current forum features.--[[User:Tim Hunt|Tim Hunt]] 07:26, 10 August 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Renaming pages in pt_br wiki? ==&lt;br /&gt;
&lt;br /&gt;
Hello, Helen&lt;br /&gt;
&lt;br /&gt;
i&#039;m writing to you to know the possibilities to rename some pages in brazilian wiki. I remember of a &amp;quot;move&amp;quot; functionality in mediawiki, maybe you could allow me to do so onnly in brazilian wiki? Or i can list you the page renames and you do the job? Basically is to translate some pages that were originally created in english.&lt;br /&gt;
Kind regards,&lt;br /&gt;
Daniel&lt;/div&gt;</summary>
		<author><name>Danielneis</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Moodle_2.0_release_notes&amp;diff=25891</id>
		<title>Moodle 2.0 release notes</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Moodle_2.0_release_notes&amp;diff=25891"/>
		<updated>2010-08-18T23:22:27Z</updated>

		<summary type="html">&lt;p&gt;Danielneis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Work_in_progress}}&lt;br /&gt;
&lt;br /&gt;
Final Release date: &#039;&#039;&#039;September, 2010&#039;&#039;&#039; (if testing goes well)&lt;br /&gt;
&lt;br /&gt;
Before the final release we will have a series of rapidly improving Preview releases.  These are to allow a wider range of developers and contributors to test the code on copies of their production servers, help us tweak the interface and performance, and work on translations, modules and other third-party code (most of which will have to be rewritten significantly).&lt;br /&gt;
&lt;br /&gt;
* [[Moodle 2.0 Preview 1 release notes]] - May 4, 2010&lt;br /&gt;
* [[Moodle 2.0 Preview 2 release notes]] - May 17, 2010&lt;br /&gt;
* [[Moodle 2.0 Preview 3 release notes]] - May 31, 2010&lt;br /&gt;
* [[Moodle 2.0 Preview 4 release notes]] - June 30, 2010&lt;br /&gt;
* [[Moodle 2.0 Release Candidate 1 release notes]] - August XX, 2010 (usable for experienced Moodle admins, still risky for big production sites)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Moodle 2.0 contains a lot of large new features, some completely rewritten features, and hundreds of bug fixes.  For full details (more than you probably want!), see [http://tracker.moodle.org/browse/MDL/fixforversion/10122 the full list of fixed issues in 2.0].&lt;br /&gt;
&lt;br /&gt;
This page is a summary of the major things to look for (links and screenshots will be added over time).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Major new features==&lt;br /&gt;
&lt;br /&gt;
===[[Community hub|Community hubs]]===&lt;br /&gt;
&lt;br /&gt;
* Anybody can set up a Community hub, which is a directory of courses for public use or for private communities.  The code is implemented as separate GPL plugin for Moodle.&lt;br /&gt;
* Sites can register to any Community hub (instead of just moodle.org)&lt;br /&gt;
* Teachers on registered sites can publish their full courses to Community hubs, for download&lt;br /&gt;
* Teachers on registered sites can also advertise their courses on Community hubs, for people to join&lt;br /&gt;
* Teachers on any site can search all public Community hubs and download courses as templates for their own courses&lt;br /&gt;
* Users on any Moodle site can also search Community hubs for courses (and communities of practice) to participate in.  Initially we are encouraging &#039;&#039;&#039;&#039;communities of teaching practice&#039;&#039;&#039;&#039; but any sort of course can be listed.&lt;br /&gt;
&lt;br /&gt;
===[[Repositories|Repository support]]===&lt;br /&gt;
&lt;br /&gt;
* Moodle now supports integration with external repositories of content, making it really simple to bring documents and media into Moodle via an AJAX interface that looks like a standard &#039;&#039;&#039;Open&#039;&#039;&#039; dialogue in desktop applications.&lt;br /&gt;
* Initial plugins in 2.0 include: Alfresco, Amazon S3, Box.net, File system on Server, Flickr, Google Docs, Mahara, MERLOT, Picasa, Recent Files, Remote Moodle sites, WebDAV servers, Wikimedia, Youtube.  These are simple to develop, so many more are expected.&lt;br /&gt;
* You can also import files from your desktop or by specifying a URL.&lt;br /&gt;
&lt;br /&gt;
===[[Portfolios|Portfolio support]]===&lt;br /&gt;
&lt;br /&gt;
* Modules can now export their data to external systems, particularly useful for portfolios where snapshots of forums, assignments and other things in Moodle are useful to record in a journal or a portfolio of evidence&lt;br /&gt;
* Different formats are supported (currently LEAP2A, HTML, Images and Text, but others like PDF can be added)&lt;br /&gt;
* Initial plugins in 2.0 include: Box.net, Flickr, Google Docs, &#039;&#039;&#039;Mahara&#039;&#039;&#039; and Picasa.&lt;br /&gt;
&lt;br /&gt;
===[[Completion]]===&lt;br /&gt;
&lt;br /&gt;
* Teachers can now specify conditions that define when any &#039;&#039;&#039;activity&#039;&#039;&#039; is seen as completed by a student.  For example, when a certain number of posts have been made, or a grade has been reached, or a choice has been made.  &lt;br /&gt;
* Teachers can now specify conditions that define with any &#039;&#039;&#039;course&#039;&#039;&#039; is seen as completed by a student.  Conditions include activity completion, but could also be by grade, date or a number of other criteria.&lt;br /&gt;
* Teachers and students can see reports that show the progress of any user within a course, or through a series of courses.&lt;br /&gt;
&lt;br /&gt;
===[[Conditional activities]]===&lt;br /&gt;
&lt;br /&gt;
* Access to activities can be restricted based on certain criteria, such as dates, grade obtained, or the completion of another activity.  &lt;br /&gt;
* These can be chained together to enable progressive disclosure of the course content, if that is desired. &lt;br /&gt;
&lt;br /&gt;
===[[Cohorts]]===&lt;br /&gt;
* Also known as &amp;quot;Site-wide groups&amp;quot;, these are site-wide collections of users that can be enrolled into courses in one action, either manually or synchronised automatically&lt;br /&gt;
&lt;br /&gt;
===[[Web Services|Web services support]]===&lt;br /&gt;
* Support for standards-based web services across the entire Moodle code base, allowing the admin to expose particular functions of Moodle for use by:&lt;br /&gt;
** Administrative systems such as HR or SIS applications&lt;br /&gt;
** Mobile clients&lt;br /&gt;
* Framework contains a very high-level of security with a detailed token system and complete control over the range of functions exposed&lt;br /&gt;
* All defined functions are automatically available via:&lt;br /&gt;
** XML-RPC&lt;br /&gt;
** AMF (Flash)&lt;br /&gt;
** REST&lt;br /&gt;
** SOAP (PHP)&lt;br /&gt;
&lt;br /&gt;
===[[IMS Common Cartridge import|IMS Common Cartridge]]===&lt;br /&gt;
* Moodle can now import courses in IMS Common Cartridge format (commonly used by publishers)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===New blocks===&lt;br /&gt;
* [[Comments block]] - like a shoutbox, allows comments to be added to any page. Great for student feedback.&lt;br /&gt;
* [[My private files block]] - allows easy access to one&#039;s private file repository in Moodle (with quota support)&lt;br /&gt;
* [[Community block]] - keeps track of external courses one is interested in &lt;br /&gt;
* [[Course completion status block]] - reports on the completion status of your courses&lt;br /&gt;
&lt;br /&gt;
==Major improvements to existing core features==&lt;br /&gt;
&lt;br /&gt;
===[[Backup 2.0|Backup and restore]]===&lt;br /&gt;
&lt;br /&gt;
* Completely rewritten Backup/Restore framework, no longer bound by memory (can work with &#039;&#039;&#039;any size course&#039;&#039;&#039;).&lt;br /&gt;
* Completely new backup format.&lt;br /&gt;
* Improved interface.&lt;br /&gt;
* Backup can be made of whole courses, but also specific sections or activities.&lt;br /&gt;
&lt;br /&gt;
===[[Blocks 2.0|Blocks]]===&lt;br /&gt;
* Blocks are now consistently implemented on every page in Moodle&lt;br /&gt;
* No longer any limit to the block regions (in addition to left and right, put them at the top, center or bottom of pages)&lt;br /&gt;
* Any block can be made sticky (appears in all the contexts below, eg throughout a course).&lt;br /&gt;
* Blocks can be &amp;quot;docked&amp;quot; on the side of the screen (if the theme supports it)&lt;br /&gt;
&lt;br /&gt;
===[[Blogs 2.0|Blogs]]===&lt;br /&gt;
* Support for comments on each blog entry&lt;br /&gt;
* Removal of group-level and course-level blogs (these are converted into forums on upgrade)&lt;br /&gt;
* Support for external blog feeds (synchronised to Moodle blog)&lt;br /&gt;
&lt;br /&gt;
===[[Comments 2.0|Comments]]===&lt;br /&gt;
* User comments (Glossaries, Databases, Blogs, etc) are now all consistently handled  and displayed throughout Moodle, using AJAX if available&lt;br /&gt;
* User activity reports will include all the comments made by that user&lt;br /&gt;
&lt;br /&gt;
===[[Enrolments 2.0|Enrolment plugins]]===&lt;br /&gt;
* Major improvements in the handling of guests and guest accounts &lt;br /&gt;
* Support for multiple forms of enrolment at the same time &lt;br /&gt;
* More detailed control over enrolment in courses &lt;br /&gt;
&lt;br /&gt;
===[[File handling 2.0|File handling]]===&lt;br /&gt;
&lt;br /&gt;
* Full support for Unicode file names on all operating systems.&lt;br /&gt;
* Metadata about each file (author, date, license, etc) and what the file is used for are stored in the database.&lt;br /&gt;
* Duplicate files (for example, a large video file use in two different courses) are only stored once, saving disk space.&lt;br /&gt;
* Files are no longer just &amp;quot;uploaded to the course&amp;quot;.  Files are connected to the particular bit of Moodle content that uses them. (For example, a file may belong to a file resource, a forum post or a wiki page). Access to these files is then controlled by the same rules as as that bit of Moodle, increasing security.&lt;br /&gt;
&lt;br /&gt;
===[[Grades 2.0|Gradebook]]===&lt;br /&gt;
* Details coming soon&lt;br /&gt;
&lt;br /&gt;
===[[HTML editor 2.0|HTML editor]]===&lt;br /&gt;
* New editor based on TinyMCE&lt;br /&gt;
* Works on more browsers&lt;br /&gt;
* Resizable editing area&lt;br /&gt;
* Cleaner XHTML output &lt;br /&gt;
* Full integration with configured external repositories to import and embed media into text&lt;br /&gt;
&lt;br /&gt;
===[[Messaging 2.0|Messaging]]===&lt;br /&gt;
* All email sent by Moodle is now treated as a message&lt;br /&gt;
* A message overview panel allows users to control how messages are sent to them&lt;br /&gt;
* Initial message output plugins in Moodle 2.0 include: Email, Jabber and Popups&lt;br /&gt;
&lt;br /&gt;
===[[My Moodle 2.0|My Moodle page]]===&lt;br /&gt;
* More customisable My Moodle page with new blocks for showing relevant information &lt;br /&gt;
* Admin can design (and optionally force) site-wide layouts for My Moodle&lt;br /&gt;
* My Moodle page given more prominence as the main &amp;quot;home page&amp;quot; for users&lt;br /&gt;
&lt;br /&gt;
===[[Navigation 2.0|Navigation]]===&lt;br /&gt;
* Standard &amp;quot;Navigation&amp;quot; block on every page showing contextual links, while allowing you to jump elsewhere quickly&lt;br /&gt;
* Standard &amp;quot;Settings&amp;quot; blocks on every page shows contextual settings as well as settings for anything else you have permissions for&lt;br /&gt;
&lt;br /&gt;
===[[Ratings 2.0|Ratings]]===&lt;br /&gt;
* User ratings (Glossaries, Databases, Forums, etc) are now all consistently handled and displayed throughout Moodle, using AJAX if available&lt;br /&gt;
* Aggregation of using ratings into activity grades is now standardised in all activities&lt;br /&gt;
&lt;br /&gt;
===[[Roles 2.0|Roles and permissions]]===&lt;br /&gt;
* Improved and simplified AJAX interfaces for defining and assigning roles&lt;br /&gt;
* Improved and simplified interfaces for tweaking permissions in any given context &lt;br /&gt;
* New &amp;quot;Archetypes&amp;quot; concept replacing the &amp;quot;Legacy roles&amp;quot; concept.&lt;br /&gt;
* New archetype &amp;quot;manager&amp;quot; to define the role of most people with system-wide editing rights, separate from &amp;quot;admin&amp;quot; role.&lt;br /&gt;
&lt;br /&gt;
===[[RSS feeds 2.0|RSS feeds]]===&lt;br /&gt;
* All RSS feeds are now secured using a random per-user token in the URL&lt;br /&gt;
* Tokens can be updated by the user at any time (if they suspect a feed URL has been compromised)&lt;br /&gt;
* RSS feeds are now more accurate (eg they support forums with separate groups), and are generated efficiently whenever required&lt;br /&gt;
&lt;br /&gt;
===[[Development:Themes 2.0|Themes]]===&lt;br /&gt;
* Many new themes in the core distribution&lt;br /&gt;
* All HTML and JS ouput is now far more efficient (server-side caching) and consistent (tableless layout, new CSS, YUI Framework)&lt;br /&gt;
* Themes can change the HTML of the page if they wish&lt;br /&gt;
* Core support for custom menus in all themes (for example at the top of the page)&lt;br /&gt;
&lt;br /&gt;
===[[Translation 2.0|Translation system]]===&lt;br /&gt;
* [http://lang.moodle.org/ New web portal] to make it easer for groups to collaborate on translating Moodle, and to keep their translations up-to-date.&lt;br /&gt;
* More efficient [[Development:Languages/AMOS|storage format for language strings]] should slightly improve performance.&lt;br /&gt;
&lt;br /&gt;
===User profile pages===&lt;br /&gt;
* Site-wide user profile page can be customised by users with blocks, news, feeds and so on&lt;br /&gt;
* Course-specific user profile pages show course blocks and standard profile information, plus information for teachers of that course&lt;br /&gt;
&lt;br /&gt;
==Major improvements to activity modules==&lt;br /&gt;
&lt;br /&gt;
===Lesson===&lt;br /&gt;
* Refactored internal code &lt;br /&gt;
* Forms are now standard Moodle forms&lt;br /&gt;
&lt;br /&gt;
===Quiz module and question bank===&lt;br /&gt;
&lt;br /&gt;
* [[Development:quiz_navigation|Quiz navigation improvements for students]]&lt;br /&gt;
* [[Development:Flagging_questions_during_a_quiz_attempt|Flagging questions during a quiz attempt]] &lt;br /&gt;
* [[Development:Quiz_report_enhancements|Quiz report enhancements]] - Major improvements to the quiz reports, especially regrading and item analysis&lt;br /&gt;
* [[Development:Quiz_UI_redesign|Quiz editing interface improvements]]&lt;br /&gt;
* Different settings (open/close date, number of attempts, password, time limit) for each group or student (MDL-16478)&lt;br /&gt;
* [[Development:Administration page for question types|Administration page for question types]]&lt;br /&gt;
* [[Development:Moodle 2.0 question bank improvements|Question tagging and improved searching in the question bank]]&lt;br /&gt;
* MDL-8648 Essay questions can now be randomised by random questions&lt;br /&gt;
&lt;br /&gt;
===Resource===&lt;br /&gt;
* All the resource types have been refactored into real modules, and cleaned up&lt;br /&gt;
** File - for displaying a file, possibly with supporting files (like a HTML mini-site)&lt;br /&gt;
** Folder - for displaying a collection of documents &lt;br /&gt;
** URL - for displaying a page with a given URL&lt;br /&gt;
** Page - for a single page, edited online using the HTML editor&lt;br /&gt;
** IMS - for showing a regular IMS content package&lt;br /&gt;
* Better XHTML-compliant support for frames, iframes and embedding in all these modules&lt;br /&gt;
&lt;br /&gt;
===SCORM===&lt;br /&gt;
&lt;br /&gt;
* New [[SCORM module]] settings - display attempt status, display course structure, force completed, force new attempt, lock after final attempt - allowing the behaviour dictated to the SCORM object by the authoring package to be changed MDL-11501 &lt;br /&gt;
* New reporting interface including sortable/collapsible table with group select box and ability to download in Excel, ODS and text format MDL-21555&lt;br /&gt;
* New SCORM player UI with better navigation, improved performance and better handling of stage size MDL-22951&lt;br /&gt;
&lt;br /&gt;
===[[Wiki module 2.0|Wiki]]===&lt;br /&gt;
* Completely re-written from scratch, based on NWIki from UPC&lt;br /&gt;
* Support for Mediawiki-style syntax, as well as Creole &lt;br /&gt;
* Interface improvements &lt;br /&gt;
&lt;br /&gt;
===[[Workshop module 2.0|Workshop]]===&lt;br /&gt;
&lt;br /&gt;
* Completely rewritten from scratch &lt;br /&gt;
* Vastly improved interface for managing stages and users&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
&lt;br /&gt;
Since Moodle 2.0 is such a major release, we are allowing ourselves some increases in the requirements.&lt;br /&gt;
&lt;br /&gt;
* PHP must be 5.2.8 or later (it was released 08-Dec-2008)&lt;br /&gt;
* Databases should be one of the following:&lt;br /&gt;
** MySQL 5.0.25 or later  (InnoDB storage engine highly recommended)&lt;br /&gt;
** PostgreSQL 8.3 or later&lt;br /&gt;
** Oracle 10.2 or later&lt;br /&gt;
** MS SQL 2005 or later&lt;br /&gt;
* Any standards-supporting browser from the past few years, for example:&lt;br /&gt;
** Firefox 3 or later &lt;br /&gt;
** Safari 3 or later &lt;br /&gt;
** Google Chrome 4 or later&lt;br /&gt;
** Opera 9 or later&lt;br /&gt;
** MS Internet Explorer 7 or later (Even [http://googleenterprise.blogspot.com/2010/01/modern-browsers-for-modern-applications.html Google don&#039;t support IE6 any more])&lt;br /&gt;
** etc&lt;br /&gt;
&lt;br /&gt;
==Upgrading==&lt;br /&gt;
&lt;br /&gt;
When upgrading to Moodle 2.0, you must have Moodle 1.9 or later.  if you are using an earlier version of Moodle (eg 1.8.x) then you need to upgrade to Moodle 1.9.x first. We advise that you test the upgrade first on a COPY of your production site, to make sure it works as you expect.&lt;br /&gt;
&lt;br /&gt;
For further information, see [[Upgrading to Moodle 2.0]].&lt;br /&gt;
&lt;br /&gt;
==For developers: API changes==&lt;br /&gt;
&lt;br /&gt;
See [[Development:Migrating_contrib_code_to_2.0]]&lt;br /&gt;
&lt;br /&gt;
* [[Development:DB_layer_2.0_migration_docs|Database layer changes]] - you will need to update your code.&lt;br /&gt;
* [[Development:Using_the_file_API|File handling changes]] - you will need to update your code.&lt;br /&gt;
* [[Development:Migrating your code code to the 2.0 rendering API|Rendering layer changes]] - should be mostly backwards compatible, but you are advised to upgrade your code.&lt;br /&gt;
* Require capability used to do an automatic require_login. It no longer does so. All pages must explicitly call require_login if they need it. MDL-19882&lt;br /&gt;
* [[Development:Moodle_2.0_question_type_API_changes|Changes to the question type API]]&lt;br /&gt;
* MNet has been refactored and tidied up - related third party code needs to be checked&lt;br /&gt;
* Changes and improvements to the [[Development:Local_customisation|Local customisation system]].&lt;br /&gt;
* Javascript &lt;br /&gt;
* YUI&lt;br /&gt;
* custom profile fields values are loaded into $USER-&amp;gt;profile array instead of directly into $USER object&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*[[Moodle 1.9 release notes]]&lt;br /&gt;
*[[QA testing]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Release notes]]&lt;br /&gt;
[[Category:Moodle 2.0]]&lt;br /&gt;
&lt;br /&gt;
[[fr:Notes de mise à jour de Moodle 2.0]]&lt;br /&gt;
[[es:Notas de Moodle 2.0]]&lt;/div&gt;</summary>
		<author><name>Danielneis</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Moodle_2.0_release_notes&amp;diff=25885</id>
		<title>Moodle 2.0 release notes</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Moodle_2.0_release_notes&amp;diff=25885"/>
		<updated>2010-08-12T23:41:34Z</updated>

		<summary type="html">&lt;p&gt;Danielneis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Work_in_progress}}&lt;br /&gt;
&lt;br /&gt;
Final Release date: &#039;&#039;&#039;September, 2010&#039;&#039;&#039; (if testing goes well)&lt;br /&gt;
&lt;br /&gt;
Before the final release we will have a series of rapidly improving Preview releases.  These are to allow a wider range of developers and contributors to test the code on copies of their production servers, help us tweak the interface and performance, and work on translations, modules and other third-party code (most of which will have to be rewritten significantly).&lt;br /&gt;
&lt;br /&gt;
* [[Moodle 2.0 Preview 1 release notes]] - May 4, 2010&lt;br /&gt;
* [[Moodle 2.0 Preview 2 release notes]] - May 17, 2010&lt;br /&gt;
* [[Moodle 2.0 Preview 3 release notes]] - May 31, 2010&lt;br /&gt;
* [[Moodle 2.0 Preview 4 release notes]] - June 30, 2010&lt;br /&gt;
* [[Moodle 2.0 Release Candidate 1 release notes]] - August XX, 2010 (usable for experienced Moodle admins, still risky for big production sites)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Moodle 2.0 contains a lot of large new features, some completely rewritten features, and hundreds of bug fixes.  For full details (more than you probably want!), see [http://tracker.moodle.org/browse/MDL/fixforversion/10122 the full list of fixed issues in 2.0].&lt;br /&gt;
&lt;br /&gt;
This page is a summary of the major things to look for (links and screenshots will be added over time).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Major new features==&lt;br /&gt;
&lt;br /&gt;
===[[Community hub|Community hubs]]===&lt;br /&gt;
&lt;br /&gt;
* Anybody can set up a Community hub, which is a directory of courses for public use or for private communities.  The code is implemented as separate GPL plugin for Moodle.&lt;br /&gt;
* Sites can register to any Community hub (instead of just moodle.org)&lt;br /&gt;
* Teachers on registered sites can publish their full courses to Community hubs, for download&lt;br /&gt;
* Teachers on registered sites can also advertise their courses on Community hubs, for people to join&lt;br /&gt;
* Teachers on any site can search all public Community hubs and download courses as templates for their own courses&lt;br /&gt;
* Users on any Moodle site can also search Community hubs for courses (and communities of practice) to participate in.  Initially we are encouraging &#039;&#039;&#039;&#039;communities of teaching practice&#039;&#039;&#039;&#039; but any sort of course can be listed.&lt;br /&gt;
&lt;br /&gt;
===[[Repositories|Repository support]]===&lt;br /&gt;
&lt;br /&gt;
* Moodle now supports integration with external repositories of content, making it really simple to bring documents and media into Moodle via an AJAX interface that looks like a standard &#039;&#039;&#039;Open&#039;&#039;&#039; dialogue in desktop applications.&lt;br /&gt;
* Initial plugins in 2.0 include: Alfresco, Amazon S3, Box.net, File system on Server, Flickr, Google Docs, Mahara, MERLOT, Picasa, Recent Files, Remote Moodle sites, WebDAV servers, Wikimedia, Youtube.  These are simple to develop, so many more are expected.&lt;br /&gt;
* You can also import files from your desktop or by specifying a URL.&lt;br /&gt;
&lt;br /&gt;
===[[Portfolios|Portfolio support]]===&lt;br /&gt;
&lt;br /&gt;
* Modules can now export their data to external systems, particularly useful for portfolios where snapshots of forums, assignments and other things in Moodle are useful to record in a journal or a portfolio of evidence&lt;br /&gt;
* Different formats are supported (currently LEAP2A, HTML, Images and Text, but others like PDF can be added)&lt;br /&gt;
* Initial plugins in 2.0 include: Box.net, Flickr, Google Docs, &#039;&#039;&#039;Mahara&#039;&#039;&#039; and Picasa.&lt;br /&gt;
&lt;br /&gt;
===[[Completion]]===&lt;br /&gt;
&lt;br /&gt;
* Teachers can now specify conditions that define when any &#039;&#039;&#039;activity&#039;&#039;&#039; is seen as completed by a student.  For example, when a certain number of posts have been made, or a grade has been reached, or a choice has been made.  &lt;br /&gt;
* Teachers can now specify conditions that define with any &#039;&#039;&#039;course&#039;&#039;&#039; is seen as completed by a student.  Conditions include activity completion, but could also be by grade, date or a number of other criteria.&lt;br /&gt;
* Teachers and students can see reports that show the progress of any user within a course, or through a series of courses.&lt;br /&gt;
&lt;br /&gt;
===[[Conditional activities]]===&lt;br /&gt;
&lt;br /&gt;
* Access to activities can be restricted based on certain criteria, such as dates, grade obtained, or the completion of another activity.  &lt;br /&gt;
* These can be chained together to enable progressive disclosure of the course content, if that is desired. &lt;br /&gt;
&lt;br /&gt;
===[[Cohorts]]===&lt;br /&gt;
* Also known as &amp;quot;Site-wide groups&amp;quot;, these are site-wide collections of users that can be enrolled into courses in one action, either manually or synchronised automatically&lt;br /&gt;
&lt;br /&gt;
===[[Web Services|Web services support]]===&lt;br /&gt;
* Support for standards-based web services across the entire Moodle code base, allowing the admin to expose particular functions of Moodle for use by:&lt;br /&gt;
** Administrative systems such as HR or SIS applications&lt;br /&gt;
** Mobile clients&lt;br /&gt;
* Framework contains a very high-level of security with a detailed token system and complete control over the range of functions exposed&lt;br /&gt;
* All defined functions are automatically available via:&lt;br /&gt;
** XML-RPC&lt;br /&gt;
** AMF (Flash)&lt;br /&gt;
** REST&lt;br /&gt;
** SOAP (PHP)&lt;br /&gt;
&lt;br /&gt;
===[[IMS Common Cartridge import|IMS Common Cartridge]]===&lt;br /&gt;
* Moodle can now import courses in IMS Common Cartridge format (commonly used by publishers)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===New blocks===&lt;br /&gt;
* [[Comments block]] - like a shoutbox, allows comments to be added to any page. Great for student feedback.&lt;br /&gt;
* [[My private files block]] - allows easy access to one&#039;s private file repository in Moodle (with quota support)&lt;br /&gt;
* [[Community block]] - keeps track of external courses one is interested in &lt;br /&gt;
* [[Course completion status block]] - reports on the completion status of your courses&lt;br /&gt;
&lt;br /&gt;
==Major improvements to existing core features==&lt;br /&gt;
&lt;br /&gt;
===[[Backup 2.0|Backup and restore]]===&lt;br /&gt;
&lt;br /&gt;
* Completely rewritten Backup/Restore framework, no longer bound by memory (can work with &#039;&#039;&#039;any size course&#039;&#039;&#039;).&lt;br /&gt;
* Completely new backup format.&lt;br /&gt;
* Improved interface.&lt;br /&gt;
* Backup can be made of whole courses, but also specific sections or activities.&lt;br /&gt;
&lt;br /&gt;
===[[Blocks 2.0|Blocks]]===&lt;br /&gt;
* Blocks are now consistently implemented on every page in Moodle&lt;br /&gt;
* No longer any limit to the block regions (in addition to left and right, put them at the top, center or bottom of pages)&lt;br /&gt;
* Any block can be made sticky (appears in all the contexts below, eg throughout a course).&lt;br /&gt;
* Blocks can be &amp;quot;docked&amp;quot; on the side of the screen (if the theme supports it)&lt;br /&gt;
&lt;br /&gt;
===[[Blogs 2.0|Blogs]]===&lt;br /&gt;
* Support for comments on each blog entry&lt;br /&gt;
* Removal of group-level and course-level blogs (these are converted into forums on upgrade)&lt;br /&gt;
* Support for external blog feeds (synchronised to Moodle blog)&lt;br /&gt;
&lt;br /&gt;
===[[Comments 2.0|Comments]]===&lt;br /&gt;
* User comments (Glossaries, Databases, Blogs, etc) are now all consistently handled  and displayed throughout Moodle, using AJAX if available&lt;br /&gt;
* User activity reports will include all the comments made by that user&lt;br /&gt;
&lt;br /&gt;
===[[Enrolments 2.0|Enrolment plugins]]===&lt;br /&gt;
* Major improvements in the handling of guests and guest accounts &lt;br /&gt;
* Support for multiple forms of enrolment at the same time &lt;br /&gt;
* More detailed control over enrolment in courses &lt;br /&gt;
&lt;br /&gt;
===File handling===&lt;br /&gt;
&lt;br /&gt;
* Full support for Unicode file names on all operating systems.&lt;br /&gt;
* Metadata about each file (author, date, license, etc) and what the file is used for are stored in the database.&lt;br /&gt;
* Duplicate files (for example, a large video file use in two different courses) are only stored once, saving disk space.&lt;br /&gt;
* Files are no longer just &amp;quot;uploaded to the course&amp;quot;.  Files are connected to the particular bit of Moodle content that uses them. (For example, a file may belong to a file resource, a forum post or a wiki page). Access to these files is then controlled by the same rules as as that bit of Moodle, increasing security.&lt;br /&gt;
&lt;br /&gt;
===Gradebook===&lt;br /&gt;
* Details coming soon&lt;br /&gt;
&lt;br /&gt;
===HTML editor===&lt;br /&gt;
* New editor based on TinyMCE&lt;br /&gt;
* Works on more browsers&lt;br /&gt;
* Resizable editing area&lt;br /&gt;
* Cleaner XHTML output &lt;br /&gt;
* Full integration with configured external repositories to import and embed media into text&lt;br /&gt;
&lt;br /&gt;
===Messaging===&lt;br /&gt;
* All email sent by Moodle is now treated as a message&lt;br /&gt;
* A message overview panel allows users to control how messages are sent to them&lt;br /&gt;
* Initial message output plugins in Moodle 2.0 include: Email, Jabber and Popups&lt;br /&gt;
&lt;br /&gt;
===My Moodle page===&lt;br /&gt;
* More customisable My Moodle page with new blocks for showing relevant information &lt;br /&gt;
* Admin can design (and optionally force) site-wide layouts for My Moodle&lt;br /&gt;
* My Moodle page given more prominence as the main &amp;quot;home page&amp;quot; for users&lt;br /&gt;
&lt;br /&gt;
===Navigation===&lt;br /&gt;
* Standard &amp;quot;Navigation&amp;quot; block on every page showing contextual links, while allowing you to jump elsewhere quickly&lt;br /&gt;
* Standard &amp;quot;Settings&amp;quot; blocks on every page shows contextual settings as well as settings for anything else you have permissions for&lt;br /&gt;
&lt;br /&gt;
===Ratings===&lt;br /&gt;
* User ratings (Glossaries, Databases, Forums, etc) are now all consistently handled and displayed throughout Moodle, using AJAX if available&lt;br /&gt;
* Aggregation of using ratings into activity grades is now standardised in all activities&lt;br /&gt;
&lt;br /&gt;
===Roles and permissions===&lt;br /&gt;
* Improved and simplified AJAX interfaces for defining and assigning roles&lt;br /&gt;
* Improved and simplified interfaces for tweaking permissions in any given context &lt;br /&gt;
* New &amp;quot;Archetypes&amp;quot; concept replacing the &amp;quot;Legacy roles&amp;quot; concept.&lt;br /&gt;
* New archetype &amp;quot;manager&amp;quot; to define the role of most people with system-wide editing rights, separate from &amp;quot;admin&amp;quot; role.&lt;br /&gt;
&lt;br /&gt;
===RSS feeds===&lt;br /&gt;
* All RSS feeds are now secured using a random per-user token in the URL&lt;br /&gt;
* Tokens can be updated by the user at any time (if they suspect a feed URL has been compromised)&lt;br /&gt;
* RSS feeds are now more accurate (eg they support forums with separate groups), and are generated efficiently whenever required&lt;br /&gt;
&lt;br /&gt;
===[[Development:Themes 2.0|Themes]]===&lt;br /&gt;
* Many new themes in the core distribution&lt;br /&gt;
* All HTML and JS ouput is now far more efficient (server-side caching) and consistent (tableless layout, new CSS, YUI Framework)&lt;br /&gt;
* Themes can change the HTML of the page if they wish&lt;br /&gt;
* Core support for custom menus in all themes (for example at the top of the page)&lt;br /&gt;
&lt;br /&gt;
===[[Translation 2.0|Translation system]]===&lt;br /&gt;
* [http://lang.moodle.org/ New web portal] to make it easer for groups to collaborate on translating Moodle, and to keep their translations up-to-date.&lt;br /&gt;
* More efficient [[Development:Languages/AMOS|storage format for language strings]] should slightly improve performance.&lt;br /&gt;
&lt;br /&gt;
===User profile pages===&lt;br /&gt;
* Site-wide user profile page can be customised by users with blocks, news, feeds and so on&lt;br /&gt;
* Course-specific user profile pages show course blocks and standard profile information, plus information for teachers of that course&lt;br /&gt;
&lt;br /&gt;
==Major improvements to activity modules==&lt;br /&gt;
&lt;br /&gt;
===Lesson===&lt;br /&gt;
* Refactored internal code &lt;br /&gt;
* Forms are now standard Moodle forms&lt;br /&gt;
&lt;br /&gt;
===Quiz module and question bank===&lt;br /&gt;
&lt;br /&gt;
* [[Development:quiz_navigation|Quiz navigation improvements for students]]&lt;br /&gt;
* [[Development:Flagging_questions_during_a_quiz_attempt|Flagging questions during a quiz attempt]] &lt;br /&gt;
* [[Development:Quiz_report_enhancements|Quiz report enhancements]] - Major improvements to the quiz reports, especially regrading and item analysis&lt;br /&gt;
* [[Development:Quiz_UI_redesign|Quiz editing interface improvements]]&lt;br /&gt;
* Different settings (open/close date, number of attempts, password, time limit) for each group or student (MDL-16478)&lt;br /&gt;
* [[Development:Administration page for question types|Administration page for question types]]&lt;br /&gt;
* [[Development:Moodle 2.0 question bank improvements|Question tagging and improved searching in the question bank]]&lt;br /&gt;
* MDL-8648 Essay questions can now be randomised by random questions&lt;br /&gt;
&lt;br /&gt;
===Resource===&lt;br /&gt;
* All the resource types have been refactored into real modules, and cleaned up&lt;br /&gt;
** File - for displaying a file, possibly with supporting files (like a HTML mini-site)&lt;br /&gt;
** Folder - for displaying a collection of documents &lt;br /&gt;
** URL - for displaying a page with a given URL&lt;br /&gt;
** Page - for a single page, edited online using the HTML editor&lt;br /&gt;
** IMS - for showing a regular IMS content package&lt;br /&gt;
* Better XHTML-compliant support for frames, iframes and embedding in all these modules&lt;br /&gt;
&lt;br /&gt;
===SCORM===&lt;br /&gt;
&lt;br /&gt;
* New [[SCORM module]] settings - display attempt status, display course structure, force completed, force new attempt, lock after final attempt - allowing the behaviour dictated to the SCORM object by the authoring package to be changed MDL-11501 &lt;br /&gt;
* New reporting interface including sortable/collapsible table with group select box and ability to download in Excel, ODS and text format MDL-21555&lt;br /&gt;
* New SCORM player UI with better navigation, improved performance and better handling of stage size MDL-22951&lt;br /&gt;
&lt;br /&gt;
===Wiki===&lt;br /&gt;
* Completely re-written from scratch, based on NWIki from UPC&lt;br /&gt;
* Support for Mediawiki-style syntax, as well as Creole &lt;br /&gt;
* Interface improvements &lt;br /&gt;
&lt;br /&gt;
===Workshop===&lt;br /&gt;
&lt;br /&gt;
* Completely rewritten from scratch &lt;br /&gt;
* Vastly improved interface for managing stages and users&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
&lt;br /&gt;
Since Moodle 2.0 is such a major release, we are allowing ourselves some increases in the requirements.&lt;br /&gt;
&lt;br /&gt;
* PHP must be 5.2.8 or later (it was released 08-Dec-2008)&lt;br /&gt;
* Databases should be one of the following:&lt;br /&gt;
** MySQL 5.0.25 or later  (InnoDB storage engine highly recommended)&lt;br /&gt;
** PostgreSQL 8.3 or later&lt;br /&gt;
** Oracle 10.2 or later&lt;br /&gt;
** MS SQL 2005 or later&lt;br /&gt;
* Any standards-supporting browser from the past few years, for example:&lt;br /&gt;
** Firefox 3 or later &lt;br /&gt;
** Safari 3 or later &lt;br /&gt;
** Google Chrome 4 or later&lt;br /&gt;
** Opera 9 or later&lt;br /&gt;
** MS Internet Explorer 7 or later (Even [http://googleenterprise.blogspot.com/2010/01/modern-browsers-for-modern-applications.html Google don&#039;t support IE6 any more])&lt;br /&gt;
** etc&lt;br /&gt;
&lt;br /&gt;
==Upgrading==&lt;br /&gt;
&lt;br /&gt;
* When upgrading to Moodle 2.0, you must have Moodle 1.9 or later.  if you are using an earlier version of Moodle (eg 1.8.x) then you need to upgrade to Moodle 1.9.x first.&lt;br /&gt;
* We advise that you test the upgrade first on a COPY of your production site, to make sure it works as you expect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==For developers: API changes==&lt;br /&gt;
&lt;br /&gt;
See [[Development:Migrating_contrib_code_to_2.0]]&lt;br /&gt;
&lt;br /&gt;
* [[Development:DB_layer_2.0_migration_docs|Database layer changes]] - you will need to update your code.&lt;br /&gt;
* [[Development:Using_the_file_API|File handling changes]] - you will need to update your code.&lt;br /&gt;
* [[Development:Migrating your code code to the 2.0 rendering API|Rendering layer changes]] - should be mostly backwards compatible, but you are advised to upgrade your code.&lt;br /&gt;
* Require capability used to do an automatic require_login. It no longer does so. All pages must explicitly call require_login if they need it. MDL-19882&lt;br /&gt;
* [[Development:Moodle_2.0_question_type_API_changes|Changes to the question type API]]&lt;br /&gt;
* MNet has been refactored and tidied up - related third party code needs to be checked&lt;br /&gt;
* Changes and improvements to the [[Development:Local_customisation|Local customisation system]].&lt;br /&gt;
* Javascript &lt;br /&gt;
* YUI&lt;br /&gt;
* custom profile fields values are loaded into $USER-&amp;gt;profile array instead of directly into $USER object&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*[[Moodle 1.9 release notes]]&lt;br /&gt;
*[[QA testing]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Release notes]]&lt;br /&gt;
[[Category:Moodle 2.0]]&lt;br /&gt;
&lt;br /&gt;
[[fr:Notes de mise à jour de Moodle 2.0]]&lt;br /&gt;
[[es:Notas de Moodle 2.0]]&lt;br /&gt;
[[br:Moodle 2.0 release notes]]&lt;/div&gt;</summary>
		<author><name>Danielneis</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Moodle_2.0_release_notes&amp;diff=25884</id>
		<title>Moodle 2.0 release notes</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Moodle_2.0_release_notes&amp;diff=25884"/>
		<updated>2010-08-12T23:41:03Z</updated>

		<summary type="html">&lt;p&gt;Danielneis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Work_in_progress}}&lt;br /&gt;
&lt;br /&gt;
Final Release date: &#039;&#039;&#039;September, 2010&#039;&#039;&#039; (if testing goes well)&lt;br /&gt;
&lt;br /&gt;
Before the final release we will have a series of rapidly improving Preview releases.  These are to allow a wider range of developers and contributors to test the code on copies of their production servers, help us tweak the interface and performance, and work on translations, modules and other third-party code (most of which will have to be rewritten significantly).&lt;br /&gt;
&lt;br /&gt;
* [[Moodle 2.0 Preview 1 release notes]] - May 4, 2010&lt;br /&gt;
* [[Moodle 2.0 Preview 2 release notes]] - May 17, 2010&lt;br /&gt;
* [[Moodle 2.0 Preview 3 release notes]] - May 31, 2010&lt;br /&gt;
* [[Moodle 2.0 Preview 4 release notes]] - June 30, 2010&lt;br /&gt;
* [[Moodle 2.0 Release Candidate 1 release notes]] - August XX, 2010 (usable for experienced Moodle admins, still risky for big production sites)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Moodle 2.0 contains a lot of large new features, some completely rewritten features, and hundreds of bug fixes.  For full details (more than you probably want!), see [http://tracker.moodle.org/browse/MDL/fixforversion/10122 the full list of fixed issues in 2.0].&lt;br /&gt;
&lt;br /&gt;
This page is a summary of the major things to look for (links and screenshots will be added over time).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Major new features==&lt;br /&gt;
&lt;br /&gt;
===[[Community hub|Community hubs]]===&lt;br /&gt;
&lt;br /&gt;
* Anybody can set up a Community hub, which is a directory of courses for public use or for private communities.  The code is implemented as separate GPL plugin for Moodle.&lt;br /&gt;
* Sites can register to any Community hub (instead of just moodle.org)&lt;br /&gt;
* Teachers on registered sites can publish their full courses to Community hubs, for download&lt;br /&gt;
* Teachers on registered sites can also advertise their courses on Community hubs, for people to join&lt;br /&gt;
* Teachers on any site can search all public Community hubs and download courses as templates for their own courses&lt;br /&gt;
* Users on any Moodle site can also search Community hubs for courses (and communities of practice) to participate in.  Initially we are encouraging &#039;&#039;&#039;&#039;communities of teaching practice&#039;&#039;&#039;&#039; but any sort of course can be listed.&lt;br /&gt;
&lt;br /&gt;
===[[Repositories|Repository support]]===&lt;br /&gt;
&lt;br /&gt;
* Moodle now supports integration with external repositories of content, making it really simple to bring documents and media into Moodle via an AJAX interface that looks like a standard &#039;&#039;&#039;Open&#039;&#039;&#039; dialogue in desktop applications.&lt;br /&gt;
* Initial plugins in 2.0 include: Alfresco, Amazon S3, Box.net, File system on Server, Flickr, Google Docs, Mahara, MERLOT, Picasa, Recent Files, Remote Moodle sites, WebDAV servers, Wikimedia, Youtube.  These are simple to develop, so many more are expected.&lt;br /&gt;
* You can also import files from your desktop or by specifying a URL.&lt;br /&gt;
&lt;br /&gt;
===[[Portfolios|Portfolio support]]===&lt;br /&gt;
&lt;br /&gt;
* Modules can now export their data to external systems, particularly useful for portfolios where snapshots of forums, assignments and other things in Moodle are useful to record in a journal or a portfolio of evidence&lt;br /&gt;
* Different formats are supported (currently LEAP2A, HTML, Images and Text, but others like PDF can be added)&lt;br /&gt;
* Initial plugins in 2.0 include: Box.net, Flickr, Google Docs, &#039;&#039;&#039;Mahara&#039;&#039;&#039; and Picasa.&lt;br /&gt;
&lt;br /&gt;
===[[Completion]]===&lt;br /&gt;
&lt;br /&gt;
* Teachers can now specify conditions that define when any &#039;&#039;&#039;activity&#039;&#039;&#039; is seen as completed by a student.  For example, when a certain number of posts have been made, or a grade has been reached, or a choice has been made.  &lt;br /&gt;
* Teachers can now specify conditions that define with any &#039;&#039;&#039;course&#039;&#039;&#039; is seen as completed by a student.  Conditions include activity completion, but could also be by grade, date or a number of other criteria.&lt;br /&gt;
* Teachers and students can see reports that show the progress of any user within a course, or through a series of courses.&lt;br /&gt;
&lt;br /&gt;
===[[Conditional activities]]===&lt;br /&gt;
&lt;br /&gt;
* Access to activities can be restricted based on certain criteria, such as dates, grade obtained, or the completion of another activity.  &lt;br /&gt;
* These can be chained together to enable progressive disclosure of the course content, if that is desired. &lt;br /&gt;
&lt;br /&gt;
===[[Cohorts]]===&lt;br /&gt;
* Also known as &amp;quot;Site-wide groups&amp;quot;, these are site-wide collections of users that can be enrolled into courses in one action, either manually or synchronised automatically&lt;br /&gt;
&lt;br /&gt;
===[[Web Services|Web services support]]===&lt;br /&gt;
* Support for standards-based web services across the entire Moodle code base, allowing the admin to expose particular functions of Moodle for use by:&lt;br /&gt;
** Administrative systems such as HR or SIS applications&lt;br /&gt;
** Mobile clients&lt;br /&gt;
* Framework contains a very high-level of security with a detailed token system and complete control over the range of functions exposed&lt;br /&gt;
* All defined functions are automatically available via:&lt;br /&gt;
** XML-RPC&lt;br /&gt;
** AMF (Flash)&lt;br /&gt;
** REST&lt;br /&gt;
** SOAP (PHP)&lt;br /&gt;
&lt;br /&gt;
===[[IMS Common Cartridge import|IMS Common Cartridge]]===&lt;br /&gt;
* Moodle can now import courses in IMS Common Cartridge format (commonly used by publishers)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===New blocks===&lt;br /&gt;
* [[Comments block]] - like a shoutbox, allows comments to be added to any page. Great for student feedback.&lt;br /&gt;
* [[My private files block]] - allows easy access to one&#039;s private file repository in Moodle (with quota support)&lt;br /&gt;
* [[Community block]] - keeps track of external courses one is interested in &lt;br /&gt;
* [[Course completion status block]] - reports on the completion status of your courses&lt;br /&gt;
&lt;br /&gt;
==Major improvements to existing core features==&lt;br /&gt;
&lt;br /&gt;
===[[Backup 2.0|Backup and restore]]===&lt;br /&gt;
&lt;br /&gt;
* Completely rewritten Backup/Restore framework, no longer bound by memory (can work with &#039;&#039;&#039;any size course&#039;&#039;&#039;).&lt;br /&gt;
* Completely new backup format.&lt;br /&gt;
* Improved interface.&lt;br /&gt;
* Backup can be made of whole courses, but also specific sections or activities.&lt;br /&gt;
&lt;br /&gt;
===[[Blocks 2.0|Blocks]]===&lt;br /&gt;
* Blocks are now consistently implemented on every page in Moodle&lt;br /&gt;
* No longer any limit to the block regions (in addition to left and right, put them at the top, center or bottom of pages)&lt;br /&gt;
* Any block can be made sticky (appears in all the contexts below, eg throughout a course).&lt;br /&gt;
* Blocks can be &amp;quot;docked&amp;quot; on the side of the screen (if the theme supports it)&lt;br /&gt;
&lt;br /&gt;
===[[Blogs 2.0|Blogs]]===&lt;br /&gt;
* Support for comments on each blog entry&lt;br /&gt;
* Removal of group-level and course-level blogs (these are converted into forums on upgrade)&lt;br /&gt;
* Support for external blog feeds (synchronised to Moodle blog)&lt;br /&gt;
&lt;br /&gt;
===[[Comments 2.0|Comments]]===&lt;br /&gt;
* User comments (Glossaries, Databases, Blogs, etc) are now all consistently handled  and displayed throughout Moodle, using AJAX if available&lt;br /&gt;
* User activity reports will include all the comments made by that user&lt;br /&gt;
&lt;br /&gt;
===[[Enrolments 2.0|Enrolment plugins]]===&lt;br /&gt;
* Major improvements in the handling of guests and guest accounts &lt;br /&gt;
* Support for multiple forms of enrolment at the same time &lt;br /&gt;
* More detailed control over enrolment in courses &lt;br /&gt;
&lt;br /&gt;
===File handling===&lt;br /&gt;
&lt;br /&gt;
* Full support for Unicode file names on all operating systems.&lt;br /&gt;
* Metadata about each file (author, date, license, etc) and what the file is used for are stored in the database.&lt;br /&gt;
* Duplicate files (for example, a large video file use in two different courses) are only stored once, saving disk space.&lt;br /&gt;
* Files are no longer just &amp;quot;uploaded to the course&amp;quot;.  Files are connected to the particular bit of Moodle content that uses them. (For example, a file may belong to a file resource, a forum post or a wiki page). Access to these files is then controlled by the same rules as as that bit of Moodle, increasing security.&lt;br /&gt;
&lt;br /&gt;
===Gradebook===&lt;br /&gt;
* Details coming soon&lt;br /&gt;
&lt;br /&gt;
===HTML editor===&lt;br /&gt;
* New editor based on TinyMCE&lt;br /&gt;
* Works on more browsers&lt;br /&gt;
* Resizable editing area&lt;br /&gt;
* Cleaner XHTML output &lt;br /&gt;
* Full integration with configured external repositories to import and embed media into text&lt;br /&gt;
&lt;br /&gt;
===Messaging===&lt;br /&gt;
* All email sent by Moodle is now treated as a message&lt;br /&gt;
* A message overview panel allows users to control how messages are sent to them&lt;br /&gt;
* Initial message output plugins in Moodle 2.0 include: Email, Jabber and Popups&lt;br /&gt;
&lt;br /&gt;
===My Moodle page===&lt;br /&gt;
* More customisable My Moodle page with new blocks for showing relevant information &lt;br /&gt;
* Admin can design (and optionally force) site-wide layouts for My Moodle&lt;br /&gt;
* My Moodle page given more prominence as the main &amp;quot;home page&amp;quot; for users&lt;br /&gt;
&lt;br /&gt;
===Navigation===&lt;br /&gt;
* Standard &amp;quot;Navigation&amp;quot; block on every page showing contextual links, while allowing you to jump elsewhere quickly&lt;br /&gt;
* Standard &amp;quot;Settings&amp;quot; blocks on every page shows contextual settings as well as settings for anything else you have permissions for&lt;br /&gt;
&lt;br /&gt;
===Ratings===&lt;br /&gt;
* User ratings (Glossaries, Databases, Forums, etc) are now all consistently handled and displayed throughout Moodle, using AJAX if available&lt;br /&gt;
* Aggregation of using ratings into activity grades is now standardised in all activities&lt;br /&gt;
&lt;br /&gt;
===Roles and permissions===&lt;br /&gt;
* Improved and simplified AJAX interfaces for defining and assigning roles&lt;br /&gt;
* Improved and simplified interfaces for tweaking permissions in any given context &lt;br /&gt;
* New &amp;quot;Archetypes&amp;quot; concept replacing the &amp;quot;Legacy roles&amp;quot; concept.&lt;br /&gt;
* New archetype &amp;quot;manager&amp;quot; to define the role of most people with system-wide editing rights, separate from &amp;quot;admin&amp;quot; role.&lt;br /&gt;
&lt;br /&gt;
===RSS feeds===&lt;br /&gt;
* All RSS feeds are now secured using a random per-user token in the URL&lt;br /&gt;
* Tokens can be updated by the user at any time (if they suspect a feed URL has been compromised)&lt;br /&gt;
* RSS feeds are now more accurate (eg they support forums with separate groups), and are generated efficiently whenever required&lt;br /&gt;
&lt;br /&gt;
===[[Development:Themes 2.0|Themes]]===&lt;br /&gt;
* Many new themes in the core distribution&lt;br /&gt;
* All HTML and JS ouput is now far more efficient (server-side caching) and consistent (tableless layout, new CSS, YUI Framework)&lt;br /&gt;
* Themes can change the HTML of the page if they wish&lt;br /&gt;
* Core support for custom menus in all themes (for example at the top of the page)&lt;br /&gt;
&lt;br /&gt;
===[[Translation 2.0|Translation system]]===&lt;br /&gt;
* [http://lang.moodle.org/ New web portal] to make it easer for groups to collaborate on translating Moodle, and to keep their translations up-to-date.&lt;br /&gt;
* More efficient [[Development:Languages/AMOS|storage format for language strings]] should slightly improve performance.&lt;br /&gt;
&lt;br /&gt;
===User profile pages===&lt;br /&gt;
* Site-wide user profile page can be customised by users with blocks, news, feeds and so on&lt;br /&gt;
* Course-specific user profile pages show course blocks and standard profile information, plus information for teachers of that course&lt;br /&gt;
&lt;br /&gt;
==Major improvements to activity modules==&lt;br /&gt;
&lt;br /&gt;
===Lesson===&lt;br /&gt;
* Refactored internal code &lt;br /&gt;
* Forms are now standard Moodle forms&lt;br /&gt;
&lt;br /&gt;
===Quiz module and question bank===&lt;br /&gt;
&lt;br /&gt;
* [[Development:quiz_navigation|Quiz navigation improvements for students]]&lt;br /&gt;
* [[Development:Flagging_questions_during_a_quiz_attempt|Flagging questions during a quiz attempt]] &lt;br /&gt;
* [[Development:Quiz_report_enhancements|Quiz report enhancements]] - Major improvements to the quiz reports, especially regrading and item analysis&lt;br /&gt;
* [[Development:Quiz_UI_redesign|Quiz editing interface improvements]]&lt;br /&gt;
* Different settings (open/close date, number of attempts, password, time limit) for each group or student (MDL-16478)&lt;br /&gt;
* [[Development:Administration page for question types|Administration page for question types]]&lt;br /&gt;
* [[Development:Moodle 2.0 question bank improvements|Question tagging and improved searching in the question bank]]&lt;br /&gt;
* MDL-8648 Essay questions can now be randomised by random questions&lt;br /&gt;
&lt;br /&gt;
===Resource===&lt;br /&gt;
* All the resource types have been refactored into real modules, and cleaned up&lt;br /&gt;
** File - for displaying a file, possibly with supporting files (like a HTML mini-site)&lt;br /&gt;
** Folder - for displaying a collection of documents &lt;br /&gt;
** URL - for displaying a page with a given URL&lt;br /&gt;
** Page - for a single page, edited online using the HTML editor&lt;br /&gt;
** IMS - for showing a regular IMS content package&lt;br /&gt;
* Better XHTML-compliant support for frames, iframes and embedding in all these modules&lt;br /&gt;
&lt;br /&gt;
===SCORM===&lt;br /&gt;
&lt;br /&gt;
* New [[SCORM module]] settings - display attempt status, display course structure, force completed, force new attempt, lock after final attempt - allowing the behaviour dictated to the SCORM object by the authoring package to be changed MDL-11501 &lt;br /&gt;
* New reporting interface including sortable/collapsible table with group select box and ability to download in Excel, ODS and text format MDL-21555&lt;br /&gt;
* New SCORM player UI with better navigation, improved performance and better handling of stage size MDL-22951&lt;br /&gt;
&lt;br /&gt;
===Wiki===&lt;br /&gt;
* Completely re-written from scratch, based on NWIki from UPC&lt;br /&gt;
* Support for Mediawiki-style syntax, as well as Creole &lt;br /&gt;
* Interface improvements &lt;br /&gt;
&lt;br /&gt;
===Workshop===&lt;br /&gt;
&lt;br /&gt;
* Completely rewritten from scratch &lt;br /&gt;
* Vastly improved interface for managing stages and users&lt;br /&gt;
&lt;br /&gt;
==System requirements==&lt;br /&gt;
&lt;br /&gt;
Since Moodle 2.0 is such a major release, we are allowing ourselves some increases in the requirements.&lt;br /&gt;
&lt;br /&gt;
* PHP must be 5.2.8 or later (it was released 08-Dec-2008)&lt;br /&gt;
* Databases should be one of the following:&lt;br /&gt;
** MySQL 5.0.25 or later  (InnoDB storage engine highly recommended)&lt;br /&gt;
** PostgreSQL 8.3 or later&lt;br /&gt;
** Oracle 10.2 or later&lt;br /&gt;
** MS SQL 2005 or later&lt;br /&gt;
* Any standards-supporting browser from the past few years, for example:&lt;br /&gt;
** Firefox 3 or later &lt;br /&gt;
** Safari 3 or later &lt;br /&gt;
** Google Chrome 4 or later&lt;br /&gt;
** Opera 9 or later&lt;br /&gt;
** MS Internet Explorer 7 or later (Even [http://googleenterprise.blogspot.com/2010/01/modern-browsers-for-modern-applications.html Google don&#039;t support IE6 any more])&lt;br /&gt;
** etc&lt;br /&gt;
&lt;br /&gt;
==Upgrading==&lt;br /&gt;
&lt;br /&gt;
* When upgrading to Moodle 2.0, you must have Moodle 1.9 or later.  if you are using an earlier version of Moodle (eg 1.8.x) then you need to upgrade to Moodle 1.9.x first.&lt;br /&gt;
* We advise that you test the upgrade first on a COPY of your production site, to make sure it works as you expect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==For developers: API changes==&lt;br /&gt;
&lt;br /&gt;
See [[Development:Migrating_contrib_code_to_2.0]]&lt;br /&gt;
&lt;br /&gt;
* [[Development:DB_layer_2.0_migration_docs|Database layer changes]] - you will need to update your code.&lt;br /&gt;
* [[Development:Using_the_file_API|File handling changes]] - you will need to update your code.&lt;br /&gt;
* [[Development:Migrating your code code to the 2.0 rendering API|Rendering layer changes]] - should be mostly backwards compatible, but you are advised to upgrade your code.&lt;br /&gt;
* Require capability used to do an automatic require_login. It no longer does so. All pages must explicitly call require_login if they need it. MDL-19882&lt;br /&gt;
* [[Development:Moodle_2.0_question_type_API_changes|Changes to the question type API]]&lt;br /&gt;
* MNet has been refactored and tidied up - related third party code needs to be checked&lt;br /&gt;
* Changes and improvements to the [[Development:Local_customisation|Local customisation system]].&lt;br /&gt;
* Javascript &lt;br /&gt;
* YUI&lt;br /&gt;
* custom profile fields values are loaded into $USER-&amp;gt;profile array instead of directly into $USER object&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*[[Moodle 1.9 release notes]]&lt;br /&gt;
*[[QA testing]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Release notes]]&lt;br /&gt;
[[Category:Moodle 2.0]]&lt;br /&gt;
&lt;br /&gt;
[[fr:Notes de mise à jour de Moodle 2.0]]&lt;br /&gt;
[[es:Notas de Moodle 2.0]]&lt;br /&gt;
[[br:Moodle_2.0_release_notes]]&lt;/div&gt;</summary>
		<author><name>Danielneis</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=User_talk:Helen_Foster&amp;diff=23206</id>
		<title>User talk:Helen Foster</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=User_talk:Helen_Foster&amp;diff=23206"/>
		<updated>2010-07-30T05:02:09Z</updated>

		<summary type="html">&lt;p&gt;Danielneis: /* Brazilian docs home pagin &amp;quot;was protected against new editions&amp;quot; */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==deleting extra images==&lt;br /&gt;
Hi Helen - I am very shy at adding to the docs! ;)&lt;br /&gt;
I put some stuff on about conditional activities but I uploaded images which weren&#039;t clear so I changed them and now I don&#039;t know how to delete the first few which are no longer used on the page - could you delete the earlier, unused uploads please so they don&#039;t take up space and clutter the place up? (I couldn&#039;t find a &amp;quot;delete&amp;quot; instruction so I presume we can&#039;t) thanks - Mary [[User:Mary Cooch|Mary Cooch]]&lt;br /&gt;
: Hi Mary, if you upload a new version of the file with the same name it will replace the old one. At least I can&#039;t find any duplicates on your images&#039; pages ;-) And your files are all only some KB so they won&#039;t take up much disk space anyway. --[[User:Frank Ralf|Frank Ralf]] 10:19, 6 March 2010 (UTC)&lt;br /&gt;
:: Mary, many thanks for your contribution to [[Conditional activities]] :-) Frank is right in saying that new versions of images simply replace old ones, so there is no need for any deletion. If you upload an image then decide you don&#039;t want to use it at all, you can just type &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{Deletion}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; at the top of the page (as explained in [[MoodleDocs:Templates]]) then an admin will come along and delete it. --[[User:Helen Foster|Helen Foster]] 12:33, 8 March 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Deleting some attached files in JIRA ==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
&lt;br /&gt;
I made a bit of a mess at [http://tracker.moodle.org/browse/MDL-21110 http://tracker.moodle.org/browse/MDL-21110]. Would it be possible to delete all the attached files there so Penny or I can upload the current one and let Jira handle the versioning more sanely?&lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;br /&gt;
Matt&lt;br /&gt;
&lt;br /&gt;
:Done! --[[User:Helen Foster|Helen Foster]] 08:33, 5 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Creating new FAQ pages ==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
&lt;br /&gt;
I have successfully created a stub for a XML FAQ page (https://docs.moodle.org/en/XML_FAQ) but how do I get it promoted on https://docs.moodle.org/en/Category:FAQ ?&lt;br /&gt;
&lt;br /&gt;
I also would like to create an Import/Export FAQ for collecting all the information regarding Moodle import and export which is scattered in different forums.&lt;br /&gt;
&lt;br /&gt;
Regards,&lt;br /&gt;
[[User:Frank Ralf|Frank Ralf]]&lt;br /&gt;
&lt;br /&gt;
:Hi Helen will have to answer the Import/Export question.  I jumped in and added &amp;lt;nowiki&amp;gt;[[Category:FAQ]]&amp;lt;/nowiki&amp;gt; to the bottom of the page, which anyone can do. And took your hint and added a &amp;lt;nowiki&amp;gt;{{stub}}&amp;lt;/nowiki&amp;gt; template at the top.  Thanks for the XML work. Best --[[User:chris collman|chris collman]] 14:16, 3 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
::Hi Frank, thanks for your offer - an [[Import and export FAQ]] page would be great, thanks! --[[User:Helen Foster|Helen Foster]] 04:12, 4 December 2008 (CST)&lt;br /&gt;
:::Thanks to both of you! Helen, how did you get that nice Contents menu on your Import and export FAQ page? I couldn&#039;t figure that out from the source. --[[User:Frank Ralf|Frank Ralf]] 05:30, 4 December 2008 (CST) Problem solved, just found the documentation ;-) --[[User:Frank Ralf|Frank Ralf]] 05:43, 4 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
== Suggestion that is probably total overkill ==&lt;br /&gt;
&amp;lt;onlyinclude&amp;gt;&lt;br /&gt;
# Create a new FAQ namespace.&lt;br /&gt;
# In this namespace, create one page for each frequent question, where the contents of the page is the answer.&lt;br /&gt;
# Use our new knowledge of transclusions to build the FAQ lists by just pulling in pages from the FAQ namespace.&lt;br /&gt;
&lt;br /&gt;
The benefits of doing this are&lt;br /&gt;
* The same FAQ can appear in more than one list without copying-and-pasting.&lt;br /&gt;
* Each question gets a unique URL that so in the forums, we can point people to a page that just answers their specific question.&lt;br /&gt;
&lt;br /&gt;
Disadvantages&lt;br /&gt;
* Editing FAQ lists becomes incomprehensible to anyone who is not a MediaWiki geek.&lt;br /&gt;
&lt;br /&gt;
If we went this way, I would like to use B to build a new FAQ page: &amp;quot;Troubleshooting FAQ&amp;quot;. Might be a good idea anyway.&lt;br /&gt;
&amp;lt;/onlyinclude&amp;gt;&lt;br /&gt;
I hasten to say that I am not recommending this approach. The disadvantages could easily outweigh the advantages. I am simply pointing out a technical possibility that may be worth considering either now, or in the future.&amp;lt;onlyinclude&amp;gt;--[[User:Tim Hunt|Tim Hunt]] 07:11, 4 December 2008 (CST)&amp;lt;/onlyinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Just added [[MoodleDocs:Transclusion]].  Good thing I had my first cup of coffee, Tim&#039;s thoughtful post got me rubbing the sleep out of my eyes.  I wonder if I can get the partial transclusion of this section to work in Sandbox then in [[MoodleDocs_talk:Transclusion]]. Definitely a tool to be used with care. But Wowie Zowie ! --[[User:chris collman|chris collman]] 06:49, 5 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
:: Hello Tim, I think your suggested solution would indeed be overkill and would make maintaining FAQ too difficult. I see FAQ as an intermediary step between the unorganised kind of &amp;quot;documentation&amp;quot; which is provided in the forums towards &amp;quot;real&amp;quot; documentation. Therefore the ease of editing is crucial in my opinion. What about using Moodle&#039;s &#039;&#039;&#039;autolinking mechanism&#039;&#039;&#039; to automatically link to FAQ pages, e.g. if there is a mention of grades in the forums that would create an automatic link to Grades FAQ. I am quite new to Moodle, but couldn&#039;t that be done with setting up a kind of FAQ Glossary? --[[User:Frank Ralf|Frank Ralf]] 02:44, 16 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
::: Hi Tim, thanks for your suggestion, though I think it&#039;s overkill too!  The current FAQ pages have nice short titles which are easy to find and to include in forum posts. Having a page for each FAQ would result in really long URLs. Also, I think that when we point people to an FAQ page, and they have to look through it to find the answer to their question, they may well find answers to other questions they have. As other people have suggested, I think FAQ pages work well as start pages with links to lots of other pages i.e. they&#039;re kept fairly short, for example [[Contributed code FAQ]]. --[[User:Helen Foster|Helen Foster]] 04:49, 18 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
::: Frank, regarding autolinking to FAQ pages, have you come across the Moodle Docs filter on moodle.org? Please see the [[Moodle.org FAQ]] for more details. --[[User:Helen Foster|Helen Foster]] 04:49, 18 December 2008 (CST)&lt;br /&gt;
::::Helen, thanks for the hint. But isn&#039;t that the usual &#039;&#039;manual&#039;&#039; way of wiki linking? But on second thought that might really be the best way of linking to FAQ pages as it keeps getting the forums cluttered with too many (automatic) links. In fact, it just might be a matter of good practice to put advice of lasting value from the forums into a more structured form of documentation and nothing which could or should be done in an automatic and technical way... --[[User:Frank Ralf|Frank Ralf]] 05:11, 19 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
== Security Notification registration ==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
&lt;br /&gt;
It was suggested to me through the #moodle channel on freenode that I raise this concern with you.&lt;br /&gt;
&lt;br /&gt;
I&#039;m developing a moodle installation behind a firewall on a non-public URL and am interested in subscribing to security updates (prompted to check this after seeing a moodle vulnerability mentioned on Bugtraq). I had previously attempted to subscribe by registering our installation through the admin pages, however that registration was rejected as the site was located behind a firewall and not accessible.&lt;br /&gt;
&lt;br /&gt;
Due to that rejection, I wasn&#039;t subscribed to security updates.&lt;br /&gt;
&lt;br /&gt;
I now find myself in the unfortunate position where I cannot subscribe to security updates without having a public facing site (which I can&#039;t reasonably know is secure as I&#039;m not receiving security updates through your mailing list).&lt;br /&gt;
&lt;br /&gt;
The burden for those of us who have an internal site they&#039;re developing (or perhaps is in production) is that we must now create a public facing site to register for the sole purpose of receiving security updates. If the thought is that only parties interested in maintaining a moodle site should have access to those messages, perhaps a different measure could be put into place (a code that appears once moodle is installed, for example).&lt;br /&gt;
&lt;br /&gt;
I&#039;ve tried subscribing through sympa@lists.moodle.org, however that method does not work either.&lt;br /&gt;
&lt;br /&gt;
Could you please provide a process for folks like me to get on the security updates list without having to install moodle on a public web server first?&lt;br /&gt;
&lt;br /&gt;
Thanks!&lt;br /&gt;
&lt;br /&gt;
- P.&lt;br /&gt;
&lt;br /&gt;
:Hi Paul, how about subscribing to the [http://moodle.org/mod/forum/view.php?f=996 security announcements forum], where all important security issues are published. --[[User:Helen Foster|Helen Foster]] 04:34, 18 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
== Unseen (not hidden) activities==&lt;br /&gt;
Hi Helen (This is partly my attempt at practising here by the way!) I&#039;ve posted several times recently about the concept of &#039;unseen&#039; topics with resources that can be linked to on the course page where hidden ones wouldn&#039;t work. is there documentation about that somewhere here ? If so, where? Then I can point Moodlers to it next time.If not, shall I write it? Thanks - [[User: Mary Cooch|Mary Cooch]]&lt;br /&gt;
&lt;br /&gt;
:Hi Mary, I&#039;ve just had a quick look and can&#039;t find any documentation about unseen topics, so it would be helpful if you could write some, perhaps here: [[Course homepage]]. Thanks in advance :-) --[[User:Helen Foster|Helen Foster]] 17:20, 19 December 2008 (CST)&lt;br /&gt;
:Helen - please can you check what I have done as you know I&#039;m still a novice and don&#039;t want to put the wrong thing in the wrong place! Also, if you look on my usertalk Chris Colman said it might be useful on the html linking page? [[User: Mary Cooch|Mary Cooch]]&lt;br /&gt;
&lt;br /&gt;
== Downloading Moodle Core ==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
I came across Moodle just this morning, and read a little about its design, and loved it, it is perfect for the project Im starting.&lt;br /&gt;
&lt;br /&gt;
Ive gone to the download page, to download the Moodle core zip package, but when I click on the link to download I get the following message;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;A server error that affects your login session was detected. Please login again or restart your browser.&#039;&lt;br /&gt;
&lt;br /&gt;
( Continue )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I had a look around the FAQ pages, to see if there was anything on there, but it only mentions about people who already have moodle and are having this difficulty,&lt;br /&gt;
&lt;br /&gt;
Please could you send me an alternative link, &lt;br /&gt;
&lt;br /&gt;
Kind Regards&lt;br /&gt;
Andrew&lt;br /&gt;
:Hi Andrew, I left a comment on your [[User_talk:Andrew_Abel|user comment page]], just in case you were in a hurry to play with Moodle. --[[User:chris collman|chris collman]] 07:40, 1 January 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
::Hi Andrew, I hope you&#039;ve been successful in downloading Moodle by now. Chris, thanks for your helpful comments :-) --[[User:Helen Foster|Helen Foster]] 01:21, 2 January 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
== &amp;quot;experimental:&amp;quot; prefix ==&lt;br /&gt;
&lt;br /&gt;
[[User:Marc Grober|Marc Grober]] 12:00, 12 January 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
We started using experimental: as a prefix because there was some confusion about the use of Development: as a prefix.....&lt;br /&gt;
&lt;br /&gt;
In the Moodle docs, Development: appears to cover Moodle developer documentation, not docs under development,  so we wanted to use a prefix that connote that the docs were, as we suggest, &amp;quot;experimental&amp;quot; (i.e. not ready for prime time).   I had not come across [[Experimental|Experimental]] as the search is a bit temperamental and searching for the root, experiment, produced no result.....&lt;br /&gt;
&lt;br /&gt;
Perhaps we need a different topic name?&lt;br /&gt;
&lt;br /&gt;
I have encouraged AT to ask you to move these pages out of the experimental: topic but I think she feels they are not quite ready and I want to respect hre wishes on this.&lt;br /&gt;
&lt;br /&gt;
We also have some experimental pages under development with respect to gradebook &amp;quot;cases&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
I would encourage you to discuss the progress on all these pages with AT.&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
:Marc, thanks for your comments. The use of experimental: as a prefix is fine by me. Alternatively you could use a [[MoodleDocs:Templates|Moodle Docs template]] to add a message saying that the page is experimental. --[[User:Helen Foster|Helen Foster]] 02:41, 13 January 2009 (CST)&lt;br /&gt;
::Marc and Helen, something new to me.  I found 7 pages when I searched on &amp;quot;experimental:&amp;quot; and found 7 Article title matches.  6 started with &amp;quot;experimental:&amp;quot; and of course &amp;quot;Experimental&amp;quot;. Wondering if an alternative draft to Main Page should be done that way with the Experimental template.  :)--[[User:chris collman|chris collman]] 06:00, 13 January 2009 (CST)&lt;br /&gt;
:::Helen, thanks for moving some of the experimental: pages.  The page here, however, has yet to be moved: [https://docs.moodle.org/en/experimental:Getting_Help_Installing_and_Managing_Moodle]. Vis-a-vis topics/categories, I think it makes sense to have a category that is not searched by default so that users do not find materials that is not ready for prime time.  By the same token,  I think, as I mentioned above,  that Development: is problematic because it confuses as far as whether it is a topic for Developers or addresses material under development, which are really two different areas.  Likewise, as long as there is an Experimental page the use of experimental: could cause confusion.    I would argue for three distinct categories.... [[User:Marc Grober|Marc Grober]] 12:16, 24 January 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
::As I understood your (Helen&#039;s) comment (posted I don&#039;t recall where) you (Helen) were I think suggesting that what I was really suggesting was a new name space such that folks could develop documents that were not included in a default search.....  which I think is exactly what I was looking for....  So the question becomes can and should we do such a thing..... --[[User:Marc Grober|Marc Grober]] 23:44, 9 March 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::Marc, I guess you&#039;re referring to my forum post [http://moodle.org/mod/forum/discuss.php?d=115736#p509590 Re: Not including pages in the Moodle Docs search]. How about using a Moodle Docs template for now to indicate docs under development and add them to an appropriate category, then when there are sufficient pages to warrant it, we can create a new namespace and move all the pages into it. --[[User:Helen Foster|Helen Foster]] 11:46, 10 March 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
==Talk:Helen&#039;s page is over 32k==&lt;br /&gt;
FYI: I got that warning.  Maybe a subpage for the older stuff and a link, so we don&#039;t loose some stuff. Of course alternatively, if I deleted all my comments/questions, that would shorted it a lot :)  --[[User:chris collman|chris collman]] 06:04, 13 January 2009 (CST)&lt;br /&gt;
::Seriously, I would be happy to edit my posts here down to a nub or nothingness.  I think some of the language requests for help could be put in one heading and shortened, without losing anything.    --[[User:chris collman|chris collman]] 06:13, 13 January 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
:Chris, thanks for creating [[User talk:Helen Foster/1]]. I think it&#039;s a good solution :-) --[[User:Helen Foster|Helen Foster]] 02:51, 14 January 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*[[User talk:Helen Foster/1]] for older comments&lt;br /&gt;
&lt;br /&gt;
== Registered Users Bug with Mediawiki ==&lt;br /&gt;
&lt;br /&gt;
Hi, [[User_talk:David_Scotson#Moodle_Docs_stats|Way back in 2006 you mentioned]] a work-around for a bug resulting in registered users stats on [[Special:Statistics]] not updating properly. I think I am encountering this same bug on my internal wiki now. I know that was a long time ago, but do you remember what you did to fix it/what the work-around mentioned was?&lt;br /&gt;
Thanks,&lt;br /&gt;
--[[User:Adrian Archer|Adrian Archer]] 11:02, 4 March 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
:Hi Adrian, here are Eloy&#039;s workarounds (easy to do with phpMyAdmin):&lt;br /&gt;
&lt;br /&gt;
:# To refresh the count of pages, if it&#039;s not working: table: site_stats, field: ss_total_pages, setting it to -1 should force recalculation of pages&lt;br /&gt;
:# To refresh the count of registered users, delete the contents of the &amp;quot;cached statistics&amp;quot; table&lt;br /&gt;
&lt;br /&gt;
:Thanks to Eloy for recalling them :-) I hope you are able to upgrade to a newer MediaWiki version soon. --[[User:Helen Foster|Helen Foster]] 09:01, 5 March 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
::Thanks so much for the quick response, that sounds like it should work. I&#039;m actually using Version 1.13.3, so I guess the bug still exists. --[[User:Adrian Archer|Adrian Archer]] 09:17, 5 March 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
:::Hmm, Moodle Docs is actually using version 1.11.2, though we&#039;re hoping to upgrade very soon (MDLSITE-657). --[[User:Helen Foster|Helen Foster]] 09:35, 5 March 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
== Function if in grade calculations? ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hi Helen&lt;br /&gt;
&lt;br /&gt;
Thanks for your jobs.&lt;br /&gt;
&lt;br /&gt;
Sorry for my lousy english.&lt;br /&gt;
&lt;br /&gt;
I am trying to use the &amp;quot;if&amp;quot; function in &amp;quot;Grade calculations&amp;quot; in a similar way as is done in &amp;quot;opencalc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
do you know if this is possible?&lt;br /&gt;
&lt;br /&gt;
How to introduce a note of recovery, only for a few students, without changing the original calification?&lt;br /&gt;
&lt;br /&gt;
My email is trujillo@unex.es&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;br /&gt;
&lt;br /&gt;
== Using Moodle for Teachers ==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
&lt;br /&gt;
I teach math at Woodland Middle School  in Woodland, WA. I&#039;m also just beginning work with the Ubuntu Learning Project (name?). Is your book (Using Moodle - Teaching with the Popular Open Source Course Management System) available for download on Moodle Docs free to teachers? If so, is there some type of creative commons license? Or should we just link to Moodle Docs? I found your book extremely useful when I taught a 3-day Moodle Bootcamp to teachers this summer.&lt;br /&gt;
&lt;br /&gt;
Thanks, Mark Knudson&lt;br /&gt;
&lt;br /&gt;
:Hi Mark, glad to hear you found my book useful :-) It&#039;s available for download under the Creative Commons Attribution-Noncommercial-Share Alike licence here: [[Using Moodle book]]. --[[User:Helen Foster|Helen Foster]] 19:11, 21 September 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== PHP Settings by Moodle version ==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
&lt;br /&gt;
I&#039;m new to this community (and to Moodle) and am not sure how I should request an update to the documentation relating to a Moodle PHP extension requirement - specifically zlib.&lt;br /&gt;
I noticed that this page:&lt;br /&gt;
https://docs.moodle.org/no/Installering_av_Moodle has a section stating that &amp;quot;The zlib extension is required for zip/unzip functionality.&amp;quot; under the PHP Extensions and Libraries, but it doesn&#039;t exist here:&lt;br /&gt;
https://docs.moodle.org/en/PHP_settings_by_Moodle_version&lt;br /&gt;
&lt;br /&gt;
The PHP_settings_by_Moodle_version is a Stub and is waiting for review - I was thinking about updating it with the text from the https://docs.moodle.org/no/Installering_av_Moodle page.&lt;br /&gt;
&lt;br /&gt;
Looking for a little direction.&lt;br /&gt;
&lt;br /&gt;
Thanks!&lt;br /&gt;
Andy&lt;br /&gt;
&lt;br /&gt;
:Hi Andy,&lt;br /&gt;
&lt;br /&gt;
:Thanks for your kind offer to update the documentation [[PHP settings by Moodle version]]. Please feel free to go ahead and do so :-) (I asked in our developer chat and was informed that zlib is required for versions of Moodle up to 1.9 and Moodle 2.0 onwards will come with native PHP zip support so it needs the &amp;quot;zip&amp;quot; extension instead.)&lt;br /&gt;
&lt;br /&gt;
:For future reference, you&#039;re always welcome to edit pages in Moodle Docs and help improve our documentation. If you&#039;re not quite sure of something, you can leave a note in the page comments. Thanks again! --[[User:Helen Foster|Helen Foster]] 11:45, 20 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Query re Cool Course Competition ==&lt;br /&gt;
Two questions re the Cool Course Competition:&lt;br /&gt;
1) How can teachers know whether the modules and blocks they use are core or not? Is there a list somewhere?(2) Why are some entries in their own native theme, while most entries are using the competition site&#039;s theme? How can I upload my course so that it retains its own theme? Thanks, [[User:Thomas Brown|Thomas Brown]] 00:16, 16 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Hi Thomas, an easy way to check which modules and blocks are core i.e. included in the standard Moodle packages is to login to the [http://demo.moodle.net/ Moodle Demonstration Site] as an admin and check &#039;&#039;Administration &amp;gt; Modules &amp;gt; Activities &amp;gt; Manage activities&#039;&#039; and &#039;&#039;Administration &amp;gt; Modules &amp;gt; Blocks &amp;gt; Manage blocks&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
:Regarding the course theme, if you force a theme in the course settings, it will be used, otherwise the site theme will be used. --[[User:Helen Foster|Helen Foster]] 11:22, 16 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
::Do you mean the &amp;quot;Settings&amp;quot; page in the course&#039;s Admin block? My Settings page doesn&#039;t have any theme-related options. Did I look in the wrong place? tnx, [[User:Thomas Brown|Thomas Brown]] 23:55, 16 January 2010 (UTC)&lt;br /&gt;
:::It appears that the site admin can make a setting that allows teachers to force a theme -- so I can do that now. Which raises another question: Does my theme have to be installed on the Cool Course site for it to work there, or can my backup import the theme features and bring them along into the Cool Course site? tnx again, [[User:Thomas Brown|Thomas Brown]] 03:58, 18 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
::::Apologies for not mentioning that course themes need to be enabled by an admin in [[Theme settings]]; glad you figured things out! Yes, your theme needs to be installed on the competition site for it to work, as a course backup does not include theme features. All themes included in standard Moodle packages are available on the competition site. --[[User:Helen Foster|Helen Foster]] 09:32, 18 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I think I have a bigger problem now that my course is on the competition web site. None of the links to course resources work! I must have royally messed up my backup somehow. I included the resources in the backup, but...[[User:Thomas Brown|Thomas Brown]] 21:08, 18 January 2010 (UTC)&lt;br /&gt;
::Testing out the restore of my competition entry on my own site, I find that the html links that I&#039;ve put in the Topic Outline labels go to random id numbers, and so don&#039;t open the resources they&#039;re supposed to and give me a page not found browser error instead. However, if I simply click on edit for one of the labels, and then save it without changing anything, now suddenly all of the links are in working order. So, is it possible for me or someone else to do this fix on my competition entry, so that it starts working? While we&#039;re in there fixing it, can we change it to custom corners? Thanks yet again...[[User:Thomas Brown|Thomas Brown]] 21:48, 18 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::No worries, it&#039;s a good test for the course backup and restore process! I&#039;ve reported the problem you describe in the tracker - MDL-21380. --[[User:Helen Foster|Helen Foster]] 15:02, 19 January 2010 (UTC)&lt;br /&gt;
===Curious, why here?===&lt;br /&gt;
Firstly, thanks for the post here which drew my attention to coolcourses.moodle.org.  Really Cool and Neato.   Secondly, shouldn&#039;t most of this discussion be in the [http://coolcourses.moodle.org/mod/forum/view.php?id=3073 &amp;quot;Competition Lounge&amp;quot;]?   Thirdly, there were some special effects I am dying to know &amp;quot;how they do that?&amp;quot; and I just looked at each course in the first topic! Fourthly, thanks to all who contributed. --[[User:chris collman|chris collman]] 13:00, 21 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Hi Chris, just wondering why you never noticed the [http://moodle.org/mod/forum/discuss.php?d=135429 Cool Course Competition moodle.org news item]? Regarding the [http://coolcourses.moodle.org/mod/forum/view.php?id=3073 Competition lounge], the fact that it was only created a few hours ago probably explains why nobody has posted there yet. How about posting your &amp;quot;how they do that?&amp;quot; question and thanks there. --[[User:Helen Foster|Helen Foster]] 15:12, 21 January 2010 (UTC)&lt;br /&gt;
::I am just a stick in the mud sometimes.  I will take you up on your excellent suggestion. --[[User:chris collman|chris collman]] 16:46, 22 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==nln materials query ==&lt;br /&gt;
&lt;br /&gt;
Dear Helen,&lt;br /&gt;
Sorry to contact you this way - I have been recommended to you by several of your former colleagues on the ILT Champs list. I am conducting a research thesis at the University of Nottingham into the uptake and use of the nln materials amongst the FE sector, and have been advised that you would have an interesting view on this programme. If you could spare me a few minutes of your time to have a discussion, then please could you drop me an email at ttxla4@nottingham.ac.uk? Thank you very much. Rob Enbgelbright says &amp;quot;hello&amp;quot; btw. Many thanks, Laurel Armstrong&lt;br /&gt;
&lt;br /&gt;
:Hi Laurel, I&#039;ve just emailed you :-) --[[User:Helen Foster|Helen Foster]] 13:46, 1 February 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
==Jmol filter==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
&lt;br /&gt;
I noticed that you had updated the Jmol filter and wonder if you could tell me the status of this filter, and also the Jmol resource type and the Java Molecule Editor (for allowing students to add chemical structures as answers in quizzes).&lt;br /&gt;
Do they work in 1.9 and 2.0?&lt;br /&gt;
&lt;br /&gt;
On a similar note, there doesn&#039;t seem to be a direct way for students to put subscripts and superscripts into answers. I have resorted to adding a table of useful chemical symbols in the question, which students can copy and paste. Is there a setting somewhere that allows students to add formatted text?&lt;br /&gt;
&lt;br /&gt;
:Hi Mike, please see the comments on the [http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=87 Jmol resource type] for the latest information on it. You may also wish to contact Geoffrey Rowland.&lt;br /&gt;
&lt;br /&gt;
:Regarding adding chemical symbols, you may find the discussions listed in [[Chemistry/Biochemistry]] helpful. --[[User:Helen Foster|Helen Foster]] 14:58, 7 June 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== permission to edit brazilian portuguese version of docs.moodle.org ==&lt;br /&gt;
&lt;br /&gt;
Hello, Helen&lt;br /&gt;
&lt;br /&gt;
don&#039;t really know if you are the right person to ask, but, could you give me permission to edit brazilian portuguese version of docs.moodle.org ?&lt;br /&gt;
I help maintain the language pack along with Gilvan Marques, as you can see at http://cvs.moodle.org/lang/pt_br_utf8/?sortby=date#dirlist .&lt;br /&gt;
The last update of the home page was in august 2007, and also mention 1.8 as the current stable and focus of translators. I would like to make it a translated copy of the current english home page and also translate the release notes of 2.0 as first step...&lt;br /&gt;
&lt;br /&gt;
:Hi Daniel,&lt;br /&gt;
&lt;br /&gt;
:Thanks for your offer to edit the [https://docs.moodle.org/pt_br/P%C3%A1gina_principal Brazilian Portuguese Moodle Docs]. You should find that when you login you already have editing rights (all logged-in users can edit pages). --[[User:Helen Foster|Helen Foster]] 09:41, 25 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Brazilian docs home pagin &amp;quot;was protected against new editions&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
Hello, Helen&lt;br /&gt;
&lt;br /&gt;
i cannot edit that page because &amp;quot;This page was protected against new editions.&amp;quot;, and it only allows me to see and copy source code.&lt;br /&gt;
Could you unlock, please? Thanks, Daniel&lt;/div&gt;</summary>
		<author><name>Danielneis</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=User_talk:Helen_Foster&amp;diff=23205</id>
		<title>User talk:Helen Foster</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=User_talk:Helen_Foster&amp;diff=23205"/>
		<updated>2010-07-30T05:01:30Z</updated>

		<summary type="html">&lt;p&gt;Danielneis: /* permission to edit brazilian portuguese version of docs.moodle.org */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==deleting extra images==&lt;br /&gt;
Hi Helen - I am very shy at adding to the docs! ;)&lt;br /&gt;
I put some stuff on about conditional activities but I uploaded images which weren&#039;t clear so I changed them and now I don&#039;t know how to delete the first few which are no longer used on the page - could you delete the earlier, unused uploads please so they don&#039;t take up space and clutter the place up? (I couldn&#039;t find a &amp;quot;delete&amp;quot; instruction so I presume we can&#039;t) thanks - Mary [[User:Mary Cooch|Mary Cooch]]&lt;br /&gt;
: Hi Mary, if you upload a new version of the file with the same name it will replace the old one. At least I can&#039;t find any duplicates on your images&#039; pages ;-) And your files are all only some KB so they won&#039;t take up much disk space anyway. --[[User:Frank Ralf|Frank Ralf]] 10:19, 6 March 2010 (UTC)&lt;br /&gt;
:: Mary, many thanks for your contribution to [[Conditional activities]] :-) Frank is right in saying that new versions of images simply replace old ones, so there is no need for any deletion. If you upload an image then decide you don&#039;t want to use it at all, you can just type &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{Deletion}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; at the top of the page (as explained in [[MoodleDocs:Templates]]) then an admin will come along and delete it. --[[User:Helen Foster|Helen Foster]] 12:33, 8 March 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Deleting some attached files in JIRA ==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
&lt;br /&gt;
I made a bit of a mess at [http://tracker.moodle.org/browse/MDL-21110 http://tracker.moodle.org/browse/MDL-21110]. Would it be possible to delete all the attached files there so Penny or I can upload the current one and let Jira handle the versioning more sanely?&lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;br /&gt;
Matt&lt;br /&gt;
&lt;br /&gt;
:Done! --[[User:Helen Foster|Helen Foster]] 08:33, 5 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Creating new FAQ pages ==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
&lt;br /&gt;
I have successfully created a stub for a XML FAQ page (https://docs.moodle.org/en/XML_FAQ) but how do I get it promoted on https://docs.moodle.org/en/Category:FAQ ?&lt;br /&gt;
&lt;br /&gt;
I also would like to create an Import/Export FAQ for collecting all the information regarding Moodle import and export which is scattered in different forums.&lt;br /&gt;
&lt;br /&gt;
Regards,&lt;br /&gt;
[[User:Frank Ralf|Frank Ralf]]&lt;br /&gt;
&lt;br /&gt;
:Hi Helen will have to answer the Import/Export question.  I jumped in and added &amp;lt;nowiki&amp;gt;[[Category:FAQ]]&amp;lt;/nowiki&amp;gt; to the bottom of the page, which anyone can do. And took your hint and added a &amp;lt;nowiki&amp;gt;{{stub}}&amp;lt;/nowiki&amp;gt; template at the top.  Thanks for the XML work. Best --[[User:chris collman|chris collman]] 14:16, 3 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
::Hi Frank, thanks for your offer - an [[Import and export FAQ]] page would be great, thanks! --[[User:Helen Foster|Helen Foster]] 04:12, 4 December 2008 (CST)&lt;br /&gt;
:::Thanks to both of you! Helen, how did you get that nice Contents menu on your Import and export FAQ page? I couldn&#039;t figure that out from the source. --[[User:Frank Ralf|Frank Ralf]] 05:30, 4 December 2008 (CST) Problem solved, just found the documentation ;-) --[[User:Frank Ralf|Frank Ralf]] 05:43, 4 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
== Suggestion that is probably total overkill ==&lt;br /&gt;
&amp;lt;onlyinclude&amp;gt;&lt;br /&gt;
# Create a new FAQ namespace.&lt;br /&gt;
# In this namespace, create one page for each frequent question, where the contents of the page is the answer.&lt;br /&gt;
# Use our new knowledge of transclusions to build the FAQ lists by just pulling in pages from the FAQ namespace.&lt;br /&gt;
&lt;br /&gt;
The benefits of doing this are&lt;br /&gt;
* The same FAQ can appear in more than one list without copying-and-pasting.&lt;br /&gt;
* Each question gets a unique URL that so in the forums, we can point people to a page that just answers their specific question.&lt;br /&gt;
&lt;br /&gt;
Disadvantages&lt;br /&gt;
* Editing FAQ lists becomes incomprehensible to anyone who is not a MediaWiki geek.&lt;br /&gt;
&lt;br /&gt;
If we went this way, I would like to use B to build a new FAQ page: &amp;quot;Troubleshooting FAQ&amp;quot;. Might be a good idea anyway.&lt;br /&gt;
&amp;lt;/onlyinclude&amp;gt;&lt;br /&gt;
I hasten to say that I am not recommending this approach. The disadvantages could easily outweigh the advantages. I am simply pointing out a technical possibility that may be worth considering either now, or in the future.&amp;lt;onlyinclude&amp;gt;--[[User:Tim Hunt|Tim Hunt]] 07:11, 4 December 2008 (CST)&amp;lt;/onlyinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Just added [[MoodleDocs:Transclusion]].  Good thing I had my first cup of coffee, Tim&#039;s thoughtful post got me rubbing the sleep out of my eyes.  I wonder if I can get the partial transclusion of this section to work in Sandbox then in [[MoodleDocs_talk:Transclusion]]. Definitely a tool to be used with care. But Wowie Zowie ! --[[User:chris collman|chris collman]] 06:49, 5 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
:: Hello Tim, I think your suggested solution would indeed be overkill and would make maintaining FAQ too difficult. I see FAQ as an intermediary step between the unorganised kind of &amp;quot;documentation&amp;quot; which is provided in the forums towards &amp;quot;real&amp;quot; documentation. Therefore the ease of editing is crucial in my opinion. What about using Moodle&#039;s &#039;&#039;&#039;autolinking mechanism&#039;&#039;&#039; to automatically link to FAQ pages, e.g. if there is a mention of grades in the forums that would create an automatic link to Grades FAQ. I am quite new to Moodle, but couldn&#039;t that be done with setting up a kind of FAQ Glossary? --[[User:Frank Ralf|Frank Ralf]] 02:44, 16 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
::: Hi Tim, thanks for your suggestion, though I think it&#039;s overkill too!  The current FAQ pages have nice short titles which are easy to find and to include in forum posts. Having a page for each FAQ would result in really long URLs. Also, I think that when we point people to an FAQ page, and they have to look through it to find the answer to their question, they may well find answers to other questions they have. As other people have suggested, I think FAQ pages work well as start pages with links to lots of other pages i.e. they&#039;re kept fairly short, for example [[Contributed code FAQ]]. --[[User:Helen Foster|Helen Foster]] 04:49, 18 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
::: Frank, regarding autolinking to FAQ pages, have you come across the Moodle Docs filter on moodle.org? Please see the [[Moodle.org FAQ]] for more details. --[[User:Helen Foster|Helen Foster]] 04:49, 18 December 2008 (CST)&lt;br /&gt;
::::Helen, thanks for the hint. But isn&#039;t that the usual &#039;&#039;manual&#039;&#039; way of wiki linking? But on second thought that might really be the best way of linking to FAQ pages as it keeps getting the forums cluttered with too many (automatic) links. In fact, it just might be a matter of good practice to put advice of lasting value from the forums into a more structured form of documentation and nothing which could or should be done in an automatic and technical way... --[[User:Frank Ralf|Frank Ralf]] 05:11, 19 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
== Security Notification registration ==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
&lt;br /&gt;
It was suggested to me through the #moodle channel on freenode that I raise this concern with you.&lt;br /&gt;
&lt;br /&gt;
I&#039;m developing a moodle installation behind a firewall on a non-public URL and am interested in subscribing to security updates (prompted to check this after seeing a moodle vulnerability mentioned on Bugtraq). I had previously attempted to subscribe by registering our installation through the admin pages, however that registration was rejected as the site was located behind a firewall and not accessible.&lt;br /&gt;
&lt;br /&gt;
Due to that rejection, I wasn&#039;t subscribed to security updates.&lt;br /&gt;
&lt;br /&gt;
I now find myself in the unfortunate position where I cannot subscribe to security updates without having a public facing site (which I can&#039;t reasonably know is secure as I&#039;m not receiving security updates through your mailing list).&lt;br /&gt;
&lt;br /&gt;
The burden for those of us who have an internal site they&#039;re developing (or perhaps is in production) is that we must now create a public facing site to register for the sole purpose of receiving security updates. If the thought is that only parties interested in maintaining a moodle site should have access to those messages, perhaps a different measure could be put into place (a code that appears once moodle is installed, for example).&lt;br /&gt;
&lt;br /&gt;
I&#039;ve tried subscribing through sympa@lists.moodle.org, however that method does not work either.&lt;br /&gt;
&lt;br /&gt;
Could you please provide a process for folks like me to get on the security updates list without having to install moodle on a public web server first?&lt;br /&gt;
&lt;br /&gt;
Thanks!&lt;br /&gt;
&lt;br /&gt;
- P.&lt;br /&gt;
&lt;br /&gt;
:Hi Paul, how about subscribing to the [http://moodle.org/mod/forum/view.php?f=996 security announcements forum], where all important security issues are published. --[[User:Helen Foster|Helen Foster]] 04:34, 18 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
== Unseen (not hidden) activities==&lt;br /&gt;
Hi Helen (This is partly my attempt at practising here by the way!) I&#039;ve posted several times recently about the concept of &#039;unseen&#039; topics with resources that can be linked to on the course page where hidden ones wouldn&#039;t work. is there documentation about that somewhere here ? If so, where? Then I can point Moodlers to it next time.If not, shall I write it? Thanks - [[User: Mary Cooch|Mary Cooch]]&lt;br /&gt;
&lt;br /&gt;
:Hi Mary, I&#039;ve just had a quick look and can&#039;t find any documentation about unseen topics, so it would be helpful if you could write some, perhaps here: [[Course homepage]]. Thanks in advance :-) --[[User:Helen Foster|Helen Foster]] 17:20, 19 December 2008 (CST)&lt;br /&gt;
:Helen - please can you check what I have done as you know I&#039;m still a novice and don&#039;t want to put the wrong thing in the wrong place! Also, if you look on my usertalk Chris Colman said it might be useful on the html linking page? [[User: Mary Cooch|Mary Cooch]]&lt;br /&gt;
&lt;br /&gt;
== Downloading Moodle Core ==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
I came across Moodle just this morning, and read a little about its design, and loved it, it is perfect for the project Im starting.&lt;br /&gt;
&lt;br /&gt;
Ive gone to the download page, to download the Moodle core zip package, but when I click on the link to download I get the following message;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;A server error that affects your login session was detected. Please login again or restart your browser.&#039;&lt;br /&gt;
&lt;br /&gt;
( Continue )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I had a look around the FAQ pages, to see if there was anything on there, but it only mentions about people who already have moodle and are having this difficulty,&lt;br /&gt;
&lt;br /&gt;
Please could you send me an alternative link, &lt;br /&gt;
&lt;br /&gt;
Kind Regards&lt;br /&gt;
Andrew&lt;br /&gt;
:Hi Andrew, I left a comment on your [[User_talk:Andrew_Abel|user comment page]], just in case you were in a hurry to play with Moodle. --[[User:chris collman|chris collman]] 07:40, 1 January 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
::Hi Andrew, I hope you&#039;ve been successful in downloading Moodle by now. Chris, thanks for your helpful comments :-) --[[User:Helen Foster|Helen Foster]] 01:21, 2 January 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
== &amp;quot;experimental:&amp;quot; prefix ==&lt;br /&gt;
&lt;br /&gt;
[[User:Marc Grober|Marc Grober]] 12:00, 12 January 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
We started using experimental: as a prefix because there was some confusion about the use of Development: as a prefix.....&lt;br /&gt;
&lt;br /&gt;
In the Moodle docs, Development: appears to cover Moodle developer documentation, not docs under development,  so we wanted to use a prefix that connote that the docs were, as we suggest, &amp;quot;experimental&amp;quot; (i.e. not ready for prime time).   I had not come across [[Experimental|Experimental]] as the search is a bit temperamental and searching for the root, experiment, produced no result.....&lt;br /&gt;
&lt;br /&gt;
Perhaps we need a different topic name?&lt;br /&gt;
&lt;br /&gt;
I have encouraged AT to ask you to move these pages out of the experimental: topic but I think she feels they are not quite ready and I want to respect hre wishes on this.&lt;br /&gt;
&lt;br /&gt;
We also have some experimental pages under development with respect to gradebook &amp;quot;cases&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
I would encourage you to discuss the progress on all these pages with AT.&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
:Marc, thanks for your comments. The use of experimental: as a prefix is fine by me. Alternatively you could use a [[MoodleDocs:Templates|Moodle Docs template]] to add a message saying that the page is experimental. --[[User:Helen Foster|Helen Foster]] 02:41, 13 January 2009 (CST)&lt;br /&gt;
::Marc and Helen, something new to me.  I found 7 pages when I searched on &amp;quot;experimental:&amp;quot; and found 7 Article title matches.  6 started with &amp;quot;experimental:&amp;quot; and of course &amp;quot;Experimental&amp;quot;. Wondering if an alternative draft to Main Page should be done that way with the Experimental template.  :)--[[User:chris collman|chris collman]] 06:00, 13 January 2009 (CST)&lt;br /&gt;
:::Helen, thanks for moving some of the experimental: pages.  The page here, however, has yet to be moved: [https://docs.moodle.org/en/experimental:Getting_Help_Installing_and_Managing_Moodle]. Vis-a-vis topics/categories, I think it makes sense to have a category that is not searched by default so that users do not find materials that is not ready for prime time.  By the same token,  I think, as I mentioned above,  that Development: is problematic because it confuses as far as whether it is a topic for Developers or addresses material under development, which are really two different areas.  Likewise, as long as there is an Experimental page the use of experimental: could cause confusion.    I would argue for three distinct categories.... [[User:Marc Grober|Marc Grober]] 12:16, 24 January 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
::As I understood your (Helen&#039;s) comment (posted I don&#039;t recall where) you (Helen) were I think suggesting that what I was really suggesting was a new name space such that folks could develop documents that were not included in a default search.....  which I think is exactly what I was looking for....  So the question becomes can and should we do such a thing..... --[[User:Marc Grober|Marc Grober]] 23:44, 9 March 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::Marc, I guess you&#039;re referring to my forum post [http://moodle.org/mod/forum/discuss.php?d=115736#p509590 Re: Not including pages in the Moodle Docs search]. How about using a Moodle Docs template for now to indicate docs under development and add them to an appropriate category, then when there are sufficient pages to warrant it, we can create a new namespace and move all the pages into it. --[[User:Helen Foster|Helen Foster]] 11:46, 10 March 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
==Talk:Helen&#039;s page is over 32k==&lt;br /&gt;
FYI: I got that warning.  Maybe a subpage for the older stuff and a link, so we don&#039;t loose some stuff. Of course alternatively, if I deleted all my comments/questions, that would shorted it a lot :)  --[[User:chris collman|chris collman]] 06:04, 13 January 2009 (CST)&lt;br /&gt;
::Seriously, I would be happy to edit my posts here down to a nub or nothingness.  I think some of the language requests for help could be put in one heading and shortened, without losing anything.    --[[User:chris collman|chris collman]] 06:13, 13 January 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
:Chris, thanks for creating [[User talk:Helen Foster/1]]. I think it&#039;s a good solution :-) --[[User:Helen Foster|Helen Foster]] 02:51, 14 January 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*[[User talk:Helen Foster/1]] for older comments&lt;br /&gt;
&lt;br /&gt;
== Registered Users Bug with Mediawiki ==&lt;br /&gt;
&lt;br /&gt;
Hi, [[User_talk:David_Scotson#Moodle_Docs_stats|Way back in 2006 you mentioned]] a work-around for a bug resulting in registered users stats on [[Special:Statistics]] not updating properly. I think I am encountering this same bug on my internal wiki now. I know that was a long time ago, but do you remember what you did to fix it/what the work-around mentioned was?&lt;br /&gt;
Thanks,&lt;br /&gt;
--[[User:Adrian Archer|Adrian Archer]] 11:02, 4 March 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
:Hi Adrian, here are Eloy&#039;s workarounds (easy to do with phpMyAdmin):&lt;br /&gt;
&lt;br /&gt;
:# To refresh the count of pages, if it&#039;s not working: table: site_stats, field: ss_total_pages, setting it to -1 should force recalculation of pages&lt;br /&gt;
:# To refresh the count of registered users, delete the contents of the &amp;quot;cached statistics&amp;quot; table&lt;br /&gt;
&lt;br /&gt;
:Thanks to Eloy for recalling them :-) I hope you are able to upgrade to a newer MediaWiki version soon. --[[User:Helen Foster|Helen Foster]] 09:01, 5 March 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
::Thanks so much for the quick response, that sounds like it should work. I&#039;m actually using Version 1.13.3, so I guess the bug still exists. --[[User:Adrian Archer|Adrian Archer]] 09:17, 5 March 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
:::Hmm, Moodle Docs is actually using version 1.11.2, though we&#039;re hoping to upgrade very soon (MDLSITE-657). --[[User:Helen Foster|Helen Foster]] 09:35, 5 March 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
== Function if in grade calculations? ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hi Helen&lt;br /&gt;
&lt;br /&gt;
Thanks for your jobs.&lt;br /&gt;
&lt;br /&gt;
Sorry for my lousy english.&lt;br /&gt;
&lt;br /&gt;
I am trying to use the &amp;quot;if&amp;quot; function in &amp;quot;Grade calculations&amp;quot; in a similar way as is done in &amp;quot;opencalc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
do you know if this is possible?&lt;br /&gt;
&lt;br /&gt;
How to introduce a note of recovery, only for a few students, without changing the original calification?&lt;br /&gt;
&lt;br /&gt;
My email is trujillo@unex.es&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;br /&gt;
&lt;br /&gt;
== Using Moodle for Teachers ==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
&lt;br /&gt;
I teach math at Woodland Middle School  in Woodland, WA. I&#039;m also just beginning work with the Ubuntu Learning Project (name?). Is your book (Using Moodle - Teaching with the Popular Open Source Course Management System) available for download on Moodle Docs free to teachers? If so, is there some type of creative commons license? Or should we just link to Moodle Docs? I found your book extremely useful when I taught a 3-day Moodle Bootcamp to teachers this summer.&lt;br /&gt;
&lt;br /&gt;
Thanks, Mark Knudson&lt;br /&gt;
&lt;br /&gt;
:Hi Mark, glad to hear you found my book useful :-) It&#039;s available for download under the Creative Commons Attribution-Noncommercial-Share Alike licence here: [[Using Moodle book]]. --[[User:Helen Foster|Helen Foster]] 19:11, 21 September 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== PHP Settings by Moodle version ==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
&lt;br /&gt;
I&#039;m new to this community (and to Moodle) and am not sure how I should request an update to the documentation relating to a Moodle PHP extension requirement - specifically zlib.&lt;br /&gt;
I noticed that this page:&lt;br /&gt;
https://docs.moodle.org/no/Installering_av_Moodle has a section stating that &amp;quot;The zlib extension is required for zip/unzip functionality.&amp;quot; under the PHP Extensions and Libraries, but it doesn&#039;t exist here:&lt;br /&gt;
https://docs.moodle.org/en/PHP_settings_by_Moodle_version&lt;br /&gt;
&lt;br /&gt;
The PHP_settings_by_Moodle_version is a Stub and is waiting for review - I was thinking about updating it with the text from the https://docs.moodle.org/no/Installering_av_Moodle page.&lt;br /&gt;
&lt;br /&gt;
Looking for a little direction.&lt;br /&gt;
&lt;br /&gt;
Thanks!&lt;br /&gt;
Andy&lt;br /&gt;
&lt;br /&gt;
:Hi Andy,&lt;br /&gt;
&lt;br /&gt;
:Thanks for your kind offer to update the documentation [[PHP settings by Moodle version]]. Please feel free to go ahead and do so :-) (I asked in our developer chat and was informed that zlib is required for versions of Moodle up to 1.9 and Moodle 2.0 onwards will come with native PHP zip support so it needs the &amp;quot;zip&amp;quot; extension instead.)&lt;br /&gt;
&lt;br /&gt;
:For future reference, you&#039;re always welcome to edit pages in Moodle Docs and help improve our documentation. If you&#039;re not quite sure of something, you can leave a note in the page comments. Thanks again! --[[User:Helen Foster|Helen Foster]] 11:45, 20 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Query re Cool Course Competition ==&lt;br /&gt;
Two questions re the Cool Course Competition:&lt;br /&gt;
1) How can teachers know whether the modules and blocks they use are core or not? Is there a list somewhere?(2) Why are some entries in their own native theme, while most entries are using the competition site&#039;s theme? How can I upload my course so that it retains its own theme? Thanks, [[User:Thomas Brown|Thomas Brown]] 00:16, 16 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Hi Thomas, an easy way to check which modules and blocks are core i.e. included in the standard Moodle packages is to login to the [http://demo.moodle.net/ Moodle Demonstration Site] as an admin and check &#039;&#039;Administration &amp;gt; Modules &amp;gt; Activities &amp;gt; Manage activities&#039;&#039; and &#039;&#039;Administration &amp;gt; Modules &amp;gt; Blocks &amp;gt; Manage blocks&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
:Regarding the course theme, if you force a theme in the course settings, it will be used, otherwise the site theme will be used. --[[User:Helen Foster|Helen Foster]] 11:22, 16 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
::Do you mean the &amp;quot;Settings&amp;quot; page in the course&#039;s Admin block? My Settings page doesn&#039;t have any theme-related options. Did I look in the wrong place? tnx, [[User:Thomas Brown|Thomas Brown]] 23:55, 16 January 2010 (UTC)&lt;br /&gt;
:::It appears that the site admin can make a setting that allows teachers to force a theme -- so I can do that now. Which raises another question: Does my theme have to be installed on the Cool Course site for it to work there, or can my backup import the theme features and bring them along into the Cool Course site? tnx again, [[User:Thomas Brown|Thomas Brown]] 03:58, 18 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
::::Apologies for not mentioning that course themes need to be enabled by an admin in [[Theme settings]]; glad you figured things out! Yes, your theme needs to be installed on the competition site for it to work, as a course backup does not include theme features. All themes included in standard Moodle packages are available on the competition site. --[[User:Helen Foster|Helen Foster]] 09:32, 18 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I think I have a bigger problem now that my course is on the competition web site. None of the links to course resources work! I must have royally messed up my backup somehow. I included the resources in the backup, but...[[User:Thomas Brown|Thomas Brown]] 21:08, 18 January 2010 (UTC)&lt;br /&gt;
::Testing out the restore of my competition entry on my own site, I find that the html links that I&#039;ve put in the Topic Outline labels go to random id numbers, and so don&#039;t open the resources they&#039;re supposed to and give me a page not found browser error instead. However, if I simply click on edit for one of the labels, and then save it without changing anything, now suddenly all of the links are in working order. So, is it possible for me or someone else to do this fix on my competition entry, so that it starts working? While we&#039;re in there fixing it, can we change it to custom corners? Thanks yet again...[[User:Thomas Brown|Thomas Brown]] 21:48, 18 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::No worries, it&#039;s a good test for the course backup and restore process! I&#039;ve reported the problem you describe in the tracker - MDL-21380. --[[User:Helen Foster|Helen Foster]] 15:02, 19 January 2010 (UTC)&lt;br /&gt;
===Curious, why here?===&lt;br /&gt;
Firstly, thanks for the post here which drew my attention to coolcourses.moodle.org.  Really Cool and Neato.   Secondly, shouldn&#039;t most of this discussion be in the [http://coolcourses.moodle.org/mod/forum/view.php?id=3073 &amp;quot;Competition Lounge&amp;quot;]?   Thirdly, there were some special effects I am dying to know &amp;quot;how they do that?&amp;quot; and I just looked at each course in the first topic! Fourthly, thanks to all who contributed. --[[User:chris collman|chris collman]] 13:00, 21 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Hi Chris, just wondering why you never noticed the [http://moodle.org/mod/forum/discuss.php?d=135429 Cool Course Competition moodle.org news item]? Regarding the [http://coolcourses.moodle.org/mod/forum/view.php?id=3073 Competition lounge], the fact that it was only created a few hours ago probably explains why nobody has posted there yet. How about posting your &amp;quot;how they do that?&amp;quot; question and thanks there. --[[User:Helen Foster|Helen Foster]] 15:12, 21 January 2010 (UTC)&lt;br /&gt;
::I am just a stick in the mud sometimes.  I will take you up on your excellent suggestion. --[[User:chris collman|chris collman]] 16:46, 22 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==nln materials query ==&lt;br /&gt;
&lt;br /&gt;
Dear Helen,&lt;br /&gt;
Sorry to contact you this way - I have been recommended to you by several of your former colleagues on the ILT Champs list. I am conducting a research thesis at the University of Nottingham into the uptake and use of the nln materials amongst the FE sector, and have been advised that you would have an interesting view on this programme. If you could spare me a few minutes of your time to have a discussion, then please could you drop me an email at ttxla4@nottingham.ac.uk? Thank you very much. Rob Enbgelbright says &amp;quot;hello&amp;quot; btw. Many thanks, Laurel Armstrong&lt;br /&gt;
&lt;br /&gt;
:Hi Laurel, I&#039;ve just emailed you :-) --[[User:Helen Foster|Helen Foster]] 13:46, 1 February 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
==Jmol filter==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
&lt;br /&gt;
I noticed that you had updated the Jmol filter and wonder if you could tell me the status of this filter, and also the Jmol resource type and the Java Molecule Editor (for allowing students to add chemical structures as answers in quizzes).&lt;br /&gt;
Do they work in 1.9 and 2.0?&lt;br /&gt;
&lt;br /&gt;
On a similar note, there doesn&#039;t seem to be a direct way for students to put subscripts and superscripts into answers. I have resorted to adding a table of useful chemical symbols in the question, which students can copy and paste. Is there a setting somewhere that allows students to add formatted text?&lt;br /&gt;
&lt;br /&gt;
:Hi Mike, please see the comments on the [http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=87 Jmol resource type] for the latest information on it. You may also wish to contact Geoffrey Rowland.&lt;br /&gt;
&lt;br /&gt;
:Regarding adding chemical symbols, you may find the discussions listed in [[Chemistry/Biochemistry]] helpful. --[[User:Helen Foster|Helen Foster]] 14:58, 7 June 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== permission to edit brazilian portuguese version of docs.moodle.org ==&lt;br /&gt;
&lt;br /&gt;
Hello, Helen&lt;br /&gt;
&lt;br /&gt;
don&#039;t really know if you are the right person to ask, but, could you give me permission to edit brazilian portuguese version of docs.moodle.org ?&lt;br /&gt;
I help maintain the language pack along with Gilvan Marques, as you can see at http://cvs.moodle.org/lang/pt_br_utf8/?sortby=date#dirlist .&lt;br /&gt;
The last update of the home page was in august 2007, and also mention 1.8 as the current stable and focus of translators. I would like to make it a translated copy of the current english home page and also translate the release notes of 2.0 as first step...&lt;br /&gt;
&lt;br /&gt;
:Hi Daniel,&lt;br /&gt;
&lt;br /&gt;
:Thanks for your offer to edit the [https://docs.moodle.org/pt_br/P%C3%A1gina_principal Brazilian Portuguese Moodle Docs]. You should find that when you login you already have editing rights (all logged-in users can edit pages). --[[User:Helen Foster|Helen Foster]] 09:41, 25 July 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Danielneis</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=User_talk:Helen_Foster&amp;diff=23204</id>
		<title>User talk:Helen Foster</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=User_talk:Helen_Foster&amp;diff=23204"/>
		<updated>2010-07-27T17:40:30Z</updated>

		<summary type="html">&lt;p&gt;Danielneis: /* permission to edit brazilian portuguese version of docs.moodle.org */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==deleting extra images==&lt;br /&gt;
Hi Helen - I am very shy at adding to the docs! ;)&lt;br /&gt;
I put some stuff on about conditional activities but I uploaded images which weren&#039;t clear so I changed them and now I don&#039;t know how to delete the first few which are no longer used on the page - could you delete the earlier, unused uploads please so they don&#039;t take up space and clutter the place up? (I couldn&#039;t find a &amp;quot;delete&amp;quot; instruction so I presume we can&#039;t) thanks - Mary [[User:Mary Cooch|Mary Cooch]]&lt;br /&gt;
: Hi Mary, if you upload a new version of the file with the same name it will replace the old one. At least I can&#039;t find any duplicates on your images&#039; pages ;-) And your files are all only some KB so they won&#039;t take up much disk space anyway. --[[User:Frank Ralf|Frank Ralf]] 10:19, 6 March 2010 (UTC)&lt;br /&gt;
:: Mary, many thanks for your contribution to [[Conditional activities]] :-) Frank is right in saying that new versions of images simply replace old ones, so there is no need for any deletion. If you upload an image then decide you don&#039;t want to use it at all, you can just type &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{Deletion}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; at the top of the page (as explained in [[MoodleDocs:Templates]]) then an admin will come along and delete it. --[[User:Helen Foster|Helen Foster]] 12:33, 8 March 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Deleting some attached files in JIRA ==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
&lt;br /&gt;
I made a bit of a mess at [http://tracker.moodle.org/browse/MDL-21110 http://tracker.moodle.org/browse/MDL-21110]. Would it be possible to delete all the attached files there so Penny or I can upload the current one and let Jira handle the versioning more sanely?&lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;br /&gt;
Matt&lt;br /&gt;
&lt;br /&gt;
:Done! --[[User:Helen Foster|Helen Foster]] 08:33, 5 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Creating new FAQ pages ==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
&lt;br /&gt;
I have successfully created a stub for a XML FAQ page (https://docs.moodle.org/en/XML_FAQ) but how do I get it promoted on https://docs.moodle.org/en/Category:FAQ ?&lt;br /&gt;
&lt;br /&gt;
I also would like to create an Import/Export FAQ for collecting all the information regarding Moodle import and export which is scattered in different forums.&lt;br /&gt;
&lt;br /&gt;
Regards,&lt;br /&gt;
[[User:Frank Ralf|Frank Ralf]]&lt;br /&gt;
&lt;br /&gt;
:Hi Helen will have to answer the Import/Export question.  I jumped in and added &amp;lt;nowiki&amp;gt;[[Category:FAQ]]&amp;lt;/nowiki&amp;gt; to the bottom of the page, which anyone can do. And took your hint and added a &amp;lt;nowiki&amp;gt;{{stub}}&amp;lt;/nowiki&amp;gt; template at the top.  Thanks for the XML work. Best --[[User:chris collman|chris collman]] 14:16, 3 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
::Hi Frank, thanks for your offer - an [[Import and export FAQ]] page would be great, thanks! --[[User:Helen Foster|Helen Foster]] 04:12, 4 December 2008 (CST)&lt;br /&gt;
:::Thanks to both of you! Helen, how did you get that nice Contents menu on your Import and export FAQ page? I couldn&#039;t figure that out from the source. --[[User:Frank Ralf|Frank Ralf]] 05:30, 4 December 2008 (CST) Problem solved, just found the documentation ;-) --[[User:Frank Ralf|Frank Ralf]] 05:43, 4 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
== Suggestion that is probably total overkill ==&lt;br /&gt;
&amp;lt;onlyinclude&amp;gt;&lt;br /&gt;
# Create a new FAQ namespace.&lt;br /&gt;
# In this namespace, create one page for each frequent question, where the contents of the page is the answer.&lt;br /&gt;
# Use our new knowledge of transclusions to build the FAQ lists by just pulling in pages from the FAQ namespace.&lt;br /&gt;
&lt;br /&gt;
The benefits of doing this are&lt;br /&gt;
* The same FAQ can appear in more than one list without copying-and-pasting.&lt;br /&gt;
* Each question gets a unique URL that so in the forums, we can point people to a page that just answers their specific question.&lt;br /&gt;
&lt;br /&gt;
Disadvantages&lt;br /&gt;
* Editing FAQ lists becomes incomprehensible to anyone who is not a MediaWiki geek.&lt;br /&gt;
&lt;br /&gt;
If we went this way, I would like to use B to build a new FAQ page: &amp;quot;Troubleshooting FAQ&amp;quot;. Might be a good idea anyway.&lt;br /&gt;
&amp;lt;/onlyinclude&amp;gt;&lt;br /&gt;
I hasten to say that I am not recommending this approach. The disadvantages could easily outweigh the advantages. I am simply pointing out a technical possibility that may be worth considering either now, or in the future.&amp;lt;onlyinclude&amp;gt;--[[User:Tim Hunt|Tim Hunt]] 07:11, 4 December 2008 (CST)&amp;lt;/onlyinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Just added [[MoodleDocs:Transclusion]].  Good thing I had my first cup of coffee, Tim&#039;s thoughtful post got me rubbing the sleep out of my eyes.  I wonder if I can get the partial transclusion of this section to work in Sandbox then in [[MoodleDocs_talk:Transclusion]]. Definitely a tool to be used with care. But Wowie Zowie ! --[[User:chris collman|chris collman]] 06:49, 5 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
:: Hello Tim, I think your suggested solution would indeed be overkill and would make maintaining FAQ too difficult. I see FAQ as an intermediary step between the unorganised kind of &amp;quot;documentation&amp;quot; which is provided in the forums towards &amp;quot;real&amp;quot; documentation. Therefore the ease of editing is crucial in my opinion. What about using Moodle&#039;s &#039;&#039;&#039;autolinking mechanism&#039;&#039;&#039; to automatically link to FAQ pages, e.g. if there is a mention of grades in the forums that would create an automatic link to Grades FAQ. I am quite new to Moodle, but couldn&#039;t that be done with setting up a kind of FAQ Glossary? --[[User:Frank Ralf|Frank Ralf]] 02:44, 16 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
::: Hi Tim, thanks for your suggestion, though I think it&#039;s overkill too!  The current FAQ pages have nice short titles which are easy to find and to include in forum posts. Having a page for each FAQ would result in really long URLs. Also, I think that when we point people to an FAQ page, and they have to look through it to find the answer to their question, they may well find answers to other questions they have. As other people have suggested, I think FAQ pages work well as start pages with links to lots of other pages i.e. they&#039;re kept fairly short, for example [[Contributed code FAQ]]. --[[User:Helen Foster|Helen Foster]] 04:49, 18 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
::: Frank, regarding autolinking to FAQ pages, have you come across the Moodle Docs filter on moodle.org? Please see the [[Moodle.org FAQ]] for more details. --[[User:Helen Foster|Helen Foster]] 04:49, 18 December 2008 (CST)&lt;br /&gt;
::::Helen, thanks for the hint. But isn&#039;t that the usual &#039;&#039;manual&#039;&#039; way of wiki linking? But on second thought that might really be the best way of linking to FAQ pages as it keeps getting the forums cluttered with too many (automatic) links. In fact, it just might be a matter of good practice to put advice of lasting value from the forums into a more structured form of documentation and nothing which could or should be done in an automatic and technical way... --[[User:Frank Ralf|Frank Ralf]] 05:11, 19 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
== Security Notification registration ==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
&lt;br /&gt;
It was suggested to me through the #moodle channel on freenode that I raise this concern with you.&lt;br /&gt;
&lt;br /&gt;
I&#039;m developing a moodle installation behind a firewall on a non-public URL and am interested in subscribing to security updates (prompted to check this after seeing a moodle vulnerability mentioned on Bugtraq). I had previously attempted to subscribe by registering our installation through the admin pages, however that registration was rejected as the site was located behind a firewall and not accessible.&lt;br /&gt;
&lt;br /&gt;
Due to that rejection, I wasn&#039;t subscribed to security updates.&lt;br /&gt;
&lt;br /&gt;
I now find myself in the unfortunate position where I cannot subscribe to security updates without having a public facing site (which I can&#039;t reasonably know is secure as I&#039;m not receiving security updates through your mailing list).&lt;br /&gt;
&lt;br /&gt;
The burden for those of us who have an internal site they&#039;re developing (or perhaps is in production) is that we must now create a public facing site to register for the sole purpose of receiving security updates. If the thought is that only parties interested in maintaining a moodle site should have access to those messages, perhaps a different measure could be put into place (a code that appears once moodle is installed, for example).&lt;br /&gt;
&lt;br /&gt;
I&#039;ve tried subscribing through sympa@lists.moodle.org, however that method does not work either.&lt;br /&gt;
&lt;br /&gt;
Could you please provide a process for folks like me to get on the security updates list without having to install moodle on a public web server first?&lt;br /&gt;
&lt;br /&gt;
Thanks!&lt;br /&gt;
&lt;br /&gt;
- P.&lt;br /&gt;
&lt;br /&gt;
:Hi Paul, how about subscribing to the [http://moodle.org/mod/forum/view.php?f=996 security announcements forum], where all important security issues are published. --[[User:Helen Foster|Helen Foster]] 04:34, 18 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
== Unseen (not hidden) activities==&lt;br /&gt;
Hi Helen (This is partly my attempt at practising here by the way!) I&#039;ve posted several times recently about the concept of &#039;unseen&#039; topics with resources that can be linked to on the course page where hidden ones wouldn&#039;t work. is there documentation about that somewhere here ? If so, where? Then I can point Moodlers to it next time.If not, shall I write it? Thanks - [[User: Mary Cooch|Mary Cooch]]&lt;br /&gt;
&lt;br /&gt;
:Hi Mary, I&#039;ve just had a quick look and can&#039;t find any documentation about unseen topics, so it would be helpful if you could write some, perhaps here: [[Course homepage]]. Thanks in advance :-) --[[User:Helen Foster|Helen Foster]] 17:20, 19 December 2008 (CST)&lt;br /&gt;
:Helen - please can you check what I have done as you know I&#039;m still a novice and don&#039;t want to put the wrong thing in the wrong place! Also, if you look on my usertalk Chris Colman said it might be useful on the html linking page? [[User: Mary Cooch|Mary Cooch]]&lt;br /&gt;
&lt;br /&gt;
== Downloading Moodle Core ==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
I came across Moodle just this morning, and read a little about its design, and loved it, it is perfect for the project Im starting.&lt;br /&gt;
&lt;br /&gt;
Ive gone to the download page, to download the Moodle core zip package, but when I click on the link to download I get the following message;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;A server error that affects your login session was detected. Please login again or restart your browser.&#039;&lt;br /&gt;
&lt;br /&gt;
( Continue )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I had a look around the FAQ pages, to see if there was anything on there, but it only mentions about people who already have moodle and are having this difficulty,&lt;br /&gt;
&lt;br /&gt;
Please could you send me an alternative link, &lt;br /&gt;
&lt;br /&gt;
Kind Regards&lt;br /&gt;
Andrew&lt;br /&gt;
:Hi Andrew, I left a comment on your [[User_talk:Andrew_Abel|user comment page]], just in case you were in a hurry to play with Moodle. --[[User:chris collman|chris collman]] 07:40, 1 January 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
::Hi Andrew, I hope you&#039;ve been successful in downloading Moodle by now. Chris, thanks for your helpful comments :-) --[[User:Helen Foster|Helen Foster]] 01:21, 2 January 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
== &amp;quot;experimental:&amp;quot; prefix ==&lt;br /&gt;
&lt;br /&gt;
[[User:Marc Grober|Marc Grober]] 12:00, 12 January 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
We started using experimental: as a prefix because there was some confusion about the use of Development: as a prefix.....&lt;br /&gt;
&lt;br /&gt;
In the Moodle docs, Development: appears to cover Moodle developer documentation, not docs under development,  so we wanted to use a prefix that connote that the docs were, as we suggest, &amp;quot;experimental&amp;quot; (i.e. not ready for prime time).   I had not come across [[Experimental|Experimental]] as the search is a bit temperamental and searching for the root, experiment, produced no result.....&lt;br /&gt;
&lt;br /&gt;
Perhaps we need a different topic name?&lt;br /&gt;
&lt;br /&gt;
I have encouraged AT to ask you to move these pages out of the experimental: topic but I think she feels they are not quite ready and I want to respect hre wishes on this.&lt;br /&gt;
&lt;br /&gt;
We also have some experimental pages under development with respect to gradebook &amp;quot;cases&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
I would encourage you to discuss the progress on all these pages with AT.&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
:Marc, thanks for your comments. The use of experimental: as a prefix is fine by me. Alternatively you could use a [[MoodleDocs:Templates|Moodle Docs template]] to add a message saying that the page is experimental. --[[User:Helen Foster|Helen Foster]] 02:41, 13 January 2009 (CST)&lt;br /&gt;
::Marc and Helen, something new to me.  I found 7 pages when I searched on &amp;quot;experimental:&amp;quot; and found 7 Article title matches.  6 started with &amp;quot;experimental:&amp;quot; and of course &amp;quot;Experimental&amp;quot;. Wondering if an alternative draft to Main Page should be done that way with the Experimental template.  :)--[[User:chris collman|chris collman]] 06:00, 13 January 2009 (CST)&lt;br /&gt;
:::Helen, thanks for moving some of the experimental: pages.  The page here, however, has yet to be moved: [https://docs.moodle.org/en/experimental:Getting_Help_Installing_and_Managing_Moodle]. Vis-a-vis topics/categories, I think it makes sense to have a category that is not searched by default so that users do not find materials that is not ready for prime time.  By the same token,  I think, as I mentioned above,  that Development: is problematic because it confuses as far as whether it is a topic for Developers or addresses material under development, which are really two different areas.  Likewise, as long as there is an Experimental page the use of experimental: could cause confusion.    I would argue for three distinct categories.... [[User:Marc Grober|Marc Grober]] 12:16, 24 January 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
::As I understood your (Helen&#039;s) comment (posted I don&#039;t recall where) you (Helen) were I think suggesting that what I was really suggesting was a new name space such that folks could develop documents that were not included in a default search.....  which I think is exactly what I was looking for....  So the question becomes can and should we do such a thing..... --[[User:Marc Grober|Marc Grober]] 23:44, 9 March 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::Marc, I guess you&#039;re referring to my forum post [http://moodle.org/mod/forum/discuss.php?d=115736#p509590 Re: Not including pages in the Moodle Docs search]. How about using a Moodle Docs template for now to indicate docs under development and add them to an appropriate category, then when there are sufficient pages to warrant it, we can create a new namespace and move all the pages into it. --[[User:Helen Foster|Helen Foster]] 11:46, 10 March 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
==Talk:Helen&#039;s page is over 32k==&lt;br /&gt;
FYI: I got that warning.  Maybe a subpage for the older stuff and a link, so we don&#039;t loose some stuff. Of course alternatively, if I deleted all my comments/questions, that would shorted it a lot :)  --[[User:chris collman|chris collman]] 06:04, 13 January 2009 (CST)&lt;br /&gt;
::Seriously, I would be happy to edit my posts here down to a nub or nothingness.  I think some of the language requests for help could be put in one heading and shortened, without losing anything.    --[[User:chris collman|chris collman]] 06:13, 13 January 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
:Chris, thanks for creating [[User talk:Helen Foster/1]]. I think it&#039;s a good solution :-) --[[User:Helen Foster|Helen Foster]] 02:51, 14 January 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*[[User talk:Helen Foster/1]] for older comments&lt;br /&gt;
&lt;br /&gt;
== Registered Users Bug with Mediawiki ==&lt;br /&gt;
&lt;br /&gt;
Hi, [[User_talk:David_Scotson#Moodle_Docs_stats|Way back in 2006 you mentioned]] a work-around for a bug resulting in registered users stats on [[Special:Statistics]] not updating properly. I think I am encountering this same bug on my internal wiki now. I know that was a long time ago, but do you remember what you did to fix it/what the work-around mentioned was?&lt;br /&gt;
Thanks,&lt;br /&gt;
--[[User:Adrian Archer|Adrian Archer]] 11:02, 4 March 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
:Hi Adrian, here are Eloy&#039;s workarounds (easy to do with phpMyAdmin):&lt;br /&gt;
&lt;br /&gt;
:# To refresh the count of pages, if it&#039;s not working: table: site_stats, field: ss_total_pages, setting it to -1 should force recalculation of pages&lt;br /&gt;
:# To refresh the count of registered users, delete the contents of the &amp;quot;cached statistics&amp;quot; table&lt;br /&gt;
&lt;br /&gt;
:Thanks to Eloy for recalling them :-) I hope you are able to upgrade to a newer MediaWiki version soon. --[[User:Helen Foster|Helen Foster]] 09:01, 5 March 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
::Thanks so much for the quick response, that sounds like it should work. I&#039;m actually using Version 1.13.3, so I guess the bug still exists. --[[User:Adrian Archer|Adrian Archer]] 09:17, 5 March 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
:::Hmm, Moodle Docs is actually using version 1.11.2, though we&#039;re hoping to upgrade very soon (MDLSITE-657). --[[User:Helen Foster|Helen Foster]] 09:35, 5 March 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
== Function if in grade calculations? ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hi Helen&lt;br /&gt;
&lt;br /&gt;
Thanks for your jobs.&lt;br /&gt;
&lt;br /&gt;
Sorry for my lousy english.&lt;br /&gt;
&lt;br /&gt;
I am trying to use the &amp;quot;if&amp;quot; function in &amp;quot;Grade calculations&amp;quot; in a similar way as is done in &amp;quot;opencalc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
do you know if this is possible?&lt;br /&gt;
&lt;br /&gt;
How to introduce a note of recovery, only for a few students, without changing the original calification?&lt;br /&gt;
&lt;br /&gt;
My email is trujillo@unex.es&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;br /&gt;
&lt;br /&gt;
== Using Moodle for Teachers ==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
&lt;br /&gt;
I teach math at Woodland Middle School  in Woodland, WA. I&#039;m also just beginning work with the Ubuntu Learning Project (name?). Is your book (Using Moodle - Teaching with the Popular Open Source Course Management System) available for download on Moodle Docs free to teachers? If so, is there some type of creative commons license? Or should we just link to Moodle Docs? I found your book extremely useful when I taught a 3-day Moodle Bootcamp to teachers this summer.&lt;br /&gt;
&lt;br /&gt;
Thanks, Mark Knudson&lt;br /&gt;
&lt;br /&gt;
:Hi Mark, glad to hear you found my book useful :-) It&#039;s available for download under the Creative Commons Attribution-Noncommercial-Share Alike licence here: [[Using Moodle book]]. --[[User:Helen Foster|Helen Foster]] 19:11, 21 September 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== PHP Settings by Moodle version ==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
&lt;br /&gt;
I&#039;m new to this community (and to Moodle) and am not sure how I should request an update to the documentation relating to a Moodle PHP extension requirement - specifically zlib.&lt;br /&gt;
I noticed that this page:&lt;br /&gt;
https://docs.moodle.org/no/Installering_av_Moodle has a section stating that &amp;quot;The zlib extension is required for zip/unzip functionality.&amp;quot; under the PHP Extensions and Libraries, but it doesn&#039;t exist here:&lt;br /&gt;
https://docs.moodle.org/en/PHP_settings_by_Moodle_version&lt;br /&gt;
&lt;br /&gt;
The PHP_settings_by_Moodle_version is a Stub and is waiting for review - I was thinking about updating it with the text from the https://docs.moodle.org/no/Installering_av_Moodle page.&lt;br /&gt;
&lt;br /&gt;
Looking for a little direction.&lt;br /&gt;
&lt;br /&gt;
Thanks!&lt;br /&gt;
Andy&lt;br /&gt;
&lt;br /&gt;
:Hi Andy,&lt;br /&gt;
&lt;br /&gt;
:Thanks for your kind offer to update the documentation [[PHP settings by Moodle version]]. Please feel free to go ahead and do so :-) (I asked in our developer chat and was informed that zlib is required for versions of Moodle up to 1.9 and Moodle 2.0 onwards will come with native PHP zip support so it needs the &amp;quot;zip&amp;quot; extension instead.)&lt;br /&gt;
&lt;br /&gt;
:For future reference, you&#039;re always welcome to edit pages in Moodle Docs and help improve our documentation. If you&#039;re not quite sure of something, you can leave a note in the page comments. Thanks again! --[[User:Helen Foster|Helen Foster]] 11:45, 20 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Query re Cool Course Competition ==&lt;br /&gt;
Two questions re the Cool Course Competition:&lt;br /&gt;
1) How can teachers know whether the modules and blocks they use are core or not? Is there a list somewhere?(2) Why are some entries in their own native theme, while most entries are using the competition site&#039;s theme? How can I upload my course so that it retains its own theme? Thanks, [[User:Thomas Brown|Thomas Brown]] 00:16, 16 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Hi Thomas, an easy way to check which modules and blocks are core i.e. included in the standard Moodle packages is to login to the [http://demo.moodle.net/ Moodle Demonstration Site] as an admin and check &#039;&#039;Administration &amp;gt; Modules &amp;gt; Activities &amp;gt; Manage activities&#039;&#039; and &#039;&#039;Administration &amp;gt; Modules &amp;gt; Blocks &amp;gt; Manage blocks&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
:Regarding the course theme, if you force a theme in the course settings, it will be used, otherwise the site theme will be used. --[[User:Helen Foster|Helen Foster]] 11:22, 16 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
::Do you mean the &amp;quot;Settings&amp;quot; page in the course&#039;s Admin block? My Settings page doesn&#039;t have any theme-related options. Did I look in the wrong place? tnx, [[User:Thomas Brown|Thomas Brown]] 23:55, 16 January 2010 (UTC)&lt;br /&gt;
:::It appears that the site admin can make a setting that allows teachers to force a theme -- so I can do that now. Which raises another question: Does my theme have to be installed on the Cool Course site for it to work there, or can my backup import the theme features and bring them along into the Cool Course site? tnx again, [[User:Thomas Brown|Thomas Brown]] 03:58, 18 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
::::Apologies for not mentioning that course themes need to be enabled by an admin in [[Theme settings]]; glad you figured things out! Yes, your theme needs to be installed on the competition site for it to work, as a course backup does not include theme features. All themes included in standard Moodle packages are available on the competition site. --[[User:Helen Foster|Helen Foster]] 09:32, 18 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I think I have a bigger problem now that my course is on the competition web site. None of the links to course resources work! I must have royally messed up my backup somehow. I included the resources in the backup, but...[[User:Thomas Brown|Thomas Brown]] 21:08, 18 January 2010 (UTC)&lt;br /&gt;
::Testing out the restore of my competition entry on my own site, I find that the html links that I&#039;ve put in the Topic Outline labels go to random id numbers, and so don&#039;t open the resources they&#039;re supposed to and give me a page not found browser error instead. However, if I simply click on edit for one of the labels, and then save it without changing anything, now suddenly all of the links are in working order. So, is it possible for me or someone else to do this fix on my competition entry, so that it starts working? While we&#039;re in there fixing it, can we change it to custom corners? Thanks yet again...[[User:Thomas Brown|Thomas Brown]] 21:48, 18 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::No worries, it&#039;s a good test for the course backup and restore process! I&#039;ve reported the problem you describe in the tracker - MDL-21380. --[[User:Helen Foster|Helen Foster]] 15:02, 19 January 2010 (UTC)&lt;br /&gt;
===Curious, why here?===&lt;br /&gt;
Firstly, thanks for the post here which drew my attention to coolcourses.moodle.org.  Really Cool and Neato.   Secondly, shouldn&#039;t most of this discussion be in the [http://coolcourses.moodle.org/mod/forum/view.php?id=3073 &amp;quot;Competition Lounge&amp;quot;]?   Thirdly, there were some special effects I am dying to know &amp;quot;how they do that?&amp;quot; and I just looked at each course in the first topic! Fourthly, thanks to all who contributed. --[[User:chris collman|chris collman]] 13:00, 21 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Hi Chris, just wondering why you never noticed the [http://moodle.org/mod/forum/discuss.php?d=135429 Cool Course Competition moodle.org news item]? Regarding the [http://coolcourses.moodle.org/mod/forum/view.php?id=3073 Competition lounge], the fact that it was only created a few hours ago probably explains why nobody has posted there yet. How about posting your &amp;quot;how they do that?&amp;quot; question and thanks there. --[[User:Helen Foster|Helen Foster]] 15:12, 21 January 2010 (UTC)&lt;br /&gt;
::I am just a stick in the mud sometimes.  I will take you up on your excellent suggestion. --[[User:chris collman|chris collman]] 16:46, 22 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==nln materials query ==&lt;br /&gt;
&lt;br /&gt;
Dear Helen,&lt;br /&gt;
Sorry to contact you this way - I have been recommended to you by several of your former colleagues on the ILT Champs list. I am conducting a research thesis at the University of Nottingham into the uptake and use of the nln materials amongst the FE sector, and have been advised that you would have an interesting view on this programme. If you could spare me a few minutes of your time to have a discussion, then please could you drop me an email at ttxla4@nottingham.ac.uk? Thank you very much. Rob Enbgelbright says &amp;quot;hello&amp;quot; btw. Many thanks, Laurel Armstrong&lt;br /&gt;
&lt;br /&gt;
:Hi Laurel, I&#039;ve just emailed you :-) --[[User:Helen Foster|Helen Foster]] 13:46, 1 February 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
==Jmol filter==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
&lt;br /&gt;
I noticed that you had updated the Jmol filter and wonder if you could tell me the status of this filter, and also the Jmol resource type and the Java Molecule Editor (for allowing students to add chemical structures as answers in quizzes).&lt;br /&gt;
Do they work in 1.9 and 2.0?&lt;br /&gt;
&lt;br /&gt;
On a similar note, there doesn&#039;t seem to be a direct way for students to put subscripts and superscripts into answers. I have resorted to adding a table of useful chemical symbols in the question, which students can copy and paste. Is there a setting somewhere that allows students to add formatted text?&lt;br /&gt;
&lt;br /&gt;
:Hi Mike, please see the comments on the [http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=87 Jmol resource type] for the latest information on it. You may also wish to contact Geoffrey Rowland.&lt;br /&gt;
&lt;br /&gt;
:Regarding adding chemical symbols, you may find the discussions listed in [[Chemistry/Biochemistry]] helpful. --[[User:Helen Foster|Helen Foster]] 14:58, 7 June 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== permission to edit brazilian portuguese version of docs.moodle.org ==&lt;br /&gt;
&lt;br /&gt;
Hello, Helen&lt;br /&gt;
&lt;br /&gt;
don&#039;t really know if you are the right person to ask, but, could you give me permission to edit brazilian portuguese version of docs.moodle.org ?&lt;br /&gt;
I help maintain the language pack along with Gilvan Marques, as you can see at http://cvs.moodle.org/lang/pt_br_utf8/?sortby=date#dirlist .&lt;br /&gt;
The last update of the home page was in august 2007, and also mention 1.8 as the current stable and focus of translators. I would like to make it a translated copy of the current english home page and also translate the release notes of 2.0 as first step...&lt;br /&gt;
&lt;br /&gt;
:Hi Daniel,&lt;br /&gt;
&lt;br /&gt;
:Thanks for your offer to edit the [https://docs.moodle.org/pt_br/P%C3%A1gina_principal Brazilian Portuguese Moodle Docs]. You should find that when you login you already have editing rights (all logged-in users can edit pages). --[[User:Helen Foster|Helen Foster]] 09:41, 25 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Hello, Helen&lt;br /&gt;
&lt;br /&gt;
i cannot edit that page because &amp;quot;This page was protected against new editions.&amp;quot;, and it only allows me to see and copy source code.&lt;br /&gt;
Could you unlock, please? Thanks, Daniel&lt;/div&gt;</summary>
		<author><name>Danielneis</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=User_talk:Helen_Foster&amp;diff=23201</id>
		<title>User talk:Helen Foster</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=User_talk:Helen_Foster&amp;diff=23201"/>
		<updated>2010-07-25T05:14:11Z</updated>

		<summary type="html">&lt;p&gt;Danielneis: /* permission to edit brazilian portuguese version of docs.moodle.org */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==deleting extra images==&lt;br /&gt;
Hi Helen - I am very shy at adding to the docs! ;)&lt;br /&gt;
I put some stuff on about conditional activities but I uploaded images which weren&#039;t clear so I changed them and now I don&#039;t know how to delete the first few which are no longer used on the page - could you delete the earlier, unused uploads please so they don&#039;t take up space and clutter the place up? (I couldn&#039;t find a &amp;quot;delete&amp;quot; instruction so I presume we can&#039;t) thanks - Mary [[User:Mary Cooch|Mary Cooch]]&lt;br /&gt;
: Hi Mary, if you upload a new version of the file with the same name it will replace the old one. At least I can&#039;t find any duplicates on your images&#039; pages ;-) And your files are all only some KB so they won&#039;t take up much disk space anyway. --[[User:Frank Ralf|Frank Ralf]] 10:19, 6 March 2010 (UTC)&lt;br /&gt;
:: Mary, many thanks for your contribution to [[Conditional activities]] :-) Frank is right in saying that new versions of images simply replace old ones, so there is no need for any deletion. If you upload an image then decide you don&#039;t want to use it at all, you can just type &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{Deletion}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; at the top of the page (as explained in [[MoodleDocs:Templates]]) then an admin will come along and delete it. --[[User:Helen Foster|Helen Foster]] 12:33, 8 March 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Deleting some attached files in JIRA ==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
&lt;br /&gt;
I made a bit of a mess at [http://tracker.moodle.org/browse/MDL-21110 http://tracker.moodle.org/browse/MDL-21110]. Would it be possible to delete all the attached files there so Penny or I can upload the current one and let Jira handle the versioning more sanely?&lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;br /&gt;
Matt&lt;br /&gt;
&lt;br /&gt;
:Done! --[[User:Helen Foster|Helen Foster]] 08:33, 5 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Creating new FAQ pages ==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
&lt;br /&gt;
I have successfully created a stub for a XML FAQ page (https://docs.moodle.org/en/XML_FAQ) but how do I get it promoted on https://docs.moodle.org/en/Category:FAQ ?&lt;br /&gt;
&lt;br /&gt;
I also would like to create an Import/Export FAQ for collecting all the information regarding Moodle import and export which is scattered in different forums.&lt;br /&gt;
&lt;br /&gt;
Regards,&lt;br /&gt;
[[User:Frank Ralf|Frank Ralf]]&lt;br /&gt;
&lt;br /&gt;
:Hi Helen will have to answer the Import/Export question.  I jumped in and added &amp;lt;nowiki&amp;gt;[[Category:FAQ]]&amp;lt;/nowiki&amp;gt; to the bottom of the page, which anyone can do. And took your hint and added a &amp;lt;nowiki&amp;gt;{{stub}}&amp;lt;/nowiki&amp;gt; template at the top.  Thanks for the XML work. Best --[[User:chris collman|chris collman]] 14:16, 3 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
::Hi Frank, thanks for your offer - an [[Import and export FAQ]] page would be great, thanks! --[[User:Helen Foster|Helen Foster]] 04:12, 4 December 2008 (CST)&lt;br /&gt;
:::Thanks to both of you! Helen, how did you get that nice Contents menu on your Import and export FAQ page? I couldn&#039;t figure that out from the source. --[[User:Frank Ralf|Frank Ralf]] 05:30, 4 December 2008 (CST) Problem solved, just found the documentation ;-) --[[User:Frank Ralf|Frank Ralf]] 05:43, 4 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
== Suggestion that is probably total overkill ==&lt;br /&gt;
&amp;lt;onlyinclude&amp;gt;&lt;br /&gt;
# Create a new FAQ namespace.&lt;br /&gt;
# In this namespace, create one page for each frequent question, where the contents of the page is the answer.&lt;br /&gt;
# Use our new knowledge of transclusions to build the FAQ lists by just pulling in pages from the FAQ namespace.&lt;br /&gt;
&lt;br /&gt;
The benefits of doing this are&lt;br /&gt;
* The same FAQ can appear in more than one list without copying-and-pasting.&lt;br /&gt;
* Each question gets a unique URL that so in the forums, we can point people to a page that just answers their specific question.&lt;br /&gt;
&lt;br /&gt;
Disadvantages&lt;br /&gt;
* Editing FAQ lists becomes incomprehensible to anyone who is not a MediaWiki geek.&lt;br /&gt;
&lt;br /&gt;
If we went this way, I would like to use B to build a new FAQ page: &amp;quot;Troubleshooting FAQ&amp;quot;. Might be a good idea anyway.&lt;br /&gt;
&amp;lt;/onlyinclude&amp;gt;&lt;br /&gt;
I hasten to say that I am not recommending this approach. The disadvantages could easily outweigh the advantages. I am simply pointing out a technical possibility that may be worth considering either now, or in the future.&amp;lt;onlyinclude&amp;gt;--[[User:Tim Hunt|Tim Hunt]] 07:11, 4 December 2008 (CST)&amp;lt;/onlyinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Just added [[MoodleDocs:Transclusion]].  Good thing I had my first cup of coffee, Tim&#039;s thoughtful post got me rubbing the sleep out of my eyes.  I wonder if I can get the partial transclusion of this section to work in Sandbox then in [[MoodleDocs_talk:Transclusion]]. Definitely a tool to be used with care. But Wowie Zowie ! --[[User:chris collman|chris collman]] 06:49, 5 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
:: Hello Tim, I think your suggested solution would indeed be overkill and would make maintaining FAQ too difficult. I see FAQ as an intermediary step between the unorganised kind of &amp;quot;documentation&amp;quot; which is provided in the forums towards &amp;quot;real&amp;quot; documentation. Therefore the ease of editing is crucial in my opinion. What about using Moodle&#039;s &#039;&#039;&#039;autolinking mechanism&#039;&#039;&#039; to automatically link to FAQ pages, e.g. if there is a mention of grades in the forums that would create an automatic link to Grades FAQ. I am quite new to Moodle, but couldn&#039;t that be done with setting up a kind of FAQ Glossary? --[[User:Frank Ralf|Frank Ralf]] 02:44, 16 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
::: Hi Tim, thanks for your suggestion, though I think it&#039;s overkill too!  The current FAQ pages have nice short titles which are easy to find and to include in forum posts. Having a page for each FAQ would result in really long URLs. Also, I think that when we point people to an FAQ page, and they have to look through it to find the answer to their question, they may well find answers to other questions they have. As other people have suggested, I think FAQ pages work well as start pages with links to lots of other pages i.e. they&#039;re kept fairly short, for example [[Contributed code FAQ]]. --[[User:Helen Foster|Helen Foster]] 04:49, 18 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
::: Frank, regarding autolinking to FAQ pages, have you come across the Moodle Docs filter on moodle.org? Please see the [[Moodle.org FAQ]] for more details. --[[User:Helen Foster|Helen Foster]] 04:49, 18 December 2008 (CST)&lt;br /&gt;
::::Helen, thanks for the hint. But isn&#039;t that the usual &#039;&#039;manual&#039;&#039; way of wiki linking? But on second thought that might really be the best way of linking to FAQ pages as it keeps getting the forums cluttered with too many (automatic) links. In fact, it just might be a matter of good practice to put advice of lasting value from the forums into a more structured form of documentation and nothing which could or should be done in an automatic and technical way... --[[User:Frank Ralf|Frank Ralf]] 05:11, 19 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
== Security Notification registration ==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
&lt;br /&gt;
It was suggested to me through the #moodle channel on freenode that I raise this concern with you.&lt;br /&gt;
&lt;br /&gt;
I&#039;m developing a moodle installation behind a firewall on a non-public URL and am interested in subscribing to security updates (prompted to check this after seeing a moodle vulnerability mentioned on Bugtraq). I had previously attempted to subscribe by registering our installation through the admin pages, however that registration was rejected as the site was located behind a firewall and not accessible.&lt;br /&gt;
&lt;br /&gt;
Due to that rejection, I wasn&#039;t subscribed to security updates.&lt;br /&gt;
&lt;br /&gt;
I now find myself in the unfortunate position where I cannot subscribe to security updates without having a public facing site (which I can&#039;t reasonably know is secure as I&#039;m not receiving security updates through your mailing list).&lt;br /&gt;
&lt;br /&gt;
The burden for those of us who have an internal site they&#039;re developing (or perhaps is in production) is that we must now create a public facing site to register for the sole purpose of receiving security updates. If the thought is that only parties interested in maintaining a moodle site should have access to those messages, perhaps a different measure could be put into place (a code that appears once moodle is installed, for example).&lt;br /&gt;
&lt;br /&gt;
I&#039;ve tried subscribing through sympa@lists.moodle.org, however that method does not work either.&lt;br /&gt;
&lt;br /&gt;
Could you please provide a process for folks like me to get on the security updates list without having to install moodle on a public web server first?&lt;br /&gt;
&lt;br /&gt;
Thanks!&lt;br /&gt;
&lt;br /&gt;
- P.&lt;br /&gt;
&lt;br /&gt;
:Hi Paul, how about subscribing to the [http://moodle.org/mod/forum/view.php?f=996 security announcements forum], where all important security issues are published. --[[User:Helen Foster|Helen Foster]] 04:34, 18 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
== Unseen (not hidden) activities==&lt;br /&gt;
Hi Helen (This is partly my attempt at practising here by the way!) I&#039;ve posted several times recently about the concept of &#039;unseen&#039; topics with resources that can be linked to on the course page where hidden ones wouldn&#039;t work. is there documentation about that somewhere here ? If so, where? Then I can point Moodlers to it next time.If not, shall I write it? Thanks - [[User: Mary Cooch|Mary Cooch]]&lt;br /&gt;
&lt;br /&gt;
:Hi Mary, I&#039;ve just had a quick look and can&#039;t find any documentation about unseen topics, so it would be helpful if you could write some, perhaps here: [[Course homepage]]. Thanks in advance :-) --[[User:Helen Foster|Helen Foster]] 17:20, 19 December 2008 (CST)&lt;br /&gt;
:Helen - please can you check what I have done as you know I&#039;m still a novice and don&#039;t want to put the wrong thing in the wrong place! Also, if you look on my usertalk Chris Colman said it might be useful on the html linking page? [[User: Mary Cooch|Mary Cooch]]&lt;br /&gt;
&lt;br /&gt;
== Downloading Moodle Core ==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
I came across Moodle just this morning, and read a little about its design, and loved it, it is perfect for the project Im starting.&lt;br /&gt;
&lt;br /&gt;
Ive gone to the download page, to download the Moodle core zip package, but when I click on the link to download I get the following message;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;A server error that affects your login session was detected. Please login again or restart your browser.&#039;&lt;br /&gt;
&lt;br /&gt;
( Continue )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I had a look around the FAQ pages, to see if there was anything on there, but it only mentions about people who already have moodle and are having this difficulty,&lt;br /&gt;
&lt;br /&gt;
Please could you send me an alternative link, &lt;br /&gt;
&lt;br /&gt;
Kind Regards&lt;br /&gt;
Andrew&lt;br /&gt;
:Hi Andrew, I left a comment on your [[User_talk:Andrew_Abel|user comment page]], just in case you were in a hurry to play with Moodle. --[[User:chris collman|chris collman]] 07:40, 1 January 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
::Hi Andrew, I hope you&#039;ve been successful in downloading Moodle by now. Chris, thanks for your helpful comments :-) --[[User:Helen Foster|Helen Foster]] 01:21, 2 January 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
== &amp;quot;experimental:&amp;quot; prefix ==&lt;br /&gt;
&lt;br /&gt;
[[User:Marc Grober|Marc Grober]] 12:00, 12 January 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
We started using experimental: as a prefix because there was some confusion about the use of Development: as a prefix.....&lt;br /&gt;
&lt;br /&gt;
In the Moodle docs, Development: appears to cover Moodle developer documentation, not docs under development,  so we wanted to use a prefix that connote that the docs were, as we suggest, &amp;quot;experimental&amp;quot; (i.e. not ready for prime time).   I had not come across [[Experimental|Experimental]] as the search is a bit temperamental and searching for the root, experiment, produced no result.....&lt;br /&gt;
&lt;br /&gt;
Perhaps we need a different topic name?&lt;br /&gt;
&lt;br /&gt;
I have encouraged AT to ask you to move these pages out of the experimental: topic but I think she feels they are not quite ready and I want to respect hre wishes on this.&lt;br /&gt;
&lt;br /&gt;
We also have some experimental pages under development with respect to gradebook &amp;quot;cases&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
I would encourage you to discuss the progress on all these pages with AT.&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
:Marc, thanks for your comments. The use of experimental: as a prefix is fine by me. Alternatively you could use a [[MoodleDocs:Templates|Moodle Docs template]] to add a message saying that the page is experimental. --[[User:Helen Foster|Helen Foster]] 02:41, 13 January 2009 (CST)&lt;br /&gt;
::Marc and Helen, something new to me.  I found 7 pages when I searched on &amp;quot;experimental:&amp;quot; and found 7 Article title matches.  6 started with &amp;quot;experimental:&amp;quot; and of course &amp;quot;Experimental&amp;quot;. Wondering if an alternative draft to Main Page should be done that way with the Experimental template.  :)--[[User:chris collman|chris collman]] 06:00, 13 January 2009 (CST)&lt;br /&gt;
:::Helen, thanks for moving some of the experimental: pages.  The page here, however, has yet to be moved: [https://docs.moodle.org/en/experimental:Getting_Help_Installing_and_Managing_Moodle]. Vis-a-vis topics/categories, I think it makes sense to have a category that is not searched by default so that users do not find materials that is not ready for prime time.  By the same token,  I think, as I mentioned above,  that Development: is problematic because it confuses as far as whether it is a topic for Developers or addresses material under development, which are really two different areas.  Likewise, as long as there is an Experimental page the use of experimental: could cause confusion.    I would argue for three distinct categories.... [[User:Marc Grober|Marc Grober]] 12:16, 24 January 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
::As I understood your (Helen&#039;s) comment (posted I don&#039;t recall where) you (Helen) were I think suggesting that what I was really suggesting was a new name space such that folks could develop documents that were not included in a default search.....  which I think is exactly what I was looking for....  So the question becomes can and should we do such a thing..... --[[User:Marc Grober|Marc Grober]] 23:44, 9 March 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::Marc, I guess you&#039;re referring to my forum post [http://moodle.org/mod/forum/discuss.php?d=115736#p509590 Re: Not including pages in the Moodle Docs search]. How about using a Moodle Docs template for now to indicate docs under development and add them to an appropriate category, then when there are sufficient pages to warrant it, we can create a new namespace and move all the pages into it. --[[User:Helen Foster|Helen Foster]] 11:46, 10 March 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
==Talk:Helen&#039;s page is over 32k==&lt;br /&gt;
FYI: I got that warning.  Maybe a subpage for the older stuff and a link, so we don&#039;t loose some stuff. Of course alternatively, if I deleted all my comments/questions, that would shorted it a lot :)  --[[User:chris collman|chris collman]] 06:04, 13 January 2009 (CST)&lt;br /&gt;
::Seriously, I would be happy to edit my posts here down to a nub or nothingness.  I think some of the language requests for help could be put in one heading and shortened, without losing anything.    --[[User:chris collman|chris collman]] 06:13, 13 January 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
:Chris, thanks for creating [[User talk:Helen Foster/1]]. I think it&#039;s a good solution :-) --[[User:Helen Foster|Helen Foster]] 02:51, 14 January 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*[[User talk:Helen Foster/1]] for older comments&lt;br /&gt;
&lt;br /&gt;
== Registered Users Bug with Mediawiki ==&lt;br /&gt;
&lt;br /&gt;
Hi, [[User_talk:David_Scotson#Moodle_Docs_stats|Way back in 2006 you mentioned]] a work-around for a bug resulting in registered users stats on [[Special:Statistics]] not updating properly. I think I am encountering this same bug on my internal wiki now. I know that was a long time ago, but do you remember what you did to fix it/what the work-around mentioned was?&lt;br /&gt;
Thanks,&lt;br /&gt;
--[[User:Adrian Archer|Adrian Archer]] 11:02, 4 March 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
:Hi Adrian, here are Eloy&#039;s workarounds (easy to do with phpMyAdmin):&lt;br /&gt;
&lt;br /&gt;
:# To refresh the count of pages, if it&#039;s not working: table: site_stats, field: ss_total_pages, setting it to -1 should force recalculation of pages&lt;br /&gt;
:# To refresh the count of registered users, delete the contents of the &amp;quot;cached statistics&amp;quot; table&lt;br /&gt;
&lt;br /&gt;
:Thanks to Eloy for recalling them :-) I hope you are able to upgrade to a newer MediaWiki version soon. --[[User:Helen Foster|Helen Foster]] 09:01, 5 March 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
::Thanks so much for the quick response, that sounds like it should work. I&#039;m actually using Version 1.13.3, so I guess the bug still exists. --[[User:Adrian Archer|Adrian Archer]] 09:17, 5 March 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
:::Hmm, Moodle Docs is actually using version 1.11.2, though we&#039;re hoping to upgrade very soon (MDLSITE-657). --[[User:Helen Foster|Helen Foster]] 09:35, 5 March 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
== Function if in grade calculations? ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hi Helen&lt;br /&gt;
&lt;br /&gt;
Thanks for your jobs.&lt;br /&gt;
&lt;br /&gt;
Sorry for my lousy english.&lt;br /&gt;
&lt;br /&gt;
I am trying to use the &amp;quot;if&amp;quot; function in &amp;quot;Grade calculations&amp;quot; in a similar way as is done in &amp;quot;opencalc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
do you know if this is possible?&lt;br /&gt;
&lt;br /&gt;
How to introduce a note of recovery, only for a few students, without changing the original calification?&lt;br /&gt;
&lt;br /&gt;
My email is trujillo@unex.es&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;br /&gt;
&lt;br /&gt;
== Using Moodle for Teachers ==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
&lt;br /&gt;
I teach math at Woodland Middle School  in Woodland, WA. I&#039;m also just beginning work with the Ubuntu Learning Project (name?). Is your book (Using Moodle - Teaching with the Popular Open Source Course Management System) available for download on Moodle Docs free to teachers? If so, is there some type of creative commons license? Or should we just link to Moodle Docs? I found your book extremely useful when I taught a 3-day Moodle Bootcamp to teachers this summer.&lt;br /&gt;
&lt;br /&gt;
Thanks, Mark Knudson&lt;br /&gt;
&lt;br /&gt;
:Hi Mark, glad to hear you found my book useful :-) It&#039;s available for download under the Creative Commons Attribution-Noncommercial-Share Alike licence here: [[Using Moodle book]]. --[[User:Helen Foster|Helen Foster]] 19:11, 21 September 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== PHP Settings by Moodle version ==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
&lt;br /&gt;
I&#039;m new to this community (and to Moodle) and am not sure how I should request an update to the documentation relating to a Moodle PHP extension requirement - specifically zlib.&lt;br /&gt;
I noticed that this page:&lt;br /&gt;
https://docs.moodle.org/no/Installering_av_Moodle has a section stating that &amp;quot;The zlib extension is required for zip/unzip functionality.&amp;quot; under the PHP Extensions and Libraries, but it doesn&#039;t exist here:&lt;br /&gt;
https://docs.moodle.org/en/PHP_settings_by_Moodle_version&lt;br /&gt;
&lt;br /&gt;
The PHP_settings_by_Moodle_version is a Stub and is waiting for review - I was thinking about updating it with the text from the https://docs.moodle.org/no/Installering_av_Moodle page.&lt;br /&gt;
&lt;br /&gt;
Looking for a little direction.&lt;br /&gt;
&lt;br /&gt;
Thanks!&lt;br /&gt;
Andy&lt;br /&gt;
&lt;br /&gt;
:Hi Andy,&lt;br /&gt;
&lt;br /&gt;
:Thanks for your kind offer to update the documentation [[PHP settings by Moodle version]]. Please feel free to go ahead and do so :-) (I asked in our developer chat and was informed that zlib is required for versions of Moodle up to 1.9 and Moodle 2.0 onwards will come with native PHP zip support so it needs the &amp;quot;zip&amp;quot; extension instead.)&lt;br /&gt;
&lt;br /&gt;
:For future reference, you&#039;re always welcome to edit pages in Moodle Docs and help improve our documentation. If you&#039;re not quite sure of something, you can leave a note in the page comments. Thanks again! --[[User:Helen Foster|Helen Foster]] 11:45, 20 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Query re Cool Course Competition ==&lt;br /&gt;
Two questions re the Cool Course Competition:&lt;br /&gt;
1) How can teachers know whether the modules and blocks they use are core or not? Is there a list somewhere?(2) Why are some entries in their own native theme, while most entries are using the competition site&#039;s theme? How can I upload my course so that it retains its own theme? Thanks, [[User:Thomas Brown|Thomas Brown]] 00:16, 16 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Hi Thomas, an easy way to check which modules and blocks are core i.e. included in the standard Moodle packages is to login to the [http://demo.moodle.net/ Moodle Demonstration Site] as an admin and check &#039;&#039;Administration &amp;gt; Modules &amp;gt; Activities &amp;gt; Manage activities&#039;&#039; and &#039;&#039;Administration &amp;gt; Modules &amp;gt; Blocks &amp;gt; Manage blocks&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
:Regarding the course theme, if you force a theme in the course settings, it will be used, otherwise the site theme will be used. --[[User:Helen Foster|Helen Foster]] 11:22, 16 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
::Do you mean the &amp;quot;Settings&amp;quot; page in the course&#039;s Admin block? My Settings page doesn&#039;t have any theme-related options. Did I look in the wrong place? tnx, [[User:Thomas Brown|Thomas Brown]] 23:55, 16 January 2010 (UTC)&lt;br /&gt;
:::It appears that the site admin can make a setting that allows teachers to force a theme -- so I can do that now. Which raises another question: Does my theme have to be installed on the Cool Course site for it to work there, or can my backup import the theme features and bring them along into the Cool Course site? tnx again, [[User:Thomas Brown|Thomas Brown]] 03:58, 18 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
::::Apologies for not mentioning that course themes need to be enabled by an admin in [[Theme settings]]; glad you figured things out! Yes, your theme needs to be installed on the competition site for it to work, as a course backup does not include theme features. All themes included in standard Moodle packages are available on the competition site. --[[User:Helen Foster|Helen Foster]] 09:32, 18 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I think I have a bigger problem now that my course is on the competition web site. None of the links to course resources work! I must have royally messed up my backup somehow. I included the resources in the backup, but...[[User:Thomas Brown|Thomas Brown]] 21:08, 18 January 2010 (UTC)&lt;br /&gt;
::Testing out the restore of my competition entry on my own site, I find that the html links that I&#039;ve put in the Topic Outline labels go to random id numbers, and so don&#039;t open the resources they&#039;re supposed to and give me a page not found browser error instead. However, if I simply click on edit for one of the labels, and then save it without changing anything, now suddenly all of the links are in working order. So, is it possible for me or someone else to do this fix on my competition entry, so that it starts working? While we&#039;re in there fixing it, can we change it to custom corners? Thanks yet again...[[User:Thomas Brown|Thomas Brown]] 21:48, 18 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::No worries, it&#039;s a good test for the course backup and restore process! I&#039;ve reported the problem you describe in the tracker - MDL-21380. --[[User:Helen Foster|Helen Foster]] 15:02, 19 January 2010 (UTC)&lt;br /&gt;
===Curious, why here?===&lt;br /&gt;
Firstly, thanks for the post here which drew my attention to coolcourses.moodle.org.  Really Cool and Neato.   Secondly, shouldn&#039;t most of this discussion be in the [http://coolcourses.moodle.org/mod/forum/view.php?id=3073 &amp;quot;Competition Lounge&amp;quot;]?   Thirdly, there were some special effects I am dying to know &amp;quot;how they do that?&amp;quot; and I just looked at each course in the first topic! Fourthly, thanks to all who contributed. --[[User:chris collman|chris collman]] 13:00, 21 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Hi Chris, just wondering why you never noticed the [http://moodle.org/mod/forum/discuss.php?d=135429 Cool Course Competition moodle.org news item]? Regarding the [http://coolcourses.moodle.org/mod/forum/view.php?id=3073 Competition lounge], the fact that it was only created a few hours ago probably explains why nobody has posted there yet. How about posting your &amp;quot;how they do that?&amp;quot; question and thanks there. --[[User:Helen Foster|Helen Foster]] 15:12, 21 January 2010 (UTC)&lt;br /&gt;
::I am just a stick in the mud sometimes.  I will take you up on your excellent suggestion. --[[User:chris collman|chris collman]] 16:46, 22 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==nln materials query ==&lt;br /&gt;
&lt;br /&gt;
Dear Helen,&lt;br /&gt;
Sorry to contact you this way - I have been recommended to you by several of your former colleagues on the ILT Champs list. I am conducting a research thesis at the University of Nottingham into the uptake and use of the nln materials amongst the FE sector, and have been advised that you would have an interesting view on this programme. If you could spare me a few minutes of your time to have a discussion, then please could you drop me an email at ttxla4@nottingham.ac.uk? Thank you very much. Rob Enbgelbright says &amp;quot;hello&amp;quot; btw. Many thanks, Laurel Armstrong&lt;br /&gt;
&lt;br /&gt;
:Hi Laurel, I&#039;ve just emailed you :-) --[[User:Helen Foster|Helen Foster]] 13:46, 1 February 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
==Jmol filter==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
&lt;br /&gt;
I noticed that you had updated the Jmol filter and wonder if you could tell me the status of this filter, and also the Jmol resource type and the Java Molecule Editor (for allowing students to add chemical structures as answers in quizzes).&lt;br /&gt;
Do they work in 1.9 and 2.0?&lt;br /&gt;
&lt;br /&gt;
On a similar note, there doesn&#039;t seem to be a direct way for students to put subscripts and superscripts into answers. I have resorted to adding a table of useful chemical symbols in the question, which students can copy and paste. Is there a setting somewhere that allows students to add formatted text?&lt;br /&gt;
&lt;br /&gt;
:Hi Mike, please see the comments on the [http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=87 Jmol resource type] for the latest information on it. You may also wish to contact Geoffrey Rowland.&lt;br /&gt;
&lt;br /&gt;
:Regarding adding chemical symbols, you may find the discussions listed in [[Chemistry/Biochemistry]] helpful. --[[User:Helen Foster|Helen Foster]] 14:58, 7 June 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== permission to edit brazilian portuguese version of docs.moodle.org ==&lt;br /&gt;
&lt;br /&gt;
Hello, Helen&lt;br /&gt;
&lt;br /&gt;
don&#039;t really know if you are the right person to ask, but, could you give me permission to edit brazilian portuguese version of docs.moodle.org ?&lt;br /&gt;
I help maintain the language pack along with Gilvan Marques, as you can see at http://cvs.moodle.org/lang/pt_br_utf8/?sortby=date#dirlist .&lt;br /&gt;
The last update of the home page was in august 2007, and also mention 1.8 as the current stable and focus of translators. I would like to make it a translated copy of the current english home page and also translate the release notes of 2.0 as first step...&lt;/div&gt;</summary>
		<author><name>Danielneis</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=User_talk:Helen_Foster&amp;diff=23200</id>
		<title>User talk:Helen Foster</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=User_talk:Helen_Foster&amp;diff=23200"/>
		<updated>2010-07-25T05:12:32Z</updated>

		<summary type="html">&lt;p&gt;Danielneis: /* permission to edit brazilian portuguese version of docs.moodle.org */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==deleting extra images==&lt;br /&gt;
Hi Helen - I am very shy at adding to the docs! ;)&lt;br /&gt;
I put some stuff on about conditional activities but I uploaded images which weren&#039;t clear so I changed them and now I don&#039;t know how to delete the first few which are no longer used on the page - could you delete the earlier, unused uploads please so they don&#039;t take up space and clutter the place up? (I couldn&#039;t find a &amp;quot;delete&amp;quot; instruction so I presume we can&#039;t) thanks - Mary [[User:Mary Cooch|Mary Cooch]]&lt;br /&gt;
: Hi Mary, if you upload a new version of the file with the same name it will replace the old one. At least I can&#039;t find any duplicates on your images&#039; pages ;-) And your files are all only some KB so they won&#039;t take up much disk space anyway. --[[User:Frank Ralf|Frank Ralf]] 10:19, 6 March 2010 (UTC)&lt;br /&gt;
:: Mary, many thanks for your contribution to [[Conditional activities]] :-) Frank is right in saying that new versions of images simply replace old ones, so there is no need for any deletion. If you upload an image then decide you don&#039;t want to use it at all, you can just type &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{Deletion}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; at the top of the page (as explained in [[MoodleDocs:Templates]]) then an admin will come along and delete it. --[[User:Helen Foster|Helen Foster]] 12:33, 8 March 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Deleting some attached files in JIRA ==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
&lt;br /&gt;
I made a bit of a mess at [http://tracker.moodle.org/browse/MDL-21110 http://tracker.moodle.org/browse/MDL-21110]. Would it be possible to delete all the attached files there so Penny or I can upload the current one and let Jira handle the versioning more sanely?&lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;br /&gt;
Matt&lt;br /&gt;
&lt;br /&gt;
:Done! --[[User:Helen Foster|Helen Foster]] 08:33, 5 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Creating new FAQ pages ==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
&lt;br /&gt;
I have successfully created a stub for a XML FAQ page (https://docs.moodle.org/en/XML_FAQ) but how do I get it promoted on https://docs.moodle.org/en/Category:FAQ ?&lt;br /&gt;
&lt;br /&gt;
I also would like to create an Import/Export FAQ for collecting all the information regarding Moodle import and export which is scattered in different forums.&lt;br /&gt;
&lt;br /&gt;
Regards,&lt;br /&gt;
[[User:Frank Ralf|Frank Ralf]]&lt;br /&gt;
&lt;br /&gt;
:Hi Helen will have to answer the Import/Export question.  I jumped in and added &amp;lt;nowiki&amp;gt;[[Category:FAQ]]&amp;lt;/nowiki&amp;gt; to the bottom of the page, which anyone can do. And took your hint and added a &amp;lt;nowiki&amp;gt;{{stub}}&amp;lt;/nowiki&amp;gt; template at the top.  Thanks for the XML work. Best --[[User:chris collman|chris collman]] 14:16, 3 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
::Hi Frank, thanks for your offer - an [[Import and export FAQ]] page would be great, thanks! --[[User:Helen Foster|Helen Foster]] 04:12, 4 December 2008 (CST)&lt;br /&gt;
:::Thanks to both of you! Helen, how did you get that nice Contents menu on your Import and export FAQ page? I couldn&#039;t figure that out from the source. --[[User:Frank Ralf|Frank Ralf]] 05:30, 4 December 2008 (CST) Problem solved, just found the documentation ;-) --[[User:Frank Ralf|Frank Ralf]] 05:43, 4 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
== Suggestion that is probably total overkill ==&lt;br /&gt;
&amp;lt;onlyinclude&amp;gt;&lt;br /&gt;
# Create a new FAQ namespace.&lt;br /&gt;
# In this namespace, create one page for each frequent question, where the contents of the page is the answer.&lt;br /&gt;
# Use our new knowledge of transclusions to build the FAQ lists by just pulling in pages from the FAQ namespace.&lt;br /&gt;
&lt;br /&gt;
The benefits of doing this are&lt;br /&gt;
* The same FAQ can appear in more than one list without copying-and-pasting.&lt;br /&gt;
* Each question gets a unique URL that so in the forums, we can point people to a page that just answers their specific question.&lt;br /&gt;
&lt;br /&gt;
Disadvantages&lt;br /&gt;
* Editing FAQ lists becomes incomprehensible to anyone who is not a MediaWiki geek.&lt;br /&gt;
&lt;br /&gt;
If we went this way, I would like to use B to build a new FAQ page: &amp;quot;Troubleshooting FAQ&amp;quot;. Might be a good idea anyway.&lt;br /&gt;
&amp;lt;/onlyinclude&amp;gt;&lt;br /&gt;
I hasten to say that I am not recommending this approach. The disadvantages could easily outweigh the advantages. I am simply pointing out a technical possibility that may be worth considering either now, or in the future.&amp;lt;onlyinclude&amp;gt;--[[User:Tim Hunt|Tim Hunt]] 07:11, 4 December 2008 (CST)&amp;lt;/onlyinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Just added [[MoodleDocs:Transclusion]].  Good thing I had my first cup of coffee, Tim&#039;s thoughtful post got me rubbing the sleep out of my eyes.  I wonder if I can get the partial transclusion of this section to work in Sandbox then in [[MoodleDocs_talk:Transclusion]]. Definitely a tool to be used with care. But Wowie Zowie ! --[[User:chris collman|chris collman]] 06:49, 5 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
:: Hello Tim, I think your suggested solution would indeed be overkill and would make maintaining FAQ too difficult. I see FAQ as an intermediary step between the unorganised kind of &amp;quot;documentation&amp;quot; which is provided in the forums towards &amp;quot;real&amp;quot; documentation. Therefore the ease of editing is crucial in my opinion. What about using Moodle&#039;s &#039;&#039;&#039;autolinking mechanism&#039;&#039;&#039; to automatically link to FAQ pages, e.g. if there is a mention of grades in the forums that would create an automatic link to Grades FAQ. I am quite new to Moodle, but couldn&#039;t that be done with setting up a kind of FAQ Glossary? --[[User:Frank Ralf|Frank Ralf]] 02:44, 16 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
::: Hi Tim, thanks for your suggestion, though I think it&#039;s overkill too!  The current FAQ pages have nice short titles which are easy to find and to include in forum posts. Having a page for each FAQ would result in really long URLs. Also, I think that when we point people to an FAQ page, and they have to look through it to find the answer to their question, they may well find answers to other questions they have. As other people have suggested, I think FAQ pages work well as start pages with links to lots of other pages i.e. they&#039;re kept fairly short, for example [[Contributed code FAQ]]. --[[User:Helen Foster|Helen Foster]] 04:49, 18 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
::: Frank, regarding autolinking to FAQ pages, have you come across the Moodle Docs filter on moodle.org? Please see the [[Moodle.org FAQ]] for more details. --[[User:Helen Foster|Helen Foster]] 04:49, 18 December 2008 (CST)&lt;br /&gt;
::::Helen, thanks for the hint. But isn&#039;t that the usual &#039;&#039;manual&#039;&#039; way of wiki linking? But on second thought that might really be the best way of linking to FAQ pages as it keeps getting the forums cluttered with too many (automatic) links. In fact, it just might be a matter of good practice to put advice of lasting value from the forums into a more structured form of documentation and nothing which could or should be done in an automatic and technical way... --[[User:Frank Ralf|Frank Ralf]] 05:11, 19 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
== Security Notification registration ==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
&lt;br /&gt;
It was suggested to me through the #moodle channel on freenode that I raise this concern with you.&lt;br /&gt;
&lt;br /&gt;
I&#039;m developing a moodle installation behind a firewall on a non-public URL and am interested in subscribing to security updates (prompted to check this after seeing a moodle vulnerability mentioned on Bugtraq). I had previously attempted to subscribe by registering our installation through the admin pages, however that registration was rejected as the site was located behind a firewall and not accessible.&lt;br /&gt;
&lt;br /&gt;
Due to that rejection, I wasn&#039;t subscribed to security updates.&lt;br /&gt;
&lt;br /&gt;
I now find myself in the unfortunate position where I cannot subscribe to security updates without having a public facing site (which I can&#039;t reasonably know is secure as I&#039;m not receiving security updates through your mailing list).&lt;br /&gt;
&lt;br /&gt;
The burden for those of us who have an internal site they&#039;re developing (or perhaps is in production) is that we must now create a public facing site to register for the sole purpose of receiving security updates. If the thought is that only parties interested in maintaining a moodle site should have access to those messages, perhaps a different measure could be put into place (a code that appears once moodle is installed, for example).&lt;br /&gt;
&lt;br /&gt;
I&#039;ve tried subscribing through sympa@lists.moodle.org, however that method does not work either.&lt;br /&gt;
&lt;br /&gt;
Could you please provide a process for folks like me to get on the security updates list without having to install moodle on a public web server first?&lt;br /&gt;
&lt;br /&gt;
Thanks!&lt;br /&gt;
&lt;br /&gt;
- P.&lt;br /&gt;
&lt;br /&gt;
:Hi Paul, how about subscribing to the [http://moodle.org/mod/forum/view.php?f=996 security announcements forum], where all important security issues are published. --[[User:Helen Foster|Helen Foster]] 04:34, 18 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
== Unseen (not hidden) activities==&lt;br /&gt;
Hi Helen (This is partly my attempt at practising here by the way!) I&#039;ve posted several times recently about the concept of &#039;unseen&#039; topics with resources that can be linked to on the course page where hidden ones wouldn&#039;t work. is there documentation about that somewhere here ? If so, where? Then I can point Moodlers to it next time.If not, shall I write it? Thanks - [[User: Mary Cooch|Mary Cooch]]&lt;br /&gt;
&lt;br /&gt;
:Hi Mary, I&#039;ve just had a quick look and can&#039;t find any documentation about unseen topics, so it would be helpful if you could write some, perhaps here: [[Course homepage]]. Thanks in advance :-) --[[User:Helen Foster|Helen Foster]] 17:20, 19 December 2008 (CST)&lt;br /&gt;
:Helen - please can you check what I have done as you know I&#039;m still a novice and don&#039;t want to put the wrong thing in the wrong place! Also, if you look on my usertalk Chris Colman said it might be useful on the html linking page? [[User: Mary Cooch|Mary Cooch]]&lt;br /&gt;
&lt;br /&gt;
== Downloading Moodle Core ==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
I came across Moodle just this morning, and read a little about its design, and loved it, it is perfect for the project Im starting.&lt;br /&gt;
&lt;br /&gt;
Ive gone to the download page, to download the Moodle core zip package, but when I click on the link to download I get the following message;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;A server error that affects your login session was detected. Please login again or restart your browser.&#039;&lt;br /&gt;
&lt;br /&gt;
( Continue )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I had a look around the FAQ pages, to see if there was anything on there, but it only mentions about people who already have moodle and are having this difficulty,&lt;br /&gt;
&lt;br /&gt;
Please could you send me an alternative link, &lt;br /&gt;
&lt;br /&gt;
Kind Regards&lt;br /&gt;
Andrew&lt;br /&gt;
:Hi Andrew, I left a comment on your [[User_talk:Andrew_Abel|user comment page]], just in case you were in a hurry to play with Moodle. --[[User:chris collman|chris collman]] 07:40, 1 January 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
::Hi Andrew, I hope you&#039;ve been successful in downloading Moodle by now. Chris, thanks for your helpful comments :-) --[[User:Helen Foster|Helen Foster]] 01:21, 2 January 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
== &amp;quot;experimental:&amp;quot; prefix ==&lt;br /&gt;
&lt;br /&gt;
[[User:Marc Grober|Marc Grober]] 12:00, 12 January 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
We started using experimental: as a prefix because there was some confusion about the use of Development: as a prefix.....&lt;br /&gt;
&lt;br /&gt;
In the Moodle docs, Development: appears to cover Moodle developer documentation, not docs under development,  so we wanted to use a prefix that connote that the docs were, as we suggest, &amp;quot;experimental&amp;quot; (i.e. not ready for prime time).   I had not come across [[Experimental|Experimental]] as the search is a bit temperamental and searching for the root, experiment, produced no result.....&lt;br /&gt;
&lt;br /&gt;
Perhaps we need a different topic name?&lt;br /&gt;
&lt;br /&gt;
I have encouraged AT to ask you to move these pages out of the experimental: topic but I think she feels they are not quite ready and I want to respect hre wishes on this.&lt;br /&gt;
&lt;br /&gt;
We also have some experimental pages under development with respect to gradebook &amp;quot;cases&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
I would encourage you to discuss the progress on all these pages with AT.&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
:Marc, thanks for your comments. The use of experimental: as a prefix is fine by me. Alternatively you could use a [[MoodleDocs:Templates|Moodle Docs template]] to add a message saying that the page is experimental. --[[User:Helen Foster|Helen Foster]] 02:41, 13 January 2009 (CST)&lt;br /&gt;
::Marc and Helen, something new to me.  I found 7 pages when I searched on &amp;quot;experimental:&amp;quot; and found 7 Article title matches.  6 started with &amp;quot;experimental:&amp;quot; and of course &amp;quot;Experimental&amp;quot;. Wondering if an alternative draft to Main Page should be done that way with the Experimental template.  :)--[[User:chris collman|chris collman]] 06:00, 13 January 2009 (CST)&lt;br /&gt;
:::Helen, thanks for moving some of the experimental: pages.  The page here, however, has yet to be moved: [https://docs.moodle.org/en/experimental:Getting_Help_Installing_and_Managing_Moodle]. Vis-a-vis topics/categories, I think it makes sense to have a category that is not searched by default so that users do not find materials that is not ready for prime time.  By the same token,  I think, as I mentioned above,  that Development: is problematic because it confuses as far as whether it is a topic for Developers or addresses material under development, which are really two different areas.  Likewise, as long as there is an Experimental page the use of experimental: could cause confusion.    I would argue for three distinct categories.... [[User:Marc Grober|Marc Grober]] 12:16, 24 January 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
::As I understood your (Helen&#039;s) comment (posted I don&#039;t recall where) you (Helen) were I think suggesting that what I was really suggesting was a new name space such that folks could develop documents that were not included in a default search.....  which I think is exactly what I was looking for....  So the question becomes can and should we do such a thing..... --[[User:Marc Grober|Marc Grober]] 23:44, 9 March 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::Marc, I guess you&#039;re referring to my forum post [http://moodle.org/mod/forum/discuss.php?d=115736#p509590 Re: Not including pages in the Moodle Docs search]. How about using a Moodle Docs template for now to indicate docs under development and add them to an appropriate category, then when there are sufficient pages to warrant it, we can create a new namespace and move all the pages into it. --[[User:Helen Foster|Helen Foster]] 11:46, 10 March 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
==Talk:Helen&#039;s page is over 32k==&lt;br /&gt;
FYI: I got that warning.  Maybe a subpage for the older stuff and a link, so we don&#039;t loose some stuff. Of course alternatively, if I deleted all my comments/questions, that would shorted it a lot :)  --[[User:chris collman|chris collman]] 06:04, 13 January 2009 (CST)&lt;br /&gt;
::Seriously, I would be happy to edit my posts here down to a nub or nothingness.  I think some of the language requests for help could be put in one heading and shortened, without losing anything.    --[[User:chris collman|chris collman]] 06:13, 13 January 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
:Chris, thanks for creating [[User talk:Helen Foster/1]]. I think it&#039;s a good solution :-) --[[User:Helen Foster|Helen Foster]] 02:51, 14 January 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*[[User talk:Helen Foster/1]] for older comments&lt;br /&gt;
&lt;br /&gt;
== Registered Users Bug with Mediawiki ==&lt;br /&gt;
&lt;br /&gt;
Hi, [[User_talk:David_Scotson#Moodle_Docs_stats|Way back in 2006 you mentioned]] a work-around for a bug resulting in registered users stats on [[Special:Statistics]] not updating properly. I think I am encountering this same bug on my internal wiki now. I know that was a long time ago, but do you remember what you did to fix it/what the work-around mentioned was?&lt;br /&gt;
Thanks,&lt;br /&gt;
--[[User:Adrian Archer|Adrian Archer]] 11:02, 4 March 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
:Hi Adrian, here are Eloy&#039;s workarounds (easy to do with phpMyAdmin):&lt;br /&gt;
&lt;br /&gt;
:# To refresh the count of pages, if it&#039;s not working: table: site_stats, field: ss_total_pages, setting it to -1 should force recalculation of pages&lt;br /&gt;
:# To refresh the count of registered users, delete the contents of the &amp;quot;cached statistics&amp;quot; table&lt;br /&gt;
&lt;br /&gt;
:Thanks to Eloy for recalling them :-) I hope you are able to upgrade to a newer MediaWiki version soon. --[[User:Helen Foster|Helen Foster]] 09:01, 5 March 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
::Thanks so much for the quick response, that sounds like it should work. I&#039;m actually using Version 1.13.3, so I guess the bug still exists. --[[User:Adrian Archer|Adrian Archer]] 09:17, 5 March 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
:::Hmm, Moodle Docs is actually using version 1.11.2, though we&#039;re hoping to upgrade very soon (MDLSITE-657). --[[User:Helen Foster|Helen Foster]] 09:35, 5 March 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
== Function if in grade calculations? ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hi Helen&lt;br /&gt;
&lt;br /&gt;
Thanks for your jobs.&lt;br /&gt;
&lt;br /&gt;
Sorry for my lousy english.&lt;br /&gt;
&lt;br /&gt;
I am trying to use the &amp;quot;if&amp;quot; function in &amp;quot;Grade calculations&amp;quot; in a similar way as is done in &amp;quot;opencalc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
do you know if this is possible?&lt;br /&gt;
&lt;br /&gt;
How to introduce a note of recovery, only for a few students, without changing the original calification?&lt;br /&gt;
&lt;br /&gt;
My email is trujillo@unex.es&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;br /&gt;
&lt;br /&gt;
== Using Moodle for Teachers ==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
&lt;br /&gt;
I teach math at Woodland Middle School  in Woodland, WA. I&#039;m also just beginning work with the Ubuntu Learning Project (name?). Is your book (Using Moodle - Teaching with the Popular Open Source Course Management System) available for download on Moodle Docs free to teachers? If so, is there some type of creative commons license? Or should we just link to Moodle Docs? I found your book extremely useful when I taught a 3-day Moodle Bootcamp to teachers this summer.&lt;br /&gt;
&lt;br /&gt;
Thanks, Mark Knudson&lt;br /&gt;
&lt;br /&gt;
:Hi Mark, glad to hear you found my book useful :-) It&#039;s available for download under the Creative Commons Attribution-Noncommercial-Share Alike licence here: [[Using Moodle book]]. --[[User:Helen Foster|Helen Foster]] 19:11, 21 September 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== PHP Settings by Moodle version ==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
&lt;br /&gt;
I&#039;m new to this community (and to Moodle) and am not sure how I should request an update to the documentation relating to a Moodle PHP extension requirement - specifically zlib.&lt;br /&gt;
I noticed that this page:&lt;br /&gt;
https://docs.moodle.org/no/Installering_av_Moodle has a section stating that &amp;quot;The zlib extension is required for zip/unzip functionality.&amp;quot; under the PHP Extensions and Libraries, but it doesn&#039;t exist here:&lt;br /&gt;
https://docs.moodle.org/en/PHP_settings_by_Moodle_version&lt;br /&gt;
&lt;br /&gt;
The PHP_settings_by_Moodle_version is a Stub and is waiting for review - I was thinking about updating it with the text from the https://docs.moodle.org/no/Installering_av_Moodle page.&lt;br /&gt;
&lt;br /&gt;
Looking for a little direction.&lt;br /&gt;
&lt;br /&gt;
Thanks!&lt;br /&gt;
Andy&lt;br /&gt;
&lt;br /&gt;
:Hi Andy,&lt;br /&gt;
&lt;br /&gt;
:Thanks for your kind offer to update the documentation [[PHP settings by Moodle version]]. Please feel free to go ahead and do so :-) (I asked in our developer chat and was informed that zlib is required for versions of Moodle up to 1.9 and Moodle 2.0 onwards will come with native PHP zip support so it needs the &amp;quot;zip&amp;quot; extension instead.)&lt;br /&gt;
&lt;br /&gt;
:For future reference, you&#039;re always welcome to edit pages in Moodle Docs and help improve our documentation. If you&#039;re not quite sure of something, you can leave a note in the page comments. Thanks again! --[[User:Helen Foster|Helen Foster]] 11:45, 20 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Query re Cool Course Competition ==&lt;br /&gt;
Two questions re the Cool Course Competition:&lt;br /&gt;
1) How can teachers know whether the modules and blocks they use are core or not? Is there a list somewhere?(2) Why are some entries in their own native theme, while most entries are using the competition site&#039;s theme? How can I upload my course so that it retains its own theme? Thanks, [[User:Thomas Brown|Thomas Brown]] 00:16, 16 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Hi Thomas, an easy way to check which modules and blocks are core i.e. included in the standard Moodle packages is to login to the [http://demo.moodle.net/ Moodle Demonstration Site] as an admin and check &#039;&#039;Administration &amp;gt; Modules &amp;gt; Activities &amp;gt; Manage activities&#039;&#039; and &#039;&#039;Administration &amp;gt; Modules &amp;gt; Blocks &amp;gt; Manage blocks&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
:Regarding the course theme, if you force a theme in the course settings, it will be used, otherwise the site theme will be used. --[[User:Helen Foster|Helen Foster]] 11:22, 16 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
::Do you mean the &amp;quot;Settings&amp;quot; page in the course&#039;s Admin block? My Settings page doesn&#039;t have any theme-related options. Did I look in the wrong place? tnx, [[User:Thomas Brown|Thomas Brown]] 23:55, 16 January 2010 (UTC)&lt;br /&gt;
:::It appears that the site admin can make a setting that allows teachers to force a theme -- so I can do that now. Which raises another question: Does my theme have to be installed on the Cool Course site for it to work there, or can my backup import the theme features and bring them along into the Cool Course site? tnx again, [[User:Thomas Brown|Thomas Brown]] 03:58, 18 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
::::Apologies for not mentioning that course themes need to be enabled by an admin in [[Theme settings]]; glad you figured things out! Yes, your theme needs to be installed on the competition site for it to work, as a course backup does not include theme features. All themes included in standard Moodle packages are available on the competition site. --[[User:Helen Foster|Helen Foster]] 09:32, 18 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I think I have a bigger problem now that my course is on the competition web site. None of the links to course resources work! I must have royally messed up my backup somehow. I included the resources in the backup, but...[[User:Thomas Brown|Thomas Brown]] 21:08, 18 January 2010 (UTC)&lt;br /&gt;
::Testing out the restore of my competition entry on my own site, I find that the html links that I&#039;ve put in the Topic Outline labels go to random id numbers, and so don&#039;t open the resources they&#039;re supposed to and give me a page not found browser error instead. However, if I simply click on edit for one of the labels, and then save it without changing anything, now suddenly all of the links are in working order. So, is it possible for me or someone else to do this fix on my competition entry, so that it starts working? While we&#039;re in there fixing it, can we change it to custom corners? Thanks yet again...[[User:Thomas Brown|Thomas Brown]] 21:48, 18 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::No worries, it&#039;s a good test for the course backup and restore process! I&#039;ve reported the problem you describe in the tracker - MDL-21380. --[[User:Helen Foster|Helen Foster]] 15:02, 19 January 2010 (UTC)&lt;br /&gt;
===Curious, why here?===&lt;br /&gt;
Firstly, thanks for the post here which drew my attention to coolcourses.moodle.org.  Really Cool and Neato.   Secondly, shouldn&#039;t most of this discussion be in the [http://coolcourses.moodle.org/mod/forum/view.php?id=3073 &amp;quot;Competition Lounge&amp;quot;]?   Thirdly, there were some special effects I am dying to know &amp;quot;how they do that?&amp;quot; and I just looked at each course in the first topic! Fourthly, thanks to all who contributed. --[[User:chris collman|chris collman]] 13:00, 21 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Hi Chris, just wondering why you never noticed the [http://moodle.org/mod/forum/discuss.php?d=135429 Cool Course Competition moodle.org news item]? Regarding the [http://coolcourses.moodle.org/mod/forum/view.php?id=3073 Competition lounge], the fact that it was only created a few hours ago probably explains why nobody has posted there yet. How about posting your &amp;quot;how they do that?&amp;quot; question and thanks there. --[[User:Helen Foster|Helen Foster]] 15:12, 21 January 2010 (UTC)&lt;br /&gt;
::I am just a stick in the mud sometimes.  I will take you up on your excellent suggestion. --[[User:chris collman|chris collman]] 16:46, 22 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==nln materials query ==&lt;br /&gt;
&lt;br /&gt;
Dear Helen,&lt;br /&gt;
Sorry to contact you this way - I have been recommended to you by several of your former colleagues on the ILT Champs list. I am conducting a research thesis at the University of Nottingham into the uptake and use of the nln materials amongst the FE sector, and have been advised that you would have an interesting view on this programme. If you could spare me a few minutes of your time to have a discussion, then please could you drop me an email at ttxla4@nottingham.ac.uk? Thank you very much. Rob Enbgelbright says &amp;quot;hello&amp;quot; btw. Many thanks, Laurel Armstrong&lt;br /&gt;
&lt;br /&gt;
:Hi Laurel, I&#039;ve just emailed you :-) --[[User:Helen Foster|Helen Foster]] 13:46, 1 February 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
==Jmol filter==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
&lt;br /&gt;
I noticed that you had updated the Jmol filter and wonder if you could tell me the status of this filter, and also the Jmol resource type and the Java Molecule Editor (for allowing students to add chemical structures as answers in quizzes).&lt;br /&gt;
Do they work in 1.9 and 2.0?&lt;br /&gt;
&lt;br /&gt;
On a similar note, there doesn&#039;t seem to be a direct way for students to put subscripts and superscripts into answers. I have resorted to adding a table of useful chemical symbols in the question, which students can copy and paste. Is there a setting somewhere that allows students to add formatted text?&lt;br /&gt;
&lt;br /&gt;
:Hi Mike, please see the comments on the [http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=87 Jmol resource type] for the latest information on it. You may also wish to contact Geoffrey Rowland.&lt;br /&gt;
&lt;br /&gt;
:Regarding adding chemical symbols, you may find the discussions listed in [[Chemistry/Biochemistry]] helpful. --[[User:Helen Foster|Helen Foster]] 14:58, 7 June 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== permission to edit brazilian portuguese version of docs.moodle.org ==&lt;br /&gt;
&lt;br /&gt;
Hello, Helen&lt;br /&gt;
&lt;br /&gt;
don&#039;t really know if you are the right person to ask, but, could you give me permission to edit brazilian portuguese version of docs.moodle.org ?&lt;br /&gt;
The last update of the home page was in august 2007, and also mention 1.8 as the current stable and focus of translators. I would like to make it a translated copy of the current english home page and also translate the release notes of 2.0 as first step...&lt;/div&gt;</summary>
		<author><name>Danielneis</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=User_talk:Helen_Foster&amp;diff=23199</id>
		<title>User talk:Helen Foster</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=User_talk:Helen_Foster&amp;diff=23199"/>
		<updated>2010-07-25T04:35:41Z</updated>

		<summary type="html">&lt;p&gt;Danielneis: /* permission to edit brazilian portuguese version of docs.moodle.org */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==deleting extra images==&lt;br /&gt;
Hi Helen - I am very shy at adding to the docs! ;)&lt;br /&gt;
I put some stuff on about conditional activities but I uploaded images which weren&#039;t clear so I changed them and now I don&#039;t know how to delete the first few which are no longer used on the page - could you delete the earlier, unused uploads please so they don&#039;t take up space and clutter the place up? (I couldn&#039;t find a &amp;quot;delete&amp;quot; instruction so I presume we can&#039;t) thanks - Mary [[User:Mary Cooch|Mary Cooch]]&lt;br /&gt;
: Hi Mary, if you upload a new version of the file with the same name it will replace the old one. At least I can&#039;t find any duplicates on your images&#039; pages ;-) And your files are all only some KB so they won&#039;t take up much disk space anyway. --[[User:Frank Ralf|Frank Ralf]] 10:19, 6 March 2010 (UTC)&lt;br /&gt;
:: Mary, many thanks for your contribution to [[Conditional activities]] :-) Frank is right in saying that new versions of images simply replace old ones, so there is no need for any deletion. If you upload an image then decide you don&#039;t want to use it at all, you can just type &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{Deletion}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; at the top of the page (as explained in [[MoodleDocs:Templates]]) then an admin will come along and delete it. --[[User:Helen Foster|Helen Foster]] 12:33, 8 March 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Deleting some attached files in JIRA ==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
&lt;br /&gt;
I made a bit of a mess at [http://tracker.moodle.org/browse/MDL-21110 http://tracker.moodle.org/browse/MDL-21110]. Would it be possible to delete all the attached files there so Penny or I can upload the current one and let Jira handle the versioning more sanely?&lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;br /&gt;
Matt&lt;br /&gt;
&lt;br /&gt;
:Done! --[[User:Helen Foster|Helen Foster]] 08:33, 5 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Creating new FAQ pages ==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
&lt;br /&gt;
I have successfully created a stub for a XML FAQ page (https://docs.moodle.org/en/XML_FAQ) but how do I get it promoted on https://docs.moodle.org/en/Category:FAQ ?&lt;br /&gt;
&lt;br /&gt;
I also would like to create an Import/Export FAQ for collecting all the information regarding Moodle import and export which is scattered in different forums.&lt;br /&gt;
&lt;br /&gt;
Regards,&lt;br /&gt;
[[User:Frank Ralf|Frank Ralf]]&lt;br /&gt;
&lt;br /&gt;
:Hi Helen will have to answer the Import/Export question.  I jumped in and added &amp;lt;nowiki&amp;gt;[[Category:FAQ]]&amp;lt;/nowiki&amp;gt; to the bottom of the page, which anyone can do. And took your hint and added a &amp;lt;nowiki&amp;gt;{{stub}}&amp;lt;/nowiki&amp;gt; template at the top.  Thanks for the XML work. Best --[[User:chris collman|chris collman]] 14:16, 3 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
::Hi Frank, thanks for your offer - an [[Import and export FAQ]] page would be great, thanks! --[[User:Helen Foster|Helen Foster]] 04:12, 4 December 2008 (CST)&lt;br /&gt;
:::Thanks to both of you! Helen, how did you get that nice Contents menu on your Import and export FAQ page? I couldn&#039;t figure that out from the source. --[[User:Frank Ralf|Frank Ralf]] 05:30, 4 December 2008 (CST) Problem solved, just found the documentation ;-) --[[User:Frank Ralf|Frank Ralf]] 05:43, 4 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
== Suggestion that is probably total overkill ==&lt;br /&gt;
&amp;lt;onlyinclude&amp;gt;&lt;br /&gt;
# Create a new FAQ namespace.&lt;br /&gt;
# In this namespace, create one page for each frequent question, where the contents of the page is the answer.&lt;br /&gt;
# Use our new knowledge of transclusions to build the FAQ lists by just pulling in pages from the FAQ namespace.&lt;br /&gt;
&lt;br /&gt;
The benefits of doing this are&lt;br /&gt;
* The same FAQ can appear in more than one list without copying-and-pasting.&lt;br /&gt;
* Each question gets a unique URL that so in the forums, we can point people to a page that just answers their specific question.&lt;br /&gt;
&lt;br /&gt;
Disadvantages&lt;br /&gt;
* Editing FAQ lists becomes incomprehensible to anyone who is not a MediaWiki geek.&lt;br /&gt;
&lt;br /&gt;
If we went this way, I would like to use B to build a new FAQ page: &amp;quot;Troubleshooting FAQ&amp;quot;. Might be a good idea anyway.&lt;br /&gt;
&amp;lt;/onlyinclude&amp;gt;&lt;br /&gt;
I hasten to say that I am not recommending this approach. The disadvantages could easily outweigh the advantages. I am simply pointing out a technical possibility that may be worth considering either now, or in the future.&amp;lt;onlyinclude&amp;gt;--[[User:Tim Hunt|Tim Hunt]] 07:11, 4 December 2008 (CST)&amp;lt;/onlyinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Just added [[MoodleDocs:Transclusion]].  Good thing I had my first cup of coffee, Tim&#039;s thoughtful post got me rubbing the sleep out of my eyes.  I wonder if I can get the partial transclusion of this section to work in Sandbox then in [[MoodleDocs_talk:Transclusion]]. Definitely a tool to be used with care. But Wowie Zowie ! --[[User:chris collman|chris collman]] 06:49, 5 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
:: Hello Tim, I think your suggested solution would indeed be overkill and would make maintaining FAQ too difficult. I see FAQ as an intermediary step between the unorganised kind of &amp;quot;documentation&amp;quot; which is provided in the forums towards &amp;quot;real&amp;quot; documentation. Therefore the ease of editing is crucial in my opinion. What about using Moodle&#039;s &#039;&#039;&#039;autolinking mechanism&#039;&#039;&#039; to automatically link to FAQ pages, e.g. if there is a mention of grades in the forums that would create an automatic link to Grades FAQ. I am quite new to Moodle, but couldn&#039;t that be done with setting up a kind of FAQ Glossary? --[[User:Frank Ralf|Frank Ralf]] 02:44, 16 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
::: Hi Tim, thanks for your suggestion, though I think it&#039;s overkill too!  The current FAQ pages have nice short titles which are easy to find and to include in forum posts. Having a page for each FAQ would result in really long URLs. Also, I think that when we point people to an FAQ page, and they have to look through it to find the answer to their question, they may well find answers to other questions they have. As other people have suggested, I think FAQ pages work well as start pages with links to lots of other pages i.e. they&#039;re kept fairly short, for example [[Contributed code FAQ]]. --[[User:Helen Foster|Helen Foster]] 04:49, 18 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
::: Frank, regarding autolinking to FAQ pages, have you come across the Moodle Docs filter on moodle.org? Please see the [[Moodle.org FAQ]] for more details. --[[User:Helen Foster|Helen Foster]] 04:49, 18 December 2008 (CST)&lt;br /&gt;
::::Helen, thanks for the hint. But isn&#039;t that the usual &#039;&#039;manual&#039;&#039; way of wiki linking? But on second thought that might really be the best way of linking to FAQ pages as it keeps getting the forums cluttered with too many (automatic) links. In fact, it just might be a matter of good practice to put advice of lasting value from the forums into a more structured form of documentation and nothing which could or should be done in an automatic and technical way... --[[User:Frank Ralf|Frank Ralf]] 05:11, 19 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
== Security Notification registration ==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
&lt;br /&gt;
It was suggested to me through the #moodle channel on freenode that I raise this concern with you.&lt;br /&gt;
&lt;br /&gt;
I&#039;m developing a moodle installation behind a firewall on a non-public URL and am interested in subscribing to security updates (prompted to check this after seeing a moodle vulnerability mentioned on Bugtraq). I had previously attempted to subscribe by registering our installation through the admin pages, however that registration was rejected as the site was located behind a firewall and not accessible.&lt;br /&gt;
&lt;br /&gt;
Due to that rejection, I wasn&#039;t subscribed to security updates.&lt;br /&gt;
&lt;br /&gt;
I now find myself in the unfortunate position where I cannot subscribe to security updates without having a public facing site (which I can&#039;t reasonably know is secure as I&#039;m not receiving security updates through your mailing list).&lt;br /&gt;
&lt;br /&gt;
The burden for those of us who have an internal site they&#039;re developing (or perhaps is in production) is that we must now create a public facing site to register for the sole purpose of receiving security updates. If the thought is that only parties interested in maintaining a moodle site should have access to those messages, perhaps a different measure could be put into place (a code that appears once moodle is installed, for example).&lt;br /&gt;
&lt;br /&gt;
I&#039;ve tried subscribing through sympa@lists.moodle.org, however that method does not work either.&lt;br /&gt;
&lt;br /&gt;
Could you please provide a process for folks like me to get on the security updates list without having to install moodle on a public web server first?&lt;br /&gt;
&lt;br /&gt;
Thanks!&lt;br /&gt;
&lt;br /&gt;
- P.&lt;br /&gt;
&lt;br /&gt;
:Hi Paul, how about subscribing to the [http://moodle.org/mod/forum/view.php?f=996 security announcements forum], where all important security issues are published. --[[User:Helen Foster|Helen Foster]] 04:34, 18 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
== Unseen (not hidden) activities==&lt;br /&gt;
Hi Helen (This is partly my attempt at practising here by the way!) I&#039;ve posted several times recently about the concept of &#039;unseen&#039; topics with resources that can be linked to on the course page where hidden ones wouldn&#039;t work. is there documentation about that somewhere here ? If so, where? Then I can point Moodlers to it next time.If not, shall I write it? Thanks - [[User: Mary Cooch|Mary Cooch]]&lt;br /&gt;
&lt;br /&gt;
:Hi Mary, I&#039;ve just had a quick look and can&#039;t find any documentation about unseen topics, so it would be helpful if you could write some, perhaps here: [[Course homepage]]. Thanks in advance :-) --[[User:Helen Foster|Helen Foster]] 17:20, 19 December 2008 (CST)&lt;br /&gt;
:Helen - please can you check what I have done as you know I&#039;m still a novice and don&#039;t want to put the wrong thing in the wrong place! Also, if you look on my usertalk Chris Colman said it might be useful on the html linking page? [[User: Mary Cooch|Mary Cooch]]&lt;br /&gt;
&lt;br /&gt;
== Downloading Moodle Core ==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
I came across Moodle just this morning, and read a little about its design, and loved it, it is perfect for the project Im starting.&lt;br /&gt;
&lt;br /&gt;
Ive gone to the download page, to download the Moodle core zip package, but when I click on the link to download I get the following message;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;A server error that affects your login session was detected. Please login again or restart your browser.&#039;&lt;br /&gt;
&lt;br /&gt;
( Continue )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I had a look around the FAQ pages, to see if there was anything on there, but it only mentions about people who already have moodle and are having this difficulty,&lt;br /&gt;
&lt;br /&gt;
Please could you send me an alternative link, &lt;br /&gt;
&lt;br /&gt;
Kind Regards&lt;br /&gt;
Andrew&lt;br /&gt;
:Hi Andrew, I left a comment on your [[User_talk:Andrew_Abel|user comment page]], just in case you were in a hurry to play with Moodle. --[[User:chris collman|chris collman]] 07:40, 1 January 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
::Hi Andrew, I hope you&#039;ve been successful in downloading Moodle by now. Chris, thanks for your helpful comments :-) --[[User:Helen Foster|Helen Foster]] 01:21, 2 January 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
== &amp;quot;experimental:&amp;quot; prefix ==&lt;br /&gt;
&lt;br /&gt;
[[User:Marc Grober|Marc Grober]] 12:00, 12 January 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
We started using experimental: as a prefix because there was some confusion about the use of Development: as a prefix.....&lt;br /&gt;
&lt;br /&gt;
In the Moodle docs, Development: appears to cover Moodle developer documentation, not docs under development,  so we wanted to use a prefix that connote that the docs were, as we suggest, &amp;quot;experimental&amp;quot; (i.e. not ready for prime time).   I had not come across [[Experimental|Experimental]] as the search is a bit temperamental and searching for the root, experiment, produced no result.....&lt;br /&gt;
&lt;br /&gt;
Perhaps we need a different topic name?&lt;br /&gt;
&lt;br /&gt;
I have encouraged AT to ask you to move these pages out of the experimental: topic but I think she feels they are not quite ready and I want to respect hre wishes on this.&lt;br /&gt;
&lt;br /&gt;
We also have some experimental pages under development with respect to gradebook &amp;quot;cases&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
I would encourage you to discuss the progress on all these pages with AT.&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
:Marc, thanks for your comments. The use of experimental: as a prefix is fine by me. Alternatively you could use a [[MoodleDocs:Templates|Moodle Docs template]] to add a message saying that the page is experimental. --[[User:Helen Foster|Helen Foster]] 02:41, 13 January 2009 (CST)&lt;br /&gt;
::Marc and Helen, something new to me.  I found 7 pages when I searched on &amp;quot;experimental:&amp;quot; and found 7 Article title matches.  6 started with &amp;quot;experimental:&amp;quot; and of course &amp;quot;Experimental&amp;quot;. Wondering if an alternative draft to Main Page should be done that way with the Experimental template.  :)--[[User:chris collman|chris collman]] 06:00, 13 January 2009 (CST)&lt;br /&gt;
:::Helen, thanks for moving some of the experimental: pages.  The page here, however, has yet to be moved: [https://docs.moodle.org/en/experimental:Getting_Help_Installing_and_Managing_Moodle]. Vis-a-vis topics/categories, I think it makes sense to have a category that is not searched by default so that users do not find materials that is not ready for prime time.  By the same token,  I think, as I mentioned above,  that Development: is problematic because it confuses as far as whether it is a topic for Developers or addresses material under development, which are really two different areas.  Likewise, as long as there is an Experimental page the use of experimental: could cause confusion.    I would argue for three distinct categories.... [[User:Marc Grober|Marc Grober]] 12:16, 24 January 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
::As I understood your (Helen&#039;s) comment (posted I don&#039;t recall where) you (Helen) were I think suggesting that what I was really suggesting was a new name space such that folks could develop documents that were not included in a default search.....  which I think is exactly what I was looking for....  So the question becomes can and should we do such a thing..... --[[User:Marc Grober|Marc Grober]] 23:44, 9 March 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::Marc, I guess you&#039;re referring to my forum post [http://moodle.org/mod/forum/discuss.php?d=115736#p509590 Re: Not including pages in the Moodle Docs search]. How about using a Moodle Docs template for now to indicate docs under development and add them to an appropriate category, then when there are sufficient pages to warrant it, we can create a new namespace and move all the pages into it. --[[User:Helen Foster|Helen Foster]] 11:46, 10 March 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
==Talk:Helen&#039;s page is over 32k==&lt;br /&gt;
FYI: I got that warning.  Maybe a subpage for the older stuff and a link, so we don&#039;t loose some stuff. Of course alternatively, if I deleted all my comments/questions, that would shorted it a lot :)  --[[User:chris collman|chris collman]] 06:04, 13 January 2009 (CST)&lt;br /&gt;
::Seriously, I would be happy to edit my posts here down to a nub or nothingness.  I think some of the language requests for help could be put in one heading and shortened, without losing anything.    --[[User:chris collman|chris collman]] 06:13, 13 January 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
:Chris, thanks for creating [[User talk:Helen Foster/1]]. I think it&#039;s a good solution :-) --[[User:Helen Foster|Helen Foster]] 02:51, 14 January 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*[[User talk:Helen Foster/1]] for older comments&lt;br /&gt;
&lt;br /&gt;
== Registered Users Bug with Mediawiki ==&lt;br /&gt;
&lt;br /&gt;
Hi, [[User_talk:David_Scotson#Moodle_Docs_stats|Way back in 2006 you mentioned]] a work-around for a bug resulting in registered users stats on [[Special:Statistics]] not updating properly. I think I am encountering this same bug on my internal wiki now. I know that was a long time ago, but do you remember what you did to fix it/what the work-around mentioned was?&lt;br /&gt;
Thanks,&lt;br /&gt;
--[[User:Adrian Archer|Adrian Archer]] 11:02, 4 March 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
:Hi Adrian, here are Eloy&#039;s workarounds (easy to do with phpMyAdmin):&lt;br /&gt;
&lt;br /&gt;
:# To refresh the count of pages, if it&#039;s not working: table: site_stats, field: ss_total_pages, setting it to -1 should force recalculation of pages&lt;br /&gt;
:# To refresh the count of registered users, delete the contents of the &amp;quot;cached statistics&amp;quot; table&lt;br /&gt;
&lt;br /&gt;
:Thanks to Eloy for recalling them :-) I hope you are able to upgrade to a newer MediaWiki version soon. --[[User:Helen Foster|Helen Foster]] 09:01, 5 March 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
::Thanks so much for the quick response, that sounds like it should work. I&#039;m actually using Version 1.13.3, so I guess the bug still exists. --[[User:Adrian Archer|Adrian Archer]] 09:17, 5 March 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
:::Hmm, Moodle Docs is actually using version 1.11.2, though we&#039;re hoping to upgrade very soon (MDLSITE-657). --[[User:Helen Foster|Helen Foster]] 09:35, 5 March 2009 (CST)&lt;br /&gt;
&lt;br /&gt;
== Function if in grade calculations? ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hi Helen&lt;br /&gt;
&lt;br /&gt;
Thanks for your jobs.&lt;br /&gt;
&lt;br /&gt;
Sorry for my lousy english.&lt;br /&gt;
&lt;br /&gt;
I am trying to use the &amp;quot;if&amp;quot; function in &amp;quot;Grade calculations&amp;quot; in a similar way as is done in &amp;quot;opencalc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
do you know if this is possible?&lt;br /&gt;
&lt;br /&gt;
How to introduce a note of recovery, only for a few students, without changing the original calification?&lt;br /&gt;
&lt;br /&gt;
My email is trujillo@unex.es&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;br /&gt;
&lt;br /&gt;
== Using Moodle for Teachers ==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
&lt;br /&gt;
I teach math at Woodland Middle School  in Woodland, WA. I&#039;m also just beginning work with the Ubuntu Learning Project (name?). Is your book (Using Moodle - Teaching with the Popular Open Source Course Management System) available for download on Moodle Docs free to teachers? If so, is there some type of creative commons license? Or should we just link to Moodle Docs? I found your book extremely useful when I taught a 3-day Moodle Bootcamp to teachers this summer.&lt;br /&gt;
&lt;br /&gt;
Thanks, Mark Knudson&lt;br /&gt;
&lt;br /&gt;
:Hi Mark, glad to hear you found my book useful :-) It&#039;s available for download under the Creative Commons Attribution-Noncommercial-Share Alike licence here: [[Using Moodle book]]. --[[User:Helen Foster|Helen Foster]] 19:11, 21 September 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== PHP Settings by Moodle version ==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
&lt;br /&gt;
I&#039;m new to this community (and to Moodle) and am not sure how I should request an update to the documentation relating to a Moodle PHP extension requirement - specifically zlib.&lt;br /&gt;
I noticed that this page:&lt;br /&gt;
https://docs.moodle.org/no/Installering_av_Moodle has a section stating that &amp;quot;The zlib extension is required for zip/unzip functionality.&amp;quot; under the PHP Extensions and Libraries, but it doesn&#039;t exist here:&lt;br /&gt;
https://docs.moodle.org/en/PHP_settings_by_Moodle_version&lt;br /&gt;
&lt;br /&gt;
The PHP_settings_by_Moodle_version is a Stub and is waiting for review - I was thinking about updating it with the text from the https://docs.moodle.org/no/Installering_av_Moodle page.&lt;br /&gt;
&lt;br /&gt;
Looking for a little direction.&lt;br /&gt;
&lt;br /&gt;
Thanks!&lt;br /&gt;
Andy&lt;br /&gt;
&lt;br /&gt;
:Hi Andy,&lt;br /&gt;
&lt;br /&gt;
:Thanks for your kind offer to update the documentation [[PHP settings by Moodle version]]. Please feel free to go ahead and do so :-) (I asked in our developer chat and was informed that zlib is required for versions of Moodle up to 1.9 and Moodle 2.0 onwards will come with native PHP zip support so it needs the &amp;quot;zip&amp;quot; extension instead.)&lt;br /&gt;
&lt;br /&gt;
:For future reference, you&#039;re always welcome to edit pages in Moodle Docs and help improve our documentation. If you&#039;re not quite sure of something, you can leave a note in the page comments. Thanks again! --[[User:Helen Foster|Helen Foster]] 11:45, 20 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Query re Cool Course Competition ==&lt;br /&gt;
Two questions re the Cool Course Competition:&lt;br /&gt;
1) How can teachers know whether the modules and blocks they use are core or not? Is there a list somewhere?(2) Why are some entries in their own native theme, while most entries are using the competition site&#039;s theme? How can I upload my course so that it retains its own theme? Thanks, [[User:Thomas Brown|Thomas Brown]] 00:16, 16 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Hi Thomas, an easy way to check which modules and blocks are core i.e. included in the standard Moodle packages is to login to the [http://demo.moodle.net/ Moodle Demonstration Site] as an admin and check &#039;&#039;Administration &amp;gt; Modules &amp;gt; Activities &amp;gt; Manage activities&#039;&#039; and &#039;&#039;Administration &amp;gt; Modules &amp;gt; Blocks &amp;gt; Manage blocks&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
:Regarding the course theme, if you force a theme in the course settings, it will be used, otherwise the site theme will be used. --[[User:Helen Foster|Helen Foster]] 11:22, 16 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
::Do you mean the &amp;quot;Settings&amp;quot; page in the course&#039;s Admin block? My Settings page doesn&#039;t have any theme-related options. Did I look in the wrong place? tnx, [[User:Thomas Brown|Thomas Brown]] 23:55, 16 January 2010 (UTC)&lt;br /&gt;
:::It appears that the site admin can make a setting that allows teachers to force a theme -- so I can do that now. Which raises another question: Does my theme have to be installed on the Cool Course site for it to work there, or can my backup import the theme features and bring them along into the Cool Course site? tnx again, [[User:Thomas Brown|Thomas Brown]] 03:58, 18 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
::::Apologies for not mentioning that course themes need to be enabled by an admin in [[Theme settings]]; glad you figured things out! Yes, your theme needs to be installed on the competition site for it to work, as a course backup does not include theme features. All themes included in standard Moodle packages are available on the competition site. --[[User:Helen Foster|Helen Foster]] 09:32, 18 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I think I have a bigger problem now that my course is on the competition web site. None of the links to course resources work! I must have royally messed up my backup somehow. I included the resources in the backup, but...[[User:Thomas Brown|Thomas Brown]] 21:08, 18 January 2010 (UTC)&lt;br /&gt;
::Testing out the restore of my competition entry on my own site, I find that the html links that I&#039;ve put in the Topic Outline labels go to random id numbers, and so don&#039;t open the resources they&#039;re supposed to and give me a page not found browser error instead. However, if I simply click on edit for one of the labels, and then save it without changing anything, now suddenly all of the links are in working order. So, is it possible for me or someone else to do this fix on my competition entry, so that it starts working? While we&#039;re in there fixing it, can we change it to custom corners? Thanks yet again...[[User:Thomas Brown|Thomas Brown]] 21:48, 18 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::No worries, it&#039;s a good test for the course backup and restore process! I&#039;ve reported the problem you describe in the tracker - MDL-21380. --[[User:Helen Foster|Helen Foster]] 15:02, 19 January 2010 (UTC)&lt;br /&gt;
===Curious, why here?===&lt;br /&gt;
Firstly, thanks for the post here which drew my attention to coolcourses.moodle.org.  Really Cool and Neato.   Secondly, shouldn&#039;t most of this discussion be in the [http://coolcourses.moodle.org/mod/forum/view.php?id=3073 &amp;quot;Competition Lounge&amp;quot;]?   Thirdly, there were some special effects I am dying to know &amp;quot;how they do that?&amp;quot; and I just looked at each course in the first topic! Fourthly, thanks to all who contributed. --[[User:chris collman|chris collman]] 13:00, 21 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Hi Chris, just wondering why you never noticed the [http://moodle.org/mod/forum/discuss.php?d=135429 Cool Course Competition moodle.org news item]? Regarding the [http://coolcourses.moodle.org/mod/forum/view.php?id=3073 Competition lounge], the fact that it was only created a few hours ago probably explains why nobody has posted there yet. How about posting your &amp;quot;how they do that?&amp;quot; question and thanks there. --[[User:Helen Foster|Helen Foster]] 15:12, 21 January 2010 (UTC)&lt;br /&gt;
::I am just a stick in the mud sometimes.  I will take you up on your excellent suggestion. --[[User:chris collman|chris collman]] 16:46, 22 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==nln materials query ==&lt;br /&gt;
&lt;br /&gt;
Dear Helen,&lt;br /&gt;
Sorry to contact you this way - I have been recommended to you by several of your former colleagues on the ILT Champs list. I am conducting a research thesis at the University of Nottingham into the uptake and use of the nln materials amongst the FE sector, and have been advised that you would have an interesting view on this programme. If you could spare me a few minutes of your time to have a discussion, then please could you drop me an email at ttxla4@nottingham.ac.uk? Thank you very much. Rob Enbgelbright says &amp;quot;hello&amp;quot; btw. Many thanks, Laurel Armstrong&lt;br /&gt;
&lt;br /&gt;
:Hi Laurel, I&#039;ve just emailed you :-) --[[User:Helen Foster|Helen Foster]] 13:46, 1 February 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
==Jmol filter==&lt;br /&gt;
&lt;br /&gt;
Hi Helen,&lt;br /&gt;
&lt;br /&gt;
I noticed that you had updated the Jmol filter and wonder if you could tell me the status of this filter, and also the Jmol resource type and the Java Molecule Editor (for allowing students to add chemical structures as answers in quizzes).&lt;br /&gt;
Do they work in 1.9 and 2.0?&lt;br /&gt;
&lt;br /&gt;
On a similar note, there doesn&#039;t seem to be a direct way for students to put subscripts and superscripts into answers. I have resorted to adding a table of useful chemical symbols in the question, which students can copy and paste. Is there a setting somewhere that allows students to add formatted text?&lt;br /&gt;
&lt;br /&gt;
:Hi Mike, please see the comments on the [http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=87 Jmol resource type] for the latest information on it. You may also wish to contact Geoffrey Rowland.&lt;br /&gt;
&lt;br /&gt;
:Regarding adding chemical symbols, you may find the discussions listed in [[Chemistry/Biochemistry]] helpful. --[[User:Helen Foster|Helen Foster]] 14:58, 7 June 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== permission to edit brazilian portuguese version of docs.moodle.org ==&lt;br /&gt;
&lt;br /&gt;
Hello, Helen&lt;br /&gt;
&lt;br /&gt;
don&#039;t hello know if you are the right person to ask, but, could you give me permission to edit brazilian portuguese version of docs.moodle.org ?&lt;br /&gt;
The last update of the home page was in august 2007, and also mention 1.8 as the current stable and focus of translators. I would like to make it a translated copy of the current english home page and also translate the release notes of 2.0 as first step...&lt;/div&gt;</summary>
		<author><name>Danielneis</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Backup_2.0&amp;diff=11488</id>
		<title>Backup 2.0</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Backup_2.0&amp;diff=11488"/>
		<updated>2009-09-21T17:54:48Z</updated>

		<summary type="html">&lt;p&gt;Danielneis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Work in progress}}{{Moodle_2.0}}&lt;br /&gt;
&lt;br /&gt;
=== Drop in ideas ===&lt;br /&gt;
&lt;br /&gt;
* Enable Backup and restore of a Course and it&#039;s related meta courses IN ONE HIT to save on adminstration time. &lt;br /&gt;
* Support incremental backups &amp;amp; restore.&lt;br /&gt;
* Support 1-activity backup.&lt;br /&gt;
* Backup/restore one topic only (not just one activity) --[[User:Samuli Karevaara|Samuli Karevaara]] 21:29, 5 March 2009 (CST)&lt;br /&gt;
* Support anonymisation of personal data on backup.&lt;br /&gt;
* Separate process and progress. &#039;&#039;(Perhaps [http://cvs.moodle.org/moodle/lib/weblib.php?r1=1.1214&amp;amp;r2=1.1215 these classes I wrote] can help)--[[User:Tim Hunt|Tim Hunt]] 19:41, 1 March 2009 (CST)&#039;&#039;&lt;br /&gt;
* XML format doesn&#039;t need to be radical different (IMO).&lt;br /&gt;
* Support restore of old (1.9 only?) backups.&lt;br /&gt;
* Hook in backup &amp;amp; restore to [[Backup 2.0 multiple formats|intercept &amp;amp; support other formats (BB, IMS-CC...)]]&lt;br /&gt;
* One code base both for manual and scheduled backup&lt;br /&gt;
* Scheduled restore&lt;br /&gt;
* Fix restore so that one can also select to restore course settings (they are currently backed up, but not restored in any restore function.)&lt;br /&gt;
* Fileless export/import (aka fix import function so that one can choose to import blocks, course settings, etc. in addition to resources/activities)&lt;br /&gt;
* Export/import over mnet&lt;br /&gt;
* OOP.&lt;br /&gt;
* Secure (don&#039;t handle non-allowed data, user matching on restore, salted passwords..)&lt;br /&gt;
* Safe (some sort of &amp;quot;rollback&amp;quot; on failure - requires to have everything annotated somewhere - backup_ids or so).&lt;br /&gt;
* file-less backups - if you have separate backups, import/export etc.&lt;br /&gt;
* Allow to backup one category of courses (at the same time, one zip per course). MDL-17187&lt;br /&gt;
* Allow to mark courses to be excluded from scheduled backup manually.&lt;br /&gt;
* Avoid anti-timeout output when not running from browser. MDL-17282&lt;br /&gt;
* Review related caps, cleaning them and adding missing bits, improving sec. consistency.&lt;br /&gt;
* Log all backups (both manual and scheduled). Improve logging in general.&lt;br /&gt;
* Separate each module&#039;s portion of XML into its own namespace.&lt;br /&gt;
* Use the namespaces to allow each module the option of validating it&#039;s XML content before processing.&lt;br /&gt;
* Roll dates: on restore or import, allow instructor to input a start date, and roll all assignment, quiz, etc. dates forward based on the new start date.&lt;br /&gt;
* Backup would need to be called when publish a course on the community hub ([https://docs.moodle.org/en/Community_hub#Publish_course course template])&lt;br /&gt;
* Metadata... to be included in backup/restore... something like: [[Metadata]]&lt;br /&gt;
* Allow backup of roles with permissions, assigns and overrides. MDL-17081&lt;br /&gt;
&lt;br /&gt;
=== General prerequisites ===&lt;br /&gt;
&lt;br /&gt;
==== [[Backup 2.0 - Improve XML parsing|Improve XML parsing]] ====&lt;br /&gt;
One of the major bottlenecks in backup and, specially, in restore reliability under Moodle 1.x has been the big amount of memory needed to handle those operations (see bugs like MDL-14302, MDL-15489, MDL-9838... and many others). While the whole XML file (moodle.xml) is parsed in a [http://en.wikipedia.org/wiki/Simple_API_for_XML SAX] way (hence, &amp;quot;streamed&amp;quot; and requiring small amounts of memory),  we use to group some XML contents into &amp;quot;parts&amp;quot; in order to delegate the operations over those &amp;quot;parts&amp;quot; to different plugins (modules, blocks...). And problems arrive when some of those &amp;quot;parts&amp;quot; is big enough and processing them with the [http://php.net/xml_parse_into_struct xml_parse_into_struct()] function and the [http://www.hansanderson.com/php/xml/ xmlize] library uses exaggerated amounts of memory (for example, to process a 12.5MB file requires 311MB of memory, crazy!). So we need to switch to an alternate method to parse those &amp;quot;parts&amp;quot; using much less memory and to build the corresponding in-memory object with one acceptable throughput (speed).&lt;br /&gt;
&lt;br /&gt;
[[Category:Backup]]&lt;/div&gt;</summary>
		<author><name>Danielneis</name></author>
	</entry>
</feed>