Commit graph

27988 commits

Author SHA1 Message Date
Andrew Nicols
80bf03d583 MDL-70167 behat: Boolean attributes should either exist or not 2020-11-23 11:03:28 +08:00
Andrew Nicols
0214c50b18 MDL-67668 behat: Add inplace editable field type
This commit promotes the Inplace Editable field to a first-class form
element by introducing a new partial selector for inplace editable
fields, and teaching the field manager how to recognise these, then
introducing a new field type which can handle setting values for this
field.
2020-11-23 09:00:46 +08:00
Andrew Nicols
e29e8373e6 MDL-67668 behat: Share behat_behat functionality with forms
Behat form fields are implemented in a way completely isolated from the
rest of the Behat Context system. Whereas regular step definitions have
access to execute steps, to call `find`, check for JS running, and other
related functionality, the Moodle implementation of a field type does
not have any access to this.

By moving the core functionality of behat_base to a new trait, and the
constants to a new interface, the functionality can also be used in
behat form fields in the same way as elsewhere.
2020-11-23 09:00:46 +08:00
Andrew Nicols
9e11009eb1 MDL-67668 behat: Correct js pending check
Pending checks should only run when JS is running, but some uses were
not apply this check.
2020-11-23 09:00:46 +08:00
Andrew Nicols
a01ca7a600 MDL-67668 behat: Support NodeElement when fetching node in container
This is similar to change made in MDL-69136 to allow an already-fetched
NodeElement to be provided to the get_node_in_container() function and
makes it easier to be deterministic when writing steps.
2020-11-23 09:00:46 +08:00
Adrian Greeve
f098f28d01 Merge branch 'MOODLE_310_STABLE-MDL-67636' of https://github.com/yao9394/moodle into MOODLE_310_STABLE 2020-11-19 11:57:33 +08:00
John Yao
bf17d50cf6 MDL-67636 gradebook: Prevent exposing hidden grade in locked category 2020-11-19 14:33:26 +11:00
Jun Pataleta
f589a25459 Merge branch 'MDL-70094-310' of https://github.com/SangNguyen2601/moodle into MOODLE_310_STABLE 2020-11-19 09:36:53 +08:00
Eloy Lafuente (stronk7)
dee389dff6 Merge branch 'MDL-69201-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2020-11-18 23:00:18 +01:00
sangnguyen2601
0ab0a293a8 MDL-70094 Question: Technical info section expands if click help icon 2020-11-18 17:32:40 +07:00
Eloy Lafuente (stronk7)
4e346470a5 Merge branch 'MDL-70148-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2020-11-17 23:13:17 +01:00
Andrew Nicols
c330c9276c MDL-70148 behat: Update steps for keyboard 2020-11-17 15:14:43 +08:00
Andrew Nicols
e9b443b3a1 MDL-70148 behat: Add steps to send keys without an element 2020-11-17 15:14:43 +08:00
Adrian Greeve
5e924f295a Merge branch 'MDL-50955-310' of git://github.com/peterRd/moodle into MOODLE_310_STABLE 2020-11-17 13:08:48 +08:00
Andrew Nicols
be2afb52c1 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 09:37:48 +01:00
Peter Dias
09520f8e0d MDL-50955 core: Reset lessons completion criteria if grade type is none 2020-11-16 16:35:33 +08:00
Andrew Nicols
d661fbfbc1 Merge branch 'MDL-67513-m310' of https://github.com/NeillM/moodle into MOODLE_310_STABLE 2020-11-16 08:27:35 +08:00
Neill Magill
a2dcfd5bf6 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:30:54 +00:00
Adrian Greeve
dd74c34e36 Merge branch 'MDL-69453-310' of git://github.com/bmbrands/moodle into MOODLE_310_STABLE 2020-11-12 11:56:29 +08:00
Jun Pataleta
4c1fbc320f Merge branch 'MDL-70072-310' of git://github.com/rezaies/moodle into MOODLE_310_STABLE 2020-11-11 22:09:07 +08:00
Bas Brands
e6ebfa4baa MDL-69453 core_form: improve form UI icons and alignment 2020-11-11 14:04:54 +01:00
Sara Arjona
05ef5c3c48 Merge branch 'MDL-70106-icon-cache-310' of https://github.com/Peterburnett/moodle into MOODLE_310_STABLE 2020-11-10 16:53:37 +01:00
Peter Burnett
ebe19aa434 MDL-70160 cache: plugin_functions checks for function_exists() 2020-11-10 16:03:53 +10:00
Paul Holden
898dd7bf5b MDL-69201 core: consistent table primary sort column/order. 2020-11-09 19:45:41 +00:00
Eloy Lafuente (stronk7)
4aa83d92bf MDL-70146 upgrade: add 3.10.0 separation line to all upgrade scripts 2020-11-07 23:26:09 +01:00
Shamim Rezaie
f6b7ed422a MDL-70072 core: Fix always displaying date in Gregorian 2020-11-06 19:23:11 +11:00
Jun Pataleta
022a019637 Merge branch 'MDL-70130-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2020-11-06 11:27:54 +08:00
Andrew Nicols
50f5563c1f 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 11:00:30 +08:00
Andrew Nicols
1c0b8f8c50 MDL-70130 core: Simplify attachment handling in email_to_suer 2020-11-06 11:00:29 +08:00
Marina Glancy
c879cb24df MDL-70130 core: allow to attach files from localrequestdir to emails
Co-authored-by: Paul Holden <paulh@moodle.com>
2020-11-06 11:00:29 +08:00
Marina Glancy
8c1917588d MDL-70131 cli: only allow to negate existing keys 2020-11-05 18:10:13 +01:00
Jun Pataleta
9023021ae0 Merge branch 'MDL-70075-310-2' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2020-11-05 12:51:23 +08:00
Andrew Nicols
27de77007b 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 09:05:38 +08:00
Andrew Nicols
34d1c23668 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-05 09:05:38 +08:00
Andrew Nicols
dc7ca062ca 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-05 09:05:38 +08:00
Andrew Nicols
8100d46f85 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-05 09:05:38 +08:00
Andrew Nicols
f4dfe66ea8 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-05 09:05:38 +08:00
Jun Pataleta
940ed72017 Merge branch 'MDL-70089_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2020-11-04 13:05:47 +08:00
Peter Burnett
3885c566aa MDL-70106 cache: Set icon localstorage cache to use theme localisation 2020-11-04 13:33:23 +10:00
Eloy Lafuente (stronk7)
b0a1b4ce8b MDL-70089 versions: bump all versions and requires near release
version = 2020110900 release version
requires= 2020110300 current beta+ (week6roll1) version

