239 Commits

Author SHA1 Message Date
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
Eloy Lafuente (stronk7)
f6711bb394 MDL-67673 phpunit: Fix the return type of template methods
All the setup/teardown/pre/post/conditions template methods
now are required to return void. This was warned with phpunit 7
and now is enforced.

At the same time, fix a few wrong function names,
provider data and param types, return statements...
2020-10-21 12:45:59 +02:00
Andrew Nicols
39ae77ca65 Merge branch 'MDL-67419-master' of git://github.com/farhan6318/moodle 2020-09-02 08:54:27 +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
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
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
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
Andrew Nicols
1eb1087748 MDL-64884 auth_mnet: Version bump 2019-03-07 10:32:18 +08:00
Simey Lameze
942cc5b1da MDL-64884 auth_mnet: deprecate legacy cron() method 2019-03-01 10:01:41 +08:00
Simey Lameze
e425221ee6 MDL-64884 auth_mnet: convert cron to scheduled task 2019-03-01 10:01:37 +08:00
Andrew Nicols
568b7d3fc0 Merge branch 'MDL-64714-master' of git://github.com/cescobedo/moodle 2019-02-13 11:22:24 +08:00
Eloy Lafuente (stronk7)
f706dabd50 Merge branch 'MDL-63785-master' of git://github.com/rezaies/moodle 2019-02-06 00:04:14 +01:00
cescobedo
00b4f9e234 MDL-64714 core_auth: Fix early break foreach in delete_data_for_user 2019-02-05 12:51:34 +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
Shamim Rezaie
a246822931 MDL-63785 auth_mnet: performance improvement 2018-12-10 14:52:12 +11:00
Eloy Lafuente (stronk7)
f47c8f3525 MDL-64300 upgrade: add 3.6.0 separation line to all upgrade scripts 2018-12-02 18:36:40 +01:00
Eloy Lafuente (stronk7)
085353b315 MDL-64282 versions: bump all versions and requires near release
version = 2018120300 release version
requires= 2018112800 current rc2 (week7roll1) version
2018-11-29 18:24:08 +01:00
Helen Foster
0c19b2c8fa MDL-63730 lang: Merge English strings from the en_fix language pack
Significant string changes:

* withselectedusers_help, core - removing mention of 'Add a common note'
  as the option no longer exists
* considereddigitalminor and digitalminor_desc, core - more
  child-friendly wording
* configmessagingallusers, core_admin - clearer explanation
* auth_dbtype, auth_db - fixed broken link
2018-10-26 12:48:40 +02:00
Mihail Geshoski
8b9c13ed5c MDL-63593 auth_mnet: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:50:13 +02:00
Helen Foster
9722f6a25e MDL-62763 lang: Merge English strings from the en_fix language pack
Significant string changes:

* various strings in tool_dataprivacy and tool_policy - 'Data Protection
  Officer' changed to 'privacy officer'
