Commit Graph

952 Commits

Author SHA1 Message Date
Huong Nguyen 286e797a4c Merge branch 'MDL-84897-main' of https://github.com/ferranrecio/moodle 2025-03-19 09:52:01 +07:00
Jun Pataleta 56183c786e Merge branch 'MDL-81714_main' of https://github.com/marxjohnson/moodle 2025-03-18 12:57:55 +08:00
ferran c72f27fdef MDL-84897 course: fix process monitor in Bootstrap 5 2025-03-17 13:10:32 +01:00
Mark Johnson 69afa8a3ac MDL-81714 grades: Display "Run now" button for admins in task indicator 2025-03-14 16:01:05 +00:00
Mark Johnson 10de329397 MDL-81714 grades: Add regrading progress indicator to grade reports 2025-03-14 16:01:05 +00:00
Sara Arjona 4d07aaadf4 Merge branch 'MDL-84398' of https://github.com/pedrojordao/moodle 2025-03-10 11:12:05 +01:00
Sara Arjona 0155708345 Merge branch 'MDL-84159' of https://github.com/paulholden/moodle 2025-03-10 11:07:26 +01:00
Andrew Nicols e183df6de2 Merge branch 'MDL-84529' of https://github.com/cwarwicker/moodle 2025-03-08 20:52:04 +08:00
Pedro Jordao c6dd02d764 MDL-84398 libraries: Configure locale property for ChartJs
ChartJs has a property called locale that makes possible to format scale
numbers according to a language. This way we ensure that decimal places
will be displayed correctly in the chart labels and tooltips.
2025-02-27 21:30:58 -03:00
Conn Warwicker a6e30bbc04 MDL-84529 core: Remove max validation on datetime filter.
This removes the "max" attribute from the input field of the
datetime filter. This can then be added back in by specific
filters if they inherit the core one and add their own
getContext() method.
2025-02-27 13:42:23 +00:00
Huong Nguyen 17d67c00bc Merge branch 'MDL-80351' of https://github.com/pedrojordao/moodle 2025-02-27 10:13:13 +07:00
Mikel Martín ac146ac14e MDL-84324 core: Fix Bootstrap dropdown key listeners
Bootstrap EventHandler is managing the keydown event at document
level in the capture phase. That is conflicting with dropdown elements
with form autocomplete inputs inside, because when suggestions panel is
open, pressing the "Esc" key will close the whole dropdown.
This commit fixes that behaviour by realocating the Bootsrap dropdown
event listener to the body instead of the document.
2025-02-25 13:31:41 +01:00
Mikel Martín de8e8806da MDL-84324 core: Add jQuery compatibility for BS5
You don’t need jQuery in Bootstrap 5, but it’s still possible to use our components with jQuery.
If Bootstrap detects jQuery in the window object, it’ll add all of our components in jQuery’s plugin system.
This allows you to do the following:
$('#myTooltip').tooltip('show')
2025-02-21 14:48:02 +01:00
Mikel Martín 413b9219bf MDL-75669 output: Fix subpanels for BS5
- Fix subpanels positioning using data-bs-popper static
- Fix subpanels and dialogs event listener to use Boostrap EventHandler.
  Doing that will avoid Bootstrap from stop propagating the event to the
  subpanels and dialogs listeners.
2025-02-17 08:13:48 +01:00
Mikel Martín 0c586b41c1 MDL-75669 theme_boost: Fix BS5 related JS
- Migrate Boostrap components related JS from JQuery to vanilla JS.
- Migrate Boostrap components related Events from JQuery to vanilla JS.
2025-02-17 08:13:11 +01:00
Mikel Martín 04975cd2b2 MDL-75669 theme_boost: Refactor custom form elements to BS5
- .custom-check is now .form-check.
- .custom-check.custom-switch is now .form-check.form-switch.
- .custom-select is now .form-select.
- .custom-file and .form-file have been replaced by custom styles on top of .form-control.
- .custom-range is now .form-range.
- Dropped .input-group-append and .input-group-prepend. You can now just add buttons
  and .input-group-text as direct children of the input groups.
2025-02-14 10:58:36 +01:00
Mikel Martín 5416483611 MDL-75669 theme_boost: Refactor BS5 data attributes
Data attributes for all Bootstrap5 JavaScript plugins are now namespaced
to help distinguish Bootstrap functionality from third parties and your own code.
For example, data-bs-toggle instead of data-toggle.
This commit refactor all old Bootstrap data-attributes to the new syntax.

Co-authored-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2025-02-14 09:10:33 +01:00
Mikel Martín 2aa19cb088 MDL-75669 theme_boost: Refactor dropdowns positioning classes
- Replace .dropdown-menu-[left|right] with .dropdown-menu-[start|end].
2025-02-14 09:10:33 +01:00
Pedro Jordao 03ee5f8c2c MDL-80351 libraries: ChartJS axis options being ignored
When chartJs was updated to version 3.8.0, chart axis were now accessed
as a object property instead of an array element. This solution aims to
update the way we set the axis properties, aiming to display the labels
and other properties.
2025-02-13 02:22:22 -03:00
Paul Holden 8516492ef6 MDL-84159 libraries: upgrade to version 1.9.2 of loglevel. 2025-02-05 23:10:29 +00:00
sam marshall f1f8163b27 MDL-83809 Accessibility: Focus issues in modals
This change fixes 2 issues:

1 The focus lock for modals (e.g. within Tiny editor) did not
  correctly loop round from the end of the modal to the start.

2 After clicking 'Browse repositories' button in a Tiny editor
  modal, and closing the file picker, focus did not return to
  the button as expected.
2025-02-04 12:50:53 +00:00
Huong Nguyen a3d72aa941 Merge branch 'MDL-83862_main' of https://github.com/marxjohnson/moodle 2025-01-30 09:35:02 +07:00
Mark Johnson bf4107159c MDL-83862 core: Add validation support for datafilters
This allows filter fields to use client-side form validation attributes to check for valid values,
and adds a validation() method for filters to implement custom validation conditions.

In the event of a validation failure, the invalid filters will not be applied, and the URL will
not be updated to avoid user sharing a URL that will generate an error. Filter conditions should
still implement server-side validation and throw exceptions to avoid erroneous values being
manually inserted into the URL.
2025-01-27 10:48:24 +00:00
Mark Johnson 8629645d34 MDL-83862 core: Add datetime datafilter
This adds a new datafilter Javascript class for a
datetime filter. This supports filtering by dates before,
after or between the selected value(s).

The fields for selecting datetimes in the filter use
<input type="datetime-local">, so this commit also adds
support for filling reading and writing those fields in
behat tests.
2025-01-27 10:48:23 +00:00
Huong Nguyen 5fbd4b6555 Merge branch 'MDL-83869-main' of https://github.com/ferranrecio/moodle 2025-01-23 11:15:26 +07:00
ferran 46318e53d0 MDL-83869 output: new collapsable section component 2025-01-22 11:36:27 +01:00
Pedro Jordao 121ac52570 MDL-78365 libraries: Truncate ChartJs labels to avoid display issues
If the chart label is too large, it is breaking the display, so we will
add ellipsis to the label and display the full text in the tooltip.
2025-01-13 11:26:13 -03:00
Pedro Jordao a33ed897b1 MDL-83737 libraries: Upgrade ChartJS to version 4.4.7. 2025-01-08 13:33:17 -03:00
Jun Pataleta 77403362a8 Merge branch 'MDL-82754-main' of https://github.com/meirzamoodle/moodle 2024-12-19 12:02:53 +08:00
Huong Nguyen adb94bf614 Merge branch 'MDL-83883_main' of https://github.com/marxjohnson/moodle 2024-12-16 10:24:44 +07:00
Mikel Martín f9abc562f5 MDL-81825 theme_boost: Refactor .sr-only usages for BS5
- Add .visually-hidden to the Boostratp 5 bridge SCSS file
- Replace .sr-only occurrences with .visually-hidden
- Replace .dropzone-sr-only-focusable  with .dropzone-visually-hidden-focusable
  for consistency
