19declare(strict_types=1);
102 public function __construct(
int $a_id = 0,
bool $a_call_by_reference =
true)
108 $this->tree = &
$tree;
113 $this->
logger = $DIC->logger()->grp();
122 $query =
"SELECT grp_type FROM grp_settings " .
123 "WHERE obj_id = " .
$ilDB->quote($a_id,
'integer');
126 return (
int) $row->grp_type;
133 $this->information = $a_information;
143 $this->group_type = $a_type;
153 $this->reg_type = $a_type;
168 $this->reg_unlimited = $a_status;
178 $this->reg_start = $a_start;
189 $this->reg_end = $a_end;
199 $this->reg_password = $a_pass;
209 $this->reg_membership_limitation = $a_status;
219 $this->reg_min_members = $a_max;
229 $this->reg_max_members = $a_max;
239 $this->waiting_list = $a_status;
249 $this->auto_fill_from_waiting = $a_value;
259 $this->latitude = $a_latitude;
269 $this->longitude = $a_longitude;
279 $this->locationzoom = $a_locationzoom;
289 $this->enablemap = $a_enablemap;
309 $this->reg_access_code = $a_code;
319 $this->reg_access_code_enabled = $a_status;
324 $this->mail_members = $a_type;
334 $this->leave_end = $a_value;
344 $this->show_members = $a_status;
353 $this->auto_notification = $a_status;
364 ($start instanceof \
ilDate && !$end instanceof
ilDate) ||
367 throw new InvalidArgumentException(
'Different date types not supported.');
370 if ($start instanceof \
ilDate) {
381 $this->start_time_indication = $time_indication;
392 $this->grp_start = $a_value;
402 $this->grp_end = $a_value;
412 $this->session_limit = $a_status;
422 $this->session_prev = $a_num;
432 $this->session_next = $a_num;
448 $this->
error->appendMessage($this->
lng->txt(self::ERR_MISSING_TITLE));
451 $this->
error->appendMessage($this->
lng->txt(self::ERR_MISSING_PASSWORD));
455 $this->
error->appendMessage($this->
lng->txt(self::ERR_MISSING_MIN_MAX_MEMBERS));
458 $this->
error->appendMessage($this->
lng->txt(self::ERR_WRONG_MAX_MEMBERS));
461 $this->
error->appendMessage($this->
lng->txt(self::ERR_WRONG_MIN_MAX_MEMBERS));
469 $this->
error->appendMessage($this->
lng->txt((self::ERR_WRONG_REGISTRATION_LIMITED)));
471 return strlen($this->
error->getMessage()) == 0;
482 if (!parent::create()) {
487 $query =
"INSERT INTO grp_settings (obj_id,information,grp_type,registration_type,registration_enabled," .
488 "registration_unlimited,registration_start,registration_end,registration_password,registration_mem_limit," .
489 "registration_max_members,waiting_list,latitude,longitude,location_zoom,enablemap,reg_ac_enabled,reg_ac,view_mode,mail_members_type," .
490 "leave_end,registration_min_members,auto_wait, grp_start, grp_end, auto_notification, session_limit, session_prev, session_next) " .
492 $this->db->quote($this->
getId(),
'integer') .
", " .
494 $this->db->quote($this->
getGroupType(),
'integer') .
", " .
500 $this->db->quote($this->
getPassword(),
'text') .
", " .
504 $this->db->quote($this->
getLatitude(),
'text') .
", " .
505 $this->db->quote($this->
getLongitude(),
'text') .
", " .
510 $this->db->quote($this->view_mode,
'integer') .
', ' .
524 $this->app_event_handler->raise(
527 array(
'object' => $this,
528 'obj_id' => $this->
getId(),
531 return $this->
getId();
539 if (!parent::update()) {
545 $query =
"UPDATE grp_settings " .
546 "SET information = " . $this->db->quote($this->
getInformation(),
'text') .
", " .
547 "grp_type = " . $this->db->quote($this->
getGroupType(),
'integer') .
", " .
548 "registration_type = " . $this->db->quote($this->
getRegistrationType(),
'integer') .
", " .
549 "registration_enabled = " . $this->db->quote($this->
isRegistrationEnabled() ? 1 : 0,
'integer') .
", " .
553 "registration_password = " . $this->db->quote($this->
getPassword(),
'text') .
", " .
555 "registration_mem_limit = " . $this->db->quote((
int) $this->
isMembershipLimited(),
'integer') .
", " .
556 "registration_max_members = " . $this->db->quote($this->
getMaxMembers(),
'integer') .
", " .
558 "latitude = " . $this->db->quote($this->
getLatitude(),
'text') .
", " .
559 "longitude = " . $this->db->quote($this->
getLongitude(),
'text') .
", " .
560 "location_zoom = " . $this->db->quote($this->
getLocationZoom(),
'integer') .
", " .
561 "enablemap = " . $this->db->quote((
int) $this->
getEnableGroupMap(),
'integer') .
", " .
564 'view_mode = ' . $this->db->quote($this->view_mode,
'integer') .
', ' .
567 "registration_min_members = " . $this->db->quote($this->
getMinMembers(),
'integer') .
", " .
569 "show_members = " . $this->db->quote((
int) $this->
getShowMembers(),
'integer') .
", " .
577 "WHERE obj_id = " . $this->db->quote($this->
getId(),
'integer');
580 $this->app_event_handler->raise(
583 array(
'object' => $this,
584 'obj_id' => $this->
getId(),
593 public function delete():
bool
596 if (!parent::delete()) {
602 $query =
"DELETE FROM grp_settings " .
603 "WHERE obj_id = " . $this->db->quote($this->
getId(),
'integer');
608 $this->app_event_handler->raise(
611 array(
'object' => $this,
612 'obj_id' => $this->
getId(),
626 $query =
"SELECT * FROM grp_settings " .
627 "WHERE obj_id = " . $this->db->quote($this->
getId(),
'integer');
637 $this->
setPassword((
string) $row->registration_password);
654 if ($row->period_time_indication) {
659 } elseif (!is_null($row->period_start) && !is_null($row->period_end)) {
679 public function cloneObject(
int $a_target_id,
int $a_copy_id = 0,
bool $a_omit_tree =
false): ?
ilObject
684 $new_obj = parent::cloneObject($a_target_id, $a_copy_id, $a_omit_tree);
688 $new_obj->applyDidacticTemplate($current_template);
711 $new_obj->setViewMode($this->view_mode);
730 $part->updateNotification($this->
user->getId(), (
bool) $this->setting->get(
'mail_grp_admin_notification',
"1"));
731 $part->updateContact($this->
user->getId(),
true);
735 $obj_settings->cloneSettings($new_obj->getId());
736 unset($obj_settings);
745 parent::cloneDependencies($a_target_id, $a_copy_id);
751 $this->
logger->info(
'Handling grouping id: ' . $grouping_id);
752 $grouping = new \ilObjCourseGrouping($grouping_id);
753 $grouping->cloneGrouping($a_target_id, $a_copy_id);
765 if (!$admin || !$new_admin || !$this->
getRefId() || !$new_obj->
getRefId()) {
766 $this->
logger->warning(
'Error cloning auto generated rol: il_grp_admin');
768 $this->rbac_admin->copyRolePermissions($admin, $this->
getRefId(), $new_obj->
getRefId(), $new_admin,
true);
769 $this->
logger->info(
'Finished copying of role il_grp_admin.');
773 if (!$member || !$new_member) {
774 $this->
logger->warning(
'Error cloning auto generated rol: il_grp_member');
776 $this->rbac_admin->copyRolePermissions($member, $this->
getRefId(), $new_obj->
getRefId(), $new_member,
true);
777 $this->
logger->info(
'Finished copying of role il_grp_member.');
787 return $local_group_Roles[
"il_grp_member_" . $this->
getRefId()];
796 return $local_group_Roles[
"il_grp_admin_" . $this->
getRefId()];
802 if (count($member_ids) <= 1 || !in_array($this->
user->getId(), $member_ids)) {
806 $this->recommended_content_manager->removeObjectRecommendation($this->
user->getId(), $this->getRefId());
817 public function leave(
int $a_user_id): bool
820 foreach ($arr_groupRoles as $groupRole) {
821 $this->rbac_admin->deassignUser($groupRole, $a_user_id);
836 foreach ($rol as $value) {
837 foreach ($this->rbac_review->assignedUsers($value) as $member_id) {
838 array_push($usr_arr, $member_id);
841 return array_unique($usr_arr);
851 $q =
"SELECT login,firstname,lastname,title,usr_id,last_login " .
855 if (is_numeric($active) && $active > -1) {
856 $q .=
"AND active = '$active'";
859 $q .=
'ORDER BY lastname,firstname';
861 $r = $this->db->query($q);
864 $mem_arr[] = array(
"id" => (
int) $row->usr_id,
865 "login" => $row->login,
866 "firstname" => $row->firstname,
867 "lastname" => $row->lastname,
868 "last_login" => $row->last_login
882 if (!empty($a_grpId)) {
891 foreach ($this->rbac_review->assignedUsers($this->getDefaultAdminRole()) as $member_id) {
892 array_push($usr_arr, $member_id);
904 $role_arr = $this->rbac_review->getRolesOfRoleFolder($grp_id);
905 $arr_grpDefaultRoles = [];
906 foreach ($role_arr as $role_id) {
908 $grp_Member =
"il_grp_member_" . $grp_id;
909 $grp_Admin =
"il_grp_admin_" . $grp_id;
911 if (strcmp($role->getTitle(), $grp_Member) == 0) {
912 $arr_grpDefaultRoles[
"grp_member_role"] = $role->getId();
915 if (strcmp($role->getTitle(), $grp_Admin) == 0) {
916 $arr_grpDefaultRoles[
"grp_admin_role"] = $role->getId();
919 return $arr_grpDefaultRoles;
929 if (empty($this->local_roles)) {
930 $this->local_roles = array();
931 $role_arr = $this->rbac_review->getRolesOfRoleFolder($this->
getRefId());
933 foreach ($role_arr as $role_id) {
934 if ($this->rbac_review->isAssignable($role_id, $this->getRefId()) ==
true) {
939 $role_name = $role->getTitle();
941 $this->local_roles[$role_name] = $role->getId();
945 return $this->local_roles;
953 $q =
"SELECT obj_id FROM object_data WHERE type='rolt' AND title='il_grp_status_closed'";
957 return (
int) $row[
"obj_id"];
965 $q =
"SELECT obj_id FROM object_data WHERE type='rolt' AND title='il_grp_status_open'";
969 return (
int) $row[
"obj_id"];
980 $query =
'SELECT obj_id FROM object_data WHERE type = ' .
$ilDB->quote(
'rolt',
'text') .
' AND title = ' .
$ilDB->quote(
'il_grp_status_closed',
'text');
982 $query =
'SELECT obj_id FROM object_data WHERE type = ' .
$ilDB->quote(
'rolt',
'text') .
' AND title = ' .
$ilDB->quote(
'il_grp_status_open',
'text');
986 return $row[
'obj_id'] ? (
int) $row[
'obj_id'] : 0;
1004 foreach ($templates as $template) {
1006 if ($template->isAutoGenerated()) {
1007 $this->
logger->info(
'Appying default closed template');
1012 $this->
logger->warning(
'No closed didactic template available.');
1018 $this->group_status = $a_status;
1026 return $this->group_status;
1044 return array_intersect(
1045 $this->rbac_review->assignedRoles($a_user_id),
1046 $this->getLocalGroupRoles()
1052 $grp_Roles = $this->getDefaultGroupRoles();
1053 if (in_array($a_userId, $this->rbac_review->assignedUsers($grp_Roles[
"grp_admin_role"]))) {
1065 'il_grp_admin_' . $this->getRefId(),
1066 "Groupadmin group obj_no." . $this->
getId(),
1070 $this->m_roleAdminId = $role->getId();
1073 'il_grp_member_' . $this->getRefId(),
1074 "Groupmember of group obj_no." . $this->
getId(),
1078 $this->m_roleMemberId = $role->getId();
1091 $parent_roles = $this->rbac_review->getParentRoleIds($a_parent_ref);
1092 foreach ($parent_roles as $parent_role) {
1093 if ($parent_role[
'parent'] == $this->getRefId()) {
1096 if ($this->rbac_review->isProtected((
int) $parent_role[
'parent'], (
int) $parent_role[
'rol_id'])) {
1097 $operations = $this->rbac_review->getOperationsOfRole(
1098 (
int) $parent_role[
'obj_id'],
1100 (
int) $parent_role[
'parent']
1102 $this->rbac_admin->grantPermission(
1103 (
int) $parent_role[
'obj_id'],
1110 $this->rbac_admin->initIntersectionPermissions(
1112 (
int) $parent_role[
'obj_id'],
1113 (
int) $parent_role[
'parent'],
1114 $this->getGrpStatusOpenTemplateId(),
1127 parent::applyDidacticTemplate($a_tpl_id);
1131 $this->setParentRolePermissions($this->getRefId());
1141 $query =
"SELECT * FROM object_data WHERE title = " .
1142 $ilDB->quote($a_title,
'text') .
" AND type = 'grp'";
1145 return $row->obj_id;
1151 public function _isMember(
int $a_user_id,
int $a_ref_id,
string $a_field =
''): bool
1153 $local_roles = $this->rbac_review->getRolesOfRoleFolder($a_ref_id,
false);
1154 $user_roles = $this->rbac_review->assignedRoles($a_user_id);
1160 throw new DomainException(
'Invalid user id given: ' . $a_user_id);
1164 $and =
"AND login = '" . $tmp_user->getLogin() .
"' ";
1167 $and =
"AND email = '" . $tmp_user->getEmail() .
"' ";
1169 case 'matriculation':
1170 $and =
"AND matriculation = '" . $tmp_user->getMatriculation() .
"' ";
1174 $and =
"AND usr_id = '" . $a_user_id .
"'";
1180 $query =
"SELECT * FROM usr_data as ud " .
1184 return (
bool)
$res->numRows();
1187 if (!array_intersect($local_roles, $user_roles)) {
1200 $local_roles = $this->rbac_review->getRolesOfRoleFolder(
$ref_id,
false);
1203 foreach ($local_roles as $role_id) {
1204 $users = array_merge($users, $this->rbac_review->assignedUsers($role_id));
1206 return array_unique($users);
1215 $tree = $this->tree;
1218 $view = self::lookupViewMode($this->
getId());
1224 $container_ref_id = $tree->checkForParentType($this->ref_id,
'crs');
1225 if ($container_ref_id) {
1241 $this->view_mode = $a_view_mode;
1250 $query =
'SELECT view_mode FROM grp_settings ' .
1251 'WHERE obj_id = ' .
$ilDB->quote($a_obj_id,
'integer');
1256 $view_mode = (
int) $row->view_mode;
1265 $tree =
$DIC[
'tree'];
1267 if (!$a_view_mode) {
1275 $a_ref_id = end($ref);
1278 $crs_ref = $tree->checkForParentType($a_ref_id,
'crs');
1294 return $a_view_mode;
1313 $this->message = $a_message;
1317 if ($this->getMessage()) {
1318 $this->message .=
"<br /> ";
1320 $this->message .= $a_message;
1334 if ($this->getStart() && $this->getEnd()) {
1336 $app->setTitle($this->getTitle());
1337 $app->setSubtitle(
'grp_cal_start');
1339 $app->setDescription($this->getLongDescription());
1340 $app->setStart($this->getStart());
1341 $app->setFullday(!$this->getStartTimeIndication());
1345 $app->setTitle($this->getTitle());
1346 $app->setSubtitle(
'grp_cal_end');
1348 $app->setDescription($this->getLongDescription());
1349 $app->setStart($this->getEnd());
1350 $app->setFullday(!$this->getStartTimeIndication());
1353 if ($this->isRegistrationUnlimited()) {
1358 $app->setTitle($this->getTitle());
1359 $app->setSubtitle(
'grp_cal_reg_start');
1361 $app->setDescription($this->getLongDescription());
1362 $app->setStart($this->getRegistrationStart());
1366 $app->setTitle($this->getTitle());
1367 $app->setSubtitle(
'grp_cal_reg_end');
1369 $app->setDescription($this->getLongDescription());
1370 $app->setStart($this->getRegistrationEnd());
1393 $this->initParticipants();
1395 return $this->members_obj;
1408 $query =
"SELECT obj_id FROM grp_settings " .
1409 "WHERE reg_ac_enabled = " .
$ilDB->quote(1,
'integer') .
" " .
1410 "AND reg_ac = " .
$ilDB->quote($a_code,
'text');
1415 $obj_ids[] = (
int) $row->obj_id;
1424 public function register(
1427 bool $a_force_registration = false
1431 if ($part->isAssigned($a_user_id)) {
1435 if (!$a_force_registration) {
1437 if (!$this->isRegistrationEnabled()) {
1445 if (!$this->isRegistrationUnlimited()) {
1446 $start = $this->getRegistrationStart();
1447 $end = $this->getRegistrationEnd();
1457 if ($this->isMembershipLimited()) {
1458 $free = max(0, $this->getMaxMembers() - $part->getCountMembers());
1460 if ($this->isWaitingListEnabled() and (!$free or $waiting_list->getCountUsers())) {
1461 $this->
lng->loadLanguageModule(
"grp");
1462 $waiting_list->addToList($a_user_id);
1465 $this->
lng->txt(
'grp_added_to_list'),
1467 $waiting_list->getPosition($a_user_id)
1476 if (!$free or $waiting_list->getCountUsers()) {
1483 $part->add($a_user_id, $a_role);
1490 if ($this->isWaitingListEnabled() &&
1491 $this->hasWaitingListAutoFill()) {
1492 $max = $this->getMaxMembers();
1498 foreach ($waiting_list->getUserIds() as $user_id) {
1502 if ($this->getMembersObject()->isAssigned($user_id)) {
1507 $waiting_list->removeFromList($user_id);
1518 public static function mayLeave(
int $a_group_id,
int $a_user_id =
null, ?
ilDate &$a_date =
null): bool
1526 $a_user_id =
$ilUser->getId();
1529 $set =
$ilDB->query(
"SELECT leave_end" .
1530 " FROM grp_settings" .
1531 " WHERE obj_id = " .
$ilDB->quote($a_group_id,
"integer"));
1532 $row =
$ilDB->fetchAssoc($set);
1533 if ($row && isset($row[
"leave_end"]) && is_numeric($row[
"leave_end"])) {
1535 $limit = date(
"Ymd", (
int) $row[
"leave_end"]);
1536 if ($limit < date(
"Ymd")) {
1548 $tree =
$DIC->repositoryTree();
1555 $set =
$ilDB->query($q =
"SELECT obj_id, registration_min_members" .
1556 " FROM grp_settings" .
1557 " WHERE registration_min_members > " .
$ilDB->quote(0,
"integer") .
1558 " AND registration_mem_limit = " .
$ilDB->quote(1,
"integer") .
1559 " AND ((leave_end IS NOT NULL" .
1560 " AND leave_end < " .
$ilDB->quote($now,
"integer") .
")" .
1561 " OR (leave_end IS NULL" .
1562 " AND registration_end IS NOT NULL" .
1563 " AND registration_end < " .
$ilDB->quote($now_date,
"text") .
"))" .
1565 while ($row =
$ilDB->fetchAssoc($set)) {
1569 if ($tree->isDeleted($ref)) {
1574 $reci = $part->getNotificationRecipients();
1575 if (
sizeof($reci)) {
1576 $missing = (
int) $row[
"registration_min_members"] - $part->getCountMembers();
1578 $res[(
int) $row[
"obj_id"]] = array($missing, $reci);
1590 $query =
'SELECT show_members FROM grp_settings'
1591 .
' WHERE obj_id = ' .
$ilDB->quote($a_obj_id,
'integer');
1597 return (
bool) $row[
'show_members'];
1605 bool $a_admin_panel_enabled =
false,
1606 bool $a_include_side_block =
false,
1607 int $a_get_single = 0,
1612 isset($this->items[(
int) $a_admin_panel_enabled][(
int) $a_include_side_block]) &&
1613 is_array($this->items[(
int) $a_admin_panel_enabled][(
int) $a_include_side_block])
1615 return $this->items[(
int) $a_admin_panel_enabled][(
int) $a_include_side_block];
1618 parent::getSubItems($a_admin_panel_enabled, $a_include_side_block, $a_get_single);
1619 $this->items = ilContainerSessionsContentGUI::prepareSessionPresentationLimitation(
1622 $a_admin_panel_enabled,
1623 $a_include_side_block
1625 return $this->items[(
int) $a_admin_panel_enabled][(
int) $a_include_side_block];
static quoteArray(array $a_array)
Quotes all members of an array for usage in DB query statement.
Apointment templates are used for automatic generated apointments.
static convertDateToUtcDBTimestamp(\ilDateTime $date=null)
static _lookupSortMode(int $a_obj_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setOrderType(int $a_value)
static _clone(int $a_source_id, int $a_target_id)
@classDescription Date and time handling
static _after(ilDateTime $start, ilDateTime $end, string $a_compare_field='', string $a_tz='')
compare two dates and check start is after end This method does not consider tz offsets.
static _before(ilDateTime $start, ilDateTime $end, string $a_compare_field='', string $a_tz='')
compare two dates and check start is before end This method does not consider tz offsets.
static lookupTemplateId(int $a_ref_id)
static getInstanceByObjectType(string $a_obj_type)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const GRP_REGISTRATION_DEACTIVATED
const GRP_REGISTRATION_PASSWORD
const GRP_REGISTRATION_DIRECT
const TYPE_ACCEPTED_SUBSCRIPTION_MEMBER
const TYPE_ADMISSION_MEMBER
const TYPE_NOTIFICATION_REGISTRATION
const TYPE_WAITING_LIST_MEMBER
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _getInstanceByObjId(int $a_obj_id)
Get singleton instance.
Component logger with individual log levels by component id.
static generateCode()
Generate new registration key.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const ADDED_TO_WAITINGLIST
const REGISTRATION_CODE_DISABLED
const OUT_OF_REGISTRATION_PERIOD
static _lookupViewMode(int $a_id)
static _getGroupings(int $a_course_id)
static _lookupViewMode(int $a_id)
static _usingRegistrationCode()
getLocalGroupRoles(bool $a_translate=false)
get ALL local roles of group, also those created and defined afterwards only fetch data once from dat...
setEnd(ilDateTime $a_value=null)
enableMembershipLimitation(bool $a_status)
static lookupViewMode($a_obj_id)
applyDidacticTemplate(int $a_tpl_id)
@inheritDoc
appendMessage(string $a_message)
setRegistrationAccessCode(string $a_code)
static _lookupIdByTitle(string $a_title)
getDefaultAdminRole()
returns object id of created default adminstrator role
getGroupMemberIds()
get all group Member ids regardless of role
getDefaultMemberRole()
returns object id of created default member role
enableWaitingList(bool $a_status)
static lookupShowMembersEnabled(int $a_obj_id)
setRegistrationEnd(?ilDateTime $a_end)
setPassword(string $a_pass)
setMessage(string $a_message)
__construct(int $a_id=0, bool $a_call_by_reference=true)
@inheritDoc
const MAIL_ALLOWED_TUTORS
getSubItems(bool $a_admin_panel_enabled=false, bool $a_include_side_block=false, int $a_get_single=0, \ilContainerUserFilter $container_user_filter=null)
@inheritDoc
getMemberRoles(int $a_user_id)
setAutoNotification(bool $a_status)
updateGroupType(int $a_group_type=ilGroupConstants::GRP_TYPE_OPEN)
Change group type Revokes permissions of all parent non-protected roles and initiates these roles wit...
readGroupStatus()
Read group type.
setEnableGroupMap(bool $a_enablemap)
setGroupType(int $a_type)
cloneAutoGeneratedRoles(ilObjGroup $new_obj)
Clone group admin and member role permissions.
getGrpStatusClosedTemplateId()
get group status closed template
const ERR_WRONG_REG_TIME_LIMIT
static lookupGroupStatusTemplateId(int $a_obj_id)
addAdditionalSubItemInformation(array &$object)
Add additional information to sub item, e.g.
static lookupGroupTye(int $a_id)
const ERR_MISSING_MIN_MAX_MEMBERS
setLocationZoom(int $a_locationzoom)
setParentRolePermissions(int $a_parent_ref)
This method is called before "initDefaultRoles".
bool $auto_fill_from_waiting
getNumberOfNextSessions()
getGroupAdminIds(int $a_grpId=0)
static lookupObjectsByCode(string $a_code)
getRegistrationAccessCode()
setCancellationEnd(?ilDate $a_value)
bool $start_time_indication
bool $reg_membership_limitation
setRegistrationType(int $a_type)
setGroupStatus(int $a_status)
setInformation(string $a_information)
getNumberOfPreviousSessions()
_getMembers(int $a_obj_id)
const ERR_WRONG_REGISTRATION_LIMITED
_isMember(int $a_user_id, int $a_ref_id, string $a_field='')
validate()
validate group settings
enableRegistrationAccessCode(bool $a_status)
setStart(ilDateTime $a_value=null)
getViewMode()
Get effective container view mode.
getGroupMemberData(array $a_mem_ids, int $active=1)
get all group Members regardless of group role.
getGroupStatus()
get group status
const ERR_MISSING_GROUP_TYPE
setLongitude(string $a_longitude)
const ERR_MISSING_PASSWORD
isRegistrationUnlimited()
setMinMembers(int $a_max)
setNumberOfNextSessions(int $a_num)
const ERR_WRONG_MIN_MAX_MEMBERS
static mayLeave(int $a_group_id, int $a_user_id=null, ?ilDate &$a_date=null)
static translateViewMode(int $a_obj_id, int $a_view_mode, ?int $a_ref_id=null)
setMailToMembersType(int $a_type)
isRegistrationAccessCodeEnabled()
getGrpStatusOpenTemplateId()
get group status open template
setViewMode(int $a_view_mode)
static findGroupsWithNotEnoughMembers()
setPeriod(?\ilDateTime $start=null, ?\ilDateTime $end=null)
setWaitingListAutoFill(bool $a_value)
enableSessionLimit(bool $a_status)
prepareAppointments($a_mode='create')
Prepare calendar appointments.
cloneDependencies(int $a_target_id, int $a_copy_id)
@inheritDoc
setShowMembers(bool $a_status)
setNumberOfPreviousSessions(int $a_num)
bool $reg_access_code_enabled
toggleStartTimeIndication(bool $time_indication)
setRegistrationStart(?ilDateTime $a_start)
leave(int $a_user_id)
deassign member from group role
ilGroupParticipants $members_obj
getDefaultGroupRoles()
get default group roles, returns the defaultlike create roles il_grp_member, il_grp_admin
const ERR_WRONG_MAX_MEMBERS
setMaxMembers(int $a_max)
enableUnlimitedRegistration(bool $a_status)
setLatitude(string $a_latitude)
initDefaultRoles()
@inheritDoc
static createDefaultRole(string $a_title, string $a_description, string $a_tpl_name, int $a_ref_id)
static _getTranslation(string $a_role_title)
static cloneDependencies(int $ref_id, int $target_id, int $copy_id)
static addAdditionalSubItemInformation(array &$item)
Parse item data for list entries.
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
cloneMetaData(ilObject $target_obj)
Copy meta data.
static _getAllReferences(int $id)
get all reference ids for object ID
static _lookupObjId(int $ref_id)
static lookupNumberOfMembers(int $a_ref_id)
Lookup number of members.
static _deleteAllEntries(int $a_obj_id)
Delete all entries Normally called in case of object deletion.
if(!file_exists(getcwd() . '/ilias.ini.php'))
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
header include for all ilias files.