Commit graph

101946 commits

Author SHA1 Message Date
Ilya Tregubov
6da13bc87a Merge branch 'MDL-71672-311-2' of git://github.com/rezaies/moodle into MOODLE_311_STABLE 2021-07-28 11:16:47 +02:00
Jun Pataleta
a8f4ba9af1 Merge branch 'MDL-72203-311-2' of git://github.com/mickhawkins/moodle into MOODLE_311_STABLE 2021-07-28 11:26:52 +08:00
AMOS bot
b9ab9d82e9 Automatically generated installer lang files 2021-07-28 00:07:28 +00:00
Mike Churchward
ec367da169 MDL-71925 tool_brickfield: Limited DOM tag count using core function. 2021-07-27 15:52:58 -04:00
Michael Hawkins
dc19dd6134 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 23:09:09 +08:00
David Mudrák
986a6f6f40 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 22:56:48 +08:00
David Mudrák
cbf9dfbd8d 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 22:56:48 +08:00
David Mudrák
6527cbc492 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 22:56:48 +08:00
David Mudrák
5068469f6f 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 22:56:48 +08:00
Ilya Tregubov
3f9cc1fc76 Merge branch 'MDL-72179-311' of git://github.com/andrewnicols/moodle into MOODLE_311_STABLE 2021-07-27 12:37:38 +02:00
Andrew Nicols
3dd5ef4cc0 MDL-72179 behat: Make use of page resolvers 2021-07-26 15:14:24 +08:00
Andrew Nicols
2b7a9da30f MDL-72179 behat: Add page resolvers for activity roles/perms 2021-07-23 20:44:26 +08:00
Andrew Nicols
9f1f8e584f MDL-72179 behat: Add page resolver for activity names 2021-07-23 20:43:47 +08:00
Andrew Nicols
68edc3c42a MDL-72179 behat: Add activity editing page resolution 2021-07-23 20:43:47 +08:00
Andrew Nicols
3d4b232a4a 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:47 +08:00
Andrew Nicols
63df6e1ee2 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:47 +08:00
Andrew Nicols
30adbbf796 MDL-72179 behat: Lowercase all page instance resolvers 2021-07-23 20:43:47 +08:00
Andrew Nicols
995ceb32d0 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
Ilya Tregubov
2c69199ca1 weekly release 3.11.1+ 2021-07-23 11:31:01 +02:00
Ilya Tregubov
0ca014907b Merge branch 'install_311_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_311_STABLE 2021-07-23 11:30:59 +02:00
Jun Pataleta
8096d76275 MDL-72206 theme_boost: Have env check classes extend alert classes
To achieve good colour contrast and consistency with other parts of
Moodle, the environment check classes need to extend the alert-*
classes.
2021-07-23 15:07:59 +08:00
Andrew Nicols
2afafa0431 Merge branch 'MDL-70427-311' of git://github.com/paulholden/moodle into MOODLE_311_STABLE 2021-07-22 11:22:56 +08:00
AMOS bot
9fb9779780 Automatically generated installer lang files 2021-07-22 00:07:33 +00:00
Víctor Déniz
e08da48fbd Merge branch 'MDL-72108-311' of git://github.com/andrewnicols/moodle into MOODLE_311_STABLE 2021-07-21 19:28:54 +01:00
Ilya Tregubov
d6bd634cc5 Merge branch 'MDL-72125-311' of git://github.com/andrewnicols/moodle into MOODLE_311_STABLE 2021-07-19 14:00:45 +02:00
Andrew Nicols
3fb79f7a6a MDL-72125 mod_assign: Use assign submission data generators 2021-07-19 18:41:31 +08:00
Andrew Nicols
94bdaa6b4e MDL-72125 mod_assign: Add data generator for assign submissions 2021-07-19 18:41:31 +08:00
Andrew Nicols
aa1f55f1bc 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
f2a52e06e5 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:41:52 +10:00
Shamim Rezaie
2bafc91952 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:41:51 +10:00
Shamim Rezaie
aa3a2a43ea MDL-71672 atto_managefiles: Focus the first file manager button 2021-07-19 16:41:51 +10:00
Shamim Rezaie
a7c9576c20 MDL-71672 atto_emojipicker: Focus the search bar initially 2021-07-19 16:41:51 +10:00
Shamim Rezaie
321c443838 MDL-71672 atto_recordrtc: focus Atto button after hide 2021-07-19 16:41:51 +10:00
Shamim Rezaie
c34bd1aa46 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:41:51 +10:00
Mikel Martín
46225f323a MDL-71152 theme_boost: Use 'scroll-margin-top' for anchor links
Current anchor link offset fix is not working with 'display:flex' elements
2021-07-16 11:56:24 +02:00
boygr49p
5cadd35f14 MDL-71500 calendar_threemonth: add behat step and coverage 2021-07-16 15:08:27 +08:00
boygr49p
fa3f88babb MDL-71500 calendar_threemonth: clicking in a diff day should refresh day view
Clicking in a day in the three month block replaces the div with id starting
with calendar- so we can do so repeatedly and successfully and test that it does (with behat).
2021-07-16 15:08:27 +08:00
Andrew Nicols
e6e1b50c31 MDL-72163 admin: Plugins overview page should link to categories 2021-07-16 13:49:43 +08:00
Andrew Nicols
2fe23b9295 MDL-72125 behat: Add get_activity_id() behat generators helper 2021-07-16 12:33:56 +08:00
Andrew Nicols
c9a309ed6a 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
a247fd8d93 MDL-72125 testing: Add helper to run generators as a user 2021-07-16 12:33:56 +08:00
Thach Le Huy
7076db3492 MDL-72033 User tours: step placement issues if screen too narrow 2021-07-16 11:05:51 +07:00
abgreeve
5774e9e081 weekly release 3.11.1+ 2021-07-16 10:16:38 +08:00
abgreeve
fdaeb5c7c3 Merge branch 'install_311_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_311_STABLE 2021-07-16 10:16:37 +08:00
AMOS bot
ff2de0df79 Automatically generated installer lang files 2021-07-16 00:07:29 +00:00
sam marshall
cfb22b5591 MDL-72152 Behat: No way to test key shortcuts with letter keys
Extends the existing step 'And I press the Shift Left key' so that
it supports letter/other keys: 'And I press the Ctrl C key'.
2021-07-15 10:46:45 +01:00
Jun Pataleta
2cde9d6aff Merge branch 'MDL-63770-311' of /home/jun/moodles/stable_311/moodle into MOODLE_311_STABLE 2021-07-15 16:15:39 +08:00
Matteo Scaramuccia
15d50814c6 MDL-63770 core: 'port' should be an integer like in parse_url()
Plus trivial comment cleanup.
2021-07-15 11:39:33 +08:00
Dmitri Pisarev
aa59c122df MDL-63770 core: Fix a false-positive in reverseproxyabused check
A `reverseproxyabused` error is wrongly triggered when external port number doesn't equal internal.
2021-07-15 11:39:33 +08:00
Eloy Lafuente (stronk7)
0443be1bca Merge branch 'MDL-67338-311' of git://github.com/paulholden/moodle into MOODLE_311_STABLE 2021-07-15 00:34:42 +02:00