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);
 
  113    public function __construct($a_id = 0, $a_call_by_reference = 
true)
 
  120        parent::__construct($a_id, $a_call_by_reference);
 
  133        $query = 
"SELECT grp_type FROM grp_settings " .
 
  134            "WHERE obj_id = " . 
$ilDB->quote($a_id, 
'integer');
 
  137            return $row->grp_type;
 
  152        $this->information = $a_information;
 
  232        $this->reg_unlimited = $a_status;
 
  255        $this->reg_start = $a_start;
 
  279        $this->reg_end = $a_end;
 
  301        $this->reg_password = $a_pass;
 
  324        $this->reg_membership_limitation = $a_status;
 
  346        $this->reg_min_members = $a_max;
 
  368        $this->reg_max_members = $a_max;
 
  391        $this->waiting_list = $a_status;
 
  408        $this->auto_fill_from_waiting = (bool) $a_value;
 
  423        $this->latitude = $a_latitude;
 
  443        $this->longitude = $a_longitude;
 
  463        $this->locationzoom = $a_locationzoom;
 
  483        $this->enablemap = $a_enablemap;
 
  521        $this->reg_access_code = $a_code;
 
  540        $this->reg_access_code_enabled = $a_status;
 
  564        $this->leave_end = $a_value;
 
  574        $this->show_members = $a_status;
 
  629            $ilErr->appendMessage($this->lng->txt(self::ERR_MISSING_TITLE));
 
  632            $ilErr->appendMessage($this->lng->txt(self::ERR_MISSING_PASSWORD));
 
  642                $ilErr->appendMessage($this->lng->txt(self::ERR_MISSING_MIN_MAX_MEMBERS));
 
  645                $ilErr->appendMessage($this->lng->txt(self::ERR_WRONG_MAX_MEMBERS));
 
  648                $ilErr->appendMessage($this->lng->txt(self::ERR_WRONG_MIN_MAX_MEMBERS));
 
  656            $ilErr->appendMessage($this->lng->txt((self::ERR_WRONG_REGISTRATION_LIMITED)));
 
  659        return strlen(
$ilErr->getMessage()) == 0;
 
  670        global 