Note that, because we are under parallel development period,
this is being done in the branch that is going to be released
(MOODLE_310_STABLE already existing) for Moodle 3.10.0 and
not in master, that is the one getting the bump under normal
(non-parallel) periods.
2020-11-03 19:34:52 +01:00
Mihail Geshoski
fd2427746f MDL-67837 backup: Verify caps before unenrolling users on course restore 2020-11-03 12:34:28 +01:00
Andrew Nicols
4dd870de20 Merge branch 'MDL-70059-310' of git://github.com/sarjona/moodle into MOODLE_310_STABLE 2020-11-03 12:05:19 +08:00
Jun Pataleta
c353963ef8 Merge branch 'MDL-70033-310-2' of git://github.com/mickhawkins/moodle into MOODLE_310_STABLE 2020-11-03 12:01:33 +08:00
Michael Hawkins
eeaf19eb5c 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:54:56 +08:00
Jun Pataleta
73372330a9 Merge branch 'MDL-69975_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2020-11-03 00:00:25 +08:00
Sara Arjona
01c8c8828b 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:48:06 +01:00
Brendan Heywood
256f8a261c 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:09:39 +01:00
Eloy Lafuente (stronk7)
462fe3e925 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:14 +01:00
Jun Pataleta
03960b96cb Merge branch 'MDL-68167-310' of git://github.com/rezaies/moodle into MOODLE_310_STABLE 2020-10-30 13:16:55 +08:00
Shamim Rezaie
4d00ebae7a 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:08:56 +11:00