MDL-76843 quiz: add test to verify random essay stats now work
[moodle.git] / user / upgrade.txt
blob9e2d138b4d0aea92f60d9529f795a21408ffcc68
1 This files describes API changes for code that uses the user API.
3 === 4.2 ===
5 * Added get_internalfield_list() and get_internalfields() in the user_field_mapping class.
6   The get_internalfield_list() returns data in an array by grouping profile fields based on field categories,
7   used for internal field name dropdown in the user field mapping of Oauth2 services
8   The get_internalfields() converts the result from get_internalfield_list() into flat array,
9   used to save/update the profile data when a user uses OAuth2 services.
10 * Added get_profile_field_names() and get_profile_field_list() in the profile_field_base class.
11   The get_profile_field_names() returns the list of valid custom profile user fields.
12   The get_profile_field_list() returns the profile fields
13   in a format that can be used for choices in a group select menu.
14 * New method `core_user::is_current_user`, useful for components implementing permission callbacks for their preferences
16 === 4.1 ===
18 * Added a new method is_transform_supported() in the profile_field_base class.
19   The purpose is to allow the field to be transformed during the export process.
20   It has been implemented in the Date/Time data type (Applied in 4.1, 4.0.6).
22 * user_get_user_details_courses() now accepts an optional second parameter, an array of userfields that should be
23   returned. The values passed into the $userfields parameter must all be included in the return from
24   user_get_default_fields().
25   It also allows you to reduce how much of a user record is required by the method. The minimum user record fields are:
26     * id
27     * deleted
28     * all potential fullname fields
30 * Participant filter is moved to core as an API which can be used in different areas of core by implementing the API
31   and filterable objects. As a part of making the API mature as a core one, these are the js files moved from core
32   user to core library:
33   * user/amd/src/local/participantsfilter/filter.js → lib/amd/src/datafilter/filtertype.js
34   * user/amd/src/local/participantsfilter/filtertypes/country.js → lib/amd/src/datafilter/filtertypes/country.js
35   * user/amd/src/local/participantsfilter/filtertypes/courseid.js → lib/amd/src/datafilter/filtertypes/courseid.js
36   * user/amd/src/local/participantsfilter/filtertypes/keyword.js → lib/amd/src/datafilter/filtertypes/keyword.js
37   * user/amd/src/local/participantsfilter/selectors.js → lib/amd/src/datafilter/selectors.js
38   The following mustache have been moved from core user to core library:
39   * user/templates/local/participantsfilter/filterrow.mustache → lib/templates/datafilter/filter_row.mustache
40   * user/templates/local/participantsfilter/filtertype.mustache → lib/templates/datafilter/filter_type.mustache
41   * user/templates/local/participantsfilter/filtertypes.mustache → lib/templates/datafilter/filter_types.mustache
42   * user/templates/local/participantsfilter/autocomplete_layout.mustache → lib/templates/datafilter/autocomplete_layout.mustache
43   * user/templates/local/participantsfilter/autocomplete_selection.mustache → lib/templates/datafilter/autocomplete_selection.mustache
44   * user/templates/local/participantsfilter/autocomplete_selection_items.mustache → lib/templates/datafilter/autocomplete_selection_items.mustache
45   Class participant_filter now extends core filter api in core user.
47 * The unified_filter function has been finally deprecated and cannot be used anymore
48 * The class \core_user\output\unified_filter has been finally deprecated and removed
50 === 4.0 ===
52 * External function core_user_external::update_users() will now fail on a per user basis. Previously if one user
53   update failed all users in the operation would fail.
54 * External function core_user_external::update_users() now returns an error code and message to why a user update
55   action failed.
56 * New method `core_user\fields::get_sql_fullname` for retrieving user fullname format in SQL statement
57 * The `profile_get_custom_field_data_by_shortname` method now accepts an optional parameter to determine whether
58   to use case-sensitive matching of the profile field shortname or not (default true)
60 === 3.11 ===
62 * Added new core_user/form_user_selector JS module that can be used as the 'ajax' handler for the autocomplete form
63   element implementing the user selector.
64 * Added new external function core_user_external::search_identity(). The main purpose of this external function is to
65   provide data for asynchronous user selectors and similar widgets. It allows to search users matching the given query
66   in their name or other available identity fields.
68 === 3.9 ===
70 * The unified filter has been replaced by the participants filter. The following have therefore been deprecated:
71   * Library functions:
72     * user_get_participants_sql
73     * user_get_total_participants
74     * user_get_participants
75   * Unified filter renderer (core_user_renderer::unified_filter)
76   * Unified filter renderable (\core_user\output\unified_filter)
77   * Unified filter JavaScript (core_user/unified_filter.js and core_user/unified_filter_datasource.js)
78   * Unified filter template (unified_filter.mustache)
80 === 3.6 ===
82 * The following functions have been finally deprecated and can not be used anymore:
83   * useredit_update_picture()
84 * core_user_external::update_user_preferences() now allows to unset existing preferences values.
85   If the preference value field is not set, the preference will be unset.