Note: You are currently viewing documentation for Moodle 2.4. Up-to-date documentation for the latest stable version of Moodle may be available here: Installing add-ons.

Installing add-ons: Difference between revisions

From MoodleDocs
(→‎See also: forum discussion link)
 
(28 intermediate revisions by 10 users not shown)
Line 1: Line 1:
''Warning: Please be aware that some contributed modules and plugins have not been reviewed, and the quality and/or suitability for your Moodle site has not been checked. The modules and plugins may have security problems, data-loss problems, interface problems or just plain not work. Please think carefully about maintenance before relying on contributed code in your production site, as some of this code may not work with future versions of Moodle.''
{{Installing Moodle}}
There are optional plugins or add-ons available that can extend Moodle in all sorts of ways - new activities, new quiz question types, new reports, integrations with other systems and many more. This page gives some important advice you should consider before adding them and general advice on how to install them.  


==What is meant by the word 'plugin'?==
Moodle = core code + plugins
Plugins may be either standard plugins (included in the Moodle download package) or add-ons.
== Before you do anything else... ==
'''VERY IMPORTANT''' Warning: Please be aware that some add-ons have not been reviewed, and the quality and/or suitability for your Moodle site has not been checked. Please be careful when considering using one. It may not do what you expect, it may have serious security issues or it may even not work at all.
* Do you '''really''' need the add-on? More functionality means more things to support, more things to (potentially) go wrong and more things to worry about at upgrade time.
* Is the add-on supported and maintained? If something goes wrong can you get support? Will bugs be fixed?
* If the add-on does not work in a future version of Moodle, what will you do about it?
* Beware of ''patches''! If an add-on modifies or replaces core files then be very careful. It can only be guaranteed to work with the exact build (version) of Moodle it was created for and is highly unlikely to survive a Moodle upgrade.
=== Moodle requirements ===
* You must have access to your Moodle code files to upload or install the add-on. There is no way to install add-ons through the web interface.
* Your add-on may impose additional requirements on the server. In particular, add-ons to access other systems or services may need specific PHP plugins (e.g. LDAP or other database drivers). Check the documentation.
''You should always look for a 'readme' file or other documentation supplied with the add-on and read that carefully.''


==Downloads==
==Downloads==


