1361 Commits

Author SHA1 Message Date
Jun Pataleta
99c3c9d169 Merge branch 'MDL-73270-master' of https://github.com/HuongNV13/moodle 2022-02-01 11:00:49 +08:00
Huong Nguyen
683375af8b MDL-73270 admin: Warn about xmlrpc webservice protocol enabled
Co-authored-by: Andrew Lyons <andrew@nicols.co.uk>
2022-01-28 09:32:08 +07:00
Eloy Lafuente (stronk7)
5300351831 MDL-73500 general: Remove php < 73 conditional code
This commit removes code that only was being executed by php < 73
and it's 100% safe to do so because Moodle 3.11 and up require
php 73, hence it was not executed ever.

Removed code includes:
- ldap_control_paged_result and ldap_control_paged_result_response
  (that were deprecated in php 73 and have been removed in php 80).
- conditional code in the session manager, where some hacks were
  needed for php < 73. Note that this removes the private function
  append_samesite_cookie_attribute() completely because it was
  doinf nothing (first line was returning for php < 73).
- Also removed the old session.hash_function ini setting because
  it was removed in php 71.

Kept code includes:
- The environmental check_igbinary322_version test has not been
  removed because it doesn't hurt (always returns "ok" for php 73
  sites) and doing it would involve to backport the environment.xml
  file to 39 and 310. Instead, a note has been added to MDL-71747
  in order to get rid of that check for 4.1 and up.
2022-01-21 19:47:55 +01:00
Eloy Lafuente (stronk7)
0c53a3dec8 MDL-73476 phpunit: events, external and search tescase names
All events_test, external_test and search_test classes:

- Namespaced with component[\level2-API]
- Moved to level2-API subdirectory when required.
- Fixed incorrect use statements with leading backslash.
- 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 lib/external/tests/external_test.php:
- external is not a valid component
- hence, its only valid namespace is "core"
- also, it's testing lib/external/externallib.php
- hence, the file (and class) have been renamed to external_externallib_test.php
  (to avoid conflicts with other external_test that may exist in core)
2022-01-14 16:18:39 +01:00
Paul Holden
6ed8458eda MDL-65801 lang: final removal of deprecated 37/38 strings.
The following lang strings have been undepecated, as they are still
in use:

* errorcoursewronglypublished, core_hub
* eventrolecapabilitiesupdated, core_role
2022-01-13 09:50:50 +00:00
Sara Arjona
e5c440b3aa MDL-73397 adminpresets: Use new API from auth and quiz
The adminpresets has become an API in order to let plugins, such
as quiz and auth, to overwrite classes for their settings.
2022-01-04 12:13:19 +01:00
Shamim Rezaie
dacfebedf3 Merge branch 'MDL-73348' of https://github.com/stronk7/moodle 2021-12-22 21:19:52 +11:00
Simey Lameze
eadf157068 MDL-72984 admin: make support email setting mandatory 2021-12-20 13:22:35 +08: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
Mathew May
54e098c5a5 MDL-73231 my: Allow my courses to be a homepage 2021-12-13 22:43:28 +08:00
Ilya Tregubov
689bf6fc1e Merge branch 'MDL-72112-master' of https://github.com/aanabit/moodle 2021-12-03 15:11:01 +02:00
Sara Arjona
9e4f2a45f8 MDL-72112 admin_presets: Add admin_presets tool 2021-12-03 11:11:37 +01:00
Matt Porritt
1c77897523 MDL-59115 auth_oauth2: Set all mapped field of user
On account creation by Oauth2 all configured mapped user
fields are now saved in the user profile on user creation.

Co-Authored-By: SKOLL Learning Technologies
2021-12-01 03:16:19 +00:00
abgreeve
0492b069be MDL-69371 core_renderer: New core language renderable. 2021-10-19 13:47:46 +02:00
abgreeve
d236b2ec56 MDL-69371 core_login: simplification of behat steps 2021-10-19 13:47:05 +02:00
Bas Brands
47bbfe0f4f MDL-69371 theme_boost: redesign the moodle login page 2021-10-19 13:47:04 +02:00
Andrew Nicols
11ebfe601c MDL-72173 behat: Respect login page preference 2021-09-16 20:47:18 +08:00
Andrew Nicols
92018f6971 MDL-72173 behat: Fix typo Logout <> Log out 2021-09-16 15:03:07 +08:00
Andrew Nicols
ad8283a80f MDL-72173 behat: Add tests for login/logout steps 2021-09-16 12:20:37 +08:00
Andrew Nicols
41ebf95bbe MDL-72173 behat: Automatically log user out on behat login 2021-09-16 12:13:26 +08:00
Andrew Nicols
93cb87cddb MDL-72173 behat: Add and use behat logout URL 2021-09-16 12:13:26 +08:00
Andrew Nicols
441f313217 MDL-72173 behat: Switch to behat login URL 2021-09-13 11:20:35 +08:00
Eloy Lafuente (stronk7)
69cdde9835 Merge branch 'MDL-63207-master' of git://github.com/cescobedo/moodle 2021-09-09 12:58:16 +02:00
cescobedo
53b9dbdb11 MDL-63207 auth_ldap: Update user profile if field is empty 2021-09-07 22:50:48 +02:00
Sujith Haridasan
03093b42b8 MDL-71160 auth_db: Use strict comaprison
Use strict comparison to avoid type juggling.

