482 Commits

Author SHA1 Message Date
Mathew May
e5ca7766e7 MDL-52805 core: Remove legacy log calls 2023-03-07 13:08:46 +08: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
Peter Sistrom
1a06546ea3 MDL-60666 auth_ldap: One transaction per user 2022-08-10 13:49:20 +10: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
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
Jun Pataleta
70f6b1605b MDL-74471 versions: bump all versions and requires near release 2022-04-13 10:37:36 +08:00
Sara Arjona
49aef9f9bc MDL-73831 adminpresets: Display current/new value for settings
Before applying a preset, the settings are displayed and, in some cases,
the Current/New value columns were empty.
This patch fixes it and guarantees this information is updated properly
every time the set_value() method is called.
2022-02-22 12:58:02 +01:00
Eloy Lafuente (stronk7)
7a0d024e60 MDL-73659 phpunit: restore_date, api, rule, plugin, manager & helper
All restore_date_test, api_test, rule_test, plugin_test,
manager_test, helper_test 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:

- All restore_date_test cases have been put under xxx\backup
  level 2 (valid API) namespace.
2022-02-05 00:03:32 +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
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
Sara Arjona
9e4f2a45f8 MDL-72112 admin_presets: Add admin_presets tool 2021-12-03 11:11:37 +01:00
cescobedo
53b9dbdb11 MDL-63207 auth_ldap: Update user profile if field is empty 2021-09-07 22:50:48 +02: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
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
Helen Foster
49efd0b4b6 MDL-71425 lang: Import fixed English strings (en_fix) 2021-05-04 14:51:44 +02: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
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
Sara Arjona
7c99f40d61 Merge branch 'MDL-69521' of https://github.com/stronk7/moodle into master 2020-09-09 08:08:06 +02:00
Eloy Lafuente (stronk7)
74ee34fd87 MDL-69521 core: Move all comments in code from 4.1 to 3.11 2020-09-08 18:59:30 +02:00
Eloy Lafuente (stronk7)
fd0b332db3 Merge branch 'MDL-69510-master' of https://github.com/snake/moodle into master 2020-09-08 15:27:29 +02:00
Paul Holden
73e090e793 MDL-69492 auth_ldap: normalise member distinguished name config. 2020-09-04 08:25:50 +01:00
Jake Dallimore
0d6e5f2bc2 MDL-69510 admin: make ldap configuration warnings clear 2020-09-03 10:21:07 +08:00
Andrew Nicols
39ae77ca65 Merge branch 'MDL-67419-master' of git://github.com/farhan6318/moodle 2020-09-02 08:54:27 +08:00
Andrew Nicols
7d06558681 Merge branch 'MDL-69271' of https://github.com/stronk7/moodle 2020-08-20 07:34:18 +08:00
Eloy Lafuente (stronk7)
fbb0767536 MDL-69475 versions: bump all versions and requires in master
version = 2021052500 release version
requires= 2021052500 same than version

Why 20210525? (25th May 2021) ?

Because master is going to be Moodle 4.0, to be released
on November 2021. And, until then, we are going to have
a couple of "intermediate" releases:

- Moodle 3.10 to be released 9th November 2020. (2020110900)

  This version will be using versions from today to 2020110900
  (once it's released the YYYYMMDD part stops advancing).

- Moodle 3.11 to be released 10th May 2021. (2021051000)

  This version will be using versions from 3.10 release to 2021051000
  (once it's released the YYYYMMDD part stops advancing).

That means that all versions from today to 2021051000 are going
to be used by those 2 "intermediate" releases (3.10 and 3.11).

And we cannot use them in master, because it's forbidden to have
any overlapping of versions between branches (or different upgrade
paths will fail).

So, get that 2021051000, let's add it a couple of weeks to cover
the on-sync period (or a 2 weeks delay max!) and, the first version
that master can "own" in exclusive (without any overlap) is, exactly,
25th May 2021, hence our 20210525.
2020-08-18 00:47:15 +02:00
Eloy Lafuente (stronk7)
a59fc3fc56 MDL-69271 auth_ldap: Don't assume any ordering, just verify matches
Both ldap or the DB can return information in a non-consistent
ordering leading to events to be generated in different order.

And current tests are, right now, assuming a given order.

Note this is a rare random, but it's happening, so better
fix it, see the issue for some more details.

So we just do the tests ordering immune, verifying that all the
expected events have been triggered and done. Irrespectively of their order.
2020-08-14 13:40:06 +02:00
Farhan Karmali
470f94dc46 MDL-67419 admin: New admin setting for lang during user creation 2020-08-10 18:34:19 +05:30
Eloy Lafuente (stronk7)
b764343e5a MDL-69044 upgrade: add 3.9.0 separation line to all upgrade scripts 2020-06-14 13:08:09 +02:00
Eloy Lafuente (stronk7)
115cc0214f MDL-68973 versions: bump all versions and requires near release
version = 2020061500 release version
requires= 2020060900 current rc1 (week7roll1) version
2020-06-09 16:23:09 +02:00
Eloy Lafuente (stronk7)
49d1ce3ac2 MDL-67118 auth_ldap: add pagesize/subcontexts test provider
With that provider we'll be explicitly covering that any
pagesize and subcontexts search is returning results consistently
so the internal paging/servercontrols work as expected.
2020-01-16 19:16:14 +01:00
Eloy Lafuente (stronk7)
988f9bf5b5 MDL-67118 auth_ldap: paged results functions deprecated php74 and up
Starting with php74 the following functions are deprecated:
- ldap_control_paged_result()
- ldap_control_paged_result_response()

Starting with php73, ldap servercontrols were included. One of those
servercontrols, LDAP_CONTROL_PAGEDRESULTS, is the one in charge of
controlling paged results.

So, we are going to add some conditional code here:

1) if php < 7.3, use old paged result functions.
2) if php >= 7.3, switch to LDAP_CONTROL_PAGEDRESULTS servercontrol.

With a TODO about removing 1) in Moodle 4.1, once php73 becomes required.
2020-01-16 19:16:14 +01:00
Sara Arjona
a26cfe71d3 MDL-65809 upgrade: clean < 3.5.0 upgrade steps
This just deletes all the upgrade steps previous to 3.5.0. Some
small adjustments, like tweaking globals can also be applied
when needed.

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

Previous commits have removed/deprecated all the upgradelib functions
not used anymore in codebase. Deletion has been documented in corresponding
upgrade.txt files:

- upgrade_fix_block_instance_configuration()
- upgrade_theme_is_from_family(), upgrade_find_theme_location()
and linkcoursesectionsupgradescriptwasrun setting
- upgrade_block_positions
- upgrade_fix_config_auth_plugin_names()
 and upgrade_fix_config_auth_plugin_defaults()
- format_xxx_upgrade_remove_numsections(), format_xxx_upgrade_hide_extra_sections()
and format_xxx_upgrade_add_empty_sections()
- filter_mathjaxloader_upgrade_cdn_cloudflare()
and filter_mathjaxloader_upgrade_mathjaxconfig_equal()
- get_assignments_with_rescaled_null_grades()

These have been kept because continue being used by restore:

- \core\task\refresh_mod_calendar_events_task
2019-12-20 12:20:43 +01:00
Sara Arjona
089e918033 MDL-65809 upgrade: remove upgrade_fix_config_auth_plugin_names
These functions were used only by deleted upgrade steps
so it's safe to proceed with straight deletion, considering
them internal. Deletion has been documented in corresponding
upgrade.txt files:

- upgrade_fix_config_auth_plugin_names()
- upgrade_fix_config_auth_plugin_defaults()
2019-12-20 12:20:43 +01:00
Eloy Lafuente (stronk7)
492d047d11 MDL-67284 upgrade: add 3.8.0 separation line to all upgrade scripts 2019-11-17 11:40:19 +01:00
Eloy Lafuente (stronk7)
d5be859063 MDL-67199 versions: bump all versions and requires near release
version = 2019111800 release version
requires= 2019111200 current beta (week7roll1) version
2019-11-12 17:57:08 +01:00
cescobedo
0504254f1d MDL-59524 general: Remove strings deprecated in 3.4 2019-08-12 00:13:08 +02:00
Helen Foster
08a114cf40 MDL-66003 lang: Import fixed English strings (en_fix)
Significant string changes:

* moodleorghubname,core_admin and
  sitemustberegistered,message_airnotifier - 'Moodle.net' changed to
  'Moodle'

* registration_help,core_admin and registermoochtips,core_hub - removed
  erroneous 'access to Moodle.net our course sharing platform'

* trackingtype_help,mod_forum and formnotavailable,core_grading and
  showgrades_help,core and rolewarning_help,core_rating -
  'Administration block' changed to 'Actions menu or admin block',
  'navigation block' changed to 'navigation drawer or block'
2019-06-25 18:00:51 +02:00
Eloy Lafuente (stronk7)
3572a25cc3 MDL-65644 upgrade: add 3.7.0 separation line to all upgrade scripts 2019-05-20 19:35:05 +02:00
Eloy Lafuente (stronk7)
c9a1a6341c MDL-65571 versions: bump all versions and requires near release
version = 2019052000 release version
requires= 2019051100 current beta (week6roll2) version
2019-05-12 23:46:34 +02:00
Helen Foster
f715376907 MDL-65537 lang: Import fixed English strings (en_fix)
Significant string changes:

* isdataunique_help and isfieldrequired_help,core_customfield -
  explanatory wording
* forum:cantogglefavourite,mod_forum - 'Can toggle favourites.'
  changed to 'Star discussions'
2019-05-10 10:17:47 +02:00
Helen Foster
38dc5b9677 MDL-64943 lang: Import fixed English strings (en_fix)
Significant string changes:

* importgroups_help,core_group - Correcting optional fieldnames
  (removing picture, hidepicture and adding groupidnumber, groupingname
  and enablemessaging)

* penaltyforeachincorrecttry_help,core_question - additional paragraph
  about scoring logic

* resultdownloadready,tool_dataprivacy - wording corrected (no need to
  go to a download page)

* auth_dbfielduser,auth_db - varchar data type requirement
2019-02-28 09:50:18 +01:00
Eloy Lafuente (stronk7)
89da3f67e4 Merge branch 'MDL-64071-master' of https://github.com/UniGe/moodle 2019-02-06 17:56:59 +01:00
Eloy Lafuente (stronk7)
2c4463bf0f Merge branch 'MDL-64509-master-enfix' of git://github.com/mudrd8mz/moodle 2019-01-08 16:17:06 +01:00
Helen Foster
65d70aa81b MDL-64509 lang: Import fixed English strings (en_fix)
Significant string change: enablerunnow_desc,tool_task - including
mention of pathtophp requirement
2019-01-07 14:40:34 +01:00
Eloy Lafuente (stronk7)
a12207be25 MDL-63276 upgrade: clean < 3.2.0 upgrade steps
3.7 (min PHP 7.1) requires 3.2 (first version supporting PHP 7.1)

This just deletes all the upgrade steps previous to 3.2.0. Some
small adjustments, like adding missing MOODLE_INTERNAL or tweaking
globals can also be applied when needed.

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

Next commit will get rid of/deprecate all the upgradelib functions
not used anymore in codebase. (note there isn't any this time).
2019-01-03 01:17:17 +01:00