1430 Commits

Author SHA1 Message Date
meirzamoodle
3d3dd827fa
MDL-78685 auth_oauth2: Added logged-in status check 2023-08-10 18:32:23 +07:00
Jake Dallimore
c25857a73f
MDL-76842 auth_lti: remove redundant conditional logic and cast 2023-06-08 10:27:19 +08:00
Jake Dallimore
d9fbe7c866
MDL-76842 auth_lti: don't update the user unless data has changed
When receiving data from the LTI launch, or service call, only update
the user record when we know something has changed. This prevents the
creation of many \core\event\user_updated events.
2023-06-08 09:29:56 +08:00
Jake Dallimore
3208e7f182
MDL-76842 auth_lti: don't update the user after membership creation
This isn't required and generates excess events. The only thing update
does, other than update the user fields, is to update the picture, but
in this case, that's unset in membership-based auths anyway, so it's
entirely safe to remove this.
2023-06-08 09:29:56 +08:00
Jake Dallimore
dd507afe4b
MDL-76842 auth_lti: test confirming the erroneous user_updated events
This test will fail until the fix - only updating users when data has
changed - is put in place in the following commit.
2023-06-08 09:29:56 +08:00
Meirza
684343eee7 MDL-77350 auth: Added class properties that are not declared
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
2023-05-16 01:03:01 +07:00
Paul Holden
029474c319
MDL-70189 lang: final removal of deprecated 311 strings. 2023-05-04 14:15:35 +01:00
Jun Pataleta
9095bb0ef9 MDL-78000 upgrade: add the 4.2.0 separation line to all upgrade scripts 2023-04-22 23:17:50 +08:00
Ilya Tregubov
1c25a0cc2f Merge branch 'MDL-77577-master' of https://github.com/andelacruz/moodle 2023-04-20 12:33:23 +08: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
Marina Glancy
4d765cd699 MDL-77164 privacy: typehint test content writer 2023-04-13 09:43:15 +01:00
Marina Glancy
9ffbcce0ac MDL-77164 various: fix mustache template name 2023-04-13 09:43:15 +01:00
Angelia Dela Cruz
374b6d8e0e MDL-77577 Behat: Replaced the use of "Install selected language pack(s)
Evaluated usage of "Install selected language pack(s)" in Behat and
replaced the steps to use generator to install language packs as part
of test setup.
2023-03-21 11:58:30 +08:00
Mathew May
e5ca7766e7 MDL-52805 core: Remove legacy log calls 2023-03-07 13:08:46 +08:00
Andrew Nicols
8fb8bfaf35 MDL-77007 auth: Remove auth-yui-passwordunmask
This was used as part of the auth_config.php configuration system for
the auth subsystem, which was deprecated in Moodle 3.3.

It has never had any other uses in core.

Whilst it would be ideal to deprecate it by replacing with an
alternative, it would be impossible to test.
2023-01-25 14:14:15 +08:00
Andrew Nicols
6a5512c999 MDL-77007 admin: Remove deprecated auth_config.php usage
This was deprecated in Moodle 3.3 and should now be removed.
2023-01-25 14:13:59 +08:00
Jun Pataleta
fad05d7929 Merge branch 'MDL-76583-master-withoutrename' of https://github.com/andrewnicols/moodle 2023-01-19 09:44:48 +08:00
Andrew Nicols
a3cc26f8bb MDL-76583 core: Update uses of external_* classes 2023-01-19 07:34:09 +08:00
Sara Arjona
d62f6ae036 Merge branch 'MDL-61789-master' of https://github.com/meirzamoodle/moodle 2023-01-16 17:08:38 +01:00
David Mudrák
50ba9dc72c MDL-76739 lang: Use the fixed strings in the tests, too 2023-01-12 09:17:27 +08:00
Helen Foster
975a127325 MDL-76739 lang: Import fixed English strings (en_fix) 2023-01-12 09:17:27 +08: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
Matt Porritt
6793891887 MDL-61789 auth_oauth2: Allow admin to choose profile fields for mapping
Update oauth2 to allow mapping of provider attributes against
user profile fields. Fields can also be locked to prevent
user changes.

