-
Bug
-
Resolution: Fixed
-
Minor
-
2.9.3, 3.0.1
-
MOODLE_29_STABLE, MOODLE_30_STABLE
-
MOODLE_29_STABLE, MOODLE_30_STABLE
-
MDL-52275_master -
When an activity has an outcome attached it has (at least) 2 gradeitems both having the same iteminstance.
In course/modedit.php it will however set the $data->gradepass to whichever gradeitem comes last in foreach ($items as $item) on line #190. When trying to set the gradepass from the activity settings it will show a passing grade of 0,00 even though in the gradebook it was set to an actual grade.
The foreach loop should not iterate both gradeitems and then only set $data->gradepass tro the last. I think this should resolve it (line #192)
if (!empty($item->outcomeid)) { |
$data->{'outcome_'.$item->outcomeid} = 1; |
} else if (!empty($item->gradepass)) { |
$decimalpoints = $item->get_decimals(); |
$data->gradepass = format_float($item->gradepass, $decimalpoints); |
}
|
instead of:
if (!empty($item->gradepass)) { |
$decimalpoints = $item->get_decimals(); |
$data->gradepass = format_float($item->gradepass, $decimalpoints); |
}
|
if (!empty($item->outcomeid)) { |
$data->{'outcome_'.$item->outcomeid} = 1; |
}
|
- is a regression caused by
-
MDL-13831 Grade to pass can't be set from update activity screen
-
- Closed
-