-
Sub-task
-
Resolution: Fixed
-
Minor
-
2.8
-
MOODLE_28_STABLE
-
MDL-47059-master -
-
20
-
BACKEND Sprint 17
Simple description of this issue:
Make natural weighting compatible with excluded grades (either excluded by exclude empty grades, or manually excluded grades).
What needs to happen for this to work:
The "automatic" weights for each grade_item natural weighting will need to be adjusted "per user" depending on the grades that are excluded.
The max grade for the category will need to be different "per user" depending on the grades that are excluded.
Very simple example:
Grade item | Max grade | Natural Weight |
---|---|---|
Assign 1 | 10 | 10 % |
Assign 2 | 20 | 20 % |
Assign 3 | 30 | 30 % |
Assign 4 | 40 | 40 % |
Total = 100
If item 2 is excluded because the student has not submitted anything and "exclude empty grades" is enabled -
Grade item | Max grade | Natural Weight |
---|---|---|
Assign 1 | 10 | 12.5 % |
Assign 3 | 30 | 37.5 % |
Assign 4 | 40 | 50 % |
Total = 80
Further more - currently we recalculate the "view" if show totals excluding hidden items is enabled. Depending on the performance of recalculating all of the above at page load time - we may need to add additional columns to store the "view" for users without view hidden grades capability. (This would be 3 extra columns on grade_grade)
Older - more complicated description:
At the moment, excluded and empty grades not being calculated in the final grade, is not enabled with sum of grades (the basis of natural weights). Also currently we have not introduced code to handle displaying hidden grades in the reports.
To do:
- Update reports to not consider empty grades. This work will be partially solved by
MDL-47078. - Update reports to exclude hidden grade items. Please note that hidden grade items are items hidden to all students and doesn't cover conditional access to activities.
Examples : (Please note that this is the desired outcome)
Exclude empty grades
Student 1
Grade item | Grade | Percent |
---|---|---|
Assign 1 | 10 / 20 | 50 % |
Assign 2 | 10 / 40 | 5 % |
Assign 3 |
|
|
Total | 20 / 60 | 33.33 % |
Student 2
Grade item | Grade | Percent |
---|---|---|
Assign 1 |
|
|
Assign 2 |
|
|
Assign 3 | 20 / 80 | 25% |
Total | 20 / 80 | 25.00 % |
Student 1 20 (33.00%)
Student 2 20 (25.00 %)
Exclude hidden grade items
Student 1
Grade item | Grade | Percent |
---|---|---|
Assign 1 | 10 / 20 | 50 % |
Assign 2 - hidden |
|
|
Assign 3 | 40 / 80 | 50% |
Total | 50 / 100 | 50.00 % |
Student 2
Grade item | Grade | Percent |
---|---|---|
Assign 1 | 15 / 20 | 75% |
Assign 2 - hidden |
|
|
Assign 3 | 20 / 80 | 25% |
Total | 35 / 100 | 35.00 % |
Student 1 20 (50.00%)
Student 2 20 (35.00 %)
Additional technical information:
https://tracker.moodle.org/browse/MDL-46139 introduced a field, grade_grade::aggregationweight that may be helpful.
Currently, grade_category::auto_update_weights() adjust grade_item weights but does this trickle down to grade_grades?
If an individual student cannot see an activity is zeroing grade_grade::aggregationweight and recalculating the weights in that category for that student sufficient?
This code may want to living in get_hiding_affected() in grade_grade.php.
- blocks
-
MDL-46824 Only allow drop lowest/keep highest when items in category are equally weighted
- Closed
- caused a regression
-
MDL-48239 Max Grade of Aspects with Calculation Formula is always 100
- Closed
-
MDL-48618 Unexpected changes on grades after upgrade to Moodle 2.8
- Closed
-
MDL-48634 Add option to rescale existing grades when changing max points
- Closed
- is blocked by
-
MDL-47078 Sum of grades does not work with exclude empty grades
- Closed
- will help resolve
-
MDL-19151 Disable "Aggregate only non-empty grades" for SUM aggregation
- Closed