28612 Commits

Author SHA1 Message Date
David Mudrák
079c0b75ee MDL-72242 files: Do not force text filtering of SVG files
It was a mistake to force filtering of SVG files in MDL-55243. It can
easily lead to corrupted SVG files.

The patch removes that forced filtering and clarifies the inline comment
of what and why we need to do.
2021-08-02 15:19:45 +02:00
Jun Pataleta
9ec6aead50 Merge branch 'MDL-72203-master-2' of git://github.com/mickhawkins/moodle 2021-07-28 11:26:42 +08:00
Michael Hawkins
1d7c563f79 MDL-72203 curl: Improve redirect unit testing and update upgrade.txt
lib/upgrade.txt was updated to reflect the fact that all cURL redirects
will be emulated.
2021-07-27 22:39:44 +08:00
David Mudrák
6b558e9be8 MDL-72203 curl: Remove duplicate unit tests for emulated redirects
Before, we had each redirect test duplicated: one for the native
redirects via native cURL, second for our emulated implementation. Now
all redirects are always emulated so there is no need to have them
tested twice.
2021-07-27 21:30:16 +08:00
David Mudrák
92b066bdaf MDL-72203 curl: Check each URL in redirect chain to see if it is blocked
The security problem here was that only the first and the last URL in
the redirect chain was checked by the security helper. This patch forces
the curl wrapper to always emulate cURL redirects and check every
redirect URL in the chain before actually visiting it.
2021-07-27 21:30:16 +08:00
David Mudrák
6e5454780d MDL-72203 curl: Warn if someone actually started to use $maxredirects
The new parameter of curl_security_helper::url_is_blocked() introduced
in MDL-71916 became part of the API. Even if we reverted it quickly,
someone can use a released Moodle version that has that parameter in
place. For that reason and also to avoid potential troubles in the
future (e.g. when yet another argument would be added to this method),
we need to make it clear that the second parameter of this method should
never be used again.

Poor $maxredirects, you did not live long with us. Oh well.
2021-07-27 21:30:16 +08:00
David Mudrák
c619cd1425 MDL-72203 curl: Revert original fix of redirects to blocked URLs
This reverts the original fix introduced in MDL-71916. It introduced an
extra native cURL call inside curl_security_helper to check if the given
URL triggers a redirect to a blocked URL or not.

Shortly after the release, a couple of regressions were reported as a
result of the integrated solution. It was agreed to revert the fix and
progress with implementing an alternative approach.
2021-07-27 21:30:16 +08:00
Ilya Tregubov
ec50dc2fb7 Merge branch 'MDL-72179-master' of git://github.com/andrewnicols/moodle 2021-07-27 12:36:38 +02:00
Ilya Tregubov
3a55ff2c55 Merge branch 'MDL-71672-master-2' of git://github.com/rezaies/moodle 2021-07-27 11:59:15 +02:00
Andrew Nicols
776f4bd80c MDL-72179 behat: Make use of page resolvers 2021-07-26 15:14:28 +08:00
Andrew Nicols
f14dbe0087 MDL-72179 behat: Add page resolvers for activity roles/perms 2021-07-23 20:44:26 +08:00
Andrew Nicols
950c7adb1c MDL-72179 behat: Add page resolver for activity names 2021-07-23 20:43:48 +08:00
Andrew Nicols
9f428f68c7 MDL-72179 behat: Add activity editing page resolution 2021-07-23 20:43:48 +08:00
Andrew Nicols
f1b41a1a7a MDL-72179 behat: Fix page resolvers to remove ambiguity
The simple pattern matches were conflicting in some situations. To make
this backwards compatable we need to convert it to a Regex pattern match
instead, and provide the quoted and unquoted variants.
2021-07-23 20:43:48 +08:00
Andrew Nicols
ba8e0a4871 MDL-72179 behat: Correct course category page resolving
There were two issues here:
* I am on the [categoryname] category page page (duplicated page)
* the wrong URL was being used

Since an incorrect URL was used I felt it safe to rename the step from
'category page page' to 'category page'.
2021-07-23 20:43:48 +08:00
Andrew Nicols
c204fe3eeb MDL-72179 behat: Lowercase all page instance resolvers 2021-07-23 20:43:48 +08:00
Andrew Nicols
730d6cb94e MDL-72179 behat: Improve core page resolvers
This commit makes the following improvements to core page resolverss:
* allows for mixed case naming (course, Course, etc.)
* allows fields other than the idnumber to be specified:
** course: idnumber, shortname, fullname
** course category: idnumber, name

Whilst some of these fields are not unique, they will typically be
unique in most test scenarios. Where they are not then the idnumber
should be used in preference.
2021-07-23 20:28:10 +08:00
Jun Pataleta
68bd3a1158 Merge branch 'MDL-71817-master' of git://github.com/lameze/moodle 2021-07-22 11:27:08 +08:00
Andrew Nicols
4c9f590f18 Merge branch 'MDL-70427' of git://github.com/paulholden/moodle 2021-07-22 11:22:13 +08:00
Simey Lameze
b0133904bf MDL-71817 calendar: behat changes for calendar block
This commit does few things:

1) Remove unnecessary "I hover over today in the calendar"
steps as it's not necessary to hover onto the day to see the events
any more.

2) Replace "I follow This month" steps to "I follow Full calendar"

3) Update i_create_a_calendar_event_with_form_data() to use the new
fullcalendar lang string.
2021-07-22 09:00:30 +08:00
Víctor Déniz
73a868c38d Merge branch 'MDL-72108-master' of git://github.com/andrewnicols/moodle 2021-07-21 19:25:54 +01:00
Ilya Tregubov
501bc9e117 Merge branch 'MDL-71604-master' of git://github.com/rezaies/moodle 2021-07-20 14:09:11 +02:00
Ilya Tregubov
494a9bb41f Merge branch 'MDL-72125-master' of git://github.com/andrewnicols/moodle 2021-07-19 13:03:46 +02:00
Andrew Nicols
46a5c75196 MDL-72125 testing: Make global $CFG available when including generators
This will remove the requirement to add the global $CFG call to the top
of generator scripts.
2021-07-19 18:41:31 +08:00
Shamim Rezaie
e2150f7da0 MDL-72078 editor_atto: Use role=application and aria-describedby in Atto
According to https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/Application_Role
WYSIWYG web editors are proper use of the application role.
2021-07-19 16:45:20 +10:00
Shamim Rezaie
da509ff492 MDL-71604 editor_atto: Move accessibility buttons to the first row 2021-07-19 16:42:25 +10:00
Shamim Rezaie
d970bf0a1e MDL-71672 javascript: Fix the markup in the header of YUI dialogs
Move the close button out of the element that is set as the
aria-labelledby for the dialog.
Also used h5 for the dialog titles so they are consistent with
AMD modals.
2021-07-19 16:40:10 +10:00
Shamim Rezaie
902ab1e2f6 MDL-71672 atto_equation: Fix the markup and the initial focused element
The initial focused element should be the first operator button.
This commit also fixes the accessibility issues that previously were
wrongly fixed by a redundant click on the first tab using javascript.
2021-07-19 16:40:10 +10:00
Shamim Rezaie
fd18007c1b MDL-71672 atto_managefiles: Focus the first file manager button 2021-07-19 16:40:10 +10:00
Shamim Rezaie
52c1e68631 MDL-71672 atto_emojipicker: Focus the search bar initially 2021-07-19 16:40:10 +10:00
Shamim Rezaie
9e801be452 MDL-71672 atto_recordrtc: focus Atto button after hide 2021-07-19 16:40:10 +10:00
Shamim Rezaie
2092f152b2 MDL-71672 javascript: Fix the issue of focusOnShowSelector being ignored
When focusOnShowSelector is not present, as a fallback, focus the first
focusable element in YUI dialogues
Ref:
https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/dialog_role
2021-07-19 16:40:10 +10:00
Andrew Nicols
87b50a42e8 MDL-72125 behat: Add get_activity_id() behat generators helper 2021-07-16 12:33:56 +08:00
Andrew Nicols
7cd408501b MDL-72125 testing: Set a default idnumber when creating activities
The activity generator currently requires an idnumber when creating
activities, but this is not a requirement when creating the same
activity through the UI. The requirement comes because we want to
provide a way to refer to activities in subsequent steps.

This commit modifies the behaviour such that the generator uses the name
of the activity as the default idnumber.

This has two  main benefits:
1. it simplfies generation of activities; and
2. it makes the language used when writing behat tests much more natural.

With this change, steps will refer to the activity by its idnumber/title
in all cases, rather than sometimes by an idnumber which bears no
relevance to the title.
2021-07-16 12:33:56 +08:00
Andrew Nicols
daf9b24b6a MDL-72125 testing: Add helper to run generators as a user 2021-07-16 12:33:56 +08:00
Jun Pataleta
80f0b15165 Merge branch 'MDL-63770-master' of /home/jun/moodles/stable_master/moodle 2021-07-15 16:13:11 +08:00
Jun Pataleta
e6f1baa9c8 Merge branch 'MDL-71456-master' of /home/jun/moodles/stable_master/moodle 2021-07-15 16:13:06 +08:00
Matteo Scaramuccia
7910fa322a MDL-63770 core: 'port' should be an integer like in parse_url()
Plus trivial comment cleanup.
2021-07-15 11:37:13 +08:00
Eloy Lafuente (stronk7)
a0ac76505b Merge branch 'MDL-67338' of git://github.com/paulholden/moodle 2021-07-15 00:33:57 +02:00
Paul Holden
bf97f707cd MDL-67338 message: re-implement block page type patterns.
The `page_type_list` method for the message component was deprecated
in 5b0769db as part of MDL-54744. However it is still required when
trying to configure blocks on any messaging pages.
2021-07-14 19:34:13 +01:00
Eloy Lafuente (stronk7)
be3f3b1283 Merge branch 'MDL-71790-master' of git://github.com/HuongNV13/moodle 2021-07-14 19:25:47 +02:00
Bas Brands
99a4eee699 MDL-71456 core: fix behats with new drawers
The new drawers structure shows that some elements
are dependant from the page structure and broke some
behats. This commit fixes those components and tests.
2021-07-14 11:49:57 +02:00
Eloy Lafuente (stronk7)
0139d213ac Merge branch 'MDL-71874-master' of git://github.com/andrewnicols/moodle 2021-07-13 20:38:01 +02:00
Sara Arjona
730792e51b Merge branch 'MDL-32103-master' of git://github.com/ilyatregubov/moodle 2021-07-13 16:28:36 +02:00
Ilya Tregubov
b26608d1d4 MDL-32103 completion: Fix CiBoT errors.
Old code still uses underscores in variable names, so CiBoT is
not happy. Making it constistant with Moodle code style.
2021-07-13 12:07:53 +02:00
Ilya Tregubov
4819625349 MDL-32103 completion: Allow instant completion updates.
For activity based course completion criteria allow instant
course completion updates if the activity completion state was changed
for a single user.
2021-07-13 12:07:53 +02:00
Sara Arjona
a81c372f00 MDL-72036 atto_h5p: Random error with external URL
After a major upgrade was done in h5p.com, some random errors appeared
in the "H5P options are ignored for H5P URLs" scenario.
They have been fixed replacing the URL for different (which should
load quicker). As we're checking external content, no other improvement
can be done on the Moodle site.
2021-07-13 08:36:33 +02:00
Huong Nguyen
48d21af177 MDL-71790 calendar: Revamp the manage subscriptions page 2021-07-13 13:21:20 +07:00
Paul Holden
42281e48f5 MDL-70427 task: correct missing component when queuing adhoc task.
If the task belongs to a component, and doesn't have it's own
component property set then we can lazy-load it based on class
namespace.
2021-07-12 20:47:04 +01:00
Paul Holden
689e20c8ba MDL-70427 admin: remove plugin adhoc tasks during uninstall. 2021-07-12 20:43:14 +01:00