12 define(
"IL_CRS_ADMIN", 1);
13 define(
"IL_CRS_TUTOR", 3);
14 define(
"IL_CRS_MEMBER", 2);
16 define(
'IL_GRP_ADMIN', 4);
17 define(
'IL_GRP_MEMBER', 5);
19 define(
'IL_SESS_MEMBER', 6);
21 define(
"IL_ROLE_POSITION_ADMIN", 1);
22 define(
"IL_ROLE_POSITION_TUTOR", 2);
23 define(
"IL_ROLE_POSITION_MEMBER", 3);
75 $this->lng =
$GLOBALS[
'DIC']->language();
76 $this->logger =
$GLOBALS[
'DIC']->logger()->mem();
78 $this->component = $a_component_name;
80 $this->ref_id = $a_ref_id;
101 return self::getInstanceByObjId(
$obj_id);
104 include_once
'./Modules/Session/classes/class.ilSessionParticipants.php';
108 $GLOBALS[
'DIC']->logger()->mem()->logStack();
109 $GLOBALS[
'DIC']->logger()->mem()->warning(
'Invalid ref_id -> obj_id given: ' . $a_ref_id .
' -> ' .
$obj_id);
110 throw new \InvalidArgumentException(
'Invalid obj_id given.');
127 include_once
'./Modules/Course/classes/class.ilCourseParticipants.php';
131 include_once
'./Modules/Group/classes/class.ilGroupParticipants.php';
135 include_once
'./Modules/Session/classes/class.ilSessionParticipants.php';
140 $GLOBALS[
'ilLog']->write(__METHOD__ .
': Invalid obj_id given: ' . $a_obj_id);
165 $access = $DIC->access();
168 $a_usr_id =
$GLOBALS[
'ilUser']->getId();
175 if ($access->checkAccess(
'manage_members',
'',
$ref_id)) {
178 $part = self::getInstance(
$ref_id);
179 if ($part->isAssigned($a_usr_id)) {
180 if ($part->getType() ==
'crs') {
185 if ($part->getType() ==
'grp') {
216 if ($a_only_member_role) {
217 $j2 =
"JOIN object_data obd2 ON (ua.rol_id = obd2.obj_id) ";
218 $a2 =
'AND obd2.title = ' . $ilDB->concat(
220 array($ilDB->quote(
'il_',
'text')),
222 array($ilDB->quote(
'_member_',
'text')),
230 $query =
"SELECT DISTINCT obd.obj_id,obr.ref_id FROM rbac_ua ua " .
231 "JOIN rbac_fa fa ON ua.rol_id = fa.rol_id " .
232 "JOIN object_reference obr ON fa.parent = obr.ref_id " .
233 "JOIN object_data obd ON obr.obj_id = obd.obj_id " .
235 "WHERE " . $ilDB->in(
"obd.type",
$a_type,
false,
"text") .
236 "AND fa.assign = 'y' " .
237 "AND ua.usr_id = " . $ilDB->quote($a_usr_id,
'integer') .
" " .
240 while (
$row = $ilDB->fetchObject(
$res)) {
241 $ref_ids[] =
$row->obj_id;
244 return $ref_ids ? $ref_ids :
array();
261 $local_roles = $rbacreview->getRolesOfRoleFolder($a_ref_id,
false);
263 return $rbacreview->isAssignedToAtLeastOneGivenRole($a_usr_id, $local_roles);
277 $lroles = $rbacreview->getRolesOfRoleFolder($a_ref_id,
false);
278 return $rbacreview->getNumberOfAssignedUsers($lroles);
290 global $rbacreview, $ilObjDataCache;
292 $has_policies = $rbacreview->getLocalPolicies($a_ref_id);
294 if (!$has_policies) {
297 $lroles = $rbacreview->getRolesOfRoleFolder($a_ref_id,
false);
299 $memberRoles =
array();
300 foreach ($lroles as $role_id) {
301 $title = $ilObjDataCache->lookupTitle($role_id);
302 switch (substr(
$title, 0, 8)) {
309 $memberRoles[] = $role_id;
313 return $rbacreview->getNumberOfAssignedUsers($memberRoles);
330 $query =
"SELECT * FROM obj_members " .
331 "WHERE obj_id = " . $ilDB->quote($a_obj_id,
'integer') .
" " .
332 "AND usr_id = " . $ilDB->quote($a_usr_id,
'integer') .
" " .
333 "AND blocked = " . $ilDB->quote(1,
'integer');
335 return $res->numRows() ? true :
false;
351 $query =
"SELECT * FROM obj_members " .
352 "WHERE obj_id = " . $ilDB->quote($a_obj_id,
'integer') .
" " .
353 "AND usr_id = " . $ilDB->quote($a_usr_id,
'integer') .
" " .
356 return $res->numRows() ? true :
false;
372 $query =
"DELETE FROM obj_members " .
373 "WHERE obj_id = " . $ilDB->quote($a_obj_id,
'integer') .
" ";
376 $query =
"DELETE FROM il_subscribers " .
377 "WHERE obj_id = " . $ilDB->quote($a_obj_id,
'integer') .
"";
380 $query =
'DELETE FROM crs_waiting_list ' .
381 'WHERE obj_id = ' . $ilDB->quote($a_obj_id,
'integer');
382 $ilDB->manipulate(
$query);
399 $query =
"DELETE FROM obj_members WHERE usr_id = " . $ilDB->quote($a_usr_id,
'integer') .
"";
402 $query =
"DELETE FROM il_subscribers WHERE usr_id = " . $ilDB->quote($a_usr_id,
'integer') .
"";
405 include_once
'./Modules/Course/classes/class.ilCourseWaitingList.php';
423 $roles = $rbacreview->getRolesOfRoleFolder($a_ref_id,
false);
425 foreach (
$roles as $role) {
427 if (substr(
$title, 0, 13) == (
'il_' .
$type .
'_member')) {
462 $query =
"SELECT * FROM obj_members " .
463 "WHERE notification = 1 " .
464 "AND obj_id = " . $ilDB->quote($this->obj_id) .
" ";
468 $recp[] =
$row->usr_id;
471 return $recp ? $recp :
array();
482 return count($this->members);
493 return count($this->participants);
507 return $this->participants ? $this->participants :
array();
519 return $this->members ? $this->members :
array();
529 return $this->admins ? $this->admins :
array();
550 return $this->tutors ? $this->tutors :
array();
562 return in_array($a_usr_id, $this->admins) ? true :
false;
574 return in_array($a_usr_id, $this->tutors) ? true :
false;
586 return in_array($a_usr_id, $this->members) ? true :
false;
601 return in_array($a_usr_id, $this->participants);
624 return $this->roles ? $this->roles :
array();
638 foreach ($this->roles as $role) {
639 if ($rbacreview->isAssigned($a_usr_id, $role)) {
643 return $assigned ? $assigned :
array();
656 global $rbacreview,$rbacadmin;
660 foreach ($this->
getRoles() as $role_id) {
661 if ($rbacreview->isAssigned($a_usr_id, $role_id)) {
662 if (!in_array($role_id,
$roles)) {
663 $rbacadmin->deassignUser($role_id, $a_usr_id);
666 if (in_array($role_id,
$roles)) {
667 $rbacadmin->assignUser($role_id, $a_usr_id);
671 $rbacreview->clearCaches();
685 foreach ($this->
getAdmins() as $admin_id) {
686 if (!in_array($admin_id, $a_usr_ids)) {
702 if (isset($this->participants_status[$a_usr_id])) {
703 return $this->participants_status[$a_usr_id][
'blocked'] ? true :
false;
717 if (isset($this->participants_status[$a_usr_id])) {
718 return $this->participants_status[$a_usr_id][
'passed'] ? true :
false;
730 public function delete($a_usr_id)
732 global $rbacadmin,
$ilDB;
735 foreach ($this->roles as $role_id) {
736 $rbacadmin->deassignUser($role_id, $a_usr_id);
739 $query =
"DELETE FROM obj_members " .
740 "WHERE usr_id = " . $ilDB->quote($a_usr_id,
'integer') .
" " .
741 "AND obj_id = " . $ilDB->quote($this->obj_id,
'integer');
747 $GLOBALS[
'ilAppEventHandler']->raise(
751 'obj_id' => $this->obj_id,
752 'usr_id' => $a_usr_id)
770 $this->participants_status[$a_usr_id][
'blocked'] = (int) $a_blocked;
772 $query =
"SELECT * FROM obj_members " .
773 "WHERE obj_id = " . $ilDB->quote($this->obj_id,
'integer') .
" " .
774 "AND usr_id = " . $ilDB->quote($a_usr_id,
'integer');
776 if (
$res->numRows()) {
777 $query =
"UPDATE obj_members SET " .
778 "blocked = " . $ilDB->quote((
int) $a_blocked,
'integer') .
" " .
779 "WHERE obj_id = " . $ilDB->quote($this->obj_id,
'integer') .
" " .
780 "AND usr_id = " . $ilDB->quote($a_usr_id,
'integer');
782 $query =
"INSERT INTO obj_members (blocked,obj_id,usr_id,notification,passed) " .
784 $ilDB->quote((
int) $a_blocked,
'integer') .
", " .
785 $ilDB->quote($this->obj_id,
'integer') .
", " .
786 $ilDB->quote($a_usr_id,
'integer') .
", " .
787 $ilDB->quote(0,
'integer') .
", " .
788 $ilDB->quote(0,
'integer') .
808 'UPDATE obj_members SET ' .
809 'contact = ' . $ilDB->quote($a_contact,
'integer') .
' ' .
810 'WHERE obj_id = ' . $ilDB->quote($this->obj_id,
'integer') .
' ' .
811 'AND usr_id = ' . $ilDB->quote($a_usr_id,
'integer')
814 $this->participants_status[$a_usr_id][
'contact'] = $a_contact;
825 foreach ((
array) $this->participants_status as $usr_id => $status) {
826 if ($status[
'contact']) {
827 $contacts[] = $usr_id;
848 $this->participants_status[$a_usr_id][
'notification'] = (int) $a_notification;
850 $query =
"SELECT * FROM obj_members " .
851 "WHERE obj_id = " . $ilDB->quote($this->obj_id,
'integer') .
" " .
852 "AND usr_id = " . $ilDB->quote($a_usr_id,
'integer');
854 if (
$res->numRows()) {
855 $query =
"UPDATE obj_members SET " .
856 "notification = " . $ilDB->quote((
int) $a_notification,
'integer') .
" " .
857 "WHERE obj_id = " . $ilDB->quote($this->obj_id,
'integer') .
" " .
858 "AND usr_id = " . $ilDB->quote($a_usr_id,
'integer');
860 $query =
"INSERT INTO obj_members (notification,obj_id,usr_id,passed,blocked) " .
862 $ilDB->quote((
int) $a_notification,
'integer') .
", " .
863 $ilDB->quote($this->obj_id,
'integer') .
", " .
864 $ilDB->quote($a_usr_id,
'integer') .
", " .
865 $ilDB->quote(0,
'integer') .
", " .
866 $ilDB->quote(0,
'integer') .
884 public function add($a_usr_id, $a_role)
886 global $rbacadmin,
$ilLog,$ilAppEventHandler;
894 $this->admins[] = $a_usr_id;
898 $this->tutors[] = $a_usr_id;
902 $this->members[] = $a_usr_id;
906 $this->admins[] = $a_usr_id;
910 $this->members[] = $a_usr_id;
914 $this->members[] = $a_usr_id;
918 $this->participants[] = $a_usr_id;
919 $rbacadmin->assignUser($this->role_data[$a_role], $a_usr_id);
924 include_once
'./Services/Membership/classes/class.ilWaitingList.php';
927 $ilLog->write(__METHOD__ .
': Raise new event: ' . $this->
getComponent() .
' addParticipant');
928 $ilAppEventHandler->raise(
932 'obj_id' => $this->obj_id,
933 'usr_id' => $a_usr_id,
934 'role_id' => $a_role)
949 foreach ($a_user_ids as $user_id) {
950 $this->
delete($user_id);
997 if (isset($this->participants_status[$a_usr_id])) {
998 return $this->participants_status[$a_usr_id][
'notification'] ? true :
false;
1010 if (isset($this->participants_status[$a_usr_id])) {
1011 return (
bool) $this->participants_status[$a_usr_id][
'contact'];
1024 if (array_key_exists($a_role_type, $this->role_data)) {
1025 return $this->role_data[$a_role_type];
1041 global $rbacreview,$ilObjDataCache,
$ilLog;
1043 $GLOBALS[
'rbacreview']->clearCaches();
1044 $this->roles = $rbacreview->getRolesOfRoleFolder($this->ref_id,
false);
1047 $this->participants =
array();
1048 $this->members = $this->admins = $this->tutors =
array();
1050 $additional_roles = [];
1051 $auto_generated_roles = [];
1052 foreach ($this->roles as $role_id) {
1053 $title = $ilObjDataCache->lookupTitle($role_id);
1054 switch (substr(
$title, 0, 8)) {
1058 $this->participants = array_unique(array_merge($assigned = $rbacreview->assignedUsers($role_id),
$this->participants));
1059 $this->members = array_unique(array_merge($assigned, $this->members));
1060 $this->role_assignments[$role_id] = $assigned;
1066 $this->participants = array_unique(array_merge($assigned = $rbacreview->assignedUsers($role_id),
$this->participants));
1067 $this->admins = $rbacreview->assignedUsers($role_id);
1068 $this->role_assignments[$role_id] = $assigned;
1074 $this->participants = array_unique(array_merge($assigned = $rbacreview->assignedUsers($role_id),
$this->participants));
1075 $this->tutors = $rbacreview->assignedUsers($role_id);
1076 $this->role_assignments[$role_id] = $assigned;
1082 $this->participants = array_unique(array_merge($assigned = $rbacreview->assignedUsers($role_id),
$this->participants));
1083 $this->admins = $rbacreview->assignedUsers($role_id);
1084 $this->role_assignments[$role_id] = $assigned;
1090 $this->participants = array_unique(array_merge($assigned = $rbacreview->assignedUsers($role_id),
$this->participants));
1091 $this->members = $rbacreview->assignedUsers($role_id);
1092 $this->role_assignments[$role_id] = $assigned;
1097 $this->participants = array_unique(array_merge($assigned = $rbacreview->assignedUsers($role_id),
$this->participants));
1098 $this->members = $rbacreview->assignedUsers($role_id);
1103 $additional_roles[$role_id] =
$title;
1104 $this->participants = array_unique(array_merge($assigned = $rbacreview->assignedUsers($role_id),
$this->participants));
1105 $this->members = array_unique(array_merge($assigned, $this->members));
1106 $this->role_assignments[$role_id] = $assigned;
1110 asort($auto_generated_roles);
1111 asort($additional_roles);
1112 $this->roles_sorted = $auto_generated_roles + $additional_roles;
1126 $query =
"SELECT * FROM obj_members " .
1127 "WHERE obj_id = " . $ilDB->quote($this->obj_id,
'integer') .
" ";
1129 $this->participants_status =
array();
1131 $this->participants_status[
$row->usr_id][
'blocked'] =
$row->blocked;
1132 $this->participants_status[
$row->usr_id][
'notification'] =
$row->notification;
1133 $this->participants_status[
$row->usr_id][
'passed'] =
$row->passed;
1135 $this->participants_status[
$row->usr_id][
'contact'] =
$row->contact;
1149 global $rbacreview,$ilObjDataCache,
$ilDB;
1153 include_once
'./Services/User/classes/class.ilObjUser.php';
1158 $and =
"AND login = " . $ilDB->quote($tmp_user->getLogin(),
'text') .
" ";
1161 $and =
"AND email = " . $ilDB->quote($tmp_user->getEmail(),
'text') .
" ";
1163 case 'matriculation':
1164 $and =
"AND matriculation = " . $ilDB->quote($tmp_user->getMatriculation(),
'text') .
" ";
1168 $and =
"AND usr_id = " . $ilDB->quote($a_usr_id,
'integer') .
" ";
1176 $query =
"SELECT * FROM usr_data ud " .
1177 "WHERE " . $ilDB->in(
'usr_id', $this->
getParticipants(),
false,
'integer') .
" " .
1181 return $res->numRows() ? true :
false;
1190 $query =
"SELECT usr_id FROM il_subscribers " .
1191 "WHERE obj_id = " . $ilDB->quote($a_obj_id,
'integer') .
" " .
1192 "ORDER BY sub_time ";
1243 if (!is_array($a_usr_ids) or !count($a_usr_ids)) {
1246 foreach ($a_usr_ids as
$id) {
1263 $ilErr->setMessage(
"");
1265 $ilErr->appendMessage($this->lng->txt(
"crs_user_notsubscribed"));
1271 $ilErr->appendMessage($tmp_obj->getLogin() .
": " . $this->lng->txt(
"crs_user_already_assigned"));
1277 $ilErr->appendMessage($this->lng->txt(
"crs_user_not_exists"));
1290 $this->
register($tmp_obj->getId());
1306 foreach ($this->subscribers as $subscriber) {
1311 #$this->sendNotification($this->NOTIFY_ACCEPT_SUBSCRIBER,$subscriber); 1328 $query =
"INSERT INTO il_subscribers (usr_id,obj_id,subject,sub_time) " .
1330 $ilDB->quote($a_usr_id,
'integer') .
"," .
1331 $ilDB->quote($this->obj_id,
'integer') .
", " .
1332 $ilDB->quote(
'',
'text') .
", " .
1333 $ilDB->quote(
time(),
'integer') .
1350 $query =
"UPDATE il_subscribers " .
1351 "SET sub_time = " . $ilDB->quote($a_subtime,
'integer') .
" " .
1352 "WHERE usr_id = " . $ilDB->quote($a_usr_id,
'integer') .
" " .
1353 "AND obj_id = " . $ilDB->quote($this->obj_id,
'integer') .
" ";
1370 $query =
"UPDATE il_subscribers " .
1371 "SET subject = " . $ilDB->quote($a_subject,
'text') .
" " .
1372 "WHERE usr_id = " . $ilDB->quote($a_usr_id,
'integer') .
" " .
1373 "AND obj_id = " . $ilDB->quote($this->obj_id,
'integer') .
" ";
1388 $query =
"DELETE FROM il_subscribers " .
1389 "WHERE usr_id = " . $ilDB->quote($a_usr_id,
'integer') .
" " .
1390 "AND obj_id = " . $ilDB->quote($this->obj_id,
'integer') .
" ";
1406 if (!is_array($a_usr_ids) or !count($a_usr_ids)) {
1407 $ilErr->setMessage(
'');
1408 $ilErr->appendMessage($this->lng->txt(
"no_usr_ids_given"));
1412 $query =
"DELETE FROM il_subscribers " .
1413 "WHERE " . $ilDB->in(
'usr_id', (
array) $a_usr_ids,
false,
'integer') .
" " .
1414 "AND obj_id = " . $ilDB->quote($this->obj_id,
'integer');
1429 $query =
"SELECT * FROM il_subscribers " .
1430 "WHERE usr_id = " . $ilDB->quote($a_usr_id,
'integer') .
" " .
1431 "AND obj_id = " . $ilDB->quote($this->obj_id,
'integer') .
"";
1450 $query =
"SELECT * FROM il_subscribers " .
1451 "WHERE usr_id = " . $ilDB->quote($a_usr_id,
'integer') .
" " .
1452 "AND obj_id = " . $ilDB->quote($a_obj_id,
'integer') .
"";
1470 $this->subscribers =
array();
1472 $query =
"SELECT usr_id FROM il_subscribers " .
1473 "WHERE obj_id = " . $ilDB->quote($this->obj_id,
'integer') .
" " .
1474 "ORDER BY sub_time ";
1482 $this->subscribers[] =
$row->usr_id;
1496 $query =
"SELECT * FROM il_subscribers " .
1497 "WHERE obj_id = " . $ilDB->quote($this->obj_id,
'integer') .
" " .
1498 "AND usr_id = " . $ilDB->quote($a_usr_id,
'integer') .
"";
1513 $query =
'SELECT * FROM il_subscribers ' .
1514 'WHERE obj_id = ' . $ilDB->quote($a_obj_id,
'integer');
1541 $j2 =
"JOIN object_data obd2 ON (ua.rol_id = obd2.obj_id) ";
1542 $a2 =
"AND obd2.title LIKE 'il_" .
$a_type .
"_mem%' ";
1545 $query =
"SELECT DISTINCT obd.obj_id,obr.ref_id FROM rbac_ua ua " .
1546 "JOIN rbac_fa fa ON ua.rol_id = fa.rol_id " .
1547 "JOIN object_reference obr ON fa.parent = obr.ref_id " .
1548 "JOIN object_data obd ON obr.obj_id = obd.obj_id " .
1550 "WHERE obd.type = " . $ilDB->quote(
$a_type,
'text') .
" " .
1551 "AND fa.assign = 'y' " .
1552 "AND ua.usr_id = " . $ilDB->quote($a_usr_id,
'integer') .
" " .
1557 while (
$row = $ilDB->fetchObject(
$res)) {
1558 $obj_ids[] =
$row->obj_id;
1561 $set = $ilDB->query(
"SELECT obj_id, usr_id FROM obj_members " .
1562 " WHERE " . $ilDB->in(
"obj_id", $obj_ids,
false,
"integer") .
1563 " AND contact = " . $ilDB->quote(1,
"integer"));
1565 while ($rec = $ilDB->fetchAssoc($set)) {
1580 $sortable_assignments =
'9999999999';
1581 foreach ($this->roles_sorted as $role_id => $trash) {
1582 if (in_array($a_user_id, (
array) $this->role_assignments[$role_id])) {
1583 $sortable_assignments = substr_replace($sortable_assignments,
'1',
$counter, 1);
1587 return $sortable_assignments;
getObjId()
get current obj_id
static _isParticipant($a_ref_id, $a_usr_id)
Static function to check if a user is a participant of the container object.
__construct($a_component_name, $a_ref_id)
Singleton Constructor.
getCountMembers()
Get number of members (not participants)
static _getAllSupportContactsOfUser($a_usr_id, $a_type)
Get all support contacts for a user.
addDesktopItem($a_usr_id)
Add desktop item.
static _isSubscriber($a_obj_id, $a_usr_id)
check if user is subscriber
static _deleteAllEntries($a_obj_id)
Delete all entries Normally called for course deletion.
autoFillSubscribers()
Assign subscriber.
static lookupNumberOfParticipants($a_ref_id)
Lookup the number of participants (crs admins, tutors, members, grp admins, members) ...
static lookupNumberOfMembers($a_ref_id)
Lookup number of members ilRbacReview $rbacreview <type> $ilObjDataCache.
updateContact($a_usr_id, $a_contact)
Update contact setting type $ilDB.
Session participation handling.
readParticipantsStatus()
Read status of participants (blocked, notification, passed)
checkLastAdmin($a_usr_ids)
Check if user for deletion are last admins.
deleteParticipants($a_user_ids)
Delete users.
isAssigned($a_usr_id)
check if user is assigned
isLastAdmin($a_usr_id)
Check if user is last admin.
getCountAdmins()
Get number of admins.
static lookupSubscribers($a_obj_id)
updateBlocked($a_usr_id, $a_blocked)
Update blocked status.
static _deleteUser($a_usr_id)
Delete user.
query($sql, $a_handle_error=true)
Query.
assignSubscriber($a_usr_id)
Assign subscriber.
isAdmin($a_usr_id)
is user admin
static _getMembershipByType($a_usr_id, $a_type, $a_only_member_role=false)
get membership by type Get course or group membership
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
static _getInstanceByObjId($a_obj_id)
Get singleton instance.
if(!array_key_exists('StateId', $_REQUEST)) $id
isNotificationEnabled($a_usr_id)
check if notification is enabled
readSubscriberData($a_usr_id)
read subscribers
static _lookupTitle($a_id)
lookup object title
isMember($a_usr_id)
is user member
readSubscribers()
read subscribers
static getDefaultMemberRole($a_ref_id)
static _isBlocked($a_obj_id, $a_usr_id)
Check if user is blocked.
dropDesktopItem($a_usr_id)
Drop desktop item.
getAutoGeneratedRoleId($a_role_type)
Get role id of auto generated role type.
deleteSubscriber($a_usr_id)
Delete subsciber.
getAssignedRoles($a_usr_id)
Get assigned roles.
const IL_ROLE_POSITION_MEMBER
updateSubject($a_usr_id, $a_subject)
update subject
static _getInstanceByObjId($a_obj_id)
Get instance.
add($a_usr_id, $a_role)
Add user to object.
static hasParticipantListAccess($a_obj_id, $a_usr_id=null)
Check if (current) user has access to the participant list.
static _getAllReferences($a_id)
get all reference ids of object
updateNotification($a_usr_id, $a_notification)
Update notification status.
getCountSubscribers()
get number of subscribers
static lookupShowMembersEnabled($a_obj_id)
Check if show member is enabled.
static getInstance($a_ref_id)
Get instance by ref_id.
setRoleOrderPosition($a_user_id)
Set role order position.
deleteSubscribers($a_usr_ids)
Delete subscibers.
getMembers()
Get all members ids (admins and tutors are not members) Use get participants to fetch all...
static lookupShowMembersEnabled(int $a_obj_id)
foreach($_POST as $key=> $value) $res
updateSubscriptionTime($a_usr_id, $a_subtime)
Update subscription time.
isSubscriber($a_usr_id)
check if is subscriber
getCountParticipants()
Get number of participants.
getSubscribers()
get all subscribers
static _lookupObjId($a_id)
getParticipants()
Get all participants ids.
addSubscriber($a_usr_id)
Add subscriber.
static _dropDesktopItem($a_usr_id, $a_item_id, $a_type)
drop an item from user's personal desktop
static _hasPassed($a_obj_id, $a_usr_id)
Check if user has passed course.
isContact($a_usr_id)
Check if user is contact.
const IL_CRS_ADMIN
Base class for course and group participants.
isBlocked($a_usr_id)
Check if user is blocked.
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
static _getInstanceByObjId($a_obj_id)
Get singleton instance.
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
hasPassed($a_usr_id)
Check if user has passed course.
getRoles()
Get course roles.
static getInstance($a_ref_id)
Get instance.
static lookupSubscribersData($a_obj_id)
assignSubscribers($a_usr_ids)
Assign subscribers.
static _addDesktopItem($a_usr_id, $a_item_id, $a_type, $a_par="")
add an item to user's personal desktop
updateRoleAssignments($a_usr_id, $a_roles)
Update role assignments.
getAdmins()
Get all admins ids.
getComponent()
Get component name Used for raising events.
static _deleteUser($a_usr_id)
Delete user data.
const IL_ROLE_POSITION_ADMIN
getNotificationRecipients()
Get admin, tutor which have notification enabled.
getContacts()
get user ids which are confirgured as contact
static deleteUserEntry($a_usr_id, $a_obj_id)
Delete one user entry.
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
static getInstanceByObjId($a_obj_id)
Get instance by obj type.
isGroupingMember($a_usr_id, $a_field='')
Check grouping membership.
getType()
Get object type.
isTutor($a_usr_id)
is user tutor
getSubscriberData($a_usr_id)
get subscriber data
const IL_ROLE_POSITION_TUTOR
static _isDesktopItem($a_usr_id, $a_item_id, $a_type)
check wether an item is on the users desktop or not
readParticipants()
Read participants.
getTutors()
Get all tutors ids.