-
Bug
-
Resolution: Fixed
-
Minor
-
4.3
-
MOODLE_403_STABLE
-
MOODLE_402_STABLE, MOODLE_403_STABLE
-
MDL-80564-403 -
-
WP Sprint 2024-I1.0 (Atlantic)
While working on MDL-80548 I found a minor bug that I thought would be nice to fix.
In the function get_all_columns() in the classes/local/entities/user.php we get the list of the fields for the name columns passing $override=true
but when we call the fullname() function on the result, we pass it with the $override=has_capability('moodle/site:viewfullnames')
See lines 163, 190 and 375:
https://github.com/moodle/moodle/blob/v4.3.2/reportbuilder/classes/local/entities/user.php#L163-L190
and
https://github.com/moodle/moodle/blob/v4.3.2/reportbuilder/classes/local/entities/user.php#L375
This means that in some edge cases (I must admin, very unlikely), when 'alternativefullnameformat' contains LESS fields that 'fullnamedisplay', we will not get them in the results.
Also the sorting may be off in the scenario like this:
- fullnamedisplay='firstname lastname'
- alternativefullnameformat='lastname, firstname middlename'