moodle/user/upgrade.txt
Tomo Tsuyuki 68a5034b67 MDL-72509 core: De-couple participants filter from core_user to core
This implementation will de-couple the participant filter from
core user to core so its easily usable to any api in core or any
community plugin. This removes the dependency from the core_user
and creates a nice api where it can produce filterable objects.

Co-Authored-By: Safat Shahin <safatshahin@catalyst-au.net>
Co-Authored-By: Tomo Tsuyuki <tomotsuyuki@catalyst-au.net>

AMOS BEGIN
 MOV [addcondition,core_user], [addcondition,core]
 MOV [adverbfor_and,core_user], [operator_and,core]
 MOV [adverbfor_andnot,core_user], [operator_andnot,core]
 MOV [adverbfor_or,core_user], [operator_or,core]
 MOV [applyfilters,core_user], [applyfilters,core]
 MOV [clearfilterrow,core_user], [clearfilterrow,core]
 MOV [clearfilters,core_user], [clearfilters,core]
 MOV [filtersetmatchdescription,core_user], [filtersetmatchdescription,core]
 MOV [filterrowlegend,core_user], [filterrowlegend,core]
 MOV [filtertype,core_user], [filtertype,core]
 MOV [match,core_user], [match,core]
 MOV [matchofthefollowing,core_user], [matchofthefollowing,core]
 MOV [placeholdertypeorselect,core_user], [placeholdertypeorselect,core]
 MOV [selectfiltertype,core_user], [selectfiltertype,core]
AMOS END
2022-09-27 12:07:36 +08:00

65 lines
4.0 KiB
Plaintext

This files describes API changes for code that uses the user API.
=== 4.1 ===
* user_get_user_details_courses() now accepts an optional second parameter, an array of userfields that should be
returned. The values passed into the $userfields parameter must all be included in the return from
user_get_default_fields().
It also allows you to reduce how much of a user record is required by the method. The minimum user record fields are:
* id
* deleted
* all potential fullname fields
* Participant filter is moved to core as an API which can be used in different areas of core by implementing the API
and filterable objects. As a part of making the API mature as a core one, these are the js files moved from core
user to core library:
* user/amd/src/local/participantsfilter/filter.js → lib/amd/src/datafilter/filtertype.js
* user/amd/src/local/participantsfilter/filtertypes/country.js → lib/amd/src/datafilter/filtertypes/country.js
* user/amd/src/local/participantsfilter/filtertypes/courseid.js → lib/amd/src/datafilter/filtertypes/courseid.js
* user/amd/src/local/participantsfilter/filtertypes/keyword.js → lib/amd/src/datafilter/filtertypes/keyword.js
* user/amd/src/local/participantsfilter/selectors.js → lib/amd/src/datafilter/selectors.js
The following mustache have been moved from core user to core library:
* user/templates/local/participantsfilter/filterrow.mustache → lib/templates/datafilter/filter_row.mustache
* user/templates/local/participantsfilter/filtertype.mustache → lib/templates/datafilter/filter_type.mustache
* user/templates/local/participantsfilter/filtertypes.mustache → lib/templates/datafilter/filter_types.mustache
* user/templates/local/participantsfilter/autocomplete_layout.mustache → lib/templates/datafilter/autocomplete_layout.mustache
* user/templates/local/participantsfilter/autocomplete_selection.mustache → lib/templates/datafilter/autocomplete_selection.mustache
* user/templates/local/participantsfilter/autocomplete_selection_items.mustache → lib/templates/datafilter/autocomplete_selection_items.mustache
Class participant_filter now extends core filter api in core user.
=== 4.0 ===
* External function core_user_external::update_users() will now fail on a per user basis. Previously if one user
update failed all users in the operation would fail.
* External function core_user_external::update_users() now returns an error code and message to why a user update
action failed.
* New method `core_user\fields::get_sql_fullname` for retrieving user fullname format in SQL statement
* The `profile_get_custom_field_data_by_shortname` method now accepts an optional parameter to determine whether
to use case-sensitive matching of the profile field shortname or not (default true)
=== 3.11 ===
* Added new core_user/form_user_selector JS module that can be used as the 'ajax' handler for the autocomplete form
element implementing the user selector.
* Added new external function core_user_external::search_identity(). The main purpose of this external function is to
provide data for asynchronous user selectors and similar widgets. It allows to search users matching the given query
in their name or other available identity fields.
=== 3.9 ===
* The unified filter has been replaced by the participants filter. The following have therefore been deprecated:
* Library functions:
* user_get_participants_sql
* user_get_total_participants
* user_get_participants
* Unified filter renderer (core_user_renderer::unified_filter)
* Unified filter renderable (\core_user\output\unified_filter)
* Unified filter JavaScript (core_user/unified_filter.js and core_user/unified_filter_datasource.js)
* Unified filter template (unified_filter.mustache)
=== 3.6 ===
* The following functions have been finally deprecated and can not be used anymore:
* useredit_update_picture()
* core_user_external::update_user_preferences() now allows to unset existing preferences values.
If the preference value field is not set, the preference will be unset.