load(); if ($group && $group->getType() == 'coursegroup') { if ($group->canEdit()) { $good_url = empty($group_workspace) ? true : check_url_exists($group_workspace); if (!empty($group_title) && $good_url) { $group->title = $group_title; $group->description = $group_desc; $group->workspace = $group_workspace; if (isset($group_members) && !empty($group_members)) { if (!is_array($group_members)) $group_members = array($group_members); } else { $group_members = array(); } $group->members = $group_members; if (!$group->save()) { $Dippler->add_system_message(_("Group could not be saved."), 'error'); forward("course/groups/{$course_id}/group/{$group_id}/edit"); } } else { if (!$good_url) $Dippler->add_system_message(_("Provided Workspace URL is not a working address."), 'error'); $Dippler->add_system_message(_("At least one of the parameters is empty."), 'error'); forward("course/groups/{$course_id}/group/{$group_id}/edit"); } } else { $Dippler->add_system_message(_("Group could not be edited."), 'error'); } $Dippler->add_system_message(_("Group saved.")); // Clear cache $Dippler->clearSessionInputValues(); forward($group->getURL()); } forward(); ?>