Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-81826

Manage filters admin screen allows filters which cannot work with format_string to be selected to apply to 'Content and headings'

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 4.1.10, 4.2.7, 4.3.4, 4.4
    • Filters
    • MOODLE_401_STABLE, MOODLE_402_STABLE, MOODLE_403_STABLE, MOODLE_404_STABLE

      In Moodle, filters can be configured to apply to just main content ('Content' option on the managed filters page - leading to them being used during format_text calls) or to 'Content and headings' (leading to them being applied in both format_string and format_text).

      However, some filters are guaranteed to do nothing when called from format_string. For example:

      Therefore, it is terrible usability to let admins select this option.

      A possible solution might be:

      1. Each filter class should have a method like public static can_apply_to_headings(): bool (can default to true in the base class)
      2. Manage filters admin page should check that, and only offer the 'Content and headings' option for filters that can support it.

      This was found while testing MDL-78662.

            Unassigned Unassigned
            timhunt Tim Hunt
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.