537 Commits

Author SHA1 Message Date
Mikel Martín
2ea44fb45e
MDL-79629 core_question: Improve autocomplete categories UI 2023-11-02 14:50:10 +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
Paul Holden
5bec400483
MDL-79693 output: remove embedded toast region from clipboard modal.
This was causing the toast notification upon the clipboard action
result to immediately disappear as the modal was closed. The toast
module can happily handle this for us itself, so remove from the
template.
2023-10-17 08:20:54 +01: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
Jun Pataleta
336ec5580a
Merge branch 'MDL-79041-master-2' of https://github.com/HuongNV13/moodle 2023-09-29 11:59:39 +08:00
Ilya Tregubov
12b5c2e952
Merge branch 'MDL-79463' of https://github.com/paulholden/moodle 2023-09-28 16:40:35 +08:00
Huong Nguyen
5c131030fd
MDL-79041 core: Fix typo for MoodleNet resource URL 2023-09-28 11:33:00 +07:00
Huong Nguyen
1dda6c86b8
MDL-79041 core: Better handling of the MoodleNet resource URL
- Switch use PARAM_TEXT instead of PARAM_URL for resource URL
 - Added noreferrer to the Go to MoodleNet drafts button, to avoid the risks associated with opening in
   _blank without removing access to the referrer and opener
2023-09-28 11:32:59 +07:00
Mihail Geshoski
6a4cf000b3 MDL-77035 grades: Fix checkbox spacing to satisfy accessibility criteria 2023-09-22 11:29:53 +02:00
Paul Holden
c518c78ca4
MDL-79463 output: invert logic in url_select change event.
Avoids eslint `consistent-return` errors (because we previously only
returned from the conditional branch).
2023-09-22 10:21:44 +01:00
Mathew May
7f33dfc887 MDL-77035 grades: Update toggleall for a11y 2023-09-20 23:53:44 +02:00
Mihail Geshoski
cda31407e7 MDL-77035 grades: Fix accessibility violation in modals
Adds the aria-labelledby attribute to the .modal element in order to
comply with the modal accessibility requirements.
2023-09-20 23:53:44 +02: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
Ferran Recio
4dcac269be
MDL-78955 lib: fix choice list styling 2023-09-18 10:41:24 +08:00
Ferran Recio
6b6f71ea6f
MDL-78955 lib: merge choicelist templates 2023-09-18 10:41:14 +08:00
Huong Nguyen
4ead50e696
MDL-78267 core: Partial course sharing for MoodleNet 2023-09-14 14:59:50 +07:00
Jun Pataleta
f8b16ea91f
Merge branch 'MDL-78826-master' of https://github.com/roland04/moodle 2023-09-13 19:28:25 +08:00
Ferran Recio
c87fe6036d MDL-78826 javascript: add dropdown js controls 2023-09-08 10:23:13 +02:00
Jun Pataleta
3492efae57
MDL-79250 admin: Add title to external_content_banner template 2023-09-04 16:53:02 +08:00
Mark Johnson
4b160a7c7b
MDL-72321 datafilter: Stop disabling jointype field
This was causing behat test failures due to the test trying to
set the disabled jointype field before the filter type was selected.
2023-09-01 23:43:20 +08:00
Andrew Nicols
1ce54ee87e
Merge branch 'MDL-72321_master-squashed' of https://github.com/marxjohnson/moodle 2023-08-31 23:02:35 +08:00
Mark Johnson
823af3a8f1 MDL-72321 core_question: Replace old conditions with new datafilters 2023-08-31 15:00:39 +01:00
Mark Johnson
2e02264945 MDL-72321 core: Support disabled options in form-autocomplete
Autocomplete fields can now include disabled options in the suggestion
list. When calling .enchance() on a select list with disabled options,
those options will be added to the autocomplete suggestions with the
aria-disabled arribute set, and will not be selectable.

Datafilters using the autocomplete element can also hook into this by
including disabled options in their list of values.
2023-08-31 15:00:38 +01:00
Mark Johnson
7091a3210c MDL-72321 core: Allow datafilters to specify a subset of join types
A datafilter can now specify a subset of jointypes that it supports from
the default list of all, any or none. By default all options will be
available, but an individual filter can ovveride this to include just
those options that make sense for the filter. If only one option is
allowed, the select list will be hidden to simplify the UI.
2023-08-31 15:00:37 +01:00
Nathan Nguyen
ef8c11328b MDL-72321 core: Add binary datafilter
This adds a new datafilter type which provides a single binary choice
(for example yes/no).
2023-08-31 15:00:37 +01:00
Sara Arjona
d02be922a0
Merge branch 'MDL-78656' of https://github.com/paulholden/moodle 2023-08-28 16:29:45 +02:00
Jun Pataleta
29ec472284
Merge branch 'MDL-53368-master-3' of https://github.com/HuongNV13/moodle 2023-08-24 22:51:26 +08:00
Mark Johnson
e81a8381a8 MDL-72321 core: Allow datafilters to be marked required
Required datafilters cannot be removed. There will be no remove button
on the filter row, and the "Clear filters" button will ignore them.
2023-08-24 11:09:37 +01:00
Huong Nguyen
0cd29afb6f
MDL-53368 core_auth: Implement reCaptcha on login page 2023-08-24 15:18:31 +07:00
Jun Pataleta
dfadf21e2f
Merge branch 'MDL-77640-master-latest' of https://github.com/kevpercy/moodle 2023-08-24 10:23:17 +08:00
Kevin Percy
d5ece4bdbd MDL-77640 output: Fixed HTML validation for select_menu 2023-08-23 15:58:07 +08:00
Paul Holden
c19d9693e9
MDL-78656 output: display menu item titles in primary navigation.
Since custom menu items were merged into the primary navigation/more
menu as part of 56c34d71 and related work, the "title" attribute of
each custom menu item was lost.
2023-08-22 17:29:59 +01:00
Cameron Ball
230fcddd62 MDL-78630 auth: Display lock/unlock messages 2023-08-15 10:59:09 +08:00
Ilya Tregubov
93c910f20a
Merge branch 'MDL-78665-master-v02' of https://github.com/ferranrecio/moodle 2023-08-07 12:19:30 +08:00
Ilya Tregubov
2e18ba8750
Merge branch 'MDL-78550-master' of https://github.com/junpataleta/moodle 2023-08-07 11:34:04 +08:00
Ferran Recio
105324e6fd MDL-78665 output: add subpanels to action menu
Many times the action menu item triggers modals to show more information
to the user. In most cases this is enough, however, a modal will close
the menu and the user is not able to see the modal content in the page
context. To solve this now menus can define subpanels that are displayed
next the the menu item when the item is focused or hover. This will be
used to group options like the group mode in activities or to replace
the adhoc solution implemented to select language in the user menu.
2023-08-04 16:09:29 +02:00
Ferran Recio
013b1a172f MDL-78665 output: add default template to choicelist
The choicelist output class is designed to represent a user choice in
several formats like a dropdown or subpanel. In general, other
components are free to render the choice in its own way. However, to
simplify the logic the choicelist now provide a default template to be
used in any div or panel.
2023-08-04 16:07:59 +02:00
Mathew May
a4b3b0d044 MDL-77991 core: Move tertiary search dropdown component 2023-08-03 09:07:18 +08:00
Jun Pataleta
eaa1ce1830
MDL-78550 core: Ensure spacing between more menu item attributes 2023-07-28 17:46:56 +08:00
Sara Arjona
2c3f4d3ae9
Merge branch 'MDL-78288-master' of https://github.com/aanabit/moodle 2023-07-13 16:49:56 +02:00
Amaia Anabitarte
b9a840f638 MDL-78288 behat: New availability info selectors
- Create a new availability info selectors for section and activity data info regions
- Replace css_element by created selectors in the existing behat tests
2023-07-12 14:22:56 +02:00
Ferran Recio
109a97cff3 MDL-78279 output: new status dropdown component
This compoment allow the user to select a status from a user
choice instance. It is rendered as a dropdown menu triggered by
a button.
2023-07-10 11:41:20 +02:00
Ferran Recio
e3645f663b MDL-78279 output: new generic dropdown component 2023-07-10 11:41:19 +02:00
Ilya Tregubov
94452ea194
Merge branch 'MDL-77375-master' of https://github.com/rezaies/moodle 2023-07-06 09:19:57 +08:00
Shamim Rezaie
aaadb0d6ef MDL-77375 output: Allow additional options for dropdowns 2023-06-30 11:24:45 +10:00
Mikel Martín
fb49de8875 MDL-78204 core: Add new showmore/showless UI component
- Create a new 'showmore' template that receives both collapsed and expanded content.
Initially only the collapsed content will be displayed with a "Show more" button. When it is expanded,
only the expanded content will be displayed with "Show less" button.

- Add 'showmore' component to component library
2023-06-26 09:32:39 +02:00
Brendan Heywood
73ed05ecf2 MDL-78341 core: Improve the progress bar style 2023-06-14 09:09:43 +10:00
Jake Dallimore
df95eace29
MDL-78408 core: fix restoration of anchor to wantsurl during login 2023-06-07 14:13:57 +08:00
Paul Holden
5cc7311717
MDL-73138 user: avoid double encoding participant filter values. 2023-05-26 10:25:33 +01:00