Contributed modules and plugins may be downloaded from...:
Add-ons may be downloaded from the [http://moodle.org/plugins/ Moodle plugins directory].
 
* [http://moodle.org/mod/data/view.php?id=6009 the Modules and plugins database] or
* [http://cvs.sourceforge.net/viewcvs.py/moodle/contrib/ cvs:moodle/contrib] using the URL <nowiki>http://download.moodle.org/download.php/modules/directory_name.zip</nowiki>


==Module installation==
Note: Make sure you select the correct version. Most add-ons for Moodle 2.0+ will work in all 2.x versions of Moodle. Question Types changed in Moodle 2.1 and require specific plugins for Moodle 2.1+. Plugins (and themes) for Moodle 1.9 and earlier will NOT work. There is no point trying!


To install a contributed module:
==Installation==
# You must have access to the server containing Moodle. This can be direct access, through a network or to a remote server through Internet with an FTP client, you can't do it from "inside" Moodle itself. (There are many free FTP programs like FileZilla that can be used. If you use FTP, you will need to know [from the server provider] the ID and password and maybe a couple more things. Once it is setup, it's as easy as other file management.)
# Download the zip file and unzip it to your ''moodle/mod'' directory.
# In your browser, go to your Moodle site:
Site Administration
  Notifications
    Continue


Note: The module may contain language files.  If so then just leave them in the folder and they'll be found automatically. However, language strings cannot be edited using the ''Site Administration > Language'' editing interface.
First, establish the correct place in the moodle code 'tree' for the plugin. Some plugins need elements installed in multiple locations. To complicate matters not everybody packages up plugins in the same way. It's best to unzip/unpack the plugin in an empty directory first just to see what it looks like and to check for 'readme' files. Common locations are (there are others):


To install a contributed module to a local Mac OS X web server:
* /path/to/moodle/mod/ - modules (i.e. activities and resources)
* /path/to/moodle/blocks/ - blocks (in the sidebars)
* /path/to/moodle/question/type/ - questiontypes
* /path/to/moodle/course/format/ - course formats
* /path/to/moodle/admin/report/ - admin reports
* /path/to/moodle/theme/ - themes


Download the zip file and unzip it to:
Then:
    /Applications/MAMP/htdocs/moodle19/mod
Visit your Local Moodle site <nowiki>http://localhost:8888/moodle19/</nowiki>
Site Administration
  Notifications
    Scroll to the bottom of the page and click on "Continue"
Check your new module has been installed:
  Site Administration
    Modules
    Activities
      Manage activities


==Block installation==
# Download the zip file
# Upload or copy it to your Moodle server
# Unzip it in the right place for the plugin type (or follow add-on instructions).
# In your Moodle site (as admin) go to ''Settings > Site administration > Notifications'' (you should, for most plugin types, get a message saying the add-on is installed)
# Test the add-on


To install a contributed block:
Note: The add-on may contain language files.  They'll be found by your Moodle automatically. These language strings can be customized using the standard ''Settings > Site administration > Language'' editing interface.
# Download the zip file and unzip it to your ''moodle/block'' directory.
# Visit your admin page <nowiki>http://your_moodle_address/admin/index.php</nowiki> to complete the installation.


==Other types of plugin==
===If you have problems...===


Plugins are installed in various places in Moodle, depending upon the plugin. For example, plugin question types need to be unzipped to your ''moodle/question/type'' directory.
* Check the file permissions. The web server needs to be able to read the plugin files. If the the rest of Moodle works then try to make the plugin permissions and ownership match.
* Did you '''definitely''' unzip or install the add-on in the correct place?
* Because Moodle scans plugin folders for new plugins you cannot have any other files or folders there. Make sure you deleted the zip file and don't try to rename (for example) an old version of the plugin to some other name - it will break.
* Make sure the directory name for the plugin is correct. All the names '''have''' to match. If you change the name then it won't work.
* Turn on [[Debugging]] - any error messages?
* Ask in the appropriate forum in [http://moodle.org/course/view.php?id=5 Using Moodle]. Make sure you describe your system (including versions of MySQL, PHP etc.), what you tried and what happened. Copy and paste error messages exactly. Provide the link to the version of the add-on you downloaded (some have very similar names).


You can work out the correct place from the download link. If the download link is http://download.moodle.org/download.php/plugins19/mod/quiz/report/responses.zip, then after unzipping, the responses folder needs to be copied into the mod/quiz/report folder of your Moodle install.
==Uninstalling a plugin==


After installing any plugin, you should visit the admin notifications page of your web site (URL .../admin/index.php) to allow the plugin to install itself if necessary. (It is not always necessary, but you should always check.)
To uninstall a plugin
# Go to ''Settings > Site Administration > Plugins > Plugins overview'' and click the Uninstall link opposite the plugin you wish to remove
# Use a file manager to remove/delete the actual plugin directory as instructed, otherwise Moodle will reinstall it next time you access the site administration


==Installation trouble-shooting==
==Plugins overview==


If you visit the admin page and don't get a message about a new block (or module) being successfully installed then check the following:
[[File:plugins overview.png|thumb|left|Plugins overview highlighting available update with install button]]The Plugins overview page in ''Settings > Site Administration > Plugins > Plugins overview'' lists all installed plugins, together with the version number, availability (enabled or disabled) and settings link (if applicable).


# The new block folder is named correctly. For example, the Learning Resources block folder should be named "learning_resources" (not "learning_resources_block").
''Note: The open or closed eye icon indicates whether a plugin is enabled or not. However, this icon is not clickable and you cannot change a plugin's availability from here.''
# The new block folder is not contained within another folder. For example, unzipping ''block_learning_resources.zip'' results in a folder named "block_learning_resources" containing a folder named "blocks" containing a folder named "learning_resources". If it's easier, just copy and paste the folder named "learning_resources" into the blocks folder of your Moodle site.


If you browse the blocks folder of your Moodle site, you'll notice that all the blocks follow a pattern - the activity_modules folder contains a file ''block_activity_modules.php'', the calendar_month folder contains a file ''block_calendar_month.php'', the learning_resources folder contains a file ''block_learning_resources.php'' etc. Modules follow a similar pattern.
A 'Check for available updates' button enables admins to quickly check for any updates available to core code and for any contributed plugins installed on the site (from the [http://moodle.org/plugins plugins directory]). Any updates available are highlighted, with further information and a download link in the notes column opposite the plugin.


==Module and block removal==
===Plugin updating from within Moodle===
To remove a contributed module:
# Access ''Administration > Modules > Activities > Manage activities'' (or ''Administration > Modules > Activities'' in versions of Moodle prior to 1.9).
# Click on delete next to the module you wish to remove.
# Use a file manager to remove/delete the actual module directory from ''moodle/mod'', otherwise Moodle will reinstall it next time you access the site administration.


To remove a contributed block:
{{New features}}In Moodle 2.4 onwards, an administrator can enable updates deployment in  ''Settings > Site Administration > Server > Update notifications''. Then when updates are available, 'Install this update' buttons are shown on the Plugins overview page. See [[Automatic updates deployment]] for more details.
# Access ''Administration > Modules > Blocks > Manage blocks'' (or ''Administration > Modules > Blocks'' in versions of Moodle prior to 1.9).
# Click on delete next to the block you wish to remove.
# Use a file manager to remove/delete the actual module directory from ''moodle/blocks'', otherwise Moodle will reinstall it next time you access the site administration.


==See also==
==See also==


*Using Moodle [http://moodle.org/mod/forum/view.php?id=44 Contributed modules and plugins forum]
*[[Notifications]] for further details of update notifications
*[http://www.youtube.com/watch?v=pPUB_ReBPeg Installing contributed modules in Moodle video]
*[[Add-on FAQ]]
*Using Moodle [http://moodle.org/mod/forum/view.php?id=44 General add-ons forum]
*Using Moodle [http://moodle.org/mod/forum/discuss.php?d=131413 Moodle not installing a new Activity Module] forum discussion
*Using Moodle [http://moodle.org/mod/forum/discuss.php?d=131413 Moodle not installing a new Activity Module] forum discussion
* [[Installing Moodle from Git repository#Installing a contributed extension from its Git repository|Installing a contributed extension from its Git repository]]
For developers:
*[[:dev:Category:Plugins|Plugins developer documentation]]
*[[:dev:Plugin validation]]


[[Category:Contributed code]]
[[Category:Contributed code]]
[[Category:Installation]]
 
[[de:Plugins installieren]]
[[es:Instalando plugins]]

Latest revision as of 07:34, 25 April 2013

There are optional plugins or add-ons available that can extend Moodle in all sorts of ways - new activities, new quiz question types, new reports, integrations with other systems and many more. This page gives some important advice you should consider before adding them and general advice on how to install them.

What is meant by the word 'plugin'?

Moodle = core code + plugins

Plugins may be either standard plugins (included in the Moodle download package) or add-ons.

Before you do anything else...

VERY IMPORTANT Warning: Please be aware that some add-ons have not been reviewed, and the quality and/or suitability for your Moodle site has not been checked. Please be careful when considering using one. It may not do what you expect, it may have serious security issues or it may even not work at all.

  • Do you really need the add-on? More functionality means more things to support, more things to (potentially) go wrong and more things to worry about at upgrade time.
  • Is the add-on supported and maintained? If something goes wrong can you get support? Will bugs be fixed?
  • If the add-on does not work in a future version of Moodle, what will you do about it?
  • Beware of patches! If an add-on modifies or replaces core files then be very careful. It can only be guaranteed to work with the exact build (version) of Moodle it was created for and is highly unlikely to survive a Moodle upgrade.

Moodle requirements

  • You must have access to your Moodle code files to upload or install the add-on. There is no way to install add-ons through the web interface.
  • Your add-on may impose additional requirements on the server. In particular, add-ons to access other systems or services may need specific PHP plugins (e.g. LDAP or other database drivers). Check the documentation.

You should always look for a 'readme' file or other documentation supplied with the add-on and read that carefully.

Downloads

Add-ons may be downloaded from the Moodle plugins directory.

Note: Make sure you select the correct version. Most add-ons for Moodle 2.0+ will work in all 2.x versions of Moodle. Question Types changed in Moodle 2.1 and require specific plugins for Moodle 2.1+. Plugins (and themes) for Moodle 1.9 and earlier will NOT work. There is no point trying!

Installation

First, establish the correct place in the moodle code 'tree' for the plugin. Some plugins need elements installed in multiple locations. To complicate matters not everybody packages up plugins in the same way. It's best to unzip/unpack the plugin in an empty directory first just to see what it looks like and to check for 'readme' files. Common locations are (there are others):

  • /path/to/moodle/mod/ - modules (i.e. activities and resources)
  • /path/to/moodle/blocks/ - blocks (in the sidebars)
  • /path/to/moodle/question/type/ - questiontypes
  • /path/to/moodle/course/format/ - course formats
  • /path/to/moodle/admin/report/ - admin reports
  • /path/to/moodle/theme/ - themes

Then:

  1. Download the zip file
  2. Upload or copy it to your Moodle server
  3. Unzip it in the right place for the plugin type (or follow add-on instructions).
  4. In your Moodle site (as admin) go to Settings > Site administration > Notifications (you should, for most plugin types, get a message saying the add-on is installed)
  5. Test the add-on

Note: The add-on may contain language files. They'll be found by your Moodle automatically. These language strings can be customized using the standard Settings > Site administration > Language editing interface.

If you have problems...

  • Check the file permissions. The web server needs to be able to read the plugin files. If the the rest of Moodle works then try to make the plugin permissions and ownership match.
  • Did you definitely unzip or install the add-on in the correct place?
  • Because Moodle scans plugin folders for new plugins you cannot have any other files or folders there. Make sure you deleted the zip file and don't try to rename (for example) an old version of the plugin to some other name - it will break.
  • Make sure the directory name for the plugin is correct. All the names have to match. If you change the name then it won't work.
  • Turn on Debugging - any error messages?
  • Ask in the appropriate forum in Using Moodle. Make sure you describe your system (including versions of MySQL, PHP etc.), what you tried and what happened. Copy and paste error messages exactly. Provide the link to the version of the add-on you downloaded (some have very similar names).

Uninstalling a plugin

To uninstall a plugin

  1. Go to Settings > Site Administration > Plugins > Plugins overview and click the Uninstall link opposite the plugin you wish to remove
  2. Use a file manager to remove/delete the actual plugin directory as instructed, otherwise Moodle will reinstall it next time you access the site administration

Plugins overview

Plugins overview highlighting available update with install button

The Plugins overview page in Settings > Site Administration > Plugins > Plugins overview lists all installed plugins, together with the version number, availability (enabled or disabled) and settings link (if applicable).

Note: The open or closed eye icon indicates whether a plugin is enabled or not. However, this icon is not clickable and you cannot change a plugin's availability from here.

A 'Check for available updates' button enables admins to quickly check for any updates available to core code and for any contributed plugins installed on the site (from the plugins directory). Any updates available are highlighted, with further information and a download link in the notes column opposite the plugin.

Plugin updating from within Moodle

New feature
in Moodle 2.4!
In Moodle 2.4 onwards, an administrator can enable updates deployment in Settings > Site Administration > Server > Update notifications. Then when updates are available, 'Install this update' buttons are shown on the Plugins overview page. See Automatic updates deployment for more details.

See also

For developers: