870 Commits

Author SHA1 Message Date
Jun Pataleta
f6a22d3e61
Merge branch 'MDL-80805-main' of https://github.com/sammarshallou/moodle 2024-02-23 17:32:05 +08:00
sam marshall
14b1e93e85 MDL-80805 core_form: Accessibility - add aria-required to form fields
Most types of form field will now include aria-required="true" if the
field is marked as required. This causes assistive technology to inform
users that the field is required.

Before this change, in some cases (e.g. screen reader users tabbing
through fields) users were not informed that a field is required.
2024-02-15 14:30:33 +00:00
Paul Holden
d057af03e9
MDL-79788 tag: convert tag collection page to reportbuilder report. 2024-02-08 16:31:02 +00:00
Justus Dieckmann
216047dc18
MDL-79498 javascript: Adjust get_string function signature
Reflect param and lang being optional parameters.
2024-01-18 10:51:02 +08:00
Ilya Tregubov
1e83b9eba7 Merge branch 'MDL-79985-master' of https://github.com/ferranrecio/moodle 2023-12-20 09:06:08 +08:00
Ferran Recio
02de5b79fd MDL-79985 output: prepare dropdown components for forms
Add new features to the dropdown components (dialog and status) needed
for using them in quick forms. Now the dialog dropdown have methods to
disable the dropdown button (to disable the field). The status dropdown
has one minor style bugfix and the selected item styles are now stored
as a data attribute.
2023-12-19 09:33:45 +01:00
Paul Holden
3019f4e57c
MDL-80393 lang: expose current page language to JS modules.
Since 4be39296 the root HTML element contains the iso6391 language
code of the current language pack. However various JS modules need
access to the original Moodle language pack code, so expose that
in the `M.cfg` structure.
2023-12-19 07:47:15 +00:00
Jun Pataleta
d953068659
MDL-79061 course: Create a sr-only mutations logger
* Create SRLogger that extends from the default Logger class. This
logger outputs the feedback to a sr-only ARIA live region to allow
screen readers to announce the feedback from mutations.
* Update the course editor to use the SRLogger.
2023-12-07 10:43:28 +08:00
Ferran Recio
d8c0e1880f
MDL-79061 core: Mechanism for logging mutation feedbacks
* Create a mechanism for logging mutation feedbacks.
* The mutation feedbacks are displayed as a toast by default.
* Apply this logging mechanism on the course homepage to provide
feedback for the results of actions performed on course modules and
course sections.
2023-12-07 10:43:28 +08:00
Ilya Tregubov
abf2c568be
Merge branch 'mdl67898-check-setting-admintree' of https://github.com/matthewhilton/moodle 2023-11-23 10:25:20 +08:00
Matthew Hilton
9b8acd44d1
MDL-67898 check: Add check admin setting
This admin setting allows you to display a check anywhere in the admin
tree. It uses a webservice to execute the check, so the impact on the
admin tree performance is as low as possible.

Checks do not necessarily need to be registered in the plugins callback
to be shown here, allowing customisation of what is shown in the
settings versus the reports.
2023-11-21 12:04:42 +10:00
Mikel Martín
1a7732b195 MDL-75673 core: Add popper v2.11.8 lib 2023-11-16 17:45:41 +01:00
Paul Holden
58d9babe56
MDL-79629 javascript: native promises enhancing autocomplete module.
Preserve existing `enhance` method return of jQuery style promises to
allow calling code to continue relying on that (e.g. when calling old
style `.done` and `.fail`).

Co-authored-by: Andrew Nicols <andrew@nicols.co.uk>
2023-11-08 20:05:35 +00:00
Sara Arjona
2fc405aa35
Merge branch 'MDL-79629' of https://github.com/paulholden/moodle 2023-11-08 09:57:30 +01:00
Huong Nguyen
1e256012a1 Merge branch 'MDL-78953' of https://github.com/pedrojordao/moodle 2023-11-07 15:33:29 +07:00
Pedro Jordao
2d73818742 MDL-78953 autocomplete: Add only one empty option when deselecting item.
Each option that was deselected was prepending an empty option in the select.
2023-11-02 18:35:21 -03:00
Paul Holden
4fff2059b8
MDL-79646 javascript: add class to dropped item after drag/drop. 2023-11-02 14:56:26 +00:00
Mikel Martín
e9afd7f072
MDL-79629 forms: Improvements to autocomplete form element
- Preserve autocomplete input options classes to the autocomplete suggestions
- Add new styles for suggestions headings
- Add a new class selector form-autocomplete-input so input can be easily selected
  for styling.

Various improvements to make the module more re-usable elsewhere:
change event bubbling, promise argument support when enhancing.

Co-authored-by: Paul Holden <paulh@moodle.com>
2023-11-02 14:50:10 +00:00
Jun Pataleta
c5b11f6eb4
Merge branch 'MDL-79194-master' of https://github.com/laurentdavid/moodle 2023-10-27 23:34:07 +08:00
Ferran Recio
3cb49765a4 MDL-79194 core_courseformat: optimize section reload
* When reloading a section, we also forced the reloading of
course modules, resulting in doing the same work twice (once for
the section reload and once for the course module reload)
* Debounce the reloading process so prevent unwanted duplicate
reloads
2023-10-26 11:03:52 +02:00
Andrew Nicols
37092a6485
MDL-79693 core: Move toast regions to document on modal close 2023-10-13 14:16:52 +01:00
Sara Arjona
563851857f
Merge branch 'MDL-79602-master' of https://github.com/HuongNV13/moodle 2023-10-05 13:03:46 +02:00
Huong Nguyen
d0294388d7
MDL-79602 core: Handle empty selection for MoodleNet 2023-10-05 12:10:11 +07:00
Ilya Tregubov
f2ba761bef
Merge branch 'MDL-79157-master' of https://github.com/ferranrecio/moodle 2023-10-04 18:49:19 +08:00
Ferran Recio
0c6a581f1e MDL-79157 output: fix menu subpanels keyboard navigation 2023-10-04 11:07:45 +02:00
Huong Nguyen
5602cc2488
Merge branch 'MDL-79548-master' of https://github.com/mickhawkins/moodle 2023-10-04 10:21:41 +07:00
Ferran Recio
3f985bf3cf
MDL-79458 output: fix subpanels in classic 2023-10-03 13:32:27 +02:00
Michael Hawkins
83998b9ba9
MDL-79548 core: Update MoodleNet modal strings so they can be translated
Previously, the type of share (course/activity) was being injected into
the string, but not from a translation, so did not fully translate. The
MoodleNet type (resource) was working, but has also been replaced here
to avoid inserting one string into another (this was also unnecessary
while resource is the only possible option). This also meant the latter
string could be deprecated.
2023-10-03 18:52:38 +08:00
Huong Nguyen
4a7259f236
Merge branch 'MDL-79224_master' of https://github.com/marxjohnson/moodle 2023-10-03 09:38:53 +07:00
Mark Johnson
6401ca4959 MDL-79224 core: Make Binary datafilter redisplay selected value
The Binary datafilter was returning a single value where all parts of
the API expect an array of values. This was working in most places by
fluke as this value was a single-character string, so doing $value[0]
returned the value. However, it was not working when deciding which
option to mark as selected when re-displaying the filter.

This change makes the filter return an array containing a single integer
value to match the rest of the API, then internally selects that single
value for comparison when deciding if an option should be selected.
2023-10-02 11:50:44 +01:00
Ilya Tregubov
c80e366051
Merge branch 'MDL-79458-master' of https://github.com/ferranrecio/moodle 2023-10-02 13:30:07 +08:00
Jun Pataleta
336ec5580a
Merge branch 'MDL-79041-master-2' of https://github.com/HuongNV13/moodle 2023-09-29 11:59:39 +08:00
Huong Nguyen
f61b060182
Merge branch 'MDL-78813-master' of https://github.com/mihailges/moodle 2023-09-28 12:01:25 +07:00
Huong Nguyen
5c131030fd
MDL-79041 core: Fix typo for MoodleNet resource URL 2023-09-28 11:33:00 +07:00
Mihail Geshoski
4fa621a62f MDL-78813 core: Event to notify when the sticky footer has been toggled
New event in core/sticky-footer that is fired when the sticky footer has
been enabled or disabled. Leveraging this event, modules can create
event listeners and execute actions once the sticky footer has been
toggled.
2023-09-27 10:02:03 +02:00
Ilya Tregubov
386f29a46d
Merge branch 'MDL-77708-master' of https://github.com/sarjona/moodle 2023-09-27 09:07:10 +08:00
Ferran Recio
0184a477d5 MDL-79458 output: fix action menu subpanel behats 2023-09-26 13:22:51 +02:00
Sara Arjona
cc9430929d
MDL-77708 docs: Update references from docs.moodle.org/dev 2023-09-26 10:30:19 +02:00
Jun Pataleta
7a369aa0a8
Merge branch 'MDL-79420-master' of https://github.com/HuongNV13/moodle 2023-09-26 10:57:46 +08:00
Mihail Geshoski
c2628ac3b9 MDL-77035 core: Base js class for a bulk action
Implements a base js class that each individual bulk action
implementation needs to extend. This class contains all common event
listeners, methods (including abstract) that each implementation need
to use. Also, it introduces a default mustache template for the bulk
action trigger elements.
2023-09-20 23:53:43 +02:00
Mihail Geshoski
662a2fca9c MDL-77035 core: Base js class for a bulk actions area
Introduces a base js class that bulk actions area implementations need
to extend. This class contains all common selectors, event listeners,
methods (including abstract) that each implementation would use.
Also, introduces a common template for the bulk actions area.
2023-09-20 23:53:43 +02:00
Huong Nguyen
90e3a3d994
MDL-79420 core: Remove invalid MoodleNet template call 2023-09-20 11:38:54 +07:00
Jake Dallimore
6b214f1c81
MDL-79384 core: fix modal footer logic when rendering it from template
If the footer property is a Templates.render() promise, and the modal is
set to show immediately (show=true), the show() logic - which contains
the footer show/hide logic - can run before the footer content is set
(i.e. before the promise chain is complete). In such cases, the footer
will be marked as hidden and must be made visible again.
2023-09-18 16:04:58 +08:00
Ilya Tregubov
f5050ab31f
Merge branch 'MDL-78255-master' of https://github.com/davewoloszyn/moodle 2023-09-14 17:50:24 +08:00
Huong Nguyen
4ead50e696
MDL-78267 core: Partial course sharing for MoodleNet 2023-09-14 14:59:50 +07:00
Jun Pataleta
9cd44cbf4c
Merge branch 'MDL-79356-master' of https://github.com/HuongNV13/moodle 2023-09-14 11:52:12 +08:00
Huong Nguyen
e1cff527b9
MDL-79356 core: Convert MoodleNet modals to use new static methods 2023-09-14 09:44:19 +07:00
Jun Pataleta
f8b16ea91f
Merge branch 'MDL-78826-master' of https://github.com/roland04/moodle 2023-09-13 19:28:25 +08:00
Andrew Nicols
82761c582c
MDL-78324 core: Deprecate core/modal_factory 2023-09-09 00:05:04 +08:00
Andrew Nicols
48bc688ccd
MDL-78324 core: Convert modals to use new static methods
This commit takes all modals which were not using the legacy
ModalFactory.create triggers and migrates them to the new Modal.create
method.
2023-09-09 00:04:11 +08:00