Once you've found a module you would like to test, you need to know how to add and install that module.
You will need to have your web server running with Moodle installed. If you are not an administrator of the site, you will need assistance from someone who is.
To install a module, you will need to access your file browser to copy files and a web browser to see the results. You will need to be able to unzip files as this is how files in a module are packaged together.
On the entry page for the module, look for the links at the bottom-right of the description. If you have an older version of Moodle, look for the version of the module that is suitable for your version.
Image source: http://moodle.org/mod/data/view.php?d=13&rid=2524&filter=1.
Clicking on the link will take you to a new page, then a download dialog should appear. Most modules are packaged as zip
files. Save the zip
file to an easily accessible location on your computer.
As a specific example, search for the Progress Bar block in the Moodle Modules and plugins database. Find the download link and download the file. The filename should be progress.zip
.
Once you have the file downloaded on your machine, you need to unzip the code and copy it to a location within the Moodle file structure. The location for the files will depend on the type of module you are installing.
A zip
file is a collection of files that have been combined together into a single file and compressed. How you "unzip" a file will depend on your operating system. Most operating systems will provide support to unzip. Try double clicking on a zip
file and you may be presented with a view of its contents; dragging the files from such a view will uncompress and copy the files from the zip
into the location you drop them. If this doesn't work for you, try right-clicking on the zip
file and see what options are available for extracting the files inside.
The following table shows where common module types need to be placed within the Moodle file structure. You will need to know where the Moodle code exists within the file structure of your server when viewed using your file browser (not your web browser). For simplicity we shall refer to this directory as moodle/
.
Activity module |
|
Assignment type |
|
Block |
|
Course format |
|
Filter |
|
Integration |
(varies by module, look for additional instructions) |
Question type |
|
Most modules are self contained within a single subdirectory. This is especially true for modules created for more recent versions of Moodle. So, generally, you should be able to unzip the contents of the module package to one place.
Within the zip
file, there will normally be a structure that should become the directory structure when unzipped. This will usually be a single directory at the root of the zip
file and subfolders within this. Depending on the complexity of the module, there may be a few PHP files or there may be hundreds of files for images, scripts, language translations, and more.
Unzip the progress.zip
file inside the moodle/blocks
directory. The path to the root of the module code should be moodle/blocks/progress
.
When you unzip the files, be sure that you do not add additional directories, for example moodle/blocks/progress/progress/
. Doing so will prevent the block code from being detected and installed. Also take care not to accidentally rename the directory or the files within it as this will affect the functioning of the module.
Once the files are in place, the next step is to install the module. For most modules the process is the same.
If you are not sure what the icons on a block do, hover over them for a description. Some blocks will not function properly until you have changed their settings.
When you add an activity module, an assignment type, or an integration, you can add an instance by selecting it from the list of resources or activities, depending on what kind of module it is. When you add a module of this kind you will immediately be taken to a page to set it up.
Question types allow a greater variety of questions to be added to quizzes. Once you have copied the directory of files for a question type to moodle/question/type/
, visit the Notifications page as normal. You should then be able to select that question type when creating a new question.
Moodle is designed to be modular, and also to make the process of adding modules as easy as possible. Allowing the code for a module to be in a self contained directory allows module authors to create and share modules without requiring a complicated installation or detailed instructions. Once you've installed one module, installing more is relatively easy.
Not all modules can be contained in a single directory. If this is not the case, you will be provided with additional instructions for installation. A common change needed for some module types is to add a string to a language file. For extra information check the following:
readme.txt
file in the zip
packageFilters and course formats are installed in a slightly different way compared to blocks, activity modules, and question types.
Once you have copied the module code to the moodle/filter/
directory, log in as the administrator and go to the root page of your site. At this stage if you were to visit the Notifications page, nothing will be shown as no databases are needed for filters. On the Site Administration menu, expand Modules and you will see a link to Filters. Expanding this will show a link to Manage Filters. Clicking this will take you to the filters settings page.
The newly added filter should appear in the list of filters. Clicking the closed-eye icon will enable the filter. Text appearing in labels, web pages, and forums will be filtered and text matching the code specific to the filter will be replaced accordingly. The following is an example of a filter that replaces code, such as (smile)
with icons.
Course formats allow the layout of a course page to take on a different structure.
To add a course format, copy the format directory and files into the moodle/course/format/
directory, log into the course, choose Settings from the course Administration block, then choose your new format from the list of formats.