200 Commits

Author SHA1 Message Date
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
Russell Smith
1fcf0ca8a5 MDL-35628 performance: Remove dirname() where possible.
dirname() is a slow function compared with __DIR__ and using
'/../'.  Moodle has a large number of legacy files that are included
each time a page loads and is not able to use an autoloader as it is
functional code.  This allows those required includes to perform as
best as possible in this situation.
2016-06-10 08:06:49 +10:00
Eloy Lafuente (stronk7)
4da854a68b MDL-54677 upgrade: add 3.1.0 separation line to all upgrade scripts 2016-05-23 01:31:34 +02:00
Eloy Lafuente (stronk7)
1abca11e0a MDL-54638 versions: bump all versions and requires near release
version = 2016052300 release version
requires= 2016051900 current rc1 version
2016-05-19 02:16:15 +02:00
David Monllao
121b97e2ed MDL-53401 auth_mnet: Update upgrade note according to reality.
Grrrr David, thanks DanP.
2016-03-30 09:29:50 +08:00
David Monllao
c573ca1cfd MDL-53401 auth_mnet: Note in upgrade.txt about the change 2016-03-30 09:21:11 +08:00
David Monllao
11e60abf75 Merge branch 'MDL-53401-master' of git://github.com/lameze/moodle 2016-03-30 09:12:25 +08:00
gabrielrosset
3ce68e4f8f MDL-53401 auth_mnet: add user created event trigger on MNET
Moodle does not fire user_created event while creating user via MNET.
That makes impossible to hook on user creation when user land into a host via MNET for the 1st time.
2016-03-23 08:38:29 +08:00
Cameron Ball
052141abc7 MDL-52207 upgradelib: Replace uses of Zend_Server_Reflection
Now that Zend has been removed we can only use native PHP reflection
methods.
2016-03-21 11:03:24 +08:00
Eloy Lafuente (stronk7)
e8c82aac82 MDL-51580 upgrade: clean < 2.7.0 upgrade steps
This just deletes all the upgrade steps previous to 2.7.0. Some
small adjustments, like adding missing MOODLE_INTERNAL or tweaking
globals can also be applied when needed.

Next commit will get rid of/deprecate all the upgradelib functions
not used anymore in codebase.
2016-02-15 18:38:09 +01:00
David Mudrák
1ef135e773 MDL-52975 mnet: Set system context on the MNet SSO landing page
Without the context being explicitly set, debugging warning can be
displayed in certain rare situations.
2016-02-04 17:14:30 +01:00
Marina Glancy
4a89e83b80 MDL-52285 auth: use __construct() for constructors 2015-12-10 13:40:42 +08:00
Eloy Lafuente (stronk7)
6d29c4acdd MDL-52140 upgrade: add 3.0.0 separation line to all upgrade scripts 2015-11-17 17:08:56 +01:00
Eloy Lafuente (stronk7)
2e144835bb MDL-52059 versions: bump all versions and requires near release
version = planned 2015111600 release version
requires= current 2015111000 rc3 version
2015-11-10 12:33:52 +01:00
Eloy Lafuente (stronk7)
b758ab3053 MDL-50183 upgrade: add 2.9.0 separation line to all upgrade scripts 2015-05-12 00:21:05 +02:00
Eloy Lafuente (stronk7)
26ea380d24 MDL-50102 versions: bump all versions and requires near release
version = planned 2015051100 release version
requires= current 2015050500 rc1 version

Note: On purpose, the course format social wrong version (2015102100)
has been kept unmodified. Looking forward a solution right now.
2015-05-05 17:43:19 +02:00
Petr Skoda
f720c2c060 MDL-48282 Standardise update of user->firstaccess 2014-11-21 09:25:57 +13:00
Eloy Lafuente (stronk7)
147bae8f7c MDL-48144 upgrade: add v2.8.0 sep lines 2014-11-10 18:08:15 +01:00
Eloy Lafuente (stronk7)
de881693f7 MDL-48021 bump: Bump all versions to planned release
This bumps all versions to planned 2.8 release
(2014111000) version and all the dependencies to
current 2.8rc1 (2014110400)
2014-11-04 17:52:35 +01:00
Adrian Greeve
8bc663e85e MDL-39888 mnet: Removal of an old sql statement invloving the mdl_log table. 2014-08-26 15:11:56 +08:00
Eloy Lafuente (stronk7)
f94891cc00 MDL-45503 upgrade: add v2.7.0 sep lines 2014-05-28 01:13:42 +02:00
Tim Hunt
5bcfd504df MDL-45618 Fix @since PHPdoc tags. 2014-05-19 17:03:04 +01:00
Eloy Lafuente (stronk7)
538bf99ece MDL-45486 Bump all versions to planned release
This bumps all versions to planned 2.7 release
(2014051200) version and all the dependencies to
current 2.7rc2 (2014050800)
2014-05-09 02:12:28 +02:00
Simey Lameze
5ad9dd5ff2 MDL-42956 auth: Fix hard-coded LIMIT clause on keepalive_client method. 2014-04-28 16:08:49 +08:00
Russell Smith
038f546777 MDL-41198 lib: Allow PHP to generate random seed on script start
Most srand instances are removed to allow PHP to do the work.

