27856 Commits

Author SHA1 Message Date
Adrian Greeve
41b9a81caa Merge branch 'MDL-67668-master-2' of git://github.com/andrewnicols/moodle 2020-11-23 15:40:04 +08:00
Jake Dallimore
766f68cbd2 Merge branch 'MDL-70160-function-cache-m' of https://github.com/Peterburnett/moodle 2020-11-23 15:21:31 +08:00
Andrew Nicols
fd71823ec7 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:01:19 +08:00
Andrew Nicols
548da2ce97 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:01:19 +08:00
Andrew Nicols
59daa3b548 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:01:19 +08:00
Andrew Nicols
1144969755 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:01:19 +08:00
Adrian Greeve
4baf02505a Merge branch 'master-MDL-67636' of https://github.com/yao9394/moodle 2020-11-19 11:59:32 +08:00
Jake Dallimore
6603ee4853 Merge branch 'MDL-67081-profile-cli' of https://github.com/brendanheywood/moodle 2020-11-19 11:41:31 +08:00
John Yao
11886d37ed MDL-67636 gradebook: Prevent exposing hidden grade in locked category 2020-11-19 14:29:55 +11:00
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
Brendan Heywood
7f97d1181d MDL-67081 xhprof: Allow conditional profiling from CLI using env vars 2020-11-13 14:01:38 +11: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
Peter Burnett
7fa2f521d7 MDL-70160 cache: plugin_functions checks for function_exists() 2020-11-10 16:02:55 +10: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