27845 Commits

Author SHA1 Message Date
Adrian Greeve
a0ba1ae381 Merge branch 'MDL-65843-task-overrides' of https://github.com/jamie-catalyst/moodle 2020-11-19 11:29:01 +08:00
Jun Pataleta
d74c9c622e MDL-70094 core: Fix version number for the upgrade note. 2020-11-19 09:40:25 +08:00
Jun Pataleta
1ce10609f3 Merge branch 'MDL-70094-master' of https://github.com/SangNguyen2601/moodle 2020-11-19 09:38:39 +08:00
Andrew Nicols
0c556aff71 Merge branch 'MDL-47456-avoid-siteid-db' of https://github.com/brendanheywood/moodle 2020-11-19 08:51:57 +08:00
Eloy Lafuente (stronk7)
30f2fe5301 Merge branch 'MDL-69201' of https://github.com/paulholden/moodle into master 2020-11-18 22:59:28 +01:00
Jamie Stamp
3a232840a5 MDL-65843 tasks: Allow schedules to be overridden in config 2020-11-18 12:44:05 +00:00
sangnguyen2601
39652702f0 MDL-70094 Question: Technical info section expands if click help icon 2020-11-18 18:03:08 +07:00
Eloy Lafuente (stronk7)
6ca32e21e5 Merge branch 'MDL-70148-master' of git://github.com/andrewnicols/moodle into master 2020-11-17 23:12:56 +01:00
Andrew Nicols
ba34d6e225 MDL-70148 behat: Update steps for keyboard 2020-11-17 15:14:43 +08:00
Andrew Nicols
9c35ea1040 MDL-70148 behat: Add steps to send keys without an element 2020-11-17 15:14:43 +08:00
Adrian Greeve
a370cb44bc Merge branch 'MDL-50955-master' of git://github.com/peterRd/moodle 2020-11-17 13:04:57 +08:00
Eloy Lafuente (stronk7)
de317c2cd4 Merge branch 'MDL-67513-master-fix' of https://github.com/andrewnicols/moodle into master 2020-11-16 09:17:31 +01:00
Andrew Nicols
78962293ef MDL-67513 core: Only move modal to body if currently attached
A previous change as part of this commitset was intended to move the
modal to the document.body, but where the modal had been destroyed it
was instead added back to the body.
2020-11-16 15:19:32 +08:00
Peter Dias
8e3031aed0 MDL-50955 core: Reset lessons completion criteria if grade type is none 2020-11-16 15:12:34 +08:00
Brendan Heywood
522e4c6c76 MDL-47456 core: Remove redundant DB call during bootstrap 2020-11-16 16:04:07 +11:00
Andrew Nicols
73bd838c1b Merge branch 'MDL-67513' of https://github.com/NeillM/moodle 2020-11-16 08:22:51 +08:00
Neill Magill
524253382c MDL-67513 forum: View conversations while fullscreen grading
Before this change when a modal was shown and an element on the page
was fullscreen the modal would be created behind it.

This change ensures that the modal will be inside an element that is
fullscreen so that it will be correctly displayed.
2020-11-12 08:35:55 +00:00
Adrian Greeve
1691176799 Merge branch 'MDL-69453-master' of git://github.com/bmbrands/moodle 2020-11-12 11:53:49 +08:00
Jun Pataleta
f0b91724fe Merge branch 'MDL-70072-master' of git://github.com/rezaies/moodle 2020-11-11 22:08:07 +08:00
Bas Brands
4d181cafa5 MDL-69453 core_form: improve form UI icons and alignment 2020-11-11 13:46:00 +01:00
Sara Arjona
16af4ae4db Merge branch 'MDL-70106-icon-cache' of https://github.com/Peterburnett/moodle 2020-11-10 16:53:27 +01:00
Paul Holden
70936e0c5e MDL-69201 core: consistent table primary sort column/order. 2020-11-09 19:45:49 +00:00
Shamim Rezaie
f0f45c01b1 MDL-70072 core: Fix always displaying date in Gregorian 2020-11-06 19:21:17 +11:00
Andrew Nicols
c42c08793b MDL-70130 core: Compare realpaths for file attachment checks
Rather than using the provided path, the `realpath` must be used to
ensure that the use of symlinks in paths is normalised.
2020-11-06 10:54:09 +08:00
Andrew Nicols
4f22fad9ac MDL-70130 core: Simplify attachment handling in email_to_suer 2020-11-06 10:54:09 +08:00
Marina Glancy
e30716a16e MDL-70130 core: allow to attach files from localrequestdir to emails
Co-authored-by: Paul Holden <paulh@moodle.com>
2020-11-06 10:02:04 +08:00
Marina Glancy
8a9a4ee4f3 MDL-70131 cli: only allow to negate existing keys 2020-11-06 09:30:08 +08:00
Jun Pataleta
2927457dbf Merge branch 'MDL-70075-master-2' of git://github.com/andrewnicols/moodle 2020-11-05 12:51:31 +08:00
Andrew Nicols
7d786c7968 MDL-70075 core: Autocomplete selection should always have an active item
Ensure that there is always one active element in the list of selected
autocomplete elements.

Without this we have issues beacuse clicking on the link makes the first
one active if one is not already active, and this turns a click event
into a drag event, which means that it is not deleted.
2020-11-05 08:55:50 +08:00
Peter Burnett
7fe1554c21 MDL-70106 cache: Set icon localstorage cache to use theme localisation 2020-11-04 13:29:53 +10:00
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
Mihail Geshoski
c8ac07fb50 MDL-67837 backup: Verify caps before unenrolling users on course restore 2020-11-03 12:34:28 +01: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
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
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
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
Peter Dias
df177126af MDL-70073 badges: Fix the master upgrade savepoint 2020-11-02 10:17:30 +08: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
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
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
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
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
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