mirror of
https://github.com/moodle/moodle.git
synced 2025-05-01 22:18:03 +02:00
MDL-47055 core_grade: implemented support for extra credit within natural weighting
This commit is contained in:
parent
430b9ef507
commit
b14c5870fb
@ -397,7 +397,7 @@ class grade_edit_tree {
|
||||
<input type="checkbox" id="extracredit_'.$item->id.'" name="extracredit_'.$item->id.'" value="1" '."$checked />\n";
|
||||
} else if ($aggcoef == 'aggregationcoefextrasum' && $type == 'weight') {
|
||||
$label = '';
|
||||
if ($item->weightoverride) {
|
||||
if ($item->weightoverride && $parent_category->aggregation == GRADE_AGGREGATE_SUM) {
|
||||
$label = get_string('adjusted', 'grades');
|
||||
}
|
||||
return '<label class="accesshide" for="aggregationcoef_'.$item->id.'">'.
|
||||
|
@ -1055,6 +1055,11 @@ class grade_category extends grade_object {
|
||||
$grade_item = $child['object']->load_grade_item();
|
||||
}
|
||||
|
||||
// An extra credit grade item doesn't contribute to $totaloverriddengrademax.
|
||||
if ($grade_item->aggregationcoef > 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$totalgrademax += $grade_item->grademax;
|
||||
if ($grade_item->weightoverride) {
|
||||
$totaloverriddenweight += $grade_item->aggregationcoef2;
|
||||
|
Loading…
x
Reference in New Issue
Block a user