Co-Authored-By: Michael Milette <michael.milette@tngconsulting.ca>
2023-01-06 13:27:11 +07:00
Jun Pataleta
c6ab792ddf MDL-76497 upgrade: add the 4.1.0 separation line to all upgrade scripts 2022-11-28 14:43:04 +08:00
Jun Pataleta
00bae8b8a4 MDL-76403 versions: bump all versions and requires near release 2022-11-23 09:45:23 +08:00
Paul Holden
1ad023bba6 Merge branch 'MDL-76105-master-enfix' of https://github.com/vmdef/moodle 2022-11-17 16:29:51 +00:00
Jun Pataleta
9cf92be84d MDL-75479 auth_cas: Pass base service URL for the CAS client
Since phpCAS v1.6.0, a required base service URL parameterneeds to be
passed to phpCAS::client(). This is basically the protocol, hostname,
and port number (optional) of the site connecting to the CAS server
in order for it to perform service URL discovery.
2022-11-17 22:10:35 +08:00
Helen Foster
ae2f8cfa67 MDL-76105 lang: Import fixed English strings (en_fix) 2022-11-17 09:44:35 +00:00
Jun Pataleta
0cdfceb0f7 MDL-75479 auth_cas: Bump thirdpartylibs version to 1.6.0 2022-11-17 17:16:55 +08:00
Jun Pataleta
d2bcdfea0e MDL-75479 auth_cas: Update phpCAS to v1.6.0 2022-11-17 17:16:55 +08:00
David Woloszyn
f1b39db4f0 MDL-75479 lib: Set Moodle files after phpCAS upgrade 2022-11-17 16:13:35 +08:00
David Woloszyn
86a3735220 MDL-75479 lib: Upgrade phpCAS to 1.5.0 2022-11-17 16:13:35 +08:00
Eloy Lafuente (stronk7)
621d75dbce MDL-76053 admin: Remove various warnings related to MNet
This partially reverts MDL-73270, where some useful environmental
checks and notifications in the admin UI were added to inform
about different parts of Moodle relying on the "unsupported"
php-xmlrpc extension.

Since then, some changes have happened in core, only available
for Moodle 4.1 and up (see the MDL-70889 mini-epic). Namely:

  - MNet (SSO, roaming, auth, enrol and Mahara portfolio) are not
    using the php-xmlrpc extension anymore, but a pure php library.
  - The xmlrpc webservices protocol, has been move from core to
    the plugins directory, although it continues using the php-xmlrpc
    extension.

Because of that here we are removing all the checks and notifications
related with MNet (not using the extension anymore), but keeping the
webservice plugin ones (still using the extension). Surely if some day the
protocol stops using the extension, we'll be able to remove the
corresponding checks too. But that's future.

Note the associated lang strings have been also removed (not deprecated)
because they were highly specific and hardly reusable:
  - xmlrpcmaharaenabled
  - xmlrpcmnetauthenticationenabled
  - xmlrpcmnetenabled

And very same applies, because MNet doesn't contain anything deprecated
or not supported anymore, hence, straight deletion, to the function:
  - mnet_get_deprecation_notice()

Also, related tests using any of the removed stuff above have been deleted.

In the other side, the "check_xmlrpc_usage" continues existing and
being used both by environment checks and admin notifications but,
as commented above, now it only looks for the xmlrpc webservice
protocol now.
2022-11-08 16:49:18 +01:00
Eloy Lafuente (stronk7)
478f423e2d MDL-76055 auth_mnet: Fix update_enrolments request
Basically this fixes MDL-70833 that was reproduced while
testing the update_enrolments requests. Summary:

- Fixes a typo in table name preventing it to be updated ever.
- Fix outer join that was missing records.
- Stop playing and mixing ids (local and remote).
- Better control which enrolments have to be kept (previously
  they were being deleted immediately after creating them).
- Improve the coding style of inserts.
- Modernise the deletions to use sql helper and to work with 0..n ids.
2022-11-02 15:56:38 +01:00
Eloy Lafuente (stronk7)
8c64ab98ee MDL-76055 mnet: Switch the mnet client to use library
Completely remove all uses if the xmlrpc php extension in
the client and replace them by the phpxmlrpc library.

Very noticeably, remove all the uses of the curl extension
and use phpxmlrpc own curl support.

Working ok for moodle-moodle/mahara sso and mahara portfolio export.
2022-11-02 15:56:38 +01:00
Matt Porritt
1399974bac MDL-73122 Auth: Add test settings for Oauth2
Provide a test page in authentication settings
to allow administrators to test configured oAuth2
providers and to examine the data that is passed
back on a successful test user authentication.

