Skip to content

Latest commit

 

History

History
15 lines (11 loc) · 872 Bytes

readme.md

File metadata and controls

15 lines (11 loc) · 872 Bytes

moodle-filter_metadata

The metadata filter plugin has been created as a companion plugin to the metadata local plugin (see https://github.com/PoetOS/moodle-local_metadata). It allows metadata values to be extracted and displayed in place in Moodle text outputs.

To specify a field value to be displayed in a Moodle page, use the following format:

{{metadata::_context_=_instanceid_::_fieldshortname_}}
  • context is a valid context subplugin name. e.g. "course", "module".
  • The "=instanceid" is optional. If specified, instanceid is the Moodle instance id of a context (e.g. course id). If not specified, the filter will attempt to determine if there is a valid instance id from the context of the page being viewed. For example, a course id on a course page, or a module id on an activity page.
  • The fieldshortname is the shorname of a metadata field.