https://docs.moodle.org/31/en/api.php?action=feedcontributions&user=Johnok&feedformat=atomMoodleDocs - User contributions [en]2024-03-29T08:26:21ZUser contributionsMediaWiki 1.39.6https://docs.moodle.org/31/en/index.php?title=admin/setting/authsettingldap&diff=126178admin/setting/authsettingldap2017-05-24T01:35:16Z<p>Johnok: Redirect to LDAP auth page</p>
<hr />
<div>#REDIRECT [[LDAP_authentication]]</div>Johnokhttps://docs.moodle.org/31/en/index.php?title=Installing_unoconv&diff=126146Installing unoconv2017-04-04T03:33:05Z<p>Johnok: Undo revision 126145 by Johnok (talk) Oops wrong version - google!</p>
<hr />
<div>{{Environment}}<br />
==What is unoconv?==<br />
<br />
"unoconv" is a command line program that is used to convert between different office document file formats. It uses an instance of [http://libreoffice.org LibreOffice] to do the conversion and is used by the [[Assignment activity]] to convert documents to pdf so that they can be annotated. If unoconv is not installed - the only impact is that the assignment activities will only allow annotations when students upload a pdf document. <br />
<br />
The steps required to install unoconv are different depending on the operating system that you have installed Moodle on. <br />
<br />
== Installing unoconv on Linux ==<br />
The required version of unoconv is at least 0.7. Depending on your flavour of linux, this may be available in your package manager and you can install it directly with:<br />
<br />
===Ubuntu 16.04 LTS===<br />
<pre><br />
apt-get install unoconv<br />
</pre><br />
<br />
If your package manager contains an older version of the package, you will have to find a newer version and install it manually ([https://packages.debian.org/stretch/unoconv Debian Testing]). Unoconv itself is just a python script, so it has few dependencies.<br />
<br />
Potential problems:<br />
* On some systems the apache user home directory is set to a non existent folder. This can cause unoconv to fail. There are 2 solutions to this - one is to make a (writable) home directory for the apache user (like /home/www-data). The other is to run a unoconv listener (described below) as another user other than the apache user (someone with a valid, writable home directory).<br />
* If you are still running 14.04LTS then unoconv won't work as shipped. This might not be the most efficient route but it worked by first installing unoconv (version 0.6) from the package manager as above. You will then need to grab unoconv 0.7 from Github (https://github.com/dagwieers/unoconv), then upgrade to the latest libreoffice using the PPA (https://launchpad.net/~libreoffice/+archive/ubuntu/ppa). Point moodle at the Github version of unoconv. You need to modify the Python unoconv file by changing 'python' in the first line to 'python3'. You also need to change the permissions on the directory /var/www so that the user www-data can write to it (www-data needs to write to its home directory which it cannot do by default).<br />
<br />
===Ubuntu 14.04 LTS===<br />
1) Navigate to opt directory<br />
<pre><br />
cd /opt<br />
</pre><br />
<br />
2) Download unoconv<br />
<pre><br />
sudo wget https://raw.githubusercontent.com/dagwieers/unoconv/master/unoconv<br />
</pre><br />
<br />
3) Modify the Python unoconv file by changing 'python' in the first line to 'python3'<br />
<pre><br />
sudo nano /opt/unoconv<br />
</pre><br><br />
eg. <pre>#!/usr/bin/env python3</pre><br />
<br />
4) Make unoconv executable<br />
<pre><br />
sudo chmod ugo+x /opt/unoconv<br />
</pre><br />
<br />
5) Add LibreOffice PPA to your system and install the latest version<br />
<pre><br />
sudo add-apt-repository ppa:libreoffice/ppa<br />
sudo apt-get update<br />
sudo apt-get install libreoffice<br />
</pre><br />
<br />
6) Change permissions so apache can write to its home directory<br />
<pre><br />
sudo chown www-data /var/www<br />
</pre><br />
<br />
7) From your browser navigate to<br />
''Site administration > Server > System paths'' and add the path to unoconv<br><br />
/opt/unoconv<br />
*Note: if you would like to preserve the default path add a symbolic link to /usr/bin: <br />
<pre><br />
sudo ln -s /opt/unoconv /usr/bin/<br />
</pre><br />
<br />
8) Navigate to <br />
''Site administration > Plugins > Activity modules > Assignment > Feedback plugins > Annotate PDF > Test unoconv path'' <br><br />
You should see: <br><br />
"The unoconv path appears to be properly configured."<br><br />
*Download the converted pdf test file. (if the PDF fails to load ensure that www-data can write to its home directory: /var/www)<br />
<br />
===Debian Jessie===<br />
On Debian Stable, the cleanest method to install [https://packages.debian.org/jessie-backports/unoconv unoconv] is using Jessie-backports. First, enable backports repo line in /etc/apt/sources.list:<br />
<pre><br />
#### Jessie-backports ####<br />
deb http://ftp.debian.org/debian jessie-backports main<br />
</pre><br />
<br />
Then, update and install unoconv from jessie-backports:<br />
<pre><br />
apt-get update<br />
apt-get install -t jessie-backports unoconv<br />
</pre><br />
<br />
The package will bring all necessary dependencies for you.<br />
<br />
===CentOS / RedHat===<br />
Just before you start, you might like to consider installing the latest [http://www.tecmint.com/install-libreoffice-on-rhel-centos-fedora-debian-ubuntu-linux-mint/ LibreOffice 5.2] directly from RPM packages, that are not part of the distribution you are using.<br />
As of nov-2016, CentOS and RedHat 7.2 comes with OpenOffice 4.3 . so if you are not interested in using this version and would like to install latest 5.2 independent LibreOffice 5.2 , please remove any openoffice packages you might have on your OS by issuing:<br />
<pre><br />
yum remove openoffice* libreoffice*<br />
</pre><br />
And then follow the install instructions [http://www.tecmint.com/install-libreoffice-on-rhel-centos-fedora-debian-ubuntu-linux-mint/ LibreOffice 5.2]. It is recommended to chose your localized libreoffice version for better document conversions. and also please skip the following "yum install openoffice* ..." command.<br />
<pre><br />
yum install openoffice* openoffice-pyuno<br />
git clone https://github.com/dagwieers/unoconv.git<br />
# copy <br />
cp unoconv/unoconv /usr/bin<br />
# or link unoconv to /usr/bin<br />
ln -s unoconv/unoconv /usr/bin/unoconv<br />
</pre><br />
Note: depends on what version you are installing, openoffice or libreoffice, make sure you installed the *-pyuno package. (the headless package is already compiled into the core)<br />
<br />
Make sure it is properly configured:<br />
http://your-moodle/admin/search.php?query=unoconv<br />
<br />
Production servers should consider running unoconv in listener mode, see [[Installing_unoconv#Run_a_unoconv_listener]] or follow directions bellow<br />
<pre><br />
vi /etc/systemd/system/unoconv.service<br />
</pre><br />
And then copy and paste the following configuration into it:<br />
<pre><br />
[Unit]<br />
Description=Unoconv listener for document conversions<br />
Documentation=https://github.com/dagwieers/unoconv<br />
After=network.target remote-fs.target nss-lookup.target<br />
<br />
[Service]<br />
Type=simple<br />
Environment="UNO_PATH=/usr/lib64/libreoffice/program"<br />
ExecStart=/usr/bin/unoconv --listener<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</pre><br />
And then enable and start the above service<br />
<pre><br />
systemctl enable unoconv.service<br />
systemctl start unoconv.service<br />
</pre><br />
<br />
== Installing unoconv on OS X ==<br />
Download and install LibreOffice for Mac. Unfortunately - newer versions of LibreOffice are not currently compatible with unoconv for mac and you will have to install LibreOffice 4.2 (Direct download link - https://downloadarchive.documentfoundation.org/libreoffice/old/4.2.5.2/mac/x86_64/LibreOffice_4.2.5.2_MacOS_x86-64.dmg).<br />
<br />
Get the latest version of the unoconv python script. One way to do this is with http://brew.sh/ brew.<br />
<pre><br />
brew install unoconv<br />
</pre><br />
<br />
If you haven't done it already - install ghostscript. One way to install ghostscript is also with http://brew.sh/ brew<br />
<pre><br />
brew install ghostscript<br />
</pre><br />
<br />
Set the paths to unoconv and ghostscript in Moodle (''Site administration > Server > System paths''). If you used brew, they will both be installed to /usr/local/bin.<br />
<br />
LibreOffice needs write access to the current users home directory to create some temporary files. When unoconv is run as the webserver user (_www) it does not normally have this permission.<br />
<br />
There are some ways to get around this - one way is just to give the "_www" user write access to /Library/WebServer. <br />
<br />
Another solution is to convince LibreOffice that this users home directory is somewhere else. This can be done by inserting this code into the top of the unoconv python script.<br />
Code to insert:<br />
<pre><br />
# Set home to a writable folder. <br />
os.environ['HOME'] = '/tmp/' <br />
</pre><br />
<br />
This needs to be inserted at line 36 immediately after the line "exitcode = 0"<br />
<br />
== Installing unoconv on Windows ==<br />
Download and install LibreOffice for windows.<br />
<br />
Download the latest version of the unoconv script from https://github.com/dagwieers/unoconv/releases (download the zip version). <br />
<br />
From the downloaded zip file - extract the one file "unoconv-0.7\unoconv" (no file extension). This is the unoconv script - none of the other files in the package are required. <br />
<br />
Rename the downloaded script to C:\unoconv\unoconv.py<br />
<br />
Create a batch file C:\unoconv\unoconv.bat with these contents:<br />
<br />
<pre><br />
@"C:\Program Files\LibreOffice 5\program\python.exe" c:\unoconv\unoconv.py %*<br />
</pre><br />
<br />
Set paths in Moodle. <br />
<br />
Login as admin and go to ''Site administration > Server > System paths''<br />
<br />
Set pathtogs setting to your ghostscript installation binary, (C:\gs\bin\gswin32.exe)<br />
<br />
Set pathtounoconv to the batch file created above (C:\unoconv\unoconv.bat)<br />
<br />
Test ghostscript and unoconv are working correctly in the admin test pages "Site administration > Plugins > Activity modules > Assignment > Feedback plugins > Annotate PDF".<br />
<br />
== Run a unoconv listener ==<br />
Unoconv utilises a client/server process when converting documents. By default, when there is no running server process - each time unoconv runs it will start a server process, send its request and shut down the server process when the request is complete. The drawback of this mode is that if 2 requests are submitted simultaneously - this can cause the first request to shutdown the server process when the second request is still in progress - and the second conversion request fails. A more robust way to configure unoconv is to start a server process at boot time, and/or run a script to monitor it and restart it if it crashes.<br />
<br />
To start a unoconv listener at boot time - you need a start up script. Different operating systems and Linux distributions use different startup scripts - but here are some examples of startup scripts for different systems.<br />
<br />
[[mod/assign/feedback/editpdf/testunoconv/upstart | Upstart script for Ubuntu based systems]]<br />
<br />
[[mod/assign/feedback/editpdf/testunoconv/launchd | Launchd script for OS X]]<br />
<br />
[[mod/assign/feedback/editpdf/testunoconv/initd | Init script for Debian]]<br />
<br />
[[mod/assign/feedback/editpdf/testunoconv/initdcentos6 | Init script for CentOS/RedHat 6.x]]<br />
<br />
[[mod/assign/feedback/editpdf/testunoconv/systemd | SystemD service script for CentOS/RedHat 7.x]]<br />
<br />
== Offload processing to a different server ==<br />
Processing office documents can put increased load on your webserver, which may impact on the responsiveness of your site. If you are installing unoconv on a large site you may want to consider running unoconv on a server that is not also serving web requests.<br />
<br />
How to do this:<br />
<br />
Install unoconv on each webservers and the remote server following the installation instructions above. <br />
<br />
Make sure unoconv is started at boot time on the remote server with the "--listener" argument and is monitored and restarted if it exits (see Debian init script for an example of how to do this). <br />
<br />
Open the firewall port 2002 between the moodle webservers and the machine running unoconv.<br />
<br />
Share the moodle data root between the webservers and the machine running unoconv. This folder must be mounted at the same path on all servers. <br />
<br />
Install a wrapper for unoconv on the webservers that forwards the requests to the remote server. Example:<br />
<pre><br />
#!/bin/bash<br />
# Wrapper script for unoconv to forward processing.<br />
# Install to /usr/bin/unoconv-remote with 755 permissions<br />
/usr/bin/unoconv --server=<ip of remote server> "$@"<br />
</pre><br />
<br />
Configure the path to unoconv in the Moodle admin settings to point to this wrapper script.<br />
<br />
==Additional resources==<br />
The unoconv [https://github.com/dagwieers/unoconv documentation] site has additional information on installation of unoconv and troubleshooting tips.<br />
<br />
==See also==<br />
<br />
* [https://moodle.org/mod/forum/discuss.php?d=335310 Is the unoconv installation a security risk?] forum discussion<br />
<br />
[[Category:Site administration]]<br />
[[Category:Assignment]]<br />
<br />
[[es:mod/assign/feedback/editpdf/testunoconv]]</div>Johnokhttps://docs.moodle.org/31/en/index.php?title=Installing_unoconv&diff=126145Installing unoconv2017-04-04T03:08:20Z<p>Johnok: The settings page for unoconv changed, updated docs</p>
<hr />
<div>{{Environment}}<br />
==What is unoconv?==<br />
<br />
"unoconv" is a command line program that is used to convert between different office document file formats. It uses an instance of [http://libreoffice.org LibreOffice] to do the conversion and is used by the [[Assignment activity]] to convert documents to pdf so that they can be annotated. If unoconv is not installed - the only impact is that the assignment activities will only allow annotations when students upload a pdf document. <br />
<br />
The steps required to install unoconv are different depending on the operating system that you have installed Moodle on. <br />
<br />
== Installing unoconv on Linux ==<br />
The required version of unoconv is at least 0.7. Depending on your flavour of linux, this may be available in your package manager and you can install it directly with:<br />
<br />
===Ubuntu 16.04 LTS===<br />
<pre><br />
apt-get install unoconv<br />
</pre><br />
<br />
If your package manager contains an older version of the package, you will have to find a newer version and install it manually ([https://packages.debian.org/stretch/unoconv Debian Testing]). Unoconv itself is just a python script, so it has few dependencies.<br />
<br />
Potential problems:<br />
* On some systems the apache user home directory is set to a non existent folder. This can cause unoconv to fail. There are 2 solutions to this - one is to make a (writable) home directory for the apache user (like /home/www-data). The other is to run a unoconv listener (described below) as another user other than the apache user (someone with a valid, writable home directory).<br />
* If you are still running 14.04LTS then unoconv won't work as shipped. This might not be the most efficient route but it worked by first installing unoconv (version 0.6) from the package manager as above. You will then need to grab unoconv 0.7 from Github (https://github.com/dagwieers/unoconv), then upgrade to the latest libreoffice using the PPA (https://launchpad.net/~libreoffice/+archive/ubuntu/ppa). Point moodle at the Github version of unoconv. You need to modify the Python unoconv file by changing 'python' in the first line to 'python3'. You also need to change the permissions on the directory /var/www so that the user www-data can write to it (www-data needs to write to its home directory which it cannot do by default).<br />
<br />
===Ubuntu 14.04 LTS===<br />
1) Navigate to opt directory<br />
<pre><br />
cd /opt<br />
</pre><br />
<br />
2) Download unoconv<br />
<pre><br />
sudo wget https://raw.githubusercontent.com/dagwieers/unoconv/master/unoconv<br />
</pre><br />
<br />
3) Modify the Python unoconv file by changing 'python' in the first line to 'python3'<br />
<pre><br />
sudo nano /opt/unoconv<br />
</pre><br><br />
eg. <pre>#!/usr/bin/env python3</pre><br />
<br />
4) Make unoconv executable<br />
<pre><br />
sudo chmod ugo+x /opt/unoconv<br />
</pre><br />
<br />
5) Add LibreOffice PPA to your system and install the latest version<br />
<pre><br />
sudo add-apt-repository ppa:libreoffice/ppa<br />
sudo apt-get update<br />
sudo apt-get install libreoffice<br />
</pre><br />
<br />
6) Change permissions so apache can write to its home directory<br />
<pre><br />
sudo chown www-data /var/www<br />
</pre><br />
<br />
7) From your browser navigate to<br />
''Site administration > Plugins > Document converters > Unoconv'' and add the path to unoconv<br><br />
/opt/unoconv<br />
*Note: if you would like to preserve the default path add a symbolic link to /usr/bin: <br />
<pre><br />
sudo ln -s /opt/unoconv /usr/bin/<br />
</pre><br />
<br />
8) Navigate to <br />
''Site administration > Plugins > Document converters > Unoconv > Test unoconv path'' <br><br />
You should see: <br><br />
"The unoconv path appears to be properly configured."<br><br />
*Download the converted pdf test file. (if the PDF fails to load ensure that www-data can write to its home directory: /var/www)<br />
<br />
===Debian Jessie===<br />
On Debian Stable, the cleanest method to install [https://packages.debian.org/jessie-backports/unoconv unoconv] is using Jessie-backports. First, enable backports repo line in /etc/apt/sources.list:<br />
<pre><br />
#### Jessie-backports ####<br />
deb http://ftp.debian.org/debian jessie-backports main<br />
</pre><br />
<br />
Then, update and install unoconv from jessie-backports:<br />
<pre><br />
apt-get update<br />
apt-get install -t jessie-backports unoconv<br />
</pre><br />
<br />
The package will bring all necessary dependencies for you.<br />
<br />
===CentOS / RedHat===<br />
Just before you start, you might like to consider installing the latest [http://www.tecmint.com/install-libreoffice-on-rhel-centos-fedora-debian-ubuntu-linux-mint/ LibreOffice 5.2] directly from RPM packages, that are not part of the distribution you are using.<br />
As of nov-2016, CentOS and RedHat 7.2 comes with OpenOffice 4.3 . so if you are not interested in using this version and would like to install latest 5.2 independent LibreOffice 5.2 , please remove any openoffice packages you might have on your OS by issuing:<br />
<pre><br />
yum remove openoffice* libreoffice*<br />
</pre><br />
And then follow the install instructions [http://www.tecmint.com/install-libreoffice-on-rhel-centos-fedora-debian-ubuntu-linux-mint/ LibreOffice 5.2]. It is recommended to chose your localized libreoffice version for better document conversions. and also please skip the following "yum install openoffice* ..." command.<br />
<pre><br />
yum install openoffice* openoffice-pyuno<br />
git clone https://github.com/dagwieers/unoconv.git<br />
# copy <br />
cp unoconv/unoconv /usr/bin<br />
# or link unoconv to /usr/bin<br />
ln -s unoconv/unoconv /usr/bin/unoconv<br />
</pre><br />
Note: depends on what version you are installing, openoffice or libreoffice, make sure you installed the *-pyuno package. (the headless package is already compiled into the core)<br />
<br />
Make sure it is properly configured:<br />
http://your-moodle/admin/search.php?query=unoconv<br />
<br />
Production servers should consider running unoconv in listener mode, see [[Installing_unoconv#Run_a_unoconv_listener]] or follow directions bellow<br />
<pre><br />
vi /etc/systemd/system/unoconv.service<br />
</pre><br />
And then copy and paste the following configuration into it:<br />
<pre><br />
[Unit]<br />
Description=Unoconv listener for document conversions<br />
Documentation=https://github.com/dagwieers/unoconv<br />
After=network.target remote-fs.target nss-lookup.target<br />
<br />
[Service]<br />
Type=simple<br />
Environment="UNO_PATH=/usr/lib64/libreoffice/program"<br />
ExecStart=/usr/bin/unoconv --listener<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</pre><br />
And then enable and start the above service<br />
<pre><br />
systemctl enable unoconv.service<br />
systemctl start unoconv.service<br />
</pre><br />
<br />
== Installing unoconv on OS X ==<br />
Download and install LibreOffice for Mac. Unfortunately - newer versions of LibreOffice are not currently compatible with unoconv for mac and you will have to install LibreOffice 4.2 (Direct download link - https://downloadarchive.documentfoundation.org/libreoffice/old/4.2.5.2/mac/x86_64/LibreOffice_4.2.5.2_MacOS_x86-64.dmg).<br />
<br />
Get the latest version of the unoconv python script. One way to do this is with http://brew.sh/ brew.<br />
<pre><br />
brew install unoconv<br />
</pre><br />
<br />
If you haven't done it already - install ghostscript. One way to install ghostscript is also with http://brew.sh/ brew<br />
<pre><br />
brew install ghostscript<br />
</pre><br />
<br />
Set the paths to unoconv and ghostscript in Moodle (''Site administration > Server > System paths''). If you used brew, they will both be installed to /usr/local/bin.<br />
<br />
LibreOffice needs write access to the current users home directory to create some temporary files. When unoconv is run as the webserver user (_www) it does not normally have this permission.<br />
<br />
There are some ways to get around this - one way is just to give the "_www" user write access to /Library/WebServer. <br />
<br />
Another solution is to convince LibreOffice that this users home directory is somewhere else. This can be done by inserting this code into the top of the unoconv python script.<br />
Code to insert:<br />
<pre><br />
# Set home to a writable folder. <br />
os.environ['HOME'] = '/tmp/' <br />
</pre><br />
<br />
This needs to be inserted at line 36 immediately after the line "exitcode = 0"<br />
<br />
== Installing unoconv on Windows ==<br />
Download and install LibreOffice for windows.<br />
<br />
Download the latest version of the unoconv script from https://github.com/dagwieers/unoconv/releases (download the zip version). <br />
<br />
From the downloaded zip file - extract the one file "unoconv-0.7\unoconv" (no file extension). This is the unoconv script - none of the other files in the package are required. <br />
<br />
Rename the downloaded script to C:\unoconv\unoconv.py<br />
<br />
Create a batch file C:\unoconv\unoconv.bat with these contents:<br />
<br />
<pre><br />
@"C:\Program Files\LibreOffice 5\program\python.exe" c:\unoconv\unoconv.py %*<br />
</pre><br />
<br />
Set paths in Moodle. <br />
<br />
Login as admin and go to ''Site administration > Server > System paths''<br />
<br />
Set pathtogs setting to your ghostscript installation binary, (C:\gs\bin\gswin32.exe)<br />
<br />
Set pathtounoconv to the batch file created above (C:\unoconv\unoconv.bat)<br />
<br />
Test ghostscript and unoconv are working correctly in the admin test pages "Site administration > Plugins > Activity modules > Assignment > Feedback plugins > Annotate PDF".<br />
<br />
== Run a unoconv listener ==<br />
Unoconv utilises a client/server process when converting documents. By default, when there is no running server process - each time unoconv runs it will start a server process, send its request and shut down the server process when the request is complete. The drawback of this mode is that if 2 requests are submitted simultaneously - this can cause the first request to shutdown the server process when the second request is still in progress - and the second conversion request fails. A more robust way to configure unoconv is to start a server process at boot time, and/or run a script to monitor it and restart it if it crashes.<br />
<br />
To start a unoconv listener at boot time - you need a start up script. Different operating systems and Linux distributions use different startup scripts - but here are some examples of startup scripts for different systems.<br />
<br />
[[mod/assign/feedback/editpdf/testunoconv/upstart | Upstart script for Ubuntu based systems]]<br />
<br />
[[mod/assign/feedback/editpdf/testunoconv/launchd | Launchd script for OS X]]<br />
<br />
[[mod/assign/feedback/editpdf/testunoconv/initd | Init script for Debian]]<br />
<br />
[[mod/assign/feedback/editpdf/testunoconv/initdcentos6 | Init script for CentOS/RedHat 6.x]]<br />
<br />
[[mod/assign/feedback/editpdf/testunoconv/systemd | SystemD service script for CentOS/RedHat 7.x]]<br />
<br />
== Offload processing to a different server ==<br />
Processing office documents can put increased load on your webserver, which may impact on the responsiveness of your site. If you are installing unoconv on a large site you may want to consider running unoconv on a server that is not also serving web requests.<br />
<br />
How to do this:<br />
<br />
Install unoconv on each webservers and the remote server following the installation instructions above. <br />
<br />
Make sure unoconv is started at boot time on the remote server with the "--listener" argument and is monitored and restarted if it exits (see Debian init script for an example of how to do this). <br />
<br />
Open the firewall port 2002 between the moodle webservers and the machine running unoconv.<br />
<br />
Share the moodle data root between the webservers and the machine running unoconv. This folder must be mounted at the same path on all servers. <br />
<br />
Install a wrapper for unoconv on the webservers that forwards the requests to the remote server. Example:<br />
<pre><br />
#!/bin/bash<br />
# Wrapper script for unoconv to forward processing.<br />
# Install to /usr/bin/unoconv-remote with 755 permissions<br />
/usr/bin/unoconv --server=<ip of remote server> "$@"<br />
</pre><br />
<br />
Configure the path to unoconv in the Moodle admin settings to point to this wrapper script.<br />
<br />
==Additional resources==<br />
The unoconv [https://github.com/dagwieers/unoconv documentation] site has additional information on installation of unoconv and troubleshooting tips.<br />
<br />
==See also==<br />
<br />
* [https://moodle.org/mod/forum/discuss.php?d=335310 Is the unoconv installation a security risk?] forum discussion<br />
<br />
[[Category:Site administration]]<br />
[[Category:Assignment]]<br />
<br />
[[es:mod/assign/feedback/editpdf/testunoconv]]</div>Johnokhttps://docs.moodle.org/31/en/index.php?title=External_database_authentication&diff=125910External database authentication2016-11-14T02:28:55Z<p>Johnok: Note about timestamps stored as bigint</p>
<hr />
<div>{{Authentication}}<br />
Location: '' Site administration > Plugins > Authentication > External database''<br />
<br />
<br />
This method uses an external database table to check whether a given username and password is valid. If the user does not currently exist in Moodle a new account will be created and their information copied from the external database. <br />
<br />
== Field mappings ==<br />
<br />
This is done by mapping fields at the bottom of the database authentication page. Each data field in the user profile has a text field next to it. Enter the name of the column in the external database that maps to the profile data field.<br />
<br />
'''Update Local''' - Specifies that the external data will be entered into the local field in question<br />
* On Creation - specifies that this will only happen on the original login when the account is created for the first time.<br />
* On Every Login - specifies that changes in the external data will be updated on the local Moodle field in question the next time the user logs in again.<br />
<br />
'''Update External''' - Specifies just the opposite, meaning changes in the local Moodle field in question will update the corresponding field in the external database<br />
* Never - Specifies this is disabled<br />
* On Update - Enables this to happen if a change is made locally (additional configuration is probably required)<br />
<br />
'''Lock Value''' - Only determines whether the local user can make a change in the Moodle field and does not affect the two settings above.<br />
* Unlocked - A user can make changes locally in the Moodle field (assumably even if it contradicts the external database the next login would change it again if Update Local is set<br />
* Locked - A user can never make changes<br />
* Unlocked if empty - A user can only make changes if the field is not populated already from the external database (this would seem to indicate a user could only enter something into this field once and could not change it after saving)<br />
<br />
== Automatic Synchronisation ==<br />
<br />
The above method adds new users only when they log in. If you want user accounts to be created in Moodle independent of actual logins, the db authentication plugin offers a script you can run regularly via 'cron'. A typical cron entry will be as follows...<br />
<br />
<pre><br />
0 * * * * /usr/bin/php /path/to/moodle/auth/db/cli/sync_users.php >dev/null<br />
</pre><br />
<br />
This runs every hour (adjust as required). It reads the entire table updating and creating local Moodle users. <br />
<br />
If you have custom profile fields on your site, these can be synced with External database authentication.<br />
<br />
==Additional Notes==<br />
<br />
It is now possible to use Salted Crypt passwords for the password format with external database authentication from the Password format setting:<br />
[[File:dbsaltedcrypt.png|thumb|300px|center]]<br />
<br />
<br />
* Plain text password matching is now always case sensitive<br />
* sha1/md5 hash comparisons are now enforced case insensitive (as underlying they are hexadecimal values)<br />
<br />
* Some of the things that apply to [[Upload users]] apply to the External database, but not all of the fields in the [[Upload users]] are available for the External Database authentication. The only available fields are the fields listed in the data mapping section of the admin page for the External Database connection.<br />
* Note that for MySQL databases moodle will store date custom profile fields in a bigint field (as a unix timestamp). Using a timestamp or datetime field will not work<br />
<br />
==See also==<br />
*Using Moodle [http://moodle.org/mod/forum/discuss.php?d=45444 Special and characters con tilde (accute accent) when connected to external database] forum discussion<br />
*Using Moodle [http://moodle.org/mod/forum/discuss.php?d=75519 HELP!--User Authentication problem] forum discussion<br />
*[[External database enrolment]]<br />
*change password in external DB authentication plugin [https://moodle.org/mod/forum/discuss.php?d=269311#p1162046] <br />
<br />
[[de:Externe Datenbank]]<br />
[[fr:Authentification par base de données externe]]<br />
[[ja:外部データベース認証]]<br />
[[es:Autenticación con BasedeDatos externa]]</div>Johnokhttps://docs.moodle.org/31/en/index.php?title=enrol/lti/index&diff=125168enrol/lti/index2016-09-02T07:51:42Z<p>Johnok: Add redirect to docs</p>
<hr />
<div>#REDIRECT [[Publish_as_LTI_tool]]</div>Johnokhttps://docs.moodle.org/31/en/index.php?title=Transitioning_to_HTTPS&diff=125157Transitioning to HTTPS2016-09-01T02:28:13Z<p>Johnok: Note about MDL-46269</p>
<hr />
<div>{{Security}}<br />
There are numerous benefits to running your moodle site using HTTPS. This increases the level of security especially involving sessions and passwords.<br />
<br />
== Steps ==<br />
=== Before you start ===<br />
Check all the content you use supports https. You will not be able to embed HTTP content over HTTPS. If some content is only available over HTTP, you can convert it from a direct embedding to a link.<br />
<br />
Make sure you have a staging environment. You will want to set up HTTPS the first time on a staging environment rather than updating your live site. It will take some time to convert to https and you will need to update content (see below).<br />
<br />
=== Setting up an SSL certificate ===<br />
The first thing you will need to do is acquire an SSL certificate. You can create these yourself, but this is only helpful for development purposes. Instead you will want to get your SSL certificate from a certificate authority, so that the certificate will be publicly verified.<br />
<br />
=== Setting up your server ===<br />
Then you will need enable SSL on your web server to add your certificate. This process will vary depending on your web server of choice.<br />
<br />
If you are using a proxy or load balancer, depending on your setup you will most likely want to set up the SSL certificate on your proxy server<br />
<br />
=== Setting up your moodle ===<br />
<br />
On a basic moodle site, it will be simple to set up https. Simply edit config.php and change http:// to https:// in $CFG->wwwroot.<br />
<br />
However if you are using a proxy or load balancer, depending on your setup you may need to set $CFG->sslproxy to 1, and not use SSL on the moodle server. Then the load balancer or proxy server can communicate directly to your moodle site, but serve to the clients over SSL.<br />
<br />
=== Updating content ===<br />
You will need to change all embeded content from being requested over http. Links do not matter. But you will need to update images and iframes, scorm modules, and LTI external tools. You can modify external tools to open in a new window instead of in an iframe and they will work fine.<br />
<br />
There is plans to work on a new tool to aid in this process. See MDL-46269 on the tracker.</div>Johnokhttps://docs.moodle.org/31/en/index.php?title=Transitioning_to_HTTPS&diff=125156Transitioning to HTTPS2016-09-01T02:14:09Z<p>Johnok: More info about updating content</p>
<hr />
<div>{{Security}}<br />
There are numerous benefits to running your moodle site using HTTPS. This increases the level of security especially involving sessions and passwords.<br />
<br />
== Steps ==<br />
=== Before you start ===<br />
Check all the content you use supports https. You will not be able to embed HTTP content over HTTPS. If some content is only available over HTTP, you can convert it from a direct embedding to a link.<br />
<br />
Make sure you have a staging environment. You will want to set up HTTPS the first time on a staging environment rather than updating your live site. It will take some time to convert to https and you will need to update content (see below).<br />
<br />
=== Setting up an SSL certificate ===<br />
The first thing you will need to do is acquire an SSL certificate. You can create these yourself, but this is only helpful for development purposes. Instead you will want to get your SSL certificate from a certificate authority, so that the certificate will be publicly verified.<br />
<br />
=== Setting up your server ===<br />
Then you will need enable SSL on your web server to add your certificate. This process will vary depending on your web server of choice.<br />
<br />
If you are using a proxy or load balancer, depending on your setup you will most likely want to set up the SSL certificate on your proxy server<br />
<br />
=== Setting up your moodle ===<br />
<br />
On a basic moodle site, it will be simple to set up https. Simply edit config.php and change http:// to https:// in $CFG->wwwroot.<br />
<br />
However if you are using a proxy or load balancer, depending on your setup you may need to set $CFG->sslproxy to 1, and not use SSL on the moodle server. Then the load balancer or proxy server can communicate directly to your moodle site, but serve to the clients over SSL.<br />
<br />
=== Updating content ===<br />
You will need to change all embeded content from being requested over http. Links do not matter. But you will need to update images and iframes, scorm modules, and LTI external tools. You can modify external tools to open in a new window instead of in an iframe and they will work fine.</div>Johnokhttps://docs.moodle.org/31/en/index.php?title=Transitioning_to_HTTPS&diff=125155Transitioning to HTTPS2016-09-01T02:00:45Z<p>Johnok: Add security tag</p>
<hr />
<div>{{Security}}<br />
There are numerous benefits to running your moodle site using HTTPS. This increases the level of security especially involving sessions and passwords.<br />
<br />
== Steps ==<br />
=== Setting up an SSL certificate ===<br />
The first thing you will need to do is acquire an SSL certificate. You can create these yourself, but this is only helpful for development purposes. Instead you will want to get your SSL certificate from a certificate authority, so that the certificate will be publicly verified.<br />
<br />
=== Setting up your server ===<br />
Then you will need enable SSL on your web server to add your certificate. This process will vary depending on your web server of choice.<br />
<br />
If you are using a proxy or load balancer, depending on your setup you will most likely want to set up the SSL certificate on your proxy server<br />
<br />
=== Setting up your moodle ===<br />
<br />
On a basic moodle site, it will be simple to set up https. Simply edit config.php and change http:// to https:// in $CFG->wwwroot.<br />
<br />
However if you are using a proxy or load balancer, depending on your setup you may need to set $CFG->sslproxy to 1, and not use SSL on the moodle server. Then the load balancer or proxy server can communicate directly to your moodle site, but serve to the clients over SSL.</div>Johnokhttps://docs.moodle.org/31/en/index.php?title=Transitioning_to_HTTPS&diff=125154Transitioning to HTTPS2016-09-01T01:59:33Z<p>Johnok: Start page guiding people on how to transition to HTTPS</p>
<hr />
<div>There are numerous benefits to running your moodle site using HTTPS. This increases the level of security especially involving sessions and passwords.<br />
<br />
== Steps ==<br />
=== Setting up an SSL certificate ===<br />
The first thing you will need to do is acquire an SSL certificate. You can create these yourself, but this is only helpful for development purposes. Instead you will want to get your SSL certificate from a certificate authority, so that the certificate will be publicly verified.<br />
<br />
=== Setting up your server ===<br />
Then you will need enable SSL on your web server to add your certificate. This process will vary depending on your web server of choice.<br />
<br />
If you are using a proxy or load balancer, depending on your setup you will most likely want to set up the SSL certificate on your proxy server<br />
<br />
=== Setting up your moodle ===<br />
<br />
On a basic moodle site, it will be simple to set up https. Simply edit config.php and change http:// to https:// in $CFG->wwwroot.<br />
<br />
However if you are using a proxy or load balancer, depending on your setup you may need to set $CFG->sslproxy to 1, and not use SSL on the moodle server. Then the load balancer or proxy server can communicate directly to your moodle site, but serve to the clients over SSL.</div>Johnokhttps://docs.moodle.org/31/en/index.php?title=IMS_Enterprise&diff=124348IMS Enterprise2016-07-20T04:01:13Z<p>Johnok: Added usage instructions</p>
<hr />
<div>{{Enrolment}}<br />
Location: IMS Enterprise file edit settings link in ''Site administration > Plugins > Enrolments > Manage enrol plugins''<br />
<br />
'''IMS Enterprise''' is an international standard XML file format which may be used to specify enrolments/unenrolments in courses, as well as course information and user information.<br />
<br />
==Using this enrolment method==<br />
<br />
IMS Enterprise enrolment will import an XML file from on your moodle server. Set "File location" to the full path to your xml file (locally on the server, e.g. /home/user/imsenterprise/file.xml)<br />
<br />
IMS Enterprise is not added to courses, but instead you run the import directly from the "Site administration > Plugins > Enrolments > IMS Enterprise file" page. To do this, click the "perform an IMS Enterprise import right now" link or run cron.<br />
<br />
==Format overview==<br />
<br />
Below is a simple guide to the basic structure of a typical IMS Enterprise data file. Much more information is available on the [http://www.imsglobal.org/enterprise/ IMS Enterprise official website].<br />
<br />
You may like to read the [https://github.com/moodle/moodle/blob/master/enrol/imsenterprise/entv1p1_conformance_summary.html conformance summary] which describes which IMS data elements this plugin can process.<br />
<br />
==Basic guide to IMS Enterprise file format==<br />
<br />
For any IMS-style enrolment you need a <group> tag which specifies the course, a <person> tag which specifies the user account, and a <membership> tag containing <member> tags which specify a person's role within a given course.<br />
<br />
Remember that the numeric keys used in the Moodle databases are not the interoperable data - a student data system is never going to know in advance that Joe is the 20th user added to the Moodle database - so those aren't the keys exchanged in this type of data.<br />
<br />
Typically a course would have a reference code as well as a name, so let's assume its code is MOODLE101. If you require a new course to be placed in a category other than the default, you can specify that using the <orgunit> tag. To define your course you could use<br />
<br />
<group><br />
<sourcedid><br />
<source>MyDataSystem</source><br />
<id>MOODLE101</id><br />
</sourcedid><br />
<description><br />
<short>Moodle 101</short><br />
<long>Moodle 101: Course Name</long><br />
</description><br />
<org><br />
<orgunit>CATEGORY</orgunit><br />
</org><br />
</group><br />
<br />
The enrolment script will look for a course with code MOODLE101, and (optionally) create it if it doesn't exist, the plugin also allows you to map between group tags and the course shortname, fullname and summary fields. Similarly for the person - let's assume it's "jmoodle":<br />
<br />
<person><br />
<sourcedid><br />
<source>MyDataSystem</source><br />
<id>jmoodle</id><br />
</sourcedid><br />
<userid>jmoodle</userid><br />
<name><br />
<fn>Joe Moodle</fn><br />
<n><br />
<family>MOODLE</family><br />
<given>JOE</given><br />
</n><br />
</name><br />
</person><br />
<br />
If Joe doesn't already have an account, the script can (optionally) create an account for him.<br />
<br />
Let's now look at the membership, adding the person to the course:<br />
<br />
<membership><br />
<sourcedid><br />
<source>MyDataSystem</source><br />
<id>MOODLE101</id><br />
</sourcedid><br />
<member><br />
<sourcedid><br />
<source>MyDataSystem</source><br />
<id>jmoodle</id><br />
</sourcedid><br />
<role roletype="01"><br />
<status>1</status><br />
<extension><cohort>unit 2</cohort></extension><br />
</role><br />
</member><br />
</membership><br />
<br />
The IMS Enterprise specification does offer a facility for specifying start/end dates for enrolments, so those can be included using the <timeframe> tag if needed.<br />
<br />
If a person is already added to a group within the course, the script won't actually modify that. If they are not grouped, however, then the specified grouping will be applied.<br />
<br />
==Automatic creation of new courses==<br />
<br />
If required, the IMS Enterprise enrolment plugin can create new courses for any it finds in the IMS data but not in Moodle's database.<br />
<br />
Courses are first queried by their "idnumber" - an alphanumeric field in Moodle's course table, which can specify the code used to identify the course in the Student Information System (for example). If that is not found, the course table is searched for the "short description", which in Moodle is the short course identifier as displayed in the breadcrumbs etc. (In some systems these two fields may well be identical.) Only when that search has failed can the plugin optionally create new courses.<br />
<br />
Any newly-generated courses are HIDDEN when created. This is to prevent the possibility of students wandering into completely empty courses that the teacher may be unaware of.<br />
<br />
==Unenrolling students/teachers==<br />
<br />
If required, the Enterprise data can add as well as remove course enrolments - for students and for teachers. If this setting is turned on, then Moodle will carry out unenrolments when specified in the data. Note, as of Moodle 2, you must use IMSEnterprise to remove members that have been added by the plugin. You cannot manually delete a member.<br />
<br />
There are three ways of unenrolling students within the IMS data:<br />
<br />
* A <member> element which specifies the given student and course, and with the "recstatus" attribute of the <role> element set to 3 (which means "delete"). THIS IS NOT YET IMPLEMENTED IN THE MOODLE PLUGIN.<br />
* A <member> element which specifies the given student and course, and with the <status> element set to 0 (which means "inactive").<br />
<br />
The third method is slightly different. It does not require this config setting to be activated, and can be specified well in advance of the unenrolment date:<br />
<br />
* A <member> element which specifies a <timeframe> for the enrolment can specify the begin and/or end dates for enrolment of this particular student. These dates are loaded into Moodle's enrolment data table if present, and so after the end-date, a student will no longer be able to access that particular course.<br />
<br />
==See also==<br />
<br />
* [http://www.imsglobal.org/enterprise/ IMS Enterprise specification] - the official site<br />
<br />
[[fr:Fichier IMS Enterprise]]<br />
[[de:Einschreibung über IMS Enterprise Datei]]</div>Johnokhttps://docs.moodle.org/31/en/index.php?title=File:LTIToolTypeAdminScreen.png&diff=123672File:LTIToolTypeAdminScreen.png2016-05-19T08:31:57Z<p>Johnok: Johnok uploaded a new version of File:LTIToolTypeAdminScreen.png</p>
<hr />
<div>A tool type on an admin screen</div>Johnokhttps://docs.moodle.org/31/en/index.php?title=File:LTIToolTypeAdminScreen.png&diff=123671File:LTIToolTypeAdminScreen.png2016-05-19T08:29:56Z<p>Johnok: A tool type on an admin screen</p>
<hr />
<div>A tool type on an admin screen</div>Johnokhttps://docs.moodle.org/31/en/index.php?title=External_tool_settings&diff=123664External tool settings2016-05-19T03:41:47Z<p>Johnok: Fix image descriptions</p>
<hr />
<div>{{External tool}}<br />
==Adding a new external tool to a course==<br />
[[File:preconfigured tool in activity chooser.png|frame|right|A preconfigured tool 'Chemistry quiz' shown in the activity chooser]]<br />
<br />
#With the editing turned on, in the section you wish to add your external tool, click the "Add an activity or resource" link and choose either 'External tool' or a preconfigured tool ''(new in 3.1)''.<br />
#This will take you to the settings page titled "Adding a new external tool". All settings may expanded by clicking the "Expand all" link top right. <br />
#If the external tool has not been configured by the administrator, you will need to have in advance the correct URL, consumer key and secret. These should have been provided to you by the managers of the LTI-compliant website you are going to be connecting to. Click "Show more" to access the consumer key and secret fields.<br />
<br />
==General settings==<br />
{|<br />
|[[File:externaltool26.png|thumb|400px|General settings before expanding. When expanded, [https://docs.moodle.org/en/File:externaltoolexpanded.png extra options are available.]]]<br />
|}<br />
*'''Activity name''' - give the title you wish the students to see on the course page<br />
*'''External tool type''' -this is how Moodle communicates with the tool provider. If in doubt, leave as default. If your administrator has made a tool available sitewide, you will be able to select it here:<br />
{|<br />
| [[File:sitewidetool.png|Selecting a preconfigured tool]]<br />
|}<br />
<br />
*'''Launch URL''' - This is the URL for connecting to site. <br />
*'''Launch container'''- this is how the external tool will be displayed.<br />
**Default -if in doubt; leave as default<br />
**Embed - the external tool will be embedded in the Moodle course page with blocks and navigation bar<br />
**Embed without blocks - the external tool will be embedded in the Moodle course page but without blocks<br />
**New Window - the external tool will open in a new window. (A new window or tab will open with the External tool and the old browser window containing the course page will not change.)<br />
<br />
''The following settings are available by clicking ""Show more":''<br />
*'''Activity description''' - give a short description here<br />
*'''Display description on course page''' - choose to show the description along with the activity name<br />
*'''Display activity name when launched''' - have this appear when the student clicks the link.<br />
*'''Display activity description when launched''' - have this appear when the student clicks the link.<br />
*'''Secure launch URL''' - <br />
*'''Consumer key''' -this tells the connecting LTI compliant site that your Moodle is allowed to connect. The "tool provider", ie the manger of the connecting LTI compliant site will issue you with this key. If you are merely linking to a tool with no secure access or gradebook sharing then you won't need a consumer key. If you are linking to a course or activity from another Moodle site, then you can add any consumer key.<br />
*'''Shared secret''' - this is the "password" to connect to the tool - the LTI compliant site.<br />
*'''Custom parameters''' - most times you can leave this blank. The tool provider might use this to allow you to display a specific resource.<br />
*'''Icon URL''' - you can display a different icon from the default External Tool icon by entering its URL here<br />
*'''Secure Icon URL''' - enter the URL of a different icon here if your students are accessing Moodle securely via SSL.<br />
<br />
==Privacy settings==<br />
(These settings are collapsed by default)<br />
{|<br />
|[[File:externaltoolprivacy25.png|Privacy settings expanded]]<br />
|}<br />
<br />
*'''Share launcher's name with the tool''' - this means that the student's name will be displayed on the connected site [[ Media:demoexternaltool.png| as in this example]]<br />
*'''Share launcher's email with the tool''' - this means that the student's email will be displayed on the connected site [[Media:externaltoolfrontpage.png| as in this example]]<br />
*'''Accept grades from the tool''' - if this is checked, the connecting site will send back grades to Moodle's gradebook. See [[Using External tool]] for more information on this.<br />
<br />
==Site administration settings==<br />
<br />
===Adding a tool site-wide===<br />
<br />
An administrator can manually configure external tools in ''Site administration > Plugins > Activity modules > External tool> Manage tools'' so that they are available across the site.<br />
<br />
[[File:LTIAddTool.png|thumb|center|450px|Adding an external tool]]<br />
<br />
{{New features}}A tool may be configured by an administrator so that it is shown in the activity chooser (in addition to the external tool activity) for a teacher to select to add to a course.<br />
<br />
===Registering a tool using a cartridge===<br />
<br />
{{New features}}You can register a tool type using a cartridge. A cartridge will configure all the information such as launch url, tool name & description and icons for you.<br />
<br />
To do this, simply enter the url to a tool's cartridge in the 'Tool URL' and press 'Add'. You will be asked to enter a key and secret. If you don't have them, you can leave them blank and press save changes.<br />
<br />
[[File:LTIKeyAndSecret.png|thumb|center|450px|Entering a consumer key and secret]]<br />
<br />
===Registering an external tool===<br />
<br />
To register an external tool, simply enter the url to a tool in the 'Tool URL' and press 'Add'.<br />
<br />
This will open the tool, which may in turn ask you to decide on some settings.<br />
<br />
[[File:LTIConfirmCapabilities.png|thumb|center|450px|Viewing and confirming capabilities]]<br />
<br />
Then you will be shown the capabilities the tool wants to use and you can decide if you want to allow the tool or not.<br />
<br />
=== Viewing more details ===<br />
<br />
On the 'Manage tools' page you can also visit 'Manage preconfigured tools' to view the preconfigured tools in a tabular format.<br />
<br />
There are tabs to add an external tool, to view those which are pending and to view those which have been rejected:<br />
{|<br />
| [[File:LTItype.png|thumb|450px|Setting up a new external tool]]<br />
|}<br />
<br />
You can also visit 'Manage external tool registrations' to view the tool registrations in a tabular format, or to add an external registration with limited capabilities.<br />
<br />
To add a tool with limited capabilities.<br />
1. Click 'Configure a new external tool registration'<br />
[[File:LTIreg.png|thumb|450px|center|Registering an external tool]]<br />
2. Configure the details on the settings page:<br />
[[File:LTIregdetails1.png|450px|center|Registration settings page]]<br />
<br />
'Memberships', allow the external tool to request a list of users with a certain role in a specified context e.g. users enrolled in a course.<br />
<br />
3. Click the tick/checkmark to register:<br />
[[File:ticktoreg.png|center|thumb|450px|Activating]]<br />
4. After obtaining a success message, click to complete the process:<br />
[[File:reqmet.png|450|thumb|center|Completing the registration]]<br />
5. If all requirements are met then you will be able to register automatically.<br />
<br />
6. Now go to ''Site administration > Plugins > Activity modules > External tool > Manage external tool types'' and click the 'Pending tab'<br />
<br />
7. Click the tick/checkmark to activate it:<br />
[[File:pendingactivate.png|thumb|center|450px|Activating from the Pending tab]]<br />
<br />
See the screencast [http://www.spvsoftwareproducts.com/temp/lti2-moodle/ External tool registration] for a demonstration of the above steps.<br />
<br />
==External tool capabilities==<br />
<br />
*[[Capabilities/mod/lti:addcoursetool|Add external tool]]<br />
*[[Capabilities/mod/lti:requesttooladd|Submit a tool to admins for configuration]]<br />
*[[Capabilities/mod/lti:grade|Grade external tool activities]]<br />
*[[Capabilities/mod/lti:manage|Edit external tool activities]]<br />
*[[Capabilities/mod/lti:view|View external tool activities]]<br />
*[[Capabilities/mod/lti:addinstance|Add a new external tool activity]]<br />
<br />
[[es:Configuraciones de herramienta externa]]</div>Johnokhttps://docs.moodle.org/31/en/index.php?title=External_tool_settings&diff=123663External tool settings2016-05-19T03:40:35Z<p>Johnok: Add screenshots of new interface</p>
<hr />
<div>{{External tool}}<br />
==Adding a new external tool to a course==<br />
[[File:preconfigured tool in activity chooser.png|frame|right|A preconfigured tool 'Chemistry quiz' shown in the activity chooser]]<br />
<br />
#With the editing turned on, in the section you wish to add your external tool, click the "Add an activity or resource" link and choose either 'External tool' or a preconfigured tool ''(new in 3.1)''.<br />
#This will take you to the settings page titled "Adding a new external tool". All settings may expanded by clicking the "Expand all" link top right. <br />
#If the external tool has not been configured by the administrator, you will need to have in advance the correct URL, consumer key and secret. These should have been provided to you by the managers of the LTI-compliant website you are going to be connecting to. Click "Show more" to access the consumer key and secret fields.<br />
<br />
==General settings==<br />
{|<br />
|[[File:externaltool26.png|thumb|400px|General settings before expanding. When expanded, [https://docs.moodle.org/en/File:externaltoolexpanded.png extra options are available.]]]<br />
|}<br />
*'''Activity name''' - give the title you wish the students to see on the course page<br />
*'''External tool type''' -this is how Moodle communicates with the tool provider. If in doubt, leave as default. If your administrator has made a tool available sitewide, you will be able to select it here:<br />
{|<br />
| [[File:sitewidetool.png|Selecting a preconfigured tool]]<br />
|}<br />
<br />
*'''Launch URL''' - This is the URL for connecting to site. <br />
*'''Launch container'''- this is how the external tool will be displayed.<br />
**Default -if in doubt; leave as default<br />
**Embed - the external tool will be embedded in the Moodle course page with blocks and navigation bar<br />
**Embed without blocks - the external tool will be embedded in the Moodle course page but without blocks<br />
**New Window - the external tool will open in a new window. (A new window or tab will open with the External tool and the old browser window containing the course page will not change.)<br />
<br />
''The following settings are available by clicking ""Show more":''<br />
*'''Activity description''' - give a short description here<br />
*'''Display description on course page''' - choose to show the description along with the activity name<br />
*'''Display activity name when launched''' - have this appear when the student clicks the link.<br />
*'''Display activity description when launched''' - have this appear when the student clicks the link.<br />
*'''Secure launch URL''' - <br />
*'''Consumer key''' -this tells the connecting LTI compliant site that your Moodle is allowed to connect. The "tool provider", ie the manger of the connecting LTI compliant site will issue you with this key. If you are merely linking to a tool with no secure access or gradebook sharing then you won't need a consumer key. If you are linking to a course or activity from another Moodle site, then you can add any consumer key.<br />
*'''Shared secret''' - this is the "password" to connect to the tool - the LTI compliant site.<br />
*'''Custom parameters''' - most times you can leave this blank. The tool provider might use this to allow you to display a specific resource.<br />
*'''Icon URL''' - you can display a different icon from the default External Tool icon by entering its URL here<br />
*'''Secure Icon URL''' - enter the URL of a different icon here if your students are accessing Moodle securely via SSL.<br />
<br />
==Privacy settings==<br />
(These settings are collapsed by default)<br />
{|<br />
|[[File:externaltoolprivacy25.png|Privacy settings expanded]]<br />
|}<br />
<br />
*'''Share launcher's name with the tool''' - this means that the student's name will be displayed on the connected site [[ Media:demoexternaltool.png| as in this example]]<br />
*'''Share launcher's email with the tool''' - this means that the student's email will be displayed on the connected site [[Media:externaltoolfrontpage.png| as in this example]]<br />
*'''Accept grades from the tool''' - if this is checked, the connecting site will send back grades to Moodle's gradebook. See [[Using External tool]] for more information on this.<br />
<br />
==Site administration settings==<br />
<br />
===Adding a tool site-wide===<br />
<br />
An administrator can manually configure external tools in ''Site administration > Plugins > Activity modules > External tool> Manage tools'' so that they are available across the site.<br />
<br />
[[File:LTIAddTool.png|thumb|center|450px|Adding an external tool]]<br />
<br />
{{New features}}A tool may be configured by an administrator so that it is shown in the activity chooser (in addition to the external tool activity) for a teacher to select to add to a course.<br />
<br />
===Registering a tool using a cartridge===<br />
<br />
{{New features}}You can register a tool type using a cartridge. A cartridge will configure all the information such as launch url, tool name & description and icons for you.<br />
<br />
To do this, simply enter the url to a tool's cartridge in the 'Tool URL' and press 'Add'. You will be asked to enter a key and secret. If you don't have them, you can leave them blank and press save changes.<br />
<br />
[[File:LTIKeyAndSecret.png|thumb|center|450px|Adding an external tool]]<br />
<br />
===Registering an external tool===<br />
<br />
To register an external tool, simply enter the url to a tool in the 'Tool URL' and press 'Add'.<br />
<br />
This will open the tool, which may in turn ask you to decide on some settings.<br />
<br />
[[File:LTIConfirmCapabilities.png|thumb|center|450px|Adding an external tool]]<br />
<br />
Then you will be shown the capabilities the tool wants to use and you can decide if you want to allow the tool or not.<br />
<br />
=== Viewing more details ===<br />
<br />
On the 'Manage tools' page you can also visit 'Manage preconfigured tools' to view the preconfigured tools in a tabular format.<br />
<br />
There are tabs to add an external tool, to view those which are pending and to view those which have been rejected:<br />
{|<br />
| [[File:LTItype.png|thumb|450px|Setting up a new external tool]]<br />
|}<br />
<br />
You can also visit 'Manage external tool registrations' to view the tool registrations in a tabular format, or to add an external registration with limited capabilities.<br />
<br />
To add a tool with limited capabilities.<br />
1. Click 'Configure a new external tool registration'<br />
[[File:LTIreg.png|thumb|450px|center|Registering an external tool]]<br />
2. Configure the details on the settings page:<br />
[[File:LTIregdetails1.png|450px|center|Registration settings page]]<br />
<br />
'Memberships', allow the external tool to request a list of users with a certain role in a specified context e.g. users enrolled in a course.<br />
<br />
3. Click the tick/checkmark to register:<br />
[[File:ticktoreg.png|center|thumb|450px|Activating]]<br />
4. After obtaining a success message, click to complete the process:<br />
[[File:reqmet.png|450|thumb|center|Completing the registration]]<br />
5. If all requirements are met then you will be able to register automatically.<br />
<br />
6. Now go to ''Site administration > Plugins > Activity modules > External tool > Manage external tool types'' and click the 'Pending tab'<br />
<br />
7. Click the tick/checkmark to activate it:<br />
[[File:pendingactivate.png|thumb|center|450px|Activating from the Pending tab]]<br />
<br />
See the screencast [http://www.spvsoftwareproducts.com/temp/lti2-moodle/ External tool registration] for a demonstration of the above steps.<br />
<br />
==External tool capabilities==<br />
<br />
*[[Capabilities/mod/lti:addcoursetool|Add external tool]]<br />
*[[Capabilities/mod/lti:requesttooladd|Submit a tool to admins for configuration]]<br />
*[[Capabilities/mod/lti:grade|Grade external tool activities]]<br />
*[[Capabilities/mod/lti:manage|Edit external tool activities]]<br />
*[[Capabilities/mod/lti:view|View external tool activities]]<br />
*[[Capabilities/mod/lti:addinstance|Add a new external tool activity]]<br />
<br />
[[es:Configuraciones de herramienta externa]]</div>Johnokhttps://docs.moodle.org/31/en/index.php?title=File:LTIConfirmCapabilities.png&diff=123662File:LTIConfirmCapabilities.png2016-05-19T03:40:17Z<p>Johnok: The screen you see to confirm capabilities for a tool registration</p>
<hr />
<div>The screen you see to confirm capabilities for a tool registration</div>Johnokhttps://docs.moodle.org/31/en/index.php?title=File:LTIKeyAndSecret.png&diff=123661File:LTIKeyAndSecret.png2016-05-19T03:39:31Z<p>Johnok: The screen where you enter a key and secret for a tool cartridge</p>
<hr />
<div>The screen where you enter a key and secret for a tool cartridge</div>Johnokhttps://docs.moodle.org/31/en/index.php?title=External_tool_settings&diff=123643External tool settings2016-05-18T09:33:09Z<p>Johnok: Add screenshot of add tool interface</p>
<hr />
<div>{{External tool}}<br />
==Adding a new external tool to a course==<br />
[[File:preconfigured tool in activity chooser.png|frame|right|A preconfigured tool 'Chemistry quiz' shown in the activity chooser]]<br />
<br />
#With the editing turned on, in the section you wish to add your external tool, click the "Add an activity or resource" link and choose either 'External tool' or a preconfigured tool ''(new in 3.1)''.<br />
#This will take you to the settings page titled "Adding a new external tool". All settings may expanded by clicking the "Expand all" link top right. <br />
#If the external tool has not been configured by the administrator, you will need to have in advance the correct URL, consumer key and secret. These should have been provided to you by the managers of the LTI-compliant website you are going to be connecting to. Click "Show more" to access the consumer key and secret fields.<br />
<br />
==General settings==<br />
{|<br />
|[[File:externaltool26.png|thumb|400px|General settings before expanding. When expanded, [https://docs.moodle.org/en/File:externaltoolexpanded.png extra options are available.]]]<br />
|}<br />
*'''Activity name''' - give the title you wish the students to see on the course page<br />
*'''External tool type''' -this is how Moodle communicates with the tool provider. If in doubt, leave as default. If your administrator has made a tool available sitewide, you will be able to select it here:<br />
{|<br />
| [[File:sitewidetool.png|Selecting a preconfigured tool]]<br />
|}<br />
<br />
*'''Launch URL''' - This is the URL for connecting to site. <br />
*'''Launch container'''- this is how the external tool will be displayed.<br />
**Default -if in doubt; leave as default<br />
**Embed - the external tool will be embedded in the Moodle course page with blocks and navigation bar<br />
**Embed without blocks - the external tool will be embedded in the Moodle course page but without blocks<br />
**New Window - the external tool will open in a new window. (A new window or tab will open with the External tool and the old browser window containing the course page will not change.)<br />
<br />
''The following settings are available by clicking ""Show more":''<br />
*'''Activity description''' - give a short description here<br />
*'''Display description on course page''' - choose to show the description along with the activity name<br />
*'''Display activity name when launched''' - have this appear when the student clicks the link.<br />
*'''Display activity description when launched''' - have this appear when the student clicks the link.<br />
*'''Secure launch URL''' - <br />
*'''Consumer key''' -this tells the connecting LTI compliant site that your Moodle is allowed to connect. The "tool provider", ie the manger of the connecting LTI compliant site will issue you with this key. If you are merely linking to a tool with no secure access or gradebook sharing then you won't need a consumer key. If you are linking to a course or activity from another Moodle site, then you can add any consumer key.<br />
*'''Shared secret''' - this is the "password" to connect to the tool - the LTI compliant site.<br />
*'''Custom parameters''' - most times you can leave this blank. The tool provider might use this to allow you to display a specific resource.<br />
*'''Icon URL''' - you can display a different icon from the default External Tool icon by entering its URL here<br />
*'''Secure Icon URL''' - enter the URL of a different icon here if your students are accessing Moodle securely via SSL.<br />
<br />
==Privacy settings==<br />
(These settings are collapsed by default)<br />
{|<br />
|[[File:externaltoolprivacy25.png|Privacy settings expanded]]<br />
|}<br />
<br />
*'''Share launcher's name with the tool''' - this means that the student's name will be displayed on the connected site [[ Media:demoexternaltool.png| as in this example]]<br />
*'''Share launcher's email with the tool''' - this means that the student's email will be displayed on the connected site [[Media:externaltoolfrontpage.png| as in this example]]<br />
*'''Accept grades from the tool''' - if this is checked, the connecting site will send back grades to Moodle's gradebook. See [[Using External tool]] for more information on this.<br />
<br />
==Site administration settings==<br />
<br />
===Adding a tool site-wide===<br />
<br />
An administrator can manually configure external tools in ''Site administration > Plugins > Activity modules > LTI > Manage tools'' so that they are available across the site.<br />
<br />
[[File:LTIAddTool.png|thumb|center|450px|Adding an external tool]]<br />
<br />
{{New features}}A tool may be configured by an administrator so that it is shown in the activity chooser (in addition to the external tool activity) for a teacher to select to add to a course.<br />
<br />
===Registering a tool using a cartridge===<br />
<br />
{{New features}}You can register a tool type using a cartridge. A cartridge will configure all the information such as launch url, tool name & description and icons for you.<br />
<br />
To do this, simply enter the url to a tool's cartridge in the 'Tool URL' and press 'Add'.<br />
<br />
===Registering an external tool===<br />
<br />
To register an external tool, simply enter the url to a tool in the 'Tool URL' and press 'Add'.<br />
<br />
This will open the tool, which may in turn ask you to decide on some settings. Then you will be shown the capabilities the tool wants to use and you can decide if you want to allow the tool or not.<br />
<br />
=== Viewing more details ===<br />
<br />
On the 'Manage tools' page you can also visit 'Manage preconfigured tools' to view the preconfigured tools in a tabular format.<br />
<br />
There are tabs to add an external tool, to view those which are pending and to view those which have been rejected:<br />
{|<br />
| [[File:LTItype.png|thumb|450px|Setting up a new external tool]]<br />
|}<br />
<br />
You can also visit 'Manage external tool registrations' to view the tool registrations in a tabular format, or to add an external registration with limited capabilities.<br />
<br />
To add a tool with limited capabilities.<br />
1. Click 'Configure a new external tool registration'<br />
[[File:LTIreg.png|thumb|450px|center|Registering an external tool]]<br />
2. Configure the details on the settings page:<br />
[[File:LTIregdetails1.png|450px|center|Registration settings page]]<br />
<br />
'Memberships', allow the external tool to request a list of users with a certain role in a specified context e.g. users enrolled in a course.<br />
<br />
3. Click the tick/checkmark to register:<br />
[[File:ticktoreg.png|center|thumb|450px|Activating]]<br />
4. After obtaining a success message, click to complete the process:<br />
[[File:reqmet.png|450|thumb|center|Completing the registration]]<br />
5. If all requirements are met then you will be able to register automatically.<br />
<br />
6. Now go to ''Site administration > Plugins > Activity modules > LTI > Manage external tool types'' and click the 'Pending tab'<br />
<br />
7. Click the tick/checkmark to activate it:<br />
[[File:pendingactivate.png|thumb|center|450px|Activating from the Pending tab]]<br />
<br />
See the screencast [http://www.spvsoftwareproducts.com/temp/lti2-moodle/ External tool registration] for a demonstration of the above steps.<br />
<br />
==External tool capabilities==<br />
<br />
*[[Capabilities/mod/lti:addcoursetool|Add external tool]]<br />
*[[Capabilities/mod/lti:requesttooladd|Submit a tool to admins for configuration]]<br />
*[[Capabilities/mod/lti:grade|Grade external tool activities]]<br />
*[[Capabilities/mod/lti:manage|Edit external tool activities]]<br />
*[[Capabilities/mod/lti:view|View external tool activities]]<br />
*[[Capabilities/mod/lti:addinstance|Add a new external tool activity]]<br />
<br />
[[es:Configuraciones de herramienta externa]]</div>Johnokhttps://docs.moodle.org/31/en/index.php?title=External_tool_settings&diff=123642External tool settings2016-05-18T09:31:11Z<p>Johnok: Add info on registering an external tool after MDL-52154</p>
<hr />
<div>{{External tool}}<br />
==Adding a new external tool to a course==<br />
[[File:preconfigured tool in activity chooser.png|frame|right|A preconfigured tool 'Chemistry quiz' shown in the activity chooser]]<br />
<br />
#With the editing turned on, in the section you wish to add your external tool, click the "Add an activity or resource" link and choose either 'External tool' or a preconfigured tool ''(new in 3.1)''.<br />
#This will take you to the settings page titled "Adding a new external tool". All settings may expanded by clicking the "Expand all" link top right. <br />
#If the external tool has not been configured by the administrator, you will need to have in advance the correct URL, consumer key and secret. These should have been provided to you by the managers of the LTI-compliant website you are going to be connecting to. Click "Show more" to access the consumer key and secret fields.<br />
<br />
==General settings==<br />
{|<br />
|[[File:externaltool26.png|thumb|400px|General settings before expanding. When expanded, [https://docs.moodle.org/en/File:externaltoolexpanded.png extra options are available.]]]<br />
|}<br />
*'''Activity name''' - give the title you wish the students to see on the course page<br />
*'''External tool type''' -this is how Moodle communicates with the tool provider. If in doubt, leave as default. If your administrator has made a tool available sitewide, you will be able to select it here:<br />
{|<br />
| [[File:sitewidetool.png|Selecting a preconfigured tool]]<br />
|}<br />
<br />
*'''Launch URL''' - This is the URL for connecting to site. <br />
*'''Launch container'''- this is how the external tool will be displayed.<br />
**Default -if in doubt; leave as default<br />
**Embed - the external tool will be embedded in the Moodle course page with blocks and navigation bar<br />
**Embed without blocks - the external tool will be embedded in the Moodle course page but without blocks<br />
**New Window - the external tool will open in a new window. (A new window or tab will open with the External tool and the old browser window containing the course page will not change.)<br />
<br />
''The following settings are available by clicking ""Show more":''<br />
*'''Activity description''' - give a short description here<br />
*'''Display description on course page''' - choose to show the description along with the activity name<br />
*'''Display activity name when launched''' - have this appear when the student clicks the link.<br />
*'''Display activity description when launched''' - have this appear when the student clicks the link.<br />
*'''Secure launch URL''' - <br />
*'''Consumer key''' -this tells the connecting LTI compliant site that your Moodle is allowed to connect. The "tool provider", ie the manger of the connecting LTI compliant site will issue you with this key. If you are merely linking to a tool with no secure access or gradebook sharing then you won't need a consumer key. If you are linking to a course or activity from another Moodle site, then you can add any consumer key.<br />
*'''Shared secret''' - this is the "password" to connect to the tool - the LTI compliant site.<br />
*'''Custom parameters''' - most times you can leave this blank. The tool provider might use this to allow you to display a specific resource.<br />
*'''Icon URL''' - you can display a different icon from the default External Tool icon by entering its URL here<br />
*'''Secure Icon URL''' - enter the URL of a different icon here if your students are accessing Moodle securely via SSL.<br />
<br />
==Privacy settings==<br />
(These settings are collapsed by default)<br />
{|<br />
|[[File:externaltoolprivacy25.png|Privacy settings expanded]]<br />
|}<br />
<br />
*'''Share launcher's name with the tool''' - this means that the student's name will be displayed on the connected site [[ Media:demoexternaltool.png| as in this example]]<br />
*'''Share launcher's email with the tool''' - this means that the student's email will be displayed on the connected site [[Media:externaltoolfrontpage.png| as in this example]]<br />
*'''Accept grades from the tool''' - if this is checked, the connecting site will send back grades to Moodle's gradebook. See [[Using External tool]] for more information on this.<br />
<br />
==Site administration settings==<br />
<br />
===Adding a tool site-wide===<br />
<br />
An administrator can manually configure external tools in ''Site administration > Plugins > Activity modules > LTI > Manage tools'' so that they are available across the site. <br />
<br />
{{New features}}A tool may be configured by an administrator so that it is shown in the activity chooser (in addition to the external tool activity) for a teacher to select to add to a course.<br />
<br />
===Registering a tool using a cartridge===<br />
<br />
{{New features}}You can register a tool type using a cartridge. A cartridge will configure all the information such as launch url, tool name & description and icons for you.<br />
<br />
To do this, simply enter the url to a tool's cartridge in the 'Tool URL' and press 'Add'.<br />
<br />
===Registering an external tool===<br />
<br />
To register an external tool, simply enter the url to a tool in the 'Tool URL' and press 'Add'.<br />
<br />
This will open the tool, which may in turn ask you to decide on some settings. Then you will be shown the capabilities the tool wants to use and you can decide if you want to allow the tool or not.<br />
<br />
=== Viewing more details ===<br />
<br />
On the 'Manage tools' page you can also visit 'Manage preconfigured tools' to view the preconfigured tools in a tabular format.<br />
<br />
There are tabs to add an external tool, to view those which are pending and to view those which have been rejected:<br />
{|<br />
| [[File:LTItype.png|thumb|450px|Setting up a new external tool]]<br />
|}<br />
<br />
You can also visit 'Manage external tool registrations' to view the tool registrations in a tabular format, or to add an external registration with limited capabilities.<br />
<br />
To add a tool with limited capabilities.<br />
1. Click 'Configure a new external tool registration'<br />
[[File:LTIreg.png|thumb|450px|center|Registering an external tool]]<br />
2. Configure the details on the settings page:<br />
[[File:LTIregdetails1.png|450px|center|Registration settings page]]<br />
<br />
'Memberships', allow the external tool to request a list of users with a certain role in a specified context e.g. users enrolled in a course.<br />
<br />
3. Click the tick/checkmark to register:<br />
[[File:ticktoreg.png|center|thumb|450px|Activating]]<br />
4. After obtaining a success message, click to complete the process:<br />
[[File:reqmet.png|450|thumb|center|Completing the registration]]<br />
5. If all requirements are met then you will be able to register automatically.<br />
<br />
6. Now go to ''Site administration > Plugins > Activity modules > LTI > Manage external tool types'' and click the 'Pending tab'<br />
<br />
7. Click the tick/checkmark to activate it:<br />
[[File:pendingactivate.png|thumb|center|450px|Activating from the Pending tab]]<br />
<br />
See the screencast [http://www.spvsoftwareproducts.com/temp/lti2-moodle/ External tool registration] for a demonstration of the above steps.<br />
<br />
==External tool capabilities==<br />
<br />
*[[Capabilities/mod/lti:addcoursetool|Add external tool]]<br />
*[[Capabilities/mod/lti:requesttooladd|Submit a tool to admins for configuration]]<br />
*[[Capabilities/mod/lti:grade|Grade external tool activities]]<br />
*[[Capabilities/mod/lti:manage|Edit external tool activities]]<br />
*[[Capabilities/mod/lti:view|View external tool activities]]<br />
*[[Capabilities/mod/lti:addinstance|Add a new external tool activity]]<br />
<br />
[[es:Configuraciones de herramienta externa]]</div>Johnokhttps://docs.moodle.org/31/en/index.php?title=File:LTIAddTool.png&diff=123641File:LTIAddTool.png2016-05-18T09:29:32Z<p>Johnok: The interface to add a tool</p>
<hr />
<div>The interface to add a tool</div>Johnokhttps://docs.moodle.org/31/en/index.php?title=External_tool_settings&diff=123640External tool settings2016-05-18T08:00:05Z<p>Johnok: Document MDL-52154</p>
<hr />
<div>{{External tool}}<br />
==Adding a new external tool to a course==<br />
[[File:preconfigured tool in activity chooser.png|frame|right|A preconfigured tool 'Chemistry quiz' shown in the activity chooser]]<br />
<br />
#With the editing turned on, in the section you wish to add your external tool, click the "Add an activity or resource" link and choose either 'External tool' or a preconfigured tool ''(new in 3.1)''.<br />
#This will take you to the settings page titled "Adding a new external tool". All settings may expanded by clicking the "Expand all" link top right. <br />
#If the external tool has not been configured by the administrator, you will need to have in advance the correct URL, consumer key and secret. These should have been provided to you by the managers of the LTI-compliant website you are going to be connecting to. Click "Show more" to access the consumer key and secret fields.<br />
<br />
==General settings==<br />
{|<br />
|[[File:externaltool26.png|thumb|400px|General settings before expanding. When expanded, [https://docs.moodle.org/en/File:externaltoolexpanded.png extra options are available.]]]<br />
|}<br />
*'''Activity name''' - give the title you wish the students to see on the course page<br />
*'''External tool type''' -this is how Moodle communicates with the tool provider. If in doubt, leave as default. If your administrator has made a tool available sitewide, you will be able to select it here:<br />
{|<br />
| [[File:sitewidetool.png|Selecting a preconfigured tool]]<br />
|}<br />
<br />
*'''Launch URL''' - This is the URL for connecting to site. <br />
*'''Launch container'''- this is how the external tool will be displayed.<br />
**Default -if in doubt; leave as default<br />
**Embed - the external tool will be embedded in the Moodle course page with blocks and navigation bar<br />
**Embed without blocks - the external tool will be embedded in the Moodle course page but without blocks<br />
**New Window - the external tool will open in a new window. (A new window or tab will open with the External tool and the old browser window containing the course page will not change.)<br />
<br />
''The following settings are available by clicking ""Show more":''<br />
*'''Activity description''' - give a short description here<br />
*'''Display description on course page''' - choose to show the description along with the activity name<br />
*'''Display activity name when launched''' - have this appear when the student clicks the link.<br />
*'''Display activity description when launched''' - have this appear when the student clicks the link.<br />
*'''Secure launch URL''' - <br />
*'''Consumer key''' -this tells the connecting LTI compliant site that your Moodle is allowed to connect. The "tool provider", ie the manger of the connecting LTI compliant site will issue you with this key. If you are merely linking to a tool with no secure access or gradebook sharing then you won't need a consumer key. If you are linking to a course or activity from another Moodle site, then you can add any consumer key.<br />
*'''Shared secret''' - this is the "password" to connect to the tool - the LTI compliant site.<br />
*'''Custom parameters''' - most times you can leave this blank. The tool provider might use this to allow you to display a specific resource.<br />
*'''Icon URL''' - you can display a different icon from the default External Tool icon by entering its URL here<br />
*'''Secure Icon URL''' - enter the URL of a different icon here if your students are accessing Moodle securely via SSL.<br />
<br />
==Privacy settings==<br />
(These settings are collapsed by default)<br />
{|<br />
|[[File:externaltoolprivacy25.png|Privacy settings expanded]]<br />
|}<br />
<br />
*'''Share launcher's name with the tool''' - this means that the student's name will be displayed on the connected site [[ Media:demoexternaltool.png| as in this example]]<br />
*'''Share launcher's email with the tool''' - this means that the student's email will be displayed on the connected site [[Media:externaltoolfrontpage.png| as in this example]]<br />
*'''Accept grades from the tool''' - if this is checked, the connecting site will send back grades to Moodle's gradebook. See [[Using External tool]] for more information on this.<br />
<br />
==Site administration settings==<br />
<br />
===Adding a tool site-wide===<br />
<br />
An administrator can manually configure external tools in ''Site administration > Plugins > Activity modules > LTI > Manage tools'' so that they are available across the site. <br />
<br />
{{New features}}A tool may be configured by an administrator so that it is shown in the activity chooser (in addition to the external tool activity) for a teacher to select to add to a course.<br />
<br />
===Registering a tool using a cartridge===<br />
<br />
{{New features}}You can register a tool type using a cartridge. A cartridge will configure all the information such as launch url, tool name & description and icons for you.<br />
<br />
To do this, simply enter the url to a tool's cartridge in the 'Tool URL' and press 'Add'.<br />
<br />
===Registering an external tool===<br />
<br />
An external tool can be registered by an admin as follows:<br />
<br />
=== Viewing more details ===<br />
<br />
On the 'Manage tools' page you can also visit 'Manage preconfigured tools' to view the preconfigured tools in a tabular format.<br />
<br />
There are tabs to add an external tool, to view those which are pending and to view those which have been rejected:<br />
{|<br />
| [[File:LTItype.png|thumb|450px|Setting up a new external tool]]<br />
|}<br />
<br />
You can also visit 'Manage external tool registrations' to view the tool registrations in a tabular format, or to add an external registration with limited capabilities.<br />
<br />
To add a tool with limited capabilities.<br />
1. Click 'Configure a new external tool registration'<br />
[[File:LTIreg.png|thumb|450px|center|Registering an external tool]]<br />
2. Configure the details on the settings page:<br />
[[File:LTIregdetails1.png|450px|center|Registration settings page]]<br />
<br />
'Memberships', allow the external tool to request a list of users with a certain role in a specified context e.g. users enrolled in a course.<br />
<br />
3. Click the tick/checkmark to register:<br />
[[File:ticktoreg.png|center|thumb|450px|Activating]]<br />
4. After obtaining a success message, click to complete the process:<br />
[[File:reqmet.png|450|thumb|center|Completing the registration]]<br />
5. If all requirements are met then you will be able to register automatically.<br />
<br />
6. Now go to ''Site administration > Plugins > Activity modules > LTI > Manage external tool types'' and click the 'Pending tab'<br />
<br />
7. Click the tick/checkmark to activate it:<br />
[[File:pendingactivate.png|thumb|center|450px|Activating from the Pending tab]]<br />
<br />
See the screencast [http://www.spvsoftwareproducts.com/temp/lti2-moodle/ External tool registration] for a demonstration of the above steps.<br />
<br />
==External tool capabilities==<br />
<br />
*[[Capabilities/mod/lti:addcoursetool|Add external tool]]<br />
*[[Capabilities/mod/lti:requesttooladd|Submit a tool to admins for configuration]]<br />
*[[Capabilities/mod/lti:grade|Grade external tool activities]]<br />
*[[Capabilities/mod/lti:manage|Edit external tool activities]]<br />
*[[Capabilities/mod/lti:view|View external tool activities]]<br />
*[[Capabilities/mod/lti:addinstance|Add a new external tool activity]]<br />
<br />
[[es:Configuraciones de herramienta externa]]</div>Johnokhttps://docs.moodle.org/31/en/index.php?title=Single_view&diff=123574Single view2016-05-17T08:51:08Z<p>Johnok: Document https://tracker.moodle.org/browse/MDL-51900</p>
<hr />
<div>{{Grades}}<br />
<br />
Single view allows a course teacher to view either all the grades of one single student (''1 below'') or a single grade item for all students (''2 below''):<br />
[[File:singleview2.png|center]]<br />
<br />
When editing a grade or feedback, you can press tab to go to the next row below.<br />
<br />
Single view may also be accessed from ''Course>Grade administration>Single view'', from where the teacher is presented with a dropdown menu to select either a grade item or a student. <br />
<br />
Grades may be excluded, or overridden and modified. It is also possible to bulk insert a grade, which might be useful for example if you wish to give the grade 0 to all students who did not submit work.<br />
<br />
[[File:SingleView.png|thumb|500px|center|Single view of one grade item]]<br />
<br />
<br />
[[es:Vista individual]]<br />
[[de:Einzelansicht]]</div>Johnokhttps://docs.moodle.org/31/en/index.php?title=User:John_Okely/User_details_view_capabilities&diff=121877User:John Okely/User details view capabilities2016-01-05T02:41:17Z<p>Johnok: Update since the issue got in</p>
<hr />
<div>{| class="wikitable"<br />
|+ Moodle 2.8<br />
! Information<br />
! User Profile<br />
! Course Profile<br />
! Participants list<br />
|-<br />
! Email<br />
| course:useremail<br />
| course:viewhiddenuserfields or moodle/site:viewuseridentity<br />
| site:viewuseridentity<br />
|-<br />
! Hidden fields<br />
| user:viewhiddendetails<br />
| user:viewhiddendetails<br />
| course:viewhiddenuserfields<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ Moodle 2.9 before fix<br />
! Information<br />
! User Profile<br />
! Course Profile<br />
! Participants list<br />
|-<br />
! Email<br />
| course:useremail<br />
| course:useremail<br />
| site:viewuseridentity<br />
|-<br />
! Hidden fields<br />
| user:viewhiddendetails<br />
| user:viewhiddendetails<br />
| course:viewhiddenuserfields<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ After Backport fix MDL-51712 (Current 2.9 and 3.0)<br />
! Information<br />
! User Profile<br />
! Course Profile<br />
! Participants list<br />
|-<br />
! Email<br />
| course:useremail or site:viewuseridentity<br />
| course:useremail or site:viewuseridentity<br />
| site:viewuseridentity<br />
|-<br />
! Hidden fields<br />
| user:viewhiddendetails<br />
| user:viewhiddendetails<br />
| course:viewhiddenuserfields<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ Proposed Improvement MDL-51630 & deprecation MDL-37479<br />
! Information<br />
! User Profile<br />
! Course Profile<br />
! Participants list<br />
|-<br />
! Email<br />
| site:viewuseridentity<br />
| site:viewuseridentity<br />
| site:viewuseridentity<br />
|-<br />
! Hidden fields<br />
| course:viewhiddenuserfields<br />
| course:viewhiddenuserfields<br />
| course:viewhiddenuserfields<br />
|}</div>Johnokhttps://docs.moodle.org/31/en/index.php?title=mod/quizgame/mod&diff=121567mod/quizgame/mod2015-11-25T07:04:06Z<p>Johnok: Redirect to main doc</p>
<hr />
<div>#REDIRECT [[mod/quizgame/view]]</div>Johnokhttps://docs.moodle.org/31/en/index.php?title=Server_cluster&diff=121140Server cluster2015-11-12T02:31:15Z<p>Johnok: Improve documentation about $CFG->sslproxy vs loginhttps</p>
<hr />
<div>This page is going to describe some basic information related to server clustering...<br />
<br />
==Requirements==<br />
<br />
* database server - ACID compliant, for example PostgreSQL and MariaDB<br />
* main server that is able to share dataroot - locking support recommended, for example NFS<br />
* load balancer - for example Nginx<br />
* cluster nodes - web servers<br />
* Memcached server for shared caches<br />
<br />
Note: this guide is not intended for Windows OS or any other Microsoft technologies.<br />
<br />
==Initial installation==<br />
<br />
# Perform standard CLI installation on the main server using shared database and dataroot directory.<br />
# Setup web servers on cluster nodes - use local dirroot and shared database and dataroot.<br />
# Configure load balancing.<br />
<br />
==Related config.php settings==<br />
<br />
===$CFG->wwwroot===<br />
It must be the same on all nodes, it must be the public facing URL. It cannot be dynamic.<br />
<br />
===$CFG->sslproxy===<br />
Enable if you have https:// wwwroot but the SSL is done by load-balancer instead of web server.<br />
<br />
Please note that it is not compatible with $CFG->loginhttps. This is because in order for loginhttps to work, we need to know the original request, and whether it was http or https. This allows us to only provide the login form over ssl. The original request is lost when made through a "reverse" proxy / load balancer, so we cannot determine what protocol the request was made in. So we can't provide most of moodle over http and the login page over https.<br />
<br />
Enable ''Secure cookies only'' to make your site really secure, without it cookie stealing is still trivial.<br />
<br />
===$CFG->reverseproxy===<br />
Enable if your nodes are accessed via different URL.<br />
<br />
Please note that it is not compatible with $CFG->loginhttps. This is because in order for loginhttps to work, we need to know the original request, and whether it was http or https. This allows us to only provide the login form over ssl. The original request is lost when made through a "reverse" proxy / load balancer, so we cannot determine what protocol the request was made in. So we can't provide most of moodle over http and the login page over https.<br />
<br />
===$CFG->dirroot===<br />
It is strongly recommended that $CFG->dirroot (which is automatically set via realpath(config.php)) contains the same path on all nodes. It does not need to point to the same shared directory though. The reason is that some some low level code may use the dirroot value for cache invalidation.<br />
<br />
The simplest solution is to have the same directory structure on each cluster node and synchronise these during each upgrade.<br />
<br />
The dirroot should be always read only for apache process because otherwise built in plugin installation and uninstallation would get the nodes out of sync.<br />
<br />
===$CFG->dataroot===<br />
<br />
This '''MUST''' be a shared directory where each cluster node is accessing the files directly. It must be very reliable, administrators cannot manipulate files directly.<br />
<br />
Locking support is not required, if any code tries to use file locks in dataroot outside of cachedir or muc directory it is a bug.<br />
<br />
===$CFG->tempdir===<br />
<br />
This directory '''MUST''' be shared by all cluster nodes. Locking is required.<br />
<br />
===$CFG->cachedir===<br />
<br />
This directory '''MUST''' be shared by all cluster nodes. Locking is required.<br />
<br />
===$CFG->localcachedir===<br />
<br />
The difference from $CFG->cachedir is that the directory does not have to be shared by all cluster nodes, the file contents do not change. Use local fast filesystem on each cluster node.<br />
<br />
==Performance recommendations==<br />
<br />
#Use OPcache extension on all cluster nodes.<br />
#Set $CFG->localcachedir to fast local filesystem on each node.<br />
#Use one big central memcached server for all shared caches that support it.<br />
#Use local memcached instances on cluster nodes for local caches that support it.<br />
#Store user sessions in one shared memcached server. (See [[Session_handling]] for details)<br />
#Use fast local directory for dirroot on each cluster node.<br />
#Use dynamic cluster node management.<br />
#Use transparent proxy servers.<br />
<br />
==Upgrade procedure==<br />
<br />
#Disable load balancer.<br />
#Upgrade dirroot files on master server.<br />
#Perform CLI upgrade.<br />
#Manually reset all caches in cluster nodes - restart web server, delete localcachedir and temp directories, restart memcached, etc. Or delete all cluster nodes and create nodes from a new template.<br />
#Enable load balancer.<br />
<br />
==Step by step guide for server clustering in Moodle 2.6==<br />
From hardware and performance forum thread [https://moodle.org/mod/forum/discuss.php?d=251547 https://moodle.org/mod/forum/discuss.php?d=251547]<br />
<br />
* 1 Determine your specific need for caches. This involves the concepts of shared cache or local cache, disk based cache or server based cache or protocol specific cache like Memcached or MongoDB. <br />
** 1.1 If you have a slow shared disk, you might benefit from a local disk cache.<br />
** 1.2 If you have only a few users on your Moodle site, you might not want to set up a Memcached service, even if the acceleration that Memcached provides, is very significant for the user experience.<br />
** 1.3 If you want to do anything in your power for accelerating the site, you might consider MongoDB.<br />
* 2 Configure the caches, test them and verify them. There is room for improvement in the examples for cache configuration. This is probably the most difficult step.<br />
* 3 Install the cache support on server level. This may involve installing php modules or config for php modules.<br />
* 4 Create a cache instance in MUC here: example.com/cache/admin.php?action=addstore&plugin=memcached<br />
** 4.1 Give the cache instance some arbitrary name.<br />
** 4.2 All other fields have a question mark that can be clicked on for excellent help that tells you what to fill in, and the syntax (very important).<br />
** 4.3 The result should be a Configured Store Instance, with the name of your choice.<br />
* 5 The final step is to deploy the created cache instances by Editing Mappings for e.g. Language string cache in the list of Known cache definitions.<br />
** 5.1 While experimenting with this, I have found it a life saver to open a separate browser window, where the default setting is selected, so I just need to click on the Save button to revert the setting, just in case I lose contact with the site.<br />
** 5.2 Select the nam of your configured store instance from the dropdown list and click on the Save button. <br />
** 5.3 Test the new cache setting. If you lose contact with the site or it behaves weirdly, try using the trick in step 1. In case of emergency you might remove the cache config file (muc/config.php) in the folder pointed to by $CFG->dataroot . It seems that Moodle writes a new default config file if it is missing.<br />
<br />
==See also==<br />
*[[Performance recommendations]]<br />
*[[Caching]]<br />
*[[:dev:Server clustering improvements proposal]]<br />
*Hardware and performance forum thread [https://moodle.org/mod/forum/discuss.php?d=251547https://moodle.org/mod/forum/discuss.php?d=251547]<br />
*How to Cluster Moodle on Multiple Servers for High Availability and Scalability [http://www.severalnines.com/blog/clustering-moodle-multiple-servers-high-availability-scalability]</div>Johnokhttps://docs.moodle.org/31/en/index.php?title=Server_cluster&diff=121139Server cluster2015-11-12T02:28:24Z<p>Johnok: More details about $CFG->reverseproxy vs loginhttps</p>
<hr />
<div>This page is going to describe some basic information related to server clustering...<br />
<br />
==Requirements==<br />
<br />
* database server - ACID compliant, for example PostgreSQL and MariaDB<br />
* main server that is able to share dataroot - locking support recommended, for example NFS<br />
* load balancer - for example Nginx<br />
* cluster nodes - web servers<br />
* Memcached server for shared caches<br />
<br />
Note: this guide is not intended for Windows OS or any other Microsoft technologies.<br />
<br />
==Initial installation==<br />
<br />
# Perform standard CLI installation on the main server using shared database and dataroot directory.<br />
# Setup web servers on cluster nodes - use local dirroot and shared database and dataroot.<br />
# Configure load balancing.<br />
<br />
==Related config.php settings==<br />
<br />
===$CFG->wwwroot===<br />
It must be the same on all nodes, it must be the public facing URL. It cannot be dynamic.<br />
<br />
===$CFG->sslproxy===<br />
Enable if you have https:// wwwroot but the SSL is done by load-balancer instead of web server.<br />
<br />
Enable ''Secure cookies only'' to make your site really secure, without it cookie stealing is still trivial.<br />
<br />
===$CFG->reverseproxy===<br />
Enable if your nodes are accessed via different URL.<br />
<br />
Please note that it is not compatible with $CFG->loginhttps. This is because in order for loginhttps to work, we need to know the original request, and whether it was http or https. This allows us to only provide the login form over ssl. The original request is lost when made through a "reverse" proxy / load balancer, so we cannot determine what protocol the request was made in. So we can't provide most of moodle over http and the login page over https.<br />
<br />
===$CFG->dirroot===<br />
It is strongly recommended that $CFG->dirroot (which is automatically set via realpath(config.php)) contains the same path on all nodes. It does not need to point to the same shared directory though. The reason is that some some low level code may use the dirroot value for cache invalidation.<br />
<br />
The simplest solution is to have the same directory structure on each cluster node and synchronise these during each upgrade.<br />
<br />
The dirroot should be always read only for apache process because otherwise built in plugin installation and uninstallation would get the nodes out of sync.<br />
<br />
===$CFG->dataroot===<br />
<br />
This '''MUST''' be a shared directory where each cluster node is accessing the files directly. It must be very reliable, administrators cannot manipulate files directly.<br />
<br />
Locking support is not required, if any code tries to use file locks in dataroot outside of cachedir or muc directory it is a bug.<br />
<br />
===$CFG->tempdir===<br />
<br />
This directory '''MUST''' be shared by all cluster nodes. Locking is required.<br />
<br />
===$CFG->cachedir===<br />
<br />
This directory '''MUST''' be shared by all cluster nodes. Locking is required.<br />
<br />
===$CFG->localcachedir===<br />
<br />
The difference from $CFG->cachedir is that the directory does not have to be shared by all cluster nodes, the file contents do not change. Use local fast filesystem on each cluster node.<br />
<br />
==Performance recommendations==<br />
<br />
#Use OPcache extension on all cluster nodes.<br />
#Set $CFG->localcachedir to fast local filesystem on each node.<br />
#Use one big central memcached server for all shared caches that support it.<br />
#Use local memcached instances on cluster nodes for local caches that support it.<br />
#Store user sessions in one shared memcached server. (See [[Session_handling]] for details)<br />
#Use fast local directory for dirroot on each cluster node.<br />
#Use dynamic cluster node management.<br />
#Use transparent proxy servers.<br />
<br />
==Upgrade procedure==<br />
<br />
#Disable load balancer.<br />
#Upgrade dirroot files on master server.<br />
#Perform CLI upgrade.<br />
#Manually reset all caches in cluster nodes - restart web server, delete localcachedir and temp directories, restart memcached, etc. Or delete all cluster nodes and create nodes from a new template.<br />
#Enable load balancer.<br />
<br />
==Step by step guide for server clustering in Moodle 2.6==<br />
From hardware and performance forum thread [https://moodle.org/mod/forum/discuss.php?d=251547 https://moodle.org/mod/forum/discuss.php?d=251547]<br />
<br />
* 1 Determine your specific need for caches. This involves the concepts of shared cache or local cache, disk based cache or server based cache or protocol specific cache like Memcached or MongoDB. <br />
** 1.1 If you have a slow shared disk, you might benefit from a local disk cache.<br />
** 1.2 If you have only a few users on your Moodle site, you might not want to set up a Memcached service, even if the acceleration that Memcached provides, is very significant for the user experience.<br />
** 1.3 If you want to do anything in your power for accelerating the site, you might consider MongoDB.<br />
* 2 Configure the caches, test them and verify them. There is room for improvement in the examples for cache configuration. This is probably the most difficult step.<br />
* 3 Install the cache support on server level. This may involve installing php modules or config for php modules.<br />
* 4 Create a cache instance in MUC here: example.com/cache/admin.php?action=addstore&plugin=memcached<br />
** 4.1 Give the cache instance some arbitrary name.<br />
** 4.2 All other fields have a question mark that can be clicked on for excellent help that tells you what to fill in, and the syntax (very important).<br />
** 4.3 The result should be a Configured Store Instance, with the name of your choice.<br />
* 5 The final step is to deploy the created cache instances by Editing Mappings for e.g. Language string cache in the list of Known cache definitions.<br />
** 5.1 While experimenting with this, I have found it a life saver to open a separate browser window, where the default setting is selected, so I just need to click on the Save button to revert the setting, just in case I lose contact with the site.<br />
** 5.2 Select the nam of your configured store instance from the dropdown list and click on the Save button. <br />
** 5.3 Test the new cache setting. If you lose contact with the site or it behaves weirdly, try using the trick in step 1. In case of emergency you might remove the cache config file (muc/config.php) in the folder pointed to by $CFG->dataroot . It seems that Moodle writes a new default config file if it is missing.<br />
<br />
==See also==<br />
*[[Performance recommendations]]<br />
*[[Caching]]<br />
*[[:dev:Server clustering improvements proposal]]<br />
*Hardware and performance forum thread [https://moodle.org/mod/forum/discuss.php?d=251547https://moodle.org/mod/forum/discuss.php?d=251547]<br />
*How to Cluster Moodle on Multiple Servers for High Availability and Scalability [http://www.severalnines.com/blog/clustering-moodle-multiple-servers-high-availability-scalability]</div>Johnokhttps://docs.moodle.org/31/en/index.php?title=Capabilities/moodle/site:viewuseridentity&diff=120804Capabilities/moodle/site:viewuseridentity2015-10-26T05:48:56Z<p>Johnok: Add info about email address changes reinstated by MDL-51712</p>
<hr />
<div>{{Capabilities}}<br />
* This allows a user to view fields such as ID number and email address (as selected in 'Show user identity' in ''Settings > Site administration > Users > Permissions > User policies'') when searching for users and displaying lists of users, for example when adding users to groups and in the [[Gradebook|grader report]]<br />
* This also allows a user to view a student's email on their profile page (if email is selected as one of the fields in Show user identity)<br />
* This capability is allowed for the default roles of manager, teacher and non-editing teacher<br />
<br />
==See also==<br />
<br />
* [[Roles settings]] for further details of the 'Show user identity' setting<br />
<br />
[[Category:Capabilities|View]]</div>Johnokhttps://docs.moodle.org/31/en/index.php?title=User:John_Okely/User_details_view_capabilities&diff=120431User:John Okely/User details view capabilities2015-10-19T07:58:23Z<p>Johnok: </p>
<hr />
<div>{| class="wikitable"<br />
|+ Moodle 2.8<br />
! Information<br />
! User Profile<br />
! Course Profile<br />
! Participants list<br />
|-<br />
! Email<br />
| course:useremail<br />
| course:viewhiddenuserfields or moodle/site:viewuseridentity<br />
| site:viewuseridentity<br />
|-<br />
! Hidden fields<br />
| user:viewhiddendetails<br />
| user:viewhiddendetails<br />
| course:viewhiddenuserfields<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ Moodle 2.9<br />
! Information<br />
! User Profile<br />
! Course Profile<br />
! Participants list<br />
|-<br />
! Email<br />
| course:useremail<br />
| course:useremail<br />
| site:viewuseridentity<br />
|-<br />
! Hidden fields<br />
| user:viewhiddendetails<br />
| user:viewhiddendetails<br />
| course:viewhiddenuserfields<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ Proposed Backport fix MDL-51712<br />
! Information<br />
! User Profile<br />
! Course Profile<br />
! Participants list<br />
|-<br />
! Email<br />
| course:useremail or site:viewuseridentity<br />
| course:useremail or site:viewuseridentity<br />
| site:viewuseridentity<br />
|-<br />
! Hidden fields<br />
| user:viewhiddendetails<br />
| user:viewhiddendetails<br />
| course:viewhiddenuserfields<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ Proposed Improvement MDL-51630 & deprecation MDL-37479<br />
! Information<br />
! User Profile<br />
! Course Profile<br />
! Participants list<br />
|-<br />
! Email<br />
| site:viewuseridentity<br />
| site:viewuseridentity<br />
| site:viewuseridentity<br />
|-<br />
! Hidden fields<br />
| course:viewhiddenuserfields<br />
| course:viewhiddenuserfields<br />
| course:viewhiddenuserfields<br />
|}</div>Johnokhttps://docs.moodle.org/31/en/index.php?title=User:John_Okely/User_details_view_capabilities&diff=120430User:John Okely/User details view capabilities2015-10-19T07:54:27Z<p>Johnok: </p>
<hr />
<div>{| class="wikitable"<br />
|+ Moodle 2.8<br />
! Information<br />
! User Profile<br />
! Course Profile<br />
! Participants list<br />
|-<br />
! Email<br />
| course:useremail<br />
| course:viewhiddenuserfields or moodle/site:viewuseridentity<br />
| site:viewuseridentity<br />
|-<br />
! Hidden fields<br />
| user:viewhiddendetails<br />
| user:viewhiddendetails<br />
| course:viewhiddenuserfields<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ Moodle 2.9<br />
! Information<br />
! User Profile<br />
! Course Profile<br />
! Participants list<br />
|-<br />
! Email<br />
| course:useremail<br />
| course:useremail<br />
| site:viewuseridentity<br />
|-<br />
! Hidden fields<br />
| user:viewhiddendetails<br />
| user:viewhiddendetails<br />
| course:viewhiddenuserfields<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ Proposed Backport fix MDL-51712<br />
! Information<br />
! User Profile<br />
! Course Profile<br />
! Participants list<br />
|-<br />
! Email<br />
| course:useremail or site:viewuseridentity<br />
| course:useremail or site:viewuseridentity<br />
| site:viewuseridentity<br />
|-<br />
! Hidden fields<br />
| user:viewhiddendetails<br />
| user:viewhiddendetails<br />
| course:viewhiddenuserfields<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ Proposed Improvement MDL-51630<br />
! Information<br />
! User Profile<br />
! Course Profile<br />
! Participants list<br />
|-<br />
! Email<br />
| course:useremail or site:viewuseridentity<br />
| course:useremail or site:viewuseridentity<br />
| site:viewuseridentity<br />
|-<br />
! Hidden fields<br />
| course:viewhiddenuserfields<br />
| course:viewhiddenuserfields<br />
| course:viewhiddenuserfields<br />
|}</div>Johnokhttps://docs.moodle.org/31/en/index.php?title=User:John_Okely/User_details_view_capabilities&diff=120382User:John Okely/User details view capabilities2015-10-16T06:06:07Z<p>Johnok: </p>
<hr />
<div>{| class="wikitable"<br />
|+ Moodle 2.8<br />
! Information<br />
! User Profile<br />
! Course Profile<br />
! Participants list<br />
|-<br />
! Email<br />
| course:useremail<br />
| course:viewhiddenuserfields or moodle/site:viewuseridentity<br />
| site:viewuseridentity<br />
|-<br />
! Hidden fields<br />
| user:viewhiddendetails<br />
| user:viewhiddendetails<br />
| course:viewhiddenuserfields<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ Moodle 2.9<br />
! Information<br />
! User Profile<br />
! Course Profile<br />
! Participants list<br />
|-<br />
! Email<br />
| course:useremail<br />
| course:useremail<br />
| site:viewuseridentity<br />
|-<br />
! Hidden fields<br />
| user:viewhiddendetails<br />
| user:viewhiddendetails<br />
| course:viewhiddenuserfields<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ Proposed Backport fix MDL-51712<br />
! Information<br />
! User Profile<br />
! Course Profile<br />
! Participants list<br />
|-<br />
! Email<br />
| course:useremail or site:viewuseridentity<br />
| course:useremail or site:viewuseridentity<br />
| site:viewuseridentity<br />
|-<br />
! Hidden fields<br />
| user:viewhiddendetails<br />
| user:viewhiddendetails<br />
| course:viewhiddenuserfields<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ Proposed Improvement MDL-51712<br />
! Information<br />
! User Profile<br />
! Course Profile<br />
! Participants list<br />
|-<br />
! Email<br />
| course:useremail or site:viewuseridentity<br />
| course:useremail or site:viewuseridentity<br />
| site:viewuseridentity<br />
|-<br />
! Hidden fields<br />
| course:viewhiddenuserfields<br />
| course:viewhiddenuserfields<br />
| course:viewhiddenuserfields<br />
|}</div>Johnokhttps://docs.moodle.org/31/en/index.php?title=User:John_Okely/User_details_view_capabilities&diff=120381User:John Okely/User details view capabilities2015-10-16T05:57:47Z<p>Johnok: </p>
<hr />
<div>{| class="wikitable"<br />
|+ Moodle 2.8<br />
! Information<br />
! User Profile<br />
! Course Profile<br />
! Participants list<br />
|-<br />
! Email<br />
| course:useremail<br />
| course:viewhiddenuserfields or moodle/site:viewuseridentity<br />
| course:viewhiddenuserfields<br />
|-<br />
! Hidden fields<br />
| user:viewhiddendetails<br />
| user:viewhiddendetails<br />
| course:viewhiddenuserfields<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ Moodle 2.9<br />
! Information<br />
! User Profile<br />
! Course Profile<br />
! Participants list<br />
|-<br />
! Email<br />
| course:useremail<br />
| course:useremail<br />
| course:viewhiddenuserfields<br />
|-<br />
! Hidden fields<br />
| user:viewhiddendetails<br />
| user:viewhiddendetails<br />
| course:viewhiddenuserfields<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ Proposed change<br />
! Information<br />
! User Profile<br />
! Course Profile<br />
! Participants list<br />
|-<br />
! Email<br />
| course:useremail or site:viewuseridentity<br />
| course:useremail or site:viewuseridentity<br />
| course:viewhiddenuserfields<br />
|-<br />
! Hidden fields<br />
| user:viewhiddendetails<br />
| user:viewhiddendetails<br />
| course:viewhiddenuserfields<br />
|}</div>Johnokhttps://docs.moodle.org/31/en/index.php?title=User:John_Okely/User_details_view_capabilities&diff=120380User:John Okely/User details view capabilities2015-10-16T05:57:17Z<p>Johnok: </p>
<hr />
<div>{| class="wikitable"<br />
|+ Moodle 2.8<br />
! Information<br />
! User Profile<br />
! Course Profile<br />
! Participants list<br />
|-<br />
! Email<br />
| course:useremail<br />
| course:viewhiddenuserfields or moodle/site:viewuseridentity<br />
| course:viewhiddenuserfields<br />
|-<br />
! Hidden fields<br />
| user:viewhiddendetails<br />
| user:viewhiddendetails<br />
| course:viewhiddenuserfields<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ Moodle 2.9<br />
! Information<br />
! User Profile<br />
! Course Profile<br />
! Participants list<br />
|-<br />
! Email<br />
| course:useremail<br />
| course:useremail<br />
| course:viewhiddenuserfields<br />
|-<br />
! Hidden fields<br />
| user:viewhiddendetails<br />
| user:viewhiddendetails<br />
| course:viewhiddenuserfields<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ Proposed change<br />
! Information<br />
! User Profile<br />
! Course Profile<br />
! Participants list<br />
|-<br />
! Email<br />
| course:useremail or moodle/site:viewuseridentity<br />
| course:useremail or moodle/site:viewuseridentity<br />
| course:viewhiddenuserfields<br />
|-<br />
! Hidden fields<br />
| user:viewhiddendetails<br />
| user:viewhiddendetails<br />
| course:viewhiddenuserfields<br />
|}</div>Johnokhttps://docs.moodle.org/31/en/index.php?title=User:John_Okely/User_details_view_capabilities&diff=120379User:John Okely/User details view capabilities2015-10-16T04:00:07Z<p>Johnok: Created page with "{| class="wikitable" |+ Moodle 2.8 ! Information ! User Profile ! Course Profile ! Participants list ! Gradebook |- ! Email | row 1, cell 1 | row 1, cell 2 | course:viewhidden..."</p>
<hr />
<div>{| class="wikitable"<br />
|+ Moodle 2.8<br />
! Information<br />
! User Profile<br />
! Course Profile<br />
! Participants list<br />
! Gradebook<br />
|-<br />
! Email<br />
| row 1, cell 1<br />
| row 1, cell 2<br />
| course:viewhiddenuserfields<br />
| row 1, cell 4<br />
|-<br />
! Hidden fields<br />
| user:viewhiddendetails<br />
| user:viewhiddendetails<br />
| course:viewhiddenuserfields<br />
| row 2, cell 4<br />
|-<br />
! Identity fields<br />
| row 3, cell 1<br />
| row 3, cell 2<br />
| row 3, cell 3<br />
| row 3, cell 4<br />
|}<br />
<br />
Hidden Fields<br />
<br />
Email</div>Johnokhttps://docs.moodle.org/31/en/index.php?title=User:John_Okely&diff=120378User:John Okely2015-10-16T03:44:45Z<p>Johnok: </p>
<hr />
<div>Please see [https://moodle.org/user/profile.php?id=1779959 https://moodle.org/user/profile.php?id=1779959]</div>Johnokhttps://docs.moodle.org/31/en/index.php?title=User:John_Okely&diff=120377User:John Okely2015-10-16T03:44:34Z<p>Johnok: </p>
<hr />
<div>Please see [https://moodle.org/user/profile.php?id=1779959 https://moodle.org/user/profile.php?id=1779959]<br />
<br />
WIP [John_Okely/User_details_view_capabilities]</div>Johnokhttps://docs.moodle.org/31/en/index.php?title=User:John_Okely&diff=120376User:John Okely2015-10-16T03:35:48Z<p>Johnok: </p>
<hr />
<div>Please see [https://moodle.org/user/profile.php?id=1779959 https://moodle.org/user/profile.php?id=1779959]<br />
<br />
WIP [User details view capabilities]</div>Johnokhttps://docs.moodle.org/31/en/index.php?title=Managing_authentication&diff=120340Managing authentication2015-10-15T07:49:19Z<p>Johnok: Add more info on accounts with same email</p>
<hr />
<div>{{Authentication}}<br />
==Setting the authentication method(s)==<br />
<br />
An administrator can set the authentication method(s) for the site as follows:<br />
<br />
# Go to ''Administration > Site administration > Plugins > Authentication > Manage authentication''<br />
# Click the eye icon to enable selected authentication plugins (closed eye = disabled, open eye = enabled)<br />
# Click the settings link opposite the authentication plugin(s) you have chosen<br />
# Configure the required settings and click the "Save changes" button<br />
# Repeat until you have edited all the plugins you have enabled<br />
<br />
More than one authentication plugin may be enabled. Any authentication plugin can be used to find a username/password match. Once found, a user is logged in and alternative plugins are not used. Therefore the plugin which handles the most logins should be moved to the top of the page in order that less load is put on authentication servers.<br />
<br />
[[File:Authenticationintro.png]]<br />
<br />
==Authentication common settings==<br />
<br />
Authentication common settings can be changed by an administrator in ''Administration > Site administration > Plugins > Authentication > Manage authentication''.<br />
<br />
[[File:Commonsettings.png]]<br />
<br />
===Self registration===<br />
<br />
If you wish users to be able to create their own user accounts, i.e. self-register, then select Email-based self-registration (or any other enabled plugin that can support self registration, like LDAP) from the drop-down menu. This will result in a "Is this your first time here?" instructions and a "Create new account" button being displayed on the login page.<br />
<br />
Note: The [[Email-based self-registration]] authentication plugin must be enabled to allow users who previously self-registered to login with that plugin. Selecting Email-based self-registration as the self registration method allows potential users to self register.<br />
<br />
Self-registration can be a source of spam accounts. To reduce this see [[Authentication_FAQ#How_can_I_prevent_spam_accounts_if_I_use_Self-registration.3F]]<br />
<br />
===Allow login via email===<br />
<br />
If this is enabled then users can use either their email address or their username when logging in.<br />
<br />
===Allow accounts with same email===<br />
{{New features}}<br />
<br />
By default, usernames must all be unique. If this setting is set to yes, it allows users to be created or uploaded that have the same email address as another account.<br />
<br />
Note that it is not recommended to allow this feature. Password resets will be sent to the email account so everyone with access to that email address can gain access to the other user's accounts, and the different users may be confused as to what email was sent to who. Where possible it is recommended you encourage users to mail aliases instead (such as gmail's + alias feature) so that you can differentiate the emails received about the accounts.<br />
<br />
===Prevent account creation when authenticating===<br />
If an external database such as LDAP is used, then normally when a user logs in for the first time, a new account is created for them. Disable this setting if you don't want this to happen but if you only want existing users to be able to access the site.<br />
<br />
===Guest login button===<br />
<br />
You can hide or show the guest login button on the login page. Hiding the guest login button disables [[Guest role|guest access]] to the Moodle site, however logged-in users can still enter any courses which allow guest access without being required to enrol.<br />
<br />
===Limit concurrent logins===<br />
<br />
By default, there is no limit to the number of concurrent browser logins. (If a user is concerned about this, they can view their [[Browser sessions]] page.) This setting allows you to specify how many concurrent browser logins are allowed. Once the limit is reached, the oldest session will be terminated. Note that this does not work with Single sign on plugins.<br />
<br />
===Alternate login URL===<br />
<br />
<br />
This should be used with care, since a mistake in the URL or on the actual login page can lock you out of your site. If you do mess it up, you can remove the entry ''alternateloginurl'' from your database (table mdl_config) using, e.g., phpmyadmin for mysql. Depending on your configuration, you will also have to clear your caches with ''php admin/cli/purge_caches.php''.<br />
You can read some more useful information about changing $CFG->alternateloginurl = ' your url '; on the following [https://moodle.org/mod/forum/discuss.php?d=86952 discussion].<br />
<br />
===Forgotten password URL===<br />
<br />
If your lost password handling is performed entirely outside of Moodle (for example, only by a help desk), you can set the url of that service here. Anybody pressing a "lost password" link in Moodle will be redirected to this URL. Note that this will disable '''all''' of Moodle's lost password recovery options regardless of authentication method(s) in use.<br />
<br />
===Instructions===<br />
<br />
The instructions field is for providing custom login instructions on the login page. If the field is left blank then the default login instructions will be displayed.<br />
<br />
{|<br />
| [[File:login page default instructions.png|thumb|Login page with default instructions displayed]]<br />
| [[File:custom login instructions.png|thumb|Login page with custom instructions displayed]]<br />
|}<br />
<br />
An alternative method of providing custom login instructions is to edit the default login instructions using the language customization feature. This method should be used if you wish to provide custom login instructions in more than one language.<br />
<br />
# Go to ''Administration > Site administration > Language > Language customization''<br />
# Select a language then click the button 'Open language pack for editing' then click continue<br />
# Select moodle.php and enter ''loginsteps'' as string identifier then click 'Show strings'<br />
# Enter your custom login instructions in the local customisation text box<br />
# Click the button 'Save changes to the language pack' then click continue<br />
# Repeat the steps for other languages<br />
<br />
Note: The instructions field must be left blank for the above method to work. Custom login instructions in English can be provided by editing the English language pack.<br />
<br />
For how to do this for multiple languages, see https://docs.moodle.org/31/en/Authentication_FAQ#How_can_I_change_the_.22Is_this_your_first_time_here.3F.22_instructions.3F<br />
<br />
===Allowed and denied email domains===<br />
<br />
Authentication may be restricted to particular email domains when using [[Email-based self-registration]] so that, for example, only students with a university email can login.<br />
<br />
===Restrict domains when changing email===<br />
<br />
You can choose to enforce email domains only when users create an account using [[Email-based self-registration]] i.e. after creating an account, users may change their email to a different domain.<br />
<br />
===ReCAPTCHA===<br />
<br />
[[Image:New account form with captcha element.png|thumb|New account form with CAPTCHA element]]<br />
A CAPTCHA is a program that can tell whether its user is a human or a computer. CAPTCHAs are used by many websites to prevent abuse from bots, or automated programs usually written to generate spam. No computer program can read distorted text as well as humans can, so bots cannot navigate sites protected by CAPTCHAs.<br />
<br />
Spam protection may be added to the [[Email-based self-registration]] new account form with a CAPTCHA element - a challenge-response test used to determine whether the user is human.<br />
<br />
ReCAPTCHA keys can be obtained from http://www.google.com/recaptcha by [https://www.google.com/recaptcha/admin/create signing up for an account] (free) then entering a domain. The public and private keys provided can then be copied and pasted into the ''recaptchapublickey'' and ''recaptchaprivatekey'' fields in the manage authentication common settings, located under Site administration > Plugins > Authentication > Manage authentication, and the changes saved.<br />
<br />
In addition to setting reCAPTCHA keys, email-based self-registration should be set as the self registration authentication plugin in the manage authentication common settings and the reCAPTCHA element should be enabled in the [[Email-based self-registration]] settings.<br />
<br />
==Profile fields data mapping and locking==<br />
Most (but not all) authentication plugins that use an external source for the user account details allow us to retrieve some user profile details (like first name, last name, email, etc.). By using the Data Mapping section on those authentication plugins configuration page we can configure what, when and how to manage all those user profile details.<br />
<br />
[[Image:Authent-data-map-fname.jpg|Data Mapping Options]]<br />
<br />
These fields are optional. You can choose to pre-fill some Moodle user fields with information from the external authentication source (if you are using one), from the fields that you specify here. If you leave these fields blank, then nothing will be transferred from the external authentication source and Moodle defaults will be used instead. In either case, the user will be able to edit all of these fields after they log in.<br />
<br />
In addition to specifying how to fill this fields, we can set how to update them (in both directions, to Moodle or from Moodle), and whether we want to lock them (so the user cannot modify their value) or not:<br />
<br />
*'''Update local''': When the user field will be updated from the external authentication source:<br />
** '''On creation''': when the user account is created during the first login<br />
** '''On every login''': every time the user logs in (or there is a user synchronization, for those authentication plugins that support it). Fields set to update locally should be locked.<br />
*'''Update external''': When the external authentication source will be updated from the user field:<br />
** '''Never''': never update the external authentication source from Moodle.<br />
** '''On update''': the external authentication source will be updated when the user profile is updated. Fields should be unlocked to allow edits. <br />
*'''Lock value''': To prevent users from altering some fields (e.g. students changing profile information to inappropriate or misleading information), the site administrator can lock profile fields. It's usually a good idea to lock profile fields if you are maintaining this data in the external authentication system.<br />
** '''Unlocked''': The field is unlocked and can be edited by the user at any time.<br />
** '''Unlocked if empty''': The field is unlocked if it is empty, but once the user fills in some information, it becomes locked and cannot be edited any more.<br />
** '''Locked''': The field is locked and cannot be edited by the user.<br />
<br />
If you are using a mixture of authentication types (such as IMAP and manual), then the fields you map and lock in the authentication options are specific to that particular authentication plugin. Each authentication plugin has its own set of mapped and locked fields.<br />
<br />
Remember to test the field locking by logging in with the proper type of account! If you test with a manual account but have set the field locking to apply to IMAP accounts, you will not be able to tell if it worked!<br />
<br />
[[de:Authentifizierungs-Plugins verwalten]]<br />
[[es:Gestionando autenticación]]</div>Johnokhttps://docs.moodle.org/31/en/index.php?title=External_database_authentication&diff=120337External database authentication2015-10-15T02:45:38Z<p>Johnok: Remove note about changeme for external database</p>
<hr />
<div>{{Authentication}}<br />
Location: '' Site administration > Plugins > Authentication > External database''<br />
<br />
<br />
This method uses an external database table to check whether a given username and password is valid. If the user does not currently exist in Moodle a new account will be created and their information copied from the external database. <br />
<br />
== Field mappings ==<br />
<br />
This is done by mapping fields at the bottom of the database authentication page. Each data field in the user profile has a text field next to it. Enter the name of the column in the external database that maps to the profile data field.<br />
<br />
'''Update Local''' - Specifies that the external data will be entered into the local field in question<br />
* On Creation - specifies that this will only happen on the original login when the account is created for the first time.<br />
* On Every Login - specifies that changes in the external data will be updated on the local Moodle field in question the next time the user logs in again.<br />
<br />
'''Update External''' - Specifies just the opposite, meaning changes in the local Moodle field in question will update the corresponding field in the external database<br />
* Never - Specifies this is disabled<br />
* On Update - Enables this to happen if a change is made locally (additional configuration is probably required)<br />
<br />
'''Lock Value''' - Only determines whether the local user can make a change in the Moodle field and does not affect the two settings above.<br />
* Unlocked - A user can make changes locally in the Moodle field (assumably even if it contradicts the external database the next login would change it again if Update Local is set<br />
* Locked - A user can never make changes<br />
* Unlocked if empty - A user can only make changes if the field is not populated already from the external database (this would seem to indicate a user could only enter something into this field once and could not change it after saving)<br />
<br />
== Automatic Synchronisation ==<br />
<br />
The above method adds new users only when they log in. If you want user accounts to be created in Moodle independent of actual logins, the db authentication plugin offers a script you can run regularly via 'cron'. A typical cron entry will be as follows...<br />
<br />
<pre><br />
0 * * * * /usr/bin/php /path/to/moodle/auth/db/cli/sync_users.php >dev/null<br />
</pre><br />
<br />
This runs every hour (adjust as required). It reads the entire table updating and creating local Moodle users. <br />
<br />
If you have custom profile fields on your site, these can be synced with External database authentication.<br />
<br />
==Additional Notes==<br />
<br />
It is now possible to use Salted Crypt passwords for the password format with external database authentication from the Password format setting:<br />
[[File:dbsaltedcrypt.png|thumb|300px|center]]<br />
<br />
<br />
* Plain text password matching is now always case sensitive<br />
* sha1/md5 hash comparisons are now enforced case insensitive (as underlying they are hexadecimal values)<br />
<br />
* Some of the things that apply to [[Upload users]] apply to the External database, but not all of the fields in the [[Upload users]] are available for the External Database authentication. The only available fields are the fields listed in the data mapping section of the admin page for the External Database connection.<br />
<br />
==See also==<br />
*Using Moodle [http://moodle.org/mod/forum/discuss.php?d=45444 Special and characters con tilde (accute accent) when connected to external database] forum discussion<br />
*Using Moodle [http://moodle.org/mod/forum/discuss.php?d=75519 HELP!--User Authentication problem] forum discussion<br />
*[[External database enrolment]]<br />
*change password in external DB authentication plugin [https://moodle.org/mod/forum/discuss.php?d=269311#p1162046] <br />
<br />
[[de:Externe Datenbank]]<br />
[[fr:Utiliser une base de données externe]]<br />
[[ja:外部データベース認証]]<br />
[[es:Autenticación con BasedeDatos externa]]</div>Johnokhttps://docs.moodle.org/31/en/index.php?title=Upload_users&diff=120270Upload users2015-10-12T02:23:08Z<p>Johnok: Add link back to managing authentication in email duplicates section</p>
<hr />
<div>{{Accounts}}<br />
An administrator can upload multiple user accounts via text file in ''Administration > Site administration > Users > Accounts > Upload users''.<br />
<br />
There are many robust options for uploading information (fields associated with a user) with this method: from enrolling users in multiple courses with course specific [[Roles|roles]] to updating user information in the [[User profile]] to deleting users from the site.<br />
<br />
Rather than uploading the text file, it can simply dragged from the desktop and dropped into the upload area, as demonstrated in the screencast [http://youtu.be/6E-TQXTkZB0 Drag and drop new users into Moodle 2.3] (by Mary Cooch).<br />
<br />
''Tip:'' It is usually not necessary to upload users in bulk with Upload users. To keep maintenance work down you should first explore forms of authentication that do not require manual maintenance, such as [[External database authentication|connecting to existing external databases]] or letting the users create their own accounts ([[Self enrolment]]). See [[Authentication]] for more information.<br />
<br />
[[File:uploadusersnew.png|thumb|500px|center|Initial upload users screen]]<br />
<br />
==Upload user process==<br />
Here is an outline of the process:<br />
<br />
# Create file for uploading<br />
# Go to ''Administration > Site administration > Users > Accounts > Upload users''<br />
# Add file to upload<br />
# Upload users preview - check settings and default user profile settings<br />
# Upload users preview - click "Upload users"<br />
# Upload users results - shows list of users, exceptions made in upload and summary of number of users<br />
# Upload users results - click "Continue"<br />
# Returns to Upload users screen<br />
<br />
==Updating users preview==<br />
There are various settings to better control the desired upload behaviour. These settings are found on the "Upload users preview" page.<br />
<br />
<br />
'''Warning''': errors updating existing accounts can affect your users badly. '''''Be careful''''' when using the options to update.<br />
<br />
====Upload type====<br />
The Upload type specifies how to handle existing accounts.<br />
;Add new only, skip existing users : is the default Moodle upload type. It creates a new user account for each new record in the uploaded file. If an existing <code>username</code> is found (i.e., the <code>username</code> in the uploaded file matches an existing <code>username</code>, that record is '''skipped'''. By skipping the existing user account, the data in the existing record is not touched (in contrast to the "Add new and update existing users" option) and a second new user account is '''not''' created (in contrast to the "Add all, append number to usernames if needed" option). <br />
;Add all, append number to usernames if needed : creates a new user account for each record in the uploaded file. If an existing user account is found, a new account will be created with a number appended to the <code>username</code>. For example, if a user account for <code>username</code> 'jsmith' already exists and a new record in the uploaded file contains a record for <code>username</code> 'jsmith' an additional user account is created with a 1 '''appended''' to the <code>username</code> to produce user 'jsmith1'. <br />
;Add new and update existing users : creates a new user account for each new user in the upload file. If an existing user account with the same <code>username</code> is found, the account information is '''updated''' by the data in the uploaded file. <br />
;Update existing users only : ignores any new users found in the upload file and updates the user account if a matching <code>username</code> record is found in the uploaded file.<br />
<br />
====New user password====<br />
When creating a new user account Moodle can create a new password (if one is not provided) or require a password in the uploaded file.<br />
;Create password if needed : creates a default password for the new user account if one is not provided in the uploaded file.<br />
;Field required in file : requires that a password be provided in the uploaded file in order. If a password is not provided, an error is generated and the user account is not created.<br />
<br />
====Existing user details====<br />
The Existing user details options are only available when the Upload type allows existing user accounts to be updated. It specifies how Moodle should process user detail information for existing users.<br />
;No changes : ignores user detail data in the uploaded and leaves the existing user account data unchanged.<br />
;Override with file : overwrites data in the existing user account with the data provided in the uploaded file.<br />
;Override with file and defaults : overwrites data in the existing user account with data provided in the uploaded file and fills in the default values for existing user details when no data is provided in the uploaded file.<br />
;Fill in missing from file and defaults : adds data in the existing user account with data provided in the uploaded file if the field is empty (does not already contain data) and fills in the default values for existing user details when no data is provided in the uploaded file.<br />
<br />
====Existing user password====<br />
The Existing user password option specifies how to handle password data for existing user accounts when Existing user details is set to overwrite data.<br />
;No changes : ignores password field in the uploaded user file and leaves the existing user account password untouched<br />
;Update : overwrites the existing user account password with the password provided in the uploaded file<br />
<br />
====Force password change====<br />
The Force password change option specifies when to tag a user account so that the next login attempt will require the user to change the user's password.<br />
;Users having a weak password : If the user account has a weak password as defined by the stie's [[Password_policy#Password_policy|Password policy]] then the user will be forced to change the password during the next login attempt. This option is not shown if there the site does not have a [[Password_policy#Password_policy|Password policy]], in other words <code>$CFG->passwordpolicy</code> must be set to see this option. <br />
;None : None of the users in the uploaded file will be forced to change the password during the user's next login attempt.<br />
;All : All of the users in the uploaded file will be forced to change the password during the user's next login attempt.<br />
<br />
====Allow renames====<br />
If the uploaded flie contains the special <code>oldusername</code> field, it is possible to rename a user from the <code>oldusername</code> to a new <code>username</code>. The default setting is to '''not''' allow renames. Keep in mind that renaming a user will require the user to use the new username when logging in.<br />
;No : ignores the <code>oldusername</code> field and leaves the existing user account's <code>username</code> field unchanged.<br />
;Yes : allows the existing user account's <code>username</code> to be changed by the data provided in the uploaded file's <code>username</code> field. The <code>oldusername</code> will be searched for and then updated with the data provided in the <code>username</code> column. <br />
<br />
====Allow deletes====<br />
If the uploaded file contains the <code>deleted</code> special field, it is possible to use the upload file to delete existing user accounts. The default setting is to '''not''' allow deletes. Keep in mind that deleting a user account will prevent that user from logging in. As a protection, site administrator user accounts cannot be deleted with this method. <br />
;No : ignores the <code>deleted</code> special field in the uploaded file and leaves the existing user account unchanged<br />
;Yes : allows the existing user account to be deleted when the value of the of the <code>deleted</code> field is 1. <br />
<br />
====Allow suspending and activating of accounts====<br />
If the uploaded file contains the <code>suspended</code> special field, it is possible to use the upload file to either suspend or make active (unsuspend) existing user accounts. The default setting is to allow suspending/activating of existing user accounts. Keep in mind that suspending an existing user account will prevent that user from logging in. <br />
;Yes : allows the existing user account to be suspended when the value of the of the <code>suspended</code> field is 1. <br />
;No : ignores the <code>suspended</code> special field in the uploaded file and leaves the existing user account status unchanged.<br />
<br />
====Prevent email address duplicates====<br />
It is possible, but '''not''' recommended to upload users with duplicate email addresses. By default, uploading users with duplicate email addresses is prevented. See MDL-38104 for some discussion. Further, since MDL-41115 added the ability for users to login with their email address it is even more important that duplicate email addresses be avoided.<br />
<br />
To allow duplicate email addresses, go to Site administration ► Plugins ► Authentication ► Manage authentication. You can tick "Allow accounts with same email". Then on the upload users screen you will be allowed to change the "Prevent email address duplicates" setting. However, doing this is not recommended. For more info, see the [[Managing_authentication#Allow_accounts_with_same_email|Managing authentication]] docs page<br />
;Yes : prevents user accounts from being created from the uploaded if an existing user account already has the same email address as found in the uploaded file's <eode>email</code> column.<br />
;No : allows user accounts to be created if an existing user account already has the same email address found in the uploaded file's <code>email</code> column.<br />
<br />
====Standardise usernames====<br />
Standardise usernames is used by default to convert the username to all lower case and to strip out illegal characters. It is possible to not standardise the usernames; however, doing so is '''not''' recommended.<br />
;Yes : standardises usernames found in the uploaded file before updating existing or creating new user accounts so that the username contains only lowercase letters and numbers.<br />
;No : skips standardising usernames found in the uploaded file so that the newly created or updated usernames will be exactly as they are in the uploaded file ('''not recommended''').<br />
<br />
For those seeking a more technical explanation, the process for standardising the usernames consists of ensuring the characters are all UTF-8 (fix_utf8) encoded, converting the username to lower case, and then stripping out non-letters/non-number characters (unless <code>$CFG->extendedusernamechars</code> is set to true) with something similar to: <br />
<br />
<code>$username = preg_replace('/[^-\.@_a-z0-9]/', '', $username);</code><br />
<br />
====Select for bulk user actions====<br />
After the uploaded file has finished being processed (all new accounts have been created and existing accounts updated as specified by the previous settings), there is an option to select some of those user accounts to perform additional [[admin/user/user_bulk|bulk user actions]] such as <br />
*Confirm user accounts created through Email-based self-registration which are not yet confirmed by the user<br />
*Send a message (requires Messaging to be enabled)<br />
*Delete user accounts<br />
*Display a list of users on a page<br />
*Download user data in text, ODS or Excel file format<br />
*Force users to change their passwords<br />
*Add users to a cohort<br />
<br />
By default, no users are selected for [[admin/user/user_bulk|bulk user actions]].<br />
<br />
;No : No users are selected for [[admin/user/user_bulk|bulk user actions]]<br />
;New users : Only newly created users are selected for [[admin/user/user_bulk|bulk user actions]]<br />
;Updated users : Only updated user accounts are selected for [[admin/user/user_bulk|bulk user actions]]<br />
;All users : All users found (existing updated users and newly created user accounts) in the uploaded file are selected for [[admin/user/user_bulk|bulk user actions]]<br />
<br />
===Default values===<br />
<br />
You can provide default user values for some fields not included in the uploaded file. Some fields include:<br />
*Email display<br />
*Forum auto-subscribe<br />
*City/town<br />
*ID number<br />
*Insttitution<br />
*Department<br />
<br />
==Upload user results ==<br />
After accepting the preview settings by clicking on "Upload users", you should see the the Upload users results screen.<br />
[[File:Upload users results 2.0.JPG|thumb|center|The results screen; everything went well!]]<br />
This screen will show you any exceptions or changes that were made to each user in the upload process. For example if you were updating user information, the updated information will be shown. Or if a user was not added that record will be highlighted.<br />
<br />
The screen will summarize how many users were uploaded or updated, indicate the number of weak passwords and the number of errors.<br />
<br />
==File formats for upload users file==<br />
The upload users file has fields separated by a comma (or other delimiter) ONLY - no space. The first line contains the valid field names. The rest of the lines (records) contain information about each user.<br />
<br />
'':Tip:'' Avoid special characters in field information like quotes or other commas. Test a file with only one record before a large upload. Remember there are other ways to authenticate users on you site or enroll users in a course.<br />
<br />
'':Tip:'' You can use a spread sheet program to create the file with the required columns and fields. Then save the file as "CSV (comma delimited)". These files can be opened with simple text editors for verification. <br />
<br />
===Valid upload file for testing===<br />
Here is an example of a simple valid upload file:<br />
(Column headers on the first line of the file are only highlighted in bold in this example to distinguish it from the rest of the of the data/user details)<br />
<br />
'''username,password,firstname,lastname,email,course1,group1,cohort1'''<br />
jonest,verysecret,Tom,Jones,jonest@someplace.edu,math102,Section 1,year 3<br />
reznort,somesecret,Trent,Reznor,reznort@someplace.edu,math102,Section 3,year 4<br />
<br />
===Fields that can be included===<br />
'':Tip:'' We strongly recommend that you test a file that contains fields you proposed to use with one user before attempting a file upload for the first time. http://demo.moodle.net might be a good place to see if your test file works.<br />
<br />
*'''Required fields''': <br />
:<p><code>username,firstname,lastname,email</code><br />
:Validity checks are performed for:<br />
#<code>username</code> can only contain alphabetical '''lowercase''' letters , numbers, hypen '-', underscore '_', period '.', or at-sign '@' <br />
#<code>email</code> is in the form: ''name@example.com'' .</p> <br />
<br />
*'''Password field''': "password" field is optional if "Create password if needed" setting is chosen (default). <br />
**If included, values should meet the requirements for the site's [[Site_policies#Password_policy|Password policy]]. To force password change for a particular user, set the password field to <code>changeme</code>. <br />
**If omitted, a password will be generated for each user (during the next Cron job) and welcome e-mails sent out.<br />
**Note: the text for the welcome e-mail is in the language settings. Please refer to this [https://moodle.org/mod/forum/discuss.php?d=210359&parent=917138 forum thread]for details.<br />
<br />
*'''Optional fields''': To provide values other than the default include one or more of these<br />
:<p><code>institution,department,city,country,lang,auth,timezone,idnumber,icq,phone1,phone2,address,url,description,mailformat,maildisplay,htmleditor,autosubscribe</code></p><br />
*'''[[Additional name fields]]'''<br />
*Country- use a country TWO LETTER CODE<br />
*Some fields have a maximum number of characters that are allowed (notably institution should be '''at most 40 characters''' long). See hints below.<br />
*Maildisplay, htmleditor and autosubscribe can be set from an import screen.<br />
<br />
*'''Custom profile field names''': (Optional). xxxxx is the real custom user profile field name (i.e. the unique shortname)<br />
:<p><code>profile_field_xxxxx</code></p><br />
: Create the custom fields BEFORE importing. Use the standard header. The "shortname" for your custom field is xxxxx (NB the shortname must be all lowercase, otherwise won't be recognised). The first record must include "profile_field_xxxxx".<br />
<br />
:'''Example''': To create a custom field "genre", you must write a shortname "genre" in the new field, and write "profile_field_genre" in the header of the .csv file.<br />
<br />
: For custom profile fields that are a menu, use the corresponding value (new in Moodle 2.3 onwards).<br />
<br />
For custom profile fields that are dates, use the ISO standard format YYYY-MM-DD, eg. 2014-06-19 which will then be properly localized in the interfaced.<br />
<br />
:'''Example''': A custom field 'Department' with one of three values 'HR', 'Marketing' or 'Training'. Just insert one of those three words (e.g. 'Training') as the value for that field. <br />
<br />
*'''Special fields''': Used for changing of usernames or deleting of users<br />
:<p><code>oldusername</code>, <code>deleted</code>, <code>suspended</code></p><br />
<br />
*'''Enrolment fields''': (Optional):<br />
:<code>course1,type1,role1,group1,enrolperiod1,enrolstatus1,course2,type2,role2,group2,enrolperiod2,enrolstatus2</code> etc.<br />
<br />
:* Header fields must have a numeric suffix such that <code>type1</code>,<code>role1</code>,<code>group1</code>,<code>enrolperiod1</code> and <code>enrolstatus1</code> all apply to <code>course1</code> for course<code>1</code> to course<code>n</code>.<br />
:*<code>course</code> is the "shortname" of the course, if present the user will be enrolled in that course.<br />
:* <code>type</code> sets the role to be used for the enrolment. A value of <code>1</code> is default course role, <code>2</code> is legacy Teacher role and <code>3</code> is legacy Non-editing Teacher.<br />
:* <code>role</code> may be used to specify roles directly, using either role short name or id (numeric names of roles are not supported).<br />
:* <code>group</code> may be used to assign users to groups in course, using name or id (numeric group names are not supported)<br />
:* <code>enrolperiod</code> may be used to set the enrolment duration, in days, for each course.<br />
:* <code>enrolstatus</code> can suspend users from a course when set to 1 or left blank for enrolled.<br />
<br />
*'''Cohort field''': (Optional):<br />
:<code>cohort1</code> <br />
<br />
:Internal cohort id numbers or non-numeric Cohort IDs of existing cohorts must be used; names are not allowed.<br />
*'''mnethostid''' (Optional)<br />
<br />
Existing [[MNet]]users can be added to courses, groups or cohorts as below:<br />
#enrolling to courses: username+mnethostid+course required<br />
# adding to group: username+mnethostid+course+group required<br />
#adding to cohort: username+mnethostid+cohort required<br />
#suspending/reviving accounts: username+mnethostid+suspended required<br />
All other operations are ignored. You can not add users, delete them or update them (such as change names or email, profile fields, etc.)<br />
<br />
*'''System role''' (Optional)<br />
:<code>sysrole1,sysrole2,sysrole3</code> etc<br />
Users may be uploaded to a system role (usually Manager or Course creator) by entering the shortname of that role. Other roles can only be uploaded if they have already been assigned in the 'system' context. See [[Creating custom roles]]. Multiple roles can be assigned using <code>sysrole2</code>, <code>sysrole3</code>, etc. fields. Note that the number suffix in no way relates to the number suffixes on the enrolment fields. The numbers must go up in sequence starting at 1.<br />
<br />
Users can also be removed from a given system role by entering the shortname of that role prefixed with a minus symbol: '-'. If the user is currently assigned to that role, they are removed from it. If the user is not currently assigned to that system role, the field value is ignored. However, the field value must refer to a system role that does exist on the system, otherwise an error will occur.<br />
[[File:GlobalRoles1.png|thumb|500px|center|Example of a file for uploading users with global/system roles]]<br />
<br />
Commas within a field must be encoded as &#44 - the script will decode these back to commas.<br />
<br />
For Boolean fields, use <code>0</code> for false and <code>1</code> for true.<br />
<br />
To prevent users from receiving a large number of emails from courses or forced subscription forums use the '''maildigest'''. The options for this field are 0 = No digest, 1 = Complete digest and 2 = Digest with just subjects.<br />
<br />
==Advanced potentials of Upload user==<br />
===Templates===<br />
<br />
''Note: This section needs checking and updating if necessary for Moodle 2.0. Please do so and remove this note when finished.''<br />
<br />
The default values are processed as templates in which the following codes are allowed:<br />
<br />
* %l - will be replaced by the lastname<br />
* %f - will be replaced by the firstname<br />
* %u - will be replaced by the username<br />
* %% - will be replaced by the %<br />
<br />
Between the percent sign (%) and any code letter (l, f or u) the following modifiers are allowed:<br />
<br />
* (-) minus sign - the information specified by the code letter will be converted to lowercase<br />
* (+) plus sign - the information specified by the code letter will be converted to UPPERCASE<br />
* (~) tilde sign - the information specified by the code letter will be converted to Title Case<br />
* a decimal number - the information specified by the code letter will be truncated to that many characters<br />
<br />
For example, if the firstname is John and the lastname is Doe, the following values will be obtained with the specified templates:<br />
<br />
* %l%f = DoeJohn<br />
* %l%1f = DoeJ<br />
* %-l%+f = doeJOHN<br />
* %-f_%-l = john_doe<br />
*<nowiki> http://www.example.com/~%u/</nowiki> results in <nowiki>http://www.example.com/~jdoe/</nowiki> (if the username is jdoe or %-1f%-l)<br />
<br />
Template processing is done only on default values, and not on the values retrieved from the CSV file.<br />
<br />
In order to create correct Moodle usernames, the username is always converted to lowercase. Moreover, if the "Allow extended characters in usernames" option in the Site policies page is off, characters different to letters, digits, dash (-) and dot (.) are removed. For example if the firstname is John Jr. and the lastname is Doe, the username %-f_%-l will produce john jr._doe when Allow extended characters in usernames is on, and johnjr.doe when off.<br />
<br />
When the "New username duplicate handling" setting is set to Append counter, an auto-increment counter will be append to duplicate usernames produced by the template. For example, if the CSV file contains the users named John Doe, Jane Doe and Jenny Doe without explicit usernames, the default username is %-1f%-l and New username duplicate handling is set to Append counter, then the usernames produced will be jdoe, jdoe2 and jdoe3.<br />
<br />
===Deleting accounts===<br />
<br />
If the <code>deleted</code> field is present, users with value 1 for it will be deleted. In this case, all the fields may be omitted, except for <code>username</code>. After uploading the file, be sure to change the "Upload type" to "Update existing users only" and the "Allow deletes" option to "Yes".<br />
<br />
:''Tip:'' A similar field is available for <code>suspended</code>. This enables a user account to be temporarily disabled rather than completely removed.<br />
<br />
Deleting and uploading accounts could be done with a single CSV file. For example, the following file will add the user Tom Jones and delete the user reznort:<br />
<br />
username,firstname,lastname,deleted<br />
jonest,Tom,Jones,0<br />
reznort,,,1<br />
<br />
==Encoding file format==<br />
On the initial Upload user screen, you may select the file encoding format from a pull down list. These include UTF-8 (the default), ASCII, ISO-8859-1 to ISO-8859-11 or any one of over 36 formats.<br />
<br />
==Hints==<br />
<br />
===Spreadsheet===<br />
<br />
If you use a spreadsheet program such as Excel to create your .csv file, check the resulting output in a text editor before you upload it. It is possible to get trailing commas on each line from an empty field if you have added and deleted columns of information prior to saving the final file. Also check the character encoding. A csv file is a simple text file (ASCII or Unicode) that can be used to upload user accounts.<br />
<br />
Excel translates passwords that begin with - (minus) or + (plus) as zero. Even when saving as .csv and saying "Yes" to "Keep this format, and leave out any incompatible features." Check for this before uploading, as a zero halts the upload process.<br />
<br />
If you use a formula in Excel to create fields (for example, the concatenate function to create a user name), then remember to copy the cells with the formula and use special paste with values checked to make them into an acceptable data for a csv file.<br />
<br />
The upload will also fail if you have trailing spaces at the end of your data fields. Often, this can not be removed with a simple Find " " and Replace with "". If information has been copied from web sources than it is possible to include non-breaking spaces which will prevent your upload from being completed correctly. To find these invisible spaces, use the Find and Replace function in Excel. In the find field, hold alt and type 0160. Leave the replace field blank. <br />
<br />
===Country===<br />
The country should be written as a two letter code, in capitals. For example, use BE for Belgium or NL for the Netherlands. Using "be" or "nl" as a country code will result in a database error.<br />
:''Tip:'' If you are having trouble working out the two-letter code for a country, you can consult the list of [http://www.iso.org/iso/country_names_and_code_elements country names and code elements] available on the ISO Website. A common error is to use UK for United Kingdom; it should be GB.<br />
<br />
===Field size limits===<br />
Some fields have maximum character lengths. Typically the file will import to the preview list screen but not finish the process. Turn on debug to see the fields that are too long. Common fields to cause problems are "Institution" which is limited to 40 characters, and "City", also limited (20 characters). The error will be "User not added - error".<br />
<br />
===Time zones===<br />
<br />
The entry is case sensitive so Europe/London will work but europe/london will not.<br />
<br />
===All fields listed here===<br />
:All the fields that are valid are listed below, except for any custom fields you may have created. <br />
firstname, lastname, username, email, city, country, lang, timezone, mailformat, maildisplay, maildigest, htmleditor, ajax, autosubscribe ,institution, department, idnumber, skype , msn, aim, yahoo, icq, phone1, phone2, address, url, description, descriptionformat, password, auth, oldusername , deleted, suspended, course1, course2, course3, course4<br />
<br />
===Enroll users to Cohorts (system groups)===<br />
You can enroll users to any Cohort (system level group) by using only the "username" and the "Cohort ID".<br />
Here is a sample CSV file:<br />
<br />
'''username,cohort1'''<br />
teacher1,system-teachers<br />
teacher2,system-teachers<br />
teacher3,system-teachers<br />
<br />
Make sure you set "Upload type" to "Update existing users only" (So you are not asked to add firstname, lastname and email fields too)<br />
<br />
== See also ==<br />
* [http://youtu.be/PFGLZnuu_JI Adding users by using a CSV in Moodle] MoodleBites video on YouTube<br />
*[[Flat file]] enrolment<br />
* [[User profile fields]] for details of how to include data about custom user profile fields in the upload users file<br />
* [[Upload courses]]<br />
<br />
Using Moodle forum discussions:<br />
*[http://moodle.org/mod/forum/discuss.php?d=36851 Can I auto enroll from Excel?]<br />
*[http://moodle.org/mod/forum/discuss.php?d=97903 Uploading users to custom roles]<br />
*[http://moodle.org/mod/forum/discuss.php?d=181259 User upload option: standardise usernames]<br />
*[http://moodle.org/mod/forum/discuss.php?d=144569 Matriculacion con flat file csv] - discussion in Spanish<br />
<br />
[[fr:Importer des utilisateurs]]<br />
[[ja:ユーザのアップロード]]<br />
[[de:Nutzerliste hochladen]]<br />
[[es:Subir usuarios]]</div>Johnokhttps://docs.moodle.org/31/en/index.php?title=Managing_authentication&diff=120269Managing authentication2015-10-12T02:11:39Z<p>Johnok: Add documentation about "Allow accounts with same email"</p>
<hr />
<div>{{Authentication}}<br />
==Setting the authentication method(s)==<br />
<br />
An administrator can set the authentication method(s) for the site as follows:<br />
<br />
# Go to ''Administration > Site administration > Plugins > Authentication > Manage authentication''<br />
# Click the eye icon to enable selected authentication plugins (closed eye = disabled, open eye = enabled)<br />
# Click the settings link opposite the authentication plugin(s) you have chosen<br />
# Configure the required settings and click the "Save changes" button<br />
# Repeat until you have edited all the plugins you have enabled<br />
<br />
More than one authentication plugin may be enabled. Any authentication plugin can be used to find a username/password match. Once found, a user is logged in and alternative plugins are not used. Therefore the plugin which handles the most logins should be moved to the top of the page in order that less load is put on authentication servers.<br />
<br />
[[File:Authenticationintro.png]]<br />
<br />
==Authentication common settings==<br />
<br />
Authentication common settings can be changed by an administrator in ''Administration > Site administration > Plugins > Authentication > Manage authentication''.<br />
<br />
[[File:Commonsettings.png]]<br />
<br />
===Self registration===<br />
<br />
If you wish users to be able to create their own user accounts, i.e. self-register, then select Email-based self-registration (or any other enabled plugin that can support self registration, like LDAP) from the drop-down menu. This will result in a "Is this your first time here?" instructions and a "Create new account" button being displayed on the login page.<br />
<br />
Note: The [[Email-based self-registration]] authentication plugin must be enabled to allow users who previously self-registered to login with that plugin. Selecting Email-based self-registration as the self registration method allows potential users to self register.<br />
<br />
Self-registration can be a source of spam accounts. To reduce this see [[Authentication_FAQ#How_can_I_prevent_spam_accounts_if_I_use_Self-registration.3F]]<br />
<br />
===Allow login via email===<br />
<br />
If this is enabled then users can use either their email address or their username when logging in.<br />
<br />
===Allow accounts with same email===<br />
<br />
By default, usernames must all be unique. If this setting is set to yes, it allows users to be created or uploaded that have the same email address as another account.<br />
<br />
===Prevent account creation when authenticating===<br />
If an external database such as LDAP is used, then normally when a user logs in for the first time, a new account is created for them. Disable this setting if you don't want this to happen but if you only want existing users to be able to access the site.<br />
<br />
===Guest login button===<br />
<br />
You can hide or show the guest login button on the login page. Hiding the guest login button disables [[Guest role|guest access]] to the Moodle site, however logged-in users can still enter any courses which allow guest access without being required to enrol.<br />
<br />
===Limit concurrent logins===<br />
<br />
By default, there is no limit to the number of concurrent browser logins. (If a user is concerned about this, they can view their [[Browser sessions]] page.) This setting allows you to specify how many concurrent browser logins are allowed. Once the limit is reached, the oldest session will be terminated. Note that this does not work with Single sign on plugins.<br />
<br />
===Alternate login URL===<br />
<br />
<br />
This should be used with care, since a mistake in the URL or on the actual login page can lock you out of your site. If you do mess it up, you can remove the entry ''alternateloginurl'' from your database (table mdl_config) using, e.g., phpmyadmin for mysql. Depending on your configuration, you will also have to clear your caches with ''php admin/cli/purge_caches.php''.<br />
You can read some more useful information about changing $CFG->alternateloginurl = ' your url '; on the following [https://moodle.org/mod/forum/discuss.php?d=86952 discussion].<br />
<br />
===Forgotten password URL===<br />
<br />
If your lost password handling is performed entirely outside of Moodle (for example, only by a help desk), you can set the url of that service here. Anybody pressing a "lost password" link in Moodle will be redirected to this URL. Note that this will disable '''all''' of Moodle's lost password recovery options regardless of authentication method(s) in use.<br />
<br />
===Instructions===<br />
<br />
The instructions field is for providing custom login instructions on the login page. If the field is left blank then the default login instructions will be displayed.<br />
<br />
{|<br />
| [[File:login page default instructions.png|thumb|Login page with default instructions displayed]]<br />
| [[File:custom login instructions.png|thumb|Login page with custom instructions displayed]]<br />
|}<br />
<br />
An alternative method of providing custom login instructions is to edit the default login instructions using the language customization feature. This method should be used if you wish to provide custom login instructions in more than one language.<br />
<br />
# Go to ''Administration > Site administration > Language > Language customization''<br />
# Select a language then click the button 'Open language pack for editing' then click continue<br />
# Select moodle.php and enter ''loginsteps'' as string identifier then click 'Show strings'<br />
# Enter your custom login instructions in the local customisation text box<br />
# Click the button 'Save changes to the language pack' then click continue<br />
# Repeat the steps for other languages<br />
<br />
Note: The instructions field must be left blank for the above method to work. Custom login instructions in English can be provided by editing the English language pack.<br />
<br />
For how to do this for multiple languages, see https://docs.moodle.org/31/en/Authentication_FAQ#How_can_I_change_the_.22Is_this_your_first_time_here.3F.22_instructions.3F<br />
<br />
===Allowed and denied email domains===<br />
<br />
Authentication may be restricted to particular email domains when using [[Email-based self-registration]] so that, for example, only students with a university email can login.<br />
<br />
===Restrict domains when changing email===<br />
<br />
You can choose to enforce email domains only when users create an account using [[Email-based self-registration]] i.e. after creating an account, users may change their email to a different domain.<br />
<br />
===ReCAPTCHA===<br />
<br />
[[Image:New account form with captcha element.png|thumb|New account form with CAPTCHA element]]<br />
A CAPTCHA is a program that can tell whether its user is a human or a computer. CAPTCHAs are used by many websites to prevent abuse from bots, or automated programs usually written to generate spam. No computer program can read distorted text as well as humans can, so bots cannot navigate sites protected by CAPTCHAs.<br />
<br />
Spam protection may be added to the [[Email-based self-registration]] new account form with a CAPTCHA element - a challenge-response test used to determine whether the user is human.<br />
<br />
ReCAPTCHA keys can be obtained from http://www.google.com/recaptcha by [https://www.google.com/recaptcha/admin/create signing up for an account] (free) then entering a domain. The public and private keys provided can then be copied and pasted into the ''recaptchapublickey'' and ''recaptchaprivatekey'' fields in the manage authentication common settings, located under Site administration > Plugins > Authentication > Manage authentication, and the changes saved.<br />
<br />
In addition to setting reCAPTCHA keys, email-based self-registration should be set as the self registration authentication plugin in the manage authentication common settings and the reCAPTCHA element should be enabled in the [[Email-based self-registration]] settings.<br />
<br />
==Profile fields data mapping and locking==<br />
Most (but not all) authentication plugins that use an external source for the user account details allow us to retrieve some user profile details (like first name, last name, email, etc.). By using the Data Mapping section on those authentication plugins configuration page we can configure what, when and how to manage all those user profile details.<br />
<br />
[[Image:Authent-data-map-fname.jpg|Data Mapping Options]]<br />
<br />
These fields are optional. You can choose to pre-fill some Moodle user fields with information from the external authentication source (if you are using one), from the fields that you specify here. If you leave these fields blank, then nothing will be transferred from the external authentication source and Moodle defaults will be used instead. In either case, the user will be able to edit all of these fields after they log in.<br />
<br />
In addition to specifying how to fill this fields, we can set how to update them (in both directions, to Moodle or from Moodle), and whether we want to lock them (so the user cannot modify their value) or not:<br />
<br />
*'''Update local''': When the user field will be updated from the external authentication source:<br />
** '''On creation''': when the user account is created during the first login<br />
** '''On every login''': every time the user logs in (or there is a user synchronization, for those authentication plugins that support it). Fields set to update locally should be locked.<br />
*'''Update external''': When the external authentication source will be updated from the user field:<br />
** '''Never''': never update the external authentication source from Moodle.<br />
** '''On update''': the external authentication source will be updated when the user profile is updated. Fields should be unlocked to allow edits. <br />
*'''Lock value''': To prevent users from altering some fields (e.g. students changing profile information to inappropriate or misleading information), the site administrator can lock profile fields. It's usually a good idea to lock profile fields if you are maintaining this data in the external authentication system.<br />
** '''Unlocked''': The field is unlocked and can be edited by the user at any time.<br />
** '''Unlocked if empty''': The field is unlocked if it is empty, but once the user fills in some information, it becomes locked and cannot be edited any more.<br />
** '''Locked''': The field is locked and cannot be edited by the user.<br />
<br />
If you are using a mixture of authentication types (such as IMAP and manual), then the fields you map and lock in the authentication options are specific to that particular authentication plugin. Each authentication plugin has its own set of mapped and locked fields.<br />
<br />
Remember to test the field locking by logging in with the proper type of account! If you test with a manual account but have set the field locking to apply to IMAP accounts, you will not be able to tell if it worked!<br />
<br />
[[de:Authentifizierungs-Plugins verwalten]]<br />
[[es:Gestionando autenticación]]</div>Johnokhttps://docs.moodle.org/31/en/index.php?title=Upload_users&diff=120255Upload users2015-10-09T08:43:00Z<p>Johnok: Allowing accounts with same email is now dependant on Prevent email address duplicates</p>
<hr />
<div>{{Accounts}}<br />
An administrator can upload multiple user accounts via text file in ''Administration > Site administration > Users > Accounts > Upload users''.<br />
<br />
There are many robust options for uploading information (fields associated with a user) with this method: from enrolling users in multiple courses with course specific [[Roles|roles]] to updating user information in the [[User profile]] to deleting users from the site.<br />
<br />
Rather than uploading the text file, it can simply dragged from the desktop and dropped into the upload area, as demonstrated in the screencast [http://youtu.be/6E-TQXTkZB0 Drag and drop new users into Moodle 2.3] (by Mary Cooch).<br />
<br />
''Tip:'' It is usually not necessary to upload users in bulk with Upload users. To keep maintenance work down you should first explore forms of authentication that do not require manual maintenance, such as [[External database authentication|connecting to existing external databases]] or letting the users create their own accounts ([[Self enrolment]]). See [[Authentication]] for more information.<br />
<br />
[[File:uploadusersnew.png|thumb|500px|center|Initial upload users screen]]<br />
<br />
==Upload user process==<br />
Here is an outline of the process:<br />
<br />
# Create file for uploading<br />
# Go to ''Administration > Site administration > Users > Accounts > Upload users''<br />
# Add file to upload<br />
# Upload users preview - check settings and default user profile settings<br />
# Upload users preview - click "Upload users"<br />
# Upload users results - shows list of users, exceptions made in upload and summary of number of users<br />
# Upload users results - click "Continue"<br />
# Returns to Upload users screen<br />
<br />
==Updating users preview==<br />
There are various settings to better control the desired upload behaviour. These settings are found on the "Upload users preview" page.<br />
<br />
<br />
'''Warning''': errors updating existing accounts can affect your users badly. '''''Be careful''''' when using the options to update.<br />
<br />
====Upload type====<br />
The Upload type specifies how to handle existing accounts.<br />
;Add new only, skip existing users : is the default Moodle upload type. It creates a new user account for each new record in the uploaded file. If an existing <code>username</code> is found (i.e., the <code>username</code> in the uploaded file matches an existing <code>username</code>, that record is '''skipped'''. By skipping the existing user account, the data in the existing record is not touched (in contrast to the "Add new and update existing users" option) and a second new user account is '''not''' created (in contrast to the "Add all, append number to usernames if needed" option). <br />
;Add all, append number to usernames if needed : creates a new user account for each record in the uploaded file. If an existing user account is found, a new account will be created with a number appended to the <code>username</code>. For example, if a user account for <code>username</code> 'jsmith' already exists and a new record in the uploaded file contains a record for <code>username</code> 'jsmith' an additional user account is created with a 1 '''appended''' to the <code>username</code> to produce user 'jsmith1'. <br />
;Add new and update existing users : creates a new user account for each new user in the upload file. If an existing user account with the same <code>username</code> is found, the account information is '''updated''' by the data in the uploaded file. <br />
;Update existing users only : ignores any new users found in the upload file and updates the user account if a matching <code>username</code> record is found in the uploaded file.<br />
<br />
====New user password====<br />
When creating a new user account Moodle can create a new password (if one is not provided) or require a password in the uploaded file.<br />
;Create password if needed : creates a default password for the new user account if one is not provided in the uploaded file.<br />
;Field required in file : requires that a password be provided in the uploaded file in order. If a password is not provided, an error is generated and the user account is not created.<br />
<br />
====Existing user details====<br />
The Existing user details options are only available when the Upload type allows existing user accounts to be updated. It specifies how Moodle should process user detail information for existing users.<br />
;No changes : ignores user detail data in the uploaded and leaves the existing user account data unchanged.<br />
;Override with file : overwrites data in the existing user account with the data provided in the uploaded file.<br />
;Override with file and defaults : overwrites data in the existing user account with data provided in the uploaded file and fills in the default values for existing user details when no data is provided in the uploaded file.<br />
;Fill in missing from file and defaults : adds data in the existing user account with data provided in the uploaded file if the field is empty (does not already contain data) and fills in the default values for existing user details when no data is provided in the uploaded file.<br />
<br />
====Existing user password====<br />
The Existing user password option specifies how to handle password data for existing user accounts when Existing user details is set to overwrite data.<br />
;No changes : ignores password field in the uploaded user file and leaves the existing user account password untouched<br />
;Update : overwrites the existing user account password with the password provided in the uploaded file<br />
<br />
====Force password change====<br />
The Force password change option specifies when to tag a user account so that the next login attempt will require the user to change the user's password.<br />
;Users having a weak password : If the user account has a weak password as defined by the stie's [[Password_policy#Password_policy|Password policy]] then the user will be forced to change the password during the next login attempt. This option is not shown if there the site does not have a [[Password_policy#Password_policy|Password policy]], in other words <code>$CFG->passwordpolicy</code> must be set to see this option. <br />
;None : None of the users in the uploaded file will be forced to change the password during the user's next login attempt.<br />
;All : All of the users in the uploaded file will be forced to change the password during the user's next login attempt.<br />
<br />
====Allow renames====<br />
If the uploaded flie contains the special <code>oldusername</code> field, it is possible to rename a user from the <code>oldusername</code> to a new <code>username</code>. The default setting is to '''not''' allow renames. Keep in mind that renaming a user will require the user to use the new username when logging in.<br />
;No : ignores the <code>oldusername</code> field and leaves the existing user account's <code>username</code> field unchanged.<br />
;Yes : allows the existing user account's <code>username</code> to be changed by the data provided in the uploaded file's <code>username</code> field. The <code>oldusername</code> will be searched for and then updated with the data provided in the <code>username</code> column. <br />
<br />
====Allow deletes====<br />
If the uploaded file contains the <code>deleted</code> special field, it is possible to use the upload file to delete existing user accounts. The default setting is to '''not''' allow deletes. Keep in mind that deleting a user account will prevent that user from logging in. As a protection, site administrator user accounts cannot be deleted with this method. <br />
;No : ignores the <code>deleted</code> special field in the uploaded file and leaves the existing user account unchanged<br />
;Yes : allows the existing user account to be deleted when the value of the of the <code>deleted</code> field is 1. <br />
<br />
====Allow suspending and activating of accounts====<br />
If the uploaded file contains the <code>suspended</code> special field, it is possible to use the upload file to either suspend or make active (unsuspend) existing user accounts. The default setting is to allow suspending/activating of existing user accounts. Keep in mind that suspending an existing user account will prevent that user from logging in. <br />
;Yes : allows the existing user account to be suspended when the value of the of the <code>suspended</code> field is 1. <br />
;No : ignores the <code>suspended</code> special field in the uploaded file and leaves the existing user account status unchanged.<br />
<br />
====Prevent email address duplicates====<br />
It is possible, but '''not''' recommended to upload users with duplicate email addresses. By default, uploading users with duplicate email addresses is prevented. See MDL-38104 for some discussion. Further, since MDL-41115 added the ability for users to login with their email address it is even more important that duplicate email addresses be avoided.<br />
<br />
To allow duplicate email addresses, go to Site administration ► Plugins ► Authentication ► Manage authentication. You can tick "Allow accounts with same email". Then on the upload users screen you will be allowed to change the "Prevent email address duplicates" setting<br />
;Yes : prevents user accounts from being created from the uploaded if an existing user account already has the same email address as found in the uploaded file's <eode>email</code> column.<br />
;No : allows user accounts to be created if an existing user account already has the same email address found in the uploaded file's <code>email</code> column.<br />
<br />
====Standardise usernames====<br />
Standardise usernames is used by default to convert the username to all lower case and to strip out illegal characters. It is possible to not standardise the usernames; however, doing so is '''not''' recommended.<br />
;Yes : standardises usernames found in the uploaded file before updating existing or creating new user accounts so that the username contains only lowercase letters and numbers.<br />
;No : skips standardising usernames found in the uploaded file so that the newly created or updated usernames will be exactly as they are in the uploaded file ('''not recommended''').<br />
<br />
For those seeking a more technical explanation, the process for standardising the usernames consists of ensuring the characters are all UTF-8 (fix_utf8) encoded, converting the username to lower case, and then stripping out non-letters/non-number characters (unless <code>$CFG->extendedusernamechars</code> is set to true) with something similar to: <br />
<br />
<code>$username = preg_replace('/[^-\.@_a-z0-9]/', '', $username);</code><br />
<br />
====Select for bulk user actions====<br />
After the uploaded file has finished being processed (all new accounts have been created and existing accounts updated as specified by the previous settings), there is an option to select some of those user accounts to perform additional [[admin/user/user_bulk|bulk user actions]] such as <br />
*Confirm user accounts created through Email-based self-registration which are not yet confirmed by the user<br />
*Send a message (requires Messaging to be enabled)<br />
*Delete user accounts<br />
*Display a list of users on a page<br />
*Download user data in text, ODS or Excel file format<br />
*Force users to change their passwords<br />
*Add users to a cohort<br />
<br />
By default, no users are selected for [[admin/user/user_bulk|bulk user actions]].<br />
<br />
;No : No users are selected for [[admin/user/user_bulk|bulk user actions]]<br />
;New users : Only newly created users are selected for [[admin/user/user_bulk|bulk user actions]]<br />
;Updated users : Only updated user accounts are selected for [[admin/user/user_bulk|bulk user actions]]<br />
;All users : All users found (existing updated users and newly created user accounts) in the uploaded file are selected for [[admin/user/user_bulk|bulk user actions]]<br />
<br />
===Default values===<br />
<br />
You can provide default user values for some fields not included in the uploaded file. Some fields include:<br />
*Email display<br />
*Forum auto-subscribe<br />
*City/town<br />
*ID number<br />
*Insttitution<br />
*Department<br />
<br />
==Upload user results ==<br />
After accepting the preview settings by clicking on "Upload users", you should see the the Upload users results screen.<br />
[[File:Upload users results 2.0.JPG|thumb|center|The results screen; everything went well!]]<br />
This screen will show you any exceptions or changes that were made to each user in the upload process. For example if you were updating user information, the updated information will be shown. Or if a user was not added that record will be highlighted.<br />
<br />
The screen will summarize how many users were uploaded or updated, indicate the number of weak passwords and the number of errors.<br />
<br />
==File formats for upload users file==<br />
The upload users file has fields separated by a comma (or other delimiter) ONLY - no space. The first line contains the valid field names. The rest of the lines (records) contain information about each user.<br />
<br />
'':Tip:'' Avoid special characters in field information like quotes or other commas. Test a file with only one record before a large upload. Remember there are other ways to authenticate users on you site or enroll users in a course.<br />
<br />
'':Tip:'' You can use a spread sheet program to create the file with the required columns and fields. Then save the file as "CSV (comma delimited)". These files can be opened with simple text editors for verification. <br />
<br />
===Valid upload file for testing===<br />
Here is an example of a simple valid upload file:<br />
(Column headers on the first line of the file are only highlighted in bold in this example to distinguish it from the rest of the of the data/user details)<br />
<br />
'''username,password,firstname,lastname,email,course1,group1,cohort1'''<br />
jonest,verysecret,Tom,Jones,jonest@someplace.edu,math102,Section 1,year 3<br />
reznort,somesecret,Trent,Reznor,reznort@someplace.edu,math102,Section 3,year 4<br />
<br />
===Fields that can be included===<br />
'':Tip:'' We strongly recommend that you test a file that contains fields you proposed to use with one user before attempting a file upload for the first time. http://demo.moodle.net might be a good place to see if your test file works.<br />
<br />
*'''Required fields''': <br />
:<p><code>username,firstname,lastname,email</code><br />
:Validity checks are performed for:<br />
#<code>username</code> can only contain alphabetical '''lowercase''' letters , numbers, hypen '-', underscore '_', period '.', or at-sign '@' <br />
#<code>email</code> is in the form: ''name@example.com'' .</p> <br />
<br />
*'''Password field''': "password" field is optional if "Create password if needed" setting is chosen (default). <br />
**If included, values should meet the requirements for the site's [[Site_policies#Password_policy|Password policy]]. To force password change for a particular user, set the password field to <code>changeme</code>. <br />
**If omitted, a password will be generated for each user (during the next Cron job) and welcome e-mails sent out.<br />
**Note: the text for the welcome e-mail is in the language settings. Please refer to this [https://moodle.org/mod/forum/discuss.php?d=210359&parent=917138 forum thread]for details.<br />
<br />
*'''Optional fields''': To provide values other than the default include one or more of these<br />
:<p><code>institution,department,city,country,lang,auth,timezone,idnumber,icq,phone1,phone2,address,url,description,mailformat,maildisplay,htmleditor,autosubscribe</code></p><br />
*'''[[Additional name fields]]'''<br />
*Country- use a country TWO LETTER CODE<br />
*Some fields have a maximum number of characters that are allowed (notably institution should be '''at most 40 characters''' long). See hints below.<br />
*Maildisplay, htmleditor and autosubscribe can be set from an import screen.<br />
<br />
*'''Custom profile field names''': (Optional). xxxxx is the real custom user profile field name (i.e. the unique shortname)<br />
:<p><code>profile_field_xxxxx</code></p><br />
: Create the custom fields BEFORE importing. Use the standard header. The "shortname" for your custom field is xxxxx (NB the shortname must be all lowercase, otherwise won't be recognised). The first record must include "profile_field_xxxxx".<br />
<br />
:'''Example''': To create a custom field "genre", you must write a shortname "genre" in the new field, and write "profile_field_genre" in the header of the .csv file.<br />
<br />
: For custom profile fields that are a menu, use the corresponding value (new in Moodle 2.3 onwards).<br />
<br />
For custom profile fields that are dates, use the ISO standard format YYYY-MM-DD, eg. 2014-06-19 which will then be properly localized in the interfaced.<br />
<br />
:'''Example''': A custom field 'Department' with one of three values 'HR', 'Marketing' or 'Training'. Just insert one of those three words (e.g. 'Training') as the value for that field. <br />
<br />
*'''Special fields''': Used for changing of usernames or deleting of users<br />
:<p><code>oldusername</code>, <code>deleted</code>, <code>suspended</code></p><br />
<br />
*'''Enrolment fields''': (Optional):<br />
:<code>course1,type1,role1,group1,enrolperiod1,enrolstatus1,course2,type2,role2,group2,enrolperiod2,enrolstatus2</code> etc.<br />
<br />
:* Header fields must have a numeric suffix such that <code>type1</code>,<code>role1</code>,<code>group1</code>,<code>enrolperiod1</code> and <code>enrolstatus1</code> all apply to <code>course1</code> for course<code>1</code> to course<code>n</code>.<br />
:*<code>course</code> is the "shortname" of the course, if present the user will be enrolled in that course.<br />
:* <code>type</code> sets the role to be used for the enrolment. A value of <code>1</code> is default course role, <code>2</code> is legacy Teacher role and <code>3</code> is legacy Non-editing Teacher.<br />
:* <code>role</code> may be used to specify roles directly, using either role short name or id (numeric names of roles are not supported).<br />
:* <code>group</code> may be used to assign users to groups in course, using name or id (numeric group names are not supported)<br />
:* <code>enrolperiod</code> may be used to set the enrolment duration, in days, for each course.<br />
:* <code>enrolstatus</code> can suspend users from a course when set to 1 or left blank for enrolled.<br />
<br />
*'''Cohort field''': (Optional):<br />
:<code>cohort1</code> <br />
<br />
:Internal cohort id numbers or non-numeric Cohort IDs of existing cohorts must be used; names are not allowed.<br />
*'''mnethostid''' (Optional)<br />
<br />
Existing [[MNet]]users can be added to courses, groups or cohorts as below:<br />
#enrolling to courses: username+mnethostid+course required<br />
# adding to group: username+mnethostid+course+group required<br />
#adding to cohort: username+mnethostid+cohort required<br />
#suspending/reviving accounts: username+mnethostid+suspended required<br />
All other operations are ignored. You can not add users, delete them or update them (such as change names or email, profile fields, etc.)<br />
<br />
*'''System role''' (Optional)<br />
:<code>sysrole1,sysrole2,sysrole3</code> etc<br />
Users may be uploaded to a system role (usually Manager or Course creator) by entering the shortname of that role. Other roles can only be uploaded if they have already been assigned in the 'system' context. See [[Creating custom roles]]. Multiple roles can be assigned using <code>sysrole2</code>, <code>sysrole3</code>, etc. fields. Note that the number suffix in no way relates to the number suffixes on the enrolment fields. The numbers must go up in sequence starting at 1.<br />
<br />
Users can also be removed from a given system role by entering the shortname of that role prefixed with a minus symbol: '-'. If the user is currently assigned to that role, they are removed from it. If the user is not currently assigned to that system role, the field value is ignored. However, the field value must refer to a system role that does exist on the system, otherwise an error will occur.<br />
[[File:GlobalRoles1.png|thumb|500px|center|Example of a file for uploading users with global/system roles]]<br />
<br />
Commas within a field must be encoded as &#44 - the script will decode these back to commas.<br />
<br />
For Boolean fields, use <code>0</code> for false and <code>1</code> for true.<br />
<br />
To prevent users from receiving a large number of emails from courses or forced subscription forums use the '''maildigest'''. The options for this field are 0 = No digest, 1 = Complete digest and 2 = Digest with just subjects.<br />
<br />
==Advanced potentials of Upload user==<br />
===Templates===<br />
<br />
''Note: This section needs checking and updating if necessary for Moodle 2.0. Please do so and remove this note when finished.''<br />
<br />
The default values are processed as templates in which the following codes are allowed:<br />
<br />
* %l - will be replaced by the lastname<br />
* %f - will be replaced by the firstname<br />
* %u - will be replaced by the username<br />
* %% - will be replaced by the %<br />
<br />
Between the percent sign (%) and any code letter (l, f or u) the following modifiers are allowed:<br />
<br />
* (-) minus sign - the information specified by the code letter will be converted to lowercase<br />
* (+) plus sign - the information specified by the code letter will be converted to UPPERCASE<br />
* (~) tilde sign - the information specified by the code letter will be converted to Title Case<br />
* a decimal number - the information specified by the code letter will be truncated to that many characters<br />
<br />
For example, if the firstname is John and the lastname is Doe, the following values will be obtained with the specified templates:<br />
<br />
* %l%f = DoeJohn<br />
* %l%1f = DoeJ<br />
* %-l%+f = doeJOHN<br />
* %-f_%-l = john_doe<br />
*<nowiki> http://www.example.com/~%u/</nowiki> results in <nowiki>http://www.example.com/~jdoe/</nowiki> (if the username is jdoe or %-1f%-l)<br />
<br />
Template processing is done only on default values, and not on the values retrieved from the CSV file.<br />
<br />
In order to create correct Moodle usernames, the username is always converted to lowercase. Moreover, if the "Allow extended characters in usernames" option in the Site policies page is off, characters different to letters, digits, dash (-) and dot (.) are removed. For example if the firstname is John Jr. and the lastname is Doe, the username %-f_%-l will produce john jr._doe when Allow extended characters in usernames is on, and johnjr.doe when off.<br />
<br />
When the "New username duplicate handling" setting is set to Append counter, an auto-increment counter will be append to duplicate usernames produced by the template. For example, if the CSV file contains the users named John Doe, Jane Doe and Jenny Doe without explicit usernames, the default username is %-1f%-l and New username duplicate handling is set to Append counter, then the usernames produced will be jdoe, jdoe2 and jdoe3.<br />
<br />
===Deleting accounts===<br />
<br />
If the <code>deleted</code> field is present, users with value 1 for it will be deleted. In this case, all the fields may be omitted, except for <code>username</code>. After uploading the file, be sure to change the "Upload type" to "Update existing users only" and the "Allow deletes" option to "Yes".<br />
<br />
:''Tip:'' A similar field is available for <code>suspended</code>. This enables a user account to be temporarily disabled rather than completely removed.<br />
<br />
Deleting and uploading accounts could be done with a single CSV file. For example, the following file will add the user Tom Jones and delete the user reznort:<br />
<br />
username,firstname,lastname,deleted<br />
jonest,Tom,Jones,0<br />
reznort,,,1<br />
<br />
==Encoding file format==<br />
On the initial Upload user screen, you may select the file encoding format from a pull down list. These include UTF-8 (the default), ASCII, ISO-8859-1 to ISO-8859-11 or any one of over 36 formats.<br />
<br />
==Hints==<br />
<br />
===Spreadsheet===<br />
<br />
If you use a spreadsheet program such as Excel to create your .csv file, check the resulting output in a text editor before you upload it. It is possible to get trailing commas on each line from an empty field if you have added and deleted columns of information prior to saving the final file. Also check the character encoding. A csv file is a simple text file (ASCII or Unicode) that can be used to upload user accounts.<br />
<br />
Excel translates passwords that begin with - (minus) or + (plus) as zero. Even when saving as .csv and saying "Yes" to "Keep this format, and leave out any incompatible features." Check for this before uploading, as a zero halts the upload process.<br />
<br />
If you use a formula in Excel to create fields (for example, the concatenate function to create a user name), then remember to copy the cells with the formula and use special paste with values checked to make them into an acceptable data for a csv file.<br />
<br />
The upload will also fail if you have trailing spaces at the end of your data fields. Often, this can not be removed with a simple Find " " and Replace with "". If information has been copied from web sources than it is possible to include non-breaking spaces which will prevent your upload from being completed correctly. To find these invisible spaces, use the Find and Replace function in Excel. In the find field, hold alt and type 0160. Leave the replace field blank. <br />
<br />
===Country===<br />
The country should be written as a two letter code, in capitals. For example, use BE for Belgium or NL for the Netherlands. Using "be" or "nl" as a country code will result in a database error.<br />
:''Tip:'' If you are having trouble working out the two-letter code for a country, you can consult the list of [http://www.iso.org/iso/country_names_and_code_elements country names and code elements] available on the ISO Website. A common error is to use UK for United Kingdom; it should be GB.<br />
<br />
===Field size limits===<br />
Some fields have maximum character lengths. Typically the file will import to the preview list screen but not finish the process. Turn on debug to see the fields that are too long. Common fields to cause problems are "Institution" which is limited to 40 characters, and "City", also limited (20 characters). The error will be "User not added - error".<br />
<br />
===Time zones===<br />
<br />
The entry is case sensitive so Europe/London will work but europe/london will not.<br />
<br />
===All fields listed here===<br />
:All the fields that are valid are listed below, except for any custom fields you may have created. <br />
firstname, lastname, username, email, city, country, lang, timezone, mailformat, maildisplay, maildigest, htmleditor, ajax, autosubscribe ,institution, department, idnumber, skype , msn, aim, yahoo, icq, phone1, phone2, address, url, description, descriptionformat, password, auth, oldusername , deleted, suspended, course1, course2, course3, course4<br />
<br />
===Enroll users to Cohorts (system groups)===<br />
You can enroll users to any Cohort (system level group) by using only the "username" and the "Cohort ID".<br />
Here is a sample CSV file:<br />
<br />
'''username,cohort1'''<br />
teacher1,system-teachers<br />
teacher2,system-teachers<br />
teacher3,system-teachers<br />
<br />
Make sure you set "Upload type" to "Update existing users only" (So you are not asked to add firstname, lastname and email fields too)<br />
<br />
== See also ==<br />
* [http://youtu.be/PFGLZnuu_JI Adding users by using a CSV in Moodle] MoodleBites video on YouTube<br />
*[[Flat file]] enrolment<br />
* [[User profile fields]] for details of how to include data about custom user profile fields in the upload users file<br />
* [[Upload courses]]<br />
<br />
Using Moodle forum discussions:<br />
*[http://moodle.org/mod/forum/discuss.php?d=36851 Can I auto enroll from Excel?]<br />
*[http://moodle.org/mod/forum/discuss.php?d=97903 Uploading users to custom roles]<br />
*[http://moodle.org/mod/forum/discuss.php?d=181259 User upload option: standardise usernames]<br />
*[http://moodle.org/mod/forum/discuss.php?d=144569 Matriculacion con flat file csv] - discussion in Spanish<br />
<br />
[[fr:Importer des utilisateurs]]<br />
[[ja:ユーザのアップロード]]<br />
[[de:Nutzerliste hochladen]]<br />
[[es:Subir usuarios]]</div>Johnokhttps://docs.moodle.org/31/en/index.php?title=Import_questions&diff=120254Import questions2015-10-09T08:28:57Z<p>Johnok: Document support for Essay questions</p>
<hr />
<div>{{Managing questions}}<br />
Moodle has a number of different formats that can be used to import questions into [[Question bank]] categories and as [[Adding a question page|lesson question pages]]. These include some proprietary quiz software formats, as well as text files and Moodle formats. <br />
<br />
==Importing questions from an existing file==<br />
It is possible to import questions from a file on your network/computer or from a file that has been saved or uploaded into your course files. The underlying [[Import_questions#Character_encoding|character encoding]] of this file is important.<br />
<br />
Note: Moodle XML format is the recommended import question type format as it enables the maximum amount of question data (such as question feedback) to be imported.<br />
<br />
=== Question bank import process ===<br />
The question bank allows you a great deal of flexibility when importing questions. To import questions into Moodle's [[Question bank]], use the Questions link in the course administration and select the import tab. In most versions of Moodle it is also possible to get to this screen (produced by ../question/import.php) while editing an existing quiz.<br />
<br />
[[Image:Questions import 197.png|thumb|center|Import question formats from the import tab]].<br />
<br />
*Select import tab<br />
*Select the question type to import<br />
*General: pick the category, determine if the context and category information that maybe contained in a GIFT or XML file should be used. <br />
*Select what should happen if there are no grades or an error is detected in the import process.<br />
*Determine the file to import<br />
**Import from file upload. Use the browse function to import a file from your computer. Use the "Upload this file" button to import the questions.<br />
**Import from file already in course files. A popup window will take you to the course files start page. Use the "Import from this file" button.<br />
<br />
[[Image:Question bank import file gen import 1.png|thumb|center|General and import file parameters sections]]<br />
<br />
===Lesson module process===<br />
The question types that can be imported from the Quiz questions bank into a lesson are the following:<br />
Matching, Multichoice, Numerical, Short answer, True/false, Essay.<br />
<br />
''Note: Since Moodle 2.8 it is possible to import images in question answers and responses when importing questions, as it is now possible to add images to lesson question answers and responses. See MDL-38540."<br />
<br />
The Description and Cloze questions can '''not''' be imported from Quiz questions bank into a lesson <br />
[[Image:Lesson Import question types.png|thumb|center|Lesson screen asking which file type will be imported]]<br />
<br />
[[Lesson module|Lesson]] can only import from a file located on the teachers computer.<br />
*In edit, using the expanded view<br />
*Select the position where questions should be inserted into the lesson<br />
*Click on the Import question link between the pages.<br />
*Select the file type<br />
*Use the browse function to find the file on your computer<br />
*Import the selected file.<br />
<br />
==Question import formats==<br />
<br />
=== [[GIFT]] === <br />
Moodle 'proprietary' text format for import and export. Reasonably comprehensive.<br />
<br />
The [https://moodle.org/plugins/pluginversions.php?plugin=qformat_giftmedia GIFT with medias optional plugin] is an import format similar to Gift and uses the same syntax, but instead of a text file it imports a zip file containing the gift text file and media files (images, sounds, ...).<br />
<br />
=== [[Moodle XML format|Moodle XML]] ===<br />
Moodle 'proprietary' xml format for import and export. Very comprehensive.<br />
<br />
====How do you create XML files to enable import of images?====<br />
Discussion: http://moodle.org/mod/forum/discuss.php?d=181211<br />
=====OPTION 1=====<br />
Check out http://www.slideshare.net/tjuly/adding-images-to-moodle-quiz-and-import-via-xml<br />
<br />
This describes a use of a text to XML conversion process using http://vletools.com/questions/quiz <br />
<br />
Please add any further comments here:<br />
<br />
=====OPTION 2=====<br />
<br />
=== [[Aiken]] === <br />
This format is an easy way of writing multiple-choice questions for import.<br />
<br />
=== Blackboard === <br />
It's possible to import both .dat files containing just questions text or zip archives containing questions and associated medias (images, sounds, ...).<br />
<br />
If your questions contains images they are imported too.<br />
<br />
Also both Blackboard POOL and QTI files are supported.<br />
<br />
Questions produced with TestGen and Examview softwares and saved as Blackboard files are imported.<br />
<br />
If the zip archives contains several resources files all questions from all files are imported. "Undeployed" Blackboard quiz are also supported.<br />
<br />
Follow these steps to import questions:<br />
<br />
1. Create a quiz with questions in Examview Test Generator v. 6.2.1 or another question generator able to save questions as Blackboard files like TestGen.<br />
<br />
2. Export the quiz to Blackboard 6.0-7.0 format.<br />
<br />
3. From the ''Settings'' tab for your course choose ''Question bank'' and then ''Import''. Make sure you use the Blackboard format.<br />
<br />
'''NOTE:''' Some tutorials on the web explain that you need to edit files to re-link images. '''This is no more needed'''. Images are imported without any editing.<br />
<br />
==== Importing questions in different categories ====<br />
<br />
If you check the "Get category from file" option during import, the category name for each resource file will be extracted for the resource file and created if necessary.<br />
<br />
If "Get category from file" is unchecked, all questions will be imported in the current category.<br />
<br />
==== Other alternative method to import Blackboard questions files ====<br />
There is an alternative to the Blackboard format to import questions saved as Blackboard files.<br />
[https://m.app.box.com/view_shared/a9c6nd920sq0aa2ba2ul MoodleXMLBuilder]. discussed below in [https://docs.moodle.org/23/en/Import_questions#See_also See Also] can also be used to convert ExamView exports to Moodle XML. <br />
Images are supported and included within the Moodle XML when using [https://m.app.box.com/view_shared/a9c6nd920sq0aa2ba2ul MoodleXMLBuilder]..<br />
<br />
If you decide to use MoodleXMLBuilder to convert your Blackboard zip file to a Moodle XML file, rather than use the recommended method to directly import your zip file using the Blackboard format (see above), here is how to do it:<br />
<br />
1. Create a quiz with questions in Examview Test Generator v. 6.2.1 or another question generator able to save questions as Blackboard files like TestGen.<br />
<br />
2. Export the quiz to Blackboard 6.0-7.0 format<br />
<br />
3. Use the aforementioned [https://m.app.box.com/view_shared/a9c6nd920sq0aa2ba2ul MoodleXMLBuilder] to convert from '''ExamView Export to Blackboard 6.0-7.0''' into the XML format that Moodle accepts.<br />
<br />
4. From the ''Settings'' tab for your course choose ''Question bank'' and then ''Import''. Make sure you use the Moodle XML format. You may also need to set ''Stop on error'' to ''No''.<br />
<br />
FYI To install MoodleXMLBuilder you may need to be logged into an administrator account or select "Run as administrator" from the right-click menu. You'll also need java and you will need to run the MoodleXMLBuilder.exe application from its install directory (the installer doesn't seem to create a Start menu entry). For Windows 7 it was C:\Program Files (x86)\MoodleXMLBuilder\MoodleXMLBuilder.exe.<br />
<br />
=== Course Test Manager === <br />
This format enables you to import questions from the Course Test Manager from Course Technology.<br />
<br />
=== [[Embedded Answers (Cloze) question type|Embedded Answers (Cloze)]] === <br />
This format is a multiple question, multiple answer question with embedded answers. They can be a bit tricky to develop, but they are a unique way of asking questions.<br />
<br />
=== Examview === <br />
ExamView 4 supported an XML export format that Moodle can import.<br />
<br />
Follow these steps to import questions from ExamView 4.0.8<br />
<br />
1. Create a new test using ExamView<br />
<br />
2. After selecting the types of questions and how many of each Click on File - Export – Change Save As Type to ExamView XML<br />
<br />
3. After creating the export of your ExamView test login to your Moodle site<br />
<br />
4. Go to the course you wish to add the quiz to and Turn Editing On<br />
<br />
5. Scroll down to the topic or week you wish to add a Quiz Click add an activity – highlight quiz, Enter a name and introduction for the quiz and any other applicable information.<br />
<br />
6. Click save and display<br />
<br />
7. Editing quiz - click Edit then Import, click the radio button next to ExamView<br />
<br />
8. Browse to the location you saved the file highlight and click open, then click the upload this file button.<br />
<br />
9. Review the questions imported, click continue, click on Quiz, select all and click add to quiz<br />
<br />
10. Save Changes, click on the preview tab view the test and the quiz is ready.<br />
<br />
If you are using a newer version of ExamView, you should export your questions from Examview choosing the Blackboard format:<br />
<br />
1. In ExamView choose one of the two Blackboard export options, either Blackboard option can be imported into Moodle, however it is recommended to choose the Blackboard 7.1+ option<br />
<br />
2. Save the zip archive ExamView creates<br />
<br />
3. Import this zip file in Moodle using "Blackboard V6+" format. see the above paragraph about the Blackboard V6+ import format for more informations.<br />
<br />
===[[Hot Potatoes]]===<br />
A freeware program that can export questions into Moodle. In order to import Hot Potatoes questions into a Moodle quiz, the administrator must first install the [https://moodle.org/plugins/view.php?plugin=mod_hotpot Hotpot module] and the [https://moodle.org/plugins/view.php?plugin=qformat_hotpot Hotpot question import]<br />
<br />
----<br />
<br />
'''Note 1'''.- All types of Hot Potatoes question types can be imported into Moodle, but ''JCross'' and ''JMix'' questions will be changed to Short Answer questions.<br />
<br />
*Can be imported into the ''Quiz questions'' bank:<br />
**Cloze questions (''JCloze''); <br />
**Match questions (''JMatch''); <br />
**Multiple Choice questions (''JQuiz'')<br />
**Short Answer questions (''JQuiz'', ''JCross'' and ''JMix'')<br />
<br />
*Can be imported into Moodle's ''Lesson'' module:<br />
**Match questions (''JMatch''); <br />
**Multiple Choice questions (''JQuiz'')<br />
<br />
'''Note 2'''.- For Hot Potatoes' Multiple Choice question type (''JQuiz''), the ''Multiple-choice'' ''Short answer'' and ''Multi-select'' question-type will imported as they are. ''Hybrid'' questions will be imported as ''MultiChoice'' questions, i.e. they will not start as Short Answer questions and then change to Multiple Choice questions after several wrong responses.<br />
<br />
===[[Missing word question format|Missing word]]===<br />
This format is only used for multiple choice questions and short answer questions, similar to GIFT.<br />
<br />
=== [[WebCT format]] === <br />
<br />
The WebCT format is able to import a number of WebCT question types: shortanswer, multichoice single answer and multichoice multiple answers, calculated and essays (that WebCT calls "paragraph" questions.) It can also import webCT zip files containing questions and images embedded in questions.<br />
<br />
'''Caution:''' Keep in mind that WebCT allows more than one "blank" per short answer question, whereas, Moodle will only accommodate one blank per question. Questions that used multiple short answers in a question will not convert successfully.<br />
<br />
Here are some examples of Multiple Choice and Short answer questions in a text file:<br />
<br />
<pre><br />
# Start of question: Short Answer Question<br />
:TYPE:S:<br />
:TITLE:Short Answer Question<br />
:QUESTION:H<br />
What is the name of the WebCT Learning Hub?<br />
<br /><br />
:IMAGE:dotcomLogoc.gif<br />
:ANSWERS:1<br />
:CASE:0<br />
:ANSWER1:WebCT.com:100:0:20:0<br />
:FEEDBACK1:H<br />
Be sure to visit the Learning Hub\: www.WebCT.com<br />
:CAT:Default<br />
# End of question: Short Answer Question<br />
<br />
<br />
<br />
# Start of question: Multiple Choice Question<br />
:TYPE:MC:1:0:C<br />
:TITLE:Multiple Choice Question<br />
:FEEDBACK<br />
Darwin invented the theory of evolution and created Darwinism.<br />
:QUESTION:H<br />
Where is the Darwin Research Center?<br />
:IMAGE:<br />
:LAYOUT:vertical<br />
:ANSWER1:0:H<br />
Menlo Park, California<br />
:REASON1:H<br />
Sorry!<br />
:ANSWER2:0:H<br />
Vancouver, Canada<br />
:REASON2:H<br />
Sorry!<br />
:ANSWER3:100:H<br />
Galapagos Islands, Ecuador<br />
:REASON3:H<br />
Correct Answer!<br />
:ANSWER4:0:H<br />
London, England<br />
:REASON4:H<br />
Sorry!<br />
:ANSWER5:0:H<br />
Sidney, Australia<br />
:REASON5:H<br />
Sorry!<br />
:CAT:Default<br />
# End of question: Multiple Choice Question<br />
<br />
</pre><br />
<br />
=== [[Word table format]] === <br />
This format supports importing all question types (except calculated) from structured tables in Microsoft Word files. <br />
Creating, editing and managing large numbers of questions is much easier in an external Word file than maintaining them one at a time inside Moodle.<br />
<br />
The contributed plugin is not a standand part of Moodle, but is available in the Moodle Plugins Directory at [http://moodle.org/plugins/view.php?plugin=qformat_wordtable Moodle2Word Word table import/export].<br />
<br />
==Importing from other programs==<br />
=== Diploma 6 ===<br />
Diploma 6 also supports an XML export format that Moodle can import. If you are using a newer version of Diploma, here are the steps to export from Diploma and import to Moodle. The steps are the same as those for Blackboard(see above).<br />
*Export from Diploma with the Blackboard LS 6.0 – 6.2 format. <br />
*Import the .zip file using the Blackboard format. The images are imported at the same time.<br />
<br />
===Old formats===<br />
*AON -This format is the same as the missing word format, except it creates matching questions from the multiple choice questions. Please note that from Moodle 1.8 it will no longer be part of the standard Moodle.<br />
<br />
== Character encoding ==<br />
<br />
It is important that the imported file is encoded in the [http://en.wikipedia.org/wiki/UTF-8 UTF-8] standard.<br />
<br />
If this is not adhered to you may get import errors and/or strange characters in the imported materials. If the file is not UTF-8, an external tool must be used to change the encoding. Note that if only basic 'latin' characters are used, then the coding issue can generally be ignored. Be particularly careful when creating questions using Microsoft Word. For reasons best known to themselves, Microsoft used their own encoding for some characters (incompatible with UTF-8) and this is likely to break the import.<br />
<br />
:''Note:''If you are having problems with the first question (or category modifier) in the file being misinterpreted (this particularly applies to GIFT format) it might be your editor adding a "Byte-Order-Mark" character at the beginning of the file. This is particularly common in Windows programs (e.g. Notepad) and is another good reason to steer clear of Microsoft products for text editing (as apposed to word processing). There are plenty of free or low cost text editors available for download. The BOM is neither recommended or required as UTF8 does not have [http://en.wikipedia.org/wiki/Byte-order_mark byte order issues].<br />
<br />
==Match grades==<br />
<br />
Imported grades must '''exactly''' match one of the fixed list of valid grades, as follows:<br />
<br />
100, 90, 80, 75, 70, 66.666, 60, 50, 40, 33.333, 30, 25, 20, 16.666, 14.2857, 12.5, 11.111, 10, 5, 0<br />
<br />
negative values of the above list are also permitted.<br />
<br />
There are two settings for this switch. They affect how the import routine treats values that do not exactly match one of the values in the above list<br />
<br />
* Error if grade not listed - If a question contains any grades not found in the list an error is displayed and that question will not be imported.<br />
* Nearest grade if not listed - If a grade is found that does not match a value in the list, the grade is changed to the closest matching value in the list<br />
<br />
Note: some custom import formats write directly to the database and may bypass this check.<br />
<br />
==Tips and tricks==<br />
<br />
*''TIP:'' It may be easier and faster to type many questions into a '''single text file''', than to create a series of Quiz or Lesson question pages. Some teachers report that once they master creating questions in one of the formats to import, they do not have to wait for their Moodle site screen to refresh and the process of selecting the next question type to create. <br />
*''TIP:'' Want to use questions from your quiz in a '''Lesson'''? Export the question category in say a GIFT format, then use a text editor to delete questions, or perhaps use a search and replace function to change names or places.<br />
<br />
== See also ==<br />
* [http://vletools.com Moodle XML Converter] Convert your questions online into Moodle XML format. Allows to create questions from existing textfiles that should to be preformatted in a simple way. Supports TeX formulas, HTML and image embedded questions. Also can generate *.txt file from Moodle XML in case you need to export your questions in textfile. <br />
* [https://m.app.box.com/view_shared/a9c6nd920sq0aa2ba2ul MoodleXMLBuilder] converts commonly-used test generator output into Moodle XML. MoodleXMLBuilder currently supports converting tests and question banks created in Blackboard, ExamView, TestGen, and EZTest. Images are fully supported within all question fields where images are allowed within the Moodle quiz module.<br />
* The help button link next to the import file button gives a lot of detail about each format in a popup window.<br />
* Using Moodle [http://moodle.org/mod/forum/discuss.php?d=51316 escaping problem in gift import?] forum discussion<br />
* [[Converting files to UTF-8]]<br />
* [[Import and export FAQ]]<br />
* [http://moodle.org/mod/forum/user.php?id=726938&course=5 Eoin Campbell is working on a XSLT based import/export module for Word] - stay tuned! <br />
* [http://www.moodle2word.net website for converting Moodle Questions into tables in a Microsoft Word file, and vice versa].<br />
* Using Moodle [http://moodle.org/mod/forum/discuss.php?d=202101 GIFT import - default grade] forum discussion <br />
* [https://sites.google.com/site/cq4mgenerator/home Calculated Question for Moodle Generator] website that describes the use of a spreadsheet to generate Calculated Questions using all mathematical functions, a tool that empowers teachers to quickly design large question banks with calculated questions.<br />
<br />
[[Category:Questions]]<br />
<br />
[[de:Fragen importieren]]<br />
[[es:Importar preguntas]]<br />
[[eu:Galderak_inportatu]]<br />
[[fr:Importer des questions]]<br />
[[ja:問題のインポート]]</div>Johnokhttps://docs.moodle.org/31/en/index.php?title=MNet&diff=116038MNet2014-11-20T08:40:41Z<p>Johnok: Fix up more outdated instructions for turning networking on</p>
<hr />
<div>{{Authentication}}<br />
The Moodle network feature allows a Moodle administrator to establish a link with another Moodle or a Mahara site and to share some resources with the users of that Moodle. Users go from the first Moodle to the linked site via the [[Network servers block]].<br />
<br />
[[File:Networkserversexample.png]]<br />
<br />
<br />
==Overview==<br />
The initial release of MNet is bundled with a Authentication Plugin, which makes single-sign-on between Moodles possible. A user with the username <em>jody</em> logs in to her Moodle server as normal, and clicks on a link that takes her to a page on another Moodle server. Normally, she would have only the privileges of a guest on the remote Moodle, but behind the scenes, single-sign-on has established a fully authenticated session for Jody on the remote site.<br />
<br />
'''WARNING:''' MNet requires the use of '''xmlrpc'''. Please go to your phpinfo page if you are interested in using this and search for --with-xmlrpc. If your php has not been compiled with xmlrpc then you need to address that first! At present it appears that PEAR xmlrpc will not work.<br />
[[Image:Administration Block Users Authentication MoodleNetwork.jpg|thumb|MNet setting in ''Admin > User > Authentication > Moodle Network]]<br />
<br />
==Security==<br />
The MNet feature requires that your server has the '''Curl''' and '''OpenSSL''' extensions installed. Your system will generate a OpenSSL certificate for encrypted communication with other Moodles, and will rotate encryption keys on a monthly basis (approx).<br />
<br />
Communication takes place over an XML-RPC transport, and the XML-RPC documents are wrapped first in an XMLDSIG (XML digital signature) envelope, and then in an XMLENC (XML encryption) envelope. The encryption all happens within PHP, and does not require an https (Apache SSL) server.<br />
<br />
References:<br />
*[http://www.w3.org/TR/xmldsig-core/ XML Digital Signatures]<br />
*[http://www.w3.org/TR/xmlenc-core/ XML Encryption]<br />
<br />
A special mode can be enabled which would allow a machine with a specified IP address to make calls to the XML-RPC layer without using either encryption or signature envelopes. This mode is provided to enable Moodle to communicate with other software systems in which the integration of signatures and encryption might be prohibitively difficult. It is not envisioned that unencrypted inter-Moodle networking will ever be enabled.<br />
<br />
==Peer to Peer Network==<br />
<br />
This is the basic layout of the system. It can be very useful to run one Moodle per faculty or departments, each with its own user management, and yet permit users to roam across the Moodle installs... subject to permissions of course. <br />
<br />
===Setup===<br />
<br />
The instructions will cover 2 Moodle installations: MoodleA and MoodleB. Both are installed correctly and have never had a Moodle Network configuration.<br />
<br />
Note: If you experience problems, ensure debugging is turned on in ''Administration > Site administration > Server > Debugging''. Extra diagnostic messages may be displayed.<br />
<br />
You need to first enable Networking in ''Administration > Site administration > Advanced Features''. This will add the "Networking" menu to the Site Administration menu.<br />
<br />
# Get them to talk to each other<br />
## Ensure ''Administration > Site administration > Server > Environment'' indicates you have curl installed<br />
## If MoodleA and MoodleB are hosted in the same domain, ensure they have a different cookie prefix. Note that changing the cookie prefix will log you out! You can change the cookie prefix via ''Admin > Server > Session Handling''.<br />
## On both, go to ''Administration > Site administration > Advanced Features'' and turn Networking ON.<br />
## On MoodleA go to ''Administration > Site administration > Network > Manage peers'' - put the URL of MoodleB under "Add New Host" and click Add. The URL should include the directory where your Moodle code is located and may include the protocol as well, for example ''https://www.mymoodle.org/moodle''.<br />
## Do the equivalent on MoodleB.<br />
# Get user roaming going<br />
[http://moodle.org/mod/forum/discuss.php?d=141491] ). On both servers: <br />
### Go to ''Administration > Site administration > Plugins > Authentication > Manage authentication''. Enable ''MNet Authentication'' by clicking the 'enable' icon.<br />
## On MoodleA go to ''Administration > Site administration > Networking > (Manage) Peers'', click on 'MoodleB', and click on the 'Services' tab. Enable SSO-IDP (SSO Identity Provider) publish and subscribe, and SSO-SP (SSO Service Provider) publish and subscribe.<br />
## Do the equivalent on MoodleB. (By both publishing and subscribing you allow users to move freely between the two servers. By only publishing or subscribing between servers you create a one way traversal)<br />
## On both, go to ''Administration > Site administration > Users > Permissions > Define Roles'', only roles that have "Roam to a remote Moodle moodle/site:mnetlogintoremote" will be allowed to roam. Grant the privilege as appropriate.<br />
### eg. enabling for ''Authenticated user'' allows any authenticated user to roam between servers.<br />
## On both servers, go to the homepage, and add the 'Network Servers' block.<br />
## To test, it is recommended to use a different browser (even on a different machine) that is logged in to neither. Login to MoodleA with a non-administrator account that has the permissions to roam. You should see the Network Servers block, and clicking on it you should go to MoodleB with a newly autocreated account. <br />
# Get remote enrolments going -- this is optional. It allows an administrator of MoodleB to enrol users that are "native" to MoodleB in remote courses in MoodleA, and viceversa.<br />
## On both, go to ''Site administration > Plugins > Enrolments > Manage enrol plugins'' and enable Moodle Network enrolment plugin (click Save). Click on 'Edit' and enable 'allow_allcourses' or select some courses or categories to be remotely enrolled.<br />
## On the server you want to receive enrolments:<br />
### Go to ''Site administration > Plugins > Enrolments > Manage enrol plugins''. Enable ''MNet remote enrolments'' by clicking the 'enable' icon. (For ''MNet remote enrolments'' settings info see [[MNet_remote_enrolments|MNet remote enrolments]])<br />
## On MoodleA go to ''Admin > Network > Peers'', click on 'MoodleB', and click on the 'Services' tab. Enable Enrolment publish and/or subscribe.<br />
## Do the equivalent on MoodleB.<br />
## On every course you want to allow enrolments into:<br />
### Enter course and go to ''Administration > Course administration > Users > Enrolment methods''<br />
### From ''Add method'' drop-down select ''MNet remote enrolments''<br />
### On the new screen select the ''Remote host'' you want to allow enrolments from, the Role for the enrolled users, and click save. (Note: you can only add a single ''MNet remote enrolments'' method per course.)<br />
<br />
===Using it===<br />
<br />
# In MoodleA go to ''Admin > Networking > Remote enrolments client''. You will see MoodleB listed. Click on ''Edit enrolments'' button beside MoodleB and you will see a list of courses that MoodleB offers for remote enrolment. Click 'Edit enrolments'', select the users you want to enroll, and then click Add to enroll them in the course.<br />
<br />
==Connecting to a Mnet hub==<br />
A Mnet hub (do not confuse it with the [[Community hub]]) is a Moodle server that is configured to accept connections from other Moodle servers, and to provide a set of services to users of these other servers. This guideline will direct you to connect to a Mnet hub, assess the services it has to offer, and enable those services for your users.<br />
<br />
===Setup===<br />
# Get talking to the Hub<br />
## Ensure that the ''Admin > Server > Environment'' page indicates you have curl and openssl installed<br />
## Go to ''Admin > Advanced Features'' and turn Networking on<br />
## Go to ''Admin > Network > Peers'' and enter the URL of Mnet Hub under "Add New Host". Click <em>Add</em><br />
## The host details for the Mnet Hub should appear with the Site Name field already populated. Click <em>Save changes</em><br />
## The details will be written to your database and two new tabs will appear in this window: 'Services' and 'Logs'. Click <em>Services</em><br />
##A list of services will appear, each with a checkbox for 'publish' and 'subscribe'. Check the checkboxes for any services you want to publish or subscribe to<br />
<br />
===Using it===<br />
If the Mnet Hub has already enabled a service for you, there will be a tick alongside the appropriate checkbox, for example: if the Hub is <em>publishing</em> Moodle Networked Enrolment, then a tick will appear alongside the <em>subscribe</em> checkbox for this service. Note that in order to enable some functionality, prominently <em>single-sign-on</em>, you may have to <em>publish</em> a service, e.g. the <em>Identity Provider</em> service. The Mnet Hub will access this service on your Moodle, asking it to authenticate your users.<br />
# Enable Roaming<br />
## Subscribe to <em>SSO (Service Provider)</em> by checking the box<br />
## Publish <em>SSO (Identity Provider)</em> by checking the box<br />
## Click <em>Save changes</em><br />
## Go to ''Admin > Users > Permissions > Define Roles'', and grant the capability <em>Roam to a remote Moodle moodle/site:mnetlogintoremote</em> to an appropriate role<br />
## Go to ''Administration > Plugins > Authentication > Manage authentication'' and enable the <em>Moodle Network authentication</em> plugin<br />
## Go to your homepage, turn on editing, and add the 'Network Servers' block<br />
## Using a different web-browser, log on as a non-admin user who inhabits the role you granted the roaming capability to<br />
## Note that the Mnet Hub is listed in the Network Servers block on the homepage. Click on the link to that server<br />
## Some of your user details will be transferred to the Mnet Hub server, and a browsing session will be started for you as if you had logged on there directly<br />
# Enable Networked Enrolment<br />
## Return to the web browser you've been using as the site administrator<br />
## Go to ''Admin > Network > Peers'' and click on the entry for the Mnet Hub.<br />
## Click on the Services tab<br />
## Subscribe to <em>Moodle Networked Enrolment</em><br />
## Go to ''Site administration > Plugins > Enrolments > Manage enrol plugins'' and enable the <em>Moodle Network enrolment</em> plugin. Click <em>Save changes</em><br />
## Click on <em>edit</em> to view the details for networked enrolments.<br />
## Go to ''Admin > Networking > Enrolments'' to see a list of Moodle servers that offer this service to you<br />
## Click on a server name to view a list of courses that the server offers to your users<br />
## Click on a course name, to view a list users that you can enrol in this course<br />
## Enrol users<br />
## Profit!<br />
<br />
==Running a Mnet hub==<br />
A Mnet hub is a regular Moodle site that runs in a special mode. As a Moodle Administrator, when you add another Moodle site to your list of network peers, your Moodle will contact that site to find out what it is called, and to request its public key for encrypted communication. Normally, the remote server will simply provide this information without making any record of the transaction.<br />
<br />
A Mnet hub is different. As soon as you add an entry for a Mnet hub to your system, the Mnet hub will create an entry for your server in its list of hosts, and may immediately begin to offer services to the users of your site.<br />
<br />
This section will guide you to set up a Mnet hub, and select services to offer to all comers.<br />
<br />
===Setup===<br />
Enable Networking<br />
# Ensure that the ''Settings > Site administration > Server > Environment'' page indicates you have curl and openssl installed<br />
# Go to ''Settings > Site administration > Advanced Features'' and turn Networking on <br />
# Go to ''Settings > Site administration > Network > Peers'' and tick the checkbox for <em>Register all hosts</em>. Click on <em>Save Changes</em><br />
# On the same page, the first entry in your list of hosts should be <em>All hosts</em>. Click this link<br />
# Click on <em>Services</em> and enable any services you want to offer to all comers<br />
<br />
==Assigning the role of admin==<br />
<br />
For security reasons, users cannot be assigned the role of admin via the Moodle interface. Instead, admin user IDs must be listed in config.php e.g. <code>$CFG->siteadmins = '2,45,67';</code><br />
<br />
Note: This applies to local admins as well as remote admins, as this overrides any local DB stored settings that assign administrative permissions.<br />
<br />
==See also==<br />
<br />
* [[Moodle Network FAQ]]<br />
* [[Upload users]] for csv upload using the ''mnethostid'' field.<br />
* [[Development:Moodle Network|Moodle Network development notes]]<br />
* Using Moodle [http://moodle.org/mod/forum/view.php?id=6976 MNet forum]<br />
* Using Moodle [http://moodle.org/mod/forum/discuss.php?d=92749 Examples of how people are using Moodle networks] forum discussion<br />
<br />
[[Category:Enrolment]]<br />
[[Category:MNet]]<br />
<br />
[[fr:Réseau Moodle]]<br />
[[ja:Moodleネットワーク]]<br />
[[es:Red Moodle]]<br />
[[cs:Síťové služby]]<br />
[[de:Moodle-Netzwerk]]</div>Johnokhttps://docs.moodle.org/31/en/index.php?title=MNet&diff=116037MNet2014-11-20T08:30:44Z<p>Johnok: Fix up outdated instructions for turning networking on</p>
<hr />
<div>{{Authentication}}<br />
The Moodle network feature allows a Moodle administrator to establish a link with another Moodle or a Mahara site and to share some resources with the users of that Moodle. Users go from the first Moodle to the linked site via the [[Network servers block]].<br />
<br />
[[File:Networkserversexample.png]]<br />
<br />
<br />
==Overview==<br />
The initial release of MNet is bundled with a Authentication Plugin, which makes single-sign-on between Moodles possible. A user with the username <em>jody</em> logs in to her Moodle server as normal, and clicks on a link that takes her to a page on another Moodle server. Normally, she would have only the privileges of a guest on the remote Moodle, but behind the scenes, single-sign-on has established a fully authenticated session for Jody on the remote site.<br />
<br />
'''WARNING:''' MNet requires the use of '''xmlrpc'''. Please go to your phpinfo page if you are interested in using this and search for --with-xmlrpc. If your php has not been compiled with xmlrpc then you need to address that first! At present it appears that PEAR xmlrpc will not work.<br />
[[Image:Administration Block Users Authentication MoodleNetwork.jpg|thumb|MNet setting in ''Admin > User > Authentication > Moodle Network]]<br />
<br />
==Security==<br />
The MNet feature requires that your server has the '''Curl''' and '''OpenSSL''' extensions installed. Your system will generate a OpenSSL certificate for encrypted communication with other Moodles, and will rotate encryption keys on a monthly basis (approx).<br />
<br />
Communication takes place over an XML-RPC transport, and the XML-RPC documents are wrapped first in an XMLDSIG (XML digital signature) envelope, and then in an XMLENC (XML encryption) envelope. The encryption all happens within PHP, and does not require an https (Apache SSL) server.<br />
<br />
References:<br />
*[http://www.w3.org/TR/xmldsig-core/ XML Digital Signatures]<br />
*[http://www.w3.org/TR/xmlenc-core/ XML Encryption]<br />
<br />
A special mode can be enabled which would allow a machine with a specified IP address to make calls to the XML-RPC layer without using either encryption or signature envelopes. This mode is provided to enable Moodle to communicate with other software systems in which the integration of signatures and encryption might be prohibitively difficult. It is not envisioned that unencrypted inter-Moodle networking will ever be enabled.<br />
<br />
==Peer to Peer Network==<br />
<br />
This is the basic layout of the system. It can be very useful to run one Moodle per faculty or departments, each with its own user management, and yet permit users to roam across the Moodle installs... subject to permissions of course. <br />
<br />
===Setup===<br />
<br />
The instructions will cover 2 Moodle installations: MoodleA and MoodleB. Both are installed correctly and have never had a Moodle Network configuration.<br />
<br />
Note: If you experience problems, ensure debugging is turned on in ''Administration > Site administration > Server > Debugging''. Extra diagnostic messages may be displayed.<br />
<br />
You need to first enable Networking in ''Administration > Site administration > Advanced Features''. This will add the "Networking" menu to the Site Administration menu.<br />
<br />
# Get them to talk to each other<br />
## Ensure ''Administration > Site administration > Server > Environment'' indicates you have curl installed<br />
## If MoodleA and MoodleB are hosted in the same domain, ensure they have a different cookie prefix. Note that changing the cookie prefix will log you out! You can change the cookie prefix via ''Admin > Server > Session Handling''.<br />
## On both, go to ''Administration > Site administration > Network > Settings'' and turn Networking ON.<br />
## On MoodleA go to ''Administration > Site administration > Network > Manage peers'' - put the URL of MoodleB under "Add New Host" and click Add. The URL should include the directory where your Moodle code is located and may include the protocol as well, for example ''https://www.mymoodle.org/moodle''.<br />
## Do the equivalent on MoodleB.<br />
# Get user roaming going<br />
[http://moodle.org/mod/forum/discuss.php?d=141491] ). On both servers: <br />
### Go to ''Administration > Site administration > Plugins > Authentication > Manage authentication''. Enable ''MNet Authentication'' by clicking the 'enable' icon.<br />
## On MoodleA go to ''Administration > Site administration > Networking > (Manage) Peers'', click on 'MoodleB', and click on the 'Services' tab. Enable SSO-IDP (SSO Identity Provider) publish and subscribe, and SSO-SP (SSO Service Provider) publish and subscribe.<br />
## Do the equivalent on MoodleB. (By both publishing and subscribing you allow users to move freely between the two servers. By only publishing or subscribing between servers you create a one way traversal)<br />
## On both, go to ''Administration > Site administration > Users > Permissions > Define Roles'', only roles that have "Roam to a remote Moodle moodle/site:mnetlogintoremote" will be allowed to roam. Grant the privilege as appropriate.<br />
### eg. enabling for ''Authenticated user'' allows any authenticated user to roam between servers.<br />
## On both servers, go to the homepage, and add the 'Network Servers' block.<br />
## To test, it is recommended to use a different browser (even on a different machine) that is logged in to neither. Login to MoodleA with a non-administrator account that has the permissions to roam. You should see the Network Servers block, and clicking on it you should go to MoodleB with a newly autocreated account. <br />
# Get remote enrolments going -- this is optional. It allows an administrator of MoodleB to enrol users that are "native" to MoodleB in remote courses in MoodleA, and viceversa.<br />
## On both, go to ''Site administration > Plugins > Enrolments > Manage enrol plugins'' and enable Moodle Network enrolment plugin (click Save). Click on 'Edit' and enable 'allow_allcourses' or select some courses or categories to be remotely enrolled.<br />
## On the server you want to receive enrolments:<br />
### Go to ''Site administration > Plugins > Enrolments > Manage enrol plugins''. Enable ''MNet remote enrolments'' by clicking the 'enable' icon. (For ''MNet remote enrolments'' settings info see [[MNet_remote_enrolments|MNet remote enrolments]])<br />
## On MoodleA go to ''Admin > Network > Peers'', click on 'MoodleB', and click on the 'Services' tab. Enable Enrolment publish and/or subscribe.<br />
## Do the equivalent on MoodleB.<br />
## On every course you want to allow enrolments into:<br />
### Enter course and go to ''Administration > Course administration > Users > Enrolment methods''<br />
### From ''Add method'' drop-down select ''MNet remote enrolments''<br />
### On the new screen select the ''Remote host'' you want to allow enrolments from, the Role for the enrolled users, and click save. (Note: you can only add a single ''MNet remote enrolments'' method per course.)<br />
<br />
===Using it===<br />
<br />
# In MoodleA go to ''Admin > Networking > Remote enrolments client''. You will see MoodleB listed. Click on ''Edit enrolments'' button beside MoodleB and you will see a list of courses that MoodleB offers for remote enrolment. Click 'Edit enrolments'', select the users you want to enroll, and then click Add to enroll them in the course.<br />
<br />
==Connecting to a Mnet hub==<br />
A Mnet hub (do not confuse it with the [[Community hub]]) is a Moodle server that is configured to accept connections from other Moodle servers, and to provide a set of services to users of these other servers. This guideline will direct you to connect to a Mnet hub, assess the services it has to offer, and enable those services for your users.<br />
<br />
===Setup===<br />
# Get talking to the Hub<br />
## Ensure that the ''Admin > Server > Environment'' page indicates you have curl and openssl installed<br />
## Go to ''Admin > Network > Settings'' and turn Networking on<br />
## Go to ''Admin > Network > Peers'' and enter the URL of Mnet Hub under "Add New Host". Click <em>Add</em><br />
## The host details for the Mnet Hub should appear with the Site Name field already populated. Click <em>Save changes</em><br />
## The details will be written to your database and two new tabs will appear in this window: 'Services' and 'Logs'. Click <em>Services</em><br />
##A list of services will appear, each with a checkbox for 'publish' and 'subscribe'. Check the checkboxes for any services you want to publish or subscribe to<br />
<br />
===Using it===<br />
If the Mnet Hub has already enabled a service for you, there will be a tick alongside the appropriate checkbox, for example: if the Hub is <em>publishing</em> Moodle Networked Enrolment, then a tick will appear alongside the <em>subscribe</em> checkbox for this service. Note that in order to enable some functionality, prominently <em>single-sign-on</em>, you may have to <em>publish</em> a service, e.g. the <em>Identity Provider</em> service. The Mnet Hub will access this service on your Moodle, asking it to authenticate your users.<br />
# Enable Roaming<br />
## Subscribe to <em>SSO (Service Provider)</em> by checking the box<br />
## Publish <em>SSO (Identity Provider)</em> by checking the box<br />
## Click <em>Save changes</em><br />
## Go to ''Admin > Users > Permissions > Define Roles'', and grant the capability <em>Roam to a remote Moodle moodle/site:mnetlogintoremote</em> to an appropriate role<br />
## Go to ''Administration > Plugins > Authentication > Manage authentication'' and enable the <em>Moodle Network authentication</em> plugin<br />
## Go to your homepage, turn on editing, and add the 'Network Servers' block<br />
## Using a different web-browser, log on as a non-admin user who inhabits the role you granted the roaming capability to<br />
## Note that the Mnet Hub is listed in the Network Servers block on the homepage. Click on the link to that server<br />
## Some of your user details will be transferred to the Mnet Hub server, and a browsing session will be started for you as if you had logged on there directly<br />
# Enable Networked Enrolment<br />
## Return to the web browser you've been using as the site administrator<br />
## Go to ''Admin > Network > Peers'' and click on the entry for the Mnet Hub.<br />
## Click on the Services tab<br />
## Subscribe to <em>Moodle Networked Enrolment</em><br />
## Go to ''Site administration > Plugins > Enrolments > Manage enrol plugins'' and enable the <em>Moodle Network enrolment</em> plugin. Click <em>Save changes</em><br />
## Click on <em>edit</em> to view the details for networked enrolments.<br />
## Go to ''Admin > Networking > Enrolments'' to see a list of Moodle servers that offer this service to you<br />
## Click on a server name to view a list of courses that the server offers to your users<br />
## Click on a course name, to view a list users that you can enrol in this course<br />
## Enrol users<br />
## Profit!<br />
<br />
==Running a Mnet hub==<br />
A Mnet hub is a regular Moodle site that runs in a special mode. As a Moodle Administrator, when you add another Moodle site to your list of network peers, your Moodle will contact that site to find out what it is called, and to request its public key for encrypted communication. Normally, the remote server will simply provide this information without making any record of the transaction.<br />
<br />
A Mnet hub is different. As soon as you add an entry for a Mnet hub to your system, the Mnet hub will create an entry for your server in its list of hosts, and may immediately begin to offer services to the users of your site.<br />
<br />
This section will guide you to set up a Mnet hub, and select services to offer to all comers.<br />
<br />
===Setup===<br />
Enable Networking<br />
# Ensure that the ''Settings > Site administration > Server > Environment'' page indicates you have curl and openssl installed<br />
# Go to ''Settings > Site administration > Advanced Features'' and turn Networking on <br />
# Go to ''Settings > Site administration > Network > Peers'' and tick the checkbox for <em>Register all hosts</em>. Click on <em>Save Changes</em><br />
# On the same page, the first entry in your list of hosts should be <em>All hosts</em>. Click this link<br />
# Click on <em>Services</em> and enable any services you want to offer to all comers<br />
<br />
==Assigning the role of admin==<br />
<br />
For security reasons, users cannot be assigned the role of admin via the Moodle interface. Instead, admin user IDs must be listed in config.php e.g. <code>$CFG->siteadmins = '2,45,67';</code><br />
<br />
Note: This applies to local admins as well as remote admins, as this overrides any local DB stored settings that assign administrative permissions.<br />
<br />
==See also==<br />
<br />
* [[Moodle Network FAQ]]<br />
* [[Upload users]] for csv upload using the ''mnethostid'' field.<br />
* [[Development:Moodle Network|Moodle Network development notes]]<br />
* Using Moodle [http://moodle.org/mod/forum/view.php?id=6976 MNet forum]<br />
* Using Moodle [http://moodle.org/mod/forum/discuss.php?d=92749 Examples of how people are using Moodle networks] forum discussion<br />
<br />
[[Category:Enrolment]]<br />
[[Category:MNet]]<br />
<br />
[[fr:Réseau Moodle]]<br />
[[ja:Moodleネットワーク]]<br />
[[es:Red Moodle]]<br />
[[cs:Síťové služby]]<br />
[[de:Moodle-Netzwerk]]</div>Johnokhttps://docs.moodle.org/31/en/index.php?title=Grades_FAQ&diff=115952Grades FAQ2014-11-13T03:40:13Z<p>Johnok: Change sum of grades to Natural</p>
<hr />
<div>{{Grades}}<br />
== General ==<br />
<br />
===How can I change how grades are displayed?===<br />
<br />
Grades may be displayed as as actual grades, as percentages (in reference to the minimum and maximum grades) or as letters.<br />
<br />
The default grade display type for the site is set by an administrator in ''Administration > Grades > [[Grade item settings]]''. However, this may be changed at course level.<br />
<br />
To change how grades are displayed for particular [[Grade items|grade items]], or category and course summaries (called aggregations):<br />
<br />
# Follow the grades link in the Course administration block.<br />
# Select "Categories and items" from the gradebook dropdown menu.<br />
# Click the edit icon for the grade item, category total or course total.<br />
# From the Grade display type menu, select real (for actual grades), percentage or letter.<br />
# Click the "Save changes" button at the bottom of the page.<br />
<br />
Alternatively, to change how grades are displayed for the whole course:<br />
<br />
# Follow the grades link in the course administration block.<br />
# Select "Course settings" from the gradebook dropdown menu.<br />
# From the Grade display type menu, select real (for actual grades), percentage or letter.<br />
# Click the "Save changes" button.<br />
<br />
===How can I hide entered grades until a specified date?===<br />
<br />
To set a "Hidden until" date:<br />
<br />
#Access the course gradebook via the grades link in the course administration block.<br />
#Select "Categories and items" from the gradebook dropdown menu.<br />
#Click on the edit icon opposite the activity for which a "Hidden until" date is to be set.<br />
#On the edit grade item page, ensure that advanced settings are displayed. (Click the "Show advanced" button if not.)<br />
#Enable the "Hidden until" setting by unchecking the disable checkbox, then set a date.<br />
#Click the "Save changes" button.<br />
<br />
=== Is it possible to show the teachers/administrators' grades in the grader report? ===<br />
Yes, at the site level you can define which roles will appear in the grader report. This can be found in [[General_grade_settings#Graded_Roles|Administration > Grades > General settings]]. Also read [http://moodle.org/mod/forum/discuss.php?d=92612 this discussion] for some more ideas.<br />
<br />
===Why can't I change a grade within an assignment after changing it in the gradebook?===<br />
<br />
When you edit a grade directly in the gradebook, an "overridden" flag is set, meaning that the grade can no longer be changed from within the assignment.<br />
<br />
However, the flag can be removed by turning editing on in the [[Grader report|grader report]], then clicking the [[Grade editing|edit grade]] icon, unchecking the overridden box and saving the changes.<br />
<br />
===How do I get groups to show up in the grader report?===<br />
<br />
For groups to show up in the grader report, group mode should be set to visible or separate groups in the [[Course settings|course settings]]. This will result in a groups dropdown menu being displayed, enabling a teacher to view the grades of all participants, or only the grades for a selected group.<br />
<br />
===The quiz grades keep disappearing from the student view, even after I un-hide them!===<br />
<br />
Check your quiz settings. Under the '''Review options''' heading, in the '''Later, while the quiz is still open''' and/or the '''After the quiz is closed''' columns, you probably have Scores un-checked. Each time a student completes a quiz, these settings are consulted and the scores will be hidden from ''all'' students. If your students don't all take the quiz at the same time, it can look like quiz scores reset themselves to 'hidden' randomly, even after you un-hide them.<br />
<br />
===How can I make the gradebook simpler for teachers?===<br />
<br />
See [[Simplifying the gradebook by changing permissions]].<br />
<br />
==Grades and user removals==<br />
<br />
===What happens to gradebook data when a user is unenrolled from a course?===<br />
On re-enrolling, you can recover their grades from before: see [https://docs.moodle.org/24/en/Grade_settings#Recover_grades_default Recover grades on re-enrol]<br />
<br />
===What happens to gradebook data when a user is deleted from the Moodle site?===<br />
<br />
==Advanced grading==<br />
<br />
===Why can't I see the advanced grading option??===<br />
To see the option for Advanced grading, you first have to create an assignment and choose Advanced grading/Rubric from the gGading method dropdown. Advanced grading will then appear in ''Settings>Assignment administration.''<br />
===How can I allow teachers to save rubrics as templates for others?===<br />
Create a new role and assign it in the system context. Give this role the capability ''moodle/grade:sharegradingforms'' (for sharing as a template) and if desired ''moodle/grade:managesharedforms'' (for editing or deleting templates created by others) Assign this role to those teachers you wish to have this ability.<br />
<br />
===How do students see the Marking guide?===<br />
Assuming the teacher has allowed this in the [[Marking guide]] settings, the student may click "submissions grading" under the assignment name in their navigation block:<br />
<br />
[[File:submissionsgrading.png]]<br />
<br />
===Why can't students see feedback when Blind Marking is used?===<br />
If you use '''Blind Marking''' to conceal student identities when assessing in the Assignment module, it waits until ''all'' submissions are marked, and '''Reveal student identities''' is clicked, to enter final grades into the Gradebook. Only at this point does it release Rubric marks/comments and inline feedback for student view (if Advanced Grading: Rubrics and Inline Comment Feedback are used in the Assignment).<br />
<br />
== Reports ==<br />
=== How do I create my own custom gradebook reports? ===<br />
Here is a [[Development:Gradebook_Report_Tutorial|tutorial]] explaining all the main steps involved.<br />
===How can I sort or change the order of column headings?===<br />
Go to Grades link, then select one of the "Category & items" actions from the pulldown on the top left. Use the move icon to change the position of the graded item. And/or you could create categories for the items and move them into a category so they will be grouped that way first.<br />
<br />
===How can I remove user ID numbers and/or email addresses from the grader report===<br />
<br />
Go to ''Settings > Site administration > Users > Permissions > [[Roles settings|User policies]]'' and untick the 'ID number' and/or 'email address' checkboxes for 'Show user identity'.<br />
<br />
Note that this will result in ID numbers and/or email addresses not being shown when searching for users and displaying lists of users. See the section 'Show user identity' in [[Roles settings]] for a list of locations where user identity fields are shown.<br />
<br />
=== How can I interpret the quiz report statistics?===<br />
<br />
See [https://docs.moodle.org/dev/Quiz_report_statistics Quiz report statistics] in the developers documentation.<br />
<br />
== Aggregation ==<br />
=== I can't find where to change the aggregation type for my gradebook categories! ===<br />
Each category has an aggregation type, which can be changed through that category's "edit" page. To access that page, you must use one of 2 ways:<br />
<br />
1. In the grader report, turn "Editing" on, then click the little "hand" icon next to the category whose aggregation you want to change<br />
2. In the "Edit categories and Items" page (accessible through the "choose an action" menu, top left), you see a tree view of the categories and items in your gradebook. The top category is the course category. Each category also has a "hand" icon, which leads to the category edit page<br />
<br />
=== How can I grade some of my activities without the results affecting my students' course total? ===<br />
#Go to Grades and choose the "Category and items" tab.<br />
#Add two [[Grade categories]], one for your "Graded activities" and one for your "Not graded activities". In the "Not graded activities" category choose "None" in grading type.<br />
#Ensure that "Aggregate including subcategories" (an option visible only in "full view") is unchecked for your top level course grade category.<br />
#If you want to completely hide the "Not graded activities" category from your students tick the "Hidden" icon too.<br />
#Save your changes.<br />
#Move all your normally graded activities into the "Graded activities" category.<br />
#Move all your excluded from grading activities into "Not graded activities" category.<br />
<br />
'''Note''': Following the above steps the not graded activities will be completely hidden from your students. So...<br />
<br />
*'''IF''' you want the activity grades of the "Not graded activities" category, to remain visible to your student without their grades affecting their course total, simply click the eye to show the "Not graded activities" category.<br />
<br />
*'''IF''' you want students to be able to see the activity grades and the category total of the "Not graded activities", then you have to let the category visible and also choose a grading type between value, scale or text, by editing the category. <br />
<br />
In this case you can exclude the "Not graded activities" from course total using the "Weighted mean of grades" aggregation method in Course category and assigning 100 weight to the "Graded activities" and 0 weight to the "Not graded activities".<br />
<br />
*'''IF''' you don't want to use grade categories, you can also exclude the grades of a specific activity by changing the "Multiplicator" (visible only in "full view") from 1.0 into 0.0.<br />
<br />
*Last, '''IF''' you want to exclude the grade of an activity only to one or some specific students, then follow these steps:<br />
#From the grader report "Turn editing on"<br />
#Click the "Edit grade" icon of the activity of the student you want to exclude.<br />
#In the Edit grade page, check the tick box next to the "Excluded" option and "Save changes".<br />
<br />
=== My student completed only one activity out of 5, but his course total shows 100%. How do I show a more "progressive" course total? ===<br />
<br />
==== Step-by-Step Explanation ====<br />
# From the view menu in the gradeboook, select "Categories and items"<br />
# At the top line there is a folder icon and an edit icon on the right, click the edit icon<br />
# You'll then see the title "Grade category," the 3rd item is "Aggregate only non-empty grades."<br />
# Uncheck this.<br />
# Save.<br />
<br />
==== Another Explanation ====<br />
By default, only non-empty grades are aggregated, the others are ignored. However, you can change this setting as well as others that affect the course total, by turning "Editing" on in the grader report, and clicking the "Edit" icon next to the course category (the very top row of the grader report).<br />
<br />
You can untick the box "Aggregate only non-empty grades" if you want to show a more "progressive" score for each student. Their empty grades will count as a 0 and will be counted in the course mean/total.<br />
<br />
If you prefer to show a sum of points, rather than a percentage, you can change the course category's aggregation method to "Natural".<br />
<br />
=== How can I display the average grade for my course categories (not grade categories)? ===<br />
In Moodle 1.9 there is no way to aggregate course totals within each category. The gradebook is course-centered, and there is currently no User Interface for showing grades within an entire course category at once.<br />
<br />
=== How can I setup weighted assignments? ===<br />
See [[Using "Weighted Mean of Grades" to weight categories containing assignments]].<br />
<br />
=== Why is the Category Total blank for one of my categories? ===<br />
One possibility is that you accidentally entered some grades into the Category Total column and then erased them. When you do that, an override flag gets set and then the totals won't calculate. Here's how to check, and fix it:<br />
<br />
# Go to the [[Grader report]] view of the gradebook.<br />
# Click the "Turn editing on" button for the gradebook. (There's a separate one for the gradebook from the one on the main page.)<br />
# Find the box for the problem category and the first student affected.<br />
# Click on the icon of a gear *in that box*.<br />
# See if the box marked "[[Grade_editing#Overridden|Overridden]]" (third line down) is checked. If it is, uncheck it. <br />
# Repeat (4) and (5) for each student affected,<br />
<br />
== Categories ==<br />
=== How many depths of categories/subcategories can I create? ===<br />
There is no programmatic limit, but there are practical limits. Very deeply nested structures are difficult to manage. 3 levels of categories should be sufficient for most situations. Note that there is always at least one level of categories, since the Course category always encompasses all other categories and grade items, can cannot be deleted.<br />
<br />
=== I can't find setting X in the grade category edit page! Where is it? ===<br />
If a setting documented on the [[Grade categories]] page does not appear on your edit page, it may mean that it is set globally in your site. See [[Grade_category_settings#Forcing_settings|Forcing settings]] for more information.<br />
<br />
== Outcomes ==<br />
=== I want to set up an outcome item for my course. What are the steps required? ===<br />
#The site administrator needs to have enabled outcomes via ''Administration>Site Administration > Advanced Features >Enable Outcomes'' <br />
#In your course, go to ''Administration>Course administration>Grades>Scales'' and create the scale you need.<br />
#[[Scales#Creating_a_new_scale|Create a scale]]<br />
#In Administration>Course administration>Outcomes, create a course outcome assigning it to the scale you just created.<br />
#Read the [[Outcomes| outcomes documentation]] for instructions).<br />
#You can now give your students a rating on the outcome dimension you just created. If you created a standard outcome, you will be able to use it in other courses and follow your students' performance across these courses.<br />
<br />
===How can I remove an outcome from an activity?===<br />
<br />
An outcome can be removed from an activity by deleting it on the gradebook edit categories and items page. This results in the outcomes being deselected on the update activity page.<br />
<br />
== Modules ==<br />
=== The activity module (Module name) doesn't support grading. How can I give my students a grade anyway? ===<br />
You can create a [[Grade_items#Manual_grade_items|grade item]] manually in the gradebook. You will have to grade your students through the [[Grader report]] interface (in editing mode).<br />
<br />
=== I just graded some of my students using the (Module name) interface, but the results aren't showing up in the grader report. What's going on? ===<br />
Here are some of the possible reasons:<br />
#The site settings>Grades>General settings may not have the correct graded roles checked off to appear in grade book. If you see no students in the Gradebook but do see columns for the graded activities, then check the graded role settings. <br />
#The corresponding [[Grade items|grade item]] is [[Grade_locking#In_grade_items|locked]], or its parent [[Grade categories|category]] is [[Grade_locking#In_grade_categories|locked]].<br />
#The module code is not using the [[Development:Grades#API_for_communication_with_modules.2Fblocks|gradebook API]] correctly<br />
<br />
=== I just created a new assignment with the "Grade" setting set to "No grade", but it still appears in the gradebook ===<br />
The reason is that the gradebook is now the place where both numerical and textual types of feedback are recorded for all activity modules. The word "Grading" in assignment relates only to numerical grades, but the ability to give text feedback remains, and must be recorded in the gradebook. This is why a grade item is created for it. You can hide the grade item if you do not want it to appear in the user reports.<br />
<br />
==Weights and extra credits==<br />
<br />
===How do weighted grades influence the category or course total?===<br />
A weight (also called coefficient) only has meaning in reference to other weights. If you only have one grade item, changing its weight will not have any effect. However, if you have two grade items, each with a different weight, the "heavier" item will have more influence on the total grade than the "lighter" one.<br />
<br />
You can set the weights to any positive numerical value you choose. Usually, at least one of the weights will be 1 and serve as the baseline for other weights. If another item has a weight of 2, its grades will be multiplied by 2 compared with the grades of the first grade item, before being averaged. The denominator used for averaging is the sum of all the weights.<br />
<br />
An example follows:<br />
item 1 weight: 1<br />
item 2 weight: 3<br />
item 3 weight: 0.5<br />
<br />
item 1 grade: 40/100<br />
item 2 grade: 60/100<br />
item 3 grade: 20/100<br />
<br />
Calculation: <br />
total = ((40 * 1) + (60 * 3) + (20 * 0.5)) / (1 + 3 + 0.5)<br />
= (40 + 180 + 10) / (4.5)<br />
= 230 / 4.5<br />
= 51.11<br />
<br />
The total for this category will then be 51.11 out of 100<br />
<br />
===Do I have to put a value in each "weight" input box?===<br />
No. If you do not put a value, it will default to 1. If all items are set to 1 then they all have equal weight. If you set a weight to 0, the item's grades will not count at all in the category or course average.<br />
<br />
===Do all the weights have to add up to 100 or some similar value?===<br />
No, the numbers you put as weights are completely arbitrary. They must be positive numbers, and can add up to anything you want. Note however that the following four sets of weights are identical in value:<br />
<br />
(1 1.75 3)<br />
(4 7 12)<br />
(8 14 24)<br />
(400 700 1200)<br />
<br />
===What is the difference between Weight and Extra Credit?===<br />
Weight is only available with "Weighted mean of grades". For the "Simple weighted mean of grades", the weight is taken from the grade item's maximum grade. A weight is used to give a grade item more or less importance in the computation of the category total or average, compared with the other items of the same category.<br />
<br />
Extra credit replaces grade item weight if the aggregation method is "Mean of grades (with extra credits)", "Natural", or "Simple weighted mean of grades". The effect of extra credit is different in each case, hence some confusion:<br />
<br />
*Mean of grades (with extra credits): A value of 0 does nothing. Any other value is used to multiply the grade and add it to the total after the computation of the mean. This grade is not used in the computation of the mean, however, only added afterwards. Additionally, this cannot bring the category total over its maximum grade unless grades over 100% are enabled by the site administrator (since 1.9.5). This grade item is not counted either in the denominator used to compute the category mean.<br />
<br />
*Natural: Extra credit is a checkbox, not a number. Normally, with Natural, the category's maximum grade is the sum of the maximum grades of all its grade items. If one of them is set as "Extra Credit", however, its maximum grade is not added to the category's maximum grade, but its grades will be. This way it is possible to achieve maximum grade (or grades over maximum if enabled by the site administrator) in the category without getting the maximum grade in all the grade items.<br />
<br />
*Simple weighted mean of grades: Extra credit is a checkbox, not a number. The "Extra Credit" grades are counted in the numerator used to compute the category mean, but not the denominator. See [[Category_aggregation#Simple_weighted_mean|here]] for more information.<br />
<br />
===How do I create an assignment for which students can receive a grade higher than the maximum?===<br />
<br />
In Moodle 1.9.5 onwards, a new [[Grade_settings#Unlimited_grades|unlimited grades]] setting in ''Administration > Grades > General settings'' enables administrators to allow teachers to enter grades over 100% directly in the gradebook.<br />
<br />
===Why can't I enter a grade higher than the maximum?===<br />
<br />
First, check with your administrators to make sure the [[Grade_settings#Unlimited_grades|unlimited grades]] setting is turned on. If that is not the problem, you might be using [[Gradebook_report_settings#Quick_grading_and_quick_feedback|quick grading]]. If that is the problem, you can still enter grades higher than the maximum this way:<br />
<br />
# Go to the Moodle gradebook "Grader Report" page.<br />
# Use the button in the upper right to "Turn editing on" if it is not already on.<br />
# In the upper right corner of each box for entering the grade, there should be an icon of a gear. Click on that.<br />
# On the "Edit grade" screen that comes up, there's a box for "Final grade". You should be able to enter any number of points into that, even if it's more than the maximum. (If this is an "[[Grade_items#Activity-based_grade_items|Activity-based grade item]]" such as an Assignment or a Quiz, then you may also have to check the "[[Grade_editing#Overridden|Overridden]]" checkbox.)<br />
<br />
If you expect a lot of students to get extra credit, it's probably better to make it a separate grade item and mark it as extra credit instead, or else [[Grade_import|import]] the grades from a spreadsheet.<br />
<br />
==Formulas==<br />
<br />
===How do I give a fixed score for a successful quiz attempt===<br />
<br />
Suppose you want to give 5 points for a passing grade (say, 40) in a certain quiz (which has a maximum score of 100). Possible scenario ([http://moodle.org/mod/forum/discuss.php?d=148576]): extra credit points to every student that gets a "passing grade" in a "practice test" at the end of each chapter covered in the course, to encourage them to practice after the homework quizzes and to get familiar with a "test type" situation before the actual test.<br />
<br />
The following formula should do the trick:<br />
<br />
=min(round((||quiz||/40)-0.49,0),1)*5<br />
<br />
The formula may be added to a designated grade item or category. <br />
<br />
Sample calculations:<br />
Score 40 (pass):<br />
=min(round((40/40)-0.49,0),1)*5<br />
=min(round(1-0.49,0),1)*5<br />
=min(round(0.51,0),1)*5<br />
=min(1,1)*5<br />
=1*5<br />
=5<br />
<br />
Score 39 (not pass):<br />
=min(round((39/40)-0.49,0),1)*5<br />
=min(round(0.975-0.49,0),1)*5<br />
=min(round(0.485,0),1)*5<br />
=min(0,1)*5<br />
=0*5<br />
=0<br />
<br />
Score 100 (pass):<br />
=min(round((100/40)-0.49,0),1)*5<br />
=min(round(2.5-0.49,0),1)*5<br />
=min(round(2.01,0),1)*5<br />
=min(2,1)*5<br />
=1*5<br />
=5<br />
<br />
==See also==<br />
<br />
*Gradebook Scenarios/Use Cases [https://docs.moodle.org/en/experimental:_gb_tutoring]<br />
*Using Moodle [http://moodle.org/mod/forum/view.php?id=2122 Gradebook forum]<br />
<br />
Using Moodle forum discussions:<br />
*[http://moodle.org/mod/forum/discuss.php?d=123143 Excluding practice quizzes from gradebook]<br />
*[http://moodle.org/mod/forum/discuss.php?d=193705 Course total not sum of max grade column?]<br />
*[https://moodle.org/mod/forum/discuss.php?d=167596 Why do only certain items have multiplicator & offset boxes?]<br />
*[https://moodle.org/mod/forum/discuss.php?d=235640 Extra credit]<br />
*[https://moodle.org/mod/forum/discuss.php?d=269534#unread Change grading method only for some students]<br />
<br />
[[Category:FAQ]]<br />
<br />
[[ca:PMF de les qualificacions]]<br />
[[de:Bewertungen FAQ]]<br />
[[es:Calificaciones FAQ]]<br />
[[fr:FAQ des notes]]<br />
[[ja:評定FAQ]]</div>Johnokhttps://docs.moodle.org/31/en/index.php?title=Grader_report_LAE&diff=115855Grader report LAE2014-11-10T07:26:57Z<p>Johnok: Change sum of grades to Natural</p>
<hr />
<div>{{Infobox plugin<br />
|type = Report, Grader report LAE<br />
|entry = https://moodle.org/plugins/view.php?plugin=gradereport_laegrader<br />
|tracker = https://github.com/bobpuffer/moodle-gradereport_laegrader/issues<br />
|discussion = https://moodle.org/mod/forum/discuss.php?d=153718<br />
|maintainer = [[User:Bob Puffer|Bob Puffer]]<br />
|float = right<br />
}}<br />
<br />
Note:'''LAE''' stands for ''Lots of Additional Enhancements''.<br />
<br />
This is a new plugin, and a quick start to some docs. Please add as you wish.<br />
<br />
#On the plugins database: https://moodle.org/plugins/view.php?plugin=gradereport_laegrader<br />
#In the forums, some help: https://moodle.org/mod/forum/discuss.php?d=254137<br />
#On GIT: https://github.com/bobpuffer/moodle-gradereport_laeuser<br />
<br />
==What this does==<br />
<br />
<br />
==Features, advantages and benefits==<br />
"We know that students perform better given clear expectations and immediate and constant feedback because they feel they are more in control of the ultimate outcome. When students feel in control of their college outcome they stick around to graduate. This is what the new LAE User student grade report is all about" (Lifted from Bob's post in the thread mentioned above.<br />
<br />
==LAEgrader Report Overview==<br />
The LAEgrader report takes the place of the Grader report as the grades repository interface for the instructor for the course. It is based off from, and shares many library functions and classes with the Grader report. Therefore, the Grader report directory on your Moodle installation cannot be removed. The most notable difference between the LAEgrader and Grader is that the LAEgrader freezes both the column headers (grade item titles) and the student rows, while still allowing the user to scroll vertically and horizontally.<br />
<br />
==LAEgrader Report Installation==<br />
1. Download the LAEgrader report from https://github.com/bobpuffer/laegrader/archive/master.zip.<br />
2. (If zipped) unzip the contents of the zip file and change the name of the unzipped folder from laegrader-master to laegrader.<br />
3. Place all contents of the grade/report/laegrader folder in the grade/report folder of your Moodle installation (you should then have a grade/report/laegrader folder)<br />
4. Under Site administration block run Notifications.<br />
5. Check to see that your permissions for your various roles are as you desire. It is recommended that access to the regular Grader report be set to "Prohibit" to avoid confusion. The admin will always see both reports.<br />
<br />
==User Configurable settings==<br />
* Height in pixels of scrollable portion of LAE grader report (300,340,380,420,460,500,540,580,620,660,700,740,780,820,860,900). Each increment represents roughly one student line.<br />
* Accurate points calculation on or off (see below).<br />
<br />
The defaults for these options can be set at site level by going to Administration->Grades->Report settings->LAE grader report.<br />
<br />
==Layout Differences From Grader Report==<br />
LAE Grader report in non-editing mode<br />
* Grade item and category headers are all on one line, not nested. LAEgrader does not collapse or expand categories.<br />
* LAEgrader allows wrapping of grade item and grade category names (at approximately 30 characters) to avoid excessively wide reports<br />
* Category items always follow the items contained in the category<br />
* All items (including the category column) included in a category are color-coded the same to group them together, alternately orange/blue<br />
* The last column is always the Course Total.<br />
* Items not contained in a category have a background of white as does the Course Total.<br />
* Hidden items and categories are gray.<br />
* If your gradebook exceeds 95% of the width of the document page, a horizontal scrollbar will be applied at the bottom. If the height of the number of student rows to display exceeds the user-configurable height a vertical scrollbar will be displayed. Whenever the grades are scrolled, either horizontally or vertically, the grade item titles )and optionally, range and average rows) will remain fixed as will the student columns (including "id", if displayed). This is the biggest difference between the LAE and core gradebooks. It negates the need for mouseover descriptions of which student and which item on which you're currently working.<br />
* Rows added such as 'range' or 'average' are placed at the top (instead of the bottom) and are frozen along with the grade item titles row so the user never loses sight of them.<br />
<br />
==Functionality Enhancements==<br />
A. Letter and Percentage Input: Whenever the user is editing grades they have the option of inputting a "real" number, a letter grade or a percentage grade. A letter will be compared against the letter grade setup for the course (configurable Grade letters) and will be converted to 1 point less than the maximum available for that letter grade. Percentage grades will be converted to the input percentage times the maximum grade earnable for that item.<br />
B. "Dump to Google" button: A button is provided above the student names column to allow quick "dumps" of LAE grader report contents. The data is exported in a format that facilitates calculations and checking of grades in Google (or Excel).<br />
C. Accurate Points Calculation: Unless Natural aggregation method is used, Moodle's core gradebook does not automatically maintain accurate category and course points totals. LAE maintains these on the fly (if $CFG->accuratetotals is chosen) without making changes in the values stored in Moodle's grades tables. There are also instances when the core gradebook's lack of maintaining accurate totals affects percentage and letter grade calculations. LAE corrects those.<br />
NOTE: to maintain the enhancements inside the report "plugin" the accurately calculated points for categories will not be reflected in the Categories and Items screen (unless you request Luther's hack for that).<br />
<br />
==Problems==<br />
Grades not submitting. Similar problems exist for existing Moodle gradebook). If you're using suhosin to harden your PHP you should set suhosin.post.max_vars four times the columns times the rows of your anticipated largest gradebook.<br />
If you're using PHP 5.3.9 you need a line like:<br />
php_value max_input_vars XXXXX<br />
<br />
where XXXXX is a similar calculation as above with suhosin.<br />
<br />
[[Category:Add-on]]<br />
[[Category:Report]]<br />
<br />
[[es:Reporte Calificador MMM (Mucho Muy Mejorado)]]</div>Johnokhttps://docs.moodle.org/31/en/index.php?title=LAEGrader_report&diff=115854LAEGrader report2014-11-10T07:26:44Z<p>Johnok: Change sum of grades to Natural</p>
<hr />
<div>{{Grades}}<br />
{{Infobox plugin<br />
|type = Grade report<br />
|entry = http://clamp-it.org<br />
|tracker = Enter the Tracker CONTRIB component link<br />
|discussion = https://moodle.org/mod/forum/discuss.php?d=153718<br />
|maintainer = [[User:Bob Puffer|Bob Puffer]]<br />
|float = right<br />
}}<br />
<br />
The LAEgrader report page is an alternative main teacher view of the gradebook in Moodle 1.9. LAEgrader is not designed for versions prior to 1.9.<br />
<br />
If installed, the report can be seen in ''Course administration>Grades''<br />
<br />
==LAEgrader Report Overview==<br />
The LAEgrader report takes the place of the Grader report as the grades repository interface for the instructor for the course. It is based off from, and shares many library functions and classes with the Grader report. Therefore, the Grader report directory on your Moodle installation cannot be removed. The most notable difference between the LAEgrader and Grader is that the LAEgrader freezes both the column headers (grade item titles) and the student rows, while still allowing the user to scroll vertically and horizontally.<br />
<br />
==LAEgrader Report Installation==<br />
# Download the LAEgrader report from https://github.com/bobpuffer/laegrader.git. It is bundled with the LAE version of Moodle but can be extracted and used alone without other LAE enhancements.<br />
# (If zipped) unzip the contents of the zip file.<br />
# Place all contents of the grade/report/laegrader folder in the grade/report folder of your Moodle installation (you should then have a grade/report/laegrader folder)<br />
# Under Site administration block run Notifications.<br />
# Check to see that your permissions for your various roles are as you desire. It is recommended that access to the regular Grader report be set to "Prohibit" to avoid confusion. The admin will always see both reports.<br />
<br />
==User Configurable settings==<br />
* Height in pixels of scrollable portion of LAE grader report (300,340,380,420,460,500,540,580,620,660,700,740,780,820,860,900). Each increment represents roughly one student line.<br />
* Accurate points calculation on or off (see below).<br />
* Width of column text.<br />
<br />
==Display==<br />
===Layout Differences From Grader Report===<br />
[[Image:laegrader_normal_mode.png|right|thumb|LAE Grader report in non-editing mode]]<br />
* Grade item and category headers are all on one line, not nested. LAEgrader does not collapse or expand categories.<br />
* LAEgrader allows wrapping of grade item and grade category names (at approximately 30 characters) to avoid excessively wide reports<br />
* Category items always follow the items contained in the category<br />
* All items (including the category column) included in a category are color-coded the same to group them together, alternately orange/blue<br />
* The last column is always the Course Total. <br />
* Items not contained in a category have a background of white as does the Course Total. <br />
* Hidden items and categories are gray.<br />
* '''Grades scroll both horizontally and vertically without losing view of the students column or the grade item header rows.''' This is the biggest difference between the LAE and core gradebooks. It negates the need for mouseover descriptions of which student and which item on which you're currently working.<br />
* Rows added such as 'range' or 'average' are placed at the top (instead of the bottom) and are frozen along with the grade item titles row so the user never loses sight of them.<br />
<br />
==Functionality Enhancements Beyond the Core Gradebook==<br />
===Letter and Percentage Input===<br />
Whenever the user is editing grades they have the option of inputting a "real" number, a letter grade or a percentage grade. A letter will be compared against the letter grade setup for the course (configurable [[Grade letters]]) and will be converted to 1 point less than the maximum available for that letter grade. Percentage grades will be converted to the input percentage times the maximum grade earnable for that item.<br />
<br />
==="Dump to Google" button===<br />
A button is provided above the student names column to allow quick "dumps" of LAE grader report contents. The data is exported in a format that facilitates calculations and checking of grades in Google (or Excel, if you have to).<br />
<br />
===Filters for Groupings===<br />
If a group is chosen which doesn't have access to all grade items, those grade items are not displayed in the LAE Grader report.<br />
<br />
===Accurate Points Calculation===<br />
Unless Natural aggregation method is used, Moodle's core gradebook does not automatically maintain accurate category and course points totals. LAE maintains these on the fly (if $CFG->accuratetotals is chosen) without making changes in the values stored in Moodle's grades tables. There are also instances when the core gradebook's lack of maintaining accurate totals affects percentage and letter grade calculations. LAE corrects those. Examples of issues caused by the core gradebook not maintaining accurate point totals include:<br />
# When multiple SWM categories are nested in another category with differing total actual points the expected outcome is each point will be counted the same. When 100 points is left for each category total, (the default for the core gradebook) the result is each category is counted the same, regardless of the value of the contained item points -- a point in one category is not worth the same as a point in another category.<br />
# Though teachers can update the maximum points for categories and course totals they'd need to do this continually throughout the duration of the course, after each grade item is marked.<br />
# With a set 100 points being the maximum, what is reported as the “grade” is nothing different than percentage and has no additional value.<br />
<br />
NOTE: to maintain the enhancements inside the report "plugin" the accurately calculated points for categories will not be reflected in the Categories and Items screen (unless you request Luther's hack for that). Additionally, an accurate points version of the User report is available so students see what makes sense to them.<br />
<br />
==Problems==<br />
===Grades not submitting===<br />
(Similar problems exist for existing Moodle gradebook). If you're using suhosin to harden your PHP you should set suhosin.post.max_vars four times the columns times the rows of your anticipated largest gradebook.<br />
<br />
If you're using PHP 5.3.9 you need a line like:<br />
php_value max_input_vars XXXXX<br />
where XXXXX is a similar calculation as above with suhosin (we use 20000).<br />
<br />
==See also==<br />
*[[Edit grade calculation]]<br />
*[[Grade preferences]]<br />
*[http://www.youtube.com/watch?v=EB58W3KePBc Video showing the basic gradebook setup and use]<br />
*[http://www.youtube.com/watch?v=jWPUEqdhI4A Video showing how to change the display of grades in the gradebook]<br />
*[http://www.youtube.com/watch?v=5hrLNbifiGQ Video explaining the different gradebook reports]<br />
<br />
Using Moodle forum discussions:<br />
*[http://moodle.org/mod/forum/discuss.php?d=153718 Initial announcement and discussion on LAEgrader report]<br />
<br />
[[Category:Contributed code]]</div>Johnokhttps://docs.moodle.org/31/en/index.php?title=Grades_FAQ&diff=115851Grades FAQ2014-11-10T04:43:17Z<p>Johnok: Change sum of grades to Natural</p>
<hr />
<div>{{Grades}}<br />
== General ==<br />
<br />
===How can I change how grades are displayed?===<br />
<br />
Grades may be displayed as as actual grades, as percentages (in reference to the minimum and maximum grades) or as letters.<br />
<br />
The default grade display type for the site is set by an administrator in ''Administration > Grades > [[Grade item settings]]''. However, this may be changed at course level.<br />
<br />
To change how grades are displayed for particular [[Grade items|grade items]], or category and course summaries (called aggregations):<br />
<br />
# Follow the grades link in the Course administration block.<br />
# Select "Categories and items" from the gradebook dropdown menu.<br />
# Click the edit icon for the grade item, category total or course total.<br />
# From the Grade display type menu, select real (for actual grades), percentage or letter.<br />
# Click the "Save changes" button at the bottom of the page.<br />
<br />
Alternatively, to change how grades are displayed for the whole course:<br />
<br />
# Follow the grades link in the course administration block.<br />
# Select "Course settings" from the gradebook dropdown menu.<br />
# From the Grade display type menu, select real (for actual grades), percentage or letter.<br />
# Click the "Save changes" button.<br />
<br />
===How can I hide entered grades until a specified date?===<br />
<br />
To set a "Hidden until" date:<br />
<br />
#Access the course gradebook via the grades link in the course administration block.<br />
#Select "Categories and items" from the gradebook dropdown menu.<br />
#Click on the edit icon opposite the activity for which a "Hidden until" date is to be set.<br />
#On the edit grade item page, ensure that advanced settings are displayed. (Click the "Show advanced" button if not.)<br />
#Enable the "Hidden until" setting by unchecking the disable checkbox, then set a date.<br />
#Click the "Save changes" button.<br />
<br />
=== Is it possible to show the teachers/administrators' grades in the grader report? ===<br />
Yes, at the site level you can define which roles will appear in the grader report. This can be found in [[General_grade_settings#Graded_Roles|Administration > Grades > General settings]]. Also read [http://moodle.org/mod/forum/discuss.php?d=92612 this discussion] for some more ideas.<br />
<br />
===Why can't I change a grade within an assignment after changing it in the gradebook?===<br />
<br />
When you edit a grade directly in the gradebook, an "overridden" flag is set, meaning that the grade can no longer be changed from within the assignment.<br />
<br />
However, the flag can be removed by turning editing on in the [[Grader report|grader report]], then clicking the [[Grade editing|edit grade]] icon, unchecking the overridden box and saving the changes.<br />
<br />
===How do I get groups to show up in the grader report?===<br />
<br />
For groups to show up in the grader report, group mode should be set to visible or separate groups in the [[Course settings|course settings]]. This will result in a groups dropdown menu being displayed, enabling a teacher to view the grades of all participants, or only the grades for a selected group.<br />
<br />
===The quiz grades keep disappearing from the student view, even after I un-hide them!===<br />
<br />
Check your quiz settings. Under the '''Review options''' heading, in the '''Later, while the quiz is still open''' and/or the '''After the quiz is closed''' columns, you probably have Scores un-checked. Each time a student completes a quiz, these settings are consulted and the scores will be hidden from ''all'' students. If your students don't all take the quiz at the same time, it can look like quiz scores reset themselves to 'hidden' randomly, even after you un-hide them.<br />
<br />
===How can I make the gradebook simpler for teachers?===<br />
<br />
See [[Simplifying the gradebook by changing permissions]].<br />
<br />
==Grades and user removals==<br />
<br />
===What happens to gradebook data when a user is unenrolled from a course?===<br />
On re-enrolling, you can recover their grades from before: see [https://docs.moodle.org/24/en/Grade_settings#Recover_grades_default Recover grades on re-enrol]<br />
<br />
===What happens to gradebook data when a user is deleted from the Moodle site?===<br />
<br />
==Advanced grading==<br />
<br />
===Why can't I see the advanced grading option??===<br />
To see the option for Advanced grading, you first have to create an assignment and choose Advanced grading/Rubric from the gGading method dropdown. Advanced grading will then appear in ''Settings>Assignment administration.''<br />
===How can I allow teachers to save rubrics as templates for others?===<br />
Create a new role and assign it in the system context. Give this role the capability ''moodle/grade:sharegradingforms'' (for sharing as a template) and if desired ''moodle/grade:managesharedforms'' (for editing or deleting templates created by others) Assign this role to those teachers you wish to have this ability.<br />
<br />
===How do students see the Marking guide?===<br />
Assuming the teacher has allowed this in the [[Marking guide]] settings, the student may click "submissions grading" under the assignment name in their navigation block:<br />
<br />
[[File:submissionsgrading.png]]<br />
<br />
===Why can't students see feedback when Blind Marking is used?===<br />
If you use '''Blind Marking''' to conceal student identities when assessing in the Assignment module, it waits until ''all'' submissions are marked, and '''Reveal student identities''' is clicked, to enter final grades into the Gradebook. Only at this point does it release Rubric marks/comments and inline feedback for student view (if Advanced Grading: Rubrics and Inline Comment Feedback are used in the Assignment).<br />
<br />
== Reports ==<br />
=== How do I create my own custom gradebook reports? ===<br />
Here is a [[Development:Gradebook_Report_Tutorial|tutorial]] explaining all the main steps involved.<br />
===How can I sort or change the order of column headings?===<br />
Go to Grades link, then select one of the "Category & items" actions from the pulldown on the top left. Use the move icon to change the position of the graded item. And/or you could create categories for the items and move them into a category so they will be grouped that way first.<br />
<br />
===How can I remove user ID numbers and/or email addresses from the grader report===<br />
<br />
Go to ''Settings > Site administration > Users > Permissions > [[Roles settings|User policies]]'' and untick the 'ID number' and/or 'email address' checkboxes for 'Show user identity'.<br />
<br />
Note that this will result in ID numbers and/or email addresses not being shown when searching for users and displaying lists of users. See the section 'Show user identity' in [[Roles settings]] for a list of locations where user identity fields are shown.<br />
<br />
=== How can I interpret the quiz report statistics?===<br />
<br />
See [https://docs.moodle.org/dev/Quiz_report_statistics Quiz report statistics] in the developers documentation.<br />
<br />
== Aggregation ==<br />
=== I can't find where to change the aggregation type for my gradebook categories! ===<br />
Each category has an aggregation type, which can be changed through that category's "edit" page. To access that page, you must use one of 2 ways:<br />
<br />
1. In the grader report, turn "Editing" on, then click the little "hand" icon next to the category whose aggregation you want to change<br />
2. In the "Edit categories and Items" page (accessible through the "choose an action" menu, top left), you see a tree view of the categories and items in your gradebook. The top category is the course category. Each category also has a "hand" icon, which leads to the category edit page<br />
<br />
=== How can I grade some of my activities without the results affecting my students' course total? ===<br />
#Go to Grades and choose the "Category and items" tab.<br />
#Add two [[Grade categories]], one for your "Graded activities" and one for your "Not graded activities". In the "Not graded activities" category choose "None" in grading type.<br />
#Ensure that "Aggregate including subcategories" (an option visible only in "full view") is unchecked for your top level course grade category.<br />
#If you want to completely hide the "Not graded activities" category from your students tick the "Hidden" icon too.<br />
#Save your changes.<br />
#Move all your normally graded activities into the "Graded activities" category.<br />
#Move all your excluded from grading activities into "Not graded activities" category.<br />
<br />
'''Note''': Following the above steps the not graded activities will be completely hidden from your students. So...<br />
<br />
*'''IF''' you want the activity grades of the "Not graded activities" category, to remain visible to your student without their grades affecting their course total, simply click the eye to show the "Not graded activities" category.<br />
<br />
*'''IF''' you want students to be able to see the activity grades and the category total of the "Not graded activities", then you have to let the category visible and also choose a grading type between value, scale or text, by editing the category. <br />
<br />
In this case you can exclude the "Not graded activities" from course total using the "Weighted mean of grades" aggregation method in Course category and assigning 100 weight to the "Graded activities" and 0 weight to the "Not graded activities".<br />
<br />
*'''IF''' you don't want to use grade categories, you can also exclude the grades of a specific activity by changing the "Multiplicator" (visible only in "full view") from 1.0 into 0.0.<br />
<br />
*Last, '''IF''' you want to exclude the grade of an activity only to one or some specific students, then follow these steps:<br />
#From the grader report "Turn editing on"<br />
#Click the "Edit grade" icon of the activity of the student you want to exclude.<br />
#In the Edit grade page, check the tick box next to the "Excluded" option and "Save changes".<br />
<br />
=== My student completed only one activity out of 5, but his course total shows 100%. How do I show a more "progressive" course total? ===<br />
<br />
==== Step-by-Step Explanation ====<br />
# From the view menu in the gradeboook, select "Categories and items"<br />
# At the top line there is a folder icon and an edit icon on the right, click the edit icon<br />
# You'll then see the title "Grade category," the 3rd item is "Aggregate only non-empty grades."<br />
# Uncheck this.<br />
# Save.<br />
<br />
==== Another Explanation ====<br />
By default, only non-empty grades are aggregated, the others are ignored. However, you can change this setting as well as others that affect the course total, by turning "Editing" on in the grader report, and clicking the "Edit" icon next to the course category (the very top row of the grader report).<br />
<br />
You can untick the box "Aggregate only non-empty grades" if you want to show a more "progressive" score for each student. Their empty grades will count as a 0 and will be counted in the course mean/total.<br />
<br />
If you prefer to show a sum of points, rather than a percentage, you can change the course category's aggregation method to "Natural".<br />
<br />
=== How can I display the average grade for my course categories (not grade categories)? ===<br />
In Moodle 1.9 there is no way to aggregate course totals within each category. The gradebook is course-centered, and there is currently no User Interface for showing grades within an entire course category at once.<br />
<br />
=== How can I setup weighted assignments? ===<br />
See [[Using "Weighted Mean of Grades" to weight categories containing assignments]].<br />
<br />
=== Why is the Category Total blank for one of my categories? ===<br />
One possibility is that you accidentally entered some grades into the Category Total column and then erased them. When you do that, an override flag gets set and then the totals won't calculate. Here's how to check, and fix it:<br />
<br />
# Go to the [[Grader report]] view of the gradebook.<br />
# Click the "Turn editing on" button for the gradebook. (There's a separate one for the gradebook from the one on the main page.)<br />
# Find the box for the problem category and the first student affected.<br />
# Click on the icon of a gear *in that box*.<br />
# See if the box marked "[[Grade_editing#Overridden|Overridden]]" (third line down) is checked. If it is, uncheck it. <br />
# Repeat (4) and (5) for each student affected,<br />
<br />
== Categories ==<br />
=== How many depths of categories/subcategories can I create? ===<br />
There is no programmatic limit, but there are practical limits. Very deeply nested structures are difficult to manage. 3 levels of categories should be sufficient for most situations. Note that there is always at least one level of categories, since the Course category always encompasses all other categories and grade items, can cannot be deleted.<br />
<br />
=== I can't find setting X in the grade category edit page! Where is it? ===<br />
If a setting documented on the [[Grade categories]] page does not appear on your edit page, it may mean that it is set globally in your site. See [[Grade_category_settings#Forcing_settings|Forcing settings]] for more information.<br />
<br />
== Outcomes ==<br />
=== I want to set up an outcome item for my course. What are the steps required? ===<br />
#The site administrator needs to have enabled outcomes via ''Settings>Site Aaministration > Advanced Features >Enable Outcomes'' <br />
#In your course, go to ''Settings>Course administration>Grades>Scales'' and create the scale you need.<br />
#[[Scales#Creating_a_new_scale|Create a scale]]<br />
#In Settings>Course administration>Outcomes, create a course outcome assigning it to the scale you just created.<br />
#Read the [[Outcomes| outcomes documentation]] for instructions).<br />
#You can now give your students a rating on the outcome dimension you just created. If you created a standard outcome, you will be able to use it in other courses and follow your students' performance across these courses.<br />
<br />
===How can I remove an outcome from an activity?===<br />
<br />
An outcome can be removed from an activity by deleting it on the gradebook edit categories and items page. This results in the outcomes being deselected on the update activity page.<br />
<br />
== Modules ==<br />
=== The activity module (Module name) doesn't support grading. How can I give my students a grade anyway? ===<br />
You can create a [[Grade_items#Manual_grade_items|grade item]] manually in the gradebook. You will have to grade your students through the [[Grader report]] interface (in editing mode).<br />
<br />
=== I just graded some of my students using the (Module name) interface, but the results aren't showing up in the grader report. What's going on? ===<br />
Here are some of the possible reasons:<br />
#The site settings>Grades>General settings may not have the correct graded roles checked off to appear in grade book. If you see no students in the Gradebook but do see columns for the graded activities, then check the graded role settings. <br />
#The corresponding [[Grade items|grade item]] is [[Grade_locking#In_grade_items|locked]], or its parent [[Grade categories|category]] is [[Grade_locking#In_grade_categories|locked]].<br />
#The module code is not using the [[Development:Grades#API_for_communication_with_modules.2Fblocks|gradebook API]] correctly<br />
<br />
=== I just created a new assignment with the "Grade" setting set to "No grade", but it still appears in the gradebook ===<br />
The reason is that the gradebook is now the place where both numerical and textual types of feedback are recorded for all activity modules. The word "Grading" in assignment relates only to numerical grades, but the ability to give text feedback remains, and must be recorded in the gradebook. This is why a grade item is created for it. You can hide the grade item if you do not want it to appear in the user reports.<br />
<br />
==Weights and extra credits==<br />
<br />
===How do weighted grades influence the category or course total?===<br />
A weight (also called coefficient) only has meaning in reference to other weights. If you only have one grade item, changing its weight will not have any effect. However, if you have two grade items, each with a different weight, the "heavier" item will have more influence on the total grade than the "lighter" one.<br />
<br />
You can set the weights to any positive numerical value you choose. Usually, at least one of the weights will be 1 and serve as the baseline for other weights. If another item has a weight of 2, its grades will be multiplied by 2 compared with the grades of the first grade item, before being averaged. The denominator used for averaging is the sum of all the weights.<br />
<br />
An example follows:<br />
item 1 weight: 1<br />
item 2 weight: 3<br />
item 3 weight: 0.5<br />
<br />
item 1 grade: 40/100<br />
item 2 grade: 60/100<br />
item 3 grade: 20/100<br />
<br />
Calculation: <br />
total = ((40 * 1) + (60 * 3) + (20 * 0.5)) / (1 + 3 + 0.5)<br />
= (40 + 180 + 10) / (4.5)<br />
= 230 / 4.5<br />
= 51.11<br />
<br />
The total for this category will then be 51.11 out of 100<br />
<br />
===Do I have to put a value in each "weight" input box?===<br />
No. If you do not put a value, it will default to 1. If all items are set to 1 then they all have equal weight. If you set a weight to 0, the item's grades will not count at all in the category or course average.<br />
<br />
===Do all the weights have to add up to 100 or some similar value?===<br />
No, the numbers you put as weights are completely arbitrary. They must be positive numbers, and can add up to anything you want. Note however that the following four sets of weights are identical in value:<br />
<br />
(1 1.75 3)<br />
(4 7 12)<br />
(8 14 24)<br />
(400 700 1200)<br />
<br />
===What is the difference between Weight and Extra Credit?===<br />
Weight is only available with "Weighted mean of grades". For the "Simple weighted mean of grades", the weight is taken from the grade item's maximum grade. A weight is used to give a grade item more or less importance in the computation of the category total or average, compared with the other items of the same category.<br />
<br />
Extra credit replaces grade item weight if the aggregation method is "Mean of grades (with extra credits)", "Sum of grades", or "Simple weighted mean of grades". The effect of extra credit is different in each case, hence some confusion:<br />
<br />
*Mean of grades (with extra credits): A value of 0 does nothing. Any other value is used to multiply the grade and add it to the total after the computation of the mean. This grade is not used in the computation of the mean, however, only added afterwards. Additionally, this cannot bring the category total over its maximum grade unless grades over 100% are enabled by the site administrator (since 1.9.5). This grade item is not counted either in the denominator used to compute the category mean.<br />
<br />
*Sum of grades: Extra credit is a checkbox, not a number. Normally, with Sum of Grades, the category's maximum grade is the sum of the maximum grades of all its grade items. If one of them is set as "Extra Credit", however, its maximum grade is not added to the category's maximum grade, but its grades will be. This way it is possible to achieve maximum grade (or grades over maximum if enabled by the site administrator) in the category without getting the maximum grade in all the grade items.<br />
<br />
*Simple weighted mean of grades: Extra credit is a checkbox, not a number. The "Extra Credit" grades are counted in the numerator used to compute the category mean, but not the denominator. See [[Category_aggregation#Simple_weighted_mean|here]] for more information.<br />
<br />
===How do I create an assignment for which students can receive a grade higher than the maximum?===<br />
<br />
In Moodle 1.9.5 onwards, a new [[Grade_settings#Unlimited_grades|unlimited grades]] setting in ''Administration > Grades > General settings'' enables administrators to allow teachers to enter grades over 100% directly in the gradebook.<br />
<br />
===Why can't I enter a grade higher than the maximum?===<br />
<br />
First, check with your administrators to make sure the [[Grade_settings#Unlimited_grades|unlimited grades]] setting is turned on. If that is not the problem, you might be using [[Gradebook_report_settings#Quick_grading_and_quick_feedback|quick grading]]. If that is the problem, you can still enter grades higher than the maximum this way:<br />
<br />
# Go to the Moodle gradebook "Grader Report" page.<br />
# Use the button in the upper right to "Turn editing on" if it is not already on.<br />
# In the upper right corner of each box for entering the grade, there should be an icon of a gear. Click on that.<br />
# On the "Edit grade" screen that comes up, there's a box for "Final grade". You should be able to enter any number of points into that, even if it's more than the maximum. (If this is an "[[Grade_items#Activity-based_grade_items|Activity-based grade item]]" such as an Assignment or a Quiz, then you may also have to check the "[[Grade_editing#Overridden|Overridden]]" checkbox.)<br />
<br />
If you expect a lot of students to get extra credit, it's probably better to make it a separate grade item and mark it as extra credit instead, or else [[Grade_import|import]] the grades from a spreadsheet.<br />
<br />
==Formulas==<br />
<br />
===How do I give a fixed score for a successful quiz attempt===<br />
<br />
Suppose you want to give 5 points for a passing grade (say, 40) in a certain quiz (which has a maximum score of 100). Possible scenario ([http://moodle.org/mod/forum/discuss.php?d=148576]): extra credit points to every student that gets a "passing grade" in a "practice test" at the end of each chapter covered in the course, to encourage them to practice after the homework quizzes and to get familiar with a "test type" situation before the actual test.<br />
<br />
The following formula should do the trick:<br />
<br />
=min(round((||quiz||/40)-0.49,0),1)*5<br />
<br />
The formula may be added to a designated grade item or category. <br />
<br />
Sample calculations:<br />
Score 40 (pass):<br />
=min(round((40/40)-0.49,0),1)*5<br />
=min(round(1-0.49,0),1)*5<br />
=min(round(0.51,0),1)*5<br />
=min(1,1)*5<br />
=1*5<br />
=5<br />
<br />
Score 39 (not pass):<br />
=min(round((39/40)-0.49,0),1)*5<br />
=min(round(0.975-0.49,0),1)*5<br />
=min(round(0.485,0),1)*5<br />
=min(0,1)*5<br />
=0*5<br />
=0<br />
<br />
Score 100 (pass):<br />
=min(round((100/40)-0.49,0),1)*5<br />
=min(round(2.5-0.49,0),1)*5<br />
=min(round(2.01,0),1)*5<br />
=min(2,1)*5<br />
=1*5<br />
=5<br />
<br />
==See also==<br />
<br />
*Gradebook Scenarios/Use Cases [https://docs.moodle.org/en/experimental:_gb_tutoring]<br />
*Using Moodle [http://moodle.org/mod/forum/view.php?id=2122 Gradebook forum]<br />
<br />
Using Moodle forum discussions:<br />
*[http://moodle.org/mod/forum/discuss.php?d=123143 Excluding practice quizzes from gradebook]<br />
*[http://moodle.org/mod/forum/discuss.php?d=193705 Course total not sum of max grade column?]<br />
*[https://moodle.org/mod/forum/discuss.php?d=167596 Why do only certain items have multiplicator & offset boxes?]<br />
*[https://moodle.org/mod/forum/discuss.php?d=235640 Extra credit]<br />
*[https://moodle.org/mod/forum/discuss.php?d=269534#unread Change grading method only for some students]<br />
<br />
[[Category:FAQ]]<br />
<br />
[[ca:PMF de les qualificacions]]<br />
[[de:Bewertungen FAQ]]<br />
[[es:Calificaciones FAQ]]<br />
[[fr:FAQ des notes]]<br />
[[ja:評定FAQ]]</div>Johnokhttps://docs.moodle.org/31/en/index.php?title=Grade_aggregation&diff=115850Grade aggregation2014-11-10T04:40:51Z<p>Johnok: Rename Sum of Grades to Natural</p>
<hr />
<div>{{Grades}}<br />
The aggregation dropdown menu lets you choose the aggregation strategy that will be used to calculate each participant's overall grade for a [[Grade categories|grade category]]. The different options are explained below.<br />
<br />
The grades are first converted to percentage values (interval from 0 to 1), then aggregated using one of the strategies below and finally converted to the associated category item's range (between Minimum grade and Maximum grade).<br />
<br />
Important: An empty grade is simply a missing gradebook entry, and could mean different things. For example, it could be a participant who hasn't yet submitted an assignment, an assignment submission not yet graded by the teacher, or a grade that has been manually deleted by the gradebook administrator. Caution in interpreting these "empty grades" is thus advised.<br />
<br />
<br />
== Mean of grades ==<br />
The sum of all grades divided by the total number of grades.<br />
A1 70/100, A2 20/80, A3 10/10, category max 100:<br />
(0.7 + 0.25 + 1.0)/3 = 0.65 --> 65/100<br />
<br />
== Weighted mean ==<br />
Each grade item can be given a weight, which is then used in the arithmetic mean aggregation to influence the importance of each item in the overall mean. In simple terms, the category "total" will be equal to the sum of the scores in each grade item, these scores being multiplied by the grade items' weights, and that sum being finally divided by the sum of the weights, as shown in this example.<br />
A1 70/100 weight 10, A2 20/80 weight 5, A3 10/10 weight 3, category max 100:<br />
(0.7*10 + 0.25*5 + 1.0*3)/18 = 0.625 --> 62.5/100<br />
<br />
== Simple weighted mean ==<br />
The difference from Weighted mean is that weight is calculated as Maximum grade - Minimum grade for each item. 100 point assignment has weight 100, 10 point assignment has weight 10.<br />
A1 70/100, A2 20/80, A3 10/10, category max 100:<br />
(0.7*100 + 0.25*80 + 1.0*10)/190 = 0.526 --> 52.6/100<br />
<br />
When the "Simple weighted mean" aggregation strategy is used, a grade item can act as Extra credit for the category. This means that the grade item's maximum grade will not be added to the category total's maximum grade, but the item's grade will. For example, if A3 is marked as extra credit in the above calculation:<br />
A1 70/100, A2 20/80, A3 (extra credit) 10/10, category max 100:<br />
(0.7*100 + 0.25*80 + 1.0*10)/180 = 0.556 --> 55.6/100<br />
<br />
== Mean of grades (with extra credits) ==<br />
Arithmetic mean with a twist. An old, now unsupported aggregation strategy provided here only for backward compatibility with old activities.<br />
<br />
A value greater than 0 treats a grade item's grades as extra credit during aggregation. The number is a factor by which the grade value will be multiplied before it is added to the sum of all grades, but the item itself will not be counted in the division. For example:<br />
<br />
* Item 1 is graded 0-100 and its "Extra credit" value is set to 2<br />
* Item 2 is graded 0-100 and its "Extra credit" value is left at 0.0000<br />
* Item 3 is graded 0-100 and its "Extra credit" value is left at 0.0000<br />
* All 3 items belong to Category 1, which has "Mean of grades (with extra credits)" as its aggregation strategy<br />
* A student gets graded 20 on Item 1, 40 on Item 2 and 70 on Item 3<br />
* The student's total for Category 1 will be 95/100 since 20*2 + (40 + 70)/2 = 95<br />
<br />
== Median of grades ==<br />
The middle grade (or the mean of the two middle grades) when grades are arranged in order of size. The advantage over the mean is that it is not affected by outliers (grades which are uncommonly far from the mean).<br />
A1 70/100, A2 20/80, A3 10/10, category max 100:<br />
0.7 + 0.25 + 1.0 --> 0.70 --> 70/100<br />
<br />
== Smallest grade ==<br />
The result is the smallest grade after normalisation. It is usually used in combination with Aggregate only non-empty grades.<br />
A1 70/100, A2 20/80, A3 10/10, category max 100:<br />
min(0.7 + 0.25 + 1.0) = 0.25 --> 25/100<br />
<br />
== Highest grade ==<br />
The result is the highest grade after normalisation.<br />
A1 70/100, A2 20/80, A3 10/10, category max 100:<br />
max(0.7 + 0.25 + 1.0) = 1.0 --> 100/100<br />
<br />
== Mode of grades ==<br />
The mode is the grade that occurs the most frequently. It is more often used for non-numerical grades. The advantage over the mean is that it is not affected by outliers (grades which are uncommonly far from the mean). However it loses its meaning once there is more than one most frequently occurring grade (only one is kept), or when all the grades are different from each other.<br />
A1 70/100, A2 35/50, A3 20/80, A4 10/10, A5 7/10 category max 100:<br />
mode(0.7; 0.7; 0.25; 1.0; 0.7) = 0.7 --> 70/100<br />
<br />
== Natural ==<br />
{{New features}}<br />
This is the sum of all grade values, scaled by weight. <br />
'''NOTE: THIS SECTION NEEDS UPDATING<br />
'''<br />
Scale grades are ignored. This is the only type that does not convert the grades to percentages internally. The Maximum grade of associated category item is calculated automatically as a sum of maximums from all aggregated items.<br />
A1 70/100, A2 20/80, A3 10/10:<br />
70 + 20 + 10 = 100/190<br />
<br />
When the "Natural" aggregation strategy is used, a grade item can act as Extra credit for the category. This means that the grade item's maximum grade will not be added to the category total's maximum grade, but the item's grade will. Following is an example:<br />
<br />
* Item 1 is graded 0-100<br />
* Item 2 is graded 0-75<br />
* Item 1 has the "Act as extra credit" checkbox ticked, Item 2 doesn't.<br />
* Both items belong to Category 1, which has "Natural" as its aggregation strategy<br />
* Category 1's total will be graded 0-75<br />
* A student gets graded 20 on Item 1 and 70 on Item 2<br />
* The student's total for Category 1 will be 75/75 (20+70 = 90 but Item 1 only acts as extra credit, so it brings the total to its maximum)<br />
<br />
==Available aggregation types==<br />
[[Image:availableaggregationtypes1.png|thumb|Available aggregation types setting]]<br />
The default is 'Natural' but the administrator can specify other types from '' Site administration >administration > Grades > [[Grade category settings]]''.<br />
<br />
Note that reducing the number of aggregation types simply results in disabled aggregation types not appearing in the aggregation type dropdown menu. All existing grade category calculations remain the same, regardless of whether the aggregation type is later disabled by an administrator.<br />
<br />
[[ca:Agregació de les categories]]<br />
[[fr:Tendance centrale de la catégorie]]<br />
[[es:Agregación de categoría]]</div>Johnok