Commit Graph

2343 Commits

Author SHA1 Message Date
Andrew Nicols
0333213585 MDL-53566 core: Add behat test for context loking 2018-11-13 21:17:40 +08:00
Andrew Nicols
0616f045c3 MDL-53566 core: Add support for context locking
This chagne adds support for a new feature known as Context Locking.
This allows a context to be locked, thereby removing all write
capabilities for all users (including admin) for that context, and all
child contexts.
2018-11-13 21:17:40 +08:00
Jake Dallimore
52f9cf205e MDL-63724 core_message: add send_message_to_conversation() to api 2018-11-12 10:09:27 +08:00
Jake Dallimore
b30f4d6d58 MDL-63724 core_message: buffering support for conv messages in manager
We need to be able to delay calling all member processors with localised
event data if a DB transaction is taking place. This code treats a
conversation message as a single item of work to be buffered, and stores
all localised eventdata, and processorlists for later reference. When
processing the buffer, we pass off all localised eventdata items to
their respective member's processors, before firing a single event.
2018-11-12 10:09:27 +08:00
Jake Dallimore
0eddf920be MDL-63724 core_message: add conversation support to message_send()
Added a test confirming that processors are called for each member
and that a single event is fired.
2018-11-12 10:09:27 +08:00
Damyon Wiese
6dfe428363 MDL-63183 auth: Login protection
CSRF protection for the login form. The authenticate_user_login function was
extended to validate the token (in \core\session\manager) but by default it
does not perform the extra validation. Existing uses of this function from
auth plugins and features like "change password" will continue to work without
changes. New config value $CFG->disablelogintoken can bypass this check.
2018-11-07 00:14:48 +01:00
Andrew Nicols
08a3564f93 Merge branch 'MDL-63738' of https://github.com/timhunt/moodle 2018-11-02 08:43:53 +08:00
Tobias Reischmann
3e3e120d3a MDL-58943 oauth2: Added nextcloud to standard issuers
* New button allows to create standard issuer for nextcloud
* Since the endpoints url has to be https and nextcloud relys on the
baseurl to create the endpoints, the baseurl of issuers has now to be
https as well (or empty).
* Google's baseurl was changed to https (there was no reason not to),
whereas Facebook and Microsoft baseurls remain empty.
* In case of the creation of a nextcloud issuer, the baseurl is
required.
* Nextcloud requires the baseurl, therefore a parameter is added to
create_standard_issuer($type, $baseurl = false). That parameter not
required (or used) for anything but Nextcloud.
2018-10-31 10:42:58 +08:00
Tim Hunt
616442a2fa MDL-63738 question bank: a link to download a single question 2018-10-29 10:38:24 +00:00
Damyon Wiese
a3d57af872 MDL-62139 output: Revert template changes
Revert accessibility changes for menus in standard themes.
2018-10-23 10:14:19 +02:00
David Monllao
7e5f0fa66a Merge branch 'MDL-62144-master' of git://github.com/damyon/moodle 2018-10-22 16:33:17 +02:00
Damyon Wiese
191a1c7c23 MDL-62139 output: Accessible action menus
Add label on the "gear" menu and default keyboard and focus controls.
2018-10-22 10:35:21 +08:00
Jake Dallimore
3a1ece149f MDL-63658 core: new method get_component_names() added to core 2018-10-18 08:22:07 +08:00
Jake Dallimore
4fca5dabb2 MDL-63658 core_favourites: introduce the favourites subsystem to core 2018-10-17 10:16:18 +08:00
Eloy Lafuente (stronk7)
19456c3956 Merge branch 'MDL-62891-master-callable_name' of git://github.com/mudrd8mz/moodle 2018-10-10 23:29:40 +02:00
Eloy Lafuente (stronk7)
23a7374b02 Merge branch 'MDL-63225-master' of git://github.com/jleyva/moodle 2018-10-10 23:24:27 +02:00
Damyon Wiese
1bf3a76a59 MDL-61378 forum: Standardize HTML output for posts
Improve the format of the HTML representing a forum post.

1. Use <article> tag to mark it correctly.
2. Use <time> tag to include the real datetime information.
3. Use <address> tag to specify who and when the post came from.
4. Use heading level tags to mark the subject of each post.
5. Properly nest reply posts within their parent <article>
6. Use a header tab for each article to split the metadata from the content.
7. Use CSS to separate links, not text content.

Because posts are now nested properly, the heading for each one refers to it's own article
and we don't need to generate arbitrary heading level tags depending on how deep the post
is nested.
2018-10-09 09:34:57 +08:00
David Mudrák
905d02f458 MDL-62891 core: Introduce new get_callable_name() function 2018-10-05 09:10:16 +02:00
Juan Leyva
27190655b0 MDL-63225 webservice: Return proper debuginfo on WS exceptions
In order to make developers easy, we should give some clues about the type of the data generating exceptions.
2018-10-02 13:14:33 +02:00
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
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
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
David Monllao
72621d23ae Merge branch 'MDL-62347-master' of git://github.com/bmbrands/moodle 2018-09-04 14:05:41 +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
Andrew Nicols
e36019c2f3 Merge branch 'wip-MDL-62742-master' of git://github.com/marinaglancy/moodle 2018-08-29 08:31:08 +08:00
Marina Glancy
442f12f81a MDL-62742 core: rename coursecat->core_course_category
Also rename course_in_list -> core_course_list_element
Deprecate class coursecat_sortable_records
2018-08-28 11:36:23 +02:00
John Beedell
d0a60444a1 MDL-63165 Question: xml import of question categories 2018-08-24 15:20:18 +01:00
Jake Dallimore
805ce3de79 Merge branch 'MDL-36255-master' of https://github.com/lucaboesch/moodle 2018-08-21 16:04:17 +08:00
Víctor Déniz Falcón
02fda279ed MDL-57281 behat: deprecated step definition I navigate to node in
Definition step deprecated and affected tests modified.
2018-08-20 12:53:26 +01:00
Luca Bösch
8ad225b431 MDL-36255 grades: allow multilang filters in grades 2018-08-20 08:29:36 +02:00
Andrew Nicols
883f655552 MDL-36754 output: Support token pluginfiles in group pic 2018-08-14 07:06:09 +08:00
Andrew Nicols
8af75f08e8 MDL-36754 tests: Move moodle_url tests to own file 2018-08-14 07:06:09 +08:00
Andrew Nicols
91f1f28233 MDL-36754 core_files: Support tokens when rewriting text
Support use of a token for access to pluginfile.php when rewriting text
content.

This is primarily intended for notifications where the user is unlikely
to be logged into Moodle when receiving the notification.
2018-08-14 06:57:32 +08:00
Bas Brands
4f9d62835a MDL-62347 course: pagination phpunit updates 2018-08-13 13:45:33 +02:00
Jun Pataleta
2454ddb6ef Merge branch 'MDL-45170-master' of git://github.com/junpataleta/moodle 2018-08-08 16:27:55 +08:00
Jun Pataleta
c353ad20c3 MDL-45170 core: Integration review fixes
* Pass $forcehttps parameter to call extract_draft_file_urls_from_text()
 call in \core_weblib_testcase::test_extract_draft_file_urls_from_text()
* Style fixes
2018-08-08 16:17:32 +08:00
Charles Fulton
7d7d3b1731 MDL-45170 files: check other draftfile areas when processing 2018-08-08 16:15:23 +08:00
Andrew Nicols
0c759ba614 Merge branch 'MDL-56335-master' of git://github.com/mihailges/moodle 2018-08-08 13:14:00 +08:00
Mihail Geshoski
216b89475d MDL-54741 general: 3.2 final deprecation in lib/deprecatedlib.php 2018-08-06 09:29:54 +08:00
Mihail Geshoski
f2cdf99382 MDL-56335 behat: prefixed_tablenode_transformations final deprecation 2018-08-06 09:27:08 +08:00
Andrew Nicols
aa75f70280 Merge branch 'MDL-59847-master' of https://github.com/snake/moodle 2018-08-02 11:39:50 +08:00
Eloy Lafuente (stronk7)
c965349aad Merge branch 'MDL-59595-master-2' of git://github.com/snake/moodle 2018-08-02 00:21:23 +02:00
Eloy Lafuente (stronk7)
1ffa22bbc7 Merge branch 'MDL-61041-master' of git://github.com/damyon/moodle 2018-08-01 16:36:12 +02:00
Jun Pataleta
77b6d458e5 Merge branch 'MDL-58768-master-2' of git://github.com/rezaies/moodle 2018-07-31 16:18:44 +08:00
David Monllao
a50b8a438a Merge branch 'MDL-56712-master' of git://github.com/mihailges/moodle 2018-07-30 17:47:51 +02:00
David Monllao
627d9aa6c8 Merge branch 'MDL-55188-master' of git://github.com/abgreeve/moodle 2018-07-30 17:33:21 +02:00
Mark Nelson
8bfe908209 MDL-63002 core: fixed incorrect calls to non-existent delete_record() 2018-07-30 20:59:42 +08:00
Mihail Geshoski
d77b5db55f MDL-56712 media: Remove 3.2 deprecated functions and classes 2018-07-30 09:25:34 +08:00
Adrian Greeve
b41e1d7c55 MDL-55188 events: Final deprecation of part of events 1 API. 2018-07-30 09:25:06 +08:00