295 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7)
ba1f804ffa
MDL-65292 style: Fix all function declarations white space
This has been generated running the following Sniffs, all
them part of the Moodle's CodeSniffer standard:
- PSR12.Functions.ReturnTypeDeclaration
- PSR12.Functions.NullableTypeDeclaration
- moodle.Methods.MethodDeclarationSpacing
- Squiz.Whitespace.ScopeKeywordSpacing

All them are, exclusively, about correct spacing, so the changes
are, all them, only white space changes.

Only exceptions to the above are 3 changes what were setting the
return type in a new line, and, when that happens, the closing
parenthesis (bracket) has to go to the same line than the colon.
2024-02-28 23:33:26 +01:00
Sara Arjona
bc82ddcfb5
Merge branch 'MDL-74500' of https://github.com/paulholden/moodle 2024-02-08 15:32:26 +08:00
Paul Holden
597a8ac878
MDL-74500 profilefield_checkbox: override show/empty class methods. 2024-02-07 14:13:48 +00:00
Paul Holden
0ac237d542
MDL-74500 user: method to determine whether to show profile fields.
The new API replaces identical behaviour in existing calling code, but
allows for profile field types to override/separate the logic used to
show the field and determine whether it's empty
2024-01-30 11:33:52 +00:00
Paul Holden
a803f23bd2
MDL-72703 profilefield_text: validate field length when editing.
This also means the same validation is applied elsewhere,  such as
in the upload user tool.
2024-01-16 09:54:08 +00:00
Paul Holden
cb32f17584
MDL-79705 profilefield_checkbox: display data as simple Yes/No. 2023-10-17 16:51:26 +01:00
Jun Pataleta
94bc2cd38b
MDL-79551 versions: bump all versions and requires near release 2023-10-04 13:57:17 +08:00
Michael Aherne
4dffe0f23b MDL-78235 userprofile: Check for defaultdata with isset(). 2023-07-31 19:32:07 +08:00
Paul Holden
2b6d7d300a
MDL-71413 user: final removal of deprecated profile field methods. 2023-05-04 14:16:05 +01:00
Eloy Lafuente (stronk7)
061c9d7ba0 MDL-77940 versions: bump all versions and requires near release
version = 2023042400 release version
requires= 2023041800 current rc1 version
2023-04-18 18:08:09 +02:00
Marina Glancy
8fc1486d36 MDL-77164 various: fix incorrect phpdocs 2023-04-13 11:35:06 +01:00
Juan Leyva
76807203a3 MDL-77726 user: Fix custom user profiles supporting filtering in WS 2023-03-23 18:08:03 +01:00
Paul Holden
25e8971b3a MDL-76873 user: method for returning profile field instance of type.
Re-factor implementation of profile field access within user fields
class to use that already provided by the fields themselves.
2023-02-20 09:24:05 +00:00
Meirza
b79231361b MDL-61789 auth_oauth2: Update profile fields based on data mapping.
After the user creation, the system must call an update function to update profile_fields_*.
We also provided two functions into user/profile/lib.php to get available from other areas.
We added PHP unit testing for new public functions and
the Behat tests for custom profile fields with locked and unlocked statuses.

Co-authored-by: Matt Porritt <matt.porritt@moodle.com>
2023-01-07 20:59:26 +07:00
Ilya Tregubov
9ba9589f09 Merge branch 'MDL-74853-master' of https://github.com/marinaglancy/moodle 2022-12-01 08:55:34 +03:00
Ilya Tregubov
72145fc34d Merge branch 'MDL-72019-master' of https://github.com/meirzamoodle/moodle 2022-12-01 08:55:33 +03:00
Marina Glancy
a800e7e62f MDL-74853 various: add second parameter to htmlentities functions
Default value of the $flag argument changed in PHP 8.1 from ENT_COMPAT to ENT_QUOTES | ENT_SUBSTITUTE
To ensure consistent behavior across different PHP version the second parameter is now required for the functions:
htmlspecialchars(), htmlentities(), htmlspecialchars_decode(), html_entity_decode() and get_html_translation_table()
2022-11-28 16:12:20 +01:00
Jun Pataleta
00bae8b8a4 MDL-76403 versions: bump all versions and requires near release 2022-11-23 09:45:23 +08:00
Meirza
7760f1bf34 MDL-72019 user: Allows data to be formatted when exporting. 2022-11-17 16:28:09 +07:00
Sara Arjona
273e9a4447 Merge branch 'MDL-75380' of https://github.com/AnupamaSarjoshi/moodle 2022-11-16 16:23:39 +01:00
Meirza
8a4d06bcaa MDL-76131 core_user: encode social profile fields data. 2022-11-09 15:49:26 +01:00
Anupama Sarjoshi
9df84d2ff8 MDL-75380 customfields: Fix incorrect links sent when enrolling users 2022-10-20 17:20:30 +01:00
Sujith Haridasan
73d604369d MDL-71062 core: Step 1 deprecation of print_error function 2022-07-13 08:20:54 +05:30
Amaia Anabitarte
d2fb057b7e MDL-73878 core_user: Fixing social fields upgrading issue 2022-05-03 17:32:20 +02:00
Jun Pataleta
70f6b1605b MDL-74471 versions: bump all versions and requires near release 2022-04-13 10:37:36 +08:00
Shamim Rezaie
9efbb2346a Merge branch 'MDL-73684-master' of https://github.com/marinaglancy/moodle 2022-02-07 18:40:39 +11:00
Eloy Lafuente (stronk7)
5aa93e3066 Merge branch 'MDL-72466-master' of https://github.com/bmbrands/moodle 2022-02-02 12:10:18 +01:00
Marina Glancy
3cc217193a MDL-73684 core_user: check edit capability only when user exists 2022-01-28 18:01:08 +01:00
Bas Brands
7c76e1c349 MDL-72466 core_output: dropdown menu alignment 2022-01-27 17:24:20 +01:00
Paul Holden
f69077aa8c MDL-71889 user: help text for profile field max length/user identity. 2022-01-19 11:04:48 +00:00
Paul Holden
9e6bbb4fb8 MDL-73086 user: account for mixed casing of profile field shortname.
Custom profile fields allow for shortnames containing mixed character
casing, which should also be supported within the user fields API
when retrieving said custom fields.

