33include_once 
'./webservice/soap/classes/class.ilSoapAdministration.php';
 
   49                if(!$this->__checkSession($sid))
 
   56                        return $this->
__raiseError(
'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'))
 
   64                        return $this->
__raiseError(
'Check access failed. No permission to create groups',
'Server');
 
   69                        return $this->
__raiseError(
"Parent with ID $target_id has been deleted.", 
'CLIENT_TARGET_DELETED');
 
   74                include_once(
"./Modules/Group/classes/class.ilObjGroup.php");
 
   75                include_once 
'Modules/Group/classes/class.ilGroupXMLParser.php';
 
   77                $new_ref_id = $xml_parser->startParsing();
 
   79                return $new_ref_id ? $new_ref_id : 
"0";
 
   89                if(!$this->__checkSession($sid))
 
   98                        return $this->
__raiseError(
'No valid target id given. Please choose an existing reference id of an ILIAS category or group',
 
  104                if(!$rbacsystem->checkAccess(
'write',
$ref_id,
'grp'))
 
  106                        return $this->
__raiseError(
'Check access failed. No permission to edit groups',
'Server');
 
  110                include_once(
"./Modules/Group/classes/class.ilObjGroup.php");
 
  114                        return $this->
__raiseError(
'Cannot create group instance!',
'CLIENT_OBJECT_NOT_FOUND');
 
  119                        return $this->
__raiseError(
"Object with ID $ref_id has been deleted.", 
'CLIENT_OBJECT_DELETED');
 
  125                        return $this->
__raiseError(
'Reference id does not point to a group!',
'CLIENT_WRONG_TYPE');                              
 
  129                include_once 
'Modules/Group/classes/class.ilGroupXMLParser.php';
 
  132                $xml_parser->setGroup($grp);
 
  133                $new_ref_id = $xml_parser->startParsing();
 
  135                return $new_ref_id ? $new_ref_id : 
"0";
 
  144                if(!$this->__checkSession($sid))
 
  151                        return $this->
__raiseError(
'No title given. Please choose an title for the group in question.',
 
  163                if(!$this->__checkSession($sid))
 
  170                        return $this->
__raiseError(
"Parent with ID $ref_id has been deleted.", 
'CLIENT_OBJECT_DELETED');
 
  176                        return $this->
__raiseError(
'No valid reference id given.',
 
  181                include_once 
'Modules/Group/classes/class.ilGroupXMLWriter.php';
 
  184                $xml_writer->start();
 
  186                $xml = $xml_writer->getXML();
 
  188                return strlen($xml) ? $xml : 
'';
 
  197                if(!$this->__checkSession($sid))
 
  202                if(!is_numeric($group_id))
 
  204                        return $this->
__raiseError(
'No valid group id given. Please choose an existing reference id of an ILIAS group',
 
  215                                return $this->
__raiseError(
'Invalid group id. Object with id "'. $group_id.
'" is not of type "group"',
'Client');
 
  219                if(!$rbacsystem->checkAccess(
'write',$group_id))
 
  221                        return $this->
__raiseError(
'Check access failed. No permission to write to group',
'Server');
 
  227                        return $this->
__raiseError(
'Invalid user id. User with id "'. $user_id.
' does not exist',
'Client');
 
  229                if($type != 
'Admin' and
 
  232                        return $this->
__raiseError(
'Invalid type '.$type.
' given. Parameter "type" must be "Admin","Member"',
'Client');
 
  237                        return $this->
__raiseError(
'Cannot create group instance!',
'Server');
 
  242                        return $this->
__raiseError(
'Cannot create user instance!',
'Server');
 
  246                include_once 
'Modules/Group/classes/class.ilGroupParticipants.php';
 
  267                if(!$this->__checkSession($sid))
 
  271                if(!is_numeric($group_id))
 
  273                        return $this->
__raiseError(
'No valid group id given. Please choose an existing reference id of an ILIAS group',
 
  284                                return $this->
__raiseError(
'Invalid group id. Object with id "'. $group_id.
'" is not of type "group"',
'Client');
 
  290                        return $this->
__raiseError(
'Invalid user id. User with id "'. $user_id.
' does not exist',
'Client');
 
  295                        return $this->
__raiseError(
'Cannot create group instance!',
'Server');
 
  298                if(!$rbacsystem->checkAccess(
'write',$group_id))
 
  300                        return $this->
__raiseError(
'Check access failed. No permission to write to group',
'Server');
 
  303                $tmp_group->leave($user_id);
 
  313                if(!$this->__checkSession($sid))
 
  317                if(!is_numeric($group_id))
 
  319                        return $this->
__raiseError(
'No valid group id given. Please choose an existing id of an ILIAS group',
 
  329                                return $this->
__raiseError(
'Invalid group id. Object with id "'. $group_id.
'" is not of type "group"',
'Client');
 
  335                        return $this->
__raiseError(
'Invalid user id. User with id "'. $user_id.
' does not exist',
'Client');
 
  340                        return $this->
__raiseError(
'Cannot create group instance!',
'Server');
 
  343                if(!$rbacsystem->checkAccess(
'read',$group_id))
 
  345                        return $this->
__raiseError(
'Check access failed. No permission to read group data',
'Server');
 
  348                include_once(
'./Modules/Group/classes/class.ilGroupParticipants.php');
 
  351                if($participants->isAdmin($user_id))
 
  355                if($participants->isMember($user_id))
 
  376                if(!$this->__checkSession($sid))
 
  380                global $rbacreview, $ilObjDataCache, $tree;
 
  382                include_once 
'webservice/soap/classes/class.ilXMLResultSetParser.php';
 
  387                        return $this->
__raiseError($exception->getMessage(), 
"Client");
 
  389                $xmlResultSet = 
$parser->getXMLResultSet();
 
  391                if (!$xmlResultSet->hasColumn (
"user_id"))
 
  392                        return $this->
__raiseError(
"parameter user_id is missing", 
"Client");
 
  394                if (!$xmlResultSet->hasColumn (
"status"))
 
  395                        return $this->
__raiseError(
"parameter status is missing", 
"Client");
 
  397                $user_id = (int) $xmlResultSet->getValue (0, 
"user_id");
 
  398                $status = (int) $xmlResultSet->getValue (0, 
"status");
 
  403#var_dump($xmlResultSet); 
  404#echo "uid:".$user_id;
 
  405#echo "status:".$status;
 
  408                foreach($rbacreview->assignedRoles($user_id) as $role_id)
 
  412                                #echo $role->getType(); 
  413                                if ($role->getType() != 
"role")
 
  416                                if ($role->getParent() == ROLE_FOLDER_ID)
 
  420                                $role_title = $role->getTitle();
 
  442                        foreach ($owned_objects as $obj_id) {
 
  445                                foreach($allrefs as 
$r)
 
  447                                        if($tree->isDeleted(
$r))
 
  451                                        if ($tree->isInTree(
$r))
 
  456                                if (count($refs) > 0)
 
  457                                        $ref_ids[] = array_pop($refs);
 
  460                $ref_ids = array_unique($ref_ids);
 
  464                include_once 
'webservice/soap/classes/class.ilXMLResultSetWriter.php';
 
  465                include_once 
'Modules/Group/classes/class.ilObjGroup.php';
 
  466                include_once 
'Modules/Group/classes/class.ilGroupXMLWriter.php';        
 
  469                $xmlResultSet->addColumn(
"ref_id");
 
  470                $xmlResultSet->addColumn(
"xml");
 
  471                $xmlResultSet->addColumn(
"parent_ref_id");
 
  473                foreach ($ref_ids as $group_id) {
 
  477                                $row->setValue(
"ref_id", $group_id);
 
  479                                $xmlWriter->setAttachUsers(
false);                              
 
  481                                $row->setValue(
"xml", $xmlWriter->getXML());
 
  482                                $row->setValue(
"parent_ref_id", $tree->getParentId($group_id));
 
  483                                $xmlResultSet->addRow(
$row);
 
  487                $xmlResultSetWriter->start();
 
  488                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.