Commit graph

2394 commits

Author SHA1 Message Date
Kristian Ringer
3a9e3f1db4 MDL-64865 auth: Log changing auth config in get_enabled_auth_plugins 2020-12-08 09:10:14 +11:00
Jake Dallimore
766f68cbd2 Merge branch 'MDL-70160-function-cache-m' of https://github.com/Peterburnett/moodle 2020-11-23 15:21:31 +08:00
Brendan Heywood
522e4c6c76 MDL-47456 core: Remove redundant DB call during bootstrap 2020-11-16 16:04:07 +11:00
Peter Burnett
7fa2f521d7 MDL-70160 cache: plugin_functions checks for function_exists() 2020-11-10 16:02:55 +10:00
Andrew Nicols
c42c08793b MDL-70130 core: Compare realpaths for file attachment checks
Rather than using the provided path, the `realpath` must be used to
ensure that the use of symlinks in paths is normalised.
2020-11-06 10:54:09 +08:00
Andrew Nicols
4f22fad9ac MDL-70130 core: Simplify attachment handling in email_to_suer 2020-11-06 10:54:09 +08:00
Marina Glancy
e30716a16e MDL-70130 core: allow to attach files from localrequestdir to emails
Co-authored-by: Paul Holden <paulh@moodle.com>
2020-11-06 10:02:04 +08:00
Mihail Geshoski
c8ac07fb50 MDL-67837 backup: Verify caps before unenrolling users on course restore 2020-11-03 12:34:28 +01:00
Brendan Heywood
10f33b6fdc MDL-69975 core: Fix paths longer than 260 chars on windows
Also, ensure that remove_dir() only processes directories,
because sometimes it was being called by shutdown managers
with files, leading to PHP warnings.

Co-authored-by: Eloy Lafuente (stronk7) <stronk7@moodle.org>
Co-authored-by: Jun Pataleta <jun@moodle.com>
2020-11-01 11:02:00 +01:00
Víctor Déniz
3e6892af4b Merge branch 'MDL-69513-dkim-settings' of https://github.com/brendanheywood/moodle 2020-10-21 11:57:11 +01:00
sam marshall
4dcca1b084 MDL-69687 Course: remove_course_contents orphaned completion data
The remove_course_contents function did not delete data from
course_module_completion table in most cases, resulting in large
quantities of orphaned data.
2020-10-19 10:26:12 +01:00
Brendan Heywood
1b47d4bc0e MDL-69513 email: Add support for email DKIM signatures 2020-10-19 16:20:24 +11:00
sam marshall
2fe87d9566 MDL-69687 Course: Improve removal of completion data on MySQL 2020-10-16 18:20:23 +01:00
Jake Dallimore
0132037427 MDL-59510 core_oauth2: add autorefresh mode to oauth2\client
Changes:
- The client can now be instantiated with the new mode enabled.
- A user refresh token will be stored if returned as part of the
authorization_code grant but only if the user is authenticated and only
if the mode is enabled.
- If the mode permits it, attempt to exchange a stored refresh token for
a new access token during login checks, allowing access to continue
across sessions without the need to re-grant consent every time.
- Purge all refresh tokens for a given user, issuer and scope on client
log out. This makes sure logout persists across logins.
2020-10-05 09:19:29 +08:00
Brendan Heywood
0983a1c3d1 MDL-69600 core: Expose divertallemails config in UI 2020-09-29 20:29:32 +10:00
Brendan Heywood
6e935cc29c MDL-69718 core: Added support for TB and PT to display_size 2020-09-21 11:02:16 +10:00
Andrew Nicols
39ae77ca65 Merge branch 'MDL-67419-master' of git://github.com/farhan6318/moodle 2020-09-02 08:54:27 +08:00
sam marshall
9538ba0d67 MDL-38350 Lib: Rename directory before removing it, to reduce races 2020-08-20 16:52:28 +01:00
Brendan Heywood
0f89884980 MDL-69265 email: Add admin setting for email headers 2020-08-12 20:51:10 +10:00
Farhan Karmali
470f94dc46 MDL-67419 admin: New admin setting for lang during user creation 2020-08-10 18:34:19 +05:30
Charles Fulton
2c93ca61d0 MDL-69074 admin: ensure consistent default for getremoteaddrconf 2020-06-16 16:34:21 -04:00
Michael Hawkins
e1e5766940 MDL-68745 lib: Improved docblock descriptions for alpha PARAM types 2020-06-05 17:50:54 +08:00
Adrian Greeve
b2978c1787 Merge branch 'MDL-68757' of https://github.com/timhunt/moodle 2020-05-26 10:33:03 +08:00
Neill Magill
b26efcd861 MDL-64427 course: Mark activities during course contents deletion
When we want to delete all of the activities in a course we should
mark them as having a deletion in progress, as this makes them
unavailable to users immediately.

