99534 Commits

Author SHA1 Message Date
Andrew Nicols
a88838c25f MDL-70075 core: Do not return a value in an event handler
Returning a value of `false` in an event handler has the effect of
calling event.preventDefault() and event.stopPropagation().

This is neither obvious, nor desirable in this situation.
2020-11-04 11:27:55 +08:00
Andrew Nicols
5d16bfcf7c MDL-70075 core: jQuery.attr() does not accept a bool value
The documented values that jQuery.attr() accepts are String, Number, or
null. For some reason, when we pass a Boolean value, the subsequent
click handler does not work in some situations.

Changing this to take a Number, and unsetting it when empty, resolves
this issue.
2020-11-04 11:27:55 +08:00
Andrew Nicols
189a4c8f8e MDL-70075 core: Listen for change in accessibleChange event
The accessibleChange custom interaction event was only listening for
blur and focus, however some OS/browser combinations do not emit these
events until the element is explicitly blurred. This is notably
different on Firefox on some Operating Systems.

Recent changes in MDL-68167 explicitly moved the user participants page
filter module to use the accessibleChange event, which means that the
selections are now only triggered on an explicit blur when using
Firefox. This highlight a bug whereby, when the mouse is used to make a
selection, the event is not triggered until the element is blurred.

This change modifies the accessibleChange event to ignore the `change`
event where it was triggered by the keyboard and where that keybaord
event was not a [return] or [escape] keypress, but to otherwise respect
the native change event.
2020-11-04 11:27:55 +08:00
Andrew Nicols
3caa6bfbe1 MDL-70075 core: Listen for the focus and blur events again
The `blur` event does not bubble, but the `focusout` events are not
available in all supported versions of Firefox.

Rather than switching event, this patch using event capture to
effectively achieve the same result and bubble the event up through the
DOM to the delegated listener.

There should be no functional change with this patch, except to support
Firefox fully.
2020-11-04 11:27:55 +08:00
Huong Nguyen
d67bcd6b9a MDL-69955 qtype_ddimageortext: drop zone disappear in special case 2020-11-04 09:51:00 +07:00
Jake Dallimore
3ab2d0010b Merge branch 'MDL-70093-master' of https://github.com/golenkovm/moodle 2020-11-04 09:00:05 +08:00
Tim Hunt
a26c04c34a MDL-70112 drag-drop qtypes: fix form preview 2020-11-03 21:25:51 +00:00
Mihail Geshoski
253af8711d MDL-67837 backup: Add unit tests 2020-11-03 12:34:28 +01:00
Mihail Geshoski
c8ac07fb50 MDL-67837 backup: Verify caps before unenrolling users on course restore 2020-11-03 12:34:28 +01:00
andreasschenkel
85994027bd MDL-69844 user: Fix no email in download_participants_table
Only include eMail in download_participants_table 
if selected in showuseridentity 
($identityfieldsselect)
2020-11-03 12:34:28 +01:00
Juan Leyva
8169aeff59 MDL-67015 mod_data: Prevent users adding entries to other groups 2020-11-03 12:34:28 +01:00
Amaia Anabitarte
66be08216e MDL-69046 core_contentbank: Escape quotes when showing name 2020-11-03 12:34:28 +01:00
Ferran Recio
b8e1eec4c7 MDL-69378 tool_uploadcourse: fix enrolment methods uploads 2020-11-03 12:34:28 +01:00
Peter Dias
828caaac70 MDL-56310 restore: Confirm user has permission to change capabilities 2020-11-03 12:34:28 +01:00
Eloy Lafuente (stronk7)
2444c9d9be weekly release 4.0dev 2020-11-03 12:21:06 +01:00
Michael Hawkins
fe60d58063 MDL-68749 theme: Fix bootstrap toggle switches in RTL layout
Co-authored-by: Bas Brands <bas@moodle.com>
2020-11-03 15:12:01 +08:00
Andrew Nicols
2c20083a16 Merge branch 'MDL-70059-master' of git://github.com/sarjona/moodle 2020-11-03 12:03:49 +08:00
Jun Pataleta
e275f0f5da Merge branch 'MDL-70033-master-2' of git://github.com/mickhawkins/moodle 2020-11-03 12:02:08 +08:00
Michael Hawkins
d1f0ca6e3c MDL-70033 course: Update download content event handling for Classic 2020-11-03 11:53:57 +08:00
Michael Hawkins
f01c2fa4e7 MDL-70033 core: Update tree.js event handlers to replace stopPropagation
Also added support to allow links to override action keys (enter/space)

Co-authored-by: Andrew Nicols <andrew@nicols.co.uk>
2020-11-03 11:53:57 +08:00
Eloy Lafuente (stronk7)
cb163538bb Merge branch 'MDL-70081-master' of git://github.com/jleyva/moodle into master 2020-11-03 01:24:45 +01:00
Jun Pataleta
a81f648ac4 Merge branch 'MDL-69975' of https://github.com/stronk7/moodle 2020-11-03 00:00:44 +08:00
Sara Arjona
88460c4b00 Merge branch 'MDL-69973' of https://github.com/stronk7/moodle 2020-11-02 15:44:41 +01:00
Bas Brands
d64def4d53 MDL-70100 theme_boost: quiztimer zindex fix 2020-11-02 11:29:37 +00:00
Sara Arjona
ee0c9d2efd MDL-70059 core_badges: avoid duplicate key error
When 2 or more backpack were created without credentials,
a "Duplicate key value violates unique constraint" error
was raised because externalbackpackid was not taking the
correct value.
Other improvements have been done to the code too in order
to make it more readable.
2020-11-02 10:41:38 +01:00
Jake Dallimore
7e44e7d2dc Merge branch 'MDL-70073-master' of git://github.com/peterRd/moodle 2020-11-02 13:57:21 +08:00
Mikhail Golenkov
4da24c982e MDL-70093 dataformat_pdf: Fix row height calculation with high cells 2020-11-02 14:46:17 +11:00
Peter Dias
df177126af MDL-70073 badges: Fix the master upgrade savepoint 2020-11-02 10:17:30 +08:00
Jun Pataleta
4231758896 Merge branch 'MDL-70074-add-authendpoint' of https://github.com/cengage/moodle 2020-11-02 10:04:24 +08:00
Alexander
98ea30aac9 MDL-70067 theme_classic: Use col-12 as col-xs-12 was removed in BS4 2020-11-02 09:04:23 +13:00
Brendan Heywood
10f33b6fdc MDL-69975 core: Fix paths longer than 260 chars on windows
Also, ensure that remove_dir() only processes directories,
because sometimes it was being called by shutdown managers
with files, leading to PHP warnings.

Co-authored-by: Eloy Lafuente (stronk7) <stronk7@moodle.org>
Co-authored-by: Jun Pataleta <jun@moodle.com>
2020-11-01 11:02:00 +01:00
Juan Leyva
4bc5333b05 MDL-70081 airnotifier: Add missing device type in token registration 2020-10-31 13:07:30 +01:00
Claude Vervoort
6f34fe6dfe MDL-70074 mod_lti: add authorization_endpoint 2020-10-30 18:16:04 -04:00
Eloy Lafuente (stronk7)
12e273dddd MDL-69973 xmldb: Ensure all reports use fresh metadata (not cached) 2020-10-30 19:27:11 +01:00
Eloy Lafuente (stronk7)
533c35ff99 MDL-69973 xmldb: Fix problem with MariaDB >= 10.2.7 metadata defaults
With MariaDB 10.2.7 the driver was incorrectly returning '' (empty
string) as default for all the columns having null (meaning, no
default).

Also, cover the case in unit tests, it seems that we were already
testing other defaults but not the null case.
2020-10-30 19:27:11 +01:00
Marina Glancy
81fe9e9af5 MDL-68349 auth_db: user_created event should be triggered later 2020-10-30 14:18:02 +01:00
Eloy Lafuente (stronk7)
58ba94a729 weekly release 4.0dev 2020-10-30 13:48:48 +01:00
Eloy Lafuente (stronk7)
3814233fa0 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install into master 2020-10-30 13:48:46 +01:00
Jun Pataleta
48397d35ab Merge branch 'MDL-68167-master' of git://github.com/rezaies/moodle 2020-10-30 13:17:02 +08:00
Shamim Rezaie
0438cd60bb MDL-68167 lib: autocomplete focos should not be removed on blur
See https://www.w3.org/TR/wai-aria-practices-1.1/examples/listbox/listbox-rearrangeable.html
2020-10-30 16:01:38 +11:00
Shamim Rezaie
e2ee6025fe MDL-68167 lib: Do not set aria-expanded if it should not be set 2020-10-30 16:01:38 +11:00
Shamim Rezaie
c682aa5f97 MDL-68167 user: Fix missing label for participants filter input fields 2020-10-30 16:01:38 +11:00
Shamim Rezaie
cb0bf0ffe0 MDL-68167 lib: Clear single-select autocomplete elements with keyboard
Following MDL-57680, it should be possible to clear the selected option
using keyboard as well.
2020-10-30 16:01:38 +11:00
Shamim Rezaie
6fdfbc44f9 MDL-68167 user: Fix a hardcoded string to be read from lang pack 2020-10-30 16:01:38 +11:00
Shamim Rezaie
b6d733dd4e MDL-68167 lib: Fix label for autocomplete selection/suggestion box
The content of the autocomplete selection div is purged by javascript
so we have to move its label outside of it. aria-labeledby is the way
to go.

Each time the suggestion box is expanded, autocomplete js renders the
autocomplete suggestions template. So the label cannot be outside the
suggestions ul.
2020-10-30 16:01:38 +11:00
Shamim Rezaie
ceda24637d MDL-68167 user: filter elements should listen to accessibleChange event 2020-10-30 14:52:52 +11:00
Shamim Rezaie
15a349dd4f MDL-68167 lib: The accessibleChange custom event now supports bubbling
The change event bubbles so the accessibleChange shoud bubble as well.
2020-10-30 14:52:52 +11:00
Shamim Rezaie
29ad80e4ff MDL-68167 theme_boost: make focus outline accessible for autocompletes 2020-10-30 14:52:52 +11:00
Andrew Nicols
0ac855a304 Merge branch 'MDL-69156_master' of https://github.com/ffhs/moodle 2020-10-30 11:51:48 +08:00
Shamim Rezaie
b643c88682 MDL-68167 lib: Autocomplete selection to use listbox aria role
The aria-selected state cannot be used for the listitem role. The
autocomplete widget highly uses the aria-selected state internally.
2020-10-30 14:43:00 +11:00