<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.moodle.org/404/en/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Robek</id>
	<title>MoodleDocs - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://docs.moodle.org/404/en/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Robek"/>
	<link rel="alternate" type="text/html" href="https://docs.moodle.org/404/en/Special:Contributions/Robek"/>
	<updated>2026-04-11T10:09:45Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://docs.moodle.org/404/en/index.php?title=Help:Editing&amp;diff=33306</id>
		<title>Help:Editing</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/404/en/index.php?title=Help:Editing&amp;diff=33306"/>
		<updated>2008-03-07T17:49:53Z</updated>

		<summary type="html">&lt;p&gt;Robek: /* Categories links */ corrected typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Help}}&lt;br /&gt;
This page is for editing Moodle Documentation (MoodleDocs). This is a similar but much more robust type of program than the [[Wiki module|standard Moodle wiki]].&lt;br /&gt;
&lt;br /&gt;
==Edit tab==&lt;br /&gt;
Every MoodleDoc page has an &amp;quot;edit&amp;quot; tab at the top .  This link will let you edit the page you are viewing. Please try editing a page by using this  [[Sandbox|sandbox link]]. We will cover more formatting and special MoodleDoc features below. &lt;br /&gt;
&lt;br /&gt;
=== Show preview ===&lt;br /&gt;
In edit mode, the show preview button at the bottom of the page lets you see what the page will look like after your edit, before you actually save.  We all make mistakes; this feature lets you catch them immediately.  Using Show preview before saving also lets you try format changes and other edits without cluttering up the page history, and has a number of other advantages.  Don&#039;t forget to save your edits after previewing, though!&lt;br /&gt;
&lt;br /&gt;
=== Edit summary ===&lt;br /&gt;
Before saving the page, it&#039;s considered good practice to enter a very brief summary of your changes in the summary box below the edit-box.&lt;br /&gt;
&lt;br /&gt;
== Formatting ==&lt;br /&gt;
&lt;br /&gt;
Most &#039;&#039;&#039;formatting&#039;&#039;&#039;  in MoodleDocs is usually done with MediaWiki markup - you don&#039;t have to learn HTML!&lt;br /&gt;
&lt;br /&gt;
=== Bold and italics ===&lt;br /&gt;
&#039;&#039;&#039;Bolding&#039;&#039;&#039; and &#039;&#039;italicizing&#039;&#039; is done by surrounding a word or phrase with multiple apostrophes (&amp;lt;tt&amp;gt;&#039;&amp;lt;/tt&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&#039;&#039;italics&#039;&#039;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; appears as &#039;&#039;italics&#039;&#039;. (2 apostrophes on both sides)&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&#039;&#039;&#039;bold&#039;&#039;&#039;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; appears as &#039;&#039;&#039;bold&#039;&#039;&#039;. (3 apostrophes on both sides)&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&#039;&#039;&#039;&#039;&#039;bolded italics&#039;&#039;&#039;&#039;&#039;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; appears as &#039;&#039;&#039;&#039;&#039;bolded italics&#039;&#039;&#039;&#039;&#039;.  (5 apostrophes on both sides)&lt;br /&gt;
&lt;br /&gt;
=== Headings and subheadings ===&lt;br /&gt;
Headings and subheadings are an easy way to improve the organization of an article. &lt;br /&gt;
&lt;br /&gt;
Headings can be created like this:&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;==Top level heading==&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (2 equals signs)&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;===Subheading===&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (3 equals signs)&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;====Another level down====&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (4 equals signs)&lt;br /&gt;
&lt;br /&gt;
If an article has at least four headings, a table of contents will automatically be generated.&lt;br /&gt;
&lt;br /&gt;
=== Indentations ===&lt;br /&gt;
The simplest way of indenting is to place a colon (&amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt;) at the beginning of a line. The more colons you put, the further indented the text will be. A newline marks the end of the indented paragraph e.g.&lt;br /&gt;
:&amp;lt;code&amp;gt;This is aligned all the way to the left.&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;:&amp;lt;/nowiki&amp;gt;This is indented slightly.&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;::&amp;lt;/nowiki&amp;gt;This is indented more.&amp;lt;/code&amp;gt;&lt;br /&gt;
is shown as&lt;br /&gt;
:This is aligned all the way to the left.&lt;br /&gt;
::This is indented slightly.&lt;br /&gt;
:::This is indented more.&lt;br /&gt;
&lt;br /&gt;
=== Lists ===&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!What it looks like&lt;br /&gt;
!What you type&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
* &#039;&#039;Unordered lists&#039;&#039; are easy to do:&lt;br /&gt;
** start every line with a star&lt;br /&gt;
*** more stars means deeper levels&lt;br /&gt;
*A newline&lt;br /&gt;
*in a list  &lt;br /&gt;
marks the end of the list.&lt;br /&gt;
&lt;br /&gt;
|&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;* Unordered Lists are easy to do:&lt;br /&gt;
** start every line with a star&lt;br /&gt;
*** more stars means deeper levels&lt;br /&gt;
*A newline&lt;br /&gt;
*in a list  &lt;br /&gt;
marks the end of the list.&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
# Numbered lists are also good&lt;br /&gt;
## very organized&lt;br /&gt;
## easy to follow&lt;br /&gt;
#A newline&lt;br /&gt;
#in a list  &lt;br /&gt;
marks the end of the list.&lt;br /&gt;
|&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;# Numbered lists are also good&lt;br /&gt;
## very organized&lt;br /&gt;
## easy to follow&lt;br /&gt;
#A newline&lt;br /&gt;
#in a list  &lt;br /&gt;
marks the end of the list.&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|Descriptive lists:&lt;br /&gt;
; first tag : accompanying description&lt;br /&gt;
; second tag : more description&lt;br /&gt;
; third tag : surprise! more description&lt;br /&gt;
|&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;Descriptive lists:&lt;br /&gt;
; first tag : accompanying description&lt;br /&gt;
; second tag : more description&lt;br /&gt;
; third tag : surprise! more description&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Preserving formatting ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!What it looks like&lt;br /&gt;
!What you type&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Leading spaces are another way to preserve formatting.&lt;br /&gt;
&lt;br /&gt;
 Putting a space at the beginning of each line&lt;br /&gt;
 stops the text from being reformatted. &lt;br /&gt;
|&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;Leading spaces are another way to preserve formatting.&lt;br /&gt;
&lt;br /&gt;
 Putting a space at the beginning of each line&lt;br /&gt;
 stops the text from being reformatted.&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can also use &amp;lt;pre&amp;gt;&amp;lt;pre&amp;gt;&amp;lt;/pre&amp;gt; tags around code and other preformatted text.&lt;br /&gt;
  or use block the text and use the nowiki tool&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
Links to other pages are the heart of a wiki and MoodleDocs.  &lt;br /&gt;
&lt;br /&gt;
=== Wiki links ===&lt;br /&gt;
To make a wiki link, simply put the word in double square brackets, like this: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[[Sandbox]]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; .  Highlight text and using the &amp;quot;internal link&amp;quot; tool will do this as well.&lt;br /&gt;
&lt;br /&gt;
If you want to use words other than the article title as the text of the link, you can do so by adding the pipe &amp;quot;|&amp;quot; divider followed by the alternative name or text.&lt;br /&gt;
&lt;br /&gt;
For example, if you wanted to make a link to the [[Sandbox]], but wanted it to say &amp;quot;my text&amp;quot; you would write it as: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[[Sandbox|my text]]&amp;lt;/nowiki&amp;gt;...&amp;lt;/code&amp;gt; It would appear as: [[Sandbox|my text]]... but would link to the sandbox.&lt;br /&gt;
&lt;br /&gt;
=== External links ===&lt;br /&gt;
&lt;br /&gt;
The easiest way to make an external link is to simply type in the full URL for the page you want to link to e.g. http://moodle.com.&lt;br /&gt;
&lt;br /&gt;
To make the link display something other than the URL, use one square bracket at each end. If you want to make a link to moodle.com, type &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[http://moodle.com/]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
This will display the link as a number in brackets, like this: [http://moodle.com/].  There is also the external link tool which can also assist you.&lt;br /&gt;
&lt;br /&gt;
If you want the link to appear with text that you specify, add an alternative title after the address separated by a &#039;&#039;&#039;space&#039;&#039;&#039; (&#039;&#039;not&#039;&#039; a pipe). So if you want the link to appear as [http://moodle.com Moodle], just type &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[http://moodle.com Moodle] &amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Categories links===&lt;br /&gt;
A category is a type of index page, a page of links listed in alphabetical order. In page view mode, a list of catagories that a page is linked to, appears at the bottom.&lt;br /&gt;
To put a page in a category, just type &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[[Category:]]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, and put the name of the category between the colon and the brackets.&lt;br /&gt;
&lt;br /&gt;
To link directly to a category use &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[[:Category:Teacher | teacher]]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, this will show as [[:Category:Teacher | teacher]], note the preceding &amp;quot;:&amp;quot;, which is different to &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[[Category:Teacher | teacher]]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;. The second will put the current page in the teacher category as mentioned above.&lt;br /&gt;
&lt;br /&gt;
This page is linked to the single catagory &amp;quot;MoodleDocs&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Inter-language links===&lt;br /&gt;
&lt;br /&gt;
Simply type &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[[es:Corresponding page title in Spanish]]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; in the English Moodle Docs, or &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[[en:Corresponding page title in English]]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; in the [[:es:Portada|Spanish Moodle Docs]], at the bottom of the page, below the category link. Inter-language links will appear automatically in the &amp;quot;In other languages&amp;quot; block.&lt;br /&gt;
&lt;br /&gt;
===User-page links===&lt;br /&gt;
User names can be linked to a user page.  For example &amp;lt;nowiki&amp;gt;[[User:Helen Foster|Helen Foster]] &amp;lt;/nowiki&amp;gt; will appear [[User:Helen Foster|Helen Foster]] and link to the user&#039;s page. Comments by other users are generally left on the Users page comment tab.&lt;br /&gt;
&lt;br /&gt;
==Page comments==&lt;br /&gt;
The page comment tab is used for discussion about the page.  Sometimes before making an edit on the page for the first time, it is a good idea to check the page comments. It can be formatted the same as a main page, thus can be used to show a draft of a proposed change.&lt;br /&gt;
&lt;br /&gt;
Talk page contributions may be signed and dated by typing four tildes &amp;lt;nowiki&amp;gt;~~~~&amp;lt;/nowiki&amp;gt;. This will appear as [[User:Helen Foster|Helen Foster]] 06:35, 19 February 2006 (WST), for example.&lt;br /&gt;
&lt;br /&gt;
==Page history==&lt;br /&gt;
The page history tab allows a way to look at changes between different edits. It is also possible to revert (roll back) an edit to a previous version.  Usually this is left to the administrator, but you certainly can rollback your recent edits.   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Watch and unwatch page==&lt;br /&gt;
A watched page will appear on &amp;quot;my watchlist&amp;quot; when ever someone edits the page. There is a tab next to history which acts as a toggle between watch and unwatch. There is also at the bottom of the page in edit mode a &amp;quot;Watch this page&amp;quot; check off box.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[http://meta.wikimedia.org/wiki/Help:Editing MediaWiki Help:Editing]&lt;br /&gt;
*[http://meta.wikimedia.org/wiki/Help:HTML_in_wikitext Help:HTML in wikitext]&lt;br /&gt;
*[http://diberri.dyndns.org/html2wiki.html HTML to MediaWiki converter]&lt;br /&gt;
*[http://wikipedia.mozdev.org/ Firefox Wikipedia extension] - The Wikipedia extension makes editing of  wiki pages easier by adding a new toolbar to your browser and by providing new menu items in the context menu (right mouse key).&lt;br /&gt;
*[[Wiki module]] for the wiki included as part of the standard Moodle&lt;br /&gt;
&lt;br /&gt;
[[Category:MoodleDocs]]&lt;br /&gt;
&lt;br /&gt;
[[es:Ayuda:Cómo se edita una página]]&lt;br /&gt;
[[fr:Aide:Comment éditer une page]]&lt;br /&gt;
[[ja:Help:編集方法]]&lt;br /&gt;
[[nl:Meehelpen]]&lt;br /&gt;
[[ru:Справка:Редактирование]]&lt;/div&gt;</summary>
		<author><name>Robek</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/404/en/index.php?title=Database_activity&amp;diff=33293</id>
		<title>Database activity</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/404/en/index.php?title=Database_activity&amp;diff=33293"/>
		<updated>2008-03-07T14:39:17Z</updated>

		<summary type="html">&lt;p&gt;Robek: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[ru: База_данных]]&lt;br /&gt;
{{Databases}}&lt;br /&gt;
{{Moodle 1.6}}&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;Database module&#039;&#039;&#039; [[Teacher_documentation#Activity_modules|activity]] allows the teacher and/or students to build, display and search a bank of record entries about any conceivable topic. The format and structure of these entries can be almost unlimited, including images, files, URLs, numbers and text amongst other things. &lt;br /&gt;
&lt;br /&gt;
This module will create one table for instance, but you may create as many instances you need. The records can be linked to other tables and all resources in the course, if you allow autolink in a name field, but you cannot build a SQL query. &lt;br /&gt;
&lt;br /&gt;
The table is not created in the SQL database, it is just stored there in lines of other SQL tables (mdl_data*). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to use the database module ==&lt;br /&gt;
* The first task is to [[Adding/editing_a_database|add the database]]. You will be asked to give it a name, provide some text explaining its intended purpose to users and set a few other options.&lt;br /&gt;
* Next you define the kind of [[Database fields|fields]] that define the information you wish to collect. For example a database of famous paintings may have a picture field called &#039;&#039;painting&#039;&#039;, for uploading an image file showing the painting, and two text fields called &#039;&#039;artist&#039;&#039; and &#039;&#039;title&#039;&#039; for the name of the artist and the painting.&lt;br /&gt;
* It is then optional to edit the [[Database templates|database templates]] to alter the way in which the database displays entries.&lt;br /&gt;
* Note that if you later edit the fields in the databases you must use the Reset template button, or manually edit the template, to ensure the new fields are added to the display&lt;br /&gt;
* the [[Teacher]] and/or [[Students]] can start entering data and (optionally) commenting on and grading other submissions. These entries can be viewed alone, viewed as a list or searched and sorted.&lt;br /&gt;
* Data can be uploaded into the database from a .csv file: &lt;br /&gt;
** Click the &#039;Add Entry&#039; tab&lt;br /&gt;
** At the bottom of the page there is a link &#039;Upload entries from a file&#039; which provides help in assigning data in a csv file to the relevant fields in your database.&lt;br /&gt;
&lt;br /&gt;
==Database and Roles==&lt;br /&gt;
&lt;br /&gt;
Since Moodle 1.7 a number of options in Database have been migrated over to the Roles system. For example, preventing students (or any other role) submitting data must be done by overriding the role for that particular instance of the Database. However, do note that by default teachers are unable to override roles and this ability must first be granted by your Administrator for the course or site as appropriate.&lt;br /&gt;
&lt;br /&gt;
== Example databases ==&lt;br /&gt;
&lt;br /&gt;
Moodle.org has three good examples of the database module in action:&lt;br /&gt;
&lt;br /&gt;
* [http://moodle.org/mod/data/view.php?id=6140 Moodle Buzz], a database of the titles, authors and web links to news articles mentioning Moodle&lt;br /&gt;
* [http://moodle.org/mod/data/view.php?d=26 Themes], a database with screenshots, download links and user comments about Moodle [[Themes|themes]]&lt;br /&gt;
* [http://moodle.org/mod/data/view.php?d=13 Modules and plugins], a database containing a variety of web links (download, documentation, discussion) and info (maintainer, module type, requirements) about the modular components of Moodle, including those created by third parties.&lt;br /&gt;
&lt;br /&gt;
== Creative uses ==&lt;br /&gt;
&lt;br /&gt;
You could use the database module to:&lt;br /&gt;
&lt;br /&gt;
* allow collaboration on building a collection of web links/books/journal references related to a particular subject&lt;br /&gt;
* display student created photos/posters/websites/poems for peer comment and review&lt;br /&gt;
* gather comments and votes on a shortlist of potential logos/mascot names/project ideas&lt;br /&gt;
* provide a [http://moodle.org/mod/forum/discuss.php?d=52699 student file storage area]&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Glossary module]], which performs a similar though more specialised, text-based role&lt;br /&gt;
* Using Moodle [http://moodle.org/mod/forum/view.php?id=3505 Database module forum]&lt;br /&gt;
* [http://treadwell.cce.cornell.edu/moodle_doc/database_moodle/index.html Screencast introducing the Database Module and walking through creating a database]&lt;br /&gt;
Using Moodle forum discussions:&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=72260 Database Module: Each learner Private DB?]&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=84487 Database for Dummies please!]&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=89117 Restricting access to database content by user?]&lt;br /&gt;
&lt;br /&gt;
[[Category:Modules]]&lt;br /&gt;
&lt;br /&gt;
[[es:Base_de_datos_%28m%C3%B3dulo%29]]&lt;br /&gt;
[[eu:Datu-basea]]&lt;br /&gt;
[[fr:Base de données]]&lt;br /&gt;
[[cs:Modul Databáze]]&lt;br /&gt;
[[ja:データベースモジュール]]&lt;/div&gt;</summary>
		<author><name>Robek</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/404/en/index.php?title=Database_activity&amp;diff=33292</id>
		<title>Database activity</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/404/en/index.php?title=Database_activity&amp;diff=33292"/>
		<updated>2008-03-07T14:36:23Z</updated>

		<summary type="html">&lt;p&gt;Robek: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[ru: База_данных]]&lt;br /&gt;
[[pl: baza danych]]&lt;br /&gt;
{{Databases}}&lt;br /&gt;
{{Moodle 1.6}}&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;Database module&#039;&#039;&#039; [[Teacher_documentation#Activity_modules|activity]] allows the teacher and/or students to build, display and search a bank of record entries about any conceivable topic. The format and structure of these entries can be almost unlimited, including images, files, URLs, numbers and text amongst other things. &lt;br /&gt;
&lt;br /&gt;
This module will create one table for instance, but you may create as many instances you need. The records can be linked to other tables and all resources in the course, if you allow autolink in a name field, but you cannot build a SQL query. &lt;br /&gt;
&lt;br /&gt;
The table is not created in the SQL database, it is just stored there in lines of other SQL tables (mdl_data*). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to use the database module ==&lt;br /&gt;
* The first task is to [[Adding/editing_a_database|add the database]]. You will be asked to give it a name, provide some text explaining its intended purpose to users and set a few other options.&lt;br /&gt;
* Next you define the kind of [[Database fields|fields]] that define the information you wish to collect. For example a database of famous paintings may have a picture field called &#039;&#039;painting&#039;&#039;, for uploading an image file showing the painting, and two text fields called &#039;&#039;artist&#039;&#039; and &#039;&#039;title&#039;&#039; for the name of the artist and the painting.&lt;br /&gt;
* It is then optional to edit the [[Database templates|database templates]] to alter the way in which the database displays entries.&lt;br /&gt;
* Note that if you later edit the fields in the databases you must use the Reset template button, or manually edit the template, to ensure the new fields are added to the display&lt;br /&gt;
* the [[Teacher]] and/or [[Students]] can start entering data and (optionally) commenting on and grading other submissions. These entries can be viewed alone, viewed as a list or searched and sorted.&lt;br /&gt;
* Data can be uploaded into the database from a .csv file: &lt;br /&gt;
** Click the &#039;Add Entry&#039; tab&lt;br /&gt;
** At the bottom of the page there is a link &#039;Upload entries from a file&#039; which provides help in assigning data in a csv file to the relevant fields in your database.&lt;br /&gt;
&lt;br /&gt;
==Database and Roles==&lt;br /&gt;
&lt;br /&gt;
Since Moodle 1.7 a number of options in Database have been migrated over to the Roles system. For example, preventing students (or any other role) submitting data must be done by overriding the role for that particular instance of the Database. However, do note that by default teachers are unable to override roles and this ability must first be granted by your Administrator for the course or site as appropriate.&lt;br /&gt;
&lt;br /&gt;
== Example databases ==&lt;br /&gt;
&lt;br /&gt;
Moodle.org has three good examples of the database module in action:&lt;br /&gt;
&lt;br /&gt;
* [http://moodle.org/mod/data/view.php?id=6140 Moodle Buzz], a database of the titles, authors and web links to news articles mentioning Moodle&lt;br /&gt;
* [http://moodle.org/mod/data/view.php?d=26 Themes], a database with screenshots, download links and user comments about Moodle [[Themes|themes]]&lt;br /&gt;
* [http://moodle.org/mod/data/view.php?d=13 Modules and plugins], a database containing a variety of web links (download, documentation, discussion) and info (maintainer, module type, requirements) about the modular components of Moodle, including those created by third parties.&lt;br /&gt;
&lt;br /&gt;
== Creative uses ==&lt;br /&gt;
&lt;br /&gt;
You could use the database module to:&lt;br /&gt;
&lt;br /&gt;
* allow collaboration on building a collection of web links/books/journal references related to a particular subject&lt;br /&gt;
* display student created photos/posters/websites/poems for peer comment and review&lt;br /&gt;
* gather comments and votes on a shortlist of potential logos/mascot names/project ideas&lt;br /&gt;
* provide a [http://moodle.org/mod/forum/discuss.php?d=52699 student file storage area]&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Glossary module]], which performs a similar though more specialised, text-based role&lt;br /&gt;
* Using Moodle [http://moodle.org/mod/forum/view.php?id=3505 Database module forum]&lt;br /&gt;
* [http://treadwell.cce.cornell.edu/moodle_doc/database_moodle/index.html Screencast introducing the Database Module and walking through creating a database]&lt;br /&gt;
Using Moodle forum discussions:&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=72260 Database Module: Each learner Private DB?]&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=84487 Database for Dummies please!]&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=89117 Restricting access to database content by user?]&lt;br /&gt;
&lt;br /&gt;
[[Category:Modules]]&lt;br /&gt;
&lt;br /&gt;
[[es:Base_de_datos_%28m%C3%B3dulo%29]]&lt;br /&gt;
[[eu:Datu-basea]]&lt;br /&gt;
[[fr:Base de données]]&lt;br /&gt;
[[cs:Modul Databáze]]&lt;br /&gt;
[[ja:データベースモジュール]]&lt;/div&gt;</summary>
		<author><name>Robek</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/404/en/index.php?title=Development:Multilang_filter&amp;diff=18553</id>
		<title>Development:Multilang filter</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/404/en/index.php?title=Development:Multilang_filter&amp;diff=18553"/>
		<updated>2006-12-12T01:10:00Z</updated>

		<summary type="html">&lt;p&gt;Robek: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Currently the multilang filter breaks the cache system. The &amp;quot;lang&amp;quot; concept should be included in the mechanism to be able to cache contents when such filter is enabled.&lt;br /&gt;
&lt;br /&gt;
New comment by Robert Brenstein:&lt;br /&gt;
&lt;br /&gt;
With the introduction of unicode, the filter got rewritten and now works for all languages. So, this caching problem is gone and the following text has only historical value.&lt;br /&gt;
&lt;br /&gt;
Written by Robert Brenstein: &lt;br /&gt;
&lt;br /&gt;
I am not a proper Moodle developer, so I may be missing something very obvious, but since I was forced to occupy myself with functioning of format_text() function recently, I have also pondered the problem of caching multilang strings. &lt;br /&gt;
&lt;br /&gt;
My interpretation of current setup is that multilang disables caching because the md5 key used by in the format_text() to identify cached entries is based on the text of cached items. In the case of filtered items, the text is changed by the filter called in the middle of format_text(), so the correct key cannot be ascerned upon entry to format_text(), that is before the text was processed by the filter. Catch 22 so to speak.&lt;br /&gt;
&lt;br /&gt;
An approach to change this could be:&lt;br /&gt;
&lt;br /&gt;
First, add language code to md5 key calculation in addition to all the $option parms that were recently added. &lt;br /&gt;
&lt;br /&gt;
Second, base md5 key not on the filtered text but on the original text passed to the format_text() function.&lt;br /&gt;
&lt;br /&gt;
These two combined should provide unique key values and catch all text and language changes while allowing the cache to function as expected.&lt;br /&gt;
&lt;br /&gt;
In case dual behavior needs to be maintained, for example, to bypass caching when another filter is called, or to avoid any unexpected side-effects of this change, an extra parameter to format_text() function can be added, initialized as default to NULL, for example, so if it is NULL, the current behavior remains in effect. It would be then up to the caller to activate the alternative behavior. This approach would allow more than one alternative behavior.&lt;br /&gt;
&lt;br /&gt;
A simpler variant could be for format_text() to check upon entry whether multilang filter is enabled and modify its behavior accordingly. In that case, adding the state of multilang filter to the string used to generate the md5 key would be desired. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;/div&gt;</summary>
		<author><name>Robek</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/404/en/index.php?title=Development_talk:Roles&amp;diff=9979</id>
		<title>Development talk:Roles</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/404/en/index.php?title=Development_talk:Roles&amp;diff=9979"/>
		<updated>2006-05-22T01:04:03Z</updated>

		<summary type="html">&lt;p&gt;Robek: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The list of capabilities for some activities should include viewing as a separate capability since it is a distinct action from editing or taking part, for example&lt;br /&gt;
&lt;br /&gt;
choice_canviewresults&lt;/div&gt;</summary>
		<author><name>Robek</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/404/en/index.php?title=Development_talk:Roles&amp;diff=9978</id>
		<title>Development talk:Roles</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/404/en/index.php?title=Development_talk:Roles&amp;diff=9978"/>
		<updated>2006-05-22T01:03:04Z</updated>

		<summary type="html">&lt;p&gt;Robek: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The list of capabilities for some activities should include viewing as a separate capability since it is a distinct action from editing or taking part, for example&lt;br /&gt;
&lt;br /&gt;
choice_viewresults&lt;/div&gt;</summary>
		<author><name>Robek</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/404/en/index.php?title=Development:Multilang_filter&amp;diff=7655</id>
		<title>Development:Multilang filter</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/404/en/index.php?title=Development:Multilang_filter&amp;diff=7655"/>
		<updated>2006-03-27T23:23:10Z</updated>

		<summary type="html">&lt;p&gt;Robek: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Currently the multilang filter breaks the cache system. The &amp;quot;lang&amp;quot; concept should be included in the mechanism to be able to cache contents when such filter is enabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Written by Robert Brenstein: &lt;br /&gt;
&lt;br /&gt;
I am not a proper Moodle developer, so I may be missing something very obvious, but since I was forced to occupy myself with functioning of format_text() function recently, I have also pondered the problem of caching multilang strings. &lt;br /&gt;
&lt;br /&gt;
My interpretation of current setup is that multilang disables caching because the md5 key used by in the format_text() to identify cached entries is based on the text of cached items. In the case of filtered items, the text is changed by the filter called in the middle of format_text(), so the correct key cannot be ascerned upon entry to format_text(), that is before the text was processed by the filter. Catch 22 so to speak.&lt;br /&gt;
&lt;br /&gt;
An approach to change this could be:&lt;br /&gt;
&lt;br /&gt;
First, add language code to md5 key calculation in addition to all the $option parms that were recently added. &lt;br /&gt;
&lt;br /&gt;
Second, base md5 key not on the filtered text but on the original text passed to the format_text() function.&lt;br /&gt;
&lt;br /&gt;
These two combined should provide unique key values and catch all text and language changes while allowing the cache to function as expected.&lt;br /&gt;
&lt;br /&gt;
In case dual behavior needs to be maintained, for example, to bypass caching when another filter is called, or to avoid any unexpected side-effects of this change, an extra parameter to format_text() function can be added, initialized as default to NULL, for example, so if it is NULL, the current behavior remains in effect. It would be then up to the caller to activate the alternative behavior. This approach would allow more than one alternative behavior.&lt;br /&gt;
&lt;br /&gt;
A simpler variant could be for format_text() to check upon entry whether multilang filter is enabled and modify its behavior accordingly. In that case, adding the state of multilang filter to the string used to generate the md5 key would be desired. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;/div&gt;</summary>
		<author><name>Robek</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/404/en/index.php?title=Development:Multilang_filter&amp;diff=7654</id>
		<title>Development:Multilang filter</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/404/en/index.php?title=Development:Multilang_filter&amp;diff=7654"/>
		<updated>2006-03-27T23:19:12Z</updated>

		<summary type="html">&lt;p&gt;Robek: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Currently the multilang filter breaks the cache system. The &amp;quot;lang&amp;quot; concept should be included in the mechanism to be able to cache contents when such filter is enabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Written by Robert Brenstein: &lt;br /&gt;
&lt;br /&gt;
I am not a proper Moodle developer, so I may be missing something very obvious, but since I was forced to occupy myself with functioning of format_text() function recently, I have also pondered the problem of caching multilang strings. &lt;br /&gt;
&lt;br /&gt;
My interpretation of current setup is that multilang disables caching because the md5 key used by in the format_text() to identify cached entries is based on the text of cached items. In the case of filtered items, the text is changed by the filter called in the middle of format_text(), so the correct key cannot be ascerned upon entry to format_text(), that is before the text was processed by the filter. Catch 22 so to speak.&lt;br /&gt;
&lt;br /&gt;
An approach to change this could be:&lt;br /&gt;
&lt;br /&gt;
First, add language code to md5 key calculation in addition to all the $option parms that were recently added. &lt;br /&gt;
&lt;br /&gt;
Second, base md5 key not on the filtered text but on the original text passed to the format_text() function.&lt;br /&gt;
&lt;br /&gt;
These two combined should provide unique key values and catch all text and language changes while allowing the cache to function as expected.&lt;br /&gt;
&lt;br /&gt;
In case dual behavior needs to be maintained, for example, to bypass caching when another filter is called, or to avoid any unexpected side-effects of this change, an extra parameter to format_text() function can be added, initialized as default to NULL, for example, so if it is NULL, the current behavior remains in effect. It would be then up to the caller to activate the alternative behavior. This approach would allow more than one alternative behavior.&lt;br /&gt;
&lt;br /&gt;
A simpler variant could be for format_text() to check upon entry whether multilang filter is enabled and modify its behavior accordingly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;/div&gt;</summary>
		<author><name>Robek</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/404/en/index.php?title=Development:Multilang_filter&amp;diff=7653</id>
		<title>Development:Multilang filter</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/404/en/index.php?title=Development:Multilang_filter&amp;diff=7653"/>
		<updated>2006-03-27T23:09:53Z</updated>

		<summary type="html">&lt;p&gt;Robek: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Currently the multilang filter breaks the cache system. The &amp;quot;lang&amp;quot; concept should be included in the mechanism to be able to cache contents when such filter is enabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Written by Robert Brenstein: &lt;br /&gt;
&lt;br /&gt;
I am not a proper Moodle developer, so I may be missing something very obvious, but since I was forced to occupy myself with functioning of format_text() function recently, I have also pondered the problem of caching multilang strings. &lt;br /&gt;
&lt;br /&gt;
My interpretation of current setup is that multilang disables caching because the md5 key used by in the format_text() to identify cached entries is based on the text of cached items. In the case of filtered items, the text is changed by the filter called in the middle of format_text(), so the correct key cannot be ascerned upon entry to format_text(), that is before the text was processed by the filter. Catch 22 so to speak.&lt;br /&gt;
&lt;br /&gt;
An approach to change this could be:&lt;br /&gt;
&lt;br /&gt;
First, add language code to md5 key calculation in addition to all the $option parms that were recently added. &lt;br /&gt;
&lt;br /&gt;
Second, base md5 key not on the filtered text but on the original text passed to the format_text() function.&lt;br /&gt;
&lt;br /&gt;
These two combined should provide unique key values and catch all text and language changes while allowing the cache to function as expected.&lt;br /&gt;
&lt;br /&gt;
In case dual behavior needs to be maintained, for example, to bypass caching when another filter is called, or to avoid any unexpected side-effects of this change, an extra parameter to format_text() function can be added, initialized as default to NULL, for example, so if it is NULL, the current behavior remains in effect. It would be then up to the caller to activate the alternative behavior (more than one could actually be possible).&lt;br /&gt;
&lt;br /&gt;
A variant of the latter would be to add a twin function, format_text2() or format_text_multi() or else, which would be called in place of the standard one when the modified behavior is needed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;/div&gt;</summary>
		<author><name>Robek</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/404/en/index.php?title=Development:Multilang_filter&amp;diff=7652</id>
		<title>Development:Multilang filter</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/404/en/index.php?title=Development:Multilang_filter&amp;diff=7652"/>
		<updated>2006-03-27T23:09:24Z</updated>

		<summary type="html">&lt;p&gt;Robek: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Currently the multilang filter breaks the cache system. The &amp;quot;lang&amp;quot; concept should be included in the mechanism to be able to cache contents when such filter is enabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Written by Robert Brenstein: &lt;br /&gt;
&lt;br /&gt;
I am not a proper Moodle developer, so I may be missing something very obvious, but since I was forced to occupy myself with functioning of format_text() function recently, I have also pondered the problem of caching multilang strings. &lt;br /&gt;
&lt;br /&gt;
My interpretation of current setup is that multilang disables caching because the md5 key used by in the format_text() to identify cached entries is based on the text of cached items. In the case of filtered items, the text is changed by the filter called in the middle of format_text(), so the correct key cannot be ascerned upon entry to format_text(), that is before the text was processed by the filter. Catch 22 so to speak.&lt;br /&gt;
&lt;br /&gt;
An approach to change this could be:&lt;br /&gt;
&lt;br /&gt;
First, add language code to md5 key calculation in addition to all the $option parms that were recently added. &lt;br /&gt;
&lt;br /&gt;
Second, base md5 key not on the filtered text but on the original text passed to the format_text() function.&lt;br /&gt;
&lt;br /&gt;
These two combined should provide unique key values and catch all text and language changes while allowing the cache to function as expected.&lt;br /&gt;
&lt;br /&gt;
In case dual behavior needs to be maintained, for example, to bypass caching when another filter is called, or to avoid any unexpected side-effects of this change, an extra parameter to format_text() function can be added, initialized as default to NULL, for example, so if it is NULL, the current behavior remains in effect. It would be then up to the caller to activate the alternative behavior (more than one could actually be possible).&lt;br /&gt;
&lt;br /&gt;
A variant of the latters would be to add a twin function, format_text2() or format_text_multi() or else, which would be called in place of the standard one when the modified behavior is needed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;/div&gt;</summary>
		<author><name>Robek</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/404/en/index.php?title=Development:Multilang_filter&amp;diff=7651</id>
		<title>Development:Multilang filter</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/404/en/index.php?title=Development:Multilang_filter&amp;diff=7651"/>
		<updated>2006-03-27T23:07:51Z</updated>

		<summary type="html">&lt;p&gt;Robek: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Currently the multilang filter breaks the cache system. The &amp;quot;lang&amp;quot; concept should be included in the mechanism to be able to cache contents when such filter is enabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Written by Robert Brenstein: &lt;br /&gt;
&lt;br /&gt;
I am not a proper Moodle developer, so I may be missing something very obvious, but since I was forced to occupy myself with functioning of format_text() function recently, I have also pondered the problem of caching multilang strings. &lt;br /&gt;
&lt;br /&gt;
My interpretation of current setup is that multilang disables caching because the md5 key used by in the format_text() to identify cached entries is based on the text of cached items. In the case of filtered items, the text is changed by the filter called in the middle of format_text(), so the correct key cannot be ascerned upon entry to format_text(), that is before the text was processed by the filter. Catch 22 so to speak.&lt;br /&gt;
&lt;br /&gt;
An approach to change this could be:&lt;br /&gt;
&lt;br /&gt;
First, add language code to md5 key calculation in addition to all the $option parms that were recently added. &lt;br /&gt;
&lt;br /&gt;
Second, base md5 key not on the filtered text but on the original text passed to the format_text() function.&lt;br /&gt;
&lt;br /&gt;
These two combined should provide unique key values and catch all text and language changes while allowing the cache to function as expected.&lt;br /&gt;
&lt;br /&gt;
In case dual behavior needs to be maintained, for example, to bypass caching when another filter is called, or to avoid any unexpected side-effects of this change, an extra parameter to format_text() function can be added, initialized as default to NULL, for example, so if it is NULL, the current behavior remains in effect. It would be then up to the caller to activate the alternative behavior (more than one could actually be possible).&lt;br /&gt;
&lt;br /&gt;
A variant of this would be to add a twin function, format_text2() or format_text_multi() or else, which would be called in place of the standard one when the modified behavior is needed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;/div&gt;</summary>
		<author><name>Robek</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/404/en/index.php?title=Development:Multilang_filter&amp;diff=7650</id>
		<title>Development:Multilang filter</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/404/en/index.php?title=Development:Multilang_filter&amp;diff=7650"/>
		<updated>2006-03-27T23:07:21Z</updated>

		<summary type="html">&lt;p&gt;Robek: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Currently the multilang filter breaks the cache system. The &amp;quot;lang&amp;quot; concept should be included in the mechanism to be able to cache contents when such filter is enabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Written by Robert Brenstein: &lt;br /&gt;
&lt;br /&gt;
I am not a proper Moodle developer, so I may be missing something very obvious, but since I was forced to occupy myself with functioning of format_text() function recently, I have also pondered the problem of caching multilang strings. &lt;br /&gt;
&lt;br /&gt;
My interpretation of current setup is that multilang disables caching because the md5 key used by in the format_text() to identify cached entries is based on the text of cached items. In the case of filtered items, the text is changed by the filter called in the middle of format_text(), so the correct key cannot be ascerned upon entry to format_text(), that is before the text was processed by the filter. Catch 22 so to speak.&lt;br /&gt;
&lt;br /&gt;
An approach to change this could be:&lt;br /&gt;
&lt;br /&gt;
First, add language code to md5 key calculation in addition to all the $option parms that were recently added. &lt;br /&gt;
&lt;br /&gt;
Second, base md5 key not on the filtered text but on the original text passed to format_text() function.&lt;br /&gt;
&lt;br /&gt;
These two combined should provide unique key values and catch all text and language changes while allowing the cache to function as expected.&lt;br /&gt;
&lt;br /&gt;
In case dual behavior needs to be maintained, for example, to bypass caching when another filter is called, or to avoid any unexpected side-effects of this change, an extra parameter to format_text() function can be added, initialized as default to NULL, for example, so if it is NULL, the current behavior remains in effect. It would be then up to the caller to activate the alternative behavior (more than one could actually be possible).&lt;br /&gt;
&lt;br /&gt;
A variant of this would be to add a twin function, format_text2() or format_text_multi() or else, which would be called in place of the standard one when the modified behavior is needed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;/div&gt;</summary>
		<author><name>Robek</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/404/en/index.php?title=Development:Multilang_filter&amp;diff=7649</id>
		<title>Development:Multilang filter</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/404/en/index.php?title=Development:Multilang_filter&amp;diff=7649"/>
		<updated>2006-03-27T23:06:07Z</updated>

		<summary type="html">&lt;p&gt;Robek: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Currently the multilang filter breaks the cache system. The &amp;quot;lang&amp;quot; concept should be included in the mechanism to be able to cache contents when such filter is enabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Written by Robert Brenstein: &lt;br /&gt;
&lt;br /&gt;
I am not a proper Moodle developer, so I may be missing something very obvious, but since I was forced to occupy myself with functioning of format_text() function recently, I have also pondered the problem of caching multilang strings. &lt;br /&gt;
&lt;br /&gt;
My interpretation of current setup is that multilang disables caching because the md5 key used by in the format_text() to identify cached entries is based on the text of cached items. In the case of filtered items, the text is changed by the filter called in the middle of format_text(), so the correct key cannot be ascerned upon entry to format_text(), that is before the text was processed by the filter. Catch 22 so to speak.&lt;br /&gt;
&lt;br /&gt;
An approach to change this could be:&lt;br /&gt;
&lt;br /&gt;
First, add language code to md5 key calculation in addition to all the $option parms that were recently added. &lt;br /&gt;
&lt;br /&gt;
Second, base md5 key not on the filtered text but on the original text passed to format_text() function.&lt;br /&gt;
&lt;br /&gt;
These two combined should provide unique key values and catch all text and language changes.&lt;br /&gt;
&lt;br /&gt;
In case dual behavior needs to be maintained, for example, to bypass caching when another filter is called, or to avoid any unexpected side-effects of this change, an extra parameter to format_text() function can be added, initialized as default to NULL, for example, so if it is NULL, the current behavior remains in effect. It would be then up to the caller to activate the alternative behavior (more than one could actually be possible).&lt;br /&gt;
&lt;br /&gt;
A variant of this would be to add a twin function, format_text2() or format_text_multi() or else, which would be called in place of the standard one when the modified behavior is needed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;/div&gt;</summary>
		<author><name>Robek</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/404/en/index.php?title=Development:Multilang_filter&amp;diff=7648</id>
		<title>Development:Multilang filter</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/404/en/index.php?title=Development:Multilang_filter&amp;diff=7648"/>
		<updated>2006-03-27T22:56:56Z</updated>

		<summary type="html">&lt;p&gt;Robek: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Currently the multilang filter breaks the cache system. The &amp;quot;lang&amp;quot; concept should be included in the mechanism to be able to cache contents when such filter is enabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Written by Robert Brenstein: &lt;br /&gt;
&lt;br /&gt;
I am not a proper Moodle developer, so I may be missing something very obvious, but since I was forced to occupy myself with functioning of format_text() function recently, I have also pondered the problem of caching multilang strings. &lt;br /&gt;
&lt;br /&gt;
My interpretation of current setup is that multilang disables caching because the md5 key used by in the format_text() to identify cached entries is based on the text of cached items. In the case of filtered items, the text is changed by the filter called in the middle of format_text(), so the correct key cannot be ascerned upon entry to format_text(), that is before the text was processed by the filter. Catch 22 so to speak.&lt;br /&gt;
&lt;br /&gt;
An approach to change this could be:&lt;br /&gt;
&lt;br /&gt;
First, add language code to md5 key calculation in addition to all the $option parms that were recently added. &lt;br /&gt;
&lt;br /&gt;
Second, base md5 key not on the filtered text but on the original text passed to format_text() function.&lt;br /&gt;
&lt;br /&gt;
These two combined should provide unique key values and catch all text and language changes.&lt;br /&gt;
&lt;br /&gt;
In case dual behavior need to be maintained, for example to bypass caching when another filter is called as well as to avoid any unexpected side-effects of this change, an extra parameter to format_text() function can be added, initialized as default to NULL, for example, so if it is NULL, the current behavior remains in effect. It would be then up to the caller to activate alternative behavior (more than one could actually be possible).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;/div&gt;</summary>
		<author><name>Robek</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/404/en/index.php?title=Development:Multilang_filter&amp;diff=7647</id>
		<title>Development:Multilang filter</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/404/en/index.php?title=Development:Multilang_filter&amp;diff=7647"/>
		<updated>2006-03-27T22:55:56Z</updated>

		<summary type="html">&lt;p&gt;Robek: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Currently the multilang filter breaks the cache system. The &amp;quot;lang&amp;quot; concept should be included in the mechanism to be able to cache contents when such filter is enabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Written by Robert Brenstein: &lt;br /&gt;
&lt;br /&gt;
I am not a proper Moodle developer, so I may be missing something very obvious, but since I was forced to occupy myself with functioning of format_text() function, I have prondered the problem of caching multilang strings. &lt;br /&gt;
&lt;br /&gt;
My interpretation of current setup is that multilang disables caching because the md5 key used by in the format_text() to identify cached entries is based on the text of cached items. In the case of filtered items, the text is changed by the filter called in the middle of format_text(), so the correct key cannot be ascerned upon entry to format_text(), that is before the text was processed by the filter. Catch 22 so to speak.&lt;br /&gt;
&lt;br /&gt;
An approach to change this could be:&lt;br /&gt;
&lt;br /&gt;
First, add language code to md5 key calculation in addition to all the $option parms that were recently added. &lt;br /&gt;
&lt;br /&gt;
Second, base md5 key not on the filtered text but on the original text passed to format_text() function.&lt;br /&gt;
&lt;br /&gt;
These two combined should provide unique key values and catch all text and language changes.&lt;br /&gt;
&lt;br /&gt;
In case dual behavior need to be maintained, for example to bypass caching when another filter is called as well as to avoid any unexpected side-effects of this change, an extra parameter to format_text() function can be added, initialized as default to NULL, for example, so if it is NULL, the current behavior remains in effect. It would be then up to the caller to activate alternative behavior (more than one could actually be possible).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;/div&gt;</summary>
		<author><name>Robek</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/404/en/index.php?title=Development_talk:Filterall_support&amp;diff=7637</id>
		<title>Development talk:Filterall support</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/404/en/index.php?title=Development_talk:Filterall_support&amp;diff=7637"/>
		<updated>2006-03-27T22:04:11Z</updated>

		<summary type="html">&lt;p&gt;Robek: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Seems that Admin Block in Courses is omitted in the list and there are the following items that need to be filtered:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Your word for Teacher&lt;br /&gt;
&amp;lt;br /&amp;gt;Your word for Teachers&lt;br /&gt;
&amp;lt;br /&amp;gt;Your word for Student&lt;br /&gt;
&amp;lt;br /&amp;gt;Your word for Students&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>Robek</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/404/en/index.php?title=Development_talk:Filterall_support&amp;diff=7636</id>
		<title>Development talk:Filterall support</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/404/en/index.php?title=Development_talk:Filterall_support&amp;diff=7636"/>
		<updated>2006-03-27T22:03:50Z</updated>

		<summary type="html">&lt;p&gt;Robek: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Seems that Admin Block in Courses is omitted in the list and there are the following items that need to be filtered:&lt;br /&gt;
&lt;br /&gt;
Your word for Teacher&lt;br /&gt;
&amp;lt;br /&amp;gt;Your word for Teachers&lt;br /&gt;
&amp;lt;br /Your word for Student&lt;br /&gt;
&amp;lt;br /&amp;gt;Your word for Students&lt;/div&gt;</summary>
		<author><name>Robek</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/404/en/index.php?title=Development_talk:Filterall_support&amp;diff=7635</id>
		<title>Development talk:Filterall support</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/404/en/index.php?title=Development_talk:Filterall_support&amp;diff=7635"/>
		<updated>2006-03-27T22:03:21Z</updated>

		<summary type="html">&lt;p&gt;Robek: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Seems that Admin Block in Courses is omitted in the list and there are the following items that need to be filtered:&lt;br /&gt;
&lt;br /&gt;
Your word for Teacher&lt;br /&gt;
Your word for Teachers&lt;br /&gt;
Your word for Student&lt;br /&gt;
Your word for Students&lt;/div&gt;</summary>
		<author><name>Robek</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/404/en/index.php?title=Development_talk:Filterall_support&amp;diff=7634</id>
		<title>Development talk:Filterall support</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/404/en/index.php?title=Development_talk:Filterall_support&amp;diff=7634"/>
		<updated>2006-03-27T22:01:40Z</updated>

		<summary type="html">&lt;p&gt;Robek: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Robek</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/404/en/index.php?title=Development_talk:Filterall_support&amp;diff=7633</id>
		<title>Development talk:Filterall support</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/404/en/index.php?title=Development_talk:Filterall_support&amp;diff=7633"/>
		<updated>2006-03-27T22:00:57Z</updated>

		<summary type="html">&lt;p&gt;Robek: Admin Block is missing&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Admin Block in Courses:&lt;br /&gt;
   Your word for Teacher&lt;br /&gt;
   Your word for Teachers&lt;br /&gt;
   Your word for Student&lt;br /&gt;
   Your word for Students&lt;/div&gt;</summary>
		<author><name>Robek</name></author>
	</entry>
</feed>