mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 01:46:45 +02:00
MDL-47637 core_grades: Outcomes must not be weighted when non aggregated
This commit is contained in:
parent
7a61e645c3
commit
6aeebc259a
3 changed files with 16 additions and 5 deletions
|
@ -1436,6 +1436,9 @@ class grade_category extends grade_object {
|
|||
if ($gradeitem->gradetype == GRADE_TYPE_NONE || $gradeitem->gradetype == GRADE_TYPE_TEXT) {
|
||||
// Text items and none items do not have a weight.
|
||||
continue;
|
||||
} else if (!$this->aggregateoutcomes && $gradeitem->is_outcome_item()) {
|
||||
// We will not aggregate outcome items, so we can ignore them.
|
||||
continue;
|
||||
}
|
||||
|
||||
// Record the ID and the weight for this grade item.
|
||||
|
@ -1506,6 +1509,9 @@ class grade_category extends grade_object {
|
|||
// Text items and none items do not have a weight, no need to set their weight to
|
||||
// zero as they must never be used during aggregation.
|
||||
continue;
|
||||
} else if (!$this->aggregateoutcomes && $gradeitem->is_outcome_item()) {
|
||||
// We will not aggregate outcome items, so we can ignore updating their weights.
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!$gradeitem->weightoverride) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue