24219 Commits

Author SHA1 Message Date
Adrian Greeve
48a9856da8 MDL-52100 filelib: Files that are oversized are checked with user.
Files that are oversized could have been uploaded by a user who
can ignore the file size limits. These files should not be deleted
in these situations.
2017-12-18 13:12:22 +08:00
Marina Glancy
10c71d8a2f MDL-31436 registration: do not send false in update request 2017-12-13 13:51:25 +08:00
Andrew Nicols
6d326b17d8 Merge branch 'MDL-59866' of https://github.com/marcusboon/moodle 2017-12-12 13:46:07 +08:00
Andrew Nicols
2f920d9be8 Merge branch 'wip-MDL-56864-master' of git://github.com/marinaglancy/moodle 2017-12-12 13:36:32 +08:00
Damyon Wiese
8cdfa8692b Merge branch 'MDL-59438-master' of git://github.com/rezaies/moodle 2017-12-12 13:05:22 +08:00
Damyon Wiese
a34a305d53 Merge branch 'MDL-44660-master' of https://github.com/lucaboesch/moodle 2017-12-12 12:49:46 +08:00
Marcus Boon
f8e2383bdd MDL-59866 session: Add retry for redis sessions
There is an edge case whereby redis will fail
to accept connections on the first try but
retrying the connection seems to make it work

Included in this commit:
* Retry functionality in the session init
2017-12-12 14:42:04 +10:00
Andrew Nicols
abb61e0b02 Merge branch 'MDL-60983' of git://github.com/timhunt/moodle 2017-12-12 10:56:37 +08:00
Damyon Wiese
740a81eeb2 Merge branch 'MDL-60968-master' of git://github.com/lameze/moodle 2017-12-12 10:19:00 +08:00
Damyon Wiese
8cae085071 Merge branch 'MDL-60976-master' of https://github.com/matt-catalyst/moodle 2017-12-12 09:56:20 +08:00
Brendan Heywood
b588373656 MDL-60968 auth: Allow more flexibility with mapping attributes 2017-12-12 09:37:35 +08:00
Damyon Wiese
4786443998 Merge branch 'MDL-60041' of https://github.com/NeillM/moodle 2017-12-12 09:13:43 +08:00
Neill Magill
61fad215f1 MDL-60041 dml: MOODLELIB sql file must have Unix line endings
If the file does not have Unix line endings then the regular expression
in oci_native_moodle_database::attempt_oci_package_install() does
not split it correctly.

This leads to an invalid package being created in Oracle.

The .gitattribute file changes for oci_native_moodle_package.sql
force it to have Unix style line endings when the branch is checked
out and the file does not already exist.

The file has been modified so that the Unix style line endings are
applied even if the file already exists, for example when pulling in
this change to an existing branch.
2017-12-11 08:40:58 +00:00
Damyon Wiese
fe955c5645 Merge branch 'wip-MDL-45500-master' of git://github.com/marinaglancy/moodle 2017-12-11 12:56:18 +08:00
Shamim Rezaie
9d27b68ce8 MDL-59438 calendar: Added a foreign key and an index
Added foreign key constraint to the event.subscriptionid column.
Also added index to the event.uuid column.
2017-12-11 12:54:49 +08:00
Damyon Wiese
917923c860 Merge branch 'MDL-60043' of git://github.com/timhunt/moodle 2017-12-11 11:49:40 +08:00
Damyon Wiese
5ec2ce20f5 Merge branch 'MDL-54106-master' of https://github.com/lucaboesch/moodle 2017-12-11 11:37:48 +08:00
Damyon Wiese
e82c025e60 Merge branch 'wip-MDL-31436-master' of git://github.com/marinaglancy/moodle 2017-12-11 11:27:28 +08:00
Luca Bösch
970dc511e2 MDL-44660 grade: Typos @package core_grade instead of core_grades 2017-12-08 14:21:34 +01:00
Luca Bösch
7f8773ffb8 MDL-54106 task: Deleting unconfirmed users after $CFG->deleteunconfirmed 2017-12-08 14:12:57 +01:00
Tomek Muras
aceb84ad76 MDL-60043 accesslib: improve query performance by removing ORDER BY
then add back the minimal necessary sorting in PHP. That part was
added by Tim Hunt.
2017-12-08 12:08:44 +00:00
Matt Clarkson
1c06098b6b MDL-60976 dml: Optimise replace_all_text()
Avoid updating fields that do not match the search string.
2017-12-08 12:35:56 +13:00
Tim Hunt
91c8d8b130 MDL-60983 get_user_capability_course: fix buggy edge cases
There were basically two problems, which are demostrated by
the new test users u7 and u8 in the unit test.

1. There was a problem if a role was overridden in a context above the
one where it was assigned. E.g. User has teacher role in a course, and
there is a role override in the course-category context. That was being
ignored.

2. Problems with the handling of PROHIBITs. It should be the case that
if there is a PROHIBIT in force, then it cannot be overridden by another
role, or by a role override. However, this was not working in all cases.

Also, I had to add comments to the unit test so that I could understand
it. Hopefully these will be hepful to other developers too.
2017-12-07 18:28:18 +00:00
Damyon Wiese
97812f14c1 Merge branch 'MDL-60880-master' of https://github.com/sammarshallou/moodle 2017-12-06 19:53:37 +13:00
Andrew Nicols
e3b699eab7 Merge branch 'MDL-59159' of git://github.com/stronk7/moodle 2017-12-06 19:53:36 +13:00
Jun Pataleta
1396cb6346 Merge branch 'wip-MDL-60926-master' of git://github.com/marinaglancy/moodle 2017-12-06 19:53:35 +13:00
Damyon Wiese
bfb5d3ba26 Merge branch 'MDL-37933_master' of git://github.com/markn86/moodle 2017-12-06 19:53:34 +13:00
David Herney
d52e5dd32d MDL-60443 dataformat lib: Change a wrong variable name
The variable $type really is $dataformat. I have changed it for
prevent the error and show a correct error message.
2017-12-06 19:53:34 +13:00
Damyon Wiese
a569a33097 Merge branch 'MDL-59875_m35v1' of https://github.com/sbourget/moodle 2017-12-06 19:53:31 +13:00
Damyon Wiese
387f7aae0d MDL-36056 forms: Don't validate disabled fields
When fields are disabled, the value comes through as null so we need to specifically check for it
before validation.
2017-12-06 19:53:30 +13:00
Andrew Nicols
9e51dc406f Merge branch 'MDL-47114-master' of git://github.com/rezaies/moodle 2017-12-06 19:53:30 +13:00
sam marshall
7f9fb2c846 MDL-60880 core_search: Allow search of specific context (front-end) 2017-12-05 17:42:40 +00:00
Damyon Wiese
b0c4f9c21c Merge branch 'MDL-36056-master-enrolkeywhitespace' of git://github.com/mudrd8mz/moodle 2017-12-04 16:00:19 +08:00
Jun Pataleta
bea5a16203 Merge branch 'MDL-60925-master' of git://github.com/damyon/moodle 2017-12-04 14:32:26 +13:00
Marina Glancy
65a77c7381 MDL-60926 auth: do not map very long profile fields 2017-12-04 09:31:42 +08: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
Shamim Rezaie
8c42eef35c MDL-47114 core: Improved function description 2017-12-02 07:44:35 +08:00
David Mudrák
0c6554e03c MDL-36056 form: Do not allow passwords with wrapping whitespace
This is to avoid accidental misconfiguration while copy/pasting the
password value.
2017-11-30 10:47:57 +01:00
Marina Glancy
efe4210395 MDL-31436 hub: never use xmlrpc, always use REST 2017-11-30 11:28:00 +08:00
Damyon Wiese
b3480499c6 MDL-60925 theme: Fix SCSS precompilation.
There is no point pre-compiling the theme SCSS if it is not stored somewhere that is available
to all webserving nodes. Localcache needs to be backed by the MUC cache.
2017-11-29 17:01:07 +08:00
Eloy Lafuente (stronk7)
8c9eecdea7 Merge branch 'MDL-60682' of git://github.com/timhunt/moodle 2017-11-28 20:37:59 +01:00
Stephen Bourget
a7370e0dd0 MDL-59875 Badges: Allow badges to be criteria for other badges 2017-11-28 08:03:02 -05:00
Marina Glancy
777720c833 MDL-45500 gradingform: allow plugin uninstall 2017-11-28 12:27:52 +08:00
Jun Pataleta
7315358ead Merge branch 'MDL-46768-master' of git://github.com/sarjona/moodle 2017-11-28 17:18:54 +13:00
Damyon Wiese
bdb157653b Merge branch 'MDL-60174-master' of https://github.com/sammarshallou/moodle 2017-11-28 11:38:40 +08:00
Jun Pataleta
49cbe666a4 Merge branch 'wip-MDL-60478-m35' of git://github.com/amygroshek/moodle 2017-11-28 13:25:51 +13:00
sam marshall
a938e4096c MDL-60174 core_dml: fix miscellaneous incorrect recordset usage
The new recordset support for Postgres requires transactions and
will cause errors if recordsets are not closed correctly. This
commit fixes problems that were identified during unit tests, and
via some basic code analysis, across all core code. Most of these
are incorrect usage of recordset (forgetting to close them).
2017-11-27 11:10:33 +00:00
sam marshall
ed00d67c99 MDL-60174 core_dml: get_recordset on Postgres eats all the RAM
On Postgres, get_recordset_sql loads all the results into memory
(within the Postgres library, which doesn't count towards the PHP
memory limit, but does count towards making your server run out of
memory) as soon as the query completes.

This commit changes the code to use cursors, which in Postgres
allow the results to be returned in smaller chunks (by default
100,000 rows).
2017-11-27 11:10:29 +00:00
Damyon Wiese
d3fa95abf1 Merge branch 'MDL-60188-master' of git://github.com/rezaies/moodle 2017-11-27 15:57:41 +08:00
Mark Nelson
5211efb99b MDL-37933 core_complete: fixed criteria/criterion naming confusion 2017-11-27 15:26:43 +08:00