Home Web Development Moodle 1.9 Top Extensions Cookbook

Moodle 1.9 Top Extensions Cookbook

books-svg-icon Book
eBook $28.99 $19.99
Print $48.99
Subscription $15.99 $10 p/m for three months
$10 p/m for first 3 months. $15.99 p/m after that. Cancel Anytime!
What do you get with a Packt Subscription?
This book & 7000+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook + Subscription?
Download this book in EPUB and PDF formats, plus a monthly download credit
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook?
Download this book in EPUB and PDF formats
Access this title in our online reader
DRM FREE - Read whenever, wherever and however you want
Online reader with customised display settings for better reading experience
What do you get with video?
Download this video in MP4 format
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with video?
Stream this video
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with Audiobook?
Download a zip folder consisting of audio files (in MP3 Format) along with supplementary PDF
What do you get with Exam Trainer?
Flashcards, Mock exams, Exam Tips, Practice Questions
Access these resources with our interactive certification platform
Mobile compatible-Practice whenever, wherever, however you want
BUY NOW $10 p/m for first 3 months. $15.99 p/m after that. Cancel Anytime!
eBook $28.99 $19.99
Print $48.99
Subscription $15.99 $10 p/m for three months
What do you get with a Packt Subscription?
This book & 7000+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook + Subscription?
Download this book in EPUB and PDF formats, plus a monthly download credit
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook?
Download this book in EPUB and PDF formats
Access this title in our online reader
DRM FREE - Read whenever, wherever and however you want
Online reader with customised display settings for better reading experience
What do you get with video?
Download this video in MP4 format
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with video?
Stream this video
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with Audiobook?
Download a zip folder consisting of audio files (in MP3 Format) along with supplementary PDF
What do you get with Exam Trainer?
Flashcards, Mock exams, Exam Tips, Practice Questions
Access these resources with our interactive certification platform
Mobile compatible-Practice whenever, wherever, however you want
  1. Free Chapter
    Getting Modular with Moodle
About this book
Moodle is growing at a seemingly unstoppable rate. One of the key reasons for its popularity lies in its potential to extend with modules, thus making the site easier to administer, add new features, and completely change the way it looks. This book finds you the best Moodle modules, teaches you how to install them, and helps you to master their configuration.There are hundreds of Moodle modules available. Find out which you can trust and how to put them to work. This practical book gives you hands-on experience on using and managing Moodle modules, thus making your learning website feature-rich. It covers many features and techniques in order to allow you to organize your ideas to improve teaching using Moodle as a virtual learning platformThis book begins with simple activities such as adding and installing modules. Then, it moves to a very interesting topic about the integration of multimedia into Moodle, covering major multimedia elements such as images, audio, and video. Social networking applications like Twitter and Facebook are embedded in the Moodle course in order to invent stories, create group works, and create social team interactions with the virtual classroom. But the book doesn't end there, you will also see how to use Moodle to accept and assess coursework submissions, discuss work with students, and deliver quizzes, tests, and videos.The book ends with a chapter full of simple challenges such as adding educational games. This book is written to help you find modules that will be useful to you and your students, and to show examples of how these modules can be setup and used in teaching.
Publication date:
November 2010
Publisher
Packt
Pages
324
ISBN
9781849512169

 

Chapter 1. Getting Modular with Moodle

In this chapter, we will cover:

  • Accessing Moodle plugins

  • Adding and installing modules

  • Changing site-wide settings

  • Getting modules to speak your language

  • Reporting bugs and suggesting improvements

  • Removing modules

 

Introduction


Moodle is an open source Learning Management System (LMS). If you're reading this book, it's likely that you are already using Moodle, or you have heard about it.

Image source: http://moodle.org/.

The word Moodle is actually an acronym. The 'M' in Moodle stands for Modular and the modularity of Moodle has been one of the key aspects of its success. Being modular means you can:

  • Add modules to your Moodle instance

  • Selectively use the modules you need

Note

M.O.O.D.L.E.

