Filters allows you to specify behaviours of the system within courses and activities. These might be options around specific content or treatments to text added to the site.
A site administrator can enable Filters across the site via the Administration menu within Plugins > Filters > Manage filters.
(The video above is taken from the Plugins and Advanced Features course in the Totara Academy).
To manage filters you can go to Plugins > Filters > Manage filters via the Site administration menu.
Here you will find a page that lists all of the available filters on the site and gives the opportunity to perform a range of actions including:
- Enabling/disabling filter using the Active? column
- Rearranging filters using the arrows in the Order column
- Setting an application destination for the filter with the Apply to column
- Configuring the filter with the Settings column
- Removing the filter from the site with the Uninstall column
Enabling a filter
You can enable or disable any available filter from the Manage filters page (Plugins > Filters > Manage filters) using the Active? column. In this column each filter has a dropdown menu with three options:
- On: The filter is turned on across the site
- Off, but available: The filter is not enabled across the site but can be enabled within a course or activity by a Site Administrator or Editing Trainer
- Disabled: The filter is turned off across the site
Alongside each filter there is a dropdown menu in the Apply to column that has two options:
- Content: Will apply the filter to content within a page only (activities, resources, descriptions etc.)
- Content and headings: Will apply the filter to all content and headings
When a filter is enabled it may have additional settings, these can be managed by clicking on the Settings link alongside the filter on the Manage filters page or by clicking on the filter name in the Administration block.
Common filter settings
There are some common filter settings that apply to all filters and can be configured via Plugins > Filters > Manage filters > Common filter settings.
|Filter uploaded files|
Decide whether to apply enabled filters to uploaded files. You can choose from:
|Filter match once per page|
Within a page any enabled automatic linking filters will only generate a single link for the first matching text instance found on the complete page. All others are ignored.
|Filter match once per text|
Automatic linking filters will only generate a single link for the first matching text instance found in each item of text (e.g., resource, block) on the page. All others are ignored.
|This setting is ignored if the Filter match once per page setting is enabled.|
There are a number of filters available in Totara Learn as standard. These include:
This filter parses Totara Learn texts and will fully render TeX expressions that it finds appearing within specific tokens. The Mathjax filter also improves the look of buttons and preview within the equation editor that is part of the Atto text editor.
|You can also see more on TeX notation.|
|Activity names auto-linking||This filter scans text for activity titles that exist in the same course and creates a link.||To use this filter effectively you should use descriptive activity names. For example; an activity name of 'Test' would cause the word 'Test' to be linked to the activity every time it appears on the course page.|
|Multimedia plugins||This filter associates multimedia files uploaded with the correct media players.||See also Media embedding.|
|Word censorship||This filter blacks out words that are including in the list in the Word censorship settings.||-|
|Algebra notation||This filter converts algebra code into GIF images. It requires the TeX notation filter to be enabled.||-|
This filter will create links to a database entry where the name/title (word or phrase) of the database entry is used within the same course in which the database is located. This includes forum postings, pages, labels, etc.
|If entries are required before viewing, the database auto-linking filter should be disabled. This is because the database auto-linking filter can't determine whether a user has submitted the required number of entries.|
|Email protection||This filter scrambles email addresses in user profiles so that outside search engines and guests can’t see user's email addresses. This protects your users from spammers and other attackers. While the email protection filter scrambles emails for other parts of the Totara Learn system, it will be ignored when displaying emails in reports.||-|
|Display emoticons as images|
This filter converts emoticon characters into images.
For exampleis displayed as .
|Glossary auto-linking||This filter scans text for glossary entry titles and works in the same way as the Activity Names Auto-linking filter. In addition to this filter, individual glossary entries should have the This entry should be automatically linked box checked.||-|
This filter enables resources to be created in multiple languages. When turned on, it looks for <span lang="xx" class="multilang"> tags, which indicates that a text contains multiple languages. Then it selects and outputs the best language for the current user. The language of the resource changes when the user changes their selected language in Totara Learn.
If your site uses a child language pack then the first span tag must be the parent language. For example, if your site uses en_us then the en span tag (as parent language) must be first i.e.
If the course setting for Force language is set to a particular language this filter won't be able to change the displayed language.
Only spaces, tabs and enters can be used between the individual languages in the multi-language block. Please review the HTML in source view.
If you are adding multi-language content to Custom Main menu select Headings and Content in the multi-language filter settings.
The multi-language filter does not work with the course short name. The course's short name is a unique course identifier, so the multi-language filter can't be used.
You may experience issues if trying to use multilang tags alongside another tag, such as those required for the select missing words question type. A limit of 255 characters may apply in some areas when inputting content using multilang tags.
|TeX notation||Allows you to represent mathematical symbols in Totara Learn.||You can also see more on TeX notation.|
|HTML Tidy||This filter checks whether HTML code is XHTML-compliant, tidying where necessary.||-|
|Convert URLs into links and images||This filter will convert valid web addresses into hyperlinks or an associated image.||-|