Note: You are currently viewing documentation for Moodle 2.1. Up-to-date documentation for the latest stable version is available here: Installing plugins.

Installing plugins: Difference between revisions

From MoodleDocs
 
(10 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{Installing Moodle}}
{{Installing Moodle}}
<p class="note">''This page requires updating.'' Please do so and remove this template when finished.</p>
There are optional plugins 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.  
There are optional plugins 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.  


Line 18: Line 16:


* You must have access to your Moodle code files to upload or install the plugin. If you installed Moodle in the first place then you should be fine. There is no way to install plugins through the web interface.
* You must have access to your Moodle code files to upload or install the plugin. If you installed Moodle in the first place then you should be fine. There is no way to install plugins through the web interface.
* Your plugin may impose additional requirements on the server. In particular plugins to access other systems may need specific PHP plugins. Check the documentation.
* Your plugin may impose additional requirements on the server. In particular, plugins to access other systems or services may need specific PHP plugins (e.g. LDAP or other database drivers). Check the documentation.


==Downloads==
==Downloads==
Line 33: Line 31:
==Module installation==
==Module installation==


To install a contributed module:
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):
# 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 [http://filezilla-project.org/] 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.)  
* /path/to/moodle/mod/ - modules (i.e. activities and resources)
# Download the zip file and unzip it to your ''moodle/mod'' directory.
* /path/to/moodle/blocks/ - blocks (in the sidebars)
# In your browser, go to your Moodle site:
* /path/to/moodle/question/type/ - questiontypes
Site Administration
* /path/to/moodle/course/format/ - course formats
  Notifications
* /path/to/moodle/admin/report/ - admin reports
    Continue
* /path/to/moodle/theme/ - themes
 
==Block installation==
 
To install a contributed block:
# Download the zip file and unzip it to your ''moodle/blocks'' directory.
# Visit your admin page <nowiki>http://your_moodle_address/admin/index.php</nowiki> to complete the installation.


==Other types of plugin==
Then:


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.
# Download the zip file
# Upload or copy it to your Moodle server
# Unzip it in the right place for the plugin type (or follow plugin instructions).  
# In your Moodle site (as admin) go to Settings > Site administration > Notifications (you should, for most plugin types, get a message saying the plugin is installed):
# Test the plugin


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.
==If you have problems...==


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.)


==Installation trouble-shooting==
* 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 block 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] section 3, 'Moodle contrib'. Make sure you describe your system (including versions of MySQL, PHP etc.), what you tried and what happened. Copy and paste error messages exactly. Please provide the '''link''' to the version of the plugin you downloaded (some have very similar names).


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:
==Optional plugin removal==
 
# The new block folder is named correctly. For example, the Learning Resources block folder should be named "learning_resources" (not "learning_resources_block").
# 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.
 
==Module and block removal==
To remove a contributed module:
To remove a contributed module:
# Access ''Administration > Modules > Activities > Manage activities'' (or ''Administration > Modules > Activities'' in versions of Moodle prior to 1.9).
# Look through Settings > Site administration > Plugins to find your plugin
# Click on delete next to the module you wish to remove.
# 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.
# Delete the actual module directory from the Moodle installation, otherwise Moodle will reinstall it next time you access the site administration.
 
To remove a contributed block:
# 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==


*[[Contributed code FAQ]]
*Using Moodle [http://moodle.org/mod/forum/view.php?id=44 Contributed modules and plugins forum]
*Using Moodle [http://moodle.org/mod/forum/view.php?id=44 Contributed modules and plugins forum]
*[http://www.youtube.com/watch?v=pPUB_ReBPeg Installing contributed modules in Moodle video]
*[http://www.youtube.com/watch?v=pPUB_ReBPeg Installing contributed modules in Moodle video]

Latest revision as of 10:45, 31 December 2011

There are optional plugins 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.

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

Before you do anything else...

VERY IMPORTANT: There is no formal system for reviewing and approving Moodle plugins. 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 plugin? More functionality means more things to support, more things to (potentially) go wrong and more things to worry about at upgrade time.
  • Is the plugin supported and maintained? If something goes wrong can you get support? Will bugs be fixed?
  • If the plugin does not work in a future version of Moodle, what will you do about it?
  • Beware of patches! If a plugin 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 plugin. If you installed Moodle in the first place then you should be fine. There is no way to install plugins through the web interface.
  • Your plugin may impose additional requirements on the server. In particular, plugins to access other systems or services may need specific PHP plugins (e.g. LDAP or other database drivers). Check the documentation.

Downloads

Contributed modules and plugins may be downloaded from...:

...at the time of writing the "old" plugin directory is still available - some plugins have not been moved over:

NOTE: Make sure you select the correct version. Most plugins 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 (& Themes) for Moodle 1.9 and earlier will NOT work. There is no point trying!

Module 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 plugin 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 plugin is installed):
  5. Test the plugin

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 block 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 section 3, 'Moodle contrib'. Make sure you describe your system (including versions of MySQL, PHP etc.), what you tried and what happened. Copy and paste error messages exactly. Please provide the link to the version of the plugin you downloaded (some have very similar names).

Optional plugin removal

To remove a contributed module:

  1. Look through Settings > Site administration > Plugins to find your plugin
  2. Click on delete next to the module you wish to remove.
  3. Delete the actual module directory from the Moodle installation, otherwise Moodle will reinstall it next time you access the site administration.

See also