Signed-off-by: Sujith Haridasan <sujith@moodle.com>
2021-09-07 09:04:23 +02:00
Paul Holden
d663d92357 MDL-71976 auth_shibboleth: consistent session parsing during logout. 2021-09-07 09:04:23 +02:00
Andrew Nicols
891d1bfad3 MDL-71055 behat: Update core settings to use generator
These changes have only been applied to settings which were already
using settings names and values, but which were still using the UI.
2021-08-23 12:23:03 +08:00
Michael Milette
de91d620f2 MDL-58395 auth_ldap: User sync now brings problem details and continue
Co-authored-by: Iñaki Arenaza <iarenaza@mondragon.edu>
2021-08-19 19:53:22 +02:00
Mikhail Golenkov
bdba9f695d MDL-72135 auth_mnet: Remove rand() from mnet cron task 2021-08-14 10:54:00 +10:00
Paul Holden
5bc561ee7a MDL-71957 auth_shibboleth: safer session retrieval during logout. 2021-07-08 23:30:34 +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
Eloy Lafuente (stronk7)
9b522367a0 Merge branch 'MDL-71425-master-enfix' of git://github.com/mudrd8mz/moodle 2021-05-04 23:39:32 +02:00
David Mudrák
eaa157d6ff MDL-70804 mnet: Use proper DML method to get records from the table
This improves the code and avoids the risk of SQL injection through the
malicious XML-RPC request from the MNet peer.
2021-05-04 17:23:11 +02:00
Helen Foster
49efd0b4b6 MDL-71425 lang: Import fixed English strings (en_fix) 2021-05-04 14:51:44 +02:00
Marina Glancy
ef3d6a3d70 MDL-71051 core_user: use user profile generator in all tests 2021-04-28 11:47:21 +02:00
abgreeve
8a53fe7f6b Merge branch 'MDL-28452-master' of git://github.com/bmbrands/moodle 2021-04-22 09:38:50 +08: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
Marina Glancy
0152fdbdff MDL-71017 oauth2: configure some oauth2 services for login only 2021-04-20 10:50:40 +02:00
Peter Dias
809d700ad0 MDL-70306 auth: Update the thirdpartylib.xml 2021-03-15 11:09:30 +08:00
Eloy Lafuente (stronk7)
8cf7878e18 Merge branch 'MDL-70424-auth-avoid-changes' of https://github.com/brendanheywood/moodle 2021-03-04 00:27:53 +01:00
Sander Wind
c9855a8b20 MDL-70668 auth: Fix secret validation during user confirmation
Co-authored-by: Michael Hawkins <michaelh@moodle.com>
2021-03-02 23:44:24 +01:00
Brendan Heywood
300213ee2e MDL-70424 auth: Avoid random changes to $CFG->auth 2021-02-23 11:40:57 +11:00
Sara Arjona
7d24686e59 Merge branch 'MDL-69308' of https://github.com/stronk7/moodle 2021-01-14 12:03:30 +01:00
Eloy Lafuente (stronk7)
77342b96fc MDL-69308 upgrade: remove all the < 3.6.0 upgrade steps
This just deletes all the upgrade steps previous to 3.6.0. Some
small adjustments, like tweaking globals can also be applied
when needed.

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

Note that in this case, there wasn't any case of upgradelib
functions being used, hence we haven't to deprecate/remove
anything in codebase. When there is such a need, that is done
in separate commits (one for each function) and documented here.

See MDL-65809 commits for an example removing/deprecating a
good number of functions.
2021-01-13 19:11:19 +01:00
Mihail Geshoski
06a338f00b MDL-68486 auth_shibboleth: Reset convert_data if it uses dataroot file
Upgrade step that resets the 'Data modification API' (convert_data)
setting to its default value if this setting is currently configured
to use a file located within the $CFG->dataroot directory.
2021-01-13 12:34:24 +08:00
Mihail Geshoski
6c51299e30 MDL-68486 auth_shibboleth: Prevent using dataroot files in convert_data
Prevents configuring the 'Data modification API' (convert_data) setting
to use files located within the $CFG->dataroot directory as it exposes
the site to security risks.
2021-01-13 12:34:24 +08:00
Marina Glancy
e72bd85285 MDL-70242 auth_oauth2: set page context and url 2020-11-17 16:47:12 +01:00
Marina Glancy
81fe9e9af5 MDL-68349 auth_db: user_created event should be triggered later 2020-10-30 14:18:02 +01:00
Eloy Lafuente (stronk7)
3a5641cb74 MDL-67673 phpunit: Remove deprecated assertEquals() params
The optional parameters of assertEquals() and assertNotEquals()
are deprecated in PHPUnit 8 (to be removed in PHPUnit 9):

- delta => use assertEqualsWithDelta()
- canonicalize => use assertEqualsCanonicalizing()
- ignoreCase => use assertEqualsIgnoringCase
- maxDepth => removed without replacement.

More info @ https://github.com/sebastianbergmann/phpunit/issues/3341

Initial search done with:

ag 'assert(Not)?Equals\(.*,.*,' --php

Then, running tests and fixing remaining cases.
2020-10-21 12:46:00 +02:00