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);
132 public function __construct($a_id = 0, $a_call_by_reference =
true)
136 $tree = $DIC[
'tree'];
138 $this->tree = &
$tree;
154 $ilDB = $DIC[
'ilDB'];
156 $query =
"SELECT grp_type FROM grp_settings " .
157 "WHERE obj_id = " .
$ilDB->quote($a_id,
'integer');
160 return $row->grp_type;
175 $this->information = $a_information;
255 $this->reg_unlimited = $a_status;
278 $this->reg_start = $a_start;
302 $this->reg_end = $a_end;
324 $this->reg_password = $a_pass;
347 $this->reg_membership_limitation = $a_status;
369 $this->reg_min_members = $a_max;
391 $this->reg_max_members = $a_max;
414 $this->waiting_list = $a_status;
431 $this->auto_fill_from_waiting = (bool) $a_value;
446 $this->latitude = $a_latitude;
466 $this->longitude = $a_longitude;
486 $this->locationzoom = $a_locationzoom;
506 $this->enablemap = $a_enablemap;
544 $this->reg_access_code = $a_code;
563 $this->reg_access_code_enabled = $a_status;
587 $this->leave_end = $a_value;
597 $this->show_members = $a_status;
609 $this->auto_notification = $a_status;
630 (
$end instanceof \ilDate && !
$start instanceof ilDate)
635 if (
$start instanceof \ilDate) {
649 $this->start_time_indication = $time_indication;
657 return $this->start_time_indication;
666 $this->grp_start = $a_value;
674 return $this->grp_start;
682 $this->grp_end = $a_value;
690 return $this->grp_end;
709 $ilErr->appendMessage($this->lng->txt(self::ERR_MISSING_TITLE));
712 $ilErr->appendMessage($this->lng->txt(self::ERR_MISSING_PASSWORD));
722 $ilErr->appendMessage($this->lng->txt(self::ERR_MISSING_MIN_MAX_MEMBERS));
725 $ilErr->appendMessage($this->lng->txt(self::ERR_WRONG_MAX_MEMBERS));
728 $ilErr->appendMessage($this->lng->txt(self::ERR_WRONG_MIN_MAX_MEMBERS));
736 $ilErr->appendMessage($this->lng->txt((self::ERR_WRONG_REGISTRATION_LIMITED)));
739 return strlen(
$ilErr->getMessage()) == 0;
752 $ilDB = $DIC[
'ilDB'];
753 $ilAppEventHandler = $DIC[
'ilAppEventHandler'];
755 if (!parent::create()) {
764 $query =
"INSERT INTO grp_settings (obj_id,information,grp_type,registration_type,registration_enabled," .
765 "registration_unlimited,registration_start,registration_end,registration_password,registration_mem_limit," .
766 "registration_max_members,waiting_list,latitude,longitude,location_zoom,enablemap,reg_ac_enabled,reg_ac,view_mode,mail_members_type," .
767 "leave_end,registration_min_members,auto_wait, grp_start, grp_end, auto_notification) " .
769 $ilDB->quote($this->
getId(),
'integer') .
", " .
787 $ilDB->quote($this->view_mode,
'integer') .
', ' .
798 $ilAppEventHandler->raise(
801 array(
'object' => $this,
802 'obj_id' => $this->
getId(),
806 return $this->
getId();
816 $ilDB = $DIC[
'ilDB'];
817 $ilAppEventHandler = $DIC[
'ilAppEventHandler'];
819 if (!parent::update()) {
823 $query =
"UPDATE grp_settings " .
831 "registration_password = " .
$ilDB->quote($this->
getPassword(),
'text') .
", " .
834 "registration_max_members = " .
$ilDB->quote($this->
getMaxMembers(),
'integer') .
", " .
842 'view_mode = ' .
$ilDB->quote($this->view_mode,
'integer') .
', ' .
845 "registration_min_members = " .
$ilDB->quote($this->
getMinMembers(),
'integer') .
", " .
852 "WHERE obj_id = " .
$ilDB->quote($this->
getId(),
'integer');
855 $ilAppEventHandler->raise(
858 array(
'object' => $this,
859 'obj_id' => $this->
getId(),
873 public function delete()
877 $ilDB = $DIC[
'ilDB'];
878 $ilAppEventHandler = $DIC[
'ilAppEventHandler'];
881 if (!parent::delete()) {
885 $query =
"DELETE FROM grp_settings " .
886 "WHERE obj_id = " .
$ilDB->quote($this->
getId(),
'integer');
889 include_once(
'./Modules/Group/classes/class.ilGroupParticipants.php');
892 $ilAppEventHandler->raise(
895 array(
'object' => $this,
896 'obj_id' => $this->
getId(),
912 $ilDB = $DIC[
'ilDB'];
916 $query =
"SELECT * FROM grp_settings " .
917 "WHERE obj_id = " .
$ilDB->quote($this->
getId(),
'integer');
944 if ($row->period_time_indication) {
949 } elseif (!is_null($row->period_start) && !is_null($row->period_end)) {
960 include_once(
'./Services/Container/classes/class.ilContainerSortingSettings.php');
972 public function cloneObject($a_target_id, $a_copy_id = 0, $a_omit_tree =
false)
976 $ilDB = $DIC[
'ilDB'];
980 $new_obj = parent::cloneObject($a_target_id, $a_copy_id, $a_omit_tree);
984 $new_obj->applyDidacticTemplate($current_template);
1005 include_once
'./Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
1008 $new_obj->setViewMode($this->view_mode);
1019 include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
1023 include_once(
'./Modules/Group/classes/class.ilGroupParticipants.php');
1026 $part->updateNotification(
$ilUser->getId(),
$ilSetting->get(
'mail_grp_admin_notification',
true));
1027 $part->updateContact(
$ilUser->getId(),
true);
1030 include_once(
'Services/Tracking/classes/class.ilLPObjSettings.php');
1032 $obj_settings->cloneSettings($new_obj->getId());
1033 unset($obj_settings);
1050 $tree = $DIC[
'tree'];
1052 parent::cloneDependencies($a_target_id, $a_copy_id);
1054 include_once(
'Services/Object/classes/class.ilObjectActivation.php');
1060 $grouping = new \ilObjCourseGrouping($grouping_id);
1061 $grouping->cloneGrouping($a_target_id, $a_copy_id);
1082 $new_admin = $new_obj->getDefaultAdminRole();
1083 if (!$admin || !$new_admin || !$this->
getRefId() || !$new_obj->getRefId()) {
1086 $rbacadmin->copyRolePermissions($admin, $this->
getRefId(), $new_obj->getRefId(), $new_admin,
true);
1090 $new_member = $new_obj->getDefaultMemberRole();
1091 if (!$member || !$new_member) {
1094 $rbacadmin->copyRolePermissions($member, $this->
getRefId(), $new_obj->getRefId(), $new_member,
true);
1104 public function join($a_user_id, $a_mem_role =
"")
1110 if (is_array($a_mem_role)) {
1111 foreach ($a_mem_role as $role) {
1112 $rbacadmin->assignUser($role, $a_user_id,
false);
1115 $rbacadmin->assignUser($a_mem_role, $a_user_id,
false);
1129 return $local_group_Roles[
"il_grp_member_" . $this->
getRefId()];
1140 return $local_group_Roles[
"il_grp_admin_" . $this->
getRefId()];
1155 if (isset($a_user_id) && isset($a_mem_role)) {
1156 $this->
join($a_user_id, $a_mem_role);
1159 $this->
ilias->raiseError(get_class($this) .
"::addMember(): Missing parameters !", $this->
ilias->error_obj->WARNING);
1180 if (count($member_ids) <= 1 || !in_array($this->
ilias->account->getId(), $member_ids)) {
1184 $this->
leave($this->
ilias->account->getId());
1185 $this->recommended_content_manager->removeObjectRecommendation($this->
user->getId(), $this->
getRefId());
1206 if (is_array($arr_groupRoles)) {
1207 foreach ($arr_groupRoles as $groupRole) {
1208 $rbacadmin->deassignUser($groupRole, $a_user_id);
1211 $rbacadmin->deassignUser($arr_groupRoles, $a_user_id);
1234 foreach ($rol as $value) {
1235 foreach (
$rbacreview->assignedUsers($value) as $member_id) {
1236 array_push($usr_arr, $member_id);
1240 $mem_arr = array_unique($usr_arr);
1242 return $mem_arr ? $mem_arr : array();
1259 $ilDB = $DIC[
'ilDB'];
1263 $q =
"SELECT login,firstname,lastname,title,usr_id,last_login " .
1267 if (is_numeric($active) && $active > -1) {
1268 $q .=
"AND active = '$active'";
1271 $q .=
'ORDER BY lastname,firstname';
1273 $r =
$ilDB->query($q);
1276 $mem_arr[] = array(
"id" => $row->usr_id,
1277 "login" => $row->login,
1278 "firstname" => $row->firstname,
1279 "lastname" => $row->lastname,
1280 "last_login" => $row->last_login
1284 return $mem_arr ? $mem_arr : array();
1304 if (!empty($a_grpId)) {
1313 foreach (
$rbacreview->assignedUsers($this->getDefaultAdminRole()) as $member_id) {
1314 array_push($usr_arr, $member_id);
1332 if (strlen($a_grp_id) > 0) {
1333 $grp_id = $a_grp_id;
1338 $role_arr =
$rbacreview->getRolesOfRoleFolder($grp_id);
1340 foreach ($role_arr as $role_id) {
1341 $role_Obj = &$this->
ilias->obj_factory->getInstanceByObjId($role_id);
1343 $grp_Member =
"il_grp_member_" . $grp_id;
1344 $grp_Admin =
"il_grp_admin_" . $grp_id;
1346 if (strcmp($role_Obj->getTitle(), $grp_Member) == 0) {
1347 $arr_grpDefaultRoles[
"grp_member_role"] = $role_Obj->getId();
1350 if (strcmp($role_Obj->getTitle(), $grp_Admin) == 0) {
1351 $arr_grpDefaultRoles[
"grp_admin_role"] = $role_Obj->getId();
1355 return $arr_grpDefaultRoles;
1371 if (empty($this->local_roles)) {
1372 $this->local_roles = array();
1375 foreach ($role_arr as $role_id) {
1376 if (
$rbacreview->isAssignable($role_id, $this->getRefId()) ==
true) {
1377 $role_Obj = &$this->
ilias->obj_factory->getInstanceByObjId($role_id);
1382 $role_name = $role_Obj->getTitle();
1385 $this->local_roles[$role_name] = $role_Obj->getId();
1390 return $this->local_roles;
1400 $q =
"SELECT obj_id FROM object_data WHERE type='rolt' AND title='il_grp_status_closed'";
1404 return $row[
"obj_id"];
1414 $q =
"SELECT obj_id FROM object_data WHERE type='rolt' AND title='il_grp_status_open'";
1418 return $row[
"obj_id"];
1431 $ilDB = $DIC[
'ilDB'];
1433 $type = self::lookupGroupTye($a_obj_id);
1435 $query =
'SELECT obj_id FROM object_data WHERE type = ' .
$ilDB->quote(
'rolt',
'text') .
' AND title = ' .
$ilDB->quote(
'il_grp_status_closed',
'text');
1437 $query =
'SELECT obj_id FROM object_data WHERE type = ' .
$ilDB->quote(
'rolt',
'text') .
' AND title = ' .
$ilDB->quote(
'il_grp_status_open',
'text');
1442 return isset($row[
'obj_id']) ? $row[
'obj_id'] : 0;
1460 $logger = $DIC->logger()->grp();
1468 foreach ($templates as $template) {
1470 if ($template->isAutoGenerated()) {
1471 $logger->info(
'Appying default closed template');
1476 $logger->warning(
'No closed didactic template available.');
1489 $this->group_status = $a_status;
1501 return $this->group_status;
1514 $logger = $DIC->logger()->grp();
1515 $logger->dump($tpl_id);
1536 $ilBench->start(
"Group",
"getMemberRoles");
1538 $arr_assignedRoles = array();
1542 $ilBench->stop(
"Group",
"getMemberRoles");
1544 return $arr_assignedRoles;
1561 if (in_array($a_userId,
$rbacreview->assignedUsers($grp_Roles[
"grp_admin_role"]))) {
1574 include_once
'./Services/AccessControl/classes/class.ilObjRole.php';
1576 'il_grp_admin_' . $this->
getRefId(),
1577 "Groupadmin group obj_no." . $this->
getId(),
1581 $this->m_roleAdminId = $role->getId();
1584 'il_grp_member_' . $this->
getRefId(),
1585 "Groupmember of group obj_no." . $this->
getId(),
1589 $this->m_roleMemberId = $role->getId();
1608 $parent_roles =
$rbacreview->getParentRoleIds($a_parent_ref);
1609 foreach ((array) $parent_roles as $parent_role) {
1610 if ($parent_role[
'parent'] == $this->
getRefId()) {
1613 if (
$rbacreview->isProtected($parent_role[
'parent'], $parent_role[
'rol_id'])) {
1615 $parent_role[
'obj_id'],
1617 $parent_role[
'parent']
1620 $parent_role[
'obj_id'],
1629 $parent_role[
'obj_id'],
1630 $parent_role[
'parent'],
1644 parent::applyDidacticTemplate($a_tpl_id);
1657 $ilDB = $DIC[
'ilDB'];
1659 $query =
"SELECT * FROM object_data WHERE title = " .
1660 $ilDB->quote($a_title,
'text') .
" AND type = 'grp'";
1663 return $row->obj_id;
1669 public function _isMember($a_user_id, $a_ref_id, $a_field =
'')
1674 $ilObjDataCache = $DIC[
'ilObjDataCache'];
1675 $ilDB = $DIC[
'ilDB'];
1677 $local_roles =
$rbacreview->getRolesOfRoleFolder($a_ref_id,
false);
1678 $user_roles =
$rbacreview->assignedRoles($a_user_id);
1682 include_once
'./Services/User/classes/class.ilObjUser.php';
1687 $and =
"AND login = '" . $tmp_user->getLogin() .
"' ";
1690 $and =
"AND email = '" . $tmp_user->getEmail() .
"' ";
1692 case 'matriculation':
1693 $and =
"AND matriculation = '" . $tmp_user->getMatriculation() .
"' ";
1697 $and =
"AND usr_id = '" . $a_user_id .
"'";
1703 $query =
"SELECT * FROM usr_data as ud " .
1708 return $res->numRows() ? true :
false;
1711 if (!array_intersect($local_roles, $user_roles)) {
1731 foreach ($local_roles as $role_id) {
1732 $users = array_merge($users,
$rbacreview->assignedUsers($role_id));
1735 return array_unique($users);
1747 $view = self::lookupViewMode($this->
getId());
1753 $container_ref_id =
$tree->checkForParentType($this->ref_id,
'crs');
1754 if ($container_ref_id) {
1774 $this->view_mode = $a_view_mode;
1785 $ilDB = $DIC[
'ilDB'];
1787 $query =
'SELECT view_mode FROM grp_settings ' .
1788 'WHERE obj_id = ' .
$ilDB->quote($a_obj_id,
'integer');
1809 $tree = $DIC[
'tree'];
1811 if (!$a_view_mode) {
1819 $a_ref_id = end($ref);
1822 $crs_ref =
$tree->checkForParentType($a_ref_id,
'crs');
1827 include_once
'./Modules/Course/classes/class.ilObjCourse.php';
1839 return $a_view_mode;
1848 include_once
'./Services/Object/classes/class.ilObjectActivation.php';
1858 $this->message = $a_message;
1863 $this->message .=
"<br /> ";
1865 $this->message .= $a_message;
1877 include_once(
'./Services/Calendar/classes/class.ilCalendarAppointmentTemplate.php');
1887 $app->setSubtitle(
'grp_cal_start');
1896 $app->setSubtitle(
'grp_cal_end');
1909 $app->setSubtitle(
'grp_cal_reg_start');
1917 $app->setSubtitle(
'grp_cal_reg_end');
1941 include_once(
'./Modules/Group/classes/class.ilGroupParticipants.php');
1967 $ilDB = $DIC[
'ilDB'];
1969 $query =
"SELECT obj_id FROM grp_settings " .
1970 "WHERE reg_ac_enabled = " .
$ilDB->quote(1,
'integer') .
" " .
1971 "AND reg_ac = " .
$ilDB->quote($a_code,
'text');
1976 $obj_ids[] = $row->obj_id;
1987 public function register($a_user_id, $a_role =
IL_GRP_MEMBER, $a_force_registration =
false)
1989 include_once
'./Services/Membership/exceptions/class.ilMembershipRegistrationException.php';
1990 include_once
"./Modules/Group/classes/class.ilGroupParticipants.php";
1993 if ($part->isAssigned($a_user_id)) {
1997 if (!$a_force_registration) {
2000 include_once
'./Modules/Group/classes/class.ilObjGroupAccess.php';
2022 $free = max(0, $this->
getMaxMembers() - $part->getCountMembers());
2023 include_once(
'./Modules/Group/classes/class.ilGroupWaitingList.php');
2026 $this->lng->loadLanguageModule(
"grp");
2030 $this->lng->txt(
'grp_added_to_list'),
2035 include_once(
'./Modules/Group/classes/class.ilGroupParticipants.php');
2036 include_once(
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php');
2050 $part->add($a_user_id, $a_role);
2064 include_once(
'./Modules/Group/classes/class.ilGroupWaitingList.php');
2075 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
2088 public static function mayLeave($a_group_id, $a_user_id = null, &$a_date = null)
2093 $ilDB = $DIC[
'ilDB'];
2096 $a_user_id =
$ilUser->getId();
2099 $set =
$ilDB->query(
"SELECT leave_end" .
2100 " FROM grp_settings" .
2101 " WHERE obj_id = " .
$ilDB->quote($a_group_id,
"integer"));
2102 $row =
$ilDB->fetchAssoc($set);
2103 if ($row && $row[
"leave_end"]) {
2105 $limit = date(
"Ymd", $row[
"leave_end"]);
2106 if ($limit < date(
"Ymd")) {
2126 $now = date(
"Y-m-d H:i:s");
2133 $set =
$ilDB->query($q =
"SELECT obj_id, registration_min_members" .
2134 " FROM grp_settings" .
2135 " WHERE registration_min_members > " .
$ilDB->quote(0,
"integer") .
2136 " AND registration_mem_limit = " .
$ilDB->quote(1,
"integer") .
2137 " AND ((leave_end IS NOT NULL" .
2138 " AND leave_end < " .
$ilDB->quote($now,
"integer") .
")" .
2139 " OR (leave_end IS NULL" .
2140 " AND registration_end IS NOT NULL" .
2141 " AND registration_end < " .
$ilDB->quote($now_date,
"text") .
"))" .
2142 " AND (period_start IS NULL OR period_start > " .
$ilDB->quote($now,
"integer") .
")");
2143 while ($row =
$ilDB->fetchAssoc($set)) {
2147 if (
$tree->isDeleted($ref)) {
2152 $reci = $part->getNotificationRecipients();
2153 if (
sizeof($reci)) {
2154 $missing = (int) $row[
"registration_min_members"] - $part->getCountMembers();
2156 $res[$row[
"obj_id"]] = array($missing, $reci);
2167 $ilDB = $DIC[
"ilDB"];
2168 $query =
'SELECT show_members FROM grp_settings' 2169 .
' WHERE obj_id = '.
$ilDB->quote($a_obj_id,
'integer');
2175 return (
bool)$row[
'show_members'];
static lookupTemplateId($a_ref_id)
Lookup template id ilDB $ilDB.
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
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
static convertDateToUtcDBTimestamp(\ilDateTime $date=null)
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
createMetaData()
create meta data entry
setEnd(ilDateTime $a_value=null)
setLongitude($a_longitude)
Set Longitude.
getLatitude()
Get Latitude.
const OUT_OF_REGISTRATION_PERIOD
getRegistrationAccessCode()
get access code
const ERR_MISSING_GROUP_TYPE
Apointment templates are used for automatic generated apointments.
toggleStartTimeIndication(bool $time_indication)
static _lookupViewMode($a_id)
lookup view mode of container
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)
updateGroupType($a_group_type=GRP_TYPE_OPEN)
Change group type.
enableWaitingList($a_status)
enable waiting list
const TYPE_NOTIFICATION_REGISTRATION
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.
static lookupShowMembersEnabled(int $a_obj_id)
foreach($_POST as $key=> $value) $res
getId()
get object id public
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)
enableMembershipLimitation($a_status)
enable max member limitation
getLocationZoom()
Get LocationZoom.
setPassword($a_pass)
set password
setViewMode($a_view_mode)
Set group view mode.
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_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) ...
cloneMetaData($target_obj)
Copy meta data.
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
setPeriod(\ilDateTime $start=null, \ilDateTime $end=null)
getMailToMembersType()
Get mail to members type.
static _getTranslation($a_role_title)
static _getInstanceByObjId($a_obj_id)
Get singleton instance.
setEnableGroupMap($a_enablemap)
Set Enable Group Map.
setGroupStatus($a_status)
Set group status.
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.
static getInstanceByObjectType($a_obj_type)
Get instance by obj type.
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.
__construct(Container $dic, ilPlugin $plugin)
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
initDefaultRoles()
init default roles settings public
const TYPE_ADMISSION_MEMBER
static _getGroupings($a_course_id)
setMailToMembersType($a_type)
Set mail to members type.
setAutoNotification(bool $a_status)
const GRP_REGISTRATION_DIRECT
static lookupViewMode($a_obj_id)
lookup view mode $ilDB
setStart(ilDateTime $a_value=null)
getViewMode()
Get effective container view mode.
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()
Read group type.
getMinMembers()
get min members
isWaitingListEnabled()
is waiting list enabled
static _lookupViewMode($a_id)
Lookup view mode.
isAdmin($a_userId)
is Admin public
const ERR_WRONG_REG_TIME_LIMIT
$grp_start_time_indication