2024-12-10 14:02:32 +01:00
meirzamoodle 58b9be52d5 MDL-82754 core: Improve treatStringsInContent() performance with arrays
Co-authored-by: JeanSotoriva <jeansotoriva@gmail.com>
2024-12-06 14:45:19 +07:00
Huong Nguyen b07c5f48cb Merge branch 'MDL-83641' of https://github.com/paulholden/moodle 2024-12-05 11:29:03 +07:00
Mark Johnson e347532af4 MDL-83883 datafilter: Fix initial state of binary filter
When a filter is added to a page after the initial page load, no
initialValues are passed, so we need to set a default value.
2024-12-04 11:21:01 +00:00
meirzamoodle 48e652623d MDL-83223 core: Use capture with addEventListener to intercept events
The issue is that Bootstrap’s dropdown component likely stops
event propagation after the first click to manage its own
dropdown behavior. This prevents your click event handler from
running on subsequent clicks.

To fix this, we can handle the event before Bootstrap’s code stops
the propagation by using capture option with addEventListener.
2024-12-04 10:35:36 +07:00
Paul Holden e1df293131 MDL-83641 cohort: allow 'includes' option be specified in form element. 2024-12-02 10:58:44 +00:00
Huong Nguyen f27ba19f25 Merge branch 'MDL-83658-main' of https://github.com/praxisdigital/moodle 2024-11-27 09:50:48 +07:00
Shamim Rezaie 0af9b5ca7e Merge branch 'MDL-71378_main' of https://github.com/SimonasAdams/moodle 2024-11-25 18:21:18 +11:00
Frederik Milling Pytlick 2e3660811e MDL-83658 core: Fix reactive debug tool logging
Fixed issue where the reactive debug panel does not log a transaction,
if the events fired are exactly the same as the previous ones.
2024-11-20 08:14:16 +01:00
Simon Adams a6c4ddada5 MDL-71378 qbank_bulkmove: refactor for moving to shared question banks 2024-11-18 10:22:58 +00:00
Jun Pataleta 198f0d26d8 Merge branch 'MDL-83502-main' of https://github.com/ferranrecio/moodle 2024-11-18 14:36:58 +08:00
Jun Pataleta 05c7d005c1 Merge branch 'MDL-72293' of https://github.com/paulholden/moodle 2024-11-07 11:59:41 +08:00
ferran a4cf29974f MDL-83502 course: fix chrome file dropping in course page 2024-10-21 11:32:26 +02:00
Philipp Memmel 43073fcd27 MDL-82793 core: Make modal execute JS from template
Co-authored-by: Huong Nguyen <huongnv13@gmail.com>
2024-10-15 20:34:01 +02:00
Paul Holden ef490ad60d MDL-72293 javascript: emit native events from sortable list module.
Removes jQuery dependency from calling code that wants to listen for
these events. Maintains backwards compatibility with existing code
that does want to listen to jQuery-style events.
2024-10-10 15:16:36 +01:00
Huong Nguyen c58fcff09d Merge branch 'MDL-70180-main' of https://github.com/roland04/moodle 2024-10-08 09:34:10 +07:00
meirzamoodle 3229dda3d6 MDL-83332 core: Revert the slashargument removal on MDL-62640
Removing the option causes issues on MacOS.
2024-10-02 18:36:14 +07:00
Huong Nguyen 7c3c18c4e8 Merge branch 'MDL-62640-main' of https://github.com/meirzamoodle/moodle 2024-09-26 11:06:55 +07:00
Jose 3d1102607c MDL-82298 navigation: Add setting data-disableactive on moremenu items
This setting will avoid conflicts between checkmark and
bfcache. The removed function added as part of the MDL-77732
is no longer required as the behaviour on the menu items (including the
secondary navigation) is not altered anymore by the menuItemHelper function
(menu_navigation file).
2024-09-25 22:29:35 +08:00
meirzamoodle 4d2ad0bff7 MDL-62640 core: Adjust code for slashargument removal 2024-09-25 08:30:18 +07:00