<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.moodle.org/21/en/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Odoardo</id>
	<title>MoodleDocs - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://docs.moodle.org/21/en/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Odoardo"/>
	<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/Special:Contributions/Odoardo"/>
	<updated>2026-04-24T20:22:37Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Cron&amp;diff=79048</id>
		<title>Cron</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Cron&amp;diff=79048"/>
		<updated>2010-12-10T06:58:26Z</updated>

		<summary type="html">&lt;p&gt;Odoardo: /* Starting cron */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Cron is the name of a Unix program that runs predefined tasks on a computer at regular intervals. It assists some of Moodle&#039;s modules to perform tasks on a scheduled basis. For example, the cron process might tell Moodle to check all discussion forums so it can mail out copies of new posts to people who have subscribed to that forum. &lt;br /&gt;
&lt;br /&gt;
The primary Moodle script that does all this is located in the admin directory, and is called cron.php. However, it can not tell itself to run, so you need to set up a mechanism where this script is run regularly (eg every five or ten minutes). This provides a &amp;quot;heartbeat&amp;quot; so that the script can perform functions at periods defined by each module. This kind of regular mechanism is known as a &#039;&#039;&#039;cron service&#039;&#039;&#039;. The service can be part of a webhost or can be something run from a different server or computer.&lt;br /&gt;
&lt;br /&gt;
==Overview of cron==&lt;br /&gt;
===Script overview===&lt;br /&gt;
&lt;br /&gt;
The cron.php script looks through the mdl_modules table (assuming the default table prefix is mdl_) in the Moodle database for modules scheduled to have their cron functions run; it then looks in each such module directory for a function called module-name_cron in the lib.php file and runs it.  It also looks through the mdl_block table for blocks scheduled for their cron methods (object functions) to be run; it then, for each such block, runs the cron method for a new object associated with that block (I&#039;m omitting details for the benefit of non-programmers; programmers can read admin/cron.php for themselves). These files (the lib.php files and the files where the block classes are defined) can contain cleanup functions, email functions or anything that needs to be run on a regular basis. For example, cron will trigger the system to create the backups of courses at the time specified in the administration settings. It also triggers any messaging module or forum email notifications, but not all functions are called each time the cron runs. Some functions, such as unenrolling students who have not logged in or deleting old copies of log files, are only run occasionally. The cron.php file has a section which will randomly call these core tasks approximately 1 in 5 times the cron runs.&lt;br /&gt;
&lt;br /&gt;
===Starting cron===&lt;br /&gt;
In Moodle 1.9 there are a number of way to invoke cron.php. Cron can be started from the address bar in a browser (URL usually ending in admin/cron.php), via a [[Daemon]], or wq1et, curl or some other code.&lt;br /&gt;
&lt;br /&gt;
The cron process can be protected by a password. &lt;br /&gt;
&lt;br /&gt;
The cronclionly Security &amp;gt; Site Policies setting with stop the browser URL trigger.  This sets Moodle so that cron.php cannot be invoked by the Moodle URL. See the illustration below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Menu: Security &amp;gt; Site policies&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodelcronadmin.png]]&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;TIP:&#039;&#039; While this is identified as CLI (command line interface) this is a bit misleading in that it does not mean that you have to be sitting at a shell account entering the command. If you enable this switch you can invoke cron.php through any set of batch or script files you wish,  but it must be invoked via its correct location in the operating systems file structure.  This can be especially frustrating for those not used to scripting in that environment is not typically provided.&lt;br /&gt;
&lt;br /&gt;
===Cron service location and timing===&lt;br /&gt;
Note that the machine performing the cron &#039;&#039;&#039;does not need to be the same machine that is running Moodle&#039;&#039;&#039;. For example, if you have a limited web hosting service that does not have a cron service, then you might choose to run cron on another server or on your home computer. All that matters is that the cron.php file is called regularly.&lt;br /&gt;
&lt;br /&gt;
The load of this script is not very high, so 5 minutes is usually reasonable, but if you&#039;re worried about it you can reduce the time period to something like 15 minutes or even 30 minutes. It&#039;s best not to make the time period too long, as delaying mail-outs can slow down activity within the course. Remember that mail-outs also wait for the editing time to expire before being queued for sending.&lt;br /&gt;
&lt;br /&gt;
===Testing cron and manual trigger===&lt;br /&gt;
&lt;br /&gt;
First, test that the script works by running it directly from your browser: &#039;&#039;&amp;lt;nowiki&amp;gt;http://example.com/moodle/admin/cron.php&amp;lt;/nowiki&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If cron is called from the command line by any user logged in to your Moodle it will create a temporary admin environment in order to run and then log the user out. You can disable command line running of cron by disabling the appropriate section in the cron.php file.&lt;br /&gt;
&lt;br /&gt;
Now, you need to set up some of way of running the script automatically and regularly.&lt;br /&gt;
&lt;br /&gt;
==Managing Cron on Windows systems==&lt;br /&gt;
&lt;br /&gt;
There are two different ways for setting-up Moodle cron.php on Windows systems:&lt;br /&gt;
&lt;br /&gt;
*Use the &#039;&#039;&#039;Moodle Cron package&#039;&#039;&#039;. The simplest way is to use this little package [http://download.moodle.org/download.php/windows/MoodleCron-Setup.exe MoodleCron-Setup.exe], which makes this whole thing very easy by installing a small Windows service. Run it and forget about it! :-)&lt;br /&gt;
*Use a &#039;&#039;&#039;Scheduled Task&#039;&#039;&#039;. If you prefer to use the built-in Windows Scheduler or are having trouble with moodle-cron-for-windows package, you can use wget for windows or php from the command line and setup a scheduled task. Just follow these steps:&lt;br /&gt;
** Choose either the &#039;&#039;&#039;php.exe/php-win.exe (command line binary)&#039;&#039;&#039; or &#039;&#039;&#039;wget&#039;&#039;&#039;&lt;br /&gt;
::The php.exe or php-win.exe binary (for PHP version 5 or later) is installed in your php folder (e.g. c:\php) will give you better performance when running the cron script.&lt;br /&gt;
::If you want to use wget, download a compiled version of wget for windows from the native GNU Win32 ports (http://unxutils.sourceforge.net/), from Heiko Herold&#039;s wget for windows page (http://xoomer.virgilio.it/hherold/) or Bart Puype&#039;s wget for windows page (http://users.ugent.be/~bpuype/wget/). If you use Heiko Herold&#039;s package, copy all of the .DLL files to your C:\Windows\system32 directory. Copy the wget.exe file to c:\windows (this makes sure wget is always in the search path).&lt;br /&gt;
:* Setup a &#039;&#039;&#039;Scheduled Task&#039;&#039;&#039;. &lt;br /&gt;
:: - Go to Start &amp;gt;&amp;gt; Control Panel &amp;gt;&amp;gt; Scheduled Tasks &amp;gt;&amp;gt; Add Scheduled Task.&lt;br /&gt;
:: - Click &amp;quot;Next&amp;quot; to start the wizard:&lt;br /&gt;
:: - Click in the &amp;quot;Browse...&amp;quot; button and browse to c:\php\php.exe or c:\windows\wget.exe and click &amp;quot;Open&amp;quot;&lt;br /&gt;
:: - Type &amp;quot;Moodle Cron&amp;quot; as the name of the task and select &amp;quot;Daily&amp;quot; as the schedule. Click &amp;quot;Next&amp;quot;.&lt;br /&gt;
:: - Select &amp;quot;12:00 AM&amp;quot; as the start time, perform the task &amp;quot;Every Day&amp;quot; and choose today&#039;s date as the starting date. Click &amp;quot;Next&amp;quot;.&lt;br /&gt;
:: - Enter the username and password of the user the task will run under (it doesn&#039;t have to be a priviledged account at all). Make sure you type the password correctly. Click &amp;quot;Next&amp;quot;.&lt;br /&gt;
:: - Mark the checkbox titled &amp;quot;Open advanced properties for this task when I click Finish&amp;quot; and click &amp;quot;Finish&amp;quot;.&lt;br /&gt;
:: - In the new dialog box, type the following in the &amp;quot;Run:&amp;quot; text box: &amp;lt;pre&amp;gt;c:\windows\wget.exe -q -O NUL http://my.moodle.site/moodle/admin/cron.php&amp;lt;/pre&amp;gt; or &amp;lt;pre&amp;gt;c:\php\php-win.exe -f c:\moodle\admin\cron.php&amp;lt;/pre&amp;gt; Replace &amp;quot;c:\moodle&amp;quot; with the path to your moodle directory or &amp;quot;my.moode.site&amp;quot; with the name of your site.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
:: - Click on the &amp;quot;Schedule&amp;quot; tab and there in the &amp;quot;Advanced...&amp;quot; button.&lt;br /&gt;
:: - Mark the &amp;quot;Repeat task&amp;quot; checkbox and set &amp;quot;Every:&amp;quot; to 5 minutes, and set &amp;quot;Until:&amp;quot; to &amp;quot;Duration&amp;quot; and type &amp;quot;23&amp;quot; hours and &amp;quot;59&amp;quot; minutes.&lt;br /&gt;
:: - Click &amp;quot;OK&amp;quot; and you are done.&lt;br /&gt;
* &#039;&#039;&#039;Test your scheduled task&#039;&#039;&#039;. You can test that your scheduled task can run successfully by clicking it with the right button and chosing &amp;quot;Run&amp;quot;. If everything is correctly setup, you will briefly see a DOS command window while wget/php executes and fetches the cron page and then it disappears. If you refresh the scheduled tasks folder, you will see the &#039;&#039;Last Run Time column&#039;&#039; (in detailed folder view) reflects the current time, and that the Last Result column displays &amp;quot;0x0&amp;quot; (everything went OK). If either of these is different, then you should recheck your setup.&lt;br /&gt;
* &#039;&#039;&#039;Logging cron output&#039;&#039;&#039;. You may want to log the output of the cron script as it executes, in case you see the job is producing errors, backups are not being completed or users are experiencing delays in receiving forum emails. To do this, adjust the command so that it uses the php.exe and stores the output in a file called (for example c:\moodle\admin\cron.log). Here is an example of the php.exe command:&lt;br /&gt;
&amp;lt;pre&amp;gt;c:\php\php.exe -f c:\moodle\admin\cron.php &amp;gt; c:\moodle\admin\cron.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you experience problems logging the output of cron.php to a text file using the above command then read [http://moodle.org/mod/forum/discuss.php?d=139263#p609060 this] message by Iñaki Arenaza for an alternative way to log the output of Cron.&lt;br /&gt;
&lt;br /&gt;
==Managing the cron job on Mac OS X with launchd==&lt;br /&gt;
&lt;br /&gt;
It&#039;s really important to start the cron job every 5 minutes. The cron job assists most of Moodle&#039;s modules to perform tasks on a scheduled basis. For example, the discussion forums can only mail out copies of new posts to all subscribers if the cron job tells Moodle to do this.&lt;br /&gt;
&lt;br /&gt;
In Mac OS X 10.5 you will find the system daemon &#039;&#039;launchd&#039;&#039; for this service. This daemon offers a standardized interface to any user and all programs started automatically by the system. Please look at http://developer.apple.com/macosx/launchd.html for more informations about the configurations and all parameters. &lt;br /&gt;
&lt;br /&gt;
In our case the service should get the web page http://your-server-address/moodle19/admin/cron.php every 5 minutes. The configuration will be done by the file named &#039;&#039;moodle4mac.cron.plist&#039;&#039; which must be placed in the system folder &#039;&#039;/Library/LaunchDaemons/&#039;&#039; ... surely you can use any other file name but it should say something about the function of the service. The extension must be &#039;&#039;.plist&#039;&#039;. After any reboot of your Mac server the cron service will start automaticly because the file is placed in the correct system folder.&lt;br /&gt;
&lt;br /&gt;
===Use the graphical way===&lt;br /&gt;
You can use Lingon to add a new daemon plist or to edit one. It produces the same text as you can write in your text editor. http://sourceforge.net/projects/lingon/files/&lt;br /&gt;
&lt;br /&gt;
[[Image:macosx-lingon.png]]&lt;br /&gt;
&lt;br /&gt;
===Use a text editor===&lt;br /&gt;
Please use a text editor to write the needed file. You can open the Terminal and use the system editors vi or pico. But you can also write the text file with any GUI text editor ... I mostly use TextWrangler ... but do NOT take an editor for formatted texts like Microsoft Word or OpenOffice Writer. You must get pure text!&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple Computer//DTD PLIST 1.0//EN&amp;quot; &lt;br /&gt;
      &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;dict&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;KeepAlive&amp;lt;/key&amp;gt;&amp;lt;false/&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;Label&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;moodle4mac.cron&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;ProgramArguments&amp;lt;/key&amp;gt;&lt;br /&gt;
 &amp;lt;array&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;curl&amp;lt;/string&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;-s&amp;lt;/string&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;http://your-server-address/moodle19/admin/cron.php&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;/array&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;RunAtLoad&amp;lt;/key&amp;gt;&amp;lt;true /&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StartInterval&amp;lt;/key&amp;gt;&amp;lt;integer&amp;gt;300&amp;lt;/integer&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StandardErrorPath&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;/dev/null&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;StandardOutPath&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;/dev/null&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;/dict&amp;gt;&lt;br /&gt;
 &amp;lt;/plist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The label string must be the same as the file name is but without the extension &#039;&#039;.plist&#039;&#039;. Save the text file &#039;&#039;/Library/LaunchDaemons/moodle4mac.cron.plist&#039;&#039;. The owner of the file must be set to the system user &#039;&#039;root&#039;&#039;.   If you use a site with SSL (ie: it has an http&#039;&#039;&#039;s&#039;&#039;&#039;:// protocol) you either need to have your SSL certificates listed for use by the CURL utility ([http://curl.haxx.se/docs/sslcerts.html see these docs] for more details) OR you must use the &#039;-k&#039; switch in addition to the &#039;-s&#039; switch used above; your arguments line would then read: `&amp;lt;string&amp;gt;-s -k&amp;lt;/string&amp;gt;`.&lt;br /&gt;
&lt;br /&gt;
That&#039;s all, really!&lt;br /&gt;
&lt;br /&gt;
===How to start and stop the cron service===&lt;br /&gt;
You can start the new cron service in the Terminal.&lt;br /&gt;
&lt;br /&gt;
 sudo launchctl load /Library/LaunchDaemons/moodle4mac.cron.plist&lt;br /&gt;
&lt;br /&gt;
The following command would stop the service. If you want to activate changes in the cron service you need to &#039;&#039;unload&#039;&#039; and then to &#039;&#039;load&#039;&#039; the daemon again.&lt;br /&gt;
&lt;br /&gt;
 sudo launchctl unload /Library/LaunchDaemons/moodle4mac.cron.plist&lt;br /&gt;
&lt;br /&gt;
===Only one service for two servers?===&lt;br /&gt;
For my server I needed to have a cron service for to instances &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; ... no problem ... with the typo &#039;&#039;moodle[19-20]&#039;&#039; I will get a cron service for both.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;curl -s http://your-server-address/moodle[19-20]/admin/cron.php&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see if the cron service works correctly you should look at the &#039;&#039;access.log&#039;&#039; of your web server. The cron.php should be accessed every 5 minutes ... on my server for both Moodle instances &#039;&#039;moodle19&#039;&#039; and &#039;&#039;moodle20&#039;&#039; ... oh yes, it works!!&lt;br /&gt;
&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:10:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 1136&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:10:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 1403&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:11:18 +0200] &amp;quot;OPTIONS * HTTP/1.0&amp;quot; 200 -&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:15:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 735&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:15:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 964&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:20:56 +0200] &amp;quot;GET /moodle19/admin/cron.php HTTP/1.1&amp;quot; 200 1136&lt;br /&gt;
 192.168.0.220 - - [30/Jul/2009:22:20:57 +0200] &amp;quot;GET /moodle20/admin/cron.php HTTP/1.1&amp;quot; 200 1365&lt;br /&gt;
&lt;br /&gt;
==Managing cron on web hosting services==&lt;br /&gt;
&lt;br /&gt;
Your web-based control panel may have a web page that allows you to set up a cron service process. &lt;br /&gt;
&lt;br /&gt;
===CPanel cron service===&lt;br /&gt;
If you are using CPanel, login then look for &amp;quot;Advanced&amp;quot; category towards the bottom of the page. Click on Cron Jobs -&amp;gt; Advanced (Unix style). Enter the following for the cron to run every 30 minutes.&lt;br /&gt;
&lt;br /&gt;
 Email address for output: emailaddress@mydomain.con&lt;br /&gt;
 Minute:*/30&lt;br /&gt;
 Hour:*&lt;br /&gt;
 Day:*&lt;br /&gt;
 Month:*&lt;br /&gt;
 Weekday:* &lt;br /&gt;
 &amp;lt;nowiki&amp;gt;Command: wget -q -O /dev/null http://www.mydomain.com/moodle/admin/cron.php&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Click Commit Changes. Check your email for the output. &lt;br /&gt;
&lt;br /&gt;
[[Image:Cpanel-cron-setup.JPG]]&lt;br /&gt;
&lt;br /&gt;
===Other systems cron service===&lt;br /&gt;
For other systems, look for a button called &amp;quot;Cron jobs&amp;quot;. In there you can put the same sort of Unix commands as listed below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t have permissions to run the &#039;wget&#039; command on the server, you can use this php command:&lt;br /&gt;
&lt;br /&gt;
 /usr/local/bin/php -q /real/path/to/script/admin/cron.php&lt;br /&gt;
&lt;br /&gt;
For example: &lt;br /&gt;
&lt;br /&gt;
 /usr/local/bin/php -q /home/username/public_html/moodle/admin/cron.php&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t know what is the real path of your Moodle folder you can use the PHP command realpath.&lt;br /&gt;
&lt;br /&gt;
Another alternative, if you do not have permission to run the &#039;wget&#039; command, may be to use a curl command.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
curl --silent --compressed http://mydomain.com/moodle/admin/cron.php&lt;br /&gt;
&lt;br /&gt;
==Using a cron command line in Unix==&lt;br /&gt;
&lt;br /&gt;
There are different command line programs you can use to call the page from the command line. Not all of them may be available on a given server.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; The examples with wget, lynx, and similar are &#039;&#039;&#039;not&#039;&#039;&#039; the same as the &amp;quot;CLI only&amp;quot; cron checkbox, mentioned above (the configuration variable &amp;quot;cronclionly&amp;quot;). wget, lynx, and other similar utilities are Unix command-line HTTP clients, and thus running cron.php in this way is the same as running it in a browser, from Moodle&#039;s point of view.&lt;br /&gt;
&lt;br /&gt;
For example, you can use a Unix utility like &#039;wget&#039;:&lt;br /&gt;
&lt;br /&gt;
 wget -q -O /dev/null &amp;lt;nowiki&amp;gt;http://example.com/moodle/admin/cron.php&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note in this example that the output is thrown away (to /dev/null).&lt;br /&gt;
&lt;br /&gt;
A number of users of Moodle have found that &#039;wget&#039; sometimes fails. Especially if you have trouble with email digests not being sent on a daily basis to all users, an alternative command that solves the problem is:&lt;br /&gt;
&lt;br /&gt;
 php &amp;lt;nowiki&amp;gt;http://example.com/moodle/admin/cron.php&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The same thing using lynx:&lt;br /&gt;
&lt;br /&gt;
 lynx -dump &amp;lt;nowiki&amp;gt;http://example.com/moodle/admin/cron.php&amp;lt;/nowiki&amp;gt; &amp;gt; /dev/null&lt;br /&gt;
&lt;br /&gt;
Note in this example that the output is thrown away (to /dev/null).&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can use a standalone version of PHP, compiled to be run on the command line. The disadvantage is that you need to have access to a command-line version of php. The advantage is that your web server logs aren&#039;t filled with constant requests to cron.php and you can run at a lower I/O and CPU priority.&lt;br /&gt;
&lt;br /&gt;
 /opt/bin/php /web/moodle/admin/cron.php&lt;br /&gt;
&lt;br /&gt;
Example command to run at lower priority:&lt;br /&gt;
&lt;br /&gt;
  ionice -c3 -p$$;nice -n 10 /usr/bin/php /moodle/admin/cron.php &amp;gt; /dev/null&lt;br /&gt;
&lt;br /&gt;
===Using the crontab program on Unix===&lt;br /&gt;
&lt;br /&gt;
All that Cpanel does is provide a web interface to a Unix utility known as crontab. If you have a command line, you can set up crontab yourself using the command:&lt;br /&gt;
&lt;br /&gt;
 crontab -e&lt;br /&gt;
&lt;br /&gt;
and then adding one of the above commands like:&lt;br /&gt;
&lt;br /&gt;
 */30 * * * * wget -q -O /dev/null &amp;lt;nowiki&amp;gt;http://example.com/moodle/admin/cron.php&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first five entries are the times to run values, followed by the command to run. The asterisk is a wildcard, indicating any time. The above example means run the command &#039;&#039;wget -q -O /dev/null...&#039;&#039; every 30 minutes (*/30), every hour (*), every day of the month (*), every month (*), every day of the week (*). &lt;br /&gt;
&lt;br /&gt;
The &amp;quot;O&amp;quot; of &amp;quot;-O&amp;quot; is the capital letter not zero, and refers the output file destination, in this case &amp;quot;/dev/null&amp;quot; which is a black hole and discards the output. If you want to see the output of your cron.php then enter its url in your browser. &lt;br /&gt;
&lt;br /&gt;
* [http://linuxweblog.com/node/24 A basic crontab tutorial] &lt;br /&gt;
* [http://www.freebsd.org/cgi/man.cgi?query=crontab&amp;amp;apropos=0&amp;amp;sektion=5&amp;amp;manpath=FreeBSD+6.0-RELEASE+and+Ports&amp;amp;format=html Online version of the man page] &lt;br /&gt;
&lt;br /&gt;
For &#039;&#039;&#039;beginners&#039;&#039;&#039;, &amp;quot;EDITOR=nano crontab -e&amp;quot; will allow you to edit the crontab using the [http://www.nano-editor.org/dist/v1.2/faq.html nano] editor. Ubuntu defaults to using the nano editor.&lt;br /&gt;
&lt;br /&gt;
Usually, the &amp;quot;crontab -e&amp;quot; command will put you into the &#039;vi&#039; editor. You enter &amp;quot;insert mode&amp;quot; by pressing &amp;quot;i&amp;quot;, then type in the line as above, then exit insert mode by pressing ESC. You save and exit by typing &amp;quot;:wq&amp;quot;, or quit without saving using &amp;quot;:q!&amp;quot; (without the quotes). Here is an [http://www.unix-manuals.com/tutorials/vi/vi-in-10-1.html intro] to the &#039;vi&#039; editor.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
Using Moodle forum discussions:&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=41827 Cron - can someone give me a quick confirmation of function?]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=97684 Cronjob Question]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=97457 Slow cron : avoiding simultaneous cron]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=117168 Visibility of cron.php]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=139263#p609060 How to log the output of a Scheduled Task on Windows] - this discussion explains a nice trick that can be very useful when you are experiencing problems with your Windows Scheduled Task and you need to log the output of the Scheduled Task to a log file.&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
&lt;br /&gt;
[[es:Cron]]&lt;br /&gt;
[[fr:Cron]]&lt;br /&gt;
[[nl:Cron]]&lt;br /&gt;
[[sk:Cron]]&lt;br /&gt;
[[pl:Cron]]&lt;br /&gt;
[[ja:Cron]]&lt;/div&gt;</summary>
		<author><name>Odoardo</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Repositories_FAQ&amp;diff=78987</id>
		<title>Repositories FAQ</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Repositories_FAQ&amp;diff=78987"/>
		<updated>2010-12-09T07:28:00Z</updated>

		<summary type="html">&lt;p&gt;Odoardo: /* How can I enable repositories in Moodle? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{stub}}&lt;br /&gt;
&lt;br /&gt;
==How can I enable repositories in Moodle?==&lt;br /&gt;
&lt;br /&gt;
Repositories can be enabled by an administrator in &#039;&#039;Site administration &amp;gt; Plugins &amp;gt; Repositories &amp;gt; Manage repositories&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
All enabled and visible repositories will appear in the file picker.&lt;br /&gt;
&lt;br /&gt;
==How can I delete an embedded file previously added using the file picker?==&lt;br /&gt;
&lt;br /&gt;
There is no need to do anything, as any unused files are detected and then deleted automatically after a period of time. Users cannot delete files manually, since they may be used elsewhere.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [[Repositories]]&lt;br /&gt;
* Using Moodle [http://moodle.org/mod/forum/view.php?id=1807 Repositories forum]&lt;br /&gt;
&lt;br /&gt;
[[Category:Repositories]]&lt;br /&gt;
[[Category:FAQ]]&lt;br /&gt;
&lt;br /&gt;
[[de:Repositories FAQ]]&lt;/div&gt;</summary>
		<author><name>Odoardo</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Development:Repository_API&amp;diff=77446</id>
		<title>Development:Repository API</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Development:Repository_API&amp;diff=77446"/>
		<updated>2010-11-03T10:48:27Z</updated>

		<summary type="html">&lt;p&gt;Odoardo: /* Repository plugins */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Moodle_2.0}}&lt;br /&gt;