$ilDB,$ilAppEventHandler;
 
  672        if (!parent::create()) {
 
  676        $query = 
"INSERT INTO grp_settings (obj_id,information,grp_type,registration_type,registration_enabled," .
 
  677            "registration_unlimited,registration_start,registration_end,registration_password,registration_mem_limit," .
 
  678            "registration_max_members,waiting_list,latitude,longitude,location_zoom,enablemap,reg_ac_enabled,reg_ac,view_mode,mail_members_type," .
 
  679            "leave_end,registration_min_members,auto_wait, grp_start, grp_end) " .
 
  681            $ilDB->quote($this->
getId(), 
'integer') . 
", " .
 
  683            $ilDB->quote((
int) $this->
getGroupType(), 
'integer') . 
", " .
 
  689            $ilDB->quote($this->
getPassword(), 
'text') . 
", " .
 
  693            $ilDB->quote($this->
getLatitude(), 
'text') . 
", " .
 
  699            $ilDB->quote($this->
getViewMode(), 
'integer') . 
', ' .
 
  709        $ilAppEventHandler->raise(
 
  712            array(
'object' => $this,
 
  713                'obj_id' => $this->
getId(),
 
  717        return $this->
getId();
 
  725        global 
$ilDB,$ilAppEventHandler;
 
  731        $query = 
"UPDATE grp_settings " .
 
  733            "grp_type = " . $ilDB->quote((
int) $this->
getGroupType(), 
'integer') . 
", " .
 
  739            "registration_password = " . $ilDB->quote($this->
getPassword(), 
'text') . 
", " .
 
  741            "registration_mem_limit = " . $ilDB->quote((
int) $this->
isMembershipLimited(), 
'integer') . 
", " .
 
  742            "registration_max_members = " . $ilDB->quote($this->
getMaxMembers(), 
'integer') . 
", " .
 
  744            "latitude = " . $ilDB->quote($this->
getLatitude(), 
'text') . 
", " .
 
  745            "longitude = " . $ilDB->quote($this->
getLongitude(), 
'text') . 
", " .
 
  746            "location_zoom = " . $ilDB->quote($this->
getLocationZoom(), 
'integer') . 
", " .
 
  747            "enablemap = " . $ilDB->quote((
int) $this->
getEnableGroupMap(), 
'integer') . 
", " .
 
  750            'view_mode = ' . $ilDB->quote($this->
getViewMode(), 
'integer') . 
', ' .
 
  753            "registration_min_members = " . $ilDB->quote($this->
getMinMembers(), 
'integer') . 
", " .
 
  755            "show_members = " . $ilDB->quote((
int) $this->
getShowMembers(), 
'integer') . 
", " .
 
  758            "WHERE obj_id = " . $ilDB->quote($this->
getId(), 
'integer');
 
  761        $ilAppEventHandler->raise(
 
  764            array(
'object' => $this,
 
  765                'obj_id' => $this->
getId(),
 
  779    public function delete()
 
  781        global 
$ilDB,$ilAppEventHandler;
 
  784        if (!parent::delete()) {
 
  788        $query = 
"DELETE FROM grp_settings " .
 
  789            "WHERE obj_id = " . 
$ilDB->quote($this->
getId(), 
'integer');
 
  792        include_once(
'./Modules/Group/classes/class.ilGroupParticipants.php');
 
  795        $ilAppEventHandler->raise(
 
  798            array(
'object' => $this,
 
  799                'obj_id' => $this->
getId(),
 
  817        $query = 
"SELECT * FROM grp_settings " .
 
  818            "WHERE obj_id = " . 
$ilDB->quote($this->
getId(), 
'integer');
 
  850        include_once(
'./Services/Container/classes/class.ilContainerSortingSettings.php');
 
  862    public function cloneObject($a_target_id, $a_copy_id = 0, $a_omit_tree = 
false)
 
  866        $new_obj = parent::cloneObject($a_target_id, $a_copy_id, $a_omit_tree);
 
  870        $new_obj->applyDidacticTemplate($current_template);
 
  890        include_once 
'./Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
 
  900        $new_obj->setStart($this->
getStart());
 
  901        $new_obj->setEnd($this->
getEnd());
 
  906        include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
 
  910        include_once(
'./Modules/Group/classes/class.ilGroupParticipants.php');
 
  913        $part->updateNotification(
$ilUser->getId(), 
$ilSetting->get(
'mail_grp_admin_notification', 
true));
 
  916        include_once(
'Services/Tracking/classes/class.ilLPObjSettings.php');
 
  918        $obj_settings->cloneSettings($new_obj->getId());
 
  919        unset($obj_settings);
 
  936        parent::cloneDependencies($a_target_id, $a_copy_id);
 
  938        include_once(
'Services/Object/classes/class.ilObjectActivation.php');
 
  956        $new_admin = $new_obj->getDefaultAdminRole();
 
  957        if (!$admin || !$new_admin || !$this->
getRefId() || !$new_obj->getRefId()) {
 
  960        $rbacadmin->copyRolePermissions($admin, $this->
getRefId(), $new_obj->getRefId(), $new_admin, 
true);
 
  964        $new_member = $new_obj->getDefaultMemberRole();
 
  965        if (!$member || !$new_member) {
 
  968        $rbacadmin->copyRolePermissions($member, $this->
getRefId(), $new_obj->getRefId(), $new_member, 
true);
 
  978    public function join($a_user_id, $a_mem_role=
"")
 
  982        if (is_array($a_mem_role)) {
 
  983            foreach ($a_mem_role as $role) {
 
  984                $rbacadmin->assignUser($role, $a_user_id, 
false);
 
  987            $rbacadmin->assignUser($a_mem_role, $a_user_id, 
false);
 
 1001        return $local_group_Roles[
"il_grp_member_" . $this->
getRefId()];
 
 1012        return $local_group_Roles[
"il_grp_admin_" . $this->
getRefId()];
 
 1025        if (isset($a_user_id) && isset($a_mem_role)) {
 
 1026            $this->
join($a_user_id, $a_mem_role);
 
 1029            $this->
ilias->raiseError(get_class($this) . 
"::addMember(): Missing parameters !", $this->
ilias->error_obj->WARNING);
 
 1047        if (count($member_ids) <= 1 || !in_array($this->
ilias->account->getId(), $member_ids)) {
 
 1051                $this->
leave($this->
ilias->account->getId());
 
 1053                $member->dropDesktopItem($this->
getRefId(), 
"grp");
 
 1072        if (is_array($arr_groupRoles)) {
 
 1073            foreach ($arr_groupRoles as $groupRole) {
 
 1074                $rbacadmin->deassignUser($groupRole, $a_user_id);
 
 1077            $rbacadmin->deassignUser($arr_groupRoles, $a_user_id);
 
 1097        foreach ($rol as $value) {
 
 1098            foreach (
$rbacreview->assignedUsers($value) as $member_id) {
 
 1099                array_push($usr_arr, $member_id);
 
 1103        $mem_arr = array_unique($usr_arr);
 
 1105        return $mem_arr ? $mem_arr : array();
 
 1121        $q = 
"SELECT login,firstname,lastname,title,usr_id,last_login " .
 
 1125        if (is_numeric($active) && $active > -1) {
 
 1126            $q .= 
"AND active = '$active'";
 
 1129        $q .= 
'ORDER BY lastname,firstname';
 
 1134            $mem_arr[] = array(
"id" => 
$row->usr_id,
 
 1135                                "login" => 
$row->login,
 
 1136                                "firstname" => 
$row->firstname,
 
 1137                                "lastname" => 
$row->lastname,
 
 1138                                "last_login" => 
$row->last_login
 
 1142        return $mem_arr ? $mem_arr : array();
 
 1160        if (!empty($a_grpId)) {
 
 1169        foreach ($rbacreview->assignedUsers($this->getDefaultAdminRole()) as $member_id) {
 
 1170            array_push($usr_arr, $member_id);
 
 1185        if (strlen($a_grp_id) > 0) {
 
 1186            $grp_id = $a_grp_id;
 
 1191        $role_arr  = 
$rbacreview->getRolesOfRoleFolder($grp_id);
 
 1193        foreach ($role_arr as $role_id) {
 
 1194            $role_Obj =&$this->
ilias->obj_factory->getInstanceByObjId($role_id);
 
 1196            $grp_Member =
"il_grp_member_" . $grp_id;
 
 1197            $grp_Admin  =
"il_grp_admin_" . $grp_id;
 
 1199            if (strcmp($role_Obj->getTitle(), $grp_Member) == 0) {
 
 1200                $arr_grpDefaultRoles[
"grp_member_role"] = $role_Obj->getId();
 
 1203            if (strcmp($role_Obj->getTitle(), $grp_Admin) == 0) {
 
 1204                $arr_grpDefaultRoles[
"grp_admin_role"] = $role_Obj->getId();
 
 1208        return $arr_grpDefaultRoles;
 
 1221        if (empty($this->local_roles)) {
 
 1222            $this->local_roles = array();
 
 1225            foreach ($role_arr as $role_id) {
 
 1226                if (
$rbacreview->isAssignable($role_id, $this->getRefId()) == 
true) {
 
 1227                    $role_Obj =&$this->
ilias->obj_factory->getInstanceByObjId($role_id);
 
 1232                        $role_name = $role_Obj->getTitle();
 
 1235                    $this->local_roles[$role_name] = $role_Obj->getId();
 
 1240        return $this->local_roles;
 
 1250        $q = 
"SELECT obj_id FROM object_data WHERE type='rolt' AND title='il_grp_status_closed'";
 
 1254        return $row[
"obj_id"];
 
 1264        $q = 
"SELECT obj_id FROM object_data WHERE type='rolt' AND title='il_grp_status_open'";
 
 1268        return $row[
"obj_id"];
 
 1283            $query = 
'SELECT obj_id FROM object_data WHERE type = ' . 
$ilDB->quote(
'rolt', 
'text') . 
' AND title = ' . 
$ilDB->quote(
'il_grp_status_closed', 
'text');
 
 1285            $query = 
'SELECT obj_id FROM object_data WHERE type = ' . 
$ilDB->quote(
'rolt', 
'text') . 
' AND title = ' . 
$ilDB->quote(
'il_grp_status_open', 
'text');
 
 1290        return isset(
$row[
'obj_id']) ? 
$row[
'obj_id'] : 0;
 
 1308        $logger = 
$DIC->logger()->grp();
 
 1319                $logger->info(
'Appying default closed template');
 
 1324        $logger->warning(
'No closed didactic template available.');
 
 1354        $arr_relevantParentRoleIds = array_diff(array_keys($arr_parentRoles), $real_local_roles);
 
 1366            foreach ($arr_relevantParentRoleIds as $parentRole) {
 
 1367                if (
$rbacreview->isProtected($arr_parentRoles[$parentRole][
'parent'], $parentRole)) {
 
 1371                $granted_permissions = array();
 
 1388                $rbacadmin->revokePermission($this->
getRefId(), $parentRole);
 
 1389                foreach ($template_ops as $template_op) {
 
 1390                    if (in_array($template_op, $current_ops)) {
 
 1391                        array_push($granted_permissions, $template_op);
 
 1394                if (!empty($granted_permissions)) {
 
 1403                $rbacadmin->copyRolePermissionIntersection(
 
 1407                    $arr_parentRoles[$parentRole][
'parent'],
 
 1425        $this->group_status = $a_status;
 
 1437        return $this->group_status;
 
 1455        foreach ($arr_globalRoles as $globalRole) {
 
 1456            if (
$rbacsystem->checkPermission($this->getRefId(), $globalRole, 
"join")) {
 
 1474        $ilBench->start(
"Group", 
"getMemberRoles");
 
 1476        $arr_assignedRoles = array();
 
 1478        $arr_assignedRoles = array_intersect(
$rbacreview->assignedRoles($a_user_id), $this->getLocalGroupRoles());
 
 1480        $ilBench->stop(
"Group", 
"getMemberRoles");
 
 1482        return $arr_assignedRoles;
 
 1497        if (in_array($a_userId, 
$rbacreview->assignedUsers($grp_Roles[
"grp_admin_role"]))) {
 
 1510        include_once 
'./Services/AccessControl/classes/class.ilObjRole.php';
 
 1512            'il_grp_admin_' . $this->
getRefId(),
 
 1513            "Groupadmin group obj_no." . $this->
getId(),
 
 1517        $this->m_roleAdminId = $role->getId();
 
 1520            'il_grp_member_' . $this->
getRefId(),
 
 1521            "Groupmember of group obj_no." . $this->
getId(),
 
 1525        $this->m_roleMemberId = $role->getId();
 
 1544        $parent_roles = 
$rbacreview->getParentRoleIds($a_parent_ref);
 
 1545        foreach ((array) $parent_roles as $parent_role) {
 
 1546            if ($parent_role[
'parent'] == $this->
getRefId()) {
 
 1549            if (
$rbacreview->isProtected($parent_role[
'parent'], $parent_role[
'rol_id'])) {
 
 1551                    $parent_role[
'obj_id'],
 
 1553                    $parent_role[
'parent']
 
 1556                    $parent_role[
'obj_id'],
 
 1565                $parent_role[
'obj_id'],
 
 1566                $parent_role[
'parent'],
 
 1580        parent::applyDidacticTemplate($a_tpl_id);
 
 1593        $query = 
"SELECT * FROM object_data WHERE title = " .
 
 1594            $ilDB->quote($a_title, 
'text') . 
" AND type = 'grp'";
 
 1597            return $row->obj_id;
 
 1603    public function _isMember($a_user_id, $a_ref_id, $a_field = 
'')
 
 1607        $local_roles = 
$rbacreview->getRolesOfRoleFolder($a_ref_id, 
false);
 
 1608        $user_roles = 
$rbacreview->assignedRoles($a_user_id);
 
 1612            include_once 
'./Services/User/classes/class.ilObjUser.php';
 
 1617                    $and = 
"AND login = '" . $tmp_user->getLogin() . 
"' ";
 
 1620                    $and = 
"AND email = '" . $tmp_user->getEmail() . 
"' ";
 
 1622                case 'matriculation':
 
 1623                    $and = 
"AND matriculation = '" . $tmp_user->getMatriculation() . 
"' ";
 
 1627                    $and = 
"AND usr_id = '" . $a_user_id . 
"'";
 
 1633            $query = 
"SELECT * FROM usr_data as ud " .
 
 1638            return $res->numRows() ? true : 
false;
 
 1641        if (!array_intersect($local_roles, $user_roles)) {
 
 1659        foreach ($local_roles as $role_id) {
 
 1663        return array_unique(
$users);
 
 1674        $view = (int) $this->view_mode;
 
 1688        $this->view_mode = $a_view_mode;
 
 1699        $query = 
'SELECT view_mode FROM grp_settings ' .
 
 1700            'WHERE obj_id = ' . 
$ilDB->quote($a_obj_id, 
'integer');
 
 1721        if (!$a_view_mode) {
 
 1729                $a_ref_id = end($ref);
 
 1732            $crs_ref = 
$tree->checkForParentType($a_ref_id, 
'crs');
 
 1737            include_once 
'./Modules/Course/classes/class.ilObjCourse.php';
 
 1749        return $a_view_mode;
 
 1758        include_once 
'./Services/Object/classes/class.ilObjectActivation.php';
 
 1768        $this->message = $a_message;
 
 1773            $this->message .= 
"<br /> ";
 
 1775        $this->message .= $a_message;
 
 1787        include_once(
'./Services/Calendar/classes/class.ilCalendarAppointmentTemplate.php');
 
 1797                    $app->setSubtitle(
'grp_cal_start');
 
 1801                    $app->setFullday(
true);
 
 1806                    $app->setSubtitle(
'grp_cal_end');
 
 1809                    $app->setStart($this->
getEnd());
 
 1810                    $app->setFullday(
true);
 
 1819                $app->setSubtitle(
'grp_cal_reg_start');
 
 1827                $app->setSubtitle(
'grp_cal_reg_end');
 
 1851        include_once(
'./Modules/Group/classes/class.ilGroupParticipants.php');
 
 1877        $query = 
"SELECT obj_id FROM grp_settings " .
 
 1878            "WHERE reg_ac_enabled = " . 
$ilDB->quote(1, 
'integer') . 
" " .
 
 1879            "AND reg_ac = " . 
$ilDB->quote($a_code, 
'text');
 
 1884            $obj_ids[] = 
$row->obj_id;
 
 1895    public function register($a_user_id, $a_role = 
IL_GRP_MEMBER, $a_force_registration = 
false)
 
 1897        include_once 
'./Services/Membership/exceptions/class.ilMembershipRegistrationException.php';
 
 1898        include_once 
"./Modules/Group/classes/class.ilGroupParticipants.php";
 
 1901        if ($part->isAssigned($a_user_id)) {
 
 1905        if (!$a_force_registration) {
 
 1908                include_once 
'./Modules/Group/classes/class.ilObjGroupAccess.php';
 
 1930                $free = max(0, $this->
getMaxMembers() - $part->getCountMembers());
 
 1931                include_once(
'./Modules/Group/classes/class.ilGroupWaitingList.php');
 
 1934                    $this->lng->loadLanguageModule(
"grp");
 
 1938                        $this->lng->txt(
'grp_added_to_list'),
 
 1943                    include_once(
'./Modules/Group/classes/class.ilGroupParticipants.php');
 
 1944                    include_once(
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php');
 
 1958        $part->add($a_user_id, $a_role);
 
 1972                include_once(
'./Modules/Group/classes/class.ilGroupWaitingList.php');
 
 1983                    include_once 
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
 
 1996    public static function mayLeave($a_group_id, $a_user_id = 
null, &$a_date = 
null)
 
 2001            $a_user_id = 
$ilUser->getId();
 
 2004        $set = 
$ilDB->query(
"SELECT leave_end" .
 
 2005            " FROM grp_settings" .
 
 2006            " WHERE obj_id = " . 
$ilDB->quote($a_group_id, 
"integer"));
 
 2010            $limit = 
date(
"Ymd", 
$row[
"leave_end"]);
 
 2011            if ($limit < 
date(
"Ymd")) {
 
 2031        $now = 
date(
"Y-m-d H:i:s");
 
 2033        include_once 
"Modules/Group/classes/class.ilGroupParticipants.php";
 
 2035        $set = 
$ilDB->query(
"SELECT obj_id, registration_min_members" .
 
 2036            " FROM grp_settings" .
 
 2037            " WHERE registration_min_members > " . 
$ilDB->quote(0, 
"integer") .
 
 2038            " AND registration_mem_limit = " . 
$ilDB->quote(1, 
"integer") . 
 
 2039            " AND ((leave_end IS NOT NULL" .
 
 2040                " AND leave_end < " . 
$ilDB->quote($now, 
"text") . 
")" .
 
 2041                " OR (leave_end IS NULL" .
 
 2042                " AND registration_end IS NOT NULL" .
 
 2043                " AND registration_end < " . 
$ilDB->quote($now, 
"text") . 
"))" .
 
 2044            " AND (grp_start IS NULL OR grp_start > " . 
$ilDB->quote($now, 
"integer") . 
")");
 
 2045        while (
$row = 
$ilDB->fetchAssoc($set)) {
 
 2049            if (
$tree->isDeleted($ref)) {
 
 2054            $reci = $part->getNotificationRecipients();
 
 2055            if (
sizeof($reci)) {
 
 2056                $missing = (int) 
$row[
"registration_min_members"]-$part->getCountMembers();
 
 2058                    $res[
$row[
"obj_id"]] = array($missing, $reci);
 
 2070        $query = 
'SELECT show_members FROM grp_settings' 
 2071            .
' WHERE obj_id = '.
$ilDB->quote($a_obj_id,
'integer');
 
 2077        return (
bool)
$row[
'show_members'];
 
sprintf('%.4f', $callTime)
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
An exception for terminatinating execution or to throw for unit testing.
const IL_CAL_TRANSLATION_SYSTEM
const GRP_REGISTRATION_DIRECT
const GRP_REGISTRATION_PASSWORD
const GRP_REGISTRATION_DEACTIVATED
Apointment templates are used for automatic generated apointments.
static _lookupSortMode($a_obj_id)
lookup sort mode
getViewMode()
Get container view 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 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.
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
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)
getRegistrationStart()
get registration start
readGroupStatus()
get group status, redundant method because @access public
initParticipants()
init participants object
setRegistrationAccessCode($a_code)
Set refistration access code.
setRegistrationStart($a_start)
set registration start
setInformation($a_information)
set information
setEnd(ilDate $end=null)
Set end.
getRegistrationType()
get registration type
setMaxMembers($a_max)
set max members
setStart(ilDate $start=null)
Set start.
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)
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.
isAdmin($a_userId)
is Admin @access public
setGroupType($a_type)
set group type
getRegistrationEnd()
get registration end
initGroupStatus($a_grpStatus=GRP_TYPE_PUBLIC)
set group status
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.
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
setRegistrationType($a_type)
set registration type
getGroupStatus()
get group status
const ERR_MISSING_GROUP_TYPE
cloneObject($a_target_id, $a_copy_id=0, $a_omit_tree=false)
Clone group (no member data)
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)
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
getViewMode($a_translate_inherit=true)
get view mode
getEnableGroupMap()
Get Enable Group Map.
static lookupGroupStatusTemplateId($a_obj_id)
@global $ilDB $ilDB
getStart()
Get group start.
static mayLeave($a_group_id, $a_user_id=null, &$a_date=null)
prepareAppointments($a_mode='create')
Prepare calendar appointments.
updateGroupType($a_group_type=GRP_TYPE_OPEN)
Change group type.
getGroupAdminIds($a_grpId="")
get Group Admin Id @access public
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)
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
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.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
Interface for all objects that offer registration with access codes.
catch(Exception $e) $message
update($pash, $contents, Config $config)
redirection script todo: (a better solution should control the processing via a xml file)
foreach($_POST as $key=> $value) $res