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

Report builder "select" filter should be easier to extend

    XMLWordPrintable

Details

    Description

      The following methods are defined as private in the \core_reportbuilder\local\filters\select class, meaning we can't override them in extending classes:

      • get_operators()
      • get_select_options()

      https://github.com/moodle/moodle/blob/d24a4ab56fe595bb1dd7b0af599e576440e0b68a/reportbuilder/classes/local/filters/select.php#L42-L65

      The use case is for new filters (Rules & Tenants in Workplace) that want to use the same form elements, but only override the available operators and/or options available within the filter

      This enables the filter class itself to define the available options, removing the onus on the caller to do so

      Attachments

        Activity

          People

            pholden Paul Holden
            pholden Paul Holden
            David Matamoros David Matamoros
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            CiBoT CiBoT
            Carlos Castillo, David Matamoros, Mikel Martín Corrales, Paul Holden
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              19/Apr/22

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 35 minutes
                35m