srand was left for group randomization due to the method used.
2013-12-18 16:45:34 +11:00
Damyon Wiese
47578dbff4 MDL-42930 Add 2.6.0 upgrade line 2013-11-18 11:47:17 +08:00
Eloy Lafuente (stronk7)
f39c82ebed MDL-42701 Bump all versions near 2.6 release 2013-11-05 02:36:00 +01:00
Petr Škoda
d79d5ac276 MDL-31501 rework user session architecture
List of changes:
 * New OOP API using PHP namespace \core\session\.
 * All handlers now update the sessions table consistently.
 * Experimental DB session support in Oracle.
 * Full support for session file handler (filesystem locking required).
 * New option for alternative session directory.
 * Official memcached session handler support.
 * Workaround for memcached version with non-functional gc.
 * Improved security - forced session id regeneration.
 * Improved compatibility with recent PHP releases.
 * Fixed borked CSS during install in debug mode.
 * Switched to file based sessions in new installs.
 * DB session setting disappears if DB does not support sessions.
 * DB session setting disappears if session handler specified in config.php.
 * Fast purging of sessions used in request only.
 * No legacy distinction -  file, database and memcached support the same functionality.
 * Session handler name included in performance info.
 * Fixed user_loggedin and user_loggedout event triggering.
 * Other minor bugfixing and improvements.
 * Fixed database session segfault if MUC disposed before $DB.

Limitations:
 * Session access time is now updated right after session start.
 * Support for $CFG->sessionlockloggedinonly was removed.
 * First request does not update userid in sessions table.
 * The timeouts may break badly if server hosting forces PHP.ini session settings.
 * The session GC is a lot slower, we do not rely on external session timeouts.
 * There cannot be any hooks triggered at the session write time.
 * File and memcached handlers do not support session lock acquire timeouts.
 * Some low level PHP session functions can not be used directly in Moodle code.
2013-09-21 13:11:56 +02:00
Marina Glancy
4cc819adf0 MDL-41436 Allow user=-1 in get_fast_modinfo()
Remove ref to nonexisting course.modinfo in MNET auth, use get_fast_modinfo() for user=-1 instead
2013-09-10 14:11:51 +10:00
Rajesh Taneja
bb78e249cd MDL-39961 Events: Replace Legacy events - User
This change includes:
* Added user_updated event, replacing old event
* Added user_created event, replacing old event
* Added user_deleted event, replacing old event
* Added user_loggedout event, replacing old event
* Added user_enrolment_created event, replacing old event
* Added user_enrolment_deleted event, replacing old event
* Added user_enrolment_updated event, replacing old event
2013-09-02 16:10:05 +08:00
Ankit Agarwal
0601e0eef6 MDL-40402 libraries: Replace get_system_context() with context_system::instance() in core 2013-07-04 15:41:06 +08:00
Eloy Lafuente (stronk7)
c9e54743ec MDL-39753 Add 2.5.0 upgrade line 2013-05-20 15:33:19 +02:00
Eloy Lafuente (stronk7)
cedb0aab5a MDL-39434 Bump all versions near 2.5 release 2013-05-01 18:03:29 +02:00
Petr Škoda
60d7078adf MDL-39387 normalise MOODLE_INTERNAL 2013-04-27 15:09:05 +02:00
Petr Škoda
a2f10958ff MDL-39387 fix /auth phpdocs 2013-04-27 15:06:40 +02:00
Eloy Lafuente (stronk7)
6b9dfe731e MDL-37032 upgrade: define all the 2.4.0 points 2012-12-11 13:11:11 +01:00
Eloy Lafuente (stronk7)
663dbbc2e6 MDL-36933 Bump everything to 2012112900
(versions, requires and dependencies)
2012-11-30 03:30:09 +01:00
Dan Poltawski
b584a35845 Revert "MDL-36838 moodle->mahara mnet SSO failure in FF17"
Firefox have now decided to reverse their UA change (since integration)
and this patch has some minor drawbacks.

This reverts commit 1c65f683dc0a52e47fdf68e952c832d7c63e03a0.
2012-11-30 09:23:17 +08:00
Peter Bulmer
1c65f683dc MDL-36838 moodle->mahara mnet SSO failure in FF17
In MDL-36838 Firefox 17 users are unable to sso from moodle to mahara.

Firefox 17 uses a different user agent (UA) string for Moodle sites than it
does for Mahara or other sites.
This patch relaxes the check which previously required that the UA string
being presented to the SP on landing matched the UA string presented to the IP
when jumping.
Likewise, checks associated with logout calls have been relaxed
2012-11-27 16:17:43 +13:00
Rajesh Taneja
6f5bc0584e MDL-35787 Mnet: If student role is not defined then throw error 2012-10-09 15:30:42 +08:00