33include_once 
'./webservice/soap/classes/class.ilSoapAdministration.php';
 
   49        if (!$this->__checkSession($sid)) {
 
   55                'No valid target id given. Please choose an existing reference id of an ILIAS category or group',
 
   62        if (!$rbacsystem->checkAccess(
'create', 
$target_id, 
'grp')) {
 
   63            return $this->
__raiseError(
'Check access failed. No permission to create groups', 
'Server');
 
   67            return $this->
__raiseError(
"Parent with ID $target_id has been deleted.", 
'CLIENT_TARGET_DELETED');
 
   72        include_once(
"./Modules/Group/classes/class.ilObjGroup.php");
 
   73        include_once 
'Modules/Group/classes/class.ilGroupXMLParser.php';
 
   75        $new_ref_id = $xml_parser->startParsing();
 
   77        return $new_ref_id ? $new_ref_id : 
"0";
 
   87        if (!$this->__checkSession($sid)) {
 
   93        if (!is_numeric($ref_id)) {
 
   95                'No valid target id given. Please choose an existing reference id of an ILIAS category or group',
 
  102        if (!$rbacsystem->checkAccess(
'write', $ref_id, 
'grp')) {
 
  103            return $this->
__raiseError(
'Check access failed. No permission to edit groups', 
'Server');
 
  107        include_once(
"./Modules/Group/classes/class.ilObjGroup.php");
 
  110            return $this->
__raiseError(
'Cannot create group instance!', 
'CLIENT_OBJECT_NOT_FOUND');
 
  114            return $this->
__raiseError(
"Object with ID $ref_id has been deleted.", 
'CLIENT_OBJECT_DELETED');
 
  119            return $this->
__raiseError(
'Reference id does not point to a group!', 
'CLIENT_WRONG_TYPE');
 
  123        include_once 
'Modules/Group/classes/class.ilGroupXMLParser.php';
 
  126        $xml_parser->setGroup($grp);
 
  127        $new_ref_id = $xml_parser->startParsing();
 
  129        return $new_ref_id ? $new_ref_id : 
"0";
 
  138        if (!$this->__checkSession($sid)) {
 
  144                'No title given. Please choose an title for the group in question.',
 
  157        if (!$this->__checkSession($sid)) {
 
  162            return $this->
__raiseError(
"Parent with ID $ref_id has been deleted.", 
'CLIENT_OBJECT_DELETED');
 
  168                'No valid reference id given.',
 
  174        include_once 
'Modules/Group/classes/class.ilGroupXMLWriter.php';
 
  177        $xml_writer->start();
 
  179        $xml = $xml_writer->getXML();
 
  190        if (!$this->__checkSession($sid)) {
 
  194        if (!is_numeric($group_id)) {
 
  196                'No valid group id given. Please choose an existing reference id of an ILIAS group',
 
  206                return $this->
__raiseError(
'Invalid group id. Object with id "' . $group_id . 
'" is not of type "group"', 
'Client');
 
  210        if (!$rbacsystem->checkAccess(
'manage_members', $group_id)) {
 
  211            return $this->
__raiseError(
'Check access failed. No permission to write to group', 
'Server');
 
  216            return $this->
__raiseError(
'Invalid user id. User with id "' . $user_id . 
' does not exist', 
'Client');
 
  218        if (
$type != 
'Admin' and
 
  220            return $this->
__raiseError(
'Invalid type ' . 
$type . 
' given. Parameter "type" must be "Admin","Member"', 
'Client');
 
  224            return $this->
__raiseError(
'Cannot create group instance!', 
'Server');
 
  228            return $this->
__raiseError(
'Cannot create user instance!', 
'Server');
 
  232        include_once 
'Modules/Group/classes/class.ilGroupParticipants.php';
 
  252        if (!$this->__checkSession($sid)) {
 
  255        if (!is_numeric($group_id)) {
 
  257                'No valid group id given. Please choose an existing reference id of an ILIAS group',
 
  267                return $this->
__raiseError(
'Invalid group id. Object with id "' . $group_id . 
'" is not of type "group"', 
'Client');
 
  272            return $this->
__raiseError(
'Invalid user id. User with id "' . $user_id . 
' does not exist', 
'Client');
 
  276            return $this->
__raiseError(
'Cannot create group instance!', 
'Server');
 
  279        if (!$rbacsystem->checkAccess(
'manage_members', $group_id)) {
 
  280            return $this->
__raiseError(
'Check access failed. No permission to write to group', 
'Server');
 
  283        $tmp_group->leave($user_id);
 
  293        if (!$this->__checkSession($sid)) {
 
  296        if (!is_numeric($group_id)) {
 
  298                'No valid group id given. Please choose an existing id of an ILIAS group',
 
  307                return $this->
__raiseError(
'Invalid group id. Object with id "' . $group_id . 
'" is not of type "group"', 
'Client');
 
  312            return $this->
__raiseError(
'Invalid user id. User with id "' . $user_id . 
' does not exist', 
'Client');
 
  316            return $this->
__raiseError(
'Cannot create group instance!', 
'Server');
 
  319        if (!$rbacsystem->checkAccess(
'read', $group_id)) {
 
  320            return $this->
__raiseError(
'Check access failed. No permission to read group data', 
'Server');
 
  323        include_once(
'./Modules/Group/classes/class.ilGroupParticipants.php');
 
  326        if ($participants->isAdmin($user_id)) {
 
  329        if ($participants->isMember($user_id)) {
 
  349        if (!$this->__checkSession($sid)) {
 
  352        global $rbacreview, $ilObjDataCache, $tree;
 
  354        include_once 
'webservice/soap/classes/class.ilXMLResultSetParser.php';
 
  359            return $this->
__raiseError($exception->getMessage(), 
"Client");
 
  361        $xmlResultSet = 
$parser->getXMLResultSet();
 
  363        if (!$xmlResultSet->hasColumn(
"user_id")) {
 
  364            return $this->
__raiseError(
"parameter user_id is missing", 
"Client");
 
  367        if (!$xmlResultSet->hasColumn(
"status")) {
 
  368            return $this->
__raiseError(
"parameter status is missing", 
"Client");
 
  371        $user_id = (int) $xmlResultSet->getValue(0, 
"user_id");
 
  372        $status = (int) $xmlResultSet->getValue(0, 
"status");
 
  377        #var_dump($xmlResultSet); 
  378        #echo "uid:".$user_id;
 
  379        #echo "status:".$status;
 
  382            foreach ($rbacreview->assignedRoles($user_id) as $role_id) {
 
  384                    #echo $role->getType(); 
  385                    if ($role->getType() != 
"role") {
 
  389                    if ($role->getParent() == ROLE_FOLDER_ID) {
 
  392                    $role_title = $role->getTitle();
 
  401                            $ref_ids [] = $ref_id;
 
  403                            $ref_ids [] = $ref_id;
 
  412            foreach ($owned_objects as $obj_id) {
 
  415                foreach ($allrefs as 
$r) {
 
  416                    if ($tree->isDeleted(
$r)) {
 
  419                    if ($tree->isInTree(
$r)) {
 
  423                if (count($refs) > 0) {
 
  424                    $ref_ids[] = array_pop($refs);
 
  428        $ref_ids = array_unique($ref_ids);
 
  432        include_once 
'webservice/soap/classes/class.ilXMLResultSetWriter.php';
 
  433        include_once 
'Modules/Group/classes/class.ilObjGroup.php';
 
  434        include_once 
'Modules/Group/classes/class.ilGroupXMLWriter.php';
 
  437        $xmlResultSet->addColumn(
"ref_id");
 
  438        $xmlResultSet->addColumn(
"xml");
 
  439        $xmlResultSet->addColumn(
"parent_ref_id");
 
  441        foreach ($ref_ids as $group_id) {
 
  445                $row->setValue(
"ref_id", $group_id);
 
  447                $xmlWriter->setAttachUsers(
false);
 
  449                $row->setValue(
"xml", $xmlWriter->getXML());
 
  450                $row->setValue(
"parent_ref_id", $tree->getParentId($group_id));
 
  451                $xmlResultSet->addRow(
$row);
 
  455        $xmlResultSetWriter->start();
 
  456        return $xmlResultSetWriter->getXML();
 
An exception for terminatinating execution or to throw for unit testing.
static _getInstanceByObjId($a_obj_id)
Get singleton instance.
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
getObjectsForOwner($object_type, $owner_id)
returns all objects of an owner, filtered by type, objects are not deleted!
static getTypeByRefId($a_ref_id, $stop_on_error=true)
get object type by reference id
static _lookupObjId($a_id)
static _getAllReferences($a_id)
get all reference ids of object
static _exists($a_id, $a_reference=false, $a_type=null)
checks if an object exists in object_data@access public
static _isInTrash($a_ref_id)
checks wether object is in trash
static _lookupType($a_id, $a_reference=false)
lookup object type
SaxParserException thrown by ilSaxParser if property throwException is set.
initAuth($sid)
Init authentication.
__raiseError($a_message, $a_code)
checkObjectAccess($ref_id, $expected_type, $permission, $returnObject=false)
check access for ref id: expected type, permission, return object instance if returnobject is true
updateGroup($sid, $ref_id, $grp_xml)
isAssignedToGroup($sid, $group_id, $user_id)
getGroupsForUser($sid, $parameters)
get groups which belong to a specific user, fullilling the status
assignGroupMember($sid, $group_id, $user_id, $type)
groupExists($sid, $title)
addGroup($sid, $target_id, $grp_xml)
excludeGroupMember($sid, $group_id, $user_id)
static __extractRefId($role_title)
extract ref id from role title, e.g.
static groupNameExists($a_group_name, $a_id=0)
checks if group name already exists.
XML Writer for XMLResultSet.