6require_once 
"./Services/Container/classes/class.ilContainer.php";
 
    7include_once(
'./Services/Calendar/classes/class.ilDateTime.php');
 
    8include_once 
'./Services/Membership/interfaces/interface.ilMembershipRegistrationCodes.php';
 
   10define(
'GRP_REGISTRATION_DEACTIVATED', -1);
 
   11define(
'GRP_REGISTRATION_DIRECT', 0);
 
   12define(
'GRP_REGISTRATION_REQUEST', 1);
 
   13define(
'GRP_REGISTRATION_PASSWORD', 2);
 
   15define(
'GRP_REGISTRATION_LIMITED', 1);
 
   16define(
'GRP_REGISTRATION_UNLIMITED', 2);
 
   18define(
'GRP_TYPE_UNKNOWN', 0);
 
   19define(
'GRP_TYPE_CLOSED', 1);
 
   20define(
'GRP_TYPE_OPEN', 2);
 
   21define(
'GRP_TYPE_PUBLIC', 3);
 
  137    public function __construct($a_id = 0, $a_call_by_reference = 
true)
 
  143        $this->tree = &
$tree;
 
  161        $query = 
"SELECT grp_type FROM grp_settings " .
 
  162            "WHERE obj_id = " . 
$ilDB->quote($a_id, 
'integer');
 
  165            return $row->grp_type;
 
  180        $this->information = $a_information;
 
  203        $this->group_type = $a_type;
 
  226        $this->reg_type = $a_type;
 
  260        $this->reg_unlimited = $a_status;
 
  283        $this->reg_start = $a_start;
 
  307        $this->reg_end = $a_end;
 
  329        $this->reg_password = $a_pass;
 
  352        $this->reg_membership_limitation = $a_status;
 
  374        $this->reg_min_members = $a_max;
 
  396        $this->reg_max_members = $a_max;
 
  419        $this->waiting_list = $a_status;
 
  436        $this->auto_fill_from_waiting = (bool) $a_value;
 
  451        $this->latitude = $a_latitude;
 
  471        $this->longitude = $a_longitude;
 
  491        $this->locationzoom = $a_locationzoom;
 
  511        $this->enablemap = $a_enablemap;
 
  549        $this->reg_access_code = $a_code;
 
  568        $this->reg_access_code_enabled = $a_status;
 
  578        $this->mail_members = $a_type;
 
  592        $this->leave_end = $a_value;
 
  602        $this->show_members = $a_status;
 
  614        $this->auto_notification = $a_status;
 
  637            throw new InvalidArgumentException(
'Different date types not supported.');
 
  654        $this->start_time_indication = $time_indication;
 
  662        return $this->start_time_indication;
 
  671        $this->grp_start = $a_value;
 
  679        return $this->grp_start;
 
  687        $this->grp_end = $a_value;
 
  695        return $this->grp_end;
 
  705        $this->session_limit = $a_status;
 
  719        $this->session_prev = $a_num;
 
  737        $this->session_next = $a_num;
 
  764            $ilErr->appendMessage($this->lng->txt(self::ERR_MISSING_TITLE));
 
  767            $ilErr->appendMessage($this->lng->txt(self::ERR_MISSING_PASSWORD));
 
  777                $ilErr->appendMessage($this->lng->txt(self::ERR_MISSING_MIN_MAX_MEMBERS));
 
  780                $ilErr->appendMessage($this->lng->txt(self::ERR_WRONG_MAX_MEMBERS));
 
  783                $ilErr->appendMessage($this->lng->txt(self::ERR_WRONG_MIN_MAX_MEMBERS));
 
  791            $ilErr->appendMessage($this->lng->txt((self::ERR_WRONG_REGISTRATION_LIMITED)));
 
  794        return strlen(
$ilErr->getMessage()) == 0;
 
  808        $ilAppEventHandler = 
