6require_once 
"./Services/Container/classes/class.ilContainer.php";
 
    7include_once(
'./Services/Calendar/classes/class.ilDateTime.php');
 
    8include_once 
'./Services/Membership/interfaces/interface.ilMembershipRegistrationCodes.php';
 
   10define(
'GRP_REGISTRATION_DEACTIVATED',-1);
 
   11define(
'GRP_REGISTRATION_DIRECT',0);
 
   12define(
'GRP_REGISTRATION_REQUEST',1);
 
   13define(
'GRP_REGISTRATION_PASSWORD',2);
 
   15define(
'GRP_REGISTRATION_LIMITED',1);
 
   16define(
'GRP_REGISTRATION_UNLIMITED',2);
 
   18define(
'GRP_TYPE_UNKNOWN',0);
 
   19define(
'GRP_TYPE_CLOSED',1);
 
   20define(
'GRP_TYPE_OPEN',2);
 
   21define(
'GRP_TYPE_PUBLIC',3);
 
   97        public function __construct($a_id = 0,$a_call_by_reference = 
true)
 
  101                $this->tree =& $tree;
 
  104                $this->
ilObject($a_id,$a_call_by_reference);
 
  117                $query = 
"SELECT grp_type FROM grp_settings ".
 
  118                        "WHERE obj_id = ".$ilDB->quote($a_id,
'integer');
 
  122                        return $row->grp_type;
 
  137                $this->information = $a_information;
 
  160                $this->group_type = $a_type;
 
  203                $this->reg_type = $a_type;
 
  237                $this->reg_unlimited = $a_status;
 
  260                $this->reg_start = $a_start;
 
  271                return $this->reg_start ? $this->reg_start : $this->reg_start = 
new ilDateTime(date(
'Y-m-d').
' 08:00:00',
IL_CAL_DATETIME);
 
  284                $this->reg_end = $a_end;
 
  306                $this->reg_password = $a_pass;
 
  329                $this->reg_membership_limitation = $a_status;
 
  351                $this->reg_max_members = $a_max;
 
  374                $this->waiting_list = $a_status;
 
  396                $this->latitude = $a_latitude;
 
  416                $this->longitude = $a_longitude;
 
  436                $this->locationzoom = $a_locationzoom;
 
  456                $this->enablemap = $a_enablemap;
 
  485                $this->reg_access_code = $a_code;
 
  504                $this->reg_access_code_enabled = $a_status;
 
  514                $this->mail_members = $a_type;
 
  542                        $ilErr->appendMessage($this->lng->txt(self::ERR_MISSING_TITLE));
 
  546                        $ilErr->appendMessage($this->lng->txt(self::ERR_MISSING_GROUP_TYPE));
 
  550                        $ilErr->appendMessage($this->lng->txt(self::ERR_MISSING_PASSWORD));
 
  554                        $ilErr->appendMessage($this->lng->txt(self::ERR_WRONG_REG_TIME_LIMIT));
 
  558                        $ilErr->appendMessage($this->lng->txt(self::ERR_WRONG_MAX_MEMBERS));
 
  560                return strlen(
$ilErr->getMessage()) == 0;
 
  571                global 
$ilDB,$ilAppEventHandler;
 
  573                if(!parent::create())
 
  578                $query = 
"INSERT INTO grp_settings (obj_id,information,grp_type,registration_type,registration_enabled,".
 
  579                        "registration_unlimited,registration_start,registration_end,registration_password,registration_mem_limit,".
 
  580                        "registration_max_members,waiting_list,latitude,longitude,location_zoom,enablemap,reg_ac_enabled,reg_ac,view_mode,mail_members_type) ".
 
  584                        $ilDB->quote((
int) $this->
getGroupType() ,
'integer').
", ".
 
  600                        $ilDB->quote($this->
getViewMode(
false),
'integer').
', '.
 
  605                $ilAppEventHandler->raise(
'Modules/Group',
 
  607                        array(
'object' => $this,
 
  608                                'obj_id' => $this->
getId(),
 
  611                return $this->
getId();
 
  619                global 
$ilDB,$ilAppEventHandler;
 
  621                if (!parent::update())
 
  626                $query = 
"UPDATE grp_settings ".
 
  627                        "SET information = ".$ilDB->quote($this->
getInformation() ,
'text').
", ".
 
  628                        "grp_type = ".$ilDB->quote((
int) $this->
getGroupType() ,
'integer').
", ".
 
  634                        "registration_password = ".$ilDB->quote($this->
getPassword() ,
'text').
", ".
 
  636                        "registration_mem_limit = ".$ilDB->quote((
int) $this->
isMembershipLimited() ,
'integer').
", ".
 
  637                        "registration_max_members = ".$ilDB->quote($this->
getMaxMembers() ,
'integer').
", ".
 
  639                        "latitude = ".$ilDB->quote($this->
getLatitude() ,
'text').
", ".
 
  640                        "longitude = ".$ilDB->quote($this->
getLongitude() ,
'text').
", ".
 
  641                        "location_zoom = ".$ilDB->quote($this->
getLocationZoom() ,
'integer').
", ".
 
  645                        'view_mode = '.$ilDB->quote($this->
getViewMode(
false),
'integer').
', '.
 
  647                        "WHERE obj_id = ".$ilDB->quote($this->
getId() ,
'integer').
" ";
 
  650                $ilAppEventHandler->raise(
'Modules/Group',
 
  652                        array(
'object' => $this,
 
  653                                'obj_id' => $this->
getId(),
 
  666        public function delete()
 
  668                global 
$ilDB,$ilAppEventHandler;
 
  671                if (!parent::delete())
 
  676                $query = 
"DELETE FROM grp_settings ".
 
  677                        "WHERE obj_id = ".$ilDB->quote($this->
getId() ,
'integer');
 
  680                include_once(
'./Modules/Group/classes/class.ilGroupParticipants.php');
 
  683                $ilAppEventHandler->raise(
'Modules/Group',
 
  685                        array(
'object' => $this,
 
  686                                'obj_id' => $this->
getId(),
 
  703                $query = 
"SELECT * FROM grp_settings ".
 
  704                        "WHERE obj_id = ".$ilDB->quote($this->
getId() ,
'integer');
 
  731                include_once(
'./Services/Container/classes/class.ilContainerSortingSettings.php');
 
  747                $new_obj = parent::cloneObject($a_target_id,$a_copy_id);
 
  769                include_once 
'./Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
 
  778                include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
 
  782                $ilLog->write(__METHOD__.
': Starting add user');
 
  785                include_once(
'./Modules/Group/classes/class.ilGroupParticipants.php');
 
  788                $part->updateNotification(
$ilUser->getId(),1);
 
  791                include_once(
'Services/Tracking/classes/class.ilLPObjSettings.php');
 
  793                $obj_settings->cloneSettings($new_obj->getId());
 
  794                unset($obj_settings);
 
  816                parent::cloneDependencies($a_target_id,$a_copy_id);
 
  818                include_once(
'Services/Object/classes/class.ilObjectActivation.php');
 
  833                global 
$ilLog,$rbacadmin,$rbacreview;
 
  836                $new_admin = $new_obj->getDefaultAdminRole();
 
  837                if(!$admin || !$new_admin || !$this->
getRefId() || !$new_obj->getRefId())
 
  839                        $ilLog->write(__METHOD__.
' : Error cloning auto generated role: il_grp_admin');
 
  841                $rbacadmin->copyRolePermissions($admin,$this->
getRefId(),$new_obj->getRefId(),$new_admin,
true);
 
  842                $ilLog->write(__METHOD__.
' : Finished copying of role il_grp_admin.');
 
  845                $new_member = $new_obj->getDefaultMemberRole();
 
  846                if(!$member || !$new_member)
 
  848                        $ilLog->write(__METHOD__.
' : Error cloning auto generated role: il_grp_member');
 
  850                $rbacadmin->copyRolePermissions($member,$this->
getRefId(),$new_obj->getRefId(),$new_member,
true);
 
  851                $ilLog->write(__METHOD__.
' : Finished copying of role grp_member.');
 
  860        function join($a_user_id, $a_mem_role=
"")
 
  864                if (is_array($a_mem_role))
 
  866                        foreach ($a_mem_role as $role)
 
  868                                $rbacadmin->assignUser($role,$a_user_id, 
false);
 
  873                        $rbacadmin->assignUser($a_mem_role,$a_user_id, 
false);
 
  887                return $local_group_Roles[
"il_grp_member_".$this->getRefId()];
 
  898                return $local_group_Roles[
"il_grp_admin_".$this->getRefId()];
 
  911                if (isset($a_user_id) && isset($a_mem_role) )
 
  913                        $this->
join($a_user_id,$a_mem_role);
 
  918                        $this->
ilias->raiseError(get_class($this).
"::addMember(): Missing parameters !",$this->
ilias->error_obj->WARNING);
 
  932                global $rbacadmin, $rbacreview;
 
  936                if (count($member_ids) <= 1 || !in_array($this->
ilias->account->getId(), $member_ids))
 
  946                                $member->dropDesktopItem($this->
getRefId(), 
"grp");
 
  967                if (is_array($arr_groupRoles))
 
  969                        foreach ($arr_groupRoles as $groupRole)
 
  971                                $rbacadmin->deassignUser($groupRole, $a_user_id);
 
  976                        $rbacadmin->deassignUser($arr_groupRoles, $a_user_id);
 
  990                global $rbacadmin, $rbacreview;
 
  996                foreach ($rol as $value)
 
  998                        foreach ($rbacreview->assignedUsers($value) as $member_id)
 
 1000                                array_push($usr_arr,$member_id);
 
 1004                $mem_arr = array_unique($usr_arr);
 
 1006                return $mem_arr ? $mem_arr : array();
 
 1022                $q = 
"SELECT login,firstname,lastname,title,usr_id,last_login ".
 
 1026                if (is_numeric($active) && $active > -1)
 
 1027                        $q .= 
"AND active = '$active'";
 
 1029                $q .= 
'ORDER BY lastname,firstname';
 
 1031                $r = 
$ilDB->query($q);
 
 1035                        $mem_arr[] = array(
"id" => 
$row->usr_id,
 
 1036                                                                "login" => 
$row->login,
 
 1037                                                                "firstname" => 
$row->firstname,
 
 1038                                                                "lastname" => 
$row->lastname,
 
 1039                                                                "last_login" => 
$row->last_login
 
 1043                return $mem_arr ? $mem_arr : array();
 
 1061                if (!empty($a_grpId))
 
 1073                foreach ($rbacreview->assignedUsers($this->getDefaultAdminRole()) as $member_id)
 
 1075                        array_push($usr_arr,$member_id);
 
 1088                global $rbacadmin, $rbacreview;
 
 1090                if (strlen($a_grp_id) > 0)
 
 1092                        $grp_id = $a_grp_id;
 
 1099                $role_arr  = $rbacreview->getRolesOfRoleFolder($grp_id);
 
 1101                foreach ($role_arr as $role_id)
 
 1103                        $role_Obj =& $this->
ilias->obj_factory->getInstanceByObjId($role_id);
 
 1105                        $grp_Member =
"il_grp_member_".$grp_id;
 
 1106                        $grp_Admin  =
"il_grp_admin_".$grp_id;
 
 1108                        if (strcmp($role_Obj->getTitle(), $grp_Member) == 0 )
 
 1110                                $arr_grpDefaultRoles[
"grp_member_role"] = $role_Obj->getId();
 
 1113                        if (strcmp($role_Obj->getTitle(), $grp_Admin) == 0)
 
 1115                                $arr_grpDefaultRoles[
"grp_admin_role"] = $role_Obj->getId();
 
 1119                return $arr_grpDefaultRoles;
 
 1130                global $rbacadmin,$rbacreview;
 
 1132                if (empty($this->local_roles))
 
 1134                        $this->local_roles = array();
 
 1135                        $role_arr  = $rbacreview->getRolesOfRoleFolder($this->
getRefId());
 
 1137                        foreach ($role_arr as $role_id)
 
 1139                                if ($rbacreview->isAssignable($role_id,$this->getRefId()) == 
true)
 
 1141                                        $role_Obj =& $this->
ilias->obj_factory->getInstanceByObjId($role_id);
 
 1149                                                $role_name = $role_Obj->getTitle();
 
 1152                                        $this->local_roles[$role_name] = $role_Obj->getId();
 
 1157                return $this->local_roles;
 
 1167                $q = 
"SELECT obj_id FROM object_data WHERE type='rolt' AND title='il_grp_status_closed'";
 
 1171                return $row[
"obj_id"];
 
 1181                $q = 
"SELECT obj_id FROM object_data WHERE type='rolt' AND title='il_grp_status_open'";
 
 1185                return $row[
"obj_id"];
 
 1201                        $query = 
'SELECT obj_id FROM object_data WHERE type = '.$ilDB->quote(
'rolt',
'text').
' AND title = '.
$ilDB->quote(
'il_grp_status_closed',
'text');
 
 1205                        $query = 
'SELECT obj_id FROM object_data WHERE type = '.$ilDB->quote(
'rolt',
'text').
' AND title = '.
$ilDB->quote(
'il_grp_status_open',
'text');
 
 1210                return isset(
$row[
'obj_id']) ? 
$row[
'obj_id'] : 0;
 
 1226                global $tree,$rbacreview,$rbacadmin;
 
 1228                $parent_roles = $rbacreview->getParentRoleIds($this->
getRefId());
 
 1232                foreach($real_parent_roles as $role_id)
 
 1235                        $rbacadmin->deleteLocalRole($role_id,$this->
getRefId());
 
 1237                $parent_roles = $rbacreview->getParentRoleIds($this->
getRefId());
 
 1252                foreach($tree->getFilteredSubTree($this->getRefId(),array(
'grp')) as $subnode)
 
 1255                        $template_ops = $rbacreview->getOperationsOfRole($template_id,$subnode[
'type'], ROLE_FOLDER_ID);
 
 1258                        foreach($real_parent_roles as $role_id)
 
 1260                                if($rbacreview->isProtected($parent_roles[$role_id][
'parent'],$role_id))
 
 1265                                $rbacadmin->deleteLocalRole($role_id,$subnode[
'child']);
 
 1268                                $current_ops = $rbacreview->getOperationsOfRole($role_id,$subnode[
'type'],$parent_roles[$role_id][
'parent']);
 
 1271                                $rbacadmin->revokePermission($subnode[
'child'],$role_id);
 
 1275                                foreach($template_ops as $operation)
 
 1277                                        if(in_array($operation,$current_ops))
 
 1279                                                $granted[] = $operation;
 
 1284                                        $rbacadmin->grantPermission($role_id, $granted,$subnode[
'child']);
 
 1290                                        $rbacadmin->copyRolePermissionIntersection(
 
 1291                                                $template_id, ROLE_FOLDER_ID,
 
 1292                                                $role_id, $parent_roles[$role_id][
'parent'],
 
 1293                                                $subnode[
"child"],$role_id);
 
 1294                                        $rbacadmin->assignRoleToFolder($role_id,$subnode[
'child'],
"n");
 
 1321                global $rbacadmin, $rbacreview, $rbacsystem;
 
 1324                $arr_parentRoles = $rbacreview->getParentRoleIds($this->
getRefId());
 
 1326                $real_local_roles = $rbacreview->getRolesOfRoleFolder($this->
getRefId(),
false);
 
 1327                $arr_relevantParentRoleIds = array_diff(array_keys($arr_parentRoles),$real_local_roles);
 
 1341                        $template_ops = $rbacreview->getOperationsOfRole($template_id, 
'grp', ROLE_FOLDER_ID);
 
 1343                        foreach ($arr_relevantParentRoleIds as $parentRole)
 
 1345                                if ($rbacreview->isProtected($arr_parentRoles[$parentRole][
'parent'],$parentRole))
 
 1350                                $granted_permissions = array();
 
 1359                                $rbacadmin->deleteLocalRole($parentRole,$this->
getRefId());
 
 1366                                $current_ops = $rbacreview->getRoleOperationsOnObject($parentRole, $this->
getRefId());
 
 1367                                $rbacadmin->revokePermission($this->
getRefId(), $parentRole);
 
 1368                                foreach ($template_ops as $template_op)
 
 1370                                        if (in_array($template_op,$current_ops))
 
 1372                                                array_push($granted_permissions,$template_op);
 
 1375                                if (!empty($granted_permissions))
 
 1377                                        $rbacadmin->grantPermission($parentRole, $granted_permissions, $this->
getRefId());
 
 1385                                $rbacadmin->copyRolePermissionIntersection(
 
 1386                                        $template_id, ROLE_FOLDER_ID,
 
 1387                                        $parentRole, $arr_parentRoles[$parentRole][
'parent'],
 
 1390                                $rbacadmin->assignRoleToFolder($parentRole,$this->
getRefId(),
"false");
 
 1404                $this->group_status = $a_status;
 
 1416                return $this->group_status;
 
 1426                global $rbacsystem,$rbacreview;
 
 1428                $local_roles = $rbacreview->getRolesOfRoleFolder($this->
getRefId());
 
 1434                foreach ($arr_globalRoles as $globalRole)
 
 1436                        if ($rbacsystem->checkPermission($this->getRefId(), $globalRole ,
"join"))
 
 1453                global $rbacadmin, $rbacreview,
$ilBench;
 
 1455                $ilBench->start(
"Group", 
"getMemberRoles");
 
 1457                $arr_assignedRoles = array();
 
 1459                $arr_assignedRoles = array_intersect($rbacreview->assignedRoles($a_user_id),$this->getLocalGroupRoles());
 
 1461                $ilBench->stop(
"Group", 
"getMemberRoles");
 
 1463                return $arr_assignedRoles;
 
 1478                if (in_array($a_userId,$rbacreview->assignedUsers($grp_Roles[
"grp_admin_role"])))
 
 1497                include_once 
'./Services/AccessControl/classes/class.ilObjRole.php';
 
 1500                                "Groupadmin group obj_no.".$this->
getId(),
 
 1504                $this->m_roleAdminId = $role->getId();
 
 1507                                'il_grp_member_'.$this->
getRefId(),
 
 1508                                "Groupmember of group obj_no.".$this->
getId(),
 
 1512                $this->m_roleMemberId = $role->getId();
 
 1527        function notify($a_event,$a_ref_id,$a_parent_non_rbac_id,$a_node_id,$a_params = 0)
 
 1531                $parent_id = (int) $tree->getParentId($a_node_id);
 
 1533                if ($parent_id != 0)
 
 1535                        $obj_data =& $this->
ilias->obj_factory->getInstanceByRefId($a_node_id);
 
 1536                        $obj_data->notify($a_event,$a_ref_id,$a_parent_non_rbac_id,$parent_id,$a_params);
 
 1545                include_once 
'Modules/Group/classes/class.ilGroupXMLWriter.php';
 
 1548                $xml_writer->start();
 
 1550                $xml = $xml_writer->getXML();
 
 1552                $name = time().
'__'.$this->
ilias->getSetting(
'inst_id').
'__grp_'.$this->
getId();
 
 1556                $this->file_obj->addGroupDirectory();
 
 1557                $this->file_obj->addDirectory($name);
 
 1558                $this->file_obj->writeToFile($xml,$name.
'/'.$name.
'.xml');
 
 1559                $this->file_obj->zipFile($name,$name.
'.zip');
 
 1560                $this->file_obj->deleteDirectory($name);
 
 1569                foreach($a_files as 
$file)
 
 1571                        $this->file_obj->deleteFile(
$file);
 
 1580                if($abs_name = $this->file_obj->getExportFile(
$file))
 
 1598                include_once 
'Modules/Group/classes/class.ilGroupXMLParser.php';
 
 1602                return $import_parser->startParsing();
 
 1616                include_once 
'./Modules/Group/classes/class.ilFileDataGroup.php';
 
 1620                $file_obj->createImportFile($_FILES[
"xmldoc"][
"tmp_name"],$_FILES[
'xmldoc'][
'name']);
 
 1634                $query = 
"SELECT * FROM object_data WHERE title = ".
 
 1635                        $ilDB->quote($a_title ,
'text').
" AND type = 'grp'";
 
 1639                        return $row->obj_id;
 
 1647                global $rbacreview,$ilObjDataCache,
$ilDB;
 
 1649                $local_roles = $rbacreview->getRolesOfRoleFolder($a_ref_id,
false);
 
 1650                $user_roles = $rbacreview->assignedRoles($a_user_id);
 
 1655                        include_once 
'./Services/User/classes/class.ilObjUser.php';
 
 1661                                        $and = 
"AND login = '".$tmp_user->getLogin().
"' ";
 
 1664                                        $and = 
"AND email = '".$tmp_user->getEmail().
"' ";
 
 1666                                case 'matriculation':
 
 1667                                        $and = 
"AND matriculation = '".$tmp_user->getMatriculation().
"' ";
 
 1671                                        $and = 
"AND usr_id = '".$a_user_id.
"'";
 
 1678                        $query = 
"SELECT * FROM usr_data as ud ".
 
 1683                        return $res->numRows() ? true : 
false;
 
 1686                if (!array_intersect($local_roles,$user_roles))
 
 1702                $local_roles = $rbacreview->getRolesOfRoleFolder(
$ref_id,
false);
 
 1705                foreach($local_roles as $role_id)
 
 1707                        $users = array_merge($users,$rbacreview->assignedUsers($role_id));
 
 1710                return array_unique($users);
 
 1722                $view = (int) $this->view_mode;
 
 1729                if($a_translate_inherit)
 
 1743                $this->view_mode = $a_view_mode;
 
 1754                $query = 
'SELECT view_mode FROM grp_settings '.
 
 1755                        'WHERE obj_id = '.$ilDB->quote($a_obj_id,
'integer');
 
 1788                                $a_ref_id = end($ref);
 
 1791                        $crs_ref = $tree->checkForParentType($a_ref_id, 
'crs');
 
 1797                        include_once 
'./Modules/Course/classes/class.ilObjCourse.php';
 
 1810                return $a_view_mode;
 
 1819                include_once 
'./Services/Object/classes/class.ilObjectActivation.php';
 
 1832                        include_once 
'./Modules/Group/classes/class.ilFileDataGroup.php';
 
 1840                return $this->message;
 
 1844                $this->message = $a_message;
 
 1850                        $this->message .= 
"<br /> ";
 
 1852                $this->message .= $a_message;
 
 1864                include_once(
'./Services/Calendar/classes/class.ilCalendarAppointmentTemplate.php');
 
 1876                                $app->setSubtitle(
'grp_cal_reg_start');
 
 1884                                $app->setSubtitle(
'grp_cal_reg_end');
 
 1907                include_once(
'./Modules/Group/classes/class.ilGroupParticipants.php');
 
 1919                $query = 
"SELECT obj_id FROM grp_settings ".
 
 1920                        "WHERE reg_ac_enabled = ".$ilDB->quote(1,
'integer').
" ".
 
 1921                        "AND reg_ac = ".$ilDB->quote($a_code,
'text');
 
 1927                        $obj_ids[] = 
$row->obj_id;
 
 1938        public function register($a_user_id,$a_role = 
IL_GRP_MEMBER, $a_force_registration = 
false)
 
 1940                include_once 
'./Services/Membership/exceptions/class.ilMembershipRegistrationException.php';
 
 1941                include_once 
"./Modules/Group/classes/class.ilGroupParticipants.php";
 
 1944                if($part->isAssigned($a_user_id))
 
 1949                if(!$a_force_registration)
 
 1954                                include_once 
'./Modules/Group/classes/class.ilObjGroupAccess.php';
 
 1959                                                ', group subscription is deactivated.', 
'456');
 
 1973                                        ', group is out of registration time.', 
'789');
 
 1980                                $free = max(0,$this->
getMaxMembers() - $part->getCountMembers());
 
 1981                                include_once(
'./Modules/Group/classes/class.ilGroupWaitingList.php');
 
 1985                                        $this->lng->loadLanguageModule(
"grp");
 
 1988                                        $info = sprintf($this->lng->txt(
'grp_added_to_list'),
 
 1992                                        include_once(
'./Modules/Group/classes/class.ilGroupParticipants.php');
 
 1993                                        include_once(
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php');
 
 2003                                                ', membership is limited.', 
'123');
 
 2008                $part->add($a_user_id,$a_role);
 
 2009                $part->sendNotification($part->TYPE_NOTIFICATION_REGISTRATION, $a_user_id);
 
const IL_CAL_TRANSLATION_SYSTEM
const DB_FETCHMODE_OBJECT
const GRP_REGISTRATION_DIRECT
const GRP_REGISTRATION_PASSWORD
const GRP_REGISTRATION_DEACTIVATED
Apointment templates are used for automatic generated apointments.
static _lookupSortMode($a_obj_id)
lookup sort mode
getBigIconPath()
Get path for big icon.
getSmallIconPath()
Get path for small icon.
getViewMode()
Get container view mode.
getTinyIconPath()
Get path for tiny icon.
static _clone($a_source_id, $a_target_id)
Clone fields.
@classDescription Date and time handling
static _after(ilDateTime $start, ilDateTime $end, $a_compare_field='', $a_tz='')
compare two dates and check start is after end This method does not consider tz offsets.
static _before(ilDateTime $start, ilDateTime $end, $a_compare_field='', $a_tz='')
compare two dates and check start is before end This method does not consider tz offsets.
const TYPE_WAITING_LIST_MEMBER
static _getInstanceByObjId($a_obj_id)
Get singleton instance.
static generateCode()
Generate new registration key.
membership registration exception
static _usingRegistrationCode()
Using Registration code.
getGroupMemberData($a_mem_ids, $active=1)
get all group Members regardless of group role.
setGroupStatus($a_status)
Set group status.
getInformation()
get Information
static lookupViewMode($a_obj_id)
lookup view mode @global $ilDB
getGroupType()
get group type
getLocationZoom()
Get LocationZoom.
getLongitude()
Get Longitude.
getLocalGroupRoles($a_translate=false)
get ALL local roles of group, also those created and defined afterwards only fetch data once from dat...
getDefaultAdminRole()
returns object id of created default adminstrator role @access public
getPassword()
get password
getGroupMemberIds()
get all group Member ids regardless of role @access public
appendMessage($a_message)
enableRegistrationAccessCode($a_status)
En/disable registration access code.
getDefaultMemberRole()
returns object id of created default member role @access public
setPassword($a_pass)
set password
enableWaitingList($a_status)
enable waiting list
const MAIL_ALLOWED_TUTORS
static lookupObjectsByCode($a_code)
updateGroupType()
Change group type.
getRegistrationStart()
get registration start
readGroupStatus()
get group status, redundant method because @access public
initParticipants()
init participants object
setRegistrationAccessCode($a_code)
Set refistration access code.
setRegistrationStart($a_start)
set registration start
setInformation($a_information)
set information
getRegistrationType()
get registration type
setMaxMembers($a_max)
set max members
deleteExportFiles($a_files)
getGrpStatusClosedTemplateId()
get group status closed template @access public
getMaxMembers()
get max members
const ERR_WRONG_REG_TIME_LIMIT
isMembershipLimited()
is max member limited
downloadExportFile($file)
getDefaultGroupRoles($a_grp_id="")
get default group roles, returns the defaultlike create roles il_grp_member, il_grp_admin @access pub...
setEnableGroupMap($a_enablemap)
Set Enable Group Map.
cloneAutoGeneratedRoles($new_obj)
Clone group admin and member role permissions.
leave($a_user_id)
deassign member from group role @access private
static lookupGroupTye($a_id)
Lookup group type.
_isMember($a_user_id, $a_ref_id, $a_field='')
setLongitude($a_longitude)
Set Longitude.
addMember($a_user_id, $a_mem_role)
add Member to Group @access public
cloneDependencies($a_target_id, $a_copy_id)
Clone object dependencies (crs items, preconditions)
_importFromXMLString($xml, $parent_id)
Static used for importing a group from xml string.
setRegistrationEnd($a_end)
set registration end
getRegistrationAccessCode()
get access code
$file_obj
Group file object for handling of export files.
notify($a_event, $a_ref_id, $a_parent_non_rbac_id, $a_node_id, $a_params=0)
notifys an object about an event occured Based on the event happend, each object may decide how it re...
isAdmin($a_userId)
is Admin @access public
setGroupType($a_type)
set group type
getRegistrationEnd()
get registration end
initGroupStatus($a_grpStatus=GRP_TYPE_PUBLIC)
set group status
setMailToMembersType($a_type)
Set mail to members type.
setLatitude($a_latitude)
Set Latitude.
$reg_membership_limitation
setLocationZoom($a_locationzoom)
Set LocationZoom.
join($a_user_id, $a_mem_role="")
join Group, assigns user to role @access private
__construct($a_id=0, $a_call_by_reference=true)
Constructor @access public.
setViewMode($a_view_mode)
Set group view mode.
validate()
validate group settings
setRegistrationType($a_type)
set registration type
cloneObject($a_target_id, $a_copy_id=0)
Clone group (no member data)
getGroupStatus()
get group status
const ERR_MISSING_GROUP_TYPE
_importFromFile($file, $parent_id)
Static used for importing an group from xml zip file.
addAdditionalSubItemInformation(&$a_item_data)
Add additional information to sub item, e.g.
leaveGroup()
is called when a member decides to leave group @access public
enableMembershipLimitation($a_status)
enable max member limitation
const ERR_MISSING_PASSWORD
isRegistrationUnlimited()
is registration unlimited
isRegistrationEnabled()
is registration enabled
isRegistrationAccessCodeEnabled()
Check if access code is enabled.
getLatitude()
Get Latitude.
getGrpStatusOpenTemplateId()
get group status open template @access public
getMailToMembersType()
Get mail to members type.
enableUnlimitedRegistration($a_status)
enable unlimited registration
getViewMode($a_translate_inherit=true)
get view mode
getEnableGroupMap()
Get Enable Group Map.
static lookupGroupStatusTemplateId($a_obj_id)
@global $ilDB $ilDB
prepareAppointments($a_mode='create')
Prepare calendar appointments.
isGroupTypeModified($a_old_type)
check if group type is modified
_lookupIdByTitle($a_title)
getGroupAdminIds($a_grpId="")
get Group Admin Id @access public
const ERR_WRONG_MAX_MEMBERS
static translateViewMode($a_obj_id, $a_view_mode, $a_ref_id=null)
translate view mode
getMemberRoles($a_user_id)
get group member status @access public
initDefaultRoles()
init default roles settings @access public
isWaitingListEnabled()
is waiting list enabled
static createDefaultRole($a_title, $a_description, $a_tpl_name, $a_ref_id)
_getTranslation($a_role_title)
static cloneDependencies($a_ref_id, $a_target_id, $a_copy_id)
Clone dependencies.
static addAdditionalSubItemInformation(array &$a_item)
Parse item data for list entries.
getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
static _lookupObjId($a_id)
ilObject($a_id=0, $a_reference=true)
Constructor @access public.
getRefId()
get reference id @access public
getLongDescription()
get object long description (stored in object_description)
static _getAllReferences($a_id)
get all reference ids of object
getId()
get object id @access public
getTitle()
get object title @access public
static _deleteAllEntries($a_obj_id)
Delete all entries Normally called for course deletion.
static quoteArray($a_array)
Quotes all members of an array for usage in DB query statement.
static deliverFile($a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.
Interface for all objects that offer registration with access codes.
redirection script todo: (a better solution should control the processing via a xml file)