Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Differences Between: [Versions 310 and 401] [Versions 310 and 402] [Versions 310 and 403]

Forum summary report filters renderable.

Copyright: 2019 Michael Hawkins <michaelh@moodle.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 363 lines (13 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

filters:: (4 methods):
  __construct()
  prepare_groups_data()
  prepare_dates_data()
  export_for_template()


Class: filters  - X-Ref

Forum summary report filters renderable.

__construct(stdClass $course, array $cms, moodle_url $actionurl, array $filterdata = [])   X-Ref
Builds renderable filter data.

param: stdClass $course The course object.
param: array $cms Array of course module objects.
param: moodle_url $actionurl The form action URL.
param: array $filterdata (optional) Associative array of data that has been set on available filters, if any,

prepare_groups_data(array $groupsdata)   X-Ref
Prepares groups data and sets relevant property values.

param: array $groupsdata Groups selected for filtering.
return: void.

prepare_dates_data(array $datefromdata, array $datetodata)   X-Ref
Prepares from date, to date and button text.
Empty data will default to a disabled filter with today's date.

param: array $datefromdata From date selected for filtering, and whether the filter is enabled.
param: array $datetodata To date selected for filtering, and whether the filter is enabled.
return: void.

export_for_template(renderer_base $renderer)   X-Ref
Export data for use as the context of a mustache template.

param: renderer_base $renderer The renderer to be used to display report filters.
return: array Data in a format compatible with a mustache template.