The acronym Moodle stands for Modular Object-Oriented Dynamic Learning Environment. It is modular because you can add and remove modules. The programming paradigm used to create Moodle code is Object-Oriented. It is dynamic because it can be used for information delivery and interactivity, in a changeable and flexible way. It is a learning environment designed for teaching at many levels.

Because Moodle is modular and open source, many people have created modules for Moodle, and many of those modules are available freely for you to use. At time of writing, there are over 600 modules that you can download from the Moodle Modules and plugins database. Some of these are popular, well designed, and well maintained modules. Others are ideas that didn't seem to get off the ground. Some are contributed and maintained by large institutions, but most are contributed by individuals, often teachers themselves, who want to share what they have created.

If you have an idea for something you would like to do with Moodle, it's possible that someone has had that idea before and has created and shared a module you can use. This chapter will show you how to download and test contributed Moodle modules, to see if they suit your needs. Later chapters will help you find modules that will be useful to you and your students, and to show examples of how these modules can be set up and used in teaching.

Note

Origins of Moodle

Moodle began in 1999 as postgraduate work of Martin Dougiamas, "out of frustration with the existing commercial software at the time". Considering the widespread use of Moodle around the world (over 40,000 registered sites in over 200 countries), Martin is a very humble man. If you ever make it to a MoodleMoot and Martin is in attendance, be sure to introduce yourself.

A test server

If you only want to test modules, consider setting up your own basic web server, such as XAMPP (http://www.apachefriends.org/en/xampp.html) and installing Moodle from the Moodle Downloads page (http://download.moodle.org/). If you are a Windows or Mac user, you can even download and install Moodle packages where these two ingredients are already combined and ready to go.

Once installed, add a course or two. Create some dummy students to see how modules work within a course. Have a play around with the modules available—Moodle is quite hard to break—don't be afraid to experiment.

 

Getting modules you can trust


The Moodle Modules and plugins database is filled with modules great and small. This book will review a range of useful modules and show you how to use them, but first you may want to know how you can find modules yourself.

It is helpful to know where the modules discussed in this book come from, and how they were judged as worthy candidates for review.

Getting ready

You may have an idea in mind, or you may just want to see what's out there. You'll need a web browser and an active Internet connection.

How to do it...

Point your browser to the Moodle Modules and plugins database. Refer http://moodle.org/mod/data/view.php?id=6009:

Image source: http://moodle.org/mod/data/view.php?id=6009.

As you scroll down you will see list of modules that can be downloaded. At the bottom of the page is a Search facility:

Image source: http://moodle.org/mod/data/view.php?id=6009.

You can also try an advanced search to get more specific about the following:

  • What type of module you want

  • What version of Moodle you have

  • A number of other features

The following is a search result for the term 'progress':

Image source: http://moodle.org/mod/data/view.php?id=6009.

Each entry has a type, the version of Moodle that it is compatible with, and a brief description. Clicking on the name of the module will take you to a page with details about the module. This is the module's 'entry':

Image source: http://moodle.org/mod/data/view.php?d=13&rid=2524&filter=1.

On each entry page there is a wealth of information about the module. The following is a list of questions you will want to answer when determining if the module is worth testing.

  • Will it work with your version of Moodle?

  • Is documentation provided?

  • When was the module released and has there been activity (postings on the page below) since then?

  • Is the module author active in the discussion about the module?

  • Is the discussion positive (don't be too discouraged by bug reports if the author is involved and reporting that bugs have been fixed)?

  • From discussion, can you tell if the module is widely used with a community of users behind it?

  • What is the rating of the module?

If you are happy with your answers to these questions, then you may have found a useful module.

Note

Be wary of modules that do what you want, but are not supported; you may be wasting your time and putting the security of your system and the integrity your teaching at risk.

There's more...

Here is some additional information that may help you on a module hunt.

Types of modules

In order to get a sense of how modules will work, you need to have an understanding of the distinction between different module types. The following table describes common module types. Amid the array of modules available, the majority are blocks and activity modules.

Activity module

Activity modules deliver information or facilitate interactivity within a course. Links to activity modules are added on a course main page and the activity module itself appears on a new page when clicked. Examples in the core installation are 'Forums' and 'Quizzes'.

Assignment type

Assignment types are a specific type of activity module that focus on assessable work. They are all based on a common assignment framework and appear under 'Assignments' in the activities list. Examples in the core installation are 'Advanced upload of files' and 'Online text' assignments.

Block

Blocks usually appear down each side of a course main page. They are usually passive, presenting specific information, and links to more information and activities. A block is a simpler type of module. Because they are easy to create, there are a large number of these in the Modules and plugins database. Examples in the core installation are the 'Calendar' and 'Online Users' blocks.

Course format

A course format allows the structure of a course main page to be changed to reflect the nature of the delivery of the course, for example, by schedule or by topic.

Filter

Filters allow targeted text appearing around a Moodle site to be replaced with other content, for example, equations, videos, or audio clips.

Integration

An integration module allows Moodle to make use of systems outside the Moodle instance itself.

Question type

Within a quiz, question types can be added to enable different forms of questions to be asked.

Checking your version

If you are setting up your own Moodle instance for teaching or just for testing, take note of the version you are installing.

If you have access to the Site Administration interface (the Moodle site root page when logged in as an administrator), clicking on Notifications will show you the version number near the bottom, for example Moodle 1.9.8 (Build: 20100325). The first part of this is the Moodle version; this is what you need when searching through modules on the Modules and plugins database. The second part, labeled "Build" shows the date when the installed version was released in YYYYMMDD format. This version information reflects what is stored in the /version.php file.

If you are not the administrator of your system, consult the person who is. They should usually be able to tell you the version without looking it up.

Note

Moodle 2.0

The next version of Moodle to follow version 1.9 has been "on the cards" for some time. At time of writing, only preview versions of Moodle 2.0 have been released. The process of installing modules will not change in the new version, so most of the information in this book will still be valid. You will need to look for versions of modules ready for Moodle 2.0 as earlier versions will not work without adjustment. As modules are usually contributed by volunteers, there may be some waiting before this happens; the best way to encourage this re-development is to suggest an improvement for the module on the Moodle bug tracker system at http://tracker.moodle.org/.

See also

  • Adding modules to Moodle

 

Adding modules to Moodle


Once you've found a module you would like to test, you need to know how to add and install that module.

Getting ready

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.

How to do it...

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.

Note

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

moodle/mod/

Assignment type

moodle/mod/assignment/type/

Block

moodle/blocks/

Course format

moodle/course/format/

Filter

moodle/filter/

Integration

(varies by module, look for additional instructions)

Question type

moodle/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.

Note

Be careful that the folder structure from the zip file is maintained when it is extracted.

Unzip the progress.zip file inside the moodle/blocks directory. The path to the root of the module code should be moodle/blocks/progress.

Note

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.

  1. 1. Log in as the system administrator.

  2. 2. Go to the root of the site page.

  3. 3. Look for the block labeled Site Administration.

  4. 4. Click on the Notifications link.

  1. 5. When you click on the Notifications link, a scan will be conducted for new modules and updates of existing modules. Database tables will be set up during this process.

  1. 6. Once the module is installed, you can begin using it. To try the Progress Bar block, go to your course and click on Turn editing on. On the right-most column at the bottom, there is a block containing a list for adding blocks. Select the block name, for example, Progress Bar, to add it.

  1. 7. After you have added a block you will want to change its settings. With editing turned on, look for the Update settings icon on the block. It may vary in appearance when different themes are used, but often it is depicted as a hand holding a pen, or a pen over a notepad:

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.

Note

Knowing how to install a module is useful. Getting the best results from the module when it is used for teaching is more critical. Instructions describing how to set up common modules for practical teaching can be found in the later chapters of this book.

How it works...

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:

  • The Modules and plugins database entry for the module

  • Moodle documentation pages for the module

  • A readme.txt file in the zip package

There's more...

Filters and course formats are installed in a slightly different way compared to blocks, activity modules, and question types.

Filters

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

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.

See also

  • Changing site-wide settings

  • Getting rid of modules

 

Changing site-wide settings


Activity modules and blocks can have site-wide settings that you can adjust. These settings allow consistent changes in the use of the module across an entire site, but even during testing you might want to change such settings. It may be that you just want to see what settings can be changed globally for a module.

Getting ready

To achieve this you must have your web server running with Moodle installed. You need to be able to log in as the administrator, or get the help of someone who can. You should have installed the modules that you want to change settings for.

The following steps assume you have installed the Progress Bar block, which has global settings that can be changed.

How to do it...

Log in as the site administrator and visit the root page of the site. To get to the global settings of a module, on the Site Administration menu, select Modules, then Activities or Blocks, whichever is appropriate. The Progress Bar block is a block, so select Blocks to reach its global settings.

The next step is to select the name of the module. For our test, the module name is Progress Bar. The settings for the module should appear in a form.

Not all activity modules or blocks have global settings. For many modules, this is not necessary. Changes to the global settings affect the configuration of the module, including any instances that may already exist, and any that are added in future, across the site.

There's more...

Be a little careful when changing global settings on a live site. If the module is currently in use, changing global settings can affect the experience of students and teachers. Accidentally using invalid global settings can detrimentally affect the running of the module on the site.

See also

  • Adding modules to Moodle

  • Getting rid of modules

 

Getting modules to speak your language


Another feature of Moodle is its capacity for internationalization. This means that the same software can be used by people speaking different languages. While translations for over 80 languages are available for the core functionality of Moodle, most modules only offer translations for a smaller number of languages, and the language you are teaching in may not be one of them.

Adding a translation for a module is simple to do. If you give your translation to the author of the module, your efforts could also benefit others who speak your language.

Getting ready

It is assumed that you have set the default language for your site. If not, there is more information about adding a language pack and setting the language for your site later.

In order to create a translation for a module, you don't need any real programming experience; it's actually quite simple. Some understanding of HTML tags can be an advantage.

You will need a text editor that can create and edit Unicode files. Word processors are not appropriate for this task, and a simple editor, such as Windows Notepad, is not up to the job. There are many free editors available that will allow you to create and edit Unicode files. One example available for Windows is Notepad++, which is a free editor and is also available as a portable application.

The steps that follow provide an example that assumes the Progress Bar block has been installed.

How to do it...

Where the module was installed, there will usually be a /lang folder. For the Progress Bar block this is located at moodle/blocks/progress/lang. Within this folder, there are folders for different languages, most of them contributed by users around the world.

If you are reading this, it is assumed you have an understanding of English, so have a look inside the en_utf8/ folder. You will see a file called block_progress.php and another directory called help/. The block_progress.php file contains strings of text used in the module, each with a code and the string displayed on screen. Open this file in your editor to see the contents.

Inside the lang/help/progress/ directory there are a number of HTML files, each relating to a help topic. These appear when a help icon (usually appearing as a question mark) is clicked. Opening these files in your web browser will show you the rendered version of these files and opening them in your editor will show you the HTML source of the documents.

To add a new language, you first need to find out the two letter code for your language. To see the list of supported languages visit the following site. You will also see the code letters for each language, and you need to follow the same code. Refer to http://download.moodle.org/lang16/.

Return to the lang/ folder. For the Progress Bar block this is at moodle/blocks/progress/lang/. Assuming that you know English as a second language, copy the en_utf8/ folder and all of its content. Rename the folder with the two letter code for your language, for example, the folder for Afrikaans would be af_utf8/. Be sure to preserve the filenames and folder names within (they do not need translation, only the contents).

Open the block_progress.php file in your Unicode editor. You need to translate the string on the right of the = symbol, within the quotes. Do not translate the code value for the string on the left. You may need to see the string in use to get a sense of what the string is intended for, in order to make an accurate translation. If you include any apostrophes within the string, escape the quote with a slash, as shown in the following example, otherwise the string will be seen as coming to an end earlier than it should.

$string['owners'] = 'Owner\'s';

If there is code within the strings, or HTML tags, that you are unsure about, leave these and just translate any text around them.

You can also translate the HTML files in moodle/blocks/progress/lang/help/progress/ to produce help files in your language. Open these in your editor and translate the text within the files. Again, avoid changing any HTML or code you don't understand. Some help files also include PHP code segments within<?php and ?> tags, avoid changing this content.

Be sure to test your translated files. If, after changing a translation file, nothing appears on the course page, it may be that you have inadvertently created an error. Typically this comes from mismatched quotes around strings. Be sure each starting quote is matched with a closing quote, and any enclosed quotes are escaped. Test that your translated text items are appearing correctly and have an appropriate meaning in your language. Once created, you can use this translation throughout your site.

The final step is to send your translation to the author of the module. You should be able to find their contact details on the Moodle Modules and plugins database entry page for the module. If you have translated the language strings but not translated the help files, this is still a helpful contribution that can be shared. Zip up the files you have translated and e-mail them to the author who will usually be more than happy to include your contribution within the module for future downloaders.

How it works...

Each time the module is loaded, its code is interpreted by the web server and HTML is produced to form the part of the page where the module will appear. Within the code, instead of writing text strings in the author's language, there are calls to functions that check the language and draw the appropriate strings from the language files. This way, all that is needed to change from one language to another is a different language file.

There's more...

If you want to use another language throughout your Moodle site, the following sections are a basic guide for installing and selecting the language.

Adding a language pack

Visit the following site to find if a language pack is available for your language: http://download.moodle.org/lang16/.

If your language is available, download the appropriate zip file and extract its contents to the directory moodle/lang/. If your language is Afrikaans, for example, the language files should be contained in moodle/lang/af_utf8/. Ensure you do not introduce additional unnecessary directory levels.

Selecting a language for your site and courses

A language can be set as a default for courses on the site. This can be overridden at the course level if desired, or by students individually.

To set the default language, log in as administrator and go to the site root page. On the Site Administration menu, select Language, then Language Settings. The default language can be set on the page that appears.

Individual users can set a preferred language in their profile settings.

For individual courses a language can be set. This will "force" students to use that particular language rather than their preferred language.

See also

  • If it's not quite what you want...

 

If it's not quite what you want...


You may have found a module that is helpful, but not exactly what you want. There are a number of ways that you can contribute to changes in modules.

Getting ready

It is assumed that you have installed and tested the module you are interested in.

How to do it...

You can contribute in different ways. You might want to do the following:

  • Thank the author and let them know you are interested in their module

  • Request a new feature

  • Report a bug

The best place to thank the author is on the Modules and plugins database entry for the module. That way others will see that the module is worth testing. You can also give a rating for the module there.

To request a new feature, the best way is to e-mail the author of the module. Authors are not notified of postings on their Modules and plugins entry page, they only see these postings if they check manually. If there is a forum thread for the module, that can also be a good place to contribute ideas for changes. The authors will usually be subscribed to such forums, particularly if they have posted to the forum themselves.

If you find a bug in a module, try to find a method to reproduce the bug. Consider if the bug is something that might only happen on your server for some reason. If you're confident that you have found a bug that needs fixing, create a "new issue" on the Moodle Tracker at this URL: http://tracker.moodle.org/secure/Dashboard.jspa. You will need to create an account. The tracker supports bug resolution and communication between you and the author.

How it works...

Moodle is all about learning and sharing. The people who create contributed modules are often teachers themselves, or people interested in open source software. Please allow time for bugs to be fixed and don't be surprised if the author rejects your feature suggestion. It's really 'their baby'.

Module authors have 'opened up' their source. Within reason, you are free to make changes to the modules so that they suit your needs and possibly the needs of others at your institution. If this is what you want to do, read on.

There's more...

Because the source of modules is made available, you are able to make changes yourself, or to ask other, possibly more technically minded people, to do so for you.

If you do make changes, you need to be willing to share the source code you write with others, and stick to the GNU license conditions. More information is available on the following two pages:

http://docs.moodle.org/en/About_Moodle

http://docs.moodle.org/en/License

Creating your own modules

If you can't find a module to suit your needs in the Modules and plugins database, you can always create your own. Writing and sharing Moodle modules is a rich and rewarding experience. The best part about sharing modules you have written is knowing that your code will be used around the world. The idea you have may also help many others.

There are conventions, libraries, interfaces, and processes that need to be learned. To get started, visit this URL: http://docs.moodle.org/en/Development.

Sometimes, the best way to see how it's done is to look at other authors' code.

 

Getting rid of modules


So you gave that module a go and it wasn't what you wanted. How can you get rid of it?

Getting ready

It is assumed you have your web server running, you have installed a module and now you want to say goodbye to it.

How to do it...

Activity modules (and usually integrations) and blocks can be deleted in two steps.

  • For activity modules, visit the Activities management page (Site Administration | Modules | Activities | Manage Activities). Click on Delete to remove all instances of the module in courses and any tables set up for the module.

  • For blocks, visit the Blocks management page (Site Administration | Modules | Blocks | Manage Blocks). Click on Delete to remove all instances of the block and any tables set up for the block module.

After deleting activity modules and blocks using the Site Administration interface, you still need to delete the code for these modules. If you don't remove the code, the module will be re-installed the next time you visit the Notifications page.

How it works...

As Moodle is modular and relies on many contributed modules to allow flexibility, the means of removing modules needs to be just as simple as adding them. With activity modules and blocks, that is the case. This covers most modules you will want to add. For other types of modules, removal is not so simple. To find out more, read on.

There's more...

Filters, course formats, assignment types, and question types need to be removed in special ways.

Removing filters

To remove a filter, first visit the Filters page (Site Administration | Modules | Filters | Manage Filters) and disable the filter (click on the eye icon). You are then free to remove the files for the filter from moodle/filter/ directory.

Removing course formats

To remove a course format, simply remove its directory from moodle/course/format/. If the format was in use and is no longer available, the format will revert back to a default. It might be wise to check which courses are using the format and set the format for those courses to an acceptable alternative before removing the course format.

Removing assignment types and question types

Unfortunately there is no clean way to remove an assignment type. It's an activity, but it's not an activity module that appears in the list of activities in the Site Administration section. Question types are also somewhat problematic to remove.

If the assignment type or question type is no longer needed, follow these steps.

  1. 1. If you have a live site that services teachers and students, put the site in Maintenance mode (Site Administration | Server | Maintenance mode).

  2. 2. Remove all instances of the assignment type or question type from courses.

  3. 3. Manually remove the tables related to the module from the database. Take care not to remove other tables such as the 'assignment submissions table' which is used generally. If you are not sure about which tables to remove, don't remove any.

  4. 4. Remove the source code.

  1. 5. Take the site out of Maintenance mode.

 

Allowing modules to access outside information


Some modules require access to information outside your server. To achieve this, some modules use the cURL PHP library. If PHP is installed, the cURL library is likely to be available with your web server, but it may be disabled. The XAMPP server has cURL disabled by default.

Getting ready

To enable cURL in PHP 5 on XAMPP, you need to edit the php.ini file. This file is located in the php\ directory under your web server's root directory.

How to do it...

Within the file, locate the following line:

;extension=php_curl.dll

Remove the semi-colon to uncomment this line. This will enable the cURL library. Save the file after making this change. Restart the Apache server for this to take effect.

If you visit the phpinfo page, cURL support should be enabled.

Even with cURL enabled, you may still have problems if your site is hosted behind a firewall. If this is the case, contact your network administrator.

Moodle 1.9 Top Extensions Cookbook
Unlock this book and the full library FREE for 7 days
Start now