Co-authored-by: Matt Porritt <mattp@catalyst-au.net>
2022-10-03 09:00:44 -04:00
Ilya Tregubov
59123f7373 Merge branch 'mdl-60666-one-user-per-transaction' of https://github.com/petersistrom/moodle 2022-09-05 14:16:44 +04:00
Tomo Tsuyuki
a6a7b16846 MDL-75171 Auth: extend user logged in event
Co-authored-by: Heena Agheda <heenaagheda@catalyst-au.net>
2022-08-19 18:38:59 +10:00
Peter Sistrom
1a06546ea3 MDL-60666 auth_ldap: One transaction per user 2022-08-10 13:49:20 +10:00
Kevin Pham
aeea0b1502 MDL-49795 auth_oauth2: Add missing metadata providers for oauth2 tables 2022-08-03 15:17:05 +10:00
Andrew Nicols
547cae0a02 MDL-74697 libraries: Update all third-party libraries with more metadata 2022-07-22 07:28:47 +02:00
Jun Pataleta
3c6fdb1993 Merge branch 'MDL-71062-master' of https://github.com/sharidas/moodle 2022-07-13 11:39:08 +08:00
Sujith Haridasan
73d604369d MDL-71062 core: Step 1 deprecation of print_error function 2022-07-13 08:20:54 +05:30
Eloy Lafuente (stronk7)
58b56e2395 MDL-71747 upgrade: remove all the < 3.9.0 upgrade steps
This just deletes all the upgrade steps previous to 3.9.0. Some
small adjustments, like tweaking globals can also be applied
when needed.

Also includes an upgrade step to prevent upgrading from any
version < 2020061500 (v3.9.0) as anti-cheating measure.

The next commits will proceed to deprecate / remove functions
that were exclusively (usually belonging to upgradelib) being
used by those, now removed, upgrade steps. This is the list
of code to remove and document in upgrade.txt files:

  - upgrade_analytics_fix_contextids_defaults()
  - upgrade_convert_hub_config_site_param_names()
  - upgrade_rename_prediction_actions_useful_incorrectly_flagged()
  - \mod_forum\task\refresh_forum_post_counts adhoc task.

And these is the code that has NOT been removed
because it may be needed later (no matter there aren't uses now):

  - \core_search\manager::clean_up_non_existing_area(), used by
  - \core\task\clean_up_deleted_search_area_task adhoc task
2022-07-07 19:16:37 +02:00
Jun Pataleta
e60e8bc629 Merge branch 'MDL-73423-master' of https://github.com/marinaglancy/moodle 2022-05-26 00:18:35 +08:00
Eloy Lafuente (stronk7)
9f53b0e965 MDL-73971 phpunit: Move more tests to use correct names and namespaces
Applied the following changes to various testcase classes:

- Namespaced with component[\level2-API]
- Moved to level2-API subdirectory when required.
- Fixed incorrect use statements with leading backslash.
- Remove file phpdoc block
- Remove MOODLE_INTERNAL if not needed.
- Changed code to point to global scope when needed.
- Fix some relative paths and comments here and there.
- All them passing individually.
- Complete runs passing too.

Special mention to:

- Some fixtures, initially defined in the test files have been
  moved to new files in fixtures subdirectory, leaving the unit
  test files clearer:
  - moodle2_course_format_test.php
- Rename wrong named test:
  - baseoptiogroup_test = baseoptigroup_test
2022-05-06 18:29:11 +02:00
Marina Glancy
a0398fdde8 MDL-73423 core_privacy: Calling reset() on objects deprecated PHP8.1 2022-04-29 16:16:07 +02:00
Eloy Lafuente (stronk7)
76f5445451 MDL-74510 upgrade: add the 4.0.0 separation line to all upgrade scripts 2022-04-22 18:45:10 +02:00
Eloy Lafuente (stronk7)
95c8cb7582 MDL-74512 behat: Skip tests requiring lang install/upgrade
By adding the step:

Given remote langimport tests are enabled

We make the execution of scenarios requiring to install /
upgrade lang packs optional, based in the existence of the constant:

TOOL_LANGIMPORT_REMOTE_TESTS

That way, when we are skipping language upgrades with the CFG var:

$CFG->skiplangupgrade = true

We can decide not not execute those tests.

With other words, putting something like this in the config.php
file we will be controlling when to execute or no the behat tests:

    // Disable lang updates on upgrade.
    $CFG->skiplangupgrade = true;
    if (empty($CFG->skiplangupgrade)) {
        // Define it only if we aren't skipping lang upgrades.
        define('TOOL_LANGIMPORT_REMOTE_TESTS', true);
    }
2022-04-17 20:27:57 +02:00