mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-47676 core_grades: Negative positive weight combo working.
The combination of negative and positive weights was not normalising properly.
This commit is contained in:
parent
8950e7f535
commit
cd5c7965e0
@ -1478,7 +1478,9 @@ class grade_category extends grade_object {
|
||||
if (!$gradeitemdetail['extracredit']) {
|
||||
$normalisetotal += $gradeitemdetail['weight'];
|
||||
}
|
||||
if ($gradeitemdetail['weightoverride'] && !$gradeitemdetail['extracredit']) {
|
||||
// The overridden total comprises of items that are set as overridden, that aren't extra credit and have a value
|
||||
// greater than zero.
|
||||
if ($gradeitemdetail['weightoverride'] && !$gradeitemdetail['extracredit'] && $gradeitemdetail['weight'] > 0) {
|
||||
// Add overriden weights up to see if they are greater than 1.
|
||||
$overriddentotal += $gradeitemdetail['weight'];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user