$DIC[
'ilAppEventHandler'];
 
  810        if (!parent::create()) {
 
  819        $query = 
"INSERT INTO grp_settings (obj_id,information,grp_type,registration_type,registration_enabled," .
 
  820            "registration_unlimited,registration_start,registration_end,registration_password,registration_mem_limit," .
 
  821            "registration_max_members,waiting_list,latitude,longitude,location_zoom,enablemap,reg_ac_enabled,reg_ac,view_mode,mail_members_type," .
 
  822            "leave_end,registration_min_members,auto_wait, grp_start, grp_end, auto_notification, session_limit, session_prev, session_next) " .
 
  824            $ilDB->quote($this->
getId(), 
'integer') . 
", " .
 
  842            $ilDB->quote($this->view_mode, 
'integer') . 
', ' .
 
  856        $ilAppEventHandler->raise(
 
  859            array(
'object' => $this,
 
  860                'obj_id' => $this->
getId(),
 
  864        return $this->
getId();
 
  875        $ilAppEventHandler = 
$DIC[
'ilAppEventHandler'];
 
  877        if (!parent::update()) {
 
  883        $query = 
"UPDATE grp_settings " .
 
  891            "registration_password = " . 
$ilDB->quote($this->
getPassword(), 
'text') . 
", " .
 
  894            "registration_max_members = " . 
$ilDB->quote($this->
getMaxMembers(), 
'integer') . 
", " .
 
  902            'view_mode = ' . 
$ilDB->quote($this->view_mode, 
'integer') . 
', ' .
 
  905            "registration_min_members = " . 
$ilDB->quote($this->
getMinMembers(), 
'integer') . 
", " .
 
  915            "WHERE obj_id = " . 
$ilDB->quote($this->
getId(), 
'integer');
 
  918        $ilAppEventHandler->raise(
 
  921            array(
'object' => $this,
 
  922                'obj_id' => $this->
getId(),
 
  936    public function delete()
 
  941        $ilAppEventHandler = 
$DIC[
'ilAppEventHandler'];
 
  944        if (!parent::delete()) {
 
  950        $query = 
"DELETE FROM grp_settings " .
 
  951            "WHERE obj_id = " . 
$ilDB->quote($this->
getId(), 
'integer');
 
  954        include_once(
'./Modules/Group/classes/class.ilGroupParticipants.php');
 
  957        $ilAppEventHandler->raise(
 
  960            array(
'object' => $this,
 
  961                'obj_id' => $this->
getId(),
 
  981        $query = 
"SELECT * FROM grp_settings " .
 
  982            "WHERE obj_id = " . 
$ilDB->quote($this->
getId(), 
'integer');
 
 1009            if ($row->period_time_indication) {
 
 1014            } elseif (!is_null($row->period_start) && !is_null($row->period_end)) {
 
 1028        include_once(
'./Services/Container/classes/class.ilContainerSortingSettings.php');
 
 1040    public function cloneObject($a_target_id, $a_copy_id = 0, $a_omit_tree = 
false)
 
 1051        $new_obj = parent::cloneObject($a_target_id, $a_copy_id, $a_omit_tree);
 
 1055        $new_obj->applyDidacticTemplate($current_template);
 
 1076        include_once 
'./Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
 
 1079        $new_obj->setViewMode($this->view_mode);
 
 1093        include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
 
 1097        include_once(
'./Modules/Group/classes/class.ilGroupParticipants.php');
 
 1100        $part->updateNotification(
$ilUser->getId(), 
$ilSetting->get(
'mail_grp_admin_notification', 
true));
 
 1101        $part->updateContact(
$ilUser->getId(), 
true);
 
 1104        include_once(
'Services/Tracking/classes/class.ilLPObjSettings.php');
 
 1106        $obj_settings->cloneSettings($new_obj->getId());
 
 1107        unset($obj_settings);
 
 1126        parent::cloneDependencies($a_target_id, $a_copy_id);
 
 1128        include_once(
'Services/Object/classes/class.ilObjectActivation.php');
 
 1134            $grouping = new \ilObjCourseGrouping($grouping_id);
 
 1135            $grouping->cloneGrouping($a_target_id, $a_copy_id);
 
 1156        $new_admin = $new_obj->getDefaultAdminRole();
 
 1157        if (!$admin || !$new_admin || !$this->
getRefId() || !$new_obj->getRefId()) {
 
 1160        $rbacadmin->copyRolePermissions($admin, $this->
getRefId(), $new_obj->getRefId(), $new_admin, 
true);
 
 1164        $new_member = $new_obj->getDefaultMemberRole();
 
 1165        if (!$member || !$new_member) {
 
 1168        $rbacadmin->copyRolePermissions($member, $this->
getRefId(), $new_obj->getRefId(), $new_member, 
true);
 
 1178    public function join($a_user_id, $a_mem_role = 
"")
 
 1184        if (is_array($a_mem_role)) {
 
 1185            foreach ($a_mem_role as $role) {
 
 1186                $rbacadmin->assignUser($role, $a_user_id, 
false);
 
 1189            $rbacadmin->assignUser($a_mem_role, $a_user_id, 
false);
 
 1203        return $local_group_Roles[
"il_grp_member_" . $this->
getRefId()];
 
 1214        return $local_group_Roles[
"il_grp_admin_" . $this->
getRefId()];
 
 1229        if (isset($a_user_id) && isset($a_mem_role)) {
 
 1230            $this->
join($a_user_id, $a_mem_role);
 
 1233            $this->
ilias->raiseError(get_class($this) . 
"::addMember(): Missing parameters !", $this->
ilias->error_obj->WARNING);
 
 1254        if (count($member_ids) <= 1 || !in_array($this->
ilias->account->getId(), $member_ids)) {
 
 1258                $this->
leave($this->
ilias->account->getId());
 
 1259                $this->recommended_content_manager->removeObjectRecommendation($this->
user->getId(), $this->getRefId());
 
 1280        if (is_array($arr_groupRoles)) {
 
 1281            foreach ($arr_groupRoles as $groupRole) {
 
 1282                $rbacadmin->deassignUser($groupRole, $a_user_id);
 
 1285            $rbacadmin->deassignUser($arr_groupRoles, $a_user_id);
 
 1308        foreach ($rol as $value) {
 
 1309            foreach (
$rbacreview->assignedUsers($value) as $member_id) {
 
 1310                array_push($usr_arr, $member_id);
 
 1314        $mem_arr = array_unique($usr_arr);
 
 1316        return $mem_arr ? $mem_arr : array();
 
 1337        $q = 
"SELECT login,firstname,lastname,title,usr_id,last_login " .
 
 1341        if (is_numeric($active) && $active > -1) {
 
 1342            $q .= 
"AND active = '$active'";
 
 1345        $q .= 
'ORDER BY lastname,firstname';
 
 1347        $r = 
$ilDB->query($q);
 
 1350            $mem_arr[] = array(
"id" => $row->usr_id,
 
 1351                                "login" => $row->login,
 
 1352                                "firstname" => $row->firstname,
 
 1353                                "lastname" => $row->lastname,
 
 1354                                "last_login" => $row->last_login
 
 1358        return $mem_arr ? $mem_arr : array();
 
 1378        if (!empty($a_grpId)) {
 
 1387        foreach (
$rbacreview->assignedUsers($this->getDefaultAdminRole()) as $member_id) {
 
 1388            array_push($usr_arr, $member_id);
 
 1406        if (strlen($a_grp_id) > 0) {
 
 1407            $grp_id = $a_grp_id;
 
 1412        $role_arr = 
$rbacreview->getRolesOfRoleFolder($grp_id);
 
 1414        foreach ($role_arr as $role_id) {
 
 1415            $role_Obj = &$this->
ilias->obj_factory->getInstanceByObjId($role_id);
 
 1417            $grp_Member = 
"il_grp_member_" . $grp_id;
 
 1418            $grp_Admin = 
"il_grp_admin_" . $grp_id;
 
 1420            if (strcmp($role_Obj->getTitle(), $grp_Member) == 0) {
 
 1421                $arr_grpDefaultRoles[
"grp_member_role"] = $role_Obj->getId();
 
 1424            if (strcmp($role_Obj->getTitle(), $grp_Admin) == 0) {
 
 1425                $arr_grpDefaultRoles[
"grp_admin_role"] = $role_Obj->getId();
 
 1429        return $arr_grpDefaultRoles;
 
 1445        if (empty($this->local_roles)) {
 
 1446            $this->local_roles = array();
 
 1449            foreach ($role_arr as $role_id) {
 
 1450                if (
$rbacreview->isAssignable($role_id, $this->getRefId()) == 
true) {
 
 1451                    $role_Obj = &$this->
ilias->obj_factory->getInstanceByObjId($role_id);
 
 1456                        $role_name = $role_Obj->getTitle();
 
 1459                    $this->local_roles[$role_name] = $role_Obj->getId();
 
 1464        return $this->local_roles;
 
 1474        $q = 
"SELECT obj_id FROM object_data WHERE type='rolt' AND title='il_grp_status_closed'";
 
 1478        return $row[
"obj_id"];
 
 1488        $q = 
"SELECT obj_id FROM object_data WHERE type='rolt' AND title='il_grp_status_open'";
 
 1492        return $row[
"obj_id"];
 
 1509            $query = 
'SELECT obj_id FROM object_data WHERE type = ' . 
$ilDB->quote(
'rolt', 
'text') . 
' AND title = ' . 
$ilDB->quote(
'il_grp_status_closed', 
'text');
 
 1511            $query = 
'SELECT obj_id FROM object_data WHERE type = ' . 
$ilDB->quote(
'rolt', 
'text') . 
' AND title = ' . 
$ilDB->quote(
'il_grp_status_open', 
'text');
 
 1516        return isset($row[
'obj_id']) ? $row[
'obj_id'] : 0;
 
 1534        $logger = 
$DIC->logger()->grp();
 
 1542        foreach ($templates as $template) {
 
 1544            if ($template->isAutoGenerated()) {
 
 1545                $logger->info(
'Appying default closed template');
 
 1550        $logger->warning(
'No closed didactic template available.');
 
 1563        $this->group_status = $a_status;
 
 1575        return $this->group_status;
 
 1588        $logger = 
$DIC->logger()->grp();
 
 1589        $logger->dump($tpl_id);
 
 1610        $ilBench->start(
"Group", 
"getMemberRoles");
 
 1612        $arr_assignedRoles = array();
 
 1614        $arr_assignedRoles = array_intersect(
$rbacreview->assignedRoles($a_user_id), $this->getLocalGroupRoles());
 
 1616        $ilBench->stop(
"Group", 
"getMemberRoles");
 
 1618        return $arr_assignedRoles;
 
 1635        if (in_array($a_userId, 
$rbacreview->assignedUsers($grp_Roles[
"grp_admin_role"]))) {
 
 1648        include_once 
'./Services/AccessControl/classes/class.ilObjRole.php';
 
 1650            'il_grp_admin_' . $this->
getRefId(),
 
 1651            "Groupadmin group obj_no." . $this->
getId(),
 
 1655        $this->m_roleAdminId = $role->getId();
 
 1658            'il_grp_member_' . $this->
getRefId(),
 
 1659            "Groupmember of group obj_no." . $this->
getId(),
 
 1663        $this->m_roleMemberId = $role->getId();
 
 1682        $parent_roles = 
$rbacreview->getParentRoleIds($a_parent_ref);
 
 1683        foreach ((array) $parent_roles as $parent_role) {
 
 1684            if ($parent_role[
'parent'] == $this->
getRefId()) {
 
 1687            if (
$rbacreview->isProtected($parent_role[
'parent'], $parent_role[
'rol_id'])) {
 
 1689                    $parent_role[
'obj_id'],
 
 1691                    $parent_role[
'parent']
 
 1694                    $parent_role[
'obj_id'],
 
 1703                $parent_role[
'obj_id'],
 
 1704                $parent_role[
'parent'],
 
 1718        parent::applyDidacticTemplate($a_tpl_id);
 
 1733        $query = 
"SELECT * FROM object_data WHERE title = " .
 
 1734            $ilDB->quote($a_title, 
'text') . 
" AND type = 'grp'";
 
 1737            return $row->obj_id;
 
 1743    public function _isMember($a_user_id, $a_ref_id, $a_field = 
'')
 
 1748        $ilObjDataCache = 
$DIC[
'ilObjDataCache'];
 
 1751        $local_roles = 
$rbacreview->getRolesOfRoleFolder($a_ref_id, 
false);
 
 1752        $user_roles = 
$rbacreview->assignedRoles($a_user_id);
 
 1756            include_once 
'./Services/User/classes/class.ilObjUser.php';
 
 1761                    $and = 
"AND login = '" . $tmp_user->getLogin() . 
"' ";
 
 1764                    $and = 
"AND email = '" . $tmp_user->getEmail() . 
"' ";
 
 1766                case 'matriculation':
 
 1767                    $and = 
"AND matriculation = '" . $tmp_user->getMatriculation() . 
"' ";
 
 1771                    $and = 
"AND usr_id = '" . $a_user_id . 
"'";
 
 1777            $query = 
"SELECT * FROM usr_data as ud " .
 
 1782            return $res->numRows() ? 
true : 
false;
 
 1785        if (!array_intersect($local_roles, $user_roles)) {
 
 1805        foreach ($local_roles as $role_id) {
 
 1806            $users = array_merge($users, 
$rbacreview->assignedUsers($role_id));
 
 1809        return array_unique($users);
 
 1827        $container_ref_id = 
$tree->checkForParentType($this->ref_id, 
'crs');
 
 1828        if ($container_ref_id) {
 
 1848        $this->view_mode = $a_view_mode;
 
 1861        $query = 
'SELECT view_mode FROM grp_settings ' .
 
 1862            'WHERE obj_id = ' . 
$ilDB->quote($a_obj_id, 
'integer');
 
 1885        if (!$a_view_mode) {
 
 1893                $a_ref_id = end($ref);
 
 1896            $crs_ref = 
$tree->checkForParentType($a_ref_id, 
'crs');
 
 1901            include_once 
'./Modules/Course/classes/class.ilObjCourse.php';
 
 1913        return $a_view_mode;
 
 1922        include_once 
'./Services/Object/classes/class.ilObjectActivation.php';
 
 1932        $this->message = $a_message;
 
 1937            $this->message .= 
"<br /> ";
 
 1939        $this->message .= $a_message;
 
 1951        include_once(
'./Services/Calendar/classes/class.ilCalendarAppointmentTemplate.php');
 
 1961                    $app->setSubtitle(
'grp_cal_start');
 
 1970                    $app->setSubtitle(
'grp_cal_end');
 
 1983                $app->setSubtitle(
'grp_cal_reg_start');
 
 1991                $app->setSubtitle(
'grp_cal_reg_end');
 
 2015        include_once(
'./Modules/Group/classes/class.ilGroupParticipants.php');
 
 2043        $query = 
"SELECT obj_id FROM grp_settings " .
 
 2044            "WHERE reg_ac_enabled = " . 
$ilDB->quote(1, 
'integer') . 
" " .
 
 2045            "AND reg_ac = " . 
$ilDB->quote($a_code, 
'text');
 
 2050            $obj_ids[] = $row->obj_id;
 
 2061    public function register($a_user_id, $a_role = 
IL_GRP_MEMBER, $a_force_registration = 
false)
 
 2063        include_once 
'./Services/Membership/exceptions/class.ilMembershipRegistrationException.php';
 
 2064        include_once 
"./Modules/Group/classes/class.ilGroupParticipants.php";
 
 2067        if ($part->isAssigned($a_user_id)) {
 
 2071        if (!$a_force_registration) {
 
 2074                include_once 
'./Modules/Group/classes/class.ilObjGroupAccess.php';
 
 2096                $free = max(0, $this->
getMaxMembers() - $part->getCountMembers());
 
 2097                include_once(
'./Modules/Group/classes/class.ilGroupWaitingList.php');
 
 2100                    $this->lng->loadLanguageModule(
"grp");
 
 2104                        $this->lng->txt(
'grp_added_to_list'),
 
 2109                    include_once(
'./Modules/Group/classes/class.ilGroupParticipants.php');
 
 2110                    include_once(
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php');
 
 2124        $part->add($a_user_id, $a_role);
 
 2138                include_once(
'./Modules/Group/classes/class.ilGroupWaitingList.php');
 
 2149                    include_once 
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
 
 2162    public static function mayLeave($a_group_id, $a_user_id = 
null, &$a_date = 
null)
 
 2170            $a_user_id = 
$ilUser->getId();
 
 2173        $set = 
$ilDB->query(
"SELECT leave_end" .
 
 2174            " FROM grp_settings" .
 
 2175            " WHERE obj_id = " . 
$ilDB->quote($a_group_id, 
"integer"));
 
 2176        $row = 
$ilDB->fetchAssoc($set);
 
 2177        if ($row && $row[
"leave_end"]) {
 
 2179            $limit = date(
"Ymd", $row[
"leave_end"]);
 
 2180            if ($limit < date(
"Ymd")) {
 
 2200        $now = date(
"Y-m-d H:i:s");
 
 2207        $set = 
$ilDB->query($q = 
"SELECT obj_id, registration_min_members" .
 
 2208            " FROM grp_settings" .
 
 2209            " WHERE registration_min_members > " . 
$ilDB->quote(0, 
"integer") .
 
 2210            " AND registration_mem_limit = " . 
$ilDB->quote(1, 
"integer") . 
 
 2211            " AND ((leave_end IS NOT NULL" .
 
 2212                " AND leave_end < " . 
$ilDB->quote($now, 
"integer") . 
")" .
 
 2213                " OR (leave_end IS NULL" .
 
 2214                " AND registration_end IS NOT NULL" .
 
 2215                " AND registration_end < " . 
$ilDB->quote($now_date, 
"text") . 
"))" .
 
 2216            " AND (period_start IS NULL OR period_start > " . 
$ilDB->quote($now, 
"integer") . 
")");
 
 2217        while ($row = 
$ilDB->fetchAssoc($set)) {
 
 2221            if (
$tree->isDeleted($ref)) {
 
 2226            $reci = $part->getNotificationRecipients();
 
 2227            if (
sizeof($reci)) {
 
 2228                $missing = (int) $row[
"registration_min_members"] - $part->getCountMembers();
 
 2230                    $res[$row[
"obj_id"]] = array($missing, $reci);
 
 2242        $query = 
'SELECT show_members FROM grp_settings' 
 2243            . 
' WHERE obj_id = ' . 
$ilDB->quote($a_obj_id, 
'integer');
 
 2249        return (
bool) $row[
'show_members'];
 
 2260        $a_admin_panel_enabled = 
false,
 
 2261        $a_include_side_block = 
false,
 
 2266        if (is_array($this->items[(
int) $a_admin_panel_enabled][(
int) $a_include_side_block])) {
 
 2267            return $this->items[(int) $a_admin_panel_enabled][(
int) $a_include_side_block];
 
 2271        parent::getSubItems($a_admin_panel_enabled, $a_include_side_block, $a_get_single);
 
 2275            (
bool) $a_admin_panel_enabled,
 
 2276            (
bool) $a_include_side_block
 
 2278        return $this->items[(int) $a_admin_panel_enabled][(
int) $a_include_side_block];
 
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
An exception for terminatinating execution or to throw for unit testing.
const IL_CAL_TRANSLATION_SYSTEM
return true
Flag indicating whether or not HTTP headers will be sent when outputting captcha image/audio.
const GRP_REGISTRATION_DIRECT
const GRP_REGISTRATION_PASSWORD
const GRP_REGISTRATION_DEACTIVATED
Apointment templates are used for automatic generated apointments.
static convertDateToUtcDBTimestamp(\ilDateTime $date=null)
static prepareSessionPresentationLimitation(array $items, ilContainer $container, bool $admin_panel_enabled=false, bool $include_side_block=false)
static _lookupSortMode($a_obj_id)
lookup sort mode
static _clone($a_source_id, $a_target_id)
Clone fields.
@classDescription Date and time handling
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.
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.
static lookupTemplateId($a_ref_id)
Lookup template id @global ilDB $ilDB.
static getInstanceByObjectType($a_obj_type)
Get instance by obj type.
const TYPE_ACCEPTED_SUBSCRIPTION_MEMBER
const TYPE_ADMISSION_MEMBER
const TYPE_NOTIFICATION_REGISTRATION
const TYPE_WAITING_LIST_MEMBER
static _getInstanceByObjId($a_obj_id)
Get singleton instance.
static getLogger($a_component_id)
Get component logger.
static generateCode()
Generate new registration key.
membership registration exception
const ADDED_TO_WAITINGLIST
const REGISTRATION_CODE_DISABLED
const OUT_OF_REGISTRATION_PERIOD
static _lookupViewMode($a_id)
Lookup view mode.
static _getGroupings($a_course_id)
static _lookupViewMode($a_id)
lookup view mode of container
static _usingRegistrationCode()
Using Registration code.
getGroupMemberData($a_mem_ids, $active=1)
get all group Members regardless of group role.
setGroupStatus($a_status)
Set group status.
setEnd(ilDateTime $a_value=null)
getInformation()
get Information
static lookupViewMode($a_obj_id)
lookup view mode @global $ilDB
getGroupType()
get group type
getLocationZoom()
Get LocationZoom.
getLongitude()
Get Longitude.
getLocalGroupRoles($a_translate=false)
get ALL local roles of group, also those created and defined afterwards only fetch data once from dat...
getDefaultAdminRole()
returns object id of created default adminstrator role @access public
getPassword()
get password
setPeriod(\ilDateTime $start=null, \ilDateTime $end=null)
getEnableMap()
Type independent wrapper.
getGroupMemberIds()
get all group Member ids regardless of role @access public
appendMessage($a_message)
enableRegistrationAccessCode($a_status)
En/disable registration access code.
getDefaultMemberRole()
returns object id of created default member role @access public
getMinMembers()
get min members
getMembersObject()
Get members objects.
static lookupShowMembersEnabled(int $a_obj_id)
setPassword($a_pass)
set password
enableWaitingList($a_status)
enable waiting list
const MAIL_ALLOWED_TUTORS
applyDidacticTemplate($a_tpl_id)
Apply template.
static lookupObjectsByCode($a_code)
setAutoNotification(bool $a_status)
getRegistrationStart()
get registration start
readGroupStatus()
Read group type.
initParticipants()
init participants object
setRegistrationAccessCode($a_code)
Set refistration access code.
setRegistrationStart($a_start)
set registration start
setInformation($a_information)
set information
getRegistrationType()
get registration type
setMaxMembers($a_max)
set max members
getGrpStatusClosedTemplateId()
get group status closed template @access public
getMaxMembers()
get max members
const ERR_WRONG_REG_TIME_LIMIT
isMembershipLimited()
is max member limited
getDefaultGroupRoles($a_grp_id="")
get default group roles, returns the defaultlike create roles il_grp_member, il_grp_admin @access pub...
setEnableGroupMap($a_enablemap)
Set Enable Group Map.
setCancellationEnd(ilDate $a_value=null)
cloneAutoGeneratedRoles($new_obj)
Clone group admin and member role permissions.
setWaitingListAutoFill($a_value)
leave($a_user_id)
deassign member from group role @access private
const ERR_MISSING_MIN_MAX_MEMBERS
static lookupGroupTye($a_id)
Lookup group type.
_isMember($a_user_id, $a_ref_id, $a_field='')
setLongitude($a_longitude)
Set Longitude.
static _lookupIdByTitle($a_title)
getNumberOfNextSessions()
Get number of upcomoing sessions.
addMember($a_user_id, $a_mem_role)
add Member to Group @access public
cloneDependencies($a_target_id, $a_copy_id)
Clone object dependencies (crs items, preconditions)
setRegistrationEnd($a_end)
set registration end
getRegistrationAccessCode()
get access code
$file_obj
Group file object for handling of export files.
getSubItems( $a_admin_panel_enabled=false, $a_include_side_block=false, $a_get_single=0, \ilContainerUserFilter $container_user_filter=null)
Get subitems of container.
isAdmin($a_userId)
is Admin @access public
setGroupType($a_type)
set group type
getRegistrationEnd()
get registration end
setMinMembers($a_max)
set min members
setMailToMembersType($a_type)
Set mail to members type.
setLatitude($a_latitude)
Set Latitude.
$reg_membership_limitation
setLocationZoom($a_locationzoom)
Set LocationZoom.
getNumberOfPreviousSessions()
Get number of previous sessions.
join($a_user_id, $a_mem_role="")
join Group, assigns user to role @access private
__construct($a_id=0, $a_call_by_reference=true)
Constructor @access public.
const ERR_WRONG_REGISTRATION_LIMITED
setViewMode($a_view_mode)
Set group view mode.
validate()
validate group settings
setStart(ilDateTime $a_value=null)
getViewMode()
Get effective container view mode.
setRegistrationType($a_type)
set registration type
getGroupStatus()
get group status
const ERR_MISSING_GROUP_TYPE
addAdditionalSubItemInformation(&$a_item_data)
Add additional information to sub item, e.g.
leaveGroup()
is called when a member decides to leave group @access public
enableMembershipLimitation($a_status)
enable max member limitation
const ERR_MISSING_PASSWORD
isRegistrationUnlimited()
is registration unlimited
setShowMembers($a_status)
setNumberOfNextSessions(int $a_num)
Set number of upcoming sessions.
isRegistrationEnabled()
is registration enabled
const ERR_WRONG_MIN_MAX_MEMBERS
isRegistrationAccessCodeEnabled()
Check if access code is enabled.
getLatitude()
Get Latitude.
getGrpStatusOpenTemplateId()
get group status open template @access public
getMailToMembersType()
Get mail to members type.
static findGroupsWithNotEnoughMembers()
Minimum members check @global $ilDB $ilDB.
enableUnlimitedRegistration($a_status)
enable unlimited registration
getEnableGroupMap()
Get Enable Group Map.
static lookupGroupStatusTemplateId($a_obj_id)
@global $ilDB $ilDB
enableSessionLimit(bool $a_status)
en/disable limited number of sessions
static mayLeave($a_group_id, $a_user_id=null, &$a_date=null)
prepareAppointments($a_mode='create')
Prepare calendar appointments.
$grp_start_time_indication
setNumberOfPreviousSessions(int $a_num)
Set number of previous sessions.
updateGroupType($a_group_type=GRP_TYPE_OPEN)
Change group type.
getGroupAdminIds($a_grpId="")
get Group Admin Id @access public
toggleStartTimeIndication(bool $time_indication)
setParentRolePermissions($a_parent_ref)
This method is called before "initDefaultRoles".
const ERR_WRONG_MAX_MEMBERS
static translateViewMode($a_obj_id, $a_view_mode, $a_ref_id=null)
translate view mode
getMemberRoles($a_user_id)
get group member status @access public
initDefaultRoles()
init default roles settings @access public
isWaitingListEnabled()
is waiting list enabled
static _getTranslation($a_role_title)
static createDefaultRole($a_title, $a_description, $a_tpl_name, $a_ref_id)
static cloneDependencies($a_ref_id, $a_target_id, $a_copy_id)
Clone dependencies.
static addAdditionalSubItemInformation(array &$a_item)
Parse item data for list entries.
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
getType()
get object type @access public
static _lookupObjId($a_id)
deleteMetaData()
delete meta data entry
updateMetaData()
update meta data entry
createMetaData()
create meta data entry
getRefId()
get reference id @access public
getLongDescription()
get object long description (stored in object_description)
static _getAllReferences($a_id)
get all reference ids of object
cloneMetaData($target_obj)
Copy meta data.
getId()
get object id @access public
getTitle()
get object title @access public
static lookupNumberOfMembers($a_ref_id)
Lookup number of members @global ilRbacReview $rbacreview @global <type> $ilObjDataCache.
static _deleteAllEntries($a_obj_id)
Delete all entries Normally called for course deletion.
static quoteArray($a_array)
Quotes all members of an array for usage in DB query statement.
Interface for all objects that offer registration with access codes.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
redirection script todo: (a better solution should control the processing via a xml file)
foreach($_POST as $key=> $value) $res