MDL-37079 Course create/update module. Remove use of "continue 2".
This commit is contained in:
+6
-2
@@ -233,12 +233,16 @@ function edit_module_post_actions($moduleinfo, $course, $eventname) {
|
||||
if (property_exists($moduleinfo, $elname) and $moduleinfo->$elname) {
|
||||
// So we have a request for new outcome grade item?
|
||||
if ($items) {
|
||||
$outcomeexists = false;
|
||||
foreach($items as $item) {
|
||||
if ($item->outcomeid == $outcome->id) {
|
||||
// Outcome aready exists.
|
||||
continue 2;
|
||||
$outcomeexists = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ($outcomeexists) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
$max_itemnumber++;
|
||||
|
||||
Reference in New Issue
Block a user