19declare(strict_types=1);
104 public function __construct(
int $a_id = 0,
bool $a_call_by_reference =
true)
110 $this->tree = &
$tree;
115 $this->
logger = $DIC->logger()->grp();
124 $query =
"SELECT grp_type FROM grp_settings " .
125 "WHERE obj_id = " .
$ilDB->quote($a_id,
'integer');
128 return (
int) $row->grp_type;
135 $this->information = $a_information;
145 $this->group_type = $a_type;
155 $this->reg_type = $a_type;
170 $this->reg_unlimited = $a_status;
180 $this->reg_start = $a_start;
191 $this->reg_end = $a_end;
201 $this->reg_password = $a_pass;
211 $this->reg_membership_limitation = $a_status;
221 $this->reg_min_members = $a_max;
231 $this->reg_max_members = $a_max;
241 $this->waiting_list = $a_status;
251 $this->auto_fill_from_waiting = $a_value;
261 $this->latitude = $a_latitude;
271 $this->longitude = $a_longitude;
281 $this->locationzoom = $a_locationzoom;
291 $this->enablemap = $a_enablemap;
311 $this->reg_access_code = $a_code;
321 $this->reg_access_code_enabled = $a_status;
326 $this->mail_members = $a_type;
336 $this->leave_end = $a_value;
346 $this->show_members = $a_status;
355 $this->auto_notification = $a_status;
366 ($start instanceof \
ilDate && !$end instanceof
ilDate) ||
369 throw new InvalidArgumentException(
'Different date types not supported.');
372 if ($start instanceof \
ilDate) {
383 $this->start_time_indication = $time_indication;
394 $this->grp_start = $a_value;
404 $this->grp_end = $a_value;
414 $this->session_limit = $a_status;
424 $this->session_prev = $a_num;
434 $this->session_next = $a_num;
450 $this->
error->appendMessage($this->
lng->txt(self::ERR_MISSING_TITLE));
453 $this->
error->appendMessage($this->
lng->txt(self::ERR_MISSING_PASSWORD));
457 $this->
error->appendMessage($this->
lng->txt(self::ERR_MISSING_MIN_MAX_MEMBERS));
460 $this->
error->appendMessage($this->
lng->txt(self::ERR_WRONG_MAX_MEMBERS));
463 $this->
error->appendMessage($this->
lng->txt(self::ERR_WRONG_MIN_MAX_MEMBERS));
471 $this->
error->appendMessage($this->
lng->txt((self::ERR_WRONG_REGISTRATION_LIMITED)));
473 return strlen($this->
error->getMessage()) == 0;
484 if (!parent::create()) {
489 $query =
"INSERT INTO grp_settings (obj_id,information,grp_type,registration_type,registration_enabled," .
490 "registration_unlimited,registration_start,registration_end,registration_password,registration_mem_limit," .
491 "registration_max_members,waiting_list,latitude,longitude,location_zoom,enablemap,reg_ac_enabled,reg_ac,view_mode,mail_members_type," .
492 "leave_end,registration_min_members,auto_wait, grp_start, grp_end, auto_notification, session_limit, session_prev, session_next) " .
494 $this->db->quote($this->
getId(),
'integer') .
", " .
496 $this->db->quote($this->
getGroupType(),
'integer') .
", " .
502 $this->db->quote($this->
getPassword(),
'text') .
", " .
506 $this->db->quote($this->
getLatitude(),
'text') .
", " .
507 $this->db->quote($this->
getLongitude(),
'text') .
", " .
512 $this->db->quote($this->view_mode,
'integer') .
', ' .
524 $res = $this->db->manipulate($query);
526 $this->app_event_handler->raise(
527 'components/ILIAS/Group',
529 array(
'object' => $this,
530 'obj_id' => $this->
getId(),
533 return $this->
getId();
541 if (!parent::update()) {
547 $query =
"UPDATE grp_settings " .
548 "SET information = " . $this->db->quote($this->
getInformation(),
'text') .
", " .
549 "grp_type = " . $this->db->quote($this->
getGroupType(),
'integer') .
", " .
550 "registration_type = " . $this->db->quote($this->
getRegistrationType(),
'integer') .
", " .
551 "registration_enabled = " . $this->db->quote($this->
isRegistrationEnabled() ? 1 : 0,
'integer') .
", " .
555 "registration_password = " . $this->db->quote($this->
getPassword(),
'text') .
", " .
557 "registration_mem_limit = " . $this->db->quote((
int) $this->
isMembershipLimited(),
'integer') .
", " .
558 "registration_max_members = " . $this->db->quote($this->
getMaxMembers(),
'integer') .
", " .
560 "latitude = " . $this->db->quote($this->
getLatitude(),
'text') .
", " .
561 "longitude = " . $this->db->quote($this->
getLongitude(),
'text') .
", " .
562 "location_zoom = " . $this->db->quote($this->
getLocationZoom(),
'integer') .
", " .
563 "enablemap = " . $this->db->quote((
int) $this->
getEnableGroupMap(),
'integer') .
", " .
566 'view_mode = ' . $this->db->quote($this->view_mode,
'integer') .
', ' .
569 "registration_min_members = " . $this->db->quote($this->
getMinMembers(),
'integer') .
", " .
571 "show_members = " . $this->db->quote((
int) $this->
getShowMembers(),
'integer') .
", " .
579 "WHERE obj_id = " . $this->db->quote($this->
getId(),
'integer');
580 $res = $this->db->manipulate($query);
582 $this->app_event_handler->raise(
583 'components/ILIAS/Group',
585 array(
'object' => $this,
586 'obj_id' => $this->
getId(),
595 public function delete():
bool
598 if (!parent::delete()) {
604 $query =
"DELETE FROM grp_settings " .
605 "WHERE obj_id = " . $this->db->quote($this->
getId(),
'integer');
606 $res = $this->db->manipulate($query);
610 $this->app_event_handler->raise(
611 'components/ILIAS/Group',
613 array(
'object' => $this,
614 'obj_id' => $this->
getId(),
628 $query =
"SELECT * FROM grp_settings " .
629 "WHERE obj_id = " . $this->db->quote($this->
getId(),
'integer');
631 $res = $this->db->query($query);
639 $this->
setPassword((
string) $row->registration_password);
656 if ($row->period_time_indication) {
661 } elseif (!is_null($row->period_start) && !is_null($row->period_end)) {
681 public function cloneObject(
int $a_target_id,
int $a_copy_id = 0,
bool $a_omit_tree =
false): ?
ilObject
686 $new_obj = parent::cloneObject($a_target_id, $a_copy_id, $a_omit_tree);
690 $new_obj->applyDidacticTemplate($current_template);
713 $new_obj->setViewMode($this->view_mode);
732 $part->updateNotification($this->
user->getId(), (
bool) $this->setting->get(
'mail_grp_admin_notification',
"1"));
733 $part->updateContact($this->
user->getId(),
true);
737 $obj_settings->cloneSettings($new_obj->getId());
738 unset($obj_settings);
747 parent::cloneDependencies($a_target_id, $a_copy_id);
753 $this->
logger->info(
'Handling grouping id: ' . $grouping_id);
754 $grouping = new \ilObjCourseGrouping($grouping_id);
755 $grouping->cloneGrouping($a_target_id, $a_copy_id);
767 if (!$admin || !$new_admin || !$this->
getRefId() || !$new_obj->
getRefId()) {
768 $this->
logger->warning(
'Error cloning auto generated rol: il_grp_admin');
770 $this->rbac_admin->copyRolePermissions($admin, $this->
getRefId(), $new_obj->
getRefId(), $new_admin,
true);
771 $this->
logger->info(
'Finished copying of role il_grp_admin.');
775 if (!$member || !$new_member) {
776 $this->
logger->warning(
'Error cloning auto generated rol: il_grp_member');
778 $this->rbac_admin->copyRolePermissions($member, $this->
getRefId(), $new_obj->
getRefId(), $new_member,
true);
779 $this->
logger->info(
'Finished copying of role il_grp_member.');
789 return $local_group_Roles[
"il_grp_member_" . $this->
getRefId()];
798 return $local_group_Roles[
"il_grp_admin_" . $this->
getRefId()];
804 if (count($member_ids) <= 1 || !in_array($this->
user->getId(), $member_ids)) {
808 $this->recommended_content_manager->removeObjectRecommendation($this->
user->getId(), $this->getRefId());
819 public function leave(
int $a_user_id): bool
822 foreach ($arr_groupRoles as $groupRole) {
823 $this->rbac_admin->deassignUser($groupRole, $a_user_id);
838 foreach ($rol as $value) {
839 foreach ($this->rbac_review->assignedUsers($value) as $member_id) {
840 array_push($usr_arr, $member_id);
843 return array_unique($usr_arr);
853 $q =
"SELECT login,firstname,lastname,title,usr_id,last_login " .
857 if (is_numeric($active) && $active > -1) {
858 $q .=
"AND active = '$active'";
861 $q .=
'ORDER BY lastname,firstname';
863 $r = $this->db->query(
$q);
866 $mem_arr[] = array(
"id" => (
int) $row->usr_id,
867 "login" => $row->login,
868 "firstname" => $row->firstname,
869 "lastname" => $row->lastname,
870 "last_login" => $row->last_login
884 if (!empty($a_grpId)) {
893 foreach ($this->rbac_review->assignedUsers($this->getDefaultAdminRole()) as $member_id) {
894 array_push($usr_arr, $member_id);
906 $role_arr = $this->rbac_review->getRolesOfRoleFolder($grp_id);
907 $arr_grpDefaultRoles = [];
908 foreach ($role_arr as $role_id) {
910 $grp_Member =
"il_grp_member_" . $grp_id;
911 $grp_Admin =
"il_grp_admin_" . $grp_id;
913 if (strcmp($role->getTitle(), $grp_Member) == 0) {
914 $arr_grpDefaultRoles[
"grp_member_role"] = $role->getId();
917 if (strcmp($role->getTitle(), $grp_Admin) == 0) {
918 $arr_grpDefaultRoles[
"grp_admin_role"] = $role->getId();
921 return $arr_grpDefaultRoles;
931 if (empty($this->local_roles)) {
932 $this->local_roles = array();
933 $role_arr = $this->rbac_review->getRolesOfRoleFolder($this->
getRefId());
935 foreach ($role_arr as $role_id) {
936 if ($this->rbac_review->isAssignable($role_id, $this->getRefId()) ==
true) {
941 $role_name = $role->getTitle();
943 $this->local_roles[$role_name] = $role->getId();
955 $q =
"SELECT obj_id FROM object_data WHERE type='rolt' AND title='il_grp_status_closed'";
959 return (
int) $row[
"obj_id"];
967 $q =
"SELECT obj_id FROM object_data WHERE type='rolt' AND title='il_grp_status_open'";
971 return (
int) $row[
"obj_id"];
982 $query =
'SELECT obj_id FROM object_data WHERE type = ' .
$ilDB->quote(
'rolt',
'text') .
' AND title = ' .
$ilDB->quote(
'il_grp_status_closed',
'text');
984 $query =
'SELECT obj_id FROM object_data WHERE type = ' .
$ilDB->quote(
'rolt',
'text') .
' AND title = ' .
$ilDB->quote(
'il_grp_status_open',
'text');
988 return $row[
'obj_id'] ? (
int) $row[
'obj_id'] : 0;
1006 foreach ($templates as $template) {
1008 if ($template->isAutoGenerated()) {
1009 $this->
logger->info(
'Appying default closed template');
1014 $this->
logger->warning(
'No closed didactic template available.');
1020 $this->group_status = $a_status;
1028 return $this->group_status;
1046 return array_intersect(
1047 $this->rbac_review->assignedRoles($a_user_id),
1048 $this->getLocalGroupRoles()
1054 $grp_Roles = $this->getDefaultGroupRoles();
1055 if (in_array($a_userId, $this->rbac_review->assignedUsers($grp_Roles[
"grp_admin_role"]))) {
1067 'il_grp_admin_' . $this->getRefId(),
1068 "Groupadmin group obj_no." . $this->
getId(),
1072 $this->m_roleAdminId = $role->getId();
1075 'il_grp_member_' . $this->getRefId(),
1076 "Groupmember of group obj_no." . $this->
getId(),
1080 $this->m_roleMemberId = $role->getId();
1093 $parent_roles = $this->rbac_review->getParentRoleIds($a_parent_ref);
1094 foreach ($parent_roles as $parent_role) {
1095 if ($parent_role[
'parent'] == $this->getRefId()) {
1098 if ($this->rbac_review->isProtected((
int) $parent_role[
'parent'], (
int) $parent_role[
'rol_id'])) {
1099 $operations = $this->rbac_review->getOperationsOfRole(
1100 (
int) $parent_role[
'obj_id'],
1102 (
int) $parent_role[
'parent']
1104 $this->rbac_admin->grantPermission(
1105 (
int) $parent_role[
'obj_id'],
1112 $this->rbac_admin->initIntersectionPermissions(
1114 (
int) $parent_role[
'obj_id'],
1115 (
int) $parent_role[
'parent'],
1116 $this->getGrpStatusOpenTemplateId(),
1129 parent::applyDidacticTemplate($a_tpl_id);
1133 $this->setParentRolePermissions($this->getRefId());
1143 $query =
"SELECT * FROM object_data WHERE title = " .
1144 $ilDB->quote($a_title,
'text') .
" AND type = 'grp'";
1147 return $row->obj_id;
1153 public function _isMember(
int $a_user_id,
int $a_ref_id,
string $a_field =
''): bool
1155 $local_roles = $this->rbac_review->getRolesOfRoleFolder($a_ref_id,
false);
1156 $user_roles = $this->rbac_review->assignedRoles($a_user_id);
1162 throw new DomainException(
'Invalid user id given: ' . $a_user_id);
1166 $and =
"AND login = '" . $tmp_user->getLogin() .
"' ";
1169 $and =
"AND email = '" . $tmp_user->getEmail() .
"' ";
1171 case 'matriculation':
1172 $and =
"AND matriculation = '" . $tmp_user->getMatriculation() .
"' ";
1176 $and =
"AND usr_id = '" . $a_user_id .
"'";
1182 $query =
"SELECT * FROM usr_data as ud " .
1185 $res = $this->db->query($query);
1186 return (
bool)
$res->numRows();
1189 if (!array_intersect($local_roles, $user_roles)) {
1202 $local_roles = $this->rbac_review->getRolesOfRoleFolder(
$ref_id,
false);
1205 foreach ($local_roles as $role_id) {
1206 $users = array_merge($users, $this->rbac_review->assignedUsers($role_id));
1208 return array_unique($users);
1217 $tree = $this->tree;
1220 $view = self::lookupViewMode($this->
getId());
1226 $container_ref_id = $tree->checkForParentType($this->ref_id,
'crs');
1227 if ($container_ref_id) {
1243 $this->view_mode = $a_view_mode;
1252 $query =
'SELECT view_mode FROM grp_settings ' .
1253 'WHERE obj_id = ' .
$ilDB->quote($a_obj_id,
'integer');
1258 $view_mode = (
int) $row->view_mode;
1267 $tree =
$DIC[
'tree'];
1269 if (!$a_view_mode) {
1277 $a_ref_id = end($ref);
1280 $crs_ref = $tree->checkForParentType($a_ref_id,
'crs');
1296 return $a_view_mode;
1315 $this->message = $a_message;
1319 if ($this->getMessage()) {
1320 $this->message .=
"<br /> ";
1322 $this->message .= $a_message;
1336 if ($this->getStart() && $this->getEnd()) {
1339 $app->setSubtitle(
'grp_cal_start');
1341 $app->setDescription($this->getLongDescription());
1342 $app->setStart($this->getStart());
1343 $app->setFullday(!$this->getStartTimeIndication());
1348 $app->setSubtitle(
'grp_cal_end');
1350 $app->setDescription($this->getLongDescription());
1351 $app->setStart($this->getEnd());
1352 $app->setFullday(!$this->getStartTimeIndication());
1355 if ($this->isRegistrationUnlimited()) {
1361 $app->setSubtitle(
'grp_cal_reg_start');
1363 $app->setDescription($this->getLongDescription());
1364 $app->setStart($this->getRegistrationStart());
1369 $app->setSubtitle(
'grp_cal_reg_end');
1371 $app->setDescription($this->getLongDescription());
1372 $app->setStart($this->getRegistrationEnd());
1395 $this->initParticipants();
1397 return $this->members_obj;
1410 $query =
"SELECT obj_id FROM grp_settings " .
1411 "WHERE reg_ac_enabled = " .
$ilDB->quote(1,
'integer') .
" " .
1412 "AND reg_ac = " .
$ilDB->quote($a_code,
'text');
1417 $obj_ids[] = (
int) $row->obj_id;
1426 public function register(
1429 bool $a_force_registration = false
1433 if ($part->isAssigned($a_user_id)) {
1437 if (!$a_force_registration) {
1439 if (!$this->isRegistrationEnabled()) {
1447 if (!$this->isRegistrationUnlimited()) {
1448 $start = $this->getRegistrationStart();
1449 $end = $this->getRegistrationEnd();
1459 if ($this->isMembershipLimited()) {
1460 $free = max(0, $this->getMaxMembers() - $part->getCountMembers());
1462 if ($this->isWaitingListEnabled() and (!$free or $waiting_list->getCountUsers())) {
1463 $this->
lng->loadLanguageModule(
"grp");
1464 $waiting_list->addToList($a_user_id);
1467 $this->
lng->txt(
'grp_added_to_list'),
1469 $waiting_list->getPosition($a_user_id)
1478 if (!$free or $waiting_list->getCountUsers()) {
1485 $part->add($a_user_id, $a_role);
1492 if ($this->isWaitingListEnabled() &&
1493 $this->hasWaitingListAutoFill()) {
1494 $max = $this->getMaxMembers();
1500 foreach ($waiting_list->getUserIds() as
$user_id) {
1504 if ($this->getMembersObject()->isAssigned(
$user_id)) {
1509 $waiting_list->removeFromList(
$user_id);
1520 public static function mayLeave(
int $a_group_id, ?
int $a_user_id =
null, ?
ilDate &$a_date =
null): bool
1524 $ilUser =
$DIC->user();
1528 $a_user_id = $ilUser->getId();
1531 $set =
$ilDB->query(
"SELECT leave_end" .
1532 " FROM grp_settings" .
1533 " WHERE obj_id = " .
$ilDB->quote($a_group_id,
"integer"));
1534 $row =
$ilDB->fetchAssoc($set);
1535 if ($row && isset($row[
"leave_end"]) && is_numeric($row[
"leave_end"])) {
1537 $limit = date(
"Ymd", (
int) $row[
"leave_end"]);
1538 if ($limit < date(
"Ymd")) {
1550 $tree =
$DIC->repositoryTree();
1563 $set =
$ilDB->query(
$q =
"SELECT obj_id, registration_min_members" .
1564 " FROM grp_settings" .
1565 " WHERE registration_min_members > " .
$ilDB->quote(0,
"integer") .
1566 " AND registration_mem_limit = " .
$ilDB->quote(1,
"integer") .
1567 " AND ((leave_end IS NOT NULL" .
1568 " AND leave_end < " .
$ilDB->quote($now,
"integer") .
")" .
1569 " OR (leave_end IS NULL" .
1570 " AND registration_end IS NOT NULL" .
1571 " AND registration_end < " .
$ilDB->quote($now_date_local,
"text") .
"))" .
1573 while ($row =
$ilDB->fetchAssoc($set)) {
1577 if ($tree->isDeleted($ref)) {
1582 $reci = $part->getNotificationRecipients();
1583 if (
sizeof($reci)) {
1584 $missing = (
int) $row[
"registration_min_members"] - $part->getCountMembers();
1586 $res[(
int) $row[
"obj_id"]] = array($missing, $reci);
1598 $query =
'SELECT show_members FROM grp_settings'
1599 .
' WHERE obj_id = ' .
$ilDB->quote($a_obj_id,
'integer');
1605 return (
bool) $row[
'show_members'];
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)
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
static _getInstanceByObjId(int $a_obj_id)
Get singleton instance.
Component logger with individual log levels by component id.
static generateCode()
Generate new registration key.
membership registration exception
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...
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
static mayLeave(int $a_group_id, ?int $a_user_id=null, ?ilDate &$a_date=null)
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
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)
setEnd(?ilDateTime $a_value=null)
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
setStart(?ilDateTime $a_value=null)
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)
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 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
Class ilObject Basic functions for all objects.
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.
Interface for all objects that offer registration with access codes.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
Class ilObjForumAdministration.
if(!file_exists('../ilias.ini.php'))