* idnumbermod_help,core - mentioning resource and custom reporting
2018-07-02 11:15:26 +02:00
Eloy Lafuente (stronk7)
00977e984e MDL-62478 upgrade: add 3.5.0 separation line to all upgrade scripts 2018-05-28 13:15:48 +02:00
David Monllao
99a080f12a Merge branch 'MDL-62361' of git://github.com/stronk7/moodle 2018-05-10 09:17:25 +08:00
Victor Deniz
5d5881f0f8 MDL-62269 auth_mnet: Implement privacy API
AMOS BEGIN
 CPY [privacy:metadata:address,core_user],[privacy:metadata:mnet_external:address,auth_mnet]
 CPY [privacy:metadata:aim,core_user],[privacy:metadata:mnet_external:aim,auth_mnet]
 CPY [privacy:metadata:aim,core_user],[privacy:metadata:mnet_external:aim,auth_mnet]
 CPY [privacy:metadata:alternatename,core_user],[privacy:metadata:mnet_external:alternatename,auth_mnet]
 CPY [privacy:metadata:autosubscribe,core_user],[privacy:metadata:mnet_external:autosubscribe,auth_mnet]
 CPY [privacy:metadata:calendartype,core_user],[privacy:metadata:mnet_external:calendartype,auth_mnet]
 CPY [privacy:metadata:city,core_user],[privacy:metadata:mnet_external:city,auth_mnet]
 CPY [privacy:metadata:country,core_user],[privacy:metadata:mnet_external:country,auth_mnet]
 CPY [privacy:metadata:currentlogin,core_user],[privacy:metadata:mnet_external:currentlogin,auth_mnet]
 CPY [privacy:metadata:department,core_user],[privacy:metadata:mnet_external:department,auth_mnet]
 CPY [privacy:metadata:description,core_user],[privacy:metadata:mnet_external:description,auth_mnet]
 CPY [privacy:metadata:email,core_user],[privacy:metadata:mnet_external:email,auth_mnet]
 CPY [privacy:metadata:emailstop,core_user],[privacy:metadata:mnet_external:emailstop,auth_mnet]
 CPY [privacy:metadata:firstaccess,core_user],[privacy:metadata:mnet_external:firstaccess,auth_mnet]
 CPY [privacy:metadata:firstname,core_user],[privacy:metadata:mnet_external:firstname,auth_mnet]
 CPY [privacy:metadata:firstnamephonetic,core_user],[privacy:metadata:mnet_external:firstnamephonetic,auth_mnet]
 CPY [privacy:metadata:icq,core_user],[privacy:metadata:mnet_external:icq,auth_mnet]
 CPY [privacy:metadata:id,core_user],[privacy:metadata:mnet_external:id,auth_mnet]
 CPY [privacy:metadata:idnumber,core_user],[privacy:metadata:mnet_external:idnumber,auth_mnet]
 CPY [privacy:metadata:imagealt,core_user],[privacy:metadata:mnet_external:imagealt,auth_mnet]
 CPY [privacy:metadata:institution,core_user],[privacy:metadata:mnet_external:institution,auth_mnet]
 CPY [privacy:metadata:lang,core_user],[privacy:metadata:mnet_external:lang,auth_mnet]
 CPY [privacy:metadata:lastaccess,core_user],[privacy:metadata:mnet_external:lastaccess,auth_mnet]
 CPY [privacy:metadata:lastlogin,core_user],[privacy:metadata:mnet_external:lastlogin,auth_mnet]
 CPY [privacy:metadata:lastname,core_user],[privacy:metadata:mnet_external:lastname,auth_mnet]
 CPY [privacy:metadata:lastnamephonetic,core_user],[privacy:metadata:mnet_external:lastnamephonetic,auth_mnet]
 CPY [privacy:metadata:maildigest,core_user],[privacy:metadata:mnet_external:maildigest,auth_mnet]
 CPY [privacy:metadata:maildisplay,core_user],[privacy:metadata:mnet_external:maildisplay,auth_mnet]
 CPY [privacy:metadata:middlename,core_user],[privacy:metadata:mnet_external:middlename,auth_mnet]
 CPY [privacy:metadata:msn,core_user],[privacy:metadata:mnet_external:msn,auth_mnet]
 CPY [privacy:metadata:phone,core_user],[privacy:metadata:mnet_external:phone1,auth_mnet]
 CPY [privacy:metadata:picture,core_user],[privacy:metadata:mnet_external:picture,auth_mnet]
 CPY [privacy:metadata:policyagreed,core_user],[privacy:metadata:mnet_external:policyagreed,auth_mnet]
 CPY [privacy:metadata:skype,core_user],[privacy:metadata:mnet_external:skype,auth_mnet]
 CPY [privacy:metadata:suspended,core_user],[privacy:metadata:mnet_external:suspended,auth_mnet]
 CPY [privacy:metadata:timezone,core_user],[privacy:metadata:mnet_external:timezone,auth_mnet]
 CPY [privacy:metadata:trackforums,core_user],[privacy:metadata:mnet_external:trackforums,auth_mnet]
 CPY [privacy:metadata:trustbitmask,core_user],[privacy:metadata:mnet_external:trustbitmask,auth_mnet]
 CPY [privacy:metadata:url,core_user],[privacy:metadata:mnet_external:url,auth_mnet]
 CPY [privacy:metadata:username,core_user],[privacy:metadata:mnet_external:username,auth_mnet]
 CPY [privacy:metadata:yahoo,core_user],[privacy:metadata:mnet_external:yahoo,auth_mnet]
AMOS END
2018-05-09 10:15:20 +01:00
Eloy Lafuente (stronk7)
57ea6753d3 MDL-62361 versions: bump all versions and requires near release
version = 2018051400 release version
requires= 2018050800 current beta+ (week4roll1) version
2018-05-09 02:46:30 +02:00
cescobedo
6291e67b11 MDL-61873 auth: Add privacy implementation for all auth plugins
None of the Auth plugins (except manual and oauth2) have any user preference or database table.
They all implement the null provider.
2018-04-07 11:24:17 +02:00
Andrew Nicols
560ae357a0 Merge branch 'MDL-57564-master-courseorder' of git://github.com/mudrd8mz/moodle 2017-12-18 11:04:20 +08:00
David Mudrák
04985346a2 MDL-57564 enrol: Make use of the new default sort parameter
Now when enrol_get_my_courses(), enrol_get_users_courses() and
enrol_get_all_users_courses() methods automatically reflect the
navsortmycoursessort setting by default, we do not need to manually
compose the sorting any more.
2017-12-06 23:15:17 +01:00
Eloy Lafuente (stronk7)
e4eba4c346 MDL-59159 upgrade: clean < 3.1.0 upgrade steps
LTS (3.5) requires previous LTS (3.1)

