-
New Feature
-
Resolution: Fixed
-
Major
-
4.2
-
MOODLE_402_STABLE
-
MOODLE_403_STABLE
-
MDL-77353_Master -
These changes aim to be generic for inclusion into Moodle core, without anything specific to any implementation for user disguises. Building on original implementation work from MDL-1071 and input since, this will add functions to core_user for generating and displaying user details throughout Moodle.
These functions will eventually become the base function calls for displaying user details.
Given that full deprecation of the existing functions is a significant amount of work best approached in smaller patches, this patch hopes to unblock that possibility with low-risk in Moodle 4.2, for these functions to be used in subsequent releases, and a number of other benefits.
The benefits of this patch is to pave the way for a low-risk approach in Moodle 4.2 to:
- Increase uniformity and consistency of the display of user information across Moodle
- Provide better interfaces for developers relying on providing user details across Moodle and for other plugins/enhancements
- Reduce code redundancy/varied implementations of extracting and presenting user data (i.e. eliminate custom code/SELECTs for user info with different approaches in multiple locations)
- Create a basis for future implementation of User Disguises and other enhancements which need to manipulate the presentation of user data depending on various scenarios, inputs, contexts, etc
- Unblock the significant work preventing the eventual deprecation of the existing core_user functions in later versions, allowing this to be managed in parallel across Moodle.
NOTE: This improvement does NOT aim to deprecate the existing functions as this would require significant work. Rather, this is to create a method for future API implementations and future deprecation. To this end, a number of examples of its use have been included in this tracker for testing and demonstration purposes.