MDL-18293 exception and DML cleanup

This commit is contained in:
skodak
2009-02-17 16:50:36 +00:00
parent b25263ffa1
commit 5e2f308b91
8 changed files with 30 additions and 54 deletions
+2 -6
View File
@@ -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;
}