Given that the DML libs convert all selected columns to lowercased
equivalent, we need to do the same when requesting custom fields to
ensure calling code doesn't try to access `->profile_field_Foo`
property when the DB returns `->profile_field_foo` instead.
2021-12-29 15:09:30 +00:00
Eloy Lafuente (stronk7)
e4a2d9c1d4 MDL-73348 phpunit: normalize all privacy provider tests
As far as now all them have correct privacy level2 namespace:
- Move them to "privacy" subdir.
- Rename the files to "provider_test.php", this includes old
  privacy_test.php and privacy_provider_test.php files
- Rename the testcase to provider_test too (to match file name)

Also, change some relative paths and comments to point to new
locations.
2021-12-17 14:21:02 +01:00
Eloy Lafuente (stronk7)
57e6fb7ad9 MDL-73348 phpunit: privacy and privacy_provider testcase names
All privacy_test and privacy_provider_test classes:

- Namespaced with component\privacy.
- Fixed incorrect use statements with leading backslash.
- Changed code to point to global scope when needed.
- Renamed a few files to make all be privacy_test or privacy_provider_test.php
- All them passing individually.
- Complete runs passing too.
2021-12-17 14:21:02 +01:00
sam marshall
5d62223bf0 MDL-72025 Upgrade: Out of memory when updating social profile fields 2021-09-02 13:42:58 +01:00
Amaia Anabitarte
9108771ea3 MDL-71621 core_user: Parents could edit custom fields in child profile 2021-07-23 12:51:39 +02:00
Eloy Lafuente (stronk7)
9d6aa39985 MDL-71583 versions: Add all the missing full-stops to version/requires
It seems that the new phpcs3 checker is now controlling those
line comments that previously were ignored.

This commit just looks for all the cases and bulk-add
them when needed. The bash script (mac) used to add all them is:

while read -r line; do
    arr=(${line//:/ })
    if [[ -n ${arr[0]} ]] && [[ -n ${arr[1]} ]]; then
        echo "  file ${arr[0]}, line ${arr[1]}"
        sed -i "${arr[1]}s/\$/\./" ${arr[0]}
    fi
done < <(find . -name version.php | xargs ag --nomultiline '>(version|requires) *=.*//.*[^;\.]$')
2021-05-11 20:11:07 +02:00
David Mudrák
ad30fde448 MDL-71425 lang: Fix reworded strings in tests 2021-05-04 17:45:18 +02:00
Helen Foster
49efd0b4b6 MDL-71425 lang: Import fixed English strings (en_fix) 2021-05-04 14:51:44 +02:00
Adrian Greeve
d6040d3056 MDL-71051 profilefield_datetime: Fix to missing required param.
The define_after_data method was looking for a required_param
when it should have been an optional parameter. This was causing
error messages when creating a new datetime field.
2021-04-30 13:00:21 +08:00
Ruslan Kabalin
3bf770c801 MDL-71051 core_user: fix issues and address review issues 2021-04-28 11:47:26 +02:00
Marina Glancy
8974874018 MDL-71051 core_user: create user profile field form is now modal form 2021-04-28 11:47:22 +02:00
Marina Glancy
4a159a0947 MDL-71051 core_user: move user profile edit field form to classes 2021-04-28 11:47:22 +02:00
Marina Glancy
60b95cd46f MDL-71051 core_user: editing user profiles - modal form, template 2021-04-28 11:47:22 +02:00
Marina Glancy
880aff7bf9 MDL-71051 core_user: move edit profile category form to classes 2021-04-28 11:47:22 +02:00
Marina Glancy
ef3d6a3d70 MDL-71051 core_user: use user profile generator in all tests 2021-04-28 11:47:21 +02:00
Marina Glancy
9a5fd6fbc1 MDL-71051 core_user: fix mistakes in phpdocs, deprecated unused func 2021-04-28 11:47:11 +02:00
Marina Glancy
5682b9a585 MDL-71051 core_user: always use API when working with profile fields 2021-04-28 11:39:04 +02:00
Bas Brands
0fe5d5faa8 MDL-28452 core_user: add custom profilefield capability
Add a setting to show custom profilefields to self or others
with capability moodle/sit:viewuseridentity in the course context only
2021-04-21 11:22:31 +02:00
Bas Brands
2c89b82e17 MDL-28452 core_user: add behat test for duplicate shortname warning 2021-04-21 11:22:31 +02:00
Bas Brands
f9e1c2587a MDL-28452 core_user: migrate social profile fields
Create a new profile field type, move all existing content of the fields
'icq', 'skype', 'aim', 'yahoo', 'msn' and 'url' in the mdl_user table to
theses new profile fields if needed.

AMOS BEGIN
MOV [aimid,core],[aimid,courseimage,profilefield_social]
MOV [yahooid,core],[yahooid,profilefield_social]
MOV [skypeid,core],[skypeid,profilefield_social]
MOV [icqnumber,core],[icqnumber,profilefield_social]
MOV [msnid,core],[msnid,profilefield_social]
MOV [webpage,core],[webpage,profilefield_social]
AMOS END
2021-04-21 11:22:25 +02:00