This should make it much less likely that a request to get a context
that does not exist should be made when a user accesses a page.
2020-05-20 08:27:53 +01:00
Neill Magill
d92acd5dcc MDL-64427 course: Do not allow dirty cm_info during course delete
When deleting a course (especially one containing a large amount of
data) the course mod info cache could contain entries for deleted
activities for a signifcant amount of time making it possible that
users could see errors in Moodle.
2020-05-20 08:27:53 +01:00
Andrew Nicols
ab6ca1d5c9 Merge branch 'srdjan-slave-conn' of https://github.com/srdjan-catalyst/moodle 2020-05-19 12:29:20 +08:00
Srdjan
46cfde3d95 MDL-19711 dml: Enable use of readonly slave database handles
Implemented with moodle_read_slave_trait

Functionality is triggered by supplying config dboption['readonly'].
See config-dist.php for more info on supported dboptions.

pgsql and mysqli drivers are using this feature. Also added support for
connection timeout for these two drivers.
2020-05-19 11:50:42 +10:00
Tim Hunt
4a45b7112c MDL-68757 questions: don't do output in low-level functions 2020-05-18 20:54:27 +01:00
Amaia Anabitarte
f2a9bb6edb MDL-68526 core_contentbank: Delete content when a course is deleted
Or when a course category is moved/deleted
2020-05-18 16:05:04 +02:00
Eloy Lafuente (stronk7)
301cd3e9c0 Merge branch 'MDL-68415' of https://github.com/paulholden/moodle 2020-05-07 18:38:43 +02:00
Paul Holden
f4488eca79 MDL-68415 core: test attachments in email_to_user from allowed paths. 2020-05-06 23:23:17 +01:00
fujiwara
c4f51bfd31 MDL-68415 email: Fix attachment in email_to_user() 2020-05-04 21:43:57 +09:00
Bas Brands
555ec89ad3 MDL-68329 cache: Improve cache performance footer info 2020-05-01 01:13:37 +02:00
Jun Pataleta
9be6c16a37 Merge branch 'MDL-66732' of https://github.com/paulholden/moodle 2020-04-30 17:16:16 +08:00
Brendan Heywood
9f4bb48e40 MDL-68329 cache: Improve cache performance footer info 2020-04-28 10:08:28 +10:00
Eloy Lafuente (stronk7)
58e73daa59 Merge branch 'MDL-68280' of https://github.com/paulholden/moodle 2020-04-16 00:10:35 +02:00
Paul Holden
16f05b5c22 MDL-66732 core: config option to force whether site considered public. 2020-04-15 22:08:49 +01:00
Paul Holden
ab106ad70f MDL-66732 core: improve detection of non-public sites. 2020-04-15 21:54:29 +01:00
Paul Holden
343380d9c8 MDL-67499 user: truncate long username/email during user deletion. 2020-04-06 11:48:27 +01:00
Paul Holden
b6ea0ef7ee MDL-68280 user: fix PHP notice for unknown user invalid login token. 2020-04-06 11:46:06 +01:00
Luca Bösch
dfe22c29c2 MDL-67672 user: Display name in user menu as elsewhere. 2020-04-01 09:03:03 +02:00
David Mudrák
2d60593892 MDL-68183 auth: Fix the performance of get_complete_user_data search
When searching for the user by a case-insensitive field (email address
is the only one supported now), the performance may be very poor as the
DB cannot use the index due to the LOWER() operation and the full
sequential scan of all the user records is performed. On some DBs such
as MySQL, this can be significantly improved by pre-filtering the users
with accent-insensitive search.

So we first perform accent-insensitive search for potential candidates
in a subselect, which can use the index. Only then we perform the
additional accent-sensitive search on this limited set or records.
2020-03-17 14:52:32 +01:00
Eloy Lafuente (stronk7)
41f191b341 Merge branch 'MDL-68125-regression' of https://github.com/brendanheywood/moodle 2020-03-12 01:19:23 +01:00
Brendan Heywood
17b04bdb25 MDL-68125 core: Fixed $CFG->reverseproxyignore install regression 2020-03-12 09:36:17 +11:00
Sara Arjona
32a05b5625 MDL-67063 core: fix error for supporting numbers in component
Component names should always support numbers (but the first character).
This patch will add PARAM_COMPONENT the expected regular expression
to validate the expected format.
2020-03-06 20:21:31 +01:00
Brendan Heywood
c2366b85b3 MDL-67861 core: Added $CFG->reverseproxyignore IP subnet list
If your server is behind multiple reverse proxies that append to the
X-Forwarded-For header then you will need to specify a comma separated
list of ip addresses or subnets of the reverse proxies to be ignored
in order to find the users correct IP address.
2020-03-05 01:28:05 +01:00
Brendan Heywood
516c8aa506 MDL-67861 libraries: Refactor is_ip_in_subnet_list in ip_utils 2020-03-05 01:28:04 +01:00
Brendan Heywood
df0619c7b6 MDL-67861 core: Use last ip in X-Forwarded-For list 2020-03-05 01:28:04 +01:00
Eloy Lafuente (stronk7)
392e270c93 Merge branch 'MDL-67950-passwordpolicy-callback' of https://github.com/brendanheywood/moodle 2020-02-26 00:20:49 +01:00
Brendan Heywood
648e20ab6d MDL-67950 core: check_password_policy only fires when passwordpolicy = 1 2020-02-19 09:46:21 +11:00