6 require_once
"./Services/Container/classes/class.ilContainer.php";
7 include_once(
'./Services/Calendar/classes/class.ilDateTime.php');
8 include_once
'./Services/Membership/interfaces/interface.ilMembershipRegistrationCodes.php';
10 define(
'GRP_REGISTRATION_DEACTIVATED',-1);
11 define(
'GRP_REGISTRATION_DIRECT',0);
12 define(
'GRP_REGISTRATION_REQUEST',1);
13 define(
'GRP_REGISTRATION_PASSWORD',2);
15 define(
'GRP_REGISTRATION_LIMITED',1);
16 define(
'GRP_REGISTRATION_UNLIMITED',2);
18 define(
'GRP_TYPE_UNKNOWN',0);
19 define(
'GRP_TYPE_CLOSED',1);
20 define(
'GRP_TYPE_OPEN',2);
21 define(
'GRP_TYPE_PUBLIC',3);
102 public function __construct($a_id = 0,$a_call_by_reference =
true)
106 $this->tree =& $tree;
109 $this->
ilObject($a_id,$a_call_by_reference);
122 $query =
"SELECT grp_type FROM grp_settings ".
123 "WHERE obj_id = ".$ilDB->quote($a_id,
'integer');
127 return $row->grp_type;
142 $this->information = $a_information;
165 $this->group_type = $a_type;
208 $this->reg_type = $a_type;
242 $this->reg_unlimited = $a_status;
265 $this->reg_start = $a_start;
276 return $this->reg_start ? $this->reg_start : $this->reg_start =
new ilDateTime(date(
'Y-m-d').
' 08:00:00',
IL_CAL_DATETIME);
289 $this->reg_end = $a_end;
311 $this->reg_password = $a_pass;
334 $this->reg_membership_limitation = $a_status;
356 $this->reg_min_members = $a_max;
378 $this->reg_max_members = $a_max;
401 $this->waiting_list = $a_status;
418 $this->auto_fill_from_waiting = (bool)$a_value;
433 $this->latitude = $a_latitude;
453 $this->longitude = $a_longitude;
473 $this->locationzoom = $a_locationzoom;
493 $this->enablemap = $a_enablemap;
522 $this->reg_access_code = $a_code;
541 $this->reg_access_code_enabled = $a_status;
551 $this->mail_members = $a_type;
565 $this->leave_end = $a_value;
586 $ilErr->appendMessage($this->lng->txt(self::ERR_MISSING_TITLE));
590 $ilErr->appendMessage($this->lng->txt(self::ERR_MISSING_GROUP_TYPE));
594 $ilErr->appendMessage($this->lng->txt(self::ERR_MISSING_PASSWORD));
598 $ilErr->appendMessage($this->lng->txt(self::ERR_WRONG_REG_TIME_LIMIT));
604 $ilErr->appendMessage($this->lng->txt(self::ERR_MISSING_MIN_MAX_MEMBERS));
608 $ilErr->appendMessage($this->lng->txt(self::ERR_WRONG_MAX_MEMBERS));
612 $ilErr->appendMessage($this->lng->txt(self::ERR_WRONG_MIN_MAX_MEMBERS));
615 return strlen($ilErr->getMessage()) == 0;
626 global
$ilDB,$ilAppEventHandler;
628 if(!parent::create())
633 $query =
"INSERT INTO grp_settings (obj_id,information,grp_type,registration_type,registration_enabled,".
634 "registration_unlimited,registration_start,registration_end,registration_password,registration_mem_limit,".
635 "registration_max_members,waiting_list,latitude,longitude,location_zoom,enablemap,reg_ac_enabled,reg_ac,view_mode,mail_members_type,".
636 "leave_end,registration_min_members,auto_wait) ".
638 $ilDB->quote($this->
getId() ,
'integer').
", ".
640 $ilDB->quote((
int) $this->
getGroupType() ,
'integer').
", ".
656 $ilDB->quote($this->
getViewMode(
false),
'integer').
', '.
664 $ilAppEventHandler->raise(
'Modules/Group',
666 array(
'object' => $this,
667 'obj_id' => $this->
getId(),
670 return $this->
getId();
678 global
$ilDB,$ilAppEventHandler;
680 if (!parent::update())
685 $query =
"UPDATE grp_settings ".
686 "SET information = ".$ilDB->quote($this->
getInformation() ,
'text').
", ".
687 "grp_type = ".$ilDB->quote((
int) $this->
getGroupType() ,
'integer').
", ".
693 "registration_password = ".$ilDB->quote($this->
getPassword() ,
'text').
", ".
695 "registration_mem_limit = ".$ilDB->quote((
int) $this->
isMembershipLimited() ,
'integer').
", ".
696 "registration_max_members = ".$ilDB->quote($this->
getMaxMembers() ,
'integer').
", ".
698 "latitude = ".$ilDB->quote($this->
getLatitude() ,
'text').
", ".
699 "longitude = ".$ilDB->quote($this->
getLongitude() ,
'text').
", ".
700 "location_zoom = ".$ilDB->quote($this->
getLocationZoom() ,
'integer').
", ".
704 'view_mode = '.$ilDB->quote($this->
getViewMode(
false),
'integer').
', '.
707 "registration_min_members = ".$ilDB->quote($this->
getMinMembers() ,
'integer').
", ".
709 "WHERE obj_id = ".$ilDB->quote($this->
getId() ,
'integer');
712 $ilAppEventHandler->raise(
'Modules/Group',
714 array(
'object' => $this,
715 'obj_id' => $this->
getId(),
728 public function delete()
730 global
$ilDB,$ilAppEventHandler;
733 if (!parent::delete())
738 $query =
"DELETE FROM grp_settings ".
739 "WHERE obj_id = ".$ilDB->quote($this->
getId() ,
'integer');
742 include_once(
'./Modules/Group/classes/class.ilGroupParticipants.php');
745 $ilAppEventHandler->raise(
'Modules/Group',
747 array(
'object' => $this,
748 'obj_id' => $this->
getId(),
765 $query =
"SELECT * FROM grp_settings ".
766 "WHERE obj_id = ".$ilDB->quote($this->
getId() ,
'integer');
796 include_once(
'./Services/Container/classes/class.ilContainerSortingSettings.php');
812 $new_obj = parent::cloneObject($a_target_id,$a_copy_id);
834 include_once
'./Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
847 include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
853 include_once(
'./Modules/Group/classes/class.ilGroupParticipants.php');
856 $part->updateNotification($ilUser->getId(),$ilSetting->get(
'mail_grp_admin_notification',
true));
859 include_once(
'Services/Tracking/classes/class.ilLPObjSettings.php');
861 $obj_settings->cloneSettings($new_obj->getId());
862 unset($obj_settings);
884 parent::cloneDependencies($a_target_id,$a_copy_id);
886 include_once(
'Services/Object/classes/class.ilObjectActivation.php');
901 global $rbacadmin,$rbacreview;
904 $new_admin = $new_obj->getDefaultAdminRole();
905 if(!$admin || !$new_admin || !$this->
getRefId() || !$new_obj->getRefId())
909 $rbacadmin->copyRolePermissions($admin,$this->
getRefId(),$new_obj->getRefId(),$new_admin,
true);
913 $new_member = $new_obj->getDefaultMemberRole();
914 if(!$member || !$new_member)
918 $rbacadmin->copyRolePermissions($member,$this->
getRefId(),$new_obj->getRefId(),$new_member,
true);
928 function join($a_user_id, $a_mem_role=
"")
932 if (is_array($a_mem_role))
934 foreach ($a_mem_role as $role)
936 $rbacadmin->assignUser($role,$a_user_id,
false);
941 $rbacadmin->assignUser($a_mem_role,$a_user_id,
false);
955 return $local_group_Roles[
"il_grp_member_".$this->getRefId()];
966 return $local_group_Roles[
"il_grp_admin_".$this->getRefId()];
979 if (isset($a_user_id) && isset($a_mem_role) )
981 $this->
join($a_user_id,$a_mem_role);
986 $this->
ilias->raiseError(get_class($this).
"::addMember(): Missing parameters !",$this->
ilias->error_obj->WARNING);
1000 global $rbacadmin, $rbacreview;
1004 if (count($member_ids) <= 1 || !in_array($this->
ilias->account->getId(), $member_ids))
1012 $this->
leave($this->
ilias->account->getId());
1035 if (is_array($arr_groupRoles))
1037 foreach ($arr_groupRoles as $groupRole)
1039 $rbacadmin->deassignUser($groupRole, $a_user_id);
1044 $rbacadmin->deassignUser($arr_groupRoles, $a_user_id);
1058 global $rbacadmin, $rbacreview;
1064 foreach ($rol as $value)
1066 foreach ($rbacreview->assignedUsers($value) as $member_id)
1068 array_push($usr_arr,$member_id);
1072 $mem_arr = array_unique($usr_arr);
1074 return $mem_arr ? $mem_arr : array();
1090 $q =
"SELECT login,firstname,lastname,title,usr_id,last_login ".
1094 if (is_numeric($active) && $active > -1)
1095 $q .=
"AND active = '$active'";
1097 $q .=
'ORDER BY lastname,firstname';
1099 $r = $ilDB->query($q);
1103 $mem_arr[] = array(
"id" =>
$row->usr_id,
1104 "login" =>
$row->login,
1105 "firstname" =>
$row->firstname,
1106 "lastname" =>
$row->lastname,
1107 "last_login" =>
$row->last_login
1111 return $mem_arr ? $mem_arr : array();
1129 if (!empty($a_grpId))
1141 foreach ($rbacreview->assignedUsers($this->getDefaultAdminRole()) as $member_id)
1143 array_push($usr_arr,$member_id);
1156 global $rbacadmin, $rbacreview;
1158 if (strlen($a_grp_id) > 0)
1160 $grp_id = $a_grp_id;
1167 $role_arr = $rbacreview->getRolesOfRoleFolder($grp_id);
1169 foreach ($role_arr as $role_id)
1171 $role_Obj =& $this->
ilias->obj_factory->getInstanceByObjId($role_id);
1173 $grp_Member =
"il_grp_member_".$grp_id;
1174 $grp_Admin =
"il_grp_admin_".$grp_id;
1176 if (strcmp($role_Obj->getTitle(), $grp_Member) == 0 )
1178 $arr_grpDefaultRoles[
"grp_member_role"] = $role_Obj->getId();
1181 if (strcmp($role_Obj->getTitle(), $grp_Admin) == 0)
1183 $arr_grpDefaultRoles[
"grp_admin_role"] = $role_Obj->getId();
1187 return $arr_grpDefaultRoles;
1198 global $rbacadmin,$rbacreview;
1200 if (empty($this->local_roles))
1202 $this->local_roles = array();
1203 $role_arr = $rbacreview->getRolesOfRoleFolder($this->
getRefId());
1205 foreach ($role_arr as $role_id)
1207 if ($rbacreview->isAssignable($role_id,$this->getRefId()) ==
true)
1209 $role_Obj =& $this->
ilias->obj_factory->getInstanceByObjId($role_id);
1217 $role_name = $role_Obj->getTitle();
1220 $this->local_roles[$role_name] = $role_Obj->getId();
1225 return $this->local_roles;
1235 $q =
"SELECT obj_id FROM object_data WHERE type='rolt' AND title='il_grp_status_closed'";
1239 return $row[
"obj_id"];
1249 $q =
"SELECT obj_id FROM object_data WHERE type='rolt' AND title='il_grp_status_open'";
1253 return $row[
"obj_id"];
1266 $type = self::lookupGroupTye($a_obj_id);
1269 $query =
'SELECT obj_id FROM object_data WHERE type = '.$ilDB->quote(
'rolt',
'text').
' AND title = '.$ilDB->quote(
'il_grp_status_closed',
'text');
1273 $query =
'SELECT obj_id FROM object_data WHERE type = '.$ilDB->quote(
'rolt',
'text').
' AND title = '.$ilDB->quote(
'il_grp_status_open',
'text');
1278 return isset(
$row[
'obj_id']) ?
$row[
'obj_id'] : 0;
1294 global $tree,$rbacreview,$rbacadmin;
1296 $parent_roles = $rbacreview->getParentRoleIds($this->
getRefId());
1300 foreach($real_parent_roles as $role_id)
1303 $rbacadmin->deleteLocalRole($role_id,$this->
getRefId());
1305 $parent_roles = $rbacreview->getParentRoleIds($this->
getRefId());
1320 foreach($tree->getFilteredSubTree($this->getRefId(),array(
'grp')) as $subnode)
1323 $template_ops = $rbacreview->getOperationsOfRole(
$template_id,$subnode[
'type'], ROLE_FOLDER_ID);
1326 foreach($real_parent_roles as $role_id)
1328 if($rbacreview->isProtected($parent_roles[$role_id][
'parent'],$role_id))
1333 $rbacadmin->deleteLocalRole($role_id,$subnode[
'child']);
1336 $current_ops = $rbacreview->getOperationsOfRole($role_id,$subnode[
'type'],$parent_roles[$role_id][
'parent']);
1339 $rbacadmin->revokePermission($subnode[
'child'],$role_id);
1343 foreach($template_ops as $operation)
1345 if(in_array($operation,$current_ops))
1347 $granted[] = $operation;
1352 $rbacadmin->grantPermission($role_id, $granted,$subnode[
'child']);
1358 $rbacadmin->copyRolePermissionIntersection(
1360 $role_id, $parent_roles[$role_id][
'parent'],
1361 $subnode[
"child"],$role_id);
1362 $rbacadmin->assignRoleToFolder($role_id,$subnode[
'child'],
"n");
1389 global $rbacadmin, $rbacreview, $rbacsystem;
1392 $arr_parentRoles = $rbacreview->getParentRoleIds($this->
getRefId());
1394 $real_local_roles = $rbacreview->getRolesOfRoleFolder($this->
getRefId(),
false);
1395 $arr_relevantParentRoleIds = array_diff(array_keys($arr_parentRoles),$real_local_roles);
1409 $template_ops = $rbacreview->getOperationsOfRole(
$template_id,
'grp', ROLE_FOLDER_ID);
1411 foreach ($arr_relevantParentRoleIds as $parentRole)
1413 if ($rbacreview->isProtected($arr_parentRoles[$parentRole][
'parent'],$parentRole))
1418 $granted_permissions = array();
1427 $rbacadmin->deleteLocalRole($parentRole,$this->
getRefId());
1434 $current_ops = $rbacreview->getRoleOperationsOnObject($parentRole, $this->
getRefId());
1435 $rbacadmin->revokePermission($this->
getRefId(), $parentRole);
1436 foreach ($template_ops as $template_op)
1438 if (in_array($template_op,$current_ops))
1440 array_push($granted_permissions,$template_op);
1443 if (!empty($granted_permissions))
1445 $rbacadmin->grantPermission($parentRole, $granted_permissions, $this->
getRefId());
1453 $rbacadmin->copyRolePermissionIntersection(
1455 $parentRole, $arr_parentRoles[$parentRole][
'parent'],
1458 $rbacadmin->assignRoleToFolder($parentRole,$this->
getRefId(),
"false");
1472 $this->group_status = $a_status;
1484 return $this->group_status;
1494 global $rbacsystem,$rbacreview;
1496 $local_roles = $rbacreview->getRolesOfRoleFolder($this->
getRefId());
1502 foreach ($arr_globalRoles as $globalRole)
1504 if ($rbacsystem->checkPermission($this->getRefId(), $globalRole ,
"join"))
1521 global $rbacadmin, $rbacreview,
$ilBench;
1523 $ilBench->start(
"Group",
"getMemberRoles");
1525 $arr_assignedRoles = array();
1527 $arr_assignedRoles = array_intersect($rbacreview->assignedRoles($a_user_id),$this->
getLocalGroupRoles());
1529 $ilBench->stop(
"Group",
"getMemberRoles");
1531 return $arr_assignedRoles;
1546 if (in_array($a_userId,$rbacreview->assignedUsers($grp_Roles[
"grp_admin_role"])))
1565 include_once
'./Services/AccessControl/classes/class.ilObjRole.php';
1568 "Groupadmin group obj_no.".$this->
getId(),
1572 $this->m_roleAdminId = $role->getId();
1575 'il_grp_member_'.$this->
getRefId(),
1576 "Groupmember of group obj_no.".$this->
getId(),
1580 $this->m_roleMemberId = $role->getId();
1595 function notify($a_event,$a_ref_id,$a_parent_non_rbac_id,$a_node_id,$a_params = 0)
1599 $parent_id = (int) $tree->getParentId($a_node_id);
1601 if ($parent_id != 0)
1603 $obj_data =& $this->
ilias->obj_factory->getInstanceByRefId($a_node_id);
1604 $obj_data->notify($a_event,$a_ref_id,$a_parent_non_rbac_id,$parent_id,$a_params);
1613 include_once
'Modules/Group/classes/class.ilGroupXMLWriter.php';
1616 $xml_writer->start();
1618 $xml = $xml_writer->getXML();
1620 $name = time().
'__'.$this->
ilias->getSetting(
'inst_id').
'__grp_'.$this->
getId();
1624 $this->file_obj->addGroupDirectory();
1625 $this->file_obj->addDirectory($name);
1626 $this->file_obj->writeToFile($xml,$name.
'/'.$name.
'.xml');
1627 $this->file_obj->zipFile($name,$name.
'.zip');
1628 $this->file_obj->deleteDirectory($name);
1637 foreach($a_files as
$file)
1639 $this->file_obj->deleteFile($file);
1648 if($abs_name = $this->file_obj->getExportFile(
$file))
1666 include_once
'Modules/Group/classes/class.ilGroupXMLParser.php';
1670 return $import_parser->startParsing();
1684 include_once
'./Modules/Group/classes/class.ilFileDataGroup.php';
1687 $file_obj->addImportDirectory();
1688 $file_obj->createImportFile($_FILES[
"xmldoc"][
"tmp_name"],$_FILES[
'xmldoc'][
'name']);
1689 $file_obj->unpackImportFile();
1691 if(!$file_obj->validateImportFile())
1702 $query =
"SELECT * FROM object_data WHERE title = ".
1703 $ilDB->quote($a_title ,
'text').
" AND type = 'grp'";
1707 return $row->obj_id;
1715 global $rbacreview,$ilObjDataCache,
$ilDB;
1717 $local_roles = $rbacreview->getRolesOfRoleFolder($a_ref_id,
false);
1718 $user_roles = $rbacreview->assignedRoles($a_user_id);
1723 include_once
'./Services/User/classes/class.ilObjUser.php';
1729 $and =
"AND login = '".$tmp_user->getLogin().
"' ";
1732 $and =
"AND email = '".$tmp_user->getEmail().
"' ";
1734 case 'matriculation':
1735 $and =
"AND matriculation = '".$tmp_user->getMatriculation().
"' ";
1739 $and =
"AND usr_id = '".$a_user_id.
"'";
1746 $query =
"SELECT * FROM usr_data as ud ".
1751 return $res->numRows() ? true :
false;
1754 if (!array_intersect($local_roles,$user_roles))
1770 $local_roles = $rbacreview->getRolesOfRoleFolder(
$ref_id,
false);
1773 foreach($local_roles as $role_id)
1775 $users = array_merge($users,$rbacreview->assignedUsers($role_id));
1778 return array_unique($users);
1790 $view = (int) $this->view_mode;
1797 if($a_translate_inherit)
1799 $view = self::translateViewMode($this->
id, $view, $this->ref_id);
1811 $this->view_mode = $a_view_mode;
1822 $query =
'SELECT view_mode FROM grp_settings '.
1823 'WHERE obj_id = '.$ilDB->quote($a_obj_id,
'integer');
1831 return self::translateViewMode($a_obj_id,
$view_mode);
1856 $a_ref_id = end($ref);
1859 $crs_ref = $tree->checkForParentType($a_ref_id,
'crs');
1865 include_once
'./Modules/Course/classes/class.ilObjCourse.php';
1878 return $a_view_mode;
1887 include_once
'./Services/Object/classes/class.ilObjectActivation.php';
1900 include_once
'./Modules/Group/classes/class.ilFileDataGroup.php';
1908 return $this->message;
1912 $this->message = $a_message;
1918 $this->message .=
"<br /> ";
1920 $this->message .= $a_message;
1932 include_once(
'./Services/Calendar/classes/class.ilCalendarAppointmentTemplate.php');
1944 $app->setSubtitle(
'grp_cal_reg_start');
1952 $app->setSubtitle(
'grp_cal_reg_end');
1975 include_once(
'./Modules/Group/classes/class.ilGroupParticipants.php');
2002 $query =
"SELECT obj_id FROM grp_settings ".
2003 "WHERE reg_ac_enabled = ".$ilDB->quote(1,
'integer').
" ".
2004 "AND reg_ac = ".$ilDB->quote($a_code,
'text');
2010 $obj_ids[] =
$row->obj_id;
2021 public function register($a_user_id,$a_role =
IL_GRP_MEMBER, $a_force_registration =
false)
2023 include_once
'./Services/Membership/exceptions/class.ilMembershipRegistrationException.php';
2024 include_once
"./Modules/Group/classes/class.ilGroupParticipants.php";
2027 if($part->isAssigned($a_user_id))
2032 if(!$a_force_registration)
2037 include_once
'./Modules/Group/classes/class.ilObjGroupAccess.php';
2042 ', group subscription is deactivated.',
'456');
2056 ', group is out of registration time.',
'789');
2063 $free = max(0,$this->
getMaxMembers() - $part->getCountMembers());
2064 include_once(
'./Modules/Group/classes/class.ilGroupWaitingList.php');
2068 $this->lng->loadLanguageModule(
"grp");
2071 $info = sprintf($this->lng->txt(
'grp_added_to_list'),
2075 include_once(
'./Modules/Group/classes/class.ilGroupParticipants.php');
2076 include_once(
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php');
2086 ', membership is limited.',
'123');
2091 $part->add($a_user_id,$a_role);
2092 $part->sendNotification($part->TYPE_NOTIFICATION_REGISTRATION, $a_user_id);
2106 include_once(
'./Modules/Group/classes/class.ilGroupWaitingList.php');
2133 public static function mayLeave($a_group_id, $a_user_id = null, &$a_date = null)
2139 $a_user_id = $ilUser->getId();
2142 $set = $ilDB->query(
"SELECT leave_end".
2143 " FROM grp_settings".
2144 " WHERE obj_id = ".$ilDB->quote($a_group_id,
"integer"));
2145 $row = $ilDB->fetchAssoc($set);
2149 $limit = date(
"Ymd",
$row[
"leave_end"]);
2150 if($limit < date(
"Ymd"))
2170 $now = date(
"Y-m-d H:i:s");
2172 include_once
"Modules/Group/classes/class.ilGroupParticipants.php";
2174 $set = $ilDB->query(
"SELECT obj_id, registration_min_members".
2175 " FROM grp_settings".
2176 " WHERE registration_min_members > ".$ilDB->quote(0,
"integer").
2177 " AND registration_mem_limit = ".$ilDB->quote(1,
"integer").
2178 " AND ((leave_end IS NOT NULL".
2179 " AND leave_end < ".$ilDB->quote($now,
"text").
")".
2180 " OR (leave_end IS NULL".
2181 " AND registration_end IS NOT NULL".
2182 " AND registration_end < ".$ilDB->quote($now,
"text").
"))" 2185 while(
$row = $ilDB->fetchAssoc($set))
2190 if(
$GLOBALS[
'tree']->isDeleted($ref))
2196 $reci = $part->getNotificationRecipients();
2199 $missing = (int)
$row[
"registration_min_members"]-$part->getCountMembers();
2202 $res[
$row[
"obj_id"]] = array($missing, $reci);
static lookupGroupStatusTemplateId($a_obj_id)
$ilDB $ilDB
setCancellationEnd(ilDate $a_value=null)
_importFromXMLString($xml, $parent_id)
Static used for importing a group from xml string.
getMaxMembers()
get max members
static mayLeave($a_group_id, $a_user_id=null, &$a_date=null)
getDefaultAdminRole()
returns object id of created default adminstrator role public
dropDesktopItem($a_item_id, $a_type)
drop an item from user's personal desktop
cloneAutoGeneratedRoles($new_obj)
Clone group admin and member role permissions.
isRegistrationEnabled()
is registration enabled
__construct($a_id=0, $a_call_by_reference=true)
Constructor public.
getLongitude()
Get Longitude.
static _deleteAllEntries($a_obj_id)
Delete all entries Normally called for course deletion.
static lookupNumberOfMembers($a_ref_id)
Lookup number of members ilRbacReview $rbacreview <type> $ilObjDataCache.
validate()
validate group settings
isRegistrationUnlimited()
is registration unlimited
getDefaultMemberRole()
returns object id of created default member role public
$reg_membership_limitation
const GRP_REGISTRATION_DEACTIVATED
const ERR_MISSING_PASSWORD
getMembersObject()
Get members objects.
isMembershipLimited()
is max member limited
getRegistrationType()
get registration type
const IL_CAL_TRANSLATION_SYSTEM
const ERR_WRONG_MAX_MEMBERS
getRegistrationEnd()
get registration end
setWaitingListAutoFill($a_value)
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.
getGroupStatus()
get group status
cloneDependencies($a_target_id, $a_copy_id)
Clone object dependencies (crs items, preconditions)
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.
join($a_user_id, $a_mem_role="")
join Group, assigns user to role private
_getTranslation($a_role_title)
getBigIconPath()
Get path for big icon.
setLongitude($a_longitude)
Set Longitude.
getLatitude()
Get Latitude.
getRegistrationAccessCode()
get access code
getTinyIconPath()
Get path for tiny icon.
const ERR_MISSING_GROUP_TYPE
Apointment templates are used for automatic generated apointments.
getViewMode()
Get container view mode.
initGroupStatus($a_grpStatus=GRP_TYPE_PUBLIC)
set group status
const GRP_REGISTRATION_PASSWORD
enableUnlimitedRegistration($a_status)
enable unlimited registration
getRegistrationStart()
get registration start
const ERR_MISSING_MIN_MAX_MEMBERS
static _clone($a_source_id, $a_target_id)
Clone fields.
getDefaultGroupRoles($a_grp_id="")
get default group roles, returns the defaultlike create roles il_grp_member, il_grp_admin public ...
ilObject($a_id=0, $a_reference=true)
Constructor public.
static _getAllReferences($a_id)
get all reference ids of object
const DB_FETCHMODE_OBJECT
getGrpStatusOpenTemplateId()
get group status open template public
static createDefaultRole($a_title, $a_description, $a_tpl_name, $a_ref_id)
cloneObject($a_target_id, $a_copy_id=0)
Clone group (no member data)
_lookupIdByTitle($a_title)
enableWaitingList($a_status)
enable waiting list
static findGroupsWithNotEnoughMembers()
Minimum members check $ilDB $ilDB.
const TYPE_WAITING_LIST_MEMBER
getGrpStatusClosedTemplateId()
get group status closed template public
appendMessage($a_message)
leave($a_user_id)
deassign member from group role private
getGroupType()
get group type
static addAdditionalSubItemInformation(array &$a_item)
Parse item data for list entries.
setLatitude($a_latitude)
Set Latitude.
downloadExportFile($file)
getId()
get object id public
getViewMode($a_translate_inherit=true)
get view mode
const ERR_WRONG_MIN_MAX_MEMBERS
Interface for all objects that offer registration with access codes.
const MAIL_ALLOWED_TUTORS
static _usingRegistrationCode()
Using Registration code.
getLocalGroupRoles($a_translate=false)
get ALL local roles of group, also those created and defined afterwards only fetch data once from dat...
isGroupTypeModified($a_old_type)
check if group type is modified
prepareAppointments($a_mode='create')
Prepare calendar appointments.
static _lookupObjId($a_id)
enableMembershipLimitation($a_status)
enable max member limitation
getLocationZoom()
Get LocationZoom.
setPassword($a_pass)
set password
setViewMode($a_view_mode)
Set group view mode.
setMaxMembers($a_max)
set max members
setRegistrationEnd($a_end)
set registration end
setRegistrationType($a_type)
set registration type
getTitle()
get object title public
initParticipants()
init participants object
getMemberRoles($a_user_id)
get group member status public
$file_obj
Group file object for handling of export files.
redirection script todo: (a better solution should control the processing via a xml file) ...
membership registration exception
getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
setGroupType($a_type)
set group type
getEnableGroupMap()
Get Enable Group Map.
static deliverFile($a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.
getInformation()
get Information
setMinMembers($a_max)
set min members
leaveGroup()
is called when a member decides to leave group public
setInformation($a_information)
set information
getGroupAdminIds($a_grpId="")
get Group Admin Id public
getMailToMembersType()
Get mail to members type.
static _getInstanceByObjId($a_obj_id)
Get singleton instance.
setEnableGroupMap($a_enablemap)
Set Enable Group Map.
setGroupStatus($a_status)
Set group status.
getSmallIconPath()
Get path for small icon.
static quoteArray($a_array)
Quotes all members of an array for usage in DB query statement.
getPassword()
get password
static generateCode()
Generate new registration key.
setRegistrationStart($a_start)
set registration start
enableRegistrationAccessCode($a_status)
En/disable registration access code.
isRegistrationAccessCodeEnabled()
Check if access code is enabled.
deleteExportFiles($a_files)
setLocationZoom($a_locationzoom)
Set LocationZoom.
static translateViewMode($a_obj_id, $a_view_mode, $a_ref_id=null)
translate view mode
static lookupObjectsByCode($a_code)
getGroupMemberData($a_mem_ids, $active=1)
get all group Members regardless of group role.
static cloneDependencies($a_ref_id, $a_target_id, $a_copy_id)
Clone dependencies.
updateGroupType()
Change group type.
static lookupGroupTye($a_id)
Lookup group type.
getLongDescription()
get object long description (stored in object_description)
getRefId()
get reference id public
addAdditionalSubItemInformation(&$a_item_data)
Add additional information to sub item, e.g.
getGroupMemberIds()
get all group Member ids regardless of role public
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...
static getLogger($a_component_id)
Get component logger.
static _lookupSortMode($a_obj_id)
lookup sort mode
initDefaultRoles()
init default roles settings public
$GLOBALS['PHPCAS_CLIENT']
This global variable is used by the interface class phpCAS.
setMailToMembersType($a_type)
Set mail to members type.
const GRP_REGISTRATION_DIRECT
static lookupViewMode($a_obj_id)
lookup view mode $ilDB
setRegistrationAccessCode($a_code)
Set refistration access code.
_importFromFile($file, $parent_id)
Static used for importing an group from xml zip file.
_isMember($a_user_id, $a_ref_id, $a_field='')
addMember($a_user_id, $a_mem_role)
add Member to Group public
readGroupStatus()
get group status, redundant method because public
getMinMembers()
get min members
isWaitingListEnabled()
is waiting list enabled
isAdmin($a_userId)
is Admin public
const ERR_WRONG_REG_TIME_LIMIT