&lt;br /&gt;
The page is open for everyone so everyone can help correct mistakes and help with the evolution of this document.  However, if you have questions to ask, problems to report or major changes to suggest, please add them to the [[Development_talk:Repository_API|page comments]], or start a discussion in the [http://moodle.org/mod/forum/view.php?id=1807 Repositories forum]. We&#039;ll endeavour to merge all such suggestions into the further development and fix all kinds of problems.&lt;br /&gt;
&lt;br /&gt;
Note that parts of this document have been now split off into a separate [[Development:File_API]]&lt;br /&gt;
&lt;br /&gt;
==Objectives==&lt;br /&gt;
&lt;br /&gt;
# Allow all Moodle users to easily bring content into Moodle from external repositories&lt;br /&gt;
# Provide a consistent interface to any external repository, for any Moodle module&lt;br /&gt;
&lt;br /&gt;
==Use cases==&lt;br /&gt;
&lt;br /&gt;
===Teacher adding an external file as a new resource===&lt;br /&gt;
&lt;br /&gt;
# Teacher wants to add a new resource to a course &lt;br /&gt;
# Teacher clicks the &amp;quot;Choose a resource&amp;quot; button&lt;br /&gt;
# Teacher is presented with a simple file picker to choose a file (with a menu to switch between multiple configured repositories)&lt;br /&gt;
# Teacher chooses a file in an external repository&lt;br /&gt;
# File is COPIED into Moodle and stored by the resource module&lt;br /&gt;
# File is marked as owned by that user&lt;br /&gt;
# Whenever someone wants to view that file, the resource module controls access  (see [[Development:File API]] )&lt;br /&gt;
&lt;br /&gt;
===Teacher linking to an external file as a new resource (think video repository) ===&lt;br /&gt;
&lt;br /&gt;
# Teacher wants to display a file in the repository &lt;br /&gt;
# Teacher clicks the &amp;quot;Choose a resource&amp;quot; button&lt;br /&gt;
# Teacher is presented with a simple file picker to choose a file (with a menu to switch between multiple configured repositories)&lt;br /&gt;
# Teacher chooses a file in an external repository&lt;br /&gt;
# Link to the file is COPIED into Moodle and stored by the resource module&lt;br /&gt;
# Link is marked as owned by that user&lt;br /&gt;
# Whenever someone wants to follow that link, the resource module controls access  (see [[Development:File API]] )&lt;br /&gt;
&lt;br /&gt;
===Student submitting an assignment===&lt;br /&gt;
# Student needs to submit an assignment and presses the &amp;quot;Choose files&amp;quot; button&lt;br /&gt;
# Student sees a &amp;quot;file picker&amp;quot; where they can see files listed on any of several configured repositories ([https://docs.moodle.org/en/Image:Filepicker_login.jpg file picker login], [https://docs.moodle.org/en/Image:Filepicker_browser.jpg file picker browser], [https://docs.moodle.org/en/Image:Filepicker_search.jpg file picker search])&lt;br /&gt;
# Student chooses MySpace from the list&lt;br /&gt;
# Student is prompted to enter MySpace username/password (if admin allows it, a checkbox could be there to &amp;quot;remember this for next time&amp;quot; but remember security)&lt;br /&gt;
# Student sees their files in MySpace and chooses one or more&lt;br /&gt;
# Files are copied from MySpace to Moodle &lt;br /&gt;
# Assignment module controls the permissions so that only the Student and assignment graders can see the file (other students would not have permission).&lt;br /&gt;
&lt;br /&gt;
===Student attaching an image to a forum===&lt;br /&gt;
# Student needs to attach an image and presses the &amp;quot;Choose files&amp;quot; button in the posting screen&lt;br /&gt;
# Student sees a &amp;quot;file picker&amp;quot; where they can see files listed on any of several configured repositories&lt;br /&gt;
# Student chooses Mahara from the list&lt;br /&gt;
# Student is prompted to enter Mahara username/password&lt;br /&gt;
# Student sees their files in Mahara and chooses one image&lt;br /&gt;
# Image is copied to Moodle &lt;br /&gt;
# Image file is attached to forum post by Forum module (by reference)&lt;br /&gt;
# Forum module controls permissions so that anyone who can read that forum can see that file&lt;br /&gt;
&lt;br /&gt;
===Student attaching the same image in another forum===&lt;br /&gt;
&lt;br /&gt;
# Student needs to submit an assignment and presses the &amp;quot;Choose files&amp;quot; button&lt;br /&gt;
# Student sees a &amp;quot;file picker&amp;quot; where they can see files listed on any of several configured repositories&lt;br /&gt;
# Student chooses &amp;quot;Local files&amp;quot; from the list and sees all the files they&#039;ve permission to use&lt;br /&gt;
# A COPY of the image file is attached to forum post by Forum module&lt;br /&gt;
# Forum module controls access to this file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please add more use cases in this same format&lt;br /&gt;
&lt;br /&gt;
==Mock screenshots==&lt;br /&gt;
When you first call up the file picker and choose a repository, you might be asked to log in (if saving of passwords is not allowed):&lt;br /&gt;
&lt;br /&gt;
[[Image:Filepicker_login.jpg]]&lt;br /&gt;
&lt;br /&gt;
Browsing files could look something like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:Filepicker_browser.jpg]]&lt;br /&gt;
&lt;br /&gt;
And you can also search:&lt;br /&gt;
&lt;br /&gt;
[[Image:Filepicker_search.jpg]]&lt;br /&gt;
&lt;br /&gt;
==General architecture==&lt;br /&gt;
&lt;br /&gt;
Each repository plugin (a standard Moodle plugin stored under /repository/xxx) will subclass the standard API and override methods specific to that repository.&lt;br /&gt;
&lt;br /&gt;
As is usual in Moodle, there will be admin settings to disable/enable certain repository plugins as standard, as well as user settings so that users can add their own personal repositories to the standard list (eg [http://briefcase.yahoo.com Yahoo Briefcase] or [http://docs.google.com Google Docs]) and to select their default repository.&lt;br /&gt;
&lt;br /&gt;
Once a repository has been used the file will usually be copied into Moodle there and then.  However there will also be options to:&lt;br /&gt;
* only return the URL to the file if it&#039;s desired to keep it external (but this does present security and integrity risks), or&lt;br /&gt;
* refresh the local file copy regularly and automatically&lt;br /&gt;
* refresh the file manually if desired&lt;br /&gt;
&lt;br /&gt;
Once in Moodle, it is subject to the [[Development:File API]] for access control like any other file.&lt;br /&gt;
&lt;br /&gt;
==Repository requirements==&lt;br /&gt;
&lt;br /&gt;
From the Moodle point of view, each repository is just a hierarchy of nodes.&lt;br /&gt;
&lt;br /&gt;
The repository MUST provide:&lt;br /&gt;
# A URI to download each node (eg file).&lt;br /&gt;
# A list of the nodes (eg files and directories) under a given node (eg directory).  This allows Moodle to construct a standard browse interface (much like a standard OS file picker).&lt;br /&gt;
&lt;br /&gt;
The repository can OPTIONALLY:&lt;br /&gt;
# Require some authentication credentials &lt;br /&gt;
# Provide more metadata about each node (mime type, size, dates, related files, dublin core stuff, etc)&lt;br /&gt;
# Describe a search facility (so that Moodle can construct a search form)&lt;br /&gt;
# Provide copyright and usage rules (or just information about the rules)&lt;br /&gt;
&lt;br /&gt;
==Repository plugins==&lt;br /&gt;
&lt;br /&gt;
Some plugins I&#039;d like to see developed for the first version are:&lt;br /&gt;
* box - an interface to [http://box.net box.net]&lt;br /&gt;
* mahara - an interface to a Mahara installation&lt;br /&gt;
* Server Files - very similar to the current course-based file manager, except user-based&lt;br /&gt;
* Remote Moodle - an interface to another Moodle site, accessed over a secure mnet connection&lt;br /&gt;
* googledocs - an interface to [http://docs.google.com Google Docs]&lt;br /&gt;
* s3 - an interface to [http://www.amazon.com/gp/browse.html?node=16427261 Amazon S3]&lt;br /&gt;
* flickr - an interface to [http://flickr.com flickr]&lt;br /&gt;
* WebDAV - to access arbitrary external WebDAV servers&lt;br /&gt;
* merlot - an interface to the learning materials in [http://www.merlot.org/merlot/materials.htm Merlot.org]&lt;br /&gt;
* File System - a plugin to list files on local file system, of course, you can mount remote files to this local directory&lt;br /&gt;
* youtube - an interface to [http://youtube.com YouTube]&lt;br /&gt;
* jsr170 - an interface that can talk to anything that supports jsr170 (eg [http://www.alfresco.com/ Alfresco])&lt;br /&gt;
* oki - an OKI emulator allowing us to access things with OKI interfaces,like [http://www.fedora.info/ Fedora]&lt;br /&gt;
* briefcase - an interface to [http://briefcase.yahoo.com/ Yahoo Briefcase]&lt;br /&gt;
* myspace - an interface to MySpace files (perhaps via [http://www.programmableweb.com/api/myspace this MySpace API])&lt;br /&gt;
* skydrive - an interface to Microsoft&#039;s [http://skydrive.live.com/ SkyDrive] files&lt;br /&gt;
* Dropbox - an interface to Dropbox files [http://www.dropbox.com]&lt;br /&gt;
* facebook - an interface to Facebook files&lt;br /&gt;
* [http://www.dspace.org/ Dspace] - a repository from MIT&lt;br /&gt;
* DOOR - another popular open source repository&lt;br /&gt;
* SMB shares - An interface for windows shares e.g. personal folders on network drives. Would need to link with LDAP as usernames will often be wholly/partially the same as network folder names. This could be done using SAMBA, but would also need to work on windows machines natively. See [http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=991 this block] for a linux implementation.&lt;br /&gt;
&lt;br /&gt;
==Tables==&lt;br /&gt;
&lt;br /&gt;
=== repository ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Type&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Default&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Info&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;id&#039;&#039;&#039;&lt;br /&gt;
|int(10)&lt;br /&gt;
|&lt;br /&gt;
|autoincrementing &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;type&#039;&#039;&#039;&lt;br /&gt;
|varchar(255)&lt;br /&gt;
|&lt;br /&gt;
|The type of the repository &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;visible&#039;&#039;&#039;&lt;br /&gt;
|tinyint(1)&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|sortorder&lt;br /&gt;
|int(10)&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== repository_instances ===&lt;br /&gt;
&lt;br /&gt;
This table contains one entry for every configured external repository instance.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Type&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Default&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Info&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;id&#039;&#039;&#039;&lt;br /&gt;
|int(10)&lt;br /&gt;
|&lt;br /&gt;
|autoincrementing &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|name&lt;br /&gt;
|varchar 255&lt;br /&gt;
|&lt;br /&gt;
|A custom name for this repository (non-unique)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;typeid&#039;&#039;&#039; &lt;br /&gt;
|int(10)&lt;br /&gt;
| &lt;br /&gt;
|The id of repository type&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;userid&#039;&#039;&#039; &lt;br /&gt;
|int(10)&lt;br /&gt;
| &lt;br /&gt;
|The person who created this repository instance&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;contextid&#039;&#039;&#039; &lt;br /&gt;
|int(10)&lt;br /&gt;
| &lt;br /&gt;
|The context that this repository is available to ( = system context for site-wide ones)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|username&lt;br /&gt;
|varchar(255)&lt;br /&gt;
| &lt;br /&gt;
|username to log in with, if required (almost never!)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|password&lt;br /&gt;
|varchar(255)&lt;br /&gt;
| &lt;br /&gt;
|password to log in with, if required (almost never!)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|timecreated&lt;br /&gt;
|int(10)&lt;br /&gt;
|&lt;br /&gt;
|The time this repository was created&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|timemodified&lt;br /&gt;
|int(10)&lt;br /&gt;
|&lt;br /&gt;
|The last time the repository was modified&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== repository_instance_config ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Type&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Default&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Info&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;id&#039;&#039;&#039;&lt;br /&gt;
|int(10)&lt;br /&gt;
|&lt;br /&gt;
|autoincrementing &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;instanceid&#039;&#039;&#039;&lt;br /&gt;
|int(int)&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;name&#039;&#039;&#039;&lt;br /&gt;
|varchar(255)&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|value&lt;br /&gt;
|Text&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===File types===&lt;br /&gt;
&lt;br /&gt;
The context at which someone is inserting a file may require certain file types (eg uploading a new user profile image is only looking for images).  &lt;br /&gt;
&lt;br /&gt;
To support this, the calling code needs to be able to specify the required mimetypes, and the listing code should be able to filter the results based on these mimetypes.  Ideally the repository itself can do the filtering for ultimate speed (though not all repositories will support this).&lt;br /&gt;
&lt;br /&gt;
We will have to develop special new mimetypes for Moodle files like backups (application/vnd.moodle.backup) and IMS learning design (application/vnd.moodle.imsld) etc&lt;br /&gt;
&lt;br /&gt;
==Technical walkthrough==&lt;br /&gt;
&lt;br /&gt;
(See also the functional spec for the [[Development:Repository_File_Picker]] )&lt;br /&gt;
&lt;br /&gt;
There are two main cases where the repository API will be used: as part of a Moodleform to add a file and as part of the HTML editor to add a media element into some HTML).  We also have to cater for the using Moodleforms without Javascript.&lt;br /&gt;
&lt;br /&gt;
In all of these cases the files will be uploaded to Moodle while using the file picker dialog and stored in a temporary file area owned by the currently active user.  It is only AFTER the submission of the entire Moodleform that we will know the full context, itemids to store the file properly, so at this time the file will be copied into the correct filearea.&lt;br /&gt;
&lt;br /&gt;
===Case 1: As part of a Moodleform with Javascript===&lt;br /&gt;
&lt;br /&gt;
1. Moodle module code calls a &amp;quot;filepicker&amp;quot; moodleform item whenever a file is required, which includes the following information to pass to the File API:&lt;br /&gt;
&lt;br /&gt;
 eg $mform-&amp;gt;addElement(&#039;filepicker&#039;, &#039;uniqueelementid&#039;, $fullname, $data)&lt;br /&gt;
 &lt;br /&gt;
2. When rendering the form, Moodle will display a read-only filename field with an &#039;&#039;&#039;&amp;quot;Add file&amp;quot;&#039;&#039;&#039; button next to it.  There will also be a hidden field to store a file reference later (this is what actually gets used, the filename field is just for users to see something).&lt;br /&gt;
&lt;br /&gt;
3. When the add file button is pressed, the form will be &amp;quot;replaced&amp;quot; in the page by a larger resizeable area containing an AJAX file picker.  (After picking the display can be closed).   (There could be a user option to make this a popup window instead, if required)&lt;br /&gt;
&lt;br /&gt;
4. The AJAX file picker interface will list all the active repositories as a menu, and list files in one of several formats (like Windows/Mac/Linux): Details, Names, Icons.&lt;br /&gt;
&lt;br /&gt;
5. For each plugin, the AJAX interface will prompt the user to login first (if required) asking the plugin to log in behind the scenes.  It&#039;ll also ask the plugin to return listing data in response to clicks and searches.  &lt;br /&gt;
&lt;br /&gt;
6. Finally, when the user selects a file and clicks the &amp;quot;Select&amp;quot; button, the AJAX interface will trigger a method in the plugin that will fetch the file and call the File Storage API to &#039;&#039;&#039;store&#039;&#039;&#039; the file using the &#039;&#039;&#039;uniqueelementid&#039;&#039;&#039; and the current user info.  While this is happening, the interface should show some sort of progress bar (ideally) or at least a &amp;quot;loading file&amp;quot; image/sign/message.  &lt;br /&gt;
&lt;br /&gt;
7. After a file has finally been selected we will have a file ID which we can pass back to the original Moodle form (to the hidden field named &#039;&#039;&#039;uniqueelementid_formid&#039;&#039;&#039;).  The picker can then rename the read-only filename field before it hides itself.&lt;br /&gt;
&lt;br /&gt;
8. Submitting the form will trigger the mform processing for this field, which will check fields, create things in the module etc.  Once this has been finally successful the developer must call an mform function to &amp;quot;fix&amp;quot; the info for each file and &amp;quot;move&amp;quot; it into the module file area:&lt;br /&gt;
&lt;br /&gt;
  eg $mform-&amp;gt;store_local_file(&#039;uniqueelementid&#039;, $context, $filearename, $itemid, $filepath);&lt;br /&gt;
&lt;br /&gt;
9. Cron jobs in File Storage api should automatically delete any files in the user&#039;s tempfile area that are older than 7 days or move them into a trash can in the user&#039;s file area (perhaps).&lt;br /&gt;
&lt;br /&gt;
===Case 2: As part of a Moodleform without Javascript===&lt;br /&gt;
&lt;br /&gt;
Steps 1-2 are the same as for the case with Javascript.&lt;br /&gt;
&lt;br /&gt;
3. The add file button is a submit button for the form with a different value.  When the add file button is pressed,&lt;br /&gt;
* the whole form will be &#039;&#039;submitted&#039;&#039; to the original location (but with a different submit button value)&lt;br /&gt;
* moodleforms get_data() will detect this is a &amp;quot;repository save&amp;quot; and can save the full POST info in the current session tagged with the id of the openfile element, together with the URL to return to&lt;br /&gt;
* moodleforms get_data() then redirects the user to a new page showing the main picker interface&lt;br /&gt;
&lt;br /&gt;
4. The file picker interface will have to be a completely new and separate interface from the AJAX one.  It could be a long hierarchy listing, or reload a lot.&lt;br /&gt;
&lt;br /&gt;
5. Finally, when the user selects a file and submits using the &amp;quot;Select&amp;quot; button to picker.php, it will trigger a method in the plugin that will fetch the file and call the [[Development:File_API|File API]] to store the file using the filearea and context information we already had.   While this is happening, the interface can show some sort of progress bar (ideally) or at least a &amp;quot;loading file&amp;quot; image/sign/message.&lt;br /&gt;
&lt;br /&gt;
6. After this, picker.php will redirect/continue back to the original form page.  The form can be constructed as usual, however, when the form is rendered using display() method moodleforms should now look for relevant saved content in the session and use that to override any content in the form (and then delete the saved info in the session).&lt;br /&gt;
&lt;br /&gt;
Steps 8-9 are the same as for the case with Javascript.&lt;br /&gt;
&lt;br /&gt;
===Case 3: As part of a HTML editor===&lt;br /&gt;
&lt;br /&gt;
The key thing here is a move away from storing any absolute URLs to files in our HTML texts.  Instead we&#039;ll store relative names.&lt;br /&gt;
&lt;br /&gt;
1. The moodleform for a textarea (HTML editor) will require a path to the filearea associated with this HTML.  eg &#039;&#039;&#039;wwwroot/pluginfile.php/13/content/0/&#039;&#039;&#039;.  This would have to be the user_draft area if the filearea doesn&#039;t exist yet  eg &#039;&#039;&#039;wwwroot/draftfile.php/userid/tempfile/uniquelementid&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
2. All textarea content will also need to have str_replace done on it to replace @@pluginfile@@/somefilenames.jpg in the content to use this path so that it comes up right in the editor.  (Note this also needs to be done on every format_text command too when showing this text.)&lt;br /&gt;
&lt;br /&gt;
3. The path parameter also needs to be added to the editor configuration in the current page.&lt;br /&gt;
&lt;br /&gt;
4. Editor plugins can be modified to look for these variables in the editor configuration.&lt;br /&gt;
&lt;br /&gt;
5. When adding an image or other media element,  the same AJAX repository picker will show up as a popup div to allow people to pick from any repository and choose files to download.  The repository picker is responsible for downloading the file in real-time, storing it as a user temporary file if the filearea doesn&#039;t already exist, prefixing the supplied path to the filename and returning a URL back to the dialog text input before closing.&lt;br /&gt;
&lt;br /&gt;
6. On submission, and after the HTML is stored, we might now have a new permanent filearea, so we&#039;ll need to update any associated temporary files to make sure they have the proper file area information.&lt;br /&gt;
&lt;br /&gt;
==Repository plugins==&lt;br /&gt;
&lt;br /&gt;
Each repository plugin is required to contain the following elements:&lt;br /&gt;
&lt;br /&gt;
===class repository()===&lt;br /&gt;
&lt;br /&gt;
This class implements the interface to a particular repository, for browsing, selecting and updating files.  The base class (repository) is defined in /repository/lib.php, while each repository defines an inherited class (eg repository_alfresco) in /repository/repositoryname/repository.class.php&lt;br /&gt;
&lt;br /&gt;
Repositories can redefine any of these methods as required (and in some instances, MUST redefine them):&lt;br /&gt;
&lt;br /&gt;
====__construct($repositoryid, $contextid, $options=array(), $readonly)====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;MUST&#039;&#039;&#039; redefine&lt;br /&gt;
&lt;br /&gt;
Accept necessary parameters, and do initialization of repository.&lt;br /&gt;
&lt;br /&gt;
====get_file($url, $file = &#039;&#039;)====&lt;br /&gt;
&lt;br /&gt;
Given a URL, download a file from there, save the file in a temporary directory.&lt;br /&gt;
&lt;br /&gt;
====get_link($info)====&lt;br /&gt;
Get the url of external resource&lt;br /&gt;
&lt;br /&gt;
====get_listing($path=&#039;/&#039;, $page=&#039;&#039;&#039;&#039;&#039;&#039;&#039;&#039;)====&lt;br /&gt;
&lt;br /&gt;
Given a path, and perhaps a search, get a listing of files. In the case of AJAX file picker, this function should return json format Javascript array.&lt;br /&gt;
&lt;br /&gt;
====search($keyword)====&lt;br /&gt;
Search repository by given keyword, it will return an array of the same format of get_listing&lt;br /&gt;
&lt;br /&gt;
====print_login()====&lt;br /&gt;
&lt;br /&gt;
Show the login screen, if required. In the case of AJAX file picker, this function should return json format array which defined the login form.&lt;br /&gt;
&lt;br /&gt;
====print_search==== &lt;br /&gt;
&lt;br /&gt;
Print the search form, it will return a json string&lt;br /&gt;
&lt;br /&gt;
====get_meta()====&lt;br /&gt;
Return information for creating ajax request, it is private function, you don&#039;t need to rewrite it.&lt;br /&gt;
&lt;br /&gt;
====create()====&lt;br /&gt;
Create an instance&lt;br /&gt;
&lt;br /&gt;
====delete()====&lt;br /&gt;
Delete this instance from `repository` table&lt;br /&gt;
&lt;br /&gt;
====hide()====&lt;br /&gt;
Hide a repository instance from file picker list&lt;br /&gt;
&lt;br /&gt;
====set_option()====&lt;br /&gt;
set options in data1-data5 fields, can be overrided&lt;br /&gt;
&lt;br /&gt;
====get_option()====&lt;br /&gt;
get option list or a specific option from database&lt;br /&gt;
&lt;br /&gt;
====get_type_option_names()====&lt;br /&gt;
If this plugin needs admin settings, please refine this function to return option names.&lt;br /&gt;
&lt;br /&gt;
====type_config_form()====&lt;br /&gt;
If get_type_option_names return non empty array, this function &#039;&#039;&#039;MUST&#039;&#039;&#039; redefine, it will help to build the setting form.&lt;br /&gt;
&lt;br /&gt;
====get_instance_option_names()====&lt;br /&gt;
If plugin instance needs settings, this function will return instance option names.&lt;br /&gt;
&lt;br /&gt;
====instance_config_form()====&lt;br /&gt;
If get_instance_option_names return non empty array, this function &#039;&#039;&#039;MUST&#039;&#039;&#039; redefine, it will help to build the instance setting form.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====supported_filetypes()====&lt;br /&gt;
What file types are supported by this repository plugin, it will return an array, the file type name is defined in a [http://freemind.sourceforge.net/wiki/index.php/Main_Page freemind] file in lib/file/file_types.mm&lt;br /&gt;
&lt;br /&gt;
====supported_returntypes()====&lt;br /&gt;
The repository plugin could support external link or copying files to moodle. If the plugin support file link only, developer should override this function to return FILE_EXTERNAL, if plugin support copying file only, it should return FILE_INTERNAL, by default, plugin supports both.&lt;br /&gt;
&lt;br /&gt;
====filter()====&lt;br /&gt;
Filter file listing to exclude specific file types&lt;br /&gt;
&lt;br /&gt;
===icon.png===&lt;br /&gt;
&lt;br /&gt;
A logo that represents the repository.  Ideally square but we should handle all sizes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [[Development:Repository Administration Specification]]&lt;br /&gt;
* [[Development:Repository Interface for Moodle/Course/User]]&lt;br /&gt;
* [[Development:Repository plugins]]&lt;br /&gt;
* [[Development:Repository File Picker]]&lt;br /&gt;
* [[Development:File API]]&lt;br /&gt;
* [[Development:Portfolio API]]&lt;br /&gt;
* MDL-13766 and MDL-16543 Repository API Meta issues&lt;br /&gt;
&lt;br /&gt;
[[Category:Repositories]]&lt;br /&gt;
&lt;br /&gt;
[[ja:開発:リポジトリAPI]]&lt;/div&gt;</summary>
		<author><name>Odoardo</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Book_module&amp;diff=75894</id>
		<title>Book module</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Book_module&amp;diff=75894"/>
		<updated>2010-09-16T01:38:00Z</updated>

		<summary type="html">&lt;p&gt;Odoardo: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Book}}&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;Book module&#039;&#039;&#039; makes it easy to create multi-page resources with a book-like format.  It is contributed by [http://moodle.org/user/view.php?id=12863&amp;amp;course=5 Petr Škoda].  This module can be used to build complete book-like websites inside of your Moodle course.&lt;br /&gt;
&lt;br /&gt;
Previously created websites can be imported directly into the Book module.  Books can be printed entirely or by chapter.&lt;br /&gt;
&lt;br /&gt;
The book module allows you to have main chapters and sub chapters, but it goes no deeper. In other words, sub chapters cannot have their own sub chapters. This was an intentional decision by the creator of the book module. He intended this to be a simple resource for teachers and students.&lt;br /&gt;
&lt;br /&gt;
The book module is not interactive. You can, however, link to [[Choice module|choices]], [[Forum module|forums]] etc., from within a book. And you can include multimedia objects like [[Flash]] movies in your book.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
* Select the correct version of the &amp;quot;book.zip&amp;quot; module for your Moodle installation &lt;br /&gt;
* Unpack the zip file into the mod folder of your Moodle site&lt;br /&gt;
* Login to the Moodle site as administrator and &lt;br /&gt;
* In site administration block click on notifications &lt;br /&gt;
* Moodle will install the Book module.&lt;br /&gt;
* [[Creating_a_book|Add a book as an activity]]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=319 Book Module] is a Modules and plugins database page for downloads and more information.&lt;br /&gt;
*Discussions: please create or find a discussion topic in the [http://moodle.org/mod/forum/view.php?id=2633 Book module forum]&lt;br /&gt;
*Examples: The manuals at [http://moodle.tokem.fi tokem.fi] are a series of book modules.  Each book is designed for a different level of Moodle user.&lt;br /&gt;
* Using Moodle [http://moodle.org/mod/forum/discuss.php?d=76092 Using a Lesson to simulate a Book] forum discussion&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributed code]]&lt;br /&gt;
&lt;br /&gt;
[[es:Book]]&lt;br /&gt;
[[eu:Liburua]]&lt;/div&gt;</summary>
		<author><name>Odoardo</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Messaging&amp;diff=75640</id>
		<title>Messaging</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Messaging&amp;diff=75640"/>
		<updated>2010-09-11T11:09:06Z</updated>

		<summary type="html">&lt;p&gt;Odoardo: Changed &amp;#039;People bock&amp;#039; to &amp;#039;People block&amp;#039;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Messaging}}The Messaging system default is not limited to a specific course or role. Logged in users (students, teachers or administrators) may send messages to each other regardless of whether they are enrolled on the same course. This is unlike [[Forums]] and [[Chats]] that can be course, role or group specific.&lt;br /&gt;
&lt;br /&gt;
Messages are sent via a popup Message window. This can be found via:&lt;br /&gt;
*[[Participants]] link in a course&#039;s [[People block]] (Send message button on each user&#039;s page),  &lt;br /&gt;
*[[Online Users block]] (if turned on) has a message icon  [[Image:Message.gif]] next to each user&#039;s name&lt;br /&gt;
*Browse list of users in the [[Course administration block]] (send message button on each user&#039;s page)&lt;br /&gt;
&lt;br /&gt;
Site-wide messaging may be disabled/enabled by the Administrator in the permissions section of &#039;&#039;Administration &amp;gt; Configuration &amp;gt; Variables&#039;&#039; in Moodle 1.6, in &#039;&#039;Administration &amp;gt; Security &amp;gt; Site policies&#039;&#039; in 1.7 to 1.9, or in &#039;&#039;Administration &amp;gt; Advanced features&#039;&#039; in 2.0.&lt;br /&gt;
&lt;br /&gt;
Alternatively, to encourage the use of messaging in a course, you may wish to add a [[Messages block]] and/or an [[Online Users block]] to the course page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Sending messages==&lt;br /&gt;
&lt;br /&gt;
To send a message to an individual:&lt;br /&gt;
#In the Messages window click on the Search tab to search for the person, if appropriate checking the box &amp;quot;Only in my courses&amp;quot;, then click on their name. (Alternatively, if the person is listed in the Online Users block, simply click on the &amp;quot;Add/send message&amp;quot; envelope opposite their name.)&lt;br /&gt;
#Type the message in the pop-up box then click on the &amp;quot;Send message&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
To send a message to selected course participants (for teachers only):&lt;br /&gt;
#Click on the Participants link in the People block on the course page.&lt;br /&gt;
#Select participants from the list or use the &amp;quot;Select all&amp;quot; button at the bottom of the list.&lt;br /&gt;
#Choose &amp;quot;Add/send message&amp;quot; from the &amp;quot;With selected users...&amp;quot; drop-down menu.&lt;br /&gt;
#Type the message then click the &amp;quot;Preview&amp;quot; button.&lt;br /&gt;
#Assuming you are satisfied with the message, click the &amp;quot;Send&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
==Reading and replying to messages==&lt;br /&gt;
&lt;br /&gt;
When you are sent a message, the Messages window will pop-up. Also, the Messages block will display the name of the person sending the message with a link to read the message. If you have set the email option (see Message Settings below), then you will get a copy of the message in your email after the time you have specified if you are not logged in.&lt;br /&gt;
&lt;br /&gt;
After reading a message, you may type a reply then click on the &amp;quot;Send message&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
==Searching messages==&lt;br /&gt;
[[Image:MsgSearch.jpg|thumb|Message window Search tab]]&lt;br /&gt;
In addition to searching for people, the Search tab in the Messages window provides the option to search for keywords, only messages to or from you, and to include in the search people you have previously blocked from contacting you.&lt;br /&gt;
&lt;br /&gt;
==Managing contacts==&lt;br /&gt;
[[Image:MsgContacts.jpg|thumb|Message window Contacts tab]]&lt;br /&gt;
People may be added to your list of contacts (or blocked from contacting you) by clicking the &amp;quot;Add contact&amp;quot; (or &amp;quot;Block contact&amp;quot;) icon opposite their name in the Messages window.&lt;br /&gt;
&lt;br /&gt;
By default the contact list is empty. In order to send a message or to create a shortcut to the person you are sending, go to the Search tab. &lt;br /&gt;
&lt;br /&gt;
==Message history==&lt;br /&gt;
&lt;br /&gt;
A record of messages sent to/from a person may be obtained by clicking the &amp;quot;History&amp;quot; icon opposite their name in the Messages window.&lt;br /&gt;
&lt;br /&gt;
==Message settings==&lt;br /&gt;
[[Image:MsgSettings.jpg|thumb|Message window Settings tab]]&lt;br /&gt;
Message settings may be changed via the Settings tab in the Messages window.&lt;br /&gt;
&lt;br /&gt;
Here you can decide on having a popup Message window whenever you get a new message, blocking messages from people who are not on your Contacts list, having an audio signal for a new message, using a HTML editor, or getting email messages when you are offline.&lt;br /&gt;
&lt;br /&gt;
Note: It&#039;s possible to set a different email address for receiving copies of messages to the email address in your profile.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[Messaging FAQ]]&lt;br /&gt;
*[[Using Moodle book]] Chapter 5: Forums, Chats, and Messaging&lt;br /&gt;
*[[Messaging enhancements]] (contributed code)&lt;br /&gt;
*[[Development:Messaging 2.0]]&lt;br /&gt;
&lt;br /&gt;
Using Moodle forum discussions:&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=27559 What facilities are there for seeing other users&#039; messages?]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=58977 How can I see student messages?]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=34972 Viewing old messages?]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=63401 Restrict Messaging to Course Participants/Teachers]&lt;br /&gt;
&lt;br /&gt;
[[es:Mensajería]]&lt;br /&gt;
[[eu:Mezularitza]]&lt;br /&gt;
[[de:Mitteilungen]]&lt;br /&gt;
[[fr:Messagerie]]&lt;br /&gt;
[[ja:メッセージング]]&lt;/div&gt;</summary>
		<author><name>Odoardo</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Messaging&amp;diff=75639</id>
		<title>Messaging</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Messaging&amp;diff=75639"/>
		<updated>2010-09-11T11:06:55Z</updated>

		<summary type="html">&lt;p&gt;Odoardo: Changed &amp;#039;person may obtained&amp;#039; to &amp;#039;person may be obtained&amp;#039; in the &amp;quot;Message history&amp;quot; section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Messaging}}The Messaging system default is not limited to a specific course or role. Logged in users (students, teachers or administrators) may send messages to each other regardless of whether they are enrolled on the same course. This is unlike [[Forums]] and [[Chats]] that can be course, role or group specific.&lt;br /&gt;
&lt;br /&gt;
Messages are sent via a popup Message window. This can be found via:&lt;br /&gt;
*[[Participants]] link in a course&#039;s [[People block]] (Send message button on each user&#039;s page),  &lt;br /&gt;
*[[Online Users block]] (if turned on) has a message icon  [[Image:Message.gif]] next to each user&#039;s name&lt;br /&gt;
*Browse list of users in the [[Course administration block]] (send message button on each user&#039;s page)&lt;br /&gt;
&lt;br /&gt;
Site-wide messaging may be disabled/enabled by the Administrator in the permissions section of &#039;&#039;Administration &amp;gt; Configuration &amp;gt; Variables&#039;&#039; in Moodle 1.6, in &#039;&#039;Administration &amp;gt; Security &amp;gt; Site policies&#039;&#039; in 1.7 to 1.9, or in &#039;&#039;Administration &amp;gt; Advanced features&#039;&#039; in 2.0.&lt;br /&gt;
&lt;br /&gt;
Alternatively, to encourage the use of messaging in a course, you may wish to add a [[Messages block]] and/or an [[Online Users block]] to the course page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Sending messages==&lt;br /&gt;
&lt;br /&gt;
To send a message to an individual:&lt;br /&gt;
#In the Messages window click on the Search tab to search for the person, if appropriate checking the box &amp;quot;Only in my courses&amp;quot;, then click on their name. (Alternatively, if the person is listed in the Online Users block, simply click on the &amp;quot;Add/send message&amp;quot; envelope opposite their name.)&lt;br /&gt;
#Type the message in the pop-up box then click on the &amp;quot;Send message&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
To send a message to selected course participants (for teachers only):&lt;br /&gt;
#Click on the Participants link in the People bock on the course page.&lt;br /&gt;
#Select participants from the list or use the &amp;quot;Select all&amp;quot; button at the bottom of the list.&lt;br /&gt;
#Choose &amp;quot;Add/send message&amp;quot; from the &amp;quot;With selected users...&amp;quot; drop-down menu.&lt;br /&gt;
#Type the message then click the &amp;quot;Preview&amp;quot; button.&lt;br /&gt;
#Assuming you are satisfied with the message, click the &amp;quot;Send&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
==Reading and replying to messages==&lt;br /&gt;
&lt;br /&gt;
When you are sent a message, the Messages window will pop-up. Also, the Messages block will display the name of the person sending the message with a link to read the message. If you have set the email option (see Message Settings below), then you will get a copy of the message in your email after the time you have specified if you are not logged in.&lt;br /&gt;
&lt;br /&gt;
After reading a message, you may type a reply then click on the &amp;quot;Send message&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
==Searching messages==&lt;br /&gt;
[[Image:MsgSearch.jpg|thumb|Message window Search tab]]&lt;br /&gt;
In addition to searching for people, the Search tab in the Messages window provides the option to search for keywords, only messages to or from you, and to include in the search people you have previously blocked from contacting you.&lt;br /&gt;
&lt;br /&gt;
==Managing contacts==&lt;br /&gt;
[[Image:MsgContacts.jpg|thumb|Message window Contacts tab]]&lt;br /&gt;
People may be added to your list of contacts (or blocked from contacting you) by clicking the &amp;quot;Add contact&amp;quot; (or &amp;quot;Block contact&amp;quot;) icon opposite their name in the Messages window.&lt;br /&gt;
&lt;br /&gt;
By default the contact list is empty. In order to send a message or to create a shortcut to the person you are sending, go to the Search tab. &lt;br /&gt;
&lt;br /&gt;
==Message history==&lt;br /&gt;
&lt;br /&gt;
A record of messages sent to/from a person may be obtained by clicking the &amp;quot;History&amp;quot; icon opposite their name in the Messages window.&lt;br /&gt;
&lt;br /&gt;
==Message settings==&lt;br /&gt;
[[Image:MsgSettings.jpg|thumb|Message window Settings tab]]&lt;br /&gt;
Message settings may be changed via the Settings tab in the Messages window.&lt;br /&gt;
&lt;br /&gt;
Here you can decide on having a popup Message window whenever you get a new message, blocking messages from people who are not on your Contacts list, having an audio signal for a new message, using a HTML editor, or getting email messages when you are offline.&lt;br /&gt;
&lt;br /&gt;
Note: It&#039;s possible to set a different email address for receiving copies of messages to the email address in your profile.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[Messaging FAQ]]&lt;br /&gt;
*[[Using Moodle book]] Chapter 5: Forums, Chats, and Messaging&lt;br /&gt;
*[[Messaging enhancements]] (contributed code)&lt;br /&gt;
*[[Development:Messaging 2.0]]&lt;br /&gt;
&lt;br /&gt;
Using Moodle forum discussions:&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=27559 What facilities are there for seeing other users&#039; messages?]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=58977 How can I see student messages?]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=34972 Viewing old messages?]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=63401 Restrict Messaging to Course Participants/Teachers]&lt;br /&gt;
&lt;br /&gt;
[[es:Mensajería]]&lt;br /&gt;
[[eu:Mezularitza]]&lt;br /&gt;
[[de:Mitteilungen]]&lt;br /&gt;
[[fr:Messagerie]]&lt;br /&gt;
[[ja:メッセージング]]&lt;/div&gt;</summary>
		<author><name>Odoardo</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Installation_guide_-_Moodle_for_Windows_on_a_USB_Memory_Stick&amp;diff=75449</id>
		<title>Installation guide - Moodle for Windows on a USB Memory Stick</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Installation_guide_-_Moodle_for_Windows_on_a_USB_Memory_Stick&amp;diff=75449"/>
		<updated>2010-09-02T11:20:30Z</updated>

		<summary type="html">&lt;p&gt;Odoardo: /* Poodle - live Moodle on USB storage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://www.chsoftware.net/en/useware/wos/wos.htm CH Software&#039;s WOS - Webserver on a Stick] packages a complete Apache/PHP/MySQL webserver with a wrapper that automatically configures and starts the servers; the Small Edition takes only 20 Mb. It is published under the GNU GPL.&lt;br /&gt;
&lt;br /&gt;
The complete package with a vanilla Moodle 1.5.3, WOS Portable SE 1.1.1, Apache 2.0.5, PHP 5.1.2 (and 4.4.1), and MySQL 4.1.18-nt - all free, open source software - occupies less than 100Mb.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
&lt;br /&gt;
For best results you should always install and run WOS from the root directory of a drive. The first time it&#039;s run, WOS configures the paths for the servers based on the current directory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;Note: Make sure you stop IIS service which may already be running on your PC.&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1. Start by downloading the latest versions of [http://www.chsoftware.net/en/useware/wos/wos.htm?action=download WOS  Portable or WOS Portable Small Edition.]&lt;br /&gt;
&lt;br /&gt;
1a. Thanks to [http://moodle.org/mod/forum/discuss.php?d=45618#211677 Matt Campbell], you can also get the complete Moodle on a Stick (MOS) package as a single zip download from this&lt;br /&gt;
 URL:http://instructor.metrotech.org/~mcampbell/USBMoodle.zip &lt;br /&gt;
(Includes Moodle 1.5.3 and 1.6.0, from 2006, as well as the WOS package) Simply unzip the file onto a USB stick, check the readme &lt;br /&gt;
file to make sure your setup is correct, and run &lt;br /&gt;
&lt;br /&gt;
 start.exe &lt;br /&gt;
&lt;br /&gt;
if using this method.&lt;br /&gt;
&lt;br /&gt;
2. Unzip the file and copy to your USB Stick. &lt;br /&gt;
Switch to the stick and double click start.exe to begin the WOS installation.&lt;br /&gt;
&lt;br /&gt;
3. Choose your language, then click through the Terms of Use. WOS starts up and displays the WOS Status dialog box and opens your web browser to the WOS start page &lt;br /&gt;
              &lt;br /&gt;
* You should now see the follow on the WOS startup page.&lt;br /&gt;
 Apache 2.0.55 is running&lt;br /&gt;
 PHP 5.1.2 works (or PHP4 if you configured it that way)&lt;br /&gt;
 MySql 4.1.18-nt is running&lt;br /&gt;
 Document Root is: F:/www&lt;br /&gt;
&lt;br /&gt;
4. Setup your Database&lt;br /&gt;
Click on the PHPMyAdmin link on the Start page.&lt;br /&gt;
In PHPMyAdmin, type a name for your database. ie: &#039;moodle&#039; and click Enter.&lt;br /&gt;
      &lt;br /&gt;
&lt;br /&gt;
5. Now Download your preferred version of Moodle from [http://download.moodle.org/ the Moodle Download page] and unzip the file to your www directory on the USB stick.&lt;br /&gt;
&lt;br /&gt;
6. Run Moodle Installation. &lt;br /&gt;
Using the directory and settings above, the URL is  http://localhost/moodle/install.php.&lt;br /&gt;
&lt;br /&gt;
Now you simply work through the normal Moodle installation procedures.&lt;br /&gt;
NOTE: During the databases setup, use root as the database user and leave the password field blank (warning: security risk if opening to your LAN/WAN)It should work just like it does on the web or on your hard drive windows installation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
&lt;br /&gt;
Moodle requires a number of PHP settings to be active for it to work. On most servers these will already be the default settings. However, I noticed the WOS package required register_globals needed to be turned off and magic_quotes gpc turned On. These are defined in PHP&#039;s configuration file (usually called php.ini):&lt;br /&gt;
&lt;br /&gt;
WOS Portable is freeware, and there is no official support.&lt;br /&gt;
&lt;br /&gt;
If you have a problem after running through the above, try the troubleshooting hints on the [http://www.woswiki.chsoftware.net/index.php/General_troubleshooting WOS Wiki].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*Another way to do it (in French) [http://agir.transfer-tic.org/moodleauf/mod/resource/view.php?id=727 Guide de clonage d&#039;un site Moodle]&lt;br /&gt;
*[[sk:Moodle Windows Inštalácia na USB kľúči]]&lt;br /&gt;
*Another way to do it (with SQLite database)- [https://docs.moodle.org/en/Student_projects/SQLite#Moodle.2FSQLite_on_a_stick Moodle/SQLite on a stick]&lt;br /&gt;
&lt;br /&gt;
==Poodle - live Moodle on USB storage==&lt;br /&gt;
Poodle (short for Portable Moodle) is a software tool designed to allow for the delivery of Moodle content offline.&lt;br /&gt;
&lt;br /&gt;
Moodle is designed to offer an online environment for learning and collaboration between teachers and students.  Many different education institutions have created content for classes and instruction in the Moodle platform.  The Poodle is a way to bring some of that content to those who are in low-bandwidth and no-bandwidth areas.&lt;br /&gt;
&lt;br /&gt;
[http://www.maflt.org/products/poodle website and download]&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[hr:Upute za instalaciju - Moodle za Windows na USB memoriji]]&lt;/div&gt;</summary>
		<author><name>Odoardo</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=Teacher_role&amp;diff=54068</id>
		<title>Teacher role</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=Teacher_role&amp;diff=54068"/>
		<updated>2009-04-08T11:50:46Z</updated>

		<summary type="html">&lt;p&gt;Odoardo: /* Teacher overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Teacher overview==&lt;br /&gt;
&#039;&#039;&#039;Teacher&#039;&#039;&#039; is one of the core user [[Assign roles|roles]] in Moodle. The others include [[Administrator]], [[Student]] and [[Guest access|Guest]]. These roles have privileges and control what you can and can&#039;t do within particular areas of a Moodle.  In short, an &#039;&#039;Administrator&#039;&#039; can do almost anything and go anywhere, a &#039;&#039;Teacher&#039;&#039; has control over a specific course within a Moodle and the experience of their learners, and a &#039;&#039;Student&#039;&#039; participates in a course.&lt;br /&gt;
&lt;br /&gt;
The term &#039;Teacher&#039; can be changed to something else in the course settings or in the site settings.   For example &#039;Tutor&#039;, &#039;Facilitator&#039;, &#039;Professor&#039; or &#039;Instructor&#039; might be more appropriate.  The default term is Teacher and is generally used throughout Moodle documentation.&lt;br /&gt;
&lt;br /&gt;
A participant/user is assigned the &#039;Teacher&#039; role in a specific [[Course| course]]. Being a &#039;Teacher&#039; in one course does not give you any special privileges in another. For example, you must be specifically added to a course as a &#039;Teacher&#039;, or a &#039;Student&#039;, or be allowed in as a guest to have any access at all.&lt;br /&gt;
&lt;br /&gt;
==Course creator==&lt;br /&gt;
In later versions of Moodle, the role of teacher has been further defined.  There is now a role called &amp;quot;[[Course creator]]&amp;quot;. This role can create a course, assign Teachers, plus have all the privileges of a Teacher.&lt;br /&gt;
&lt;br /&gt;
==Non-editing teacher== &lt;br /&gt;
There is &amp;quot;non editing teacher&amp;quot; role that would be suitable for a student mentor or course adjuncts.  &lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=43024 Why &amp;quot;teacher&amp;quot; discussion]&lt;br /&gt;
&lt;br /&gt;
[[Category: Roles]]&lt;br /&gt;
&lt;br /&gt;
[[eu:Irakaslea]]&lt;br /&gt;
[[fr:Enseignant]]&lt;br /&gt;
[[it:Docente]]&lt;br /&gt;
[[ja:教師]]&lt;br /&gt;
[[zh:教师]]&lt;br /&gt;
[[de:Trainer-Rolle]]&lt;/div&gt;</summary>
		<author><name>Odoardo</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=learning_objects&amp;diff=45227</id>
		<title>learning objects</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=learning_objects&amp;diff=45227"/>
		<updated>2008-10-12T08:27:22Z</updated>

		<summary type="html">&lt;p&gt;Odoardo: /* What are learning objects? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What are learning objects? ==&lt;br /&gt;
&lt;br /&gt;
The broadest definition of learning objects seems to be, &amp;quot;any digital resource that can be reused to support learning.&amp;quot; &lt;br /&gt;
&lt;br /&gt;
http://www.uwm.edu/Dept/CIE/AOP/LO_what.html&lt;br /&gt;
&lt;br /&gt;
According to LOAZ, &amp;quot;There are many characteristics of learning objects, the common ones are: accessibility, interoperability, adaptability, reusability, durability, and granularity.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
http://www.loaz.com/learning-objects/learning-object-characteristics.html&lt;br /&gt;
&lt;br /&gt;
What role do learning objects play in Moodle? If we accept that any reusable, digital resource can be a learning object, almost any resource or activity we use in Moodle qualifies. After all, you can import and export resources and activities between courses pretty easily.&lt;br /&gt;
&lt;br /&gt;
=== Creating Learning Objects with Moodle ===&lt;br /&gt;
&lt;br /&gt;
Consider the book module. Perhaps you have created a Moodle book about the fall of the Berlin Wall for a history course you are teaching. If you permit a German instructor at your school to import that book into one of his or her courses, then your book has met the criteria of a learning object. It is digital, portable and reusable.&lt;br /&gt;
&lt;br /&gt;
The same can be said of resources created with a glossary, a wiki, and other modules.&lt;br /&gt;
&lt;br /&gt;
=== Uploading Learning Objects to Moodle ===&lt;br /&gt;
&lt;br /&gt;
Is a PowerPoint presentation a learning object that we can upload and use in Moodle? It would seem so. The same can be said of a text document, an image, a self-contained web site, and any other digital teaching resource that you create. If it is reusable, it is probably a learning object. This would include the simplest annotated image and the most sophisticated interactive multimedia resource.&lt;br /&gt;
&lt;br /&gt;
If you can upload a resource to your Moodle site and use it in more than one course, it is a learning object. Of course, if the learning object is already on the Web, you may choose to link to it. Think of a YouTube movie or a SlideShare presentation.&lt;br /&gt;
&lt;br /&gt;
=== Additonal Learning Object Considerations ===&lt;br /&gt;
&lt;br /&gt;
But what about metadata and SCORM? What about tracing student learning? And don&#039;t learning objects have to be housed in a searchable repository? These and other considerations are discussed by experts, but do not yet seem to have been resolved.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Learning_Objects&lt;/div&gt;</summary>
		<author><name>Odoardo</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/21/en/index.php?title=learning_objects&amp;diff=45226</id>
		<title>learning objects</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/21/en/index.php?title=learning_objects&amp;diff=45226"/>
		<updated>2008-10-12T08:26:07Z</updated>

		<summary type="html">&lt;p&gt;Odoardo: /* Uploading Learning Objects to Moodle */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What are learning objects? ==&lt;br /&gt;
&lt;br /&gt;
The broadest definition of learning objects seems to be, &amp;quot;any digital resource that can be reused to support learning.&amp;quot; &lt;br /&gt;
&lt;br /&gt;
http://www.uwm.edu/Dept/CIE/AOP/LO_what.html&lt;br /&gt;
&lt;br /&gt;
Accoring to LOAZ, &amp;quot;There are many characteristics of learning objects, the common ones are: accessibility, interoperability, adaptability, reusability, durability, and granularity.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
http://www.loaz.com/learning-objects/learning-object-characteristics.html&lt;br /&gt;
&lt;br /&gt;
What role do learning objects play in Moodle? If we accept that any reusable, digital resource can be a learning object, almost any resource or activity we use in Moodle qualifies. After all, you can import and export resources and activities between courses pretty easily.&lt;br /&gt;
&lt;br /&gt;
=== Creating Learning Objects with Moodle ===&lt;br /&gt;
&lt;br /&gt;
Consider the book module. Perhaps you have created a Moodle book about the fall of the Berlin Wall for a history course you are teaching. If you permit a German instructor at your school to import that book into one of his or her courses, then your book has met the criteria of a learning object. It is digital, portable and reusable.&lt;br /&gt;
&lt;br /&gt;
The same can be said of resources created with a glossary, a wiki, and other modules.&lt;br /&gt;
&lt;br /&gt;
=== Uploading Learning Objects to Moodle ===&lt;br /&gt;
&lt;br /&gt;
Is a PowerPoint presentation a learning object that we can upload and use in Moodle? It would seem so. The same can be said of a text document, an image, a self-contained web site, and any other digital teaching resource that you create. If it is reusable, it is probably a learning object. This would include the simplest annotated image and the most sophisticated interactive multimedia resource.&lt;br /&gt;
&lt;br /&gt;
If you can upload a resource to your Moodle site and use it in more than one course, it is a learning object. Of course, if the learning object is already on the Web, you may choose to link to it. Think of a YouTube movie or a SlideShare presentation.&lt;br /&gt;
&lt;br /&gt;
=== Additonal Learning Object Considerations ===&lt;br /&gt;
&lt;br /&gt;
But what about metadata and SCORM? What about tracing student learning? And don&#039;t learning objects have to be housed in a searchable repository? These and other considerations are discussed by experts, but do not yet seem to have been resolved.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Learning_Objects&lt;/div&gt;</summary>
		<author><name>Odoardo</name></author>
	</entry>
</feed>