MDL-80669 reportbuilder: improved reporting of custom/profile fields.
authorPaul Holden <paulh@moodle.com>
Sat, 22 Jun 2024 13:33:40 +0000 (14:33 +0100)
committerPaul Holden <paulh@moodle.com>
Fri, 19 Jul 2024 09:48:12 +0000 (10:48 +0100)
commit892b68d58cd3dcdb6f40c51c0917641fbb0c5f15
tree44a4c5ecf521e20259ba2164c474e9105210a567
parent554a790bf0a22eb3811d3e28e3a453720ffacb60
MDL-80669 reportbuilder: improved reporting of custom/profile fields.

Make the display of both custom and user profile fields consistent in
column callbacks. The defaults for each should be considered when both
rendering the column data and also when aggregating them (specifically
for numeric columns to ensure calculations are accurate).

When such fields are filtered, and they have user defined default
values then we should also take that into account to ensure that the
same values rendered in columns can always be filtered for.

During this change, I've updated some of the variables to improve
readability and future maintainability of these classes. Annoyingly
there are a non-zero number of changes just for Oracle support.
reportbuilder/classes/local/helpers/custom_fields.php
reportbuilder/classes/local/helpers/user_profile_fields.php
reportbuilder/tests/local/helpers/custom_fields_test.php
reportbuilder/tests/local/helpers/user_profile_fields_test.php