28591 Commits

Author SHA1 Message Date
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
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
Dmitri Pisarev
1983718149 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-12 11:23:49 +02:00
cescobedo
084833acbe MDL-71919 core_message: Fix tests in message_send 2021-07-08 23:30:35 +02:00
cescobedo
9aa5f7fe9b MDL-71919 core_message: Fix unclosed html tags in email notification 2021-07-08 23:30:35 +02:00
Adrian Greeve
a5336912d9 Merge branch 'MDL-61460-master-4' of git://github.com/bmbrands/moodle 2021-07-08 23:30:34 +02:00
Mihail Geshoski
4772dece1d MDL-58393 core: Remove firstname argument from emailconfirmation string 2021-07-08 23:30:33 +02:00
Sujith Haridasan
b2527be7d3 MDL-71241 course: Validate and sanitize sort arguments
Signed-off-by: Sujith Haridasan <sujith@moodle.com>
2021-07-08 23:30:27 +02:00
Andrew Nicols
36f21508fb MDL-72108 js: Fix incorrect jsdoc examples for core/ajax 2021-07-08 10:39:13 +08:00
Bas Brands
3de68ad434 MDL-61460 tool_componentlibrary: Documentation for Moodle UI components
- This tool is only available for admins
- Before using this tool the hosting admin will need to have NPM installed and be able to run grunt
- To create the docs pages for the library run "grunt componentlibrary"
- After the pages are created the Library is available in Site adminstration > Development > UI Component Library
2021-07-08 09:51:02 +08:00
Jun Pataleta
341578bfde MDL-61460 core: Create a copy to clipboard JS module
This works by adding event listeners for elements that contain
the 'copytoclipboard' "data-action" attribute through event delegation.
These trigger elements must also define a "data-clipboard-target"
attribute which contains the query selector for the target element
where text will be copied.

On success, a toast message is shown to the user that the text has
been copied to the clipboard. This success message can be customised
by passing a message string to the "data-clipboard-success-message"
attribute in the trigger element.

When the element's value or innerText cannot be found, a toast message
indicating that the text cannot be copied to the clipboard is shown.

The copy to clipboard functionality is primarily using the Clipboard API
but in the event that this is not available, e.g. the site is not
running on HTTPS, this falls back to the document.execCommand('copy')
approach of copying the text in the target container.

Special thanks to Andrew for improving this module with the event
delegation approach and improved fallback handling.

Co-authored-by: Andrew Lyons <andrew@nicols.co.uk>
2021-07-08 09:50:34 +08:00
Michael Hawkins
0afab1d0f9 MDL-71916 lib: Check cURL redirects for blocked URLs before following 2021-07-06 23:45:59 +02:00
Eloy Lafuente (stronk7)
e5b76c53b3 Merge branch 'MDL-70638' of git://github.com/paulholden/moodle 2021-07-06 20:21:16 +02:00
Paul Holden
4f343bd359 MDL-70638 user: correct access checks when serving profile files.
Requests for files from a users profile file area should follow
the same access checks as for the profile itself.
2021-07-06 10:28:24 +01:00
Paul Holden
f3b3684e5b MDL-71981 dataformat: indicate HTML support in writer callback. 2021-07-06 09:27:15 +08:00
Andrew Nicols
44cde6766b Merge branch 'MDL-71176-master_password_autocomplete' of https://github.com/safatshahin/moodle 2021-07-01 10:08:04 +02:00
Safat Shahin
bc76ab4742 MDL-71176 login: Add html5 autocomplete attributes
This implementation will include the correct
autocomplete attribute value so that the password
managers can aid in creating good secure passwords
and not get confused with other autocomplete types.
There are some changes the password type form so
that autocomplete attribute can be passed an array.
2021-07-01 12:38:11 +10:00
Andrew Nicols
1543d600e4 Merge branch 'master_MDL-71175' of https://github.com/danmarsden/moodle 2021-07-01 09:56:31 +08:00
Andrew Nicols
744e9266f0 Merge branch 'MDL-68003' of https://github.com/timhunt/moodle 2021-07-01 09:52:48 +08:00
Sara Arjona
27243e2ff7 Merge branch 'MDL-71991' of https://github.com/timhunt/moodle 2021-06-30 16:09:30 +02:00
Andrew Nicols
b12bb97048 Merge branch 'MDL-71863-master-v02' of git://github.com/ferranrecio/moodle 2021-06-30 10:04:23 +08:00
Eloy Lafuente (stronk7)
17135030cc Merge branch 'MDL-66539-master' of git://github.com/HuongNV13/moodle 2021-06-29 18:37:20 +02:00
Tim Hunt
0bb2d16337 MDL-68003 session timeout warning: don't show in iframes 2021-06-29 16:58:06 +01:00