72 Commits

Author SHA1 Message Date
Andrew Nicols
1f0d1e60a0
MDL-82373 core_grades: Address random failures when editing gradebook 2024-07-17 09:28:35 +08:00
Mathew May
68bf0f5b77 MDL-78885 comboboxsearch: Points from review 2024-03-22 05:50:06 +11:00
Shamim Rezaie
2ac9dc9108 MDL-78885 comboboxsearch: Deprecate trigger 2024-03-22 05:49:52 +11:00
Shamim Rezaie
ee5c4f8f99 MDL-78885 comboboxsearch: Reset status of filters to a zero state
Most of this is automatically handled by aria.js for other comboboxes.
But the search combobox inside the grade and group dropdowns are special
cases because they are not the same as the toggle element of the
dropdown.
2024-03-22 04:23:57 +11:00
Shamim Rezaie
8e2555dc48 MDL-78885 comboboxsearch: Switch event listener from 'click' to 'change'
Move from listening to 'click' to listening to 'change'
2024-03-22 04:23:55 +11:00
Shamim Rezaie
e9ec450668 MDL-78885 comboboxsearch: remove aria-activedecendant on options change 2024-03-22 04:23:22 +11:00
Shamim Rezaie
d886cba9d3 MDL-78885 comboboxsearch: Enable aria.js for auto handling
- Added the `dropdown` class to ensure toggle element focus when the
  dropdown is closed.
- Improved keyboard handling by adding the `dropdown` class.
  aria.js will automatically handle keyboard interactions.
- Removed redundant keyboard handling.
- The "view all results" option is just a normal option in a combobox.
  It should not be treated as the default action for a combobox.
- Ensured correct markup for 'Esc' key handling. aria.js automatically
  focuses on the toggle element if the dropdown's toggle and the
  dropdown menu are wrapped within a .dropdown element.
- Implemented menu closure for outside clicks and when leaving the edit
  box.
- Manually focused on the user search element when opening the search
 dropdown due to a focusLock issue.
- Fix the issue of another dropdown staying open
- Clicking on the clearSearchButton should not close the dropdown
2024-03-22 04:22:24 +11:00
Shamim Rezaie
e0d2a3924e MDL-78885 aria: Automatically trap focus inside dialog dropdowns
- there is no need to set the focus after a dropdown is opened. It is
automatically set as the result of trapping focus.
2024-03-22 04:00:18 +11:00
Mathew May
e4083441ec MDL-78885 core_user: A11y fixes for user combobox search
Co-authored-by: Shamim Rezaie <shamim@moodle.com>
2024-03-22 03:26:19 +11:00
Ilya Tregubov
cb2cf0602d
MDL-78775 core_grades: Fix Behat 2023-10-18 12:54:28 +08:00
Jake Dallimore
12fa9a8d22
MDL-79613 core_grade: revert the removal of searchwidget templates
These templates are needed by plugins which use the now-deprecated
searchwidget (located in grade/amd/src/searchwidget/basewidget.js)
in order to keep that deprecated widget working during the deprecation
time period. This also clarifies the js deprecation notice.
2023-10-06 12:22:33 +08:00
Ilya Tregubov
216060b637
Merge branch 'MDL-78217-master' of https://github.com/rezaies/moodle 2023-09-22 18:06:25 +08:00
Shamim Rezaie
7b8aa2daf1 MDL-78217 grade: Fixing invalid input as early as possible 2023-09-22 19:40:13 +10:00
Ilya Tregubov
d22800ca42
Merge branch 'MDL-78217-master' of https://github.com/rezaies/moodle 2023-09-22 10:53:55 +08:00
Shamim Rezaie
c428c0195a MDL-78217 grade: Keep category total updated in the UI 2023-09-22 05:36:22 +10:00
Shamim Rezaie
aa30501b80 MDL-78217 grade: Recalculate Parent Weights on Zero Child Weights
The maximum grade for that category is considered as zero when all child
weights within a category are zero.
2023-09-22 05:36:22 +10:00
Shamim Rezaie
6aa05cfb9a MDL-78217 grade: Refine front-end weight handling and add validation
In this commit, the front-end experience for grade item weights in the
gradebook setup page is refined, building upon the improvements made in
the previous commit.

Firstly, overridden weights are excluded from automatic adjustments.
This enhancement guarantees that user-specified weights remain unchanged
by front-end calculations, thereby preserving the flexibility of custom
weight assignments.

Additionally, front-end form validation has been introduced to enhance
the user experience. Now, users will see validation errors if they
submit invalid values, giving them the opportunity to correct the values
themselves. This ensures that weights are not automatically normalised
by the back-end code, preserving the values as entered by the user.
2023-09-22 05:36:16 +10:00
Mihail Geshoski
0062aed025 MDL-77035 grades: Bulk actions area implementation in gradebook setup
Implements the bulk actions area in the gradebook setup page.
2023-09-20 23:53:43 +02:00
Mihail Geshoski
9dcc17ce11 MDL-77035 grades: Bulk move action implementation in gradebook setup
Introduces a JS class for the bulk move action in the gradebook setup
and the relavant templates.
2023-09-20 23:53:43 +02:00
Shamim Rezaie
22a97437d1 MDL-78217 grade: Improve front-end grade item weight calculations
This change enhances the user experience in the grade report grader by
moving grade item weight calculations to the front-end. Previously,
these calculations were done on form submission, resulting in slower
performance and less interactivity.

With this improvement, grade item weights are now calculated dynamically
in the browser as users make changes, providing instant feedback and a
more responsive interface. This change improves the usability and
efficiency of the grade report grader.

This is only applicable to natural aggregation type.
2023-09-19 21:00:15 +10:00
Andrew Nicols
af7719682d
MDL-79064 core: Update all get_strings as uses 2023-08-29 10:57:54 +08:00
Jun Pataleta
7b94cd0a4b
Merge branch 'MDL-79079' of https://github.com/paulholden/moodle 2023-08-25 10:44:48 +08:00
Paul Holden
b0d1d885b1
MDL-79079 grade: prevent default click event when toggling category. 2023-08-21 12:00:45 +01:00
Mathew May
b1063f5891 MDL-78097 grade: Allow the initials bar to pass current page params 2023-08-17 09:41:53 +08:00
Jun Pataleta
1be10f4249
Merge branch 'MDL-77991' of https://github.com/Chocolate-lightning/moodle 2023-08-03 10:23:24 +08:00
Mathew May
a4b3b0d044 MDL-77991 core: Move tertiary search dropdown component 2023-08-03 09:07:18 +08:00
Sara Arjona
3e4157b21f
Merge branch 'MDL-78430-master-2' of https://github.com/ilyatregubov/moodle 2023-08-01 13:02:47 +02:00
Mathew May
b2e1121fc0
MDL-77639 gradebook_setup: Create outcomes via dyn form 2023-08-01 11:34:04 +07:00
Mihail Geshoski
b5a87c1919
MDL-78430 core_grades: Carry over basic grade item data to advanced form 2023-07-28 16:16:19 +08:00
Jun Pataleta
b12e77119e
Merge branch 'MDL-78377' of https://github.com/paulholden/moodle 2023-07-26 10:47:41 +08:00
Ilya Tregubov
1d3f4d631d
MDL-77638 grade: Create add/edit grade category modal. 2023-07-25 17:05:41 +08:00
Paul Holden
d6313c045a
MDL-78377 grade: reset page number when filtering by group. 2023-07-03 12:53:02 +01:00
Mathew May
997134f52f MDL-77637 gradebook_setup: Create gradeitems via dyn form 2023-06-27 09:01:25 +08:00
Shamim Rezaie
6de23902cd MDL-77451 gradereport: stress handling for multiple clicks 2023-05-09 16:28:51 +10:00
Mihail Geshoski
ad7839f6ff MDL-77889 gradebook: Tighten up backward compatibility checks 2023-04-21 16:53:47 +08:00
Shamim Rezaie
e38262e271 MDL-77889 gradereport: restore backwards compatibility in searchwidget
The widgetbase module was intended to be a generic search widget,
despite its location in grade/amd/src. As such, other modules may
depend on this. This was modified in MDL-76246, which added new
requires params to the js, and changed the js to expect certain new
data attributes in the templates. This broke b/c for existing
dependents.

This patch makes sure the existing uses of the basewidget continue
to work by adding b/c code. See MDL-77991 which deals with deprecating
this search widget and replacing it with one that just implements the
desired combobox logic, without the b/c code. That issue should also
make it abundantly clear that this widget is for public consumption.
2023-04-21 14:19:43 +08:00
Mathew May
d80fb6ce2c MDL-76143 gradebook: Add search into graderreport 2023-03-30 11:29:01 +08:00
Shamim Rezaie
02471ef1cd MDL-76246 core_grades: Remove url param from ws 2023-03-22 20:59:14 +11:00
Shamim Rezaie
d2881df06b MDL-76246 core_grades: Group search widget to combobox 2023-03-22 20:59:14 +11:00
Shamim Rezaie
3db5625fc9 MDL-76246 gradereport_user: Make the user search widget a combobox
Use <div> instead of <button> because <button> cannot have <div>
children.
2023-03-22 20:59:14 +11:00
Mihail Geshoski
4d7900a391 MDL-77032 grade: Collapsible grade categories in Gradebook setup 2023-03-17 23:04:41 +08:00
Andrew Nicols
511401f4f6 MDL-77559 js: Rebuild all JS with Node 16 2023-03-09 09:53:19 +08:00
Andrew Nicols
33b1e41f13 MDL-75012 js: Full build of all grunt things 2023-03-02 11:55:32 +08:00
Mathew May
712f219c7c MDL-76134 gradebook: Hook into tertiary dropdown item 2023-01-09 09:22:20 +08:00
Mathew May
57e65480a3 MDL-75837 gradebook: accessibility improvements 2022-11-14 10:19:45 +08:00
Mihail Geshoski
77a5f1aa11 MDL-75837 core_grades: Selector module for the search widget 2022-11-14 10:11:43 +08:00
Mihail Geshoski
23640e81e8 MDL-75837 core_grades: Clear search support in the base search widget 2022-11-14 10:11:42 +08:00
Mihail Geshoski
d272dcab1d MDL-75837 core_grades: Group search widget within a dropdown
Modifications that will enable the group search widget to be rendered
within a dropdown element.
2022-11-14 10:11:42 +08:00
Mihail Geshoski
09d0a20d45 MDL-75837 core_grades: Adapt the base search widget to support dropdowns 2022-11-14 10:11:42 +08:00
Shamim Rezaie
fba91abe5e MDL-75423 core_grades: prevent multiple initialising of the group widget 2022-11-10 22:43:14 +08:00