MDL-18293 exception and DML cleanup
This commit is contained in:
+2
-6
@@ -83,13 +83,9 @@ if ($editform->is_cancelled()) {
|
||||
} elseif ($data = $editform->get_data()) {
|
||||
|
||||
if ($data->id) {
|
||||
if (!groups_update_group($data, $editform)) {
|
||||
print_error('cannotupdategroup');
|
||||
}
|
||||
groups_update_group($data, $editform);
|
||||
} else {
|
||||
if (!$id = groups_create_group($data, $editform)) {
|
||||
print_error('cannotcreategroup');
|
||||
}
|
||||
$id = groups_create_group($data, $editform);
|
||||
$returnurl = $CFG->wwwroot.'/group/index.php?id='.$course->id.'&group='.$id;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user