This just deletes all the upgrade steps previous to 3.1.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 < 2016052300 (v3.1.0) as anti-cheating measure.

Next commit will get rid of/deprecate all the upgradelib functions
not used anymore in codebase.
2017-12-04 01:18:57 +01:00
Eloy Lafuente (stronk7)
6499085f36 MDL-60784 upgrade: add 3.4.0 separation line to all upgrade scripts 2017-11-12 18:43:30 +01:00
Eloy Lafuente (stronk7)
ba854606e6 MDL-60764 versions: bump all versions and requires near release
version = 2017111300 release version
requires= 2017110800 current rc2 version
2017-11-10 02:52:53 +01:00
John Okely
672f483670 MDL-42834 admin: Removal of httpswwwroot 2017-10-23 12:25:36 +08:00
Eloy Lafuente (stronk7)
29af7b0b4c MDL-57432 upgrade: clean < 3.0.0 upgrade steps
This just deletes all the upgrade steps previous to 3.0.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 < 2015111600 (v3.0.0) as anti-cheating measure.

Next commit will get rid of/deprecate all the upgradelib functions
not used anymore in codebase.
2017-07-10 09:16:55 +01:00
Eloy Lafuente (stronk7)
5e27228335 MDL-58933 upgrade: add 3.3.0 separation line to all upgrade scripts 2017-05-19 19:22:07 +02:00
Eloy Lafuente (stronk7)
d989ee1e03 MDL-58853 versions: bump all versions and requires near release
version = 2017051500 release version
requires= 2017050500 current rc1 version
2017-05-09 02:58:28 +02:00
David Mudrák
2b948c204a MDL-58793 auth: Do not report migrated settings as new ones on upgrade
As a result of fixing the auth plugins config storage in MDL-12689, many
settings would be falsely reported as new ones by
admin/upgradesettings.php. We do not want to confuse admins so we try to
reduce the bewilderment by pre-populating the config_plugins table with
default values. This should be done only for disabled auth methods. The
enabled methods have their settings already stored, so reporting actual
new settings for them is valid.
2017-05-08 11:51:55 +02:00
David Mudrák
31bd102316 MDL-58692 auth: Improve the migration of auth setting names
Some auth plugins used to have a mix of the legacy style of plugin names
in config_plugins table (such as 'auth/mnet') and the new correct
style (such as 'auth_mnet'). Attempting to rename the setting plugin via
low level SQL UPDATE could lead to duplicate key violation.

The patch introduces a new helper function to safely migrate the old
settings to the new ones, eventually informing the admin about the
values mismatch.
2017-05-03 12:02:43 +02:00
David Mudrák
1cb5c7b31f MDL-58631 auth: Clarify documentation of changes in loginpage_idp_list()
This should clarify the new 'iconurl' key returned by the auth plugin's
loginpage_idp_list() method.
2017-04-18 17:00:40 +02:00
David Monllao
b1e8f8bf37 MDL-12689 mod_data: Remove trailing whitespaces 2017-04-04 00:14:35 +02:00
Stephen Bourget
037273d87e MDL-12689: convert auth plugins to use settings.php 2017-04-03 10:50:09 -04:00
Eloy Lafuente (stronk7)
75c57a08fb MDL-57266 upgrade: add 3.2.0 separation line to all upgrade scripts 2016-12-05 17:10:20 +01:00
Eloy Lafuente (stronk7)
04649747a4 MDL-57197 versions: bump all versions and requires near release
version = 2016120500 release version
requires= 2016112900 current rc4 version
2016-11-29 22:57:05 +01:00
David Mudrák
8df850ad6f MDL-46946 user: Make missing required custom fields trigger profile edit
If there is a required custom field that the user can fill by editing
their profile, and that field is missing, the user should be considered
as not fully set up. Instead, we want to redirect them to edit their
profile first.

There are some exceptions when we want to fall back to the previous
behaviour and check just the name and email fields. These exceptional
cases include checking remote user data in incoming MNet request (no
user id, no custom fields supported) and calls to require_login() with
redirecting disabled (typically ajax filepicker requests on profile
editing page itself).

Additional plugins that call the function user_not_fully_set_up()
themselves, should perform the strict check in most/typical cases. So
the strict mode is enabled by default even if it changes the behaviour
slightly. In improbable case of additional plugins relying on the
previous behaviour of the function, they can use the $strict parameter
and keep performing the lax check. However, I am sure the correct fix in
that case will likely be to stop abusing this function.

Note that custom fields are not currently transferred during the MNet
roaming. So having custom fields configured as required on MNet service
provider site (where users can't edit their profiles) is expected to
display an error (as the site is considered as misconfigured).
2016-09-21 17:46:30 +02:00