1
0
mirror of https://github.com/moodle/moodle.git synced 2025-02-27 13:32:31 +01:00

2399 Commits

Author SHA1 Message Date
Shamim Rezaie
01e21818fb Merge branch 'MDL-73500' of https://github.com/stronk7/moodle 2022-01-27 11:37:47 +11:00
Eloy Lafuente (stronk7)
100bc51f1d MDL-73485 phpunit: externallib, generator and filter tescase names
All externallib_test, generator_test and filter_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 tests under testing/tests:

1) The core_testing component doesn't exist.
2) But testing/tests are allowed because there is a suite pointing to it (phpunit.xml).
3) So, the only possible namespace for them is "core".
4) And to avoid problems with other core testcases (under lib/tests)
   they have been renamed to have testing_xxxx as prefix.

Finally, also modified calendar/tests/events/events_test.php because it uses
some renamed (core_calendar_externallib_testcase => \core_calendar\externallib_test)
classes.
2022-01-21 19:48:23 +01: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)
d2ad5e8461 MDL-73523 libraries: openssl_free_xxx() methods are deprecated in php80
So we are putting them under a standard PHP_MAJOR_VERSION < 8 condition.

Also, added TODO comments to remember to delete that block of code when
php80 becomes the minimum required versions in the future (Moodle 4.3?).

When possible, an issue has been created upstream, else a comment in
readme_moodle files has been added.

Finally, when the keys being freed were class or object attributes, also
nullify them (but when the calls were part of destructor methods).
2022-01-20 14:48:22 +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
Eloy Lafuente (stronk7)
0098ebccbf MDL-73502 libraries: Avoid uses of get_magic_quotes_xxx() functions
They were deprecated in PHP 7.4 (warning) and have been removed in
PHP 8.0 (error). Plus they were returning false since ages ago (PHP
5.x).

Hence, adding conditional check to see if they are available (h5p
editor) or removing the unreachable code-block when they evaluated
to true.

Also, modified the corresponding moodle_readme files to document
the change.
2022-01-07 00:40:46 +01:00
Eloy Lafuente (stronk7)
511801cb46 MDL-73352 phpunit: lib_test and locallib_test testcase names
All lib_test and locallib_test classes:

- Namespaced with component (and API whenever makes sense).
- Fixed incorrect use statements with leading backslash.
- Changed code to point to global scope when needed or add new uses.
- All them passing individually.
- Complete runs passing too.

Special mention to tests under login/tests:

1) The core_login component doesn't exist.
2) But login/tests are allowed because there is a suite pointing to it (phpunit.xml).
3) So, the only possible namespace for them is "core".
4) And to avoid problems with other core testcases (under lib/tests)
   they have been renamed to have login_xxxx as prefix.
2021-12-30 16:21:42 +01:00
Jun Pataleta
80c17cd2a0 Merge branch 'MDL-72701-master' of https://github.com/andrewnicols/moodle 2021-12-23 12:10:46 +08:00
Andrew Nicols
bb9741d472 MDL-72701 unit tests: Fix broken @covers annotations 2021-12-21 09:24:00 +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
Ilya Tregubov
6f44f008d8 Merge branch 'MDL-73278' of https://github.com/stronk7/moodle 2021-12-10 18:51:40 +02:00
abgreeve
05a6bca72c MDL-72090 behat: Deprecation of enrolment behat step.
i_add_enrolment_method_with() is now deprecated, please use
i_add_enrolment_method_for_with() instead.
2021-12-09 11:13:35 +08:00
abgreeve
fcd4de8639 MDL-72090 navigation: Update to behat feature files for navigation.
This updates feature files to use the new steps to navigate to certain
pages.
2021-12-09 11:13:35 +08:00
abgreeve
8a5e36fa06 MDL-72090 navigation: Update to existing behat steps.
This creates new general behat steps for navigating in theme
boost and classic.
2021-12-09 11:13:35 +08:00
Eloy Lafuente (stronk7)
deb0e76eee MDL-73278 phpunit: Rename already namespaced classes to match file name
These are the only cases 100% safe to apply the renaming of the
testcase class names to match the file names.

All other cases are not safe, because they are missing namespace
and may enter into name conflicts. Adding namespaces is not as
simple as imagined because it implies to, also, add a good number
of modifications to core. See the issue for more details.
2021-12-07 23:54:29 +01:00
Ilya Tregubov
638c8c452c Merge branch 'MDL-72875-master-v2' of https://github.com/peterRd/moodle 2021-12-03 14:29:59 +02:00
Peter Dias
e0d7dbd022 MDL-72875 course: Introduce tertiary nav in participants
- Introduce tertiary nav in the participants page
2021-12-02 13:09:12 +08:00
Juan Leyva
10a6e99ea2 MDL-73084 enroll: Return timemodified field in get_users_courses 2021-11-23 15:59:04 +01:00
Sara Arjona
dc0e7a45df Merge branch 'MDL-70721-master' of git://github.com/rezaies/moodle 2021-11-18 15:18:51 +01:00
Shamim Rezaie
652392d932 MDL-70721 output: remove {{#quote}} wherever it was misused
Also use the new {{#cleanstr}} helper where it was more appropriate
than the {{#str} helper.
2021-11-16 10:08:06 +11:00
Mathew May
bdffbe3e48 MDL-65799 enrol: Final deprecations 2021-11-10 15:22:43 +08:00
Andrew Nicols
8629c6b539 Merge branch 'MDL-71571-master' of https://github.com/kabalin/moodle 2021-10-19 11:23:06 +08:00
Luca Bösch
ce96fcc06a MDL-72590 enrol: Course in success message after unenroll passes filter 2021-10-18 16:15:22 +02:00
Eloy Lafuente (stronk7)
8515a0560f MDL-72807 behat: Add a few more @skip_chrome_zerosize tags
This is the 3rd round adding the tags to some scenarios
detected to be failing with zerosize problems lately.

Note that @ MDL-71108, the final solution will happen, say
switching to own webdriver till the upstream one is fixed
or whatever. Our @skip_chrome_zerosize solution is just a
workaround to have all those scenarios detected and ignored
by normal runs.
2021-10-14 16:12:20 +02:00
Dan Marsden
988936e15e MDL-61564 enrol_cohort: Allow multiple cohort selection. 2021-10-04 09:44:13 +13:00
Ruslan Kabalin
80bcf0d740 MDL-71571 enrol_meta: Add webservices for adding and deleting instances. 2021-09-29 21:17:52 +01:00
Andrew Nicols
98421046dc MDL-69364 enrol: Improve setting of save button 2021-09-20 12:07:30 +08:00
Jun Pataleta
385438b463 Merge branch 'MDL-72589' of https://github.com/stronk7/moodle 2021-09-16 09:46:56 +08:00
Eloy Lafuente (stronk7)
9f9fe79c26 MDL-72589 behat: Add @skip_chrome_zerosize to failing scenarios
All the scenarios failing with Chrome zero-size errors are
getting the @skip_chrome_zerosize to be able to keep them apart from
regular runs. See MDL-71108 for more information about
that error.

They will be run by another job, specifically using that tag to
keep them failing and under control.
2021-09-15 20:25:11 +02:00
Eloy Lafuente (stronk7)
2f578362eb Merge branch 'MDL-72192' of git://github.com/paulholden/moodle 2021-09-14 22:17:19 +02:00
Eloy Lafuente (stronk7)
2d9efcf7c8 Merge branch 'MDL-71999-master' of https://github.com/danielneis/moodle 2021-08-31 23:15:41 +02:00
Paul Holden
492b19db2c MDL-72192 user: observe fullname capability in selector context. 2021-08-31 12:17:28 +01:00
Trisha Milan
c0ed64350c MDL-37616 enrol_cohort: Add suspend only unenrolaction 2021-08-13 10:55:12 +10:00
Daniel Neis Araujo
57454180b2 MDL-71999 enrol: enrol_imsenterprise_allow_group_member_remove global 2021-06-23 13:22:18 -03:00
Andrew Nicols
4f422785c6 MDL-71113 javascript: Improve basic JS Documentation 2021-06-18 09:38:05 +08:00
Andrew Nicols
92179b7057 MDL-71113 js: Fix all jsdoc warnings 2021-06-18 09:38:05 +08:00
sam marshall
171313781d MDL-71836 core_enrol: Cannot search for users by username 2021-06-02 14:52:43 +01:00
Luca Bösch
19d7c11b60 MDL-71373 core_enrol: localize "close" in role manager. 2021-05-14 14:18:52 +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
Ilya Tregubov
cf1cf222e7 MDL-66431 core: Fix behat tests.
Move activity creation to data generators. Only fixing those
tests failing due to removing usemodchooser preference.
2021-05-01 16:22:03 +02:00
Adrian Greeve
98edee3c4a Merge branch 'MDL-71235-master' of https://github.com/dcai/moodle 2021-04-29 14:42:35 +08:00
Dongsheng Cai
36bc7b07db MDL-71235 webservices: add activity completion data to web services 2021-04-29 13:52:32 +10:00
Sara Arjona
0084f9c762 Merge branch 'MDL-71244-master' of git://github.com/lucaboesch/moodle 2021-04-28 09:17:28 +02:00
Andrew Nicols
c53d6ffdbe Merge branch 'MDL-70909-master' of git://github.com/ferranrecio/moodle 2021-04-28 10:20:03 +08:00
Luca Bösch
6ab749558e MDL-71244 enrol_manual: Add bootstrap classes to buttons 2021-04-27 17:29:20 +02:00
Ferran Recio
45048b8796 MDL-70909 core: add cannotmatchanyrows to capabilities join 2021-04-22 13:16:35 +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
Eloy Lafuente (stronk7)
b60fbb9cd4 Merge branch 'MDL-70099' of git://github.com/paulholden/moodle 2021-04-17 09:40:19 +02:00