Merge branch 'MDL-52275_m30' of git://github.com/markn86/moodle into MOODLE_30_STABLE
This commit is contained in:
+4
-5
@@ -187,15 +187,14 @@ if (!empty($add)) {
|
||||
|
||||
if ($items = grade_item::fetch_all(array('itemtype'=>'mod', 'itemmodule'=>$data->modulename,
|
||||
'iteminstance'=>$data->instance, 'courseid'=>$course->id))) {
|
||||
// add existing outcomes
|
||||
// Add existing outcomes.
|
||||
foreach ($items as $item) {
|
||||
if (!empty($item->gradepass)) {
|
||||
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);
|
||||
}
|
||||
if (!empty($item->outcomeid)) {
|
||||
$data->{'outcome_'.$item->outcomeid} = 1;
|
||||
}
|
||||
}
|
||||
|
||||
// set category if present
|
||||
|
||||
Reference in New Issue
Block a user