Commit 6c62fef1 authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review
Browse files

Error in group creation for non admins (Bug #1410570)



Change-Id: Ic8759aa6541be740be88177dc4c16bf99000a77a
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 5b7b2927
......@@ -507,6 +507,8 @@ function editgroup_submit(Pieform $form, $values) {
db_begin();
$newvalues['description'] = EmbeddedImage::prepare_embedded_images($newvalues['description'], 'group', $group_data->id, $group_data->id);
if ($group_data->id) {
$newvalues['id'] = $group_data->id;
group_update((object)$newvalues);
......@@ -517,10 +519,6 @@ function editgroup_submit(Pieform $form, $values) {
$USER->reset_grouproles();
}
$newvalues['description'] = EmbeddedImage::prepare_embedded_images($newvalues['description'], 'group', $group_data->id, $group_data->id);
$newvalues['id'] = $group_data->id;
group_update((object)$newvalues);
$SESSION->add_ok_msg(get_string('groupsaved', 'group'));
db_commit();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment