mirror of
https://github.com/moodle/moodle.git
synced 2025-01-29 19:50:14 +01:00
MDL-48187 core_course: use updated '$grade_item'
This commit is contained in:
parent
d302ba231f
commit
595b911a98
@ -225,13 +225,14 @@ function edit_module_post_actions($moduleinfo, $course) {
|
||||
}
|
||||
$moduleinfo->gradecat = $grade_category->id;
|
||||
}
|
||||
$gradecategory = $grade_item->get_parent_category();
|
||||
|
||||
foreach ($items as $itemid=>$unused) {
|
||||
$items[$itemid]->set_parent($moduleinfo->gradecat);
|
||||
if ($itemid == $grade_item->id) {
|
||||
// Use updated grade_item.
|
||||
$grade_item = $items[$itemid];
|
||||
}
|
||||
$gradecategory = $grade_item->get_parent_category();
|
||||
if (!empty($moduleinfo->add)) {
|
||||
if (grade_category::aggregation_uses_aggregationcoef($gradecategory->aggregation)) {
|
||||
if ($gradecategory->aggregation == GRADE_AGGREGATE_WEIGHTED_MEAN) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user