24910 Commits

Author SHA1 Message Date
David Monllao
85d4b77cd3 Merge branch 'MDL-61967-master' of git://github.com/sarjona/moodle 2018-09-25 11:08:53 +02:00
Sara Arjona
5290d0604b MDL-61967 core_user: Allow filtering by No groups on participants page
A new optional parameter $context has been added to the
core_group::groups_get_members_join() function.
Besides, some core_group methods now accept -1 (USERSWITHOUTHGROUP) for
the groupid field.
2018-09-24 18:33:45 +02:00
Eloy Lafuente (stronk7)
0de29dbf35 MDL-63020 tests: ensure that searching for is null values also works ok 2018-09-24 17:38:10 +02:00
Eloy Lafuente (stronk7)
985b6b75c2 Merge branch 'MDL-63020' of git://github.com/timhunt/moodle 2018-09-24 16:01:21 +02:00
Tim Hunt
eb6c769a8c MDL-63020 dml: improve the unit tests 2018-09-24 11:41:25 +01:00
David Monllao
ccff34bf07 Merge branch 'MDL-47962' of git://github.com/timhunt/moodle 2018-09-24 09:45:47 +02:00
David Monllao
bdc511364c MDL-54035 upgrade.txt: Limit comments to relevant info for upgrades 2018-09-24 09:41:18 +02:00
Jonathan Champ
1113e34675 MDL-54035 accesslib: Add context->get_parent_context_paths()
Returns full context paths for parent contexts. Useful for exact
matches, such as when checking dirtycontexts.
2018-09-21 09:17:43 -04:00
Jonathan Champ
1d049e08e5 MDL-54035 accesslib: add mark_user_dirty helper
Instead of marking an entire context dirty and affecting all users
of those contexts, mark the user as dirty when the change only
affects that user.
2018-09-21 09:17:43 -04:00
Jonathan Champ
34dd57053d MDL-54035 accesslib: only modify role_capabilities in accesslib
Whenever the role_capabilities table is changed, we need to remember
to clear the cache for the role(s) being modified. This is far simpler
when all of those changes happen in a single file, i.e. accesslib.php,
allowing other parts of the application to use the public functions
without requiring knowledge of the cache internals.
2018-09-21 09:17:43 -04:00
Jonathan Champ
b2f349a433 MDL-54035 accesslib: separate role definition cache clear
Thanks to MDL-49398, we can separate the combined user session and role
definition cache clearing function into two separate functions. At the
same time, we want to identify and remove mark_dirty() calls that were
added for role definition changes but were incorrectly left behind.

Change highlights:
 - Remove unnecessary mark_dirty() calls performed after
   assign_capability(), unassign_capability(), delete_role(),
   deleted contexts, brand new contexts
 - Move role definition cache clear from the user-centric
   accesslib_clear_all_caches() to the newly created,
   role-dedicated accesslib_reset_role_cache()
2018-09-21 09:17:42 -04:00
Tim Hunt
3923151a1a MDL-47962 filter_glossary: changes made during integration review 2018-09-20 17:58:01 +01:00
Tim Hunt
5a8c44d000 MDL-47962 filter_glossary: only create replacement HTML if needed 2018-09-20 17:58:01 +01:00
Tim Hunt
1d8d00d91d MDL-47962 filter_glossary: only prepare the replacement if used 2018-09-20 17:58:00 +01:00
Tim Hunt
ac66652078 MDL-47962 filter_glossary: clean up filterobject class
This is another preliminary commit, rationalising the ->work... fields
and also moving the code that sets them up into a separate function.
This is also to prepare for the next commit.
2018-09-20 17:58:00 +01:00
Tim Hunt
c01503de75 MDL-47962 filter_glossary: only prepare_phrases_for_filtering once 2018-09-20 17:58:00 +01:00
Tim Hunt
2abf8fbf86 MDL-47962 filter_glossary: use preg features for fullmatch
This eliminates a lot of necessary string manipulation for something
that preg can just do with the \b assertion.

The change also extracts all the work to prepare ->work_phrase (renamed
->regexp) into a separate function. This is to pave the way for future
efficiency gains, but for now I have not done them, so it is easier to
verify by inspection that this commit does not change behaviour.

Also, some tidy-ups to the filterobject structure, to eliminate some
redundant fields.
2018-09-20 17:58:00 +01:00
Tim Hunt
43d270e4ef MDL-47962 filterlib: Fix lots of coding style 2018-09-20 17:58:00 +01:00
Tim Hunt
5abc431335 MDL-63020 ddl: fix nullable unique indexes in OCI and MS SQL
This works-around the default non-standard behaviour of these DB engines.
2018-09-20 17:41:22 +01:00
Tim Hunt
54b2b1d27f MDL-63020 xmldb: Improve PHPdoc comments for better IDE autocomplete 2018-09-20 17:41:22 +01:00
David Monllao
0e5144fe24 Merge branch 'MDL-63333_master' of git://github.com/markn86/moodle 2018-09-18 12:17:46 +02:00
Jun Pataleta
58e529e0c0 Merge branch 'm36_MDL-63319_MySQL_MSSQL_Rename_Field_Reserved_Word' of https://github.com/scara/moodle 2018-09-18 14:10:11 +08:00
Mark Nelson
cbc3833d27 MDL-63333 core: removed unused setting 'messaginghidereadnotifications' 2018-09-17 10:02:37 +08:00
Matteo Scaramuccia
211d04f43e MDL-63319 ddl: Added getRenameFieldSQL() coverage 2018-09-14 22:41:18 +02:00
Matteo Scaramuccia
66c34d3578 MDL-63319 ddl: Improved rename_field() coverage
DB API should allow to rename fields, including renaming
those columns named using a reserved word.
2018-09-14 22:41:18 +02:00
Matteo Scaramuccia
12b6041aac MDL-63319 ddl: MSSQL should rename reserved words 2018-09-14 22:31:39 +02:00
Matteo Scaramuccia
0fb34e9108 MDL-63319 ddl: MySQL should rename reserved words 2018-09-14 22:31:39 +02:00
Amaia Anabitarte
fdb45f7943 MDL-63279 messaging: Add admin setting for toggling site-wide messaging 2018-09-14 13:20:18 +02:00
Jun Pataleta
ac61871ebe Merge branch 'MDL-51177-master' of git://github.com/andrewnicols/moodle 2018-09-13 16:17:02 +08:00
Andrew Nicols
11cd7c89d4 MDL-51177 atto_html: Check isHTML before hiding editor 2018-09-13 15:38:14 +08:00
Eloy Lafuente (stronk7)
0e05bac861 Merge branch 'MDL-60630-master' of git://github.com/andrewnicols/moodle 2018-09-12 23:14:54 +02:00
Andrew Nicols
666196271f MDL-60630 cachestore: Remove memcache plugin 2018-09-12 21:07:01 +08:00
Eloy Lafuente (stronk7)
79e2d710d3 Merge branch 'MDL-63329-master' of git://github.com/andrewnicols/moodle 2018-09-12 10:19:19 +02:00
Jun Pataleta
19d8da7561 Merge branch 'MDL-51177-master' of git://github.com/andrewnicols/moodle 2018-09-12 13:30:39 +08:00
Andrew Nicols
6e1008ddd0 MDL-51177 atto_html: Import htmlplus functionality 2018-09-12 10:12:15 +08:00
Andrew Nicols
89aff0d828 MDL-63329 core: Remove memcache session support 2018-09-12 08:15:35 +08:00
Guillermo Alvarez
e0dac0f4d7 MDL-63231 filepicker: Skype validation for null values
In file_get_all_files_in_draftarea function an integer could get
a null value so it is necessary to execute this function only
when is called with a valid integer value.
2018-09-11 09:03:23 -05:00
Jake Dallimore
c87010baca MDL-62947 core_form: fix remote code execution exploit in QuickForms
Applies the patch found upstream:
https://github.com/pear/HTML_QuickForm/commit/
d3a6d5c44dedf3c164c6c79198e4ef479bcedcd2 and make util methods static
for php7 compatibility.
2018-09-05 12:12:19 +08:00
David Monllao
3db611ec31 MDL-62347 output: Fix phpdoc param name 2018-09-04 14:08:53 +02:00
David Monllao
72621d23ae Merge branch 'MDL-62347-master' of git://github.com/bmbrands/moodle 2018-09-04 14:05:41 +02:00
Jun Pataleta
8a03a5cba1 Merge branch 'MDL-60901' of git://github.com/stronk7/moodle 2018-09-04 10:17:23 +08:00
Eloy Lafuente (stronk7)
cf2fea1d25 Merge branch 'MDL-61742-master-inactiveproviders' of git://github.com/mudrd8mz/moodle 2018-09-03 23:23:12 +02:00
Eloy Lafuente (stronk7)
ced7e0efff Merge branch 'MDL-62848-master-placeholderwidth' of git://github.com/mudrd8mz/moodle 2018-09-03 22:52:31 +02:00
David Monllao
c4aa41ca2f Merge branch 'MDL-55744-master_atto_should_not_autosave_on_not_loggedin_users' of https://github.com/dravek/moodle 2018-09-03 12:27:25 +02:00
Eloy Lafuente (stronk7)
9b92642cf1 MDL-60901 environment: 3.6 requirements
Changes include:
- MySQL 5.6 is required.
- PostgreSQL 8.4 is required.
- Oracle 11.2 is required.
- 64bits architecture is recommended.
2018-09-03 10:15:26 +02:00
Mihail Geshoski
c69a43f2fc MDL-56998 blog: Remove associated blog posts when module is deleted 2018-09-03 08:33:38 +08:00
David Mudrák
c261ada88b MDL-62848 form: Fix width of the autocomplete input field
Make sure that the autcomplete input field is wide enough to display the
placeholder text.
2018-08-31 14:51:05 +02:00
David Mudrák
5cdf8d49c7 MDL-62848 form: Fix missing support for {{#js}} helper in autocomplete
The form-autocomplete module uses three Mustache templates
core/form_autocomplete_input, core/form_autocomplete_suggestions and
core/form_autocomplete_selection. However, it did not support executing
the JS that is eventually part of those templates.
2018-08-31 14:51:05 +02:00
David Mudrák
39d2c68856 MDL-61742 messaging: Do not send messages from inactive providers
Before this patch, we only checked that the given provider has been
configured in the user or system preferences. However, if the provider's
component is disabled, it does not even appear in these preferences.
Additionally, there was no check that the message / notification
provider is among providers allowed to be consumed by the recipient.

The patch checks that the message origin is among providers returned by
the message_get_providers_for_user() so disabled plugins can't act as
sources of messages and users can't receive messages from providers they
do not have capability for. This mitigates the risk of abusing a plugin
as a source of spam, for example.

Unit test is fixed and extended. When the $CFG->messaging is disabled,
no messages between users should be sent (I can't understand why the
unit test was written in an opposite way). Added assertions for the
raised debugging message.
2018-08-31 12:15:30 +02:00
Jake Dallimore
8981ac0197 Merge branch 'MDL-62657-master' of git://github.com/junpataleta/moodle 2018-08-29 09:30:07 +08:00