3494 Commits

Author SHA1 Message Date
Mihail Geshoski
867e05ea34 MDL-78905 grades: Carry over form data without validation
Avoids validating form data which is carried over from the
simple dynamic form to the advanced form page when creating
or editing grade items, categories and outcomes in the
Gradebook setup.
2023-09-27 09:19:40 +02:00
Ferran Recio
0184a477d5 MDL-79458 output: fix action menu subpanel behats 2023-09-26 13:22:51 +02:00
Ilya Tregubov
0f4efffb76
MDL-79493 core_grades: Fix Behat tests. 2023-09-26 15:49:43 +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
59046ab0d2 Merge branch 'MDL-77035-master-2' of https://github.com/mihailges/moodle 2023-09-22 06:44:56 +10: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
Jun Pataleta
e2f900b2ad
Merge branch 'MDL-79323-master-enfix' of https://github.com/vmdef/moodle 2023-09-21 15:29:40 +02:00
Mathew May
7f33dfc887 MDL-77035 grades: Update toggleall for a11y 2023-09-20 23:53:44 +02:00
Mihail Geshoski
255165f786 MDL-77035 grades: Fix PHP coding style issues
Fixes some preexisting PHP coding style problems in
grade/edit/tree/index.php.
2023-09-20 23:53:44 +02:00
Mihail Geshoski
d8837e51c4 MDL-77035 grades: Fix accessibility violation in gradebook setup
Fixes an accessibility violation in the gradebook setup page
related to the insufficient spacing between the select checkbox
elements and the 'move' icon.
2023-09-20 23:53:44 +02:00
Mihail Geshoski
b882a113f2 MDL-77035 grades: Behat tests for the bulk actions in gradebook setup
Introduces new behat tests to cover in detail the bulk action features
in the gradebook setup and also fixes some of the preexisting tests.
2023-09-20 23:53:43 +02: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
Mihail Geshoski
6cf7908652 MDL-77035 grades: WS that returns the grade tree structure in a course 2023-09-20 23:53:43 +02:00
Víctor Déniz
0b838f6977 MDL-79323 lang: Fix Behat tests regressions after merging en_fix strings 2023-09-19 13:42:10 +01: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
Helen Foster
13b7ea5d44 MDL-79323 lang: Import fixed English strings (en_fix) 2023-09-19 10:24:37 +01:00
Jun Pataleta
678ec36716
Merge branch 'MDL-79327' of https://github.com/paulholden/moodle 2023-09-18 19:38:39 +02:00
Paul Holden
92957ab97f
MDL-79327 gradereport_grader: fix markup in collapsed columns dialog. 2023-09-18 18:36:05 +01:00
Jun Pataleta
f35e2080af
MDL-79047 grade: Use the gradebook plugin name for the page title
* Use the appropriate gradebook plugin string for the page title.
* Improve gradebook page titles set by grade_get_plugin_info() by
listing the unique identifying information for the page first
(e.g. the gradebook plugin name), followed by broader information
(Grades + Course name), separating these bits of information using the
pipe `|` character.

For more information, check out
https://www.w3.org/WAI/WCAG21/Techniques/general/G88
2023-09-18 03:40:43 +02:00
Shamim Rezaie
24a063bd67
Merge branch 'MDL-78833-master' of https://github.com/ilyatregubov/moodle 2023-09-15 16:58:00 +08:00
Ilya Tregubov
4355e38e88
Merge branch 'MDL-78312-master' of https://github.com/NashTechOpenUniversity/moodle 2023-09-15 16:56:22 +08:00
Huong Nguyen
b65724480b
Merge branch 'MDL-79057-master' of https://github.com/junpataleta/moodle 2023-09-15 16:54:09 +08:00
Jun Pataleta
c356d161e8
Merge branch 'MDL-79158' of https://github.com/paulholden/moodle 2023-09-14 14:21:46 +08:00
hieuvu
a3da58a9cb MDL-78312 core_user: add an 'exact match only' option 2023-09-13 20:22:22 +07:00
Andrew Nicols
ce675c3dd4
MDL-79340 core_grading: Add pending steps around rubric requirejs 2023-09-13 14:00:04 +08:00
Andrew Nicols
a0735fa710
MDL-79340 core_grading: Use Behat steps to set values 2023-09-13 14:00:04 +08:00
Paul Holden
717c4b397e
MDL-79158 gradereport_grader: align collapsed columns dialog element. 2023-09-12 12:25:44 +01:00
Ilya Tregubov
0de64aa81b
MDL-78833 gradereport_grader: Propery align averages and ranges row.
Depending on editing mode or grade display type it can be right or
left aligned
2023-09-12 16:25:01 +08:00
Huong Nguyen
85f6aa82cc
Merge branch 'MDL-79246-master' of https://github.com/andrewnicols/moodle 2023-09-12 08:50:16 +07: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
Andrew Nicols
98f0aebde6
MDL-78324 gradereport_singleview: Update modal usage to drop factory use
This change includes some additional simplifications to support this
change, including conversion from done/fail to then/catch, and some
simplification of Promise usage.

There were a number of cases of nested Modal usage which have been
removed.
2023-09-09 00:04:03 +08:00
Jun Pataleta
8b8efffd7e
Merge branch 'MDL-78779-master' of https://github.com/andrewnicols/moodle 2023-09-08 22:14:27 +08:00
Ilya Tregubov
b8826a7a21
MDL-78082 gradereport_grader: Remove xpath from Behat. 2023-09-08 22:13:11 +08:00
Shamim Rezaie
56abfc2d22 MDL-78082 gradereport_grader: Acceptance test for locking 2023-09-07 05:46:55 +10:00
Shamim Rezaie
8e73a9ec19 MDL-78082 core_grades: Incomplete Grade Item Handling Enhanced
Problem:
In grade_edittree_column_status::get_category_cell, an assumption was
made that $category->grade_item is always populated. However, this was
not guaranteed, leading to potential issues.

Solution:
To ensure $category->grade_item availability, a $category->load_grade_item();
call was introduced in grade_edittree_column_status::get_category_cell.
This guarantees safe usage of $category->grade_item.

Furthermore, in grade_edit_tree::build_html_tree, $category->get_grade_item()
was replaced with $category->load_grade_item() for enhanced reliability
and potential performance improvement.

Explanation:
These changes enhance robustness and efficiency in gradebook.
Addressing incomplete grade item handling improves code reliability and
user experiences.
2023-09-06 22:20:39 +10:00
Shamim Rezaie
4cf11157c2 MDL-78082 core_grades: Fix locking inconsistency
Problem:
In Moodle 4.2, an unintended change in behaviour occurred when locking
and unlocking grade items. Previously, in Moodle 4.1, locking a grade
item and then subsequently unlocking the grade item left specific grades
for students still locked if they were being locked individually.
However, in Moodle 4.2, the unintended change caused the individual
grades to be unlocked along with the grade item.

Solution:
To address this issue, I modified the set_locked calls in action.php to
pass the cascade parameter as false. Now, when locking or unlocking a
grade item, only the grade item itself is affected, leaving individual
grades unchanged. I have also modified the locking behaviour in the
grade_category class. So, similarly, when locking or unlocking a grade
category, the change applies only to the grade items and grade
categories within the category, without expanding to individual grades.

Explanation:
By making this change, we ensure that the locking mechanism behaves as
expected, providing a consistent and desirable user experience. Locking
and unlocking a grade item or category will no longer inadvertently
affect individual grades, preserving their locked status and avoiding
loss of data when unlocking a grade item associated with the total mark
of a category.
2023-09-06 22:20:39 +10:00
Shamim Rezaie
09ef2d0aa5 MDL-78082 core_grades: lock/unlock all option for grade categories
A lock/unlock option is added to the context menu of the grade
categories again. But it is only used as an auxiliary tool to lock or
unlock all the grade items within the category.
2023-09-06 22:20:39 +10:00
Shamim Rezaie
b208ea26d1 MDL-78082 core_grades: Hide lock/unlock options for grade categories
Problem:
The grade_categories table lacks a 'locked' field, making it technically
impossible to lock grade categories. In Moodle 4.1, the "category total"
column could be locked (from the edit category form), but locking grade
categories directly was not supported.

Solution:
In response to the issue, the lock/unlock feature for grade categories
has been removed. Since the grade_categories table does not have the
necessary 'locked' field, attempting to implement category locking would
be infeasible. As a result, the feature has been removed from the
interface to avoid confusion.

Explanation:
By removing the lock/unlock feature for grade categories, we ensure that
users no longer encounter non-functional options and prevent any
potential misunderstandings about the locking behaviour. Additionally,
this change aligns the user interface with the underlying database
schema and eliminates any misleading functionality.
2023-09-06 22:19:40 +10:00
Shamim Rezaie
a1cf8f143a MDL-78082 gradereport_grader: Enter should submit the form
Problem:
Previously, when users pressed the Enter key while interacting with the
grader report, instead of submitting the form, a table column was
inadvertently expanded or collapsed. This behaviour occurred due to the
expand/collapse buttons lacking an explicit 'type' attribute within the
form. As a result, these buttons were mistakenly treated as submit
buttons.

Solution:
In this commit, we have addressed the issue by ensuring that the
expand/collapse buttons now have the correct 'type' attribute set,
explicitly identifying them as non-submit buttons. This adjustment
prevents them from interfering with form submission unintentionally.

Explanation:
By making this fix, we improve the user experience in the grade book,
allowing users to navigate and interact with the interface more
smoothly. Pressing the Enter key will now trigger the form submission as
expected, rather than inadvertently activating expand/collapse actions.
2023-09-06 22:18:40 +10:00
Andrew Nicols
1629a219e9
MDL-78779 gradereport_user: Replace wait steps with expectations 2023-09-06 12:40:45 +08:00
Jun Pataleta
5b06e8b01c
MDL-79057 gradereport_singleview: Use proper hidden attribute value
HTML attribute hidden="1" is invalid. It either needs to be set to an
empty string or use the keyword "hidden" for its value.
2023-09-06 10:32:33 +08:00
Jun Pataleta
b8fe5b3a0e
MDL-79057 gradereport_singleview: Remove tabindex > 0 for elements
A tab index with a non-zero value messes up with the logical tab order
of a page.
2023-09-06 00:32:55 +08:00
Andrew Nicols
7c952f1d13
MDL-79246 gradingform_rubric: Use i_click_on for behat clicks 2023-09-04 09:11:26 +08:00
Andrew Nicols
9366a7cf2d
Merge branch 'MDL-79045-master' of https://github.com/junpataleta/moodle 2023-09-01 10:46:34 +08:00
Jun Pataleta
e3633dc719
MDL-79045 grade: Don't enclose grade user_heading in $OUTPUT->heading()
Do not enclose \core_grades_renderer::user_heading() in
$OUTPUT->heading() and enclose the user's name in the user heading in
<h2> tags instead.
- Having <div> inside <h2> results in errors in HTML validation.
- Enclosing the whole user heading in <h2> results in the other
elements in the user heading (Message, Add to contacts) to be announced
to screen readers which can result in confusion.
2023-08-31 09:21:41 +08:00