9.6. Extensions

Administration → Extensions

Notitie

Extensions is only accessible by site administrators.

Extensions in Mahara serve to provide certain functionality in the system. Extensions can be installed at any point and can also be hidden.

9.6.1. Plugin administration

Administration → Extensions → Plugin administration

The Plugin administration lists all the plugins that are currently installed on your Mahara instance and provides a link to the plugin configuration settings where available.

Plugins in Mahara are always installed and can be accessed if users know the URLs and would otherwise have access. Rather than enabling and disabling the functionality, plugins are hidden or made visible by clicking on the hide or show links beside the plugins. When hiding an artefact type plugin, Mahara stops the display of the blocks related to it.

Warning when a plugin is not yet installed

Warning when a plugin is not yet installed

If you added a plugin to your site or if a new plugin was added to Mahara since the last upgrade that you performed, you will need to go through its installation. A plugin that is not yet fully installed is marked with a warning and listed first in its section. Click the Install link to start the installation process.

In order to delete a plugin completely, you must delete the code and all database tables that pertain to the plugin. Additionally, you need to delete it from a number of system tables, e.g. “artefact”, “artefact_config”, “artefact_cron”, etc. As an example, view the information on how to uninstall the My Learning plugin.

Notitie

Core Mahara functionality can be made unavailable to users by hiding it. This may be useful if you connect Mahara to another system that already provides this functionality or if you do not wish your users to use that functionality. However, the decision about hiding a functionality should be considered thoroughly as it may also mean that users may not be able to have as many artefacts available to them as they should have.

In the following, only the plugins that have additional settings are discussed.

9.6.1.1. Blocktype: File / folder

You can decide the default sort order for files displayed in a Folder block and whether viewers of portfolio pages that contain a Folder block should be able to download the contents of the folder as zip file in one go.

Configure the Folder block

Configure the Folder block

  1. Default sort order of files: Decide whether the default sort order for displaying files in a Folder block should be alphabetically ascending or descending.

    Notitie

    Page authors can change the sort order for each block.

  2. Download folders as zip files: If you turn this setting on, you can download the contents of a folder displayed in a Folder block as zip file. Thus, it is very easy for a viewer to grab all files at once and download them to their computer.

    Zie ook

    Site administrators decide in the Artefact type: File settings for how long the zip file is kept on the server.

9.6.1.3. Blocktype: File / internalmedia

Configure which file types users can embed into the Embedded media block. If you disable a file type that has already been used in a block, it will not be rendered any more.

Mahara comes with Flowplayer, a media player that can play FLV, MP4 (in H.264 format) and MP3 files. Videos are embedded and audio files played with the help of this player.

Other video file types can be enabled, but users must have the appropriate software installed on their computers and the respective plugin enabled in their browsers to play them.

Configure the Embedded media block

Configure the Embedded media block

  1. Turn on the file types that you wish your users to be able to show on their portfolio pages.
  2. Width: Choose the default width (in pixels) for a video.
  3. Height: Choose the default height (in pixels) for a video.
  4. Click the Save button to keep your changes.

Notitie

If you allow the embedding of file types that cannot be played by Flowplayer, some users may not have the necessary software installed for displaying these file types.

9.6.1.4. Blocktype: Text

You can convert Note blocktypes to Text blocktypes across the entire instance.

Configure text settings

Configure text settings

  1. Mahara calculates how many notes can be converted. Notes with the following characteristics are included in the conversion process. Notes that:
    • have not been re-used in another block;
    • do not have a license attached;
    • do not use tags;
    • do not have any attachments;
    • have not received any feedback.
  2. Turn on the option Convert “Note” blocks to convert all notes.
  3. Click the Save button to start the conversion process. This may take some time depending on how many notes are to be converted.

Zie ook

If you have a large site, the conversion of notes to text may take a very long time. It can be beneficial to use the new in Mahara 15.04 command-line script.

9.6.1.5. Blocktype: Wall

You can limit the number of characters that are allowed for wall posts in this configuration setting. Existing posts will not be changed.

Configure wall settings

Configure wall settings

  1. Choose the maximum number of characters for your wall posts.
  2. Click the Save button to keep your changes.

9.6.1.6. Artefact type: Comments

Turn comment ratings on to enable 5-star ratings in the feedback section on artefacts and pages.

Notitie

Ratings cannot be on their own and require either a comment or a file attachment.

Enable comment ratings

Enable comment ratings

  1. Turn this option on to enable comment ratings.
  2. Click the Save button to keep your changes.

9.6.1.7. Artefact type: File

You can configure a variety of options for uploading files:

  • Default user quota
  • Default group quota
  • Upload agreement
  • Resize images on upload
  • Profile picture size
  • Comments
  • Folder downloads

9.6.1.7.1. Default user quota

Configure the default user quota

Configure the default user quota

  1. Default quota: You can set the amount of disk space that new users will have as their quota. Existing user quotas will not be changed.
  2. Update user quotas: Turn this option on if you want to update the file quota for existing users with the value under Default quota. Only then will they be updated.
  3. Enforce a site-wide maximum quota: Turn this option on if you do not wish an administrator to go beyond the allowed maximum quota.
  4. Maximum quota: You can set the maximum quota that an administrator can give to a user. Existing user quotas will not be affected.
  5. Quota notification threshold: You can set a percentage for when a user receives a notification about reaching the upload limit for files. They can then decide to delete files to free up space or contact the site or institution administrator to check if they can receive more space.
  6. Site administrator notification: Turn this option on if the site administrator shall receive the quota notification emails for individual users to take action.
  7. Institutional override: Turn this option on if you want to allow institution administrators to set user file quotas and have default quotas for each institution.
  8. Click the Save button at the bottom of the page when you are finished making your changes or continue to the next section on this page.

9.6.1.7.2. Default group quota

Configure the default group quota

Configure the default group quota

  1. Default group quota: You can set the amount of disk space that each group will have as its quota. Existing groups will not be affected.
  2. Update group quotas: Turn this option on if you want to update the file quota for existing groups with the value under Default quota. Only then will they be updated.
  3. Click the Save button at the bottom of the page when you are finished making your changes or continue to the next section on this page.

9.6.1.7.3. Upload agreement

Configure the upload agreement

Configure the upload agreement

  1. Require agreement: Enable this option if you want to force users to agree to certain terms before they can upload a file to the site. They must accept this agreement before they are able to choose a file from their computer to upload to Mahara.
  2. Default agreement: This is the default agreement that will be displayed if you selected the option Require agreement and if you don’t want to use your own custom agreement.
  3. Use custom agreement: If you want to write your own upload agreement, turn this option on in addition to Require agreement.
  4. Custom agreement: If you want to use a custom upload agreement, write it here.
  5. Click the Save button at the bottom of the page when you are finished making your changes or continue to the next section on this page.

9.6.1.7.4. Resize images on upload

Configure the image resizing options

Configure the image resizing options

  1. Resize large images automatically: Enable this option to resize any image that is uploaded to the maximum width and height settings.
  2. User option: Display users the option to resize images automatically in their account settings.
  3. Maximum width: Choose the maximum width (in pixels) to which images will be resized upon uploading.
  4. Maximum height: Choose the maximum height (in pixels) to which images will be resized upon uploading.
  5. Click the Save button at the bottom of the page when you are finished making your changes or continue to the next section on this page.

9.6.1.7.5. Profile picture size

Configure the size of the profile pictures

Configure the size of the profile pictures

  1. Width: Choose the maximum width (in pixels) of the profile pictures for users.
  2. Height: Choose the maximum height (in pixels) of the profile pictures for users.
  3. Click the Save button at the bottom of the page when you are finished making your changes or continue to the next section on this page.

Notitie

All images uploaded to the profile pictures area will be resized to these dimensions if they are larger.

9.6.1.7.6. Comments

Configure the default comment settings for different file types

Configure the default comment settings for different file types

  1. Select All to mark all file types.
  2. Select none to clear your selections from the checkboxes.
  3. Default comment permission: Choose the artefact types which shall have comments enabled per default. Users can override these settings for individual artefacts in the files area. You can enable comments for:
    • archive, i.e. compressed file
    • audio file
    • file
    • folder
    • image
    • profile picture
    • video file
  4. Click the Save button at the bottom of the page when you are finished making your changes or continue to the next section on this page.

9.6.1.7.7. Folder downloads

Configure the folder download settings

Configure the folder download settings

  1. Length of time to keep zip files: Choose the amount of time for how long you want to keep the zip files on the server that are created during the folder download process. The default time frame is 3,600 seconds (1 hour).
  2. Click the Save button when you are finished making your changes.

9.6.1.8. Artefact type: Profile

For profile information you can decide which fields a user must provide when a user account is created manually or via CSV file. These fields are marked mandatory fields.

The profile fields marked searchable fields are available for all logged-in users to search on.

Choose mandatory and searchable profile fields

Choose mandatory and searchable profile fields

  1. Mandatory fields: Select the fields that you wish all users to fill in. Certain fields cannot be deselected.
  2. Searchable fields: Select the fields that can be searched on by others. Certain fields cannot be deselected.
  3. Click the Save button to keep your changes.

9.6.1.9. Authentication: BrowserID / Persona

new in Mahara 15.04 Persona authentication is discontinued as at 30 November 2016. Nobody is able to use that authentication anymore.

When you update to Mahara 15.04.10, Persona authentication will be deactivated, and you cannot re-activate it anymore. You can automatically migrate all accounts that use Persona to internal authentication.

Migrate Persona accounts to internal authentication

Migrate Persona accounts to internal authentication

  1. Institution: The institutions that use Persona authentication are listed.

  2. Number of active Persona users: A list of all users that have Persona. The link takes you to the user search page and displays only the users with Persona.

  3. Auto-migrate Persona users: Switch to “Yes” if you want to migrate all users to internal authentication that have been using Persona authentication. If you don’t do that, they will not be able to log in.

    Notitie

    If an institution does not have an internal authentication set, one will be created so that the users can be moved.

    You will need to inform the users that used Persona as their login to reset their password as no email is sent with the account details. They should go to the “Lost username / password” screen and enter the email address of their Persona account in order to retrieve their username and password.

  4. Click the Save button to migrate the users.

9.6.1.10. Authentication: SAML

If you wish to use SAML authentication anywhere on your site, you must provide the path to your SAML php file in these settings.

Prepare your site for SAML authentication

Prepare your site for SAML authentication

  1. SimpleSAMLphp lib directory: Provide the fully qualified path to the library directory of SimpleSAMLphp, e.g. if the full path to the bootstrap autoload.php is /some_path_to/simplesamlphp_1_3/lib/_autoload.php then this value should be /some_path_to/simplesamlphp_1_3/
  2. SimpleSAMLphp config directory: Provide the fully qualified path to the configuration directory to be used for this Service Provider (SP) SimpleSAMLphp, e.g. if the full path to the config.php is /some_path_to/simplesamlphp_1_3/config/config.php then this value should be /some_path_to/simplesamlphp_1_3/config/
  3. Click the Save button to keep your changes.

9.6.1.12. Search: Elasticsearch

The regular Mahara search is limited to finding users and in certain places titles, descriptions and tags of pages or collections. However, Mahara can be extended to use allow for fulltext search capabilities. The Mahara core project team chose to use Elasticsearch. This is a powerful and extensible fulltext search engine. It does require a Java server, e.g. Tomcat, to run and thus may not be available for small instances of Mahara.

Notitie

Currently, the plugin can only be used for Mahara instances running on a PostgreSQL database. Work is in progress to extend the support for MySQL for Mahara 1.9.

Configure the Elasticsearch plugin

Configure the Elasticsearch plugin

  1. Most of the Elasticsearch configuration needs to be done on the server level. Here you only see the settings, but cannot change them directly.
  2. Cron record limit: Decide on the maximum number of records to be passed from the queue to the Elasticsearch server on each cron run. An empty field or 0 means that there is no limit.
  3. Artefact types: Check the artefact types that you want to include in the search index. Only artefact types that have a hierarchy defined below are valid. You will need to reset artefacts in the queue below for your changes to take effect.
  4. Artefact types hierarchy: Enter the hierarchy for each artefact type separated by | (a pipe). Place each artefact type on a row by itself.
  5. Index reset: View the number of records of each type currently in the queue to be sent to the Elasticsearch server. Items are sent to the Elasticsearch server each time the search plugin’s cron task runs (every 5 minutes).
  6. Click the Reset button to clear the search index and thus deleting all records and requeuing them.
  7. Click the Save button to accept your changes.

Zie ook

You can find more information about Elasticsearch in Mahara on the wiki. There are also some developer notes to get you started.

9.6.1.13. Interaction: Forum

The post delay setting determines the time (in minutes) that users have for editing their forum posts before they are mailed out. Once a forum post has been mailed and further edits are made, the date, time and editor are mentioned in the post.

Set the edit time before the forum post is finalised

Set the edit time before the forum post is finalised

  1. Post delay: Set the time in minutes before a post is finalised and further edits are marked as such.
  2. Click the Save button to keep your changes.

9.6.2. HTML filters

Administration → Extensions → HTML filters

Mahara uses HTML Purifier to filter out malicious code that could threaten the security of the system. If you have code, e.g. iFrames or JavaScript that you wish to use and that otherwise gets filtered out, you will have to write a filter to circumvent that. Filters should always be specific to their purpose and not give ‘carte blanche’ to ensure security as much as possible.

Mahara already comes with a number of installed filters. Others can be uploaded and then installed. If you have created a new set of HTML filters, you can install them by unzipping the files into the folder /htdocs/lib/htmlpurifiercustom and then click the Install button.

Custom filters for iFrames that allow the embedding of media content such as YouTube and WikiEducator allow users to grab the URL of the page on which the media is displayed instead of having to find the actual embed code.

Notitie

You do not necessarily require bespoke filters for media that you wish to embed via <iframe> embed code. If you are happy to use the original embed code, you can add it to the list of allowed iframe sources.

If you wish to be able to paste the URL instead (like for a YouTube video), then you would need a bespoke filter.

9.6.3. Allowed iframe sources

Administration → Extensions → Allowed iframe sources

This feature allows you as site administrator to specify the base URLs for media that you want your users to be able to embed. These iframes are then considered safe and will not be stripped out of a Text or Note block, the External media block or a journal entry where you can use them. You do not have to write bespoke filters for using these iframe sources.

The administrator interface allows you to add and manage these sources easily. Mahara already comes with a number of built-in iframe sources that you can take as examples.

Add and edit allowed iframe sources

Add and edit allowed iframe sources

  1. Site: The base URL of the iframe code.
  2. Display name: What the user will see in the external media block.
  3. Click the Edit button edit to update the display name of an existing iframe source or the favicon source.
  4. Click the Delete button delete to remove an existing iframe source.
  5. Display name: Change the display name of an existing iframe source here after having clicked on the Edit button edit.
  6. Icon host: Choose the base URL where the favicon can be found for the site that you are updating in case it is not fetched automatically.
  7. Click the Save button to keep your changes for this site.
  8. Site: Add a new iframe source by entering its base URL here. Please make sure to leave out the http://. Only letters, digits and . / - _ are allowed.
  9. Display name: Choose a display name for your iframe source. Typically, this is the name of the site that hosts the external content.
  10. Click the Add button to place your new site into the list of allowed iframe sources. If the favicon does not display, edit your site and specify the icon host as per Step 6.

Notitie

Some sites can be reached via a variety of URLs, e.g. GoogleApps, Glogster. You need to provide all possible base URLs to ensure that the iFrames are displayed. If you give the individual sites of one provider the same name, it will only show up once in the list of iFrame sources in the external media block and not clutter the space unnecessarily.

Zie ook

Community members started to collect iFrame sources that they are using on their sites to share which URLs would need to be provided to get the iFrames to work. You can check out the list on the wiki and also add your own iFrame sources there.

9.6.4. Clean URLs

Administration → Extensions → Clean URLs

You can configure your site to use human-readable URLs for user profiles, groups and (group) portfolio pages. For example:

This option allows you to create more memorable URLs.

Zie ook

Please follow the configuration instructions on the wiki for enabling this feature on your site. You need access to the server to do so.

In the administration area you can generate clean URLs for existing users, groups and pages. This is handy when you upgraded from an earlier version of Mahara or want to reset all custom URLs.

Regenerate clean URLs for existing users in bulk

Regenerate clean URLs for existing users in bulk

  1. Click the Submit button to regenerate clean URLs. Please beware that all existing clean URLs are lost.
  2. You see the results of the action at the top of the screen.

Waarschuwing

If you generate clean URLs for all users from here, those who have already changed their URLs will lose their changes and links will be broken. We recommend you use this feature only when upgrading your Mahara site or when things have gone wrong with the clean URL generation.

9.6.5. new in Mahara 15.04 Web services

For web services, please see the separate section.