Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

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

(no description)

File Size: 275 lines (11 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: custom_fields_test  - X-Ref

Unit tests for custom fields helper

generate_customfields()   X-Ref
Generate custom fields, one of each type

return: custom_fields

test_get_columns()   X-Ref
Test for get_columns


test_add_join()   X-Ref
Test for add_join


test_add_joins()   X-Ref
Test for add_joins


test_get_filters()   X-Ref
Test for get_filters


test_custom_report_content()   X-Ref
Test that adding custom field columns to a report returns expected values


custom_report_filter_provider()   X-Ref
Data provider for {@see test_custom_report_filter}

return: array[]

test_custom_report_filter(string $filtername, array $filtervalues, bool $expectmatch)   X-Ref
Test filtering report by custom fields

param: string $filtername
param: array $filtervalues
param: bool $expectmatch