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);
107 public function __construct($a_id = 0,$a_call_by_reference =
true)
111 $this->tree =& $tree;
114 parent::__construct($a_id,$a_call_by_reference);
127 $query =
"SELECT grp_type FROM grp_settings ".
128 "WHERE obj_id = ".$ilDB->quote($a_id,
'integer');
132 return $row->grp_type;
147 $this->information = $a_information;
227 $this->reg_unlimited = $a_status;
250 $this->reg_start = $a_start;
274 $this->reg_end = $a_end;
296 $this->reg_password = $a_pass;
319 $this->reg_membership_limitation = $a_status;
341 $this->reg_min_members = $a_max;
363 $this->reg_max_members = $a_max;
386 $this->waiting_list = $a_status;
403 $this->auto_fill_from_waiting = (bool)$a_value;
418 $this->latitude = $a_latitude;
438 $this->longitude = $a_longitude;
458 $this->locationzoom = $a_locationzoom;
478 $this->enablemap = $a_enablemap;
516 $this->reg_access_code = $a_code;
535 $this->reg_access_code_enabled = $a_status;
559 $this->leave_end = $a_value;
569 $this->show_members = $a_status;
589 $ilErr->appendMessage($this->lng->txt(self::ERR_MISSING_TITLE));
593 $ilErr->appendMessage($this->lng->txt(self::ERR_MISSING_PASSWORD));
605 $ilErr->appendMessage($this->lng->txt(self::ERR_MISSING_MIN_MAX_MEMBERS));
609 $ilErr->appendMessage($this->lng->txt(self::ERR_WRONG_MAX_MEMBERS));
613 $ilErr->appendMessage($this->lng->txt(self::ERR_WRONG_MIN_MAX_MEMBERS));
622 $ilErr->appendMessage($this->lng->txt((self::ERR_WRONG_REGISTRATION_LIMITED)));
625 return strlen($ilErr->getMessage()) == 0;
636 global
$ilDB,$ilAppEventHandler;
638 if(!parent::create())
643 $query =
"INSERT INTO grp_settings (obj_id,information,grp_type,registration_type,registration_enabled,".
644 "registration_unlimited,registration_start,registration_end,registration_password,registration_mem_limit,".
645 "registration_max_members,waiting_list,latitude,longitude,location_zoom,enablemap,reg_ac_enabled,reg_ac,view_mode,mail_members_type,".
646 "leave_end,registration_min_members,auto_wait) ".
648 $ilDB->quote($this->
getId() ,
'integer').
", ".
650 $ilDB->quote((
int) $this->
getGroupType() ,
'integer').
", ".
674 $ilAppEventHandler->raise(
'Modules/Group',
676 array(
'object' => $this,
677 'obj_id' => $this->
getId(),
680 return $this->
getId();
688 global
$ilDB,$ilAppEventHandler;
690 if (!parent::update())
695 $query =
"UPDATE grp_settings ".
696 "SET information = ".$ilDB->quote($this->
getInformation() ,
'text').
", ".
697 "grp_type = ".$ilDB->quote((
int) $this->
getGroupType() ,
'integer').
", ".
703 "registration_password = ".$ilDB->quote($this->
getPassword() ,
'text').
", ".
705 "registration_mem_limit = ".$ilDB->quote((
int) $this->
isMembershipLimited() ,
'integer').
", ".
706 "registration_max_members = ".$ilDB->quote($this->
getMaxMembers() ,
'integer').
", ".
708 "latitude = ".$ilDB->quote($this->
getLatitude() ,
'text').
", ".
709 "longitude = ".$ilDB->quote($this->
getLongitude() ,
'text').
", ".
710 "location_zoom = ".$ilDB->quote($this->
getLocationZoom() ,
'integer').
", ".
714 'view_mode = '.$ilDB->quote($this->
getViewMode(),
'integer').
', '.
717 "registration_min_members = ".$ilDB->quote($this->
getMinMembers() ,
'integer').
", ".
719 "show_members = ".$ilDB->quote((
int) $this->
getShowMembers() ,
'integer').
" ".
720 "WHERE obj_id = ".$ilDB->quote($this->
getId() ,
'integer');
723 $ilAppEventHandler->raise(
'Modules/Group',
725 array(
'object' => $this,
726 'obj_id' => $this->
getId(),
739 public function delete()
741 global
$ilDB,$ilAppEventHandler;
744 if (!parent::delete())
749 $query =
"DELETE FROM grp_settings ".
750 "WHERE obj_id = ".$ilDB->quote($this->
getId() ,
'integer');
753 include_once(
'./Modules/Group/classes/class.ilGroupParticipants.php');
756 $ilAppEventHandler->raise(
'Modules/Group',
758 array(
'object' => $this,
759 'obj_id' => $this->
getId(),
776 $query =
"SELECT * FROM grp_settings ".
777 "WHERE obj_id = ".$ilDB->quote($this->
getId() ,
'integer');
808 include_once(
'./Services/Container/classes/class.ilContainerSortingSettings.php');
820 public function cloneObject($a_target_id,$a_copy_id = 0, $a_omit_tree =
false)
824 $new_obj = parent::cloneObject($a_target_id,$a_copy_id, $a_omit_tree);
847 include_once
'./Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
860 include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
866 include_once(
'./Modules/Group/classes/class.ilGroupParticipants.php');
869 $part->updateNotification($ilUser->getId(),$ilSetting->get(
'mail_grp_admin_notification',
true));
872 include_once(
'Services/Tracking/classes/class.ilLPObjSettings.php');
874 $obj_settings->cloneSettings($new_obj->getId());
875 unset($obj_settings);
897 parent::cloneDependencies($a_target_id,$a_copy_id);
899 include_once(
'Services/Object/classes/class.ilObjectActivation.php');
914 global $rbacadmin,$rbacreview;
917 $new_admin = $new_obj->getDefaultAdminRole();
918 if(!$admin || !$new_admin || !$this->
getRefId() || !$new_obj->getRefId())
922 $rbacadmin->copyRolePermissions($admin,$this->
getRefId(),$new_obj->getRefId(),$new_admin,
true);
926 $new_member = $new_obj->getDefaultMemberRole();
927 if(!$member || !$new_member)
931 $rbacadmin->copyRolePermissions($member,$this->
getRefId(),$new_obj->getRefId(),$new_member,
true);
941 function join($a_user_id, $a_mem_role=
"")
945 if (is_array($a_mem_role))
947 foreach ($a_mem_role as $role)
949 $rbacadmin->assignUser($role,$a_user_id,
false);
954 $rbacadmin->assignUser($a_mem_role,$a_user_id,
false);
968 return $local_group_Roles[
"il_grp_member_".$this->getRefId()];
979 return $local_group_Roles[
"il_grp_admin_".$this->getRefId()];
992 if (isset($a_user_id) && isset($a_mem_role) )
994 $this->
join($a_user_id,$a_mem_role);
999 $this->
ilias->raiseError(get_class($this).
"::addMember(): Missing parameters !",$this->
ilias->error_obj->WARNING);
1013 global $rbacadmin, $rbacreview;
1017 if (count($member_ids) <= 1 || !in_array($this->
ilias->account->getId(), $member_ids))
1025 $this->
leave($this->
ilias->account->getId());
1048 if (is_array($arr_groupRoles))
1050 foreach ($arr_groupRoles as $groupRole)
1052 $rbacadmin->deassignUser($groupRole, $a_user_id);
1057 $rbacadmin->deassignUser($arr_groupRoles, $a_user_id);
1071 global $rbacadmin, $rbacreview;
1077 foreach ($rol as $value)
1079 foreach ($rbacreview->assignedUsers($value) as $member_id)
1081 array_push($usr_arr,$member_id);
1085 $mem_arr = array_unique($usr_arr);
1087 return $mem_arr ? $mem_arr :
array();
1103 $q =
"SELECT login,firstname,lastname,title,usr_id,last_login ".
1107 if (is_numeric($active) && $active > -1)
1108 $q .=
"AND active = '$active'";
1110 $q .=
'ORDER BY lastname,firstname';
1112 $r = $ilDB->query($q);
1116 $mem_arr[] =
array(
"id" =>
$row->usr_id,
1117 "login" =>
$row->login,
1118 "firstname" =>
$row->firstname,
1119 "lastname" =>
$row->lastname,
1120 "last_login" =>
$row->last_login
1124 return $mem_arr ? $mem_arr :
array();
1142 if (!empty($a_grpId))
1154 foreach ($rbacreview->assignedUsers($this->getDefaultAdminRole()) as $member_id)
1156 array_push($usr_arr,$member_id);
1169 global $rbacadmin, $rbacreview;
1171 if (strlen($a_grp_id) > 0)
1173 $grp_id = $a_grp_id;
1180 $role_arr = $rbacreview->getRolesOfRoleFolder($grp_id);
1182 foreach ($role_arr as $role_id)
1184 $role_Obj =& $this->
ilias->obj_factory->getInstanceByObjId($role_id);
1186 $grp_Member =
"il_grp_member_".$grp_id;
1187 $grp_Admin =
"il_grp_admin_".$grp_id;
1189 if (strcmp($role_Obj->getTitle(), $grp_Member) == 0 )
1191 $arr_grpDefaultRoles[
"grp_member_role"] = $role_Obj->getId();
1194 if (strcmp($role_Obj->getTitle(), $grp_Admin) == 0)
1196 $arr_grpDefaultRoles[
"grp_admin_role"] = $role_Obj->getId();
1200 return $arr_grpDefaultRoles;
1211 global $rbacadmin,$rbacreview;
1213 if (empty($this->local_roles))
1215 $this->local_roles =
array();
1216 $role_arr = $rbacreview->getRolesOfRoleFolder($this->
getRefId());
1218 foreach ($role_arr as $role_id)
1220 if ($rbacreview->isAssignable($role_id,$this->getRefId()) ==
true)
1222 $role_Obj =& $this->
ilias->obj_factory->getInstanceByObjId($role_id);
1230 $role_name = $role_Obj->getTitle();
1233 $this->local_roles[$role_name] = $role_Obj->getId();
1238 return $this->local_roles;
1248 $q =
"SELECT obj_id FROM object_data WHERE type='rolt' AND title='il_grp_status_closed'";
1252 return $row[
"obj_id"];
1262 $q =
"SELECT obj_id FROM object_data WHERE type='rolt' AND title='il_grp_status_open'";
1266 return $row[
"obj_id"];
1279 $type = self::lookupGroupTye($a_obj_id);
1282 $query =
'SELECT obj_id FROM object_data WHERE type = '.$ilDB->quote(
'rolt',
'text').
' AND title = '.$ilDB->quote(
'il_grp_status_closed',
'text');
1286 $query =
'SELECT obj_id FROM object_data WHERE type = '.$ilDB->quote(
'rolt',
'text').
' AND title = '.$ilDB->quote(
'il_grp_status_open',
'text');
1291 return isset(
$row[
'obj_id']) ?
$row[
'obj_id'] : 0;
1307 global $tree,$rbacreview,$rbacadmin;
1309 $parent_roles = $rbacreview->getParentRoleIds($this->
getRefId());
1313 foreach($real_parent_roles as $role_id)
1316 $rbacadmin->deleteLocalRole($role_id,$this->
getRefId());
1318 $parent_roles = $rbacreview->getParentRoleIds($this->
getRefId());
1333 foreach($tree->getFilteredSubTree($this->getRefId(),
array(
'grp')) as $subnode)
1336 $template_ops = $rbacreview->getOperationsOfRole(
$template_id,$subnode[
'type'], ROLE_FOLDER_ID);
1339 foreach($real_parent_roles as $role_id)
1341 if($rbacreview->isProtected($parent_roles[$role_id][
'parent'],$role_id))
1346 $rbacadmin->deleteLocalRole($role_id,$subnode[
'child']);
1349 $current_ops = $rbacreview->getOperationsOfRole($role_id,$subnode[
'type'],$parent_roles[$role_id][
'parent']);
1352 $rbacadmin->revokePermission($subnode[
'child'],$role_id);
1356 foreach($template_ops as $operation)
1358 if(in_array($operation,$current_ops))
1360 $granted[] = $operation;
1365 $rbacadmin->grantPermission($role_id, $granted,$subnode[
'child']);
1371 $rbacadmin->copyRolePermissionIntersection(
1373 $role_id, $parent_roles[$role_id][
'parent'],
1374 $subnode[
"child"],$role_id);
1375 $rbacadmin->assignRoleToFolder($role_id,$subnode[
'child'],
"n");
1402 global $rbacadmin, $rbacreview, $rbacsystem;
1405 $arr_parentRoles = $rbacreview->getParentRoleIds($this->
getRefId());
1407 $real_local_roles = $rbacreview->getRolesOfRoleFolder($this->
getRefId(),
false);
1408 $arr_relevantParentRoleIds = array_diff(array_keys($arr_parentRoles),$real_local_roles);
1422 $template_ops = $rbacreview->getOperationsOfRole(
$template_id,
'grp', ROLE_FOLDER_ID);
1424 foreach ($arr_relevantParentRoleIds as $parentRole)
1426 if ($rbacreview->isProtected($arr_parentRoles[$parentRole][
'parent'],$parentRole))
1431 $granted_permissions =
array();
1440 $rbacadmin->deleteLocalRole($parentRole,$this->
getRefId());
1447 $current_ops = $rbacreview->getRoleOperationsOnObject($parentRole, $this->
getRefId());
1448 $rbacadmin->revokePermission($this->
getRefId(), $parentRole);
1449 foreach ($template_ops as $template_op)
1451 if (in_array($template_op,$current_ops))
1453 array_push($granted_permissions,$template_op);
1456 if (!empty($granted_permissions))
1458 $rbacadmin->grantPermission($parentRole, $granted_permissions, $this->
getRefId());
1466 $rbacadmin->copyRolePermissionIntersection(
1468 $parentRole, $arr_parentRoles[$parentRole][
'parent'],
1471 $rbacadmin->assignRoleToFolder($parentRole,$this->
getRefId(),
"false");
1485 $this->group_status = $a_status;
1497 return $this->group_status;
1507 global $rbacsystem,$rbacreview;
1509 $local_roles = $rbacreview->getRolesOfRoleFolder($this->
getRefId());
1515 foreach ($arr_globalRoles as $globalRole)
1517 if ($rbacsystem->checkPermission($this->getRefId(), $globalRole ,
"join"))
1534 global $rbacadmin, $rbacreview,
$ilBench;
1536 $ilBench->start(
"Group",
"getMemberRoles");
1538 $arr_assignedRoles =
array();
1540 $arr_assignedRoles = array_intersect($rbacreview->assignedRoles($a_user_id),$this->
getLocalGroupRoles());
1542 $ilBench->stop(
"Group",
"getMemberRoles");
1544 return $arr_assignedRoles;
1559 if (in_array($a_userId,$rbacreview->assignedUsers($grp_Roles[
"grp_admin_role"])))
1575 include_once
'./Services/AccessControl/classes/class.ilObjRole.php';
1578 "Groupadmin group obj_no.".$this->
getId(),
1582 $this->m_roleAdminId = $role->getId();
1585 'il_grp_member_'.$this->
getRefId(),
1586 "Groupmember of group obj_no.".$this->
getId(),
1590 $this->m_roleMemberId = $role->getId();
1606 $rbacadmin =
$GLOBALS[
'DIC']->rbac()->admin();
1607 $rbacreview =
$GLOBALS[
'DIC']->rbac()->review();
1609 $parent_roles = $rbacreview->getParentRoleIds($a_parent_ref);
1610 foreach((
array) $parent_roles as $parent_role)
1612 if($parent_role[
'parent'] == $this->
getRefId())
1616 if($rbacreview->isProtected($parent_role[
'parent'], $parent_role[
'rol_id']))
1618 $operations = $rbacreview->getOperationsOfRole(
1619 $parent_role[
'obj_id'],
1621 $parent_role[
'parent']
1623 $rbacadmin->grantPermission(
1624 $parent_role[
'obj_id'],
1631 $rbacadmin->initIntersectionPermissions(
1633 $parent_role[
'obj_id'],
1634 $parent_role[
'parent'],
1648 parent::applyDidacticTemplate($a_tpl_id);
1663 $query =
"SELECT * FROM object_data WHERE title = ".
1664 $ilDB->quote($a_title ,
'text').
" AND type = 'grp'";
1668 return $row->obj_id;
1676 global $rbacreview,$ilObjDataCache,
$ilDB;
1678 $local_roles = $rbacreview->getRolesOfRoleFolder($a_ref_id,
false);
1679 $user_roles = $rbacreview->assignedRoles($a_user_id);
1684 include_once
'./Services/User/classes/class.ilObjUser.php';
1690 $and =
"AND login = '".$tmp_user->getLogin().
"' ";
1693 $and =
"AND email = '".$tmp_user->getEmail().
"' ";
1695 case 'matriculation':
1696 $and =
"AND matriculation = '".$tmp_user->getMatriculation().
"' ";
1700 $and =
"AND usr_id = '".$a_user_id.
"'";
1707 $query =
"SELECT * FROM usr_data as ud ".
1712 return $res->numRows() ? true :
false;
1715 if (!array_intersect($local_roles,$user_roles))
1731 $local_roles = $rbacreview->getRolesOfRoleFolder(
$ref_id,
false);
1734 foreach($local_roles as $role_id)
1736 $users = array_merge($users,$rbacreview->assignedUsers($role_id));
1739 return array_unique($users);
1750 $view = (int) $this->view_mode;
1765 $this->view_mode = $a_view_mode;
1776 $query =
'SELECT view_mode FROM grp_settings '.
1777 'WHERE obj_id = '.$ilDB->quote($a_obj_id,
'integer');
1785 return self::translateViewMode($a_obj_id,
$view_mode);
1810 $a_ref_id = end($ref);
1813 $crs_ref = $tree->checkForParentType($a_ref_id,
'crs');
1819 include_once
'./Modules/Course/classes/class.ilObjCourse.php';
1832 return $a_view_mode;
1841 include_once
'./Services/Object/classes/class.ilObjectActivation.php';
1847 return $this->message;
1851 $this->message = $a_message;
1857 $this->message .=
"<br /> ";
1859 $this->message .= $a_message;
1871 include_once(
'./Services/Calendar/classes/class.ilCalendarAppointmentTemplate.php');
1883 $app->setSubtitle(
'grp_cal_reg_start');
1891 $app->setSubtitle(
'grp_cal_reg_end');
1914 include_once(
'./Modules/Group/classes/class.ilGroupParticipants.php');
1941 $query =
"SELECT obj_id FROM grp_settings ".
1942 "WHERE reg_ac_enabled = ".$ilDB->quote(1,
'integer').
" ".
1943 "AND reg_ac = ".$ilDB->quote($a_code,
'text');
1949 $obj_ids[] =
$row->obj_id;
1960 public function register($a_user_id,$a_role =
IL_GRP_MEMBER, $a_force_registration =
false)
1962 include_once
'./Services/Membership/exceptions/class.ilMembershipRegistrationException.php';
1963 include_once
"./Modules/Group/classes/class.ilGroupParticipants.php";
1966 if($part->isAssigned($a_user_id))
1971 if(!$a_force_registration)
1976 include_once
'./Modules/Group/classes/class.ilObjGroupAccess.php';
2002 $free = max(0,$this->
getMaxMembers() - $part->getCountMembers());
2003 include_once(
'./Modules/Group/classes/class.ilGroupWaitingList.php');
2007 $this->lng->loadLanguageModule(
"grp");
2010 $info = sprintf($this->lng->txt(
'grp_added_to_list'),
2014 include_once(
'./Modules/Group/classes/class.ilGroupParticipants.php');
2015 include_once(
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php');
2030 $part->add($a_user_id,$a_role);
2031 $part->sendNotification($part->TYPE_NOTIFICATION_REGISTRATION, $a_user_id);
2045 include_once(
'./Modules/Group/classes/class.ilGroupWaitingList.php');
2059 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
2073 public static function mayLeave($a_group_id, $a_user_id = null, &$a_date = null)
2079 $a_user_id = $ilUser->getId();
2082 $set = $ilDB->query(
"SELECT leave_end".
2083 " FROM grp_settings".
2084 " WHERE obj_id = ".$ilDB->quote($a_group_id,
"integer"));
2085 $row = $ilDB->fetchAssoc($set);
2089 $limit =
date(
"Ymd",
$row[
"leave_end"]);
2090 if($limit <
date(
"Ymd"))
2107 $tree =
$GLOBALS[
'DIC']->repositoryTree();
2111 $now =
date(
"Y-m-d H:i:s");
2113 include_once
"Modules/Group/classes/class.ilGroupParticipants.php";
2115 $set =
$ilDB->query(
"SELECT obj_id, registration_min_members".
2116 " FROM grp_settings".
2117 " WHERE registration_min_members > ".
$ilDB->quote(0,
"integer").
2118 " AND registration_mem_limit = ".$ilDB->quote(1,
"integer").
2119 " AND ((leave_end IS NOT NULL".
2120 " AND leave_end < ".$ilDB->quote($now,
"text").
")".
2121 " OR (leave_end IS NULL".
2122 " AND registration_end IS NOT NULL".
2123 " AND registration_end < ".$ilDB->quote($now,
"text").
"))" 2131 if($tree->isDeleted($ref))
2137 $reci = $part->getNotificationRecipients();
2140 $missing = (int)
$row[
"registration_min_members"]-$part->getCountMembers();
static lookupGroupStatusTemplateId($a_obj_id)
$ilDB $ilDB
setCancellationEnd(ilDate $a_value=null)
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
const ADDED_TO_WAITINGLIST
getDefaultMemberRole()
returns object id of created default member role public
$reg_membership_limitation
const GRP_REGISTRATION_DEACTIVATED
const TYPE_ACCEPTED_SUBSCRIPTION_MEMBER
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.
setParentRolePermissions($a_parent_ref)
This method is called before "initDefaultRoles".
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
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
getBigIconPath()
Get path for big icon.
setLongitude($a_longitude)
Set Longitude.
getLatitude()
Get Latitude.
const OUT_OF_REGISTRATION_PERIOD
getRegistrationAccessCode()
get access code
getTinyIconPath()
Get path for tiny icon.
const ERR_MISSING_GROUP_TYPE
Apointment templates are used for automatic generated apointments.
static _lookupViewMode($a_id)
lookup view mode of container
getViewMode()
Get container view mode.
initGroupStatus($a_grpStatus=GRP_TYPE_PUBLIC)
set group status
getEnableMap()
Type independent wrapper.
applyDidacticTemplate($a_tpl_id)
Apply template.
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 ...
static _getAllReferences($a_id)
get all reference ids of object
getGrpStatusOpenTemplateId()
get group status open template public
static createDefaultRole($a_title, $a_description, $a_tpl_name, $a_ref_id)
enableWaitingList($a_status)
enable waiting list
static findGroupsWithNotEnoughMembers()
Minimum members check $ilDB $ilDB.
setShowMembers($a_status)
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.
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.
const ERR_WRONG_REGISTRATION_LIMITED
getLocalGroupRoles($a_translate=false)
get ALL local roles of group, also those created and defined afterwards only fetch data once from dat...
prepareAppointments($a_mode='create')
Prepare calendar appointments.
const REGISTRATION_CODE_DISABLED
static _lookupObjId($a_id)
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
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
cloneObject($a_target_id, $a_copy_id=0, $a_omit_tree=false)
Clone group (no member data)
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
setGroupType($a_type)
set group type
getEnableGroupMap()
Get Enable Group Map.
getInformation()
get Information
setMinMembers($a_max)
set min members
leaveGroup()
is called when a member decides to leave group public
getType()
get object type public
setInformation($a_information)
set information
getGroupAdminIds($a_grpId="")
get Group Admin Id public
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
getMailToMembersType()
Get mail to members type.
static _getTranslation($a_role_title)
static _getInstanceByObjId($a_obj_id)
Get singleton instance.
Create styles array
The data for the language used.
setEnableGroupMap($a_enablemap)
Set Enable Group Map.
setGroupStatus($a_status)
Set group status.
getSmallIconPath()
Get path for small icon.
static _lookupIdByTitle($a_title)
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.
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
static getLogger($a_component_id)
Get component logger.
static _lookupSortMode($a_obj_id)
lookup sort mode
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
initDefaultRoles()
init default roles settings public
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.
_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