Filters ::: filter_filtercodes
Maintained by Picture of Michael MiletteMichael Milette
The FilterCodes filter enables Moodle content creators to easily customize and personalize site and course content using over 130 plain text tags. Version 2.1 introduces 15 new FilterCodes including conditional tags for groups, cohorts and site managers; two Moodle Workplace specific tags, new date format options, alert UI boxes and much more.

FilterCodes 2.1.0

Moodle 2.7, 2.8, 2.9, 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, 3.10
Released: Monday, November 23, 2020, 5:21 PM

What's new in version 2.1.0 (2020112300)

PHP` MoodleGitHub Issues Contributions welcome License

  • New {ifingroup id|idnumber}{/ifingroup} tags.
  • New {filtercodes} tag. Note: Only works for teachers and above.
  • New {alert style}{/alert} tags (ALPHA).
  • New {ifincohort idname|idnumber}{/ifincohort} tags.
  • New {webpage} tag.
  • New {ifnoteditmode} tag.
  • New {iftenant idnumber|tenantid}{/iftenant} (ALPHA) tags. (Workplace only - in Moodle classic, tenant is assumed to be 1).
  • New {ifworkplace}{/ifworkplace} (ALPHA) tags. (Workplace only - in Moodle classic, will not display tags or content).
  • New {timezone} tag.
  • New {preferredlanguage} tag.
  • New {coursesummary} tag.
  • New {firstaccessdate} tag.
  • New {formsesskey} tag.
  • New Moodle date/time format option for the {firstaccessdate} tag.
  • New Moodle date/time format option for the {coursestartdate} tag.
  • New Moodle date/time format option for the {courseenddate} tag.
  • New Moodle date/time format option for the {coursecompletiondate} tag.
  • New {now dateTimeFormat} tag.
  • New {ifminsitemanager} tag.
  • {courseprogress} and {courseprogressbar} now show zero progress if progress is 0.
  • {alert} to allow for optional contextual class stying.
  • Reorganized and grouped list of tags and made some corrections in the documentation.
  • FAQ: Information on how to patch Moodle to enable FilterCodes in the custom menu.
  • FAQ: Search the file for the word Troubleshooting to now find helpful information.
  • Fixed {diskfreespace} and {diskfreespacedata} on very large/unlimited storage. Note: Greater than about 84,703.29 Yottabyte (YB) is now considered infinite.
  • {profile_field_shortname} now supports textarea type custom fields.
  • Re-enabled the %7Buserid%7D tag.
  • Fixed {courseshortname} so that it displays the site shortname if you are not in a course.
  • Should now be passing 100% of the PHPUnit Tests.
  • Tested to be compatible up to and including Moodle 3.10.

Important notes

Some tags, which are indicated in this documentation as ALPHA, may still require some development and are not guarantied to be implemented or implemented in the same way in future releases. Please let us know if you think they are useful if they work for you or what changes you might like to see.

UI tags are compatible with most Boostrap 4 based themes for Moodle. They have been tested with:

Academi, Adaptable, Aigne, Bandeau, Boost, Classic, Eguru, Enlight Lite, Fordson, Foundation, GCWeb, Klass, Moove, Roshni Lite and Trema.

Version information

Version build number
Version release name
Stable version
MD5 Sum
Supported software
Moodle 2.7, Moodle 2.8, Moodle 2.9, Moodle 3.0, Moodle 3.1, Moodle 3.2, Moodle 3.3, Moodle 3.4, Moodle 3.5, Moodle 3.6, Moodle 3.7, Moodle 3.8, Moodle 3.9, Moodle 3.10
  • Latest release for Moodle 2.7
  • Latest release for Moodle 2.8
  • Latest release for Moodle 2.9
  • Latest release for Moodle 3.0
  • Latest release for Moodle 3.1
  • Latest release for Moodle 3.2
  • Latest release for Moodle 3.3
  • Latest release for Moodle 3.4
  • Latest release for Moodle 3.5
  • Latest release for Moodle 3.6
  • Latest release for Moodle 3.7
  • Latest release for Moodle 3.8
  • Latest release for Moodle 3.9
  • Latest release for Moodle 3.10

Version control information

Version control system (VCS)
VCS repository URL
VCS branch
VCS tag

Default installation instructions for plugins of the type Filters

  1. Make sure you have all the required versions.
  2. Download and unpack the filter plugin.
  3. Place the folder (eg "myfilter") in the "filter" subdirectory.
  4. Visit to finish the installation