ILIAS  trunk Revision v13.0_alpha-46-gad4e41c4eac
ilParticipants Class Reference

Base class for course and group participants. More...

+ Inheritance diagram for ilParticipants:
+ Collaboration diagram for ilParticipants:

Public Member Functions

 __construct (string $a_component_name, int $a_ref_id)
 
 getObjId ()
 
 getType ()
 
 getNotificationRecipients ()
 Get admin, tutor which have notification enabled. More...
 
 getCountMembers ()
 Get number of members (not participants) More...
 
 getCountParticipants ()
 Get number of participants. More...
 
 getParticipants ()
 Get all participants ids. More...
 
 getMembers ()
 Get all members ids (admins and tutors are not members) Use get participants to fetch all. More...
 
 getAdmins ()
 Get all admins ids. More...
 
 getCountAdmins ()
 
 getTutors ()
 Get all tutors ids. More...
 
 isAdmin (int $a_usr_id)
 check if user is admin More...
 
 isTutor (int $a_usr_id)
 is user tutor More...
 
 isMember (int $a_usr_id)
 is user member More...
 
 isAssigned (int $a_usr_id)
 check if user is assigned More...
 
 isLastAdmin (int $a_usr_id)
 Check if user is last admin. More...
 
 getRoles ()
 Get object roles. More...
 
 getAssignedRoles (int $a_usr_id)
 Get assigned roles. More...
 
 updateRoleAssignments ($a_usr_id, $a_roles)
 Update role assignments @access public. More...
 
 checkLastAdmin (array $a_usr_ids)
 Check if users for deletion are last admins @access public. More...
 
 isBlocked (int $a_usr_id)
 Check if user is blocked. More...
 
 hasPassed (int $a_usr_id)
 Check if user has passed object. More...
 
 delete (int $a_usr_id)
 Drop user from all roles. More...
 
 updateBlocked (int $a_usr_id, bool $a_blocked)
 Update blocked status. More...
 
 updateContact (int $a_usr_id, bool $a_contact)
 
 getContacts ()
 get user ids which are confirgured as contact More...
 
 updateNotification (int $a_usr_id, bool $a_notification)
 Update notification status. More...
 
 add (int $a_usr_id, int $a_role)
 
 deleteParticipants (array $a_user_ids)
 
 addRecommendation (int $a_usr_id)
 Add desktop item @access public. More...
 
 isNotificationEnabled (int $a_usr_id)
 
 isContact (int $a_usr_id)
 
 getAutoGeneratedRoleId (int $a_role_type)
 
 isGroupingMember (int $a_usr_id, string $a_field='')
 Check membership for. More...
 
 getSubscribers ()
 get all subscribers int[] More...
 
 getCountSubscribers ()
 
 getSubscriberData (int $a_usr_id)
 
 assignSubscribers (array $a_usr_ids)
 
 assignSubscriber (int $a_usr_id)
 
 autoFillSubscribers ()
 
 addSubscriber (int $a_usr_id)
 
 updateSubscriptionTime (int $a_usr_id, int $a_subtime)
 
 updateSubject (int $a_usr_id, string $a_subject)
 
 deleteSubscriber (int $a_usr_id)
 
 deleteSubscribers (array $a_usr_ids)
 
 isSubscriber (int $a_usr_id)
 
 setRoleOrderPosition (int $a_user_id)
 Set role order position. More...
 

Static Public Member Functions

static getInstance (int $a_ref_id)
 
static getInstanceByObjId (int $a_obj_id)
 Get instance by obj type. More...
 
static hasParticipantListAccess (int $a_obj_id, ?int $a_usr_id=null)
 Check if (current) user has access to the participant list. More...
 
static canSendMailToMembers (int|ilObject $ref_id_or_instance, ?int $usr_id=null, ?int $mail_obj_ref_id=null)
 This method was introduced as a band-aid fix for #22764. More...
 
static getUserMembershipAssignmentsByType (array $a_user_ids, array $a_type, bool $a_only_member_roles)
 Get user membership assignments by type. More...
 
static _getMembershipByType (int $a_usr_id, array $a_type, bool $a_only_member_role=false)
 get membership by type Get course or group membership More...
 
static _isParticipant (int $a_ref_id, int $a_usr_id)
 Static function to check if a user is a participant of the container object. More...
 
static lookupNumberOfParticipants (int $a_ref_id)
 Lookup the number of participants (crs admins, tutors, members, grp admins, members) More...
 
static lookupNumberOfMembers (int $a_ref_id)
 Lookup number of members. More...
 
static _isBlocked (int $a_obj_id, int $a_usr_id)
 Check if user is blocked. More...
 
static _hasPassed (int $a_obj_id, int $a_usr_id)
 Check if user has passed course. More...
 
static _deleteAllEntries (int $a_obj_id)
 Delete all entries Normally called in case of object deletion. More...
 
static _deleteUser (int $a_usr_id)
 Delete user data. More...
 
static getDefaultMemberRole (int $a_ref_id)
 
static lookupSubscribers (int $a_obj_id)
 
static _isSubscriber (int $a_obj_id, int $a_usr_id)
 
static lookupSubscribersData (int $a_obj_id)
 
static _getAllSupportContactsOfUser (int $a_usr_id, string $a_type)
 Get all support contacts for a user. More...
 

Data Fields

const IL_CRS_ADMIN = 1
 
const IL_CRS_TUTOR = 3
 
const IL_CRS_MEMBER = 2
 
const IL_GRP_ADMIN = 4
 
const IL_GRP_MEMBER = 5
 
const IL_SESS_MEMBER = 6
 
const IL_LSO_ADMIN = 7
 
const IL_LSO_MEMBER = 8
 
const IL_ROLE_POSITION_ADMIN = 1
 
const IL_ROLE_POSITION_TUTOR = 2
 
const IL_ROLE_POSITION_MEMBER = 3
 

Protected Member Functions

 getComponent ()
 Get component name Used for raising events. More...
 
 readParticipants ()
 
 readParticipantsStatus ()
 Read status of participants (blocked, notification, passed) More...
 
 readSubscribers ()
 
 readSubscriberData (int $a_usr_id)
 

Protected Attributes

string $component = ''
 
int $ref_id = 0
 
int $obj_id = 0
 
string $type = ''
 
array $roles = []
 
array $role_data = []
 
array $roles_sorted = []
 
array $role_assignments = []
 
array $participants = []
 
array $participants_status = []
 
array $members = []
 
array $tutors = []
 
array $admins = []
 
array $subscribers = []
 
ilAppEventHandler $eventHandler
 
ilRbacReview $rbacReview
 
ilRbacAdmin $rbacAdmin
 
ilObjectDataCache $objectDataCache
 
ilDBInterface $ilDB
 
ilLanguage $lng
 
ilLogger $logger
 
ilErrorHandling $error
 
ilRecommendedContentManager $recommended_content_manager
 

Detailed Description

Base class for course and group participants.

Author
Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e
Version
$Id$
Todo:
move these constants to ilParticipants

Definition at line 30 of file class.ilParticipants.php.

Constructor & Destructor Documentation

◆ __construct()

ilParticipants::__construct ( string  $a_component_name,
int  $a_ref_id 
)
Parameters
stringcomponent definition e.g Modules/Course used for event handler
intref_id of container

Definition at line 72 of file class.ilParticipants.php.

73 {
74 global $DIC;
75
76 $this->ilDB = $DIC->database();
77 $this->lng = $DIC->language();
78 $this->logger = $DIC->logger()->mmbr();
79 $this->eventHandler = $DIC->event();
80 $this->rbacReview = $DIC->rbac()->review();
81 $this->rbacAdmin = $DIC->rbac()->admin();
82 $this->objectDataCache = $DIC['ilObjDataCache'];
83 $this->error = $DIC['ilErr'];
84 $this->component = $a_component_name;
85 $this->ref_id = $a_ref_id;
86 $this->obj_id = ilObject::_lookupObjId($a_ref_id);
87 $this->type = ilObject::_lookupType($this->obj_id);
88 $this->recommended_content_manager = new ilRecommendedContentManager();
89
90 $this->readParticipants();
92 }
static _lookupType(int $id, bool $reference=false)
static _lookupObjId(int $ref_id)
readParticipantsStatus()
Read status of participants (blocked, notification, passed)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: shib_login.php:26

References $DIC, ilObject\_lookupObjId(), ilObject\_lookupType(), ILIAS\Repository\lng(), ILIAS\Repository\logger(), ILIAS\Repository\objectDataCache(), readParticipants(), and readParticipantsStatus().

+ Here is the call graph for this function:

Member Function Documentation

◆ _deleteAllEntries()

static ilParticipants::_deleteAllEntries ( int  $a_obj_id)
static

Delete all entries Normally called in case of object deletion.

Definition at line 440 of file class.ilParticipants.php.

440 : void
441 {
442 global $DIC;
443
444 $ilDB = $DIC->database();
445 $query = "DELETE FROM obj_members " .
446 "WHERE obj_id = " . $ilDB->quote($a_obj_id, 'integer') . " ";
447 $res = $ilDB->manipulate($query);
448
449 $query = "DELETE FROM il_subscribers " .
450 "WHERE obj_id = " . $ilDB->quote($a_obj_id, 'integer') . " ";
451 $res = $ilDB->manipulate($query);
452
453 $query = 'DELETE FROM crs_waiting_list ' .
454 'WHERE obj_id = ' . $ilDB->quote($a_obj_id, 'integer');
455 $ilDB->manipulate($query);
456 }
quote($value, string $type)
manipulate(string $query)
Run a (write) Query on the database.
foreach($_POST as $key=> $value) $res

References $DIC, $ilDB, and $res.

Referenced by ilObjCourse\delete(), ilObjGroup\delete(), and ilObjLearningSequence\delete().

+ Here is the caller graph for this function:

◆ _deleteUser()

static ilParticipants::_deleteUser ( int  $a_usr_id)
static

Delete user data.

Definition at line 461 of file class.ilParticipants.php.

461 : void
462 {
463 global $DIC;
464
465 $ilDB = $DIC->database();
466 $query = "DELETE FROM obj_members WHERE usr_id = " . $ilDB->quote($a_usr_id, 'integer');
467 $res = $ilDB->manipulate($query);
468
469 $query = "DELETE FROM il_subscribers WHERE usr_id = " . $ilDB->quote($a_usr_id, 'integer');
470 $res = $ilDB->manipulate($query);
471
473 }
static _deleteUser(int $a_usr_id)

References $DIC, $ilDB, $res, and ilWaitingList\_deleteUser().

Referenced by ilObjCourse\_deleteUser().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _getAllSupportContactsOfUser()

static ilParticipants::_getAllSupportContactsOfUser ( int  $a_usr_id,
string  $a_type 
)
static

Get all support contacts for a user.

Parameters
int$a_usr_idusr_id
string$a_typecrs or grp
Returns
array array of contacts (keys are usr_id and obj_id)
Todo:

join the two queries or alternatively reuse _getMembershipByType

fix returning fetchAssoc result

Definition at line 1346 of file class.ilParticipants.php.

1346 : array
1347 {
1348 global $DIC;
1349
1350 $ilDB = $DIC['ilDB'];
1351
1352 // for the first part
1353
1354 // this will also dismiss local roles!
1355 $j2 = "JOIN object_data obd2 ON (ua.rol_id = obd2.obj_id) ";
1356 $a2 = "AND obd2.title LIKE 'il_" . $a_type . "_mem%' ";
1357
1358 // #14290 - no role folder anymore
1359 $query = "SELECT DISTINCT obd.obj_id,obr.ref_id FROM rbac_ua ua " .
1360 "JOIN rbac_fa fa ON ua.rol_id = fa.rol_id " .
1361 "JOIN object_reference obr ON fa.parent = obr.ref_id " .
1362 "JOIN object_data obd ON obr.obj_id = obd.obj_id " .
1363 $j2 .
1364 "WHERE obd.type = " . $ilDB->quote($a_type, 'text') . " " .
1365 "AND fa.assign = 'y' " .
1366 "AND ua.usr_id = " . $ilDB->quote($a_usr_id, 'integer') . " " .
1367 $a2;
1368
1369 $res = $ilDB->query($query);
1370 $obj_ids = array();
1371 while ($row = $ilDB->fetchObject($res)) {
1372 $obj_ids[] = (int) $row->obj_id;
1373 }
1374
1375 $set = $ilDB->query("SELECT obj_id, usr_id FROM obj_members " .
1376 " WHERE " . $ilDB->in("obj_id", $obj_ids, false, "integer") .
1377 " AND contact = " . $ilDB->quote(1, "integer"));
1378 $res = array();
1379 while ($rec = $ilDB->fetchAssoc($set)) {
1380 $res[] = $rec;
1381 }
1382 return $res;
1383 }
fetchObject(ilDBStatement $query_result)
query(string $query)
Run a (read-only) Query on the database.
fetchAssoc(ilDBStatement $statement)
in(string $field, array $values, bool $negate=false, string $type="")

References $DIC, $ilDB, $res, and ILIAS\Repository\int().

Referenced by ILIAS\Awareness\User\ProviderCourseContacts\getInitialUserSet().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _getMembershipByType()

static ilParticipants::_getMembershipByType ( int  $a_usr_id,
array  $a_type,
bool  $a_only_member_role = false 
)
static

get membership by type Get course or group membership

Parameters
int$a_usr_idusr_id
string[]$a_typearray of object types
Returns
int[]

Definition at line 305 of file class.ilParticipants.php.

309 : array {
310 global $DIC;
311
312 $ilDB = $DIC['ilDB'];
313
314 $j2 = '';
315 $a2 = '';
316 // this will also dismiss local roles!
317 if ($a_only_member_role) {
318 $j2 = "JOIN object_data obd2 ON (ua.rol_id = obd2.obj_id) ";
319 $a2 = 'AND obd2.title = ' . $ilDB->concat(
320 array(
321 array($ilDB->quote('il_', 'text')),
322 array('obd.type'),
323 array($ilDB->quote('_member_', 'text')),
324 array('obr.ref_id'),
325 ),
326 false
327 );
328 }
329
330 // #14290 - no role folder anymore
331 $query = "SELECT DISTINCT obd.obj_id,obr.ref_id FROM rbac_ua ua " .
332 "JOIN rbac_fa fa ON ua.rol_id = fa.rol_id " .
333 "JOIN object_reference obr ON fa.parent = obr.ref_id " .
334 "JOIN object_data obd ON obr.obj_id = obd.obj_id " .
335 $j2 .
336 "WHERE " . $ilDB->in("obd.type", $a_type, false, "text") . ' ' .
337 "AND fa.assign = 'y' " .
338 "AND ua.usr_id = " . $ilDB->quote($a_usr_id, 'integer') . " " .
339 'AND obr.deleted IS NULL ' .
340 $a2;
341 $res = $ilDB->query($query);
342 $ref_ids = [];
343 while ($row = $ilDB->fetchObject($res)) {
344 $ref_ids[] = (int) $row->obj_id;
345 }
346 return $ref_ids;
347 }
concat(array $values, bool $allow_null=true)

References $ilDB.

Referenced by ILIAS\Awareness\User\ProviderMemberships\getInitialUserSet(), ILIAS\News\Domain\UserContextResolver\getMembershipContexts(), ilMailSearchObjectGUI\getOwnObjectIds(), ilTestEvaluationData\getParticipants(), ilWorkspaceAccessHandler\getPossibleSharedTargets(), ilPortfolioAccessHandler\getPossibleSharedTargets(), MailSearchObjectsTable\initRecords(), ilCalendarCategories\readPDCalendars(), ilCalendarCategories\readReposCalendars(), ilWorkspaceAccessGUI\share(), ilObjectCopyGUI\showSourceSelectionMembership(), and ILIAS\PersonalWorkspace\InternalGUIService\workspaceShareMembershipIds().

+ Here is the caller graph for this function:

◆ _hasPassed()

static ilParticipants::_hasPassed ( int  $a_obj_id,
int  $a_usr_id 
)
static

Check if user has passed course.

Definition at line 423 of file class.ilParticipants.php.

423 : bool
424 {
425 global $DIC;
426
427 $ilDB = $DIC->database();
428 $query = "SELECT * FROM obj_members " .
429 "WHERE obj_id = " . $ilDB->quote($a_obj_id, 'integer') . " " .
430 "AND usr_id = " . $ilDB->quote($a_usr_id, 'integer') . " " .
431 "AND passed = '1'";
432 $res = $ilDB->query($query);
433 return (bool) $res->numRows();
434 }

References $DIC, $ilDB, and $res.

Referenced by ilObjCourseAccess\checkCondition(), and ilLPStatusManualByTutor\refreshStatus().

+ Here is the caller graph for this function:

◆ _isBlocked()

static ilParticipants::_isBlocked ( int  $a_obj_id,
int  $a_usr_id 
)
static

Check if user is blocked.

Definition at line 407 of file class.ilParticipants.php.

407 : bool
408 {
409 global $DIC;
410
411 $ilDB = $DIC->database();
412 $query = "SELECT * FROM obj_members " .
413 "WHERE obj_id = " . $ilDB->quote($a_obj_id, 'integer') . " " .
414 "AND usr_id = " . $ilDB->quote($a_usr_id, 'integer') . " " .
415 "AND blocked = " . $ilDB->quote(1, 'integer');
416 $res = $ilDB->query($query);
417 return (bool) $res->numRows();
418 }

References $DIC, $ilDB, and $res.

◆ _isParticipant()

static ilParticipants::_isParticipant ( int  $a_ref_id,
int  $a_usr_id 
)
static

Static function to check if a user is a participant of the container object.

Reimplemented in ilGroupParticipants, ilLearningSequenceParticipants, and ilSessionParticipants.

Definition at line 352 of file class.ilParticipants.php.

352 : bool
353 {
354 global $DIC;
355
356 $rbacreview = $DIC->rbac()->review();
357 $local_roles = $rbacreview->getRolesOfRoleFolder($a_ref_id, false);
358 return $rbacreview->isAssignedToAtLeastOneGivenRole($a_usr_id, $local_roles);
359 }

References $DIC.

Referenced by ilObjCourseGUI\executeCommand(), ilMembershipGUI\executeCommand(), ilObjCourseGUI\getTabs(), ilObjCourseGUI\initHeaderAction(), ilParticipantsPerAssignmentTableGUI\parseData(), and ilLPProgressBlockGUI\setActions().

+ Here is the caller graph for this function:

◆ _isSubscriber()

static ilParticipants::_isSubscriber ( int  $a_obj_id,
int  $a_usr_id 
)
static

Definition at line 1262 of file class.ilParticipants.php.

1262 : bool
1263 {
1264 global $DIC;
1265
1266 $ilDB = $DIC->database();
1267 $query = "SELECT * FROM il_subscribers " .
1268 "WHERE usr_id = " . $ilDB->quote($a_usr_id, 'integer') . " " .
1269 "AND obj_id = " . $ilDB->quote($a_obj_id, 'integer');
1270
1271 $res = $ilDB->query($query);
1272 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
1273 return true;
1274 }
1275 return false;
1276 }
const FETCHMODE_OBJECT

References $DIC, $ilDB, $res, and ilDBConstants\FETCHMODE_OBJECT.

Referenced by ilObjSessionAccess\_checkAccess(), and ilObjCourseListGUI\getProperties().

+ Here is the caller graph for this function:

◆ add()

ilParticipants::add ( int  $a_usr_id,
int  $a_role 
)

Reimplemented in ilCourseParticipants, ilGroupParticipants, ilLearningSequenceParticipants, and ilSessionParticipants.

Definition at line 818 of file class.ilParticipants.php.

818 : bool
819 {
820 if ($a_usr_id === ANONYMOUS_USER_ID) {
821 return false;
822 }
823
824 if ($this->isAssigned($a_usr_id)) {
825 return false;
826 }
827
828 switch ($a_role) {
832 $this->admins[] = $a_usr_id;
833 break;
834
836 $this->tutors[] = $a_usr_id;
837 break;
838
843 $this->members[] = $a_usr_id;
844 break;
845 }
846
847 $this->participants[] = $a_usr_id;
848 $this->rbacAdmin->assignUser($this->role_data[$a_role], $a_usr_id);
849
850 // Delete subscription request
851 $this->deleteSubscriber($a_usr_id);
852
853 ilWaitingList::deleteUserEntry($a_usr_id, $this->obj_id);
854
855 if ($this instanceof ilCourseParticipants) {
856 // Refresh participant status in cached instances of ilCourseParticipant,
857 // needed for lp status determination (#47389)
858 // Needs to be done before the 'addParticipant' event is raised.
859 ilCourseParticipant::_getInstanceByObjId($this->obj_id, $a_usr_id)->reinitialize();
860 }
861
862 $this->eventHandler->raise(
863 $this->getComponent(),
864 "addParticipant",
865 array(
866 'obj_id' => $this->obj_id,
867 'usr_id' => $a_usr_id,
868 'role_id' => $a_role
869 )
870 );
871 return true;
872 }
static _getInstanceByObjId(int $a_obj_id, int $a_usr_id)
getComponent()
Get component name Used for raising events.
isAssigned(int $a_usr_id)
check if user is assigned
deleteSubscriber(int $a_usr_id)
static deleteUserEntry(int $a_usr_id, int $a_obj_id)
const ANONYMOUS_USER_ID
Definition: constants.php:27

References ilCourseParticipant\_getInstanceByObjId(), ANONYMOUS_USER_ID, and ilWaitingList\deleteUserEntry().

+ Here is the call graph for this function:

◆ addRecommendation()

ilParticipants::addRecommendation ( int  $a_usr_id)

Add desktop item @access public.

Definition at line 889 of file class.ilParticipants.php.

889 : void
890 {
891 // deactivated for now, see discussion at
892 // https://docu.ilias.de/goto_docu_wiki_wpage_5620_1357.html
893 // $this->recommended_content_manager->addObjectRecommendation($a_usr_id, $this->ref_id);
894 }

Referenced by ilCourseParticipants\add(), and ilGroupParticipants\add().

+ Here is the caller graph for this function:

◆ addSubscriber()

ilParticipants::addSubscriber ( int  $a_usr_id)

Reimplemented in ilCourseParticipants, ilGroupParticipants, and ilLearningSequenceParticipants.

Definition at line 1197 of file class.ilParticipants.php.

1197 : void
1198 {
1199 $query = "INSERT INTO il_subscribers (usr_id,obj_id,subject,sub_time) " .
1200 " VALUES (" .
1201 $this->ilDB->quote($a_usr_id, 'integer') . "," .
1202 $this->ilDB->quote($this->obj_id, 'integer') . ", " .
1203 $this->ilDB->quote('', 'text') . ", " .
1204 $this->ilDB->quote(time(), 'integer') .
1205 ")";
1206 $res = $this->ilDB->manipulate($query);
1207 }

References $res.

◆ assignSubscriber()

ilParticipants::assignSubscriber ( int  $a_usr_id)

Definition at line 1145 of file class.ilParticipants.php.

1145 : bool
1146 {
1147 $this->error->setMessage("");
1148 if (!$this->isSubscriber($a_usr_id)) {
1149 $this->error->appendMessage($this->lng->txt("crs_user_notsubscribed"));
1150
1151 return false;
1152 }
1153 if ($this->isAssigned($a_usr_id)) {
1154 $tmp_obj = ilObjectFactory::getInstanceByObjId($a_usr_id);
1155 $this->error->appendMessage($tmp_obj->getLogin() . ": " . $this->lng->txt("crs_user_already_assigned"));
1156
1157 return false;
1158 }
1159
1160 if (!$tmp_obj = ilObjectFactory::getInstanceByObjId($a_usr_id, false)) {
1161 $this->error->appendMessage($this->lng->txt("crs_user_not_exists"));
1162 return false;
1163 }
1164
1165 if ($this instanceof ilCourseParticipants) {
1166 $this->add($tmp_obj->getId(), self::IL_CRS_MEMBER);
1167 }
1168 if ($this instanceof ilGroupParticipants) {
1169 $this->add($tmp_obj->getId(), self::IL_GRP_MEMBER);
1170 }
1171 if ($this instanceof ilLearningSequenceParticipants) {
1172 $this->add($tmp_obj->getId(), self::IL_LSO_MEMBER);
1173 }
1174 if ($this instanceof ilSessionParticipants) {
1175 $this->register($tmp_obj->getId());
1176 }
1177 $this->deleteSubscriber($a_usr_id);
1178 return true;
1179 }
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
isSubscriber(int $a_usr_id)
add(int $a_usr_id, int $a_role)
Session participation handling.

References ILIAS\UI\examples\Symbol\Glyph\Add\add(), ilObjectFactory\getInstanceByObjId(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ assignSubscribers()

ilParticipants::assignSubscribers ( array  $a_usr_ids)

Definition at line 1132 of file class.ilParticipants.php.

1132 : bool
1133 {
1134 if (!is_array($a_usr_ids) || !count($a_usr_ids)) {
1135 return false;
1136 }
1137 foreach ($a_usr_ids as $id) {
1138 if (!$this->assignSubscriber($id)) {
1139 return false;
1140 }
1141 }
1142 return true;
1143 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
assignSubscriber(int $a_usr_id)

References $id.

◆ autoFillSubscribers()

ilParticipants::autoFillSubscribers ( )
Todo:
check and fix notification

Definition at line 1184 of file class.ilParticipants.php.

1184 : int
1185 {
1186 $this->readSubscribers();
1187 $counter = 0;
1188 foreach ($this->subscribers as $subscriber) {
1189 if (!$this->assignSubscriber($subscriber)) {
1190 continue;
1191 }
1192 ++$counter;
1193 }
1194 return $counter;
1195 }

◆ canSendMailToMembers()

static ilParticipants::canSendMailToMembers ( int|ilObject  $ref_id_or_instance,
?int  $usr_id = null,
?int  $mail_obj_ref_id = null 
)
static

This method was introduced as a band-aid fix for #22764.

Please do not use this anywhere else.

Definition at line 198 of file class.ilParticipants.php.

202 : bool {
203 global $DIC;
204
205 $access = $DIC->access();
206 $rbacsystem = $DIC->rbac()->system();
207
208 if (is_null($usr_id)) {
209 $usr_id = $DIC->user()->getId();
210 }
211 if (is_null($mail_obj_ref_id)) {
212 $mail_obj_ref_id = (new ilMail($usr_id))->getMailObjectReferenceId();
213 }
214 if (is_int($ref_id_or_instance)) {
215 $ref_id = $ref_id_or_instance;
216 } elseif ($ref_id_or_instance instanceof ilObject) {
217 $ref_id = (int) $ref_id_or_instance->getRefId();
218 if ($ref_id === 0) {
219 $ref_id = array_keys(ilObject::_getAllReferences($ref_id_or_instance->getId()))[0];
220 }
221 } else {
222 return false;
223 }
224
225 if (
226 $access->checkAccess('manage_members', '', $ref_id) &&
227 $rbacsystem->checkAccess('internal_mail', $mail_obj_ref_id)
228 ) {
229 return true;
230 }
231
232 $part = self::getInstance($ref_id);
233 if (!$part->isAssigned($usr_id)) {
234 return false;
235 }
236
237 $object = $ref_id_or_instance;
238 if (is_int($ref_id_or_instance)) {
239 $object = ilObjectFactory::getInstanceByRefId($ref_id_or_instance);
240 }
241
242 if ($object instanceof ilObjCourse) {
243 return $object->getMailToMembersType() == ilCourseConstants::MAIL_ALLOWED_ALL;
244 } elseif ($object instanceof ilObjGroup) {
245 return $object->getMailToMembersType() == ilObjGroup::MAIL_ALLOWED_ALL;
246 } elseif ($object instanceof ilObjSession) {
247 return $object->getMailToMembersType() == ilObjSession::MAIL_ALLOWED_ALL;
248 }
249
250 return false;
251 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilObjGroup.
const MAIL_ALLOWED_ALL
static getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id
Class ilObject Basic functions for all objects.
static _getAllReferences(int $id)
get all reference ids for object ID
static getInstance(int $a_ref_id)

References $DIC.

Referenced by MailSearchObjectsTable\initRecords(), and ilMailSearchObjectGUI\mailObjects().

+ Here is the caller graph for this function:

◆ checkLastAdmin()

ilParticipants::checkLastAdmin ( array  $a_usr_ids)

Check if users for deletion are last admins @access public.

Parameters
int[]array of user ids for deletion
Todo:
fix this and add unit test

Reimplemented in ilSessionParticipants.

Definition at line 675 of file class.ilParticipants.php.

675 : bool
676 {
677 foreach ($this->getAdmins() as $admin_id) {
678 if (!in_array($admin_id, $a_usr_ids)) {
679 return true;
680 }
681 }
682 return false;
683 }
getAdmins()
Get all admins ids.

◆ delete()

ilParticipants::delete ( int  $a_usr_id)

Drop user from all roles.

Definition at line 710 of file class.ilParticipants.php.

710 : void
711 {
712 $this->recommended_content_manager->removeObjectRecommendation($a_usr_id, $this->ref_id);
713 foreach ($this->roles as $role_id) {
714 $this->rbacAdmin->deassignUser($role_id, $a_usr_id);
715 }
716
717 $query = "DELETE FROM obj_members " .
718 "WHERE usr_id = " . $this->ilDB->quote($a_usr_id, 'integer') . " " .
719 "AND obj_id = " . $this->ilDB->quote($this->obj_id, 'integer');
720 $res = $this->ilDB->manipulate($query);
721
722 $this->readParticipants();
723 $this->readParticipantsStatus();
724
725 $this->eventHandler->raise(
726 $this->getComponent(),
727 "deleteParticipant",
728 [
729 'obj_id' => $this->obj_id,
730 'usr_id' => $a_usr_id
731 ]
732 );
733 }

References $res.

◆ deleteParticipants()

ilParticipants::deleteParticipants ( array  $a_user_ids)
Parameters
int[]

Definition at line 877 of file class.ilParticipants.php.

877 : bool
878 {
879 foreach ($a_user_ids as $user_id) {
880 $this->delete($user_id);
881 }
882 return true;
883 }

References $user_id.

◆ deleteSubscriber()

ilParticipants::deleteSubscriber ( int  $a_usr_id)

Definition at line 1227 of file class.ilParticipants.php.

1227 : void
1228 {
1229 $query = "DELETE FROM il_subscribers " .
1230 "WHERE usr_id = " . $this->ilDB->quote($a_usr_id, 'integer') . " " .
1231 "AND obj_id = " . $this->ilDB->quote($this->obj_id, 'integer') . " ";
1232 $res = $this->ilDB->manipulate($query);
1233 }

References $res.

◆ deleteSubscribers()

ilParticipants::deleteSubscribers ( array  $a_usr_ids)

Definition at line 1235 of file class.ilParticipants.php.

1235 : bool
1236 {
1237 if (!count($a_usr_ids)) {
1238 $this->error->setMessage('');
1239 $this->error->appendMessage($this->lng->txt("no_usr_ids_given"));
1240 return false;
1241 }
1242 $query = "DELETE FROM il_subscribers " .
1243 "WHERE " . $this->ilDB->in('usr_id', $a_usr_ids, false, 'integer') . " " .
1244 "AND obj_id = " . $this->ilDB->quote($this->obj_id, 'integer');
1245 $res = $this->ilDB->query($query);
1246 return true;
1247 }

References $res, and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ getAdmins()

ilParticipants::getAdmins ( )

Get all admins ids.

Returns
int[]

Definition at line 566 of file class.ilParticipants.php.

566 : array
567 {
568 return $this->admins;
569 }

Referenced by ilLTIAdvantagePlatformMembershipService\getRoles().

+ Here is the caller graph for this function:

◆ getAssignedRoles()

ilParticipants::getAssignedRoles ( int  $a_usr_id)

Get assigned roles.

Definition at line 636 of file class.ilParticipants.php.

636 : array
637 {
638 $assigned = [];
639 foreach ($this->roles as $role) {
640 if ($this->rbacReview->isAssigned($a_usr_id, $role)) {
641 $assigned[] = $role;
642 }
643 }
644 return $assigned;
645 }

◆ getAutoGeneratedRoleId()

ilParticipants::getAutoGeneratedRoleId ( int  $a_role_type)

Definition at line 912 of file class.ilParticipants.php.

912 : int
913 {
914 if (array_key_exists($a_role_type, $this->role_data)) {
915 return $this->role_data[$a_role_type];
916 }
917 return 0;
918 }

◆ getComponent()

ilParticipants::getComponent ( )
protected

Get component name Used for raising events.

Definition at line 151 of file class.ilParticipants.php.

151 : string
152 {
153 return $this->component;
154 }

References $component.

◆ getContacts()

ilParticipants::getContacts ( )

get user ids which are confirgured as contact

Returns
int[]

Definition at line 778 of file class.ilParticipants.php.

778 : array
779 {
780 $contacts = array();
781 foreach ($this->participants_status as $usr_id => $status) {
782 if ($status['contact']) {
783 $contacts[] = (int) $usr_id;
784 }
785 }
786 return $contacts;
787 }

References ILIAS\Repository\int().

+ Here is the call graph for this function:

◆ getCountAdmins()

ilParticipants::getCountAdmins ( )

Definition at line 571 of file class.ilParticipants.php.

571 : int
572 {
573 return count($this->getAdmins());
574 }

◆ getCountMembers()

ilParticipants::getCountMembers ( )

Get number of members (not participants)

Definition at line 530 of file class.ilParticipants.php.

530 : int
531 {
532 return count($this->members);
533 }

◆ getCountParticipants()

ilParticipants::getCountParticipants ( )

Get number of participants.

Definition at line 538 of file class.ilParticipants.php.

538 : int
539 {
540 return count($this->participants);
541 }

◆ getCountSubscribers()

ilParticipants::getCountSubscribers ( )

Definition at line 1122 of file class.ilParticipants.php.

1122 : int
1123 {
1124 return count($this->getSubscribers());
1125 }
getSubscribers()
get all subscribers int[]

◆ getDefaultMemberRole()

static ilParticipants::getDefaultMemberRole ( int  $a_ref_id)
static

Definition at line 475 of file class.ilParticipants.php.

475 : int
476 {
477 global $DIC;
478
479 $rbacreview = $DIC->rbac()->review();
480
481 $obj_id = ilObject::_lookupObjId($a_ref_id);
483
484 if (!in_array($type, array('crs', 'grp'))) {
485 return 0;
486 }
487
488 $roles = $rbacreview->getRolesOfRoleFolder($a_ref_id, false);
489 foreach ($roles as $role) {
490 $title = ilObject::_lookupTitle($role);
491 if (strpos($title, ('il_' . $type . '_member')) === 0) {
492 return $role;
493 }
494 }
495 return 0;
496 }
static _lookupTitle(int $obj_id)

References $DIC, ilObject\_lookupObjId(), ilObject\_lookupTitle(), and ilObject\_lookupType().

Referenced by ilContSkillAdminGUI\__construct(), ilContSkillPresentationGUI\__construct(), ilCourseRegistrationGUI\add(), ilRepositorySearchGUI\addRole(), ilContainerImporter\finalProcessing(), ILIAS\Skill\Usage\SkillUsageManager\getAssignedObjectsForSkillProfile(), ILIAS\Container\Skills\ContainerSkillManager\getProfileSkills(), ilRbacSystem\initMemberView(), and ilSkillProfileGUI\saveLocal().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getInstance()

static ilParticipants::getInstance ( int  $a_ref_id)
static

Reimplemented in ilSessionParticipants.

Definition at line 94 of file class.ilParticipants.php.

95 {
96 global $DIC;
97
98 $logger = $DIC->logger()->mmbr();
99
100 $obj_id = ilObject::_lookupObjId($a_ref_id);
102
103 switch ($type) {
104 case 'crs':
105 case 'grp':
106 case 'lso':
108 case 'sess':
109 return ilSessionParticipants::getInstance($a_ref_id);
110 default:
111 $logger->logStack();
112 $logger->warning('Invalid ref_id -> obj_id given: ' . $a_ref_id . ' -> ' . $obj_id);
113 throw new InvalidArgumentException('Invalid obj_id given.');
114 }
115 }
warning(string $message, array $context=[])
logStack(?int $level=null, string $message='', array $context=[])
Base class for course and group participants.
static getInstanceByObjId(int $a_obj_id)
Get instance by obj type.
static getInstance(int $a_ref_id)

References $DIC, $logger, $obj_id, $type, ilObject\_lookupObjId(), ilObject\_lookupType(), ilSessionParticipants\getInstance(), getInstanceByObjId(), ilLogger\logStack(), and ilLogger\warning().

Referenced by ilSessionParticipantsTableGUI\__construct(), ilEventParticipants\__read(), ilMailSearchObjectGUI\collectMemberRowIds(), ilSessionParticipantsTableGUI\collectParticipants(), ilCourseMembershipGUI\deleteParticipantsWithLinkedCourses(), ilMembershipGUI\executeCommand(), ilDashboardBlockGUI\getManageFields(), ilCourseReferenceLP\getMembers(), ilMembershipGUI\getMembersObject(), ilSessionParticipantsTableGUI\getParentLocalRoles(), ilTrQuery\getParticipantsForObject(), ilStudyProgrammeMembershipSourceReaderFactory\getReaderFor(), ilECSAppEventListener\handleMembership(), ilCourseReferenceAppEventListener\handleReferences(), hasParticipantListAccess(), ilObjGroupGUI\infoScreen(), ilMembershipGUI\initAttendanceList(), MailSearchObjectMembershipsTable\initRecords(), MailSearchObjectsTable\initRecords(), ilCourseReferencePathInfo\isReferenceMemberUpdateConfirmationRequired(), ilCourseReferenceDeleteConfirmationTableGUI\readLinkedCourseAssignments(), ilObjSessionGUI\registerObject(), ilObjSessionGUI\showJoinRequestButton(), ilLPProgressBlockGUI\supportsMembers(), and ilSessionMembershipGUI\updateMembers().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getInstanceByObjId()

static ilParticipants::getInstanceByObjId ( int  $a_obj_id)
static

Get instance by obj type.

Deprecated:
since version 5.4 use getInstance() (ref_id based)
Todo:
remove this method in favour of selff::getInstance

Definition at line 122 of file class.ilParticipants.php.

123 {
124 global $DIC;
125
126 $logger = $DIC->logger()->mmbr();
127
128 $type = ilObject::_lookupType($a_obj_id);
129 switch ($type) {
130 case 'crs':
132
133 case 'grp':
135
136 case 'sess':
138 case 'lso':
140 default:
142 $logger()->mmbr()->warning(': Invalid obj_id given: ' . $a_obj_id);
143 throw new InvalidArgumentException('Invalid obj id given');
144 }
145 }
static _getInstanceByObjId(int $a_obj_id)
static _getInstanceByObjId(int $a_obj_id)
Get singleton instance.
static _getInstanceByObjId(int $a_obj_id)

References $DIC, $logger, $type, ilCourseParticipants\_getInstanceByObjId(), ilGroupParticipants\_getInstanceByObjId(), ilSessionParticipants\_getInstanceByObjId(), ilLearningSequenceParticipants\_getInstanceByObjId(), ilObject\_lookupType(), ilLogger\logStack(), ilLogger\warning(), and ilLogLevel\WARNING.

Referenced by ilGroupParticipantsTableGUI\__construct(), ilCourseParticipantsTableGUI\__construct(), ilGroupAddToGroupActionGUI\addUser(), ilAppointmentPresentationCourseGUI\collectPropertiesAndActions(), ilGroupAddToGroupActionGUI\confirmAddUser(), ilGroupAddToGroupActionGUI\createGroupAndAddUser(), getInstance(), ilLPStatusManualByTutor\getMembers(), ILIAS\Search\GUI\UserAssignment\Table\ObjectDataRetrieval\getRows(), ilObjCourseGUI\infoScreen(), ilRepositorySearchGUI\listUsers(), and ilMembershipGUI\membersMap().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getMembers()

ilParticipants::getMembers ( )

Get all members ids (admins and tutors are not members) Use get participants to fetch all.

Returns
int[]

Definition at line 557 of file class.ilParticipants.php.

557 : array
558 {
559 return $this->members;
560 }

Referenced by ilLTIAdvantagePlatformMembershipService\getRoles().

+ Here is the caller graph for this function:

◆ getNotificationRecipients()

ilParticipants::getNotificationRecipients ( )

Get admin, tutor which have notification enabled.

Returns
int[] of user ids

Definition at line 512 of file class.ilParticipants.php.

512 : array
513 {
514 $query = "SELECT * FROM obj_members " .
515 "WHERE notification = 1 " .
516 "AND obj_id = " . $this->ilDB->quote($this->obj_id, ilDBConstants::T_INTEGER) . " ";
517 $res = $this->ilDB->query($query);
518 $recp = [];
519 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
520 if ($this->isAdmin((int) $row->usr_id) || $this->isTutor((int) $row->usr_id)) {
521 $recp[] = (int) $row->usr_id;
522 }
523 }
524 return $recp;
525 }
isAdmin(int $a_usr_id)
check if user is admin

References $res, ilDBConstants\FETCHMODE_OBJECT, ILIAS\Repository\int(), and ilDBConstants\T_INTEGER.

Referenced by ilGroupParticipants\sendNotification(), and ilLearningSequenceParticipants\sendNotification().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getObjId()

ilParticipants::getObjId ( )

Definition at line 498 of file class.ilParticipants.php.

498 : int
499 {
500 return $this->obj_id;
501 }

Referenced by ilCourseParticipants\addSubscriber(), ilGroupParticipants\addSubscriber(), ilLearningSequenceParticipants\addSubscriber(), and ilSessionParticipants\register().

+ Here is the caller graph for this function:

◆ getParticipants()

ilParticipants::getParticipants ( )

Get all participants ids.

Returns
int[]

Definition at line 547 of file class.ilParticipants.php.

547 : array
548 {
549 return $this->participants;
550 }

Referenced by ilSessionParticipants\readParticipantsStatus().

+ Here is the caller graph for this function:

◆ getRoles()

ilParticipants::getRoles ( )

Get object roles.

Definition at line 628 of file class.ilParticipants.php.

628 : array
629 {
630 return $this->roles;
631 }

◆ getSubscriberData()

ilParticipants::getSubscriberData ( int  $a_usr_id)

Definition at line 1127 of file class.ilParticipants.php.

1127 : array
1128 {
1129 return $this->readSubscriberData($a_usr_id);
1130 }
readSubscriberData(int $a_usr_id)

◆ getSubscribers()

ilParticipants::getSubscribers ( )

get all subscribers int[]

Definition at line 1116 of file class.ilParticipants.php.

1116 : array
1117 {
1118 $this->readSubscribers();
1119 return $this->subscribers;
1120 }

◆ getTutors()

ilParticipants::getTutors ( )

Get all tutors ids.

Returns
int[]

Definition at line 580 of file class.ilParticipants.php.

580 : array
581 {
582 return $this->tutors;
583 }

Referenced by ilLTIAdvantagePlatformMembershipService\getRoles().

+ Here is the caller graph for this function:

◆ getType()

ilParticipants::getType ( )

Definition at line 503 of file class.ilParticipants.php.

503 : string
504 {
505 return $this->type;
506 }

◆ getUserMembershipAssignmentsByType()

static ilParticipants::getUserMembershipAssignmentsByType ( array  $a_user_ids,
array  $a_type,
bool  $a_only_member_roles 
)
static

Get user membership assignments by type.

Definition at line 257 of file class.ilParticipants.php.

261 : array {
262 global $DIC;
263
264 $ilDB = $DIC->database();
265
266 $j2 = $a2 = '';
267 if ($a_only_member_roles) {
268 $j2 = "JOIN object_data obd2 ON (ua.rol_id = obd2.obj_id) ";
269 $a2 = 'AND obd2.title = ' . $ilDB->concat(
270 array(
271 array($ilDB->quote('il_', 'text')),
272 array('obd.type'),
273 array($ilDB->quote('_member_', 'text')),
274 array('obr.ref_id'),
275 ),
276 false
277 );
278 }
279
280 $query = "SELECT DISTINCT obd.obj_id,obr.ref_id,ua.usr_id FROM rbac_ua ua " .
281 "JOIN rbac_fa fa ON ua.rol_id = fa.rol_id " .
282 "JOIN object_reference obr ON fa.parent = obr.ref_id " .
283 "JOIN object_data obd ON obr.obj_id = obd.obj_id " .
284 $j2 .
285 "WHERE " . $ilDB->in("obd.type", $a_type, false, "text") .
286 "AND fa.assign = 'y' " .
287 'AND ' . $ilDB->in('ua.usr_id', $a_user_ids, false, 'integer') . ' ' .
288 $a2;
289
290 $obj_ids = [];
291 $res = $ilDB->query($query);
292 while ($row = $ilDB->fetchObject($res)) {
293 $obj_ids[(int) $row->obj_id][] = (int) $row->usr_id;
294 }
295 return $obj_ids;
296 }

References $ilDB.

Referenced by ilTimingsUser\lookupTimings().

+ Here is the caller graph for this function:

◆ hasParticipantListAccess()

static ilParticipants::hasParticipantListAccess ( int  $a_obj_id,
?int  $a_usr_id = null 
)
static

Check if (current) user has access to the participant list.

Definition at line 159 of file class.ilParticipants.php.

159 : bool
160 {
161 global $DIC;
162
163 $access = $DIC->access();
164
165 if (!$a_usr_id) {
166 $a_usr_id = $DIC->user()->getId();
167 }
168
169 // if write access granted => return true
170 $refs = ilObject::_getAllReferences($a_obj_id);
171 $ref_id = end($refs);
172
173 if ($access->checkAccess('manage_members', '', $ref_id)) {
174 return true;
175 }
176 $part = self::getInstance($ref_id);
177 if ($part->isAssigned($a_usr_id)) {
178 if ($part->getType() === 'crs') {
180 return false;
181 }
182 }
183 if ($part->getType() === 'grp') {
184 if (!ilObjGroup::lookupShowMembersEnabled($a_obj_id)) {
185 return false;
186 }
187 }
188 return true;
189 }
190 // User is not assigned to course/group => no read access
191 return false;
192 }
static lookupShowMembersEnabled(int $a_obj_id)
static lookupShowMembersEnabled(int $a_obj_id)

References $DIC, $ref_id, ilObject\_getAllReferences(), getInstance(), ilObjCourse\lookupShowMembersEnabled(), and ilObjGroup\lookupShowMembersEnabled().

Referenced by ILIAS\Search\GUI\UserAssignment\Table\ObjectDataRetrieval\getRows(), ilRepositorySearchGUI\listUsers(), and ilMailSearchGUI\showResults().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hasPassed()

ilParticipants::hasPassed ( int  $a_usr_id)

Check if user has passed object.

Definition at line 699 of file class.ilParticipants.php.

699 : bool
700 {
701 if (isset($this->participants_status[$a_usr_id])) {
702 return (bool) ($this->participants_status[$a_usr_id]['passed'] ?? false);
703 }
704 return false;
705 }

◆ isAdmin()

ilParticipants::isAdmin ( int  $a_usr_id)

check if user is admin

Definition at line 588 of file class.ilParticipants.php.

588 : bool
589 {
590 return in_array($a_usr_id, $this->admins);
591 }

Referenced by ilMembershipGUI\executeCommand().

+ Here is the caller graph for this function:

◆ isAssigned()

ilParticipants::isAssigned ( int  $a_usr_id)

check if user is assigned

Definition at line 612 of file class.ilParticipants.php.

612 : bool
613 {
614 return in_array($a_usr_id, $this->participants);
615 }

Referenced by ilForumModeratorsGUI\detachModeratorRole().

+ Here is the caller graph for this function:

◆ isBlocked()

ilParticipants::isBlocked ( int  $a_usr_id)

Check if user is blocked.

Definition at line 688 of file class.ilParticipants.php.

688 : bool
689 {
690 if (isset($this->participants_status[$a_usr_id])) {
691 return (bool) ($this->participants_status[$a_usr_id]['blocked'] ?? false);
692 }
693 return false;
694 }

◆ isContact()

ilParticipants::isContact ( int  $a_usr_id)

Definition at line 904 of file class.ilParticipants.php.

904 : bool
905 {
906 if (isset($this->participants_status[$a_usr_id])) {
907 return (bool) ($this->participants_status[$a_usr_id]['contact'] ?? false);
908 }
909 return false;
910 }

◆ isGroupingMember()

ilParticipants::isGroupingMember ( int  $a_usr_id,
string  $a_field = '' 
)

Check membership for.

Definition at line 1053 of file class.ilParticipants.php.

1053 : bool
1054 {
1055 if ($a_field === '') {
1056 return false;
1057 }
1058 // Used for membership limitations -> check membership by given field
1059 $tmp_user = ilObjectFactory::getInstanceByObjId($a_usr_id);
1060 if (!$tmp_user instanceof ilObjUser) {
1061 $this->logger->logStack(ilLogLevel::ERROR);
1062 throw new DomainException('Invalid user id given: ' . $a_usr_id);
1063 }
1064 switch ($a_field) {
1065 case 'login':
1066 $and = "AND login = " . $this->ilDB->quote($tmp_user->getLogin(), 'text') . " ";
1067 break;
1068 case 'email':
1069 $and = "AND email = " . $this->ilDB->quote($tmp_user->getEmail(), 'text') . " ";
1070 break;
1071 case 'matriculation':
1072 $and = "AND matriculation = " . $this->ilDB->quote($tmp_user->getMatriculation(), 'text') . " ";
1073 break;
1074
1075 default:
1076 $and = "AND usr_id = " . $this->ilDB->quote($a_usr_id, 'integer') . " ";
1077 break;
1078 }
1079
1080 if (!$this->getParticipants()) {
1081 return false;
1082 }
1083
1084 $query = "SELECT * FROM usr_data ud " .
1085 "WHERE " . $this->ilDB->in('usr_id', $this->getParticipants(), false, 'integer') . " " .
1086 $and;
1087
1088 $res = $this->ilDB->query($query);
1089 return (bool) $res->numRows();
1090 }
User class.
getParticipants()
Get all participants ids.

References $res, ilLogLevel\ERROR, ilObjectFactory\getInstanceByObjId(), and ILIAS\Repository\logger().

+ Here is the call graph for this function:

◆ isLastAdmin()

ilParticipants::isLastAdmin ( int  $a_usr_id)

Check if user is last admin.

Definition at line 620 of file class.ilParticipants.php.

620 : bool
621 {
622 return in_array($a_usr_id, $this->getAdmins()) && count($this->getAdmins()) === 1;
623 }

◆ isMember()

ilParticipants::isMember ( int  $a_usr_id)

is user member

Definition at line 604 of file class.ilParticipants.php.

604 : bool
605 {
606 return in_array($a_usr_id, $this->members);
607 }

◆ isNotificationEnabled()

ilParticipants::isNotificationEnabled ( int  $a_usr_id)

Definition at line 896 of file class.ilParticipants.php.

896 : bool
897 {
898 if (isset($this->participants_status[$a_usr_id])) {
899 return (bool) ($this->participants_status[$a_usr_id]['notification'] ?? false);
900 }
901 return false;
902 }

◆ isSubscriber()

ilParticipants::isSubscriber ( int  $a_usr_id)

Definition at line 1249 of file class.ilParticipants.php.

1249 : bool
1250 {
1251 $query = "SELECT * FROM il_subscribers " .
1252 "WHERE usr_id = " . $this->ilDB->quote($a_usr_id, 'integer') . " " .
1253 "AND obj_id = " . $this->ilDB->quote($this->obj_id, 'integer');
1254
1255 $res = $this->ilDB->query($query);
1256 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
1257 return true;
1258 }
1259 return false;
1260 }

References $res, and ilDBConstants\FETCHMODE_OBJECT.

◆ isTutor()

ilParticipants::isTutor ( int  $a_usr_id)

is user tutor

Definition at line 596 of file class.ilParticipants.php.

596 : bool
597 {
598 return in_array($a_usr_id, $this->tutors);
599 }

◆ lookupNumberOfMembers()

static ilParticipants::lookupNumberOfMembers ( int  $a_ref_id)
static

Lookup number of members.

Definition at line 376 of file class.ilParticipants.php.

376 : int
377 {
378 global $DIC;
379
380 $rbacreview = $DIC->rbac()->review();
381 $ilObjDataCache = $DIC['ilObjDataCache'];
382 $has_policies = $rbacreview->getLocalPolicies($a_ref_id);
383 if (!$has_policies) {
384 return 0;
385 }
386 $lroles = $rbacreview->getRolesOfRoleFolder($a_ref_id, false);
387 $memberRoles = array();
388 foreach ($lroles as $role_id) {
389 $title = $ilObjDataCache->lookupTitle($role_id);
390 switch (substr($title, 0, 8)) {
391 case 'il_crs_a':
392 case 'il_crs_t':
393 case 'il_grp_a':
394 break;
395
396 default:
397 $memberRoles[] = $role_id;
398 break;
399 }
400 }
401 return $rbacreview->getNumberOfAssignedUsers($memberRoles);
402 }

References $DIC.

Referenced by ilObjCourse\handleAutoFill(), ilObjGroup\handleAutoFill(), and ilObjSession\handleAutoFill().

+ Here is the caller graph for this function:

◆ lookupNumberOfParticipants()

static ilParticipants::lookupNumberOfParticipants ( int  $a_ref_id)
static

Lookup the number of participants (crs admins, tutors, members, grp admins, members)

Definition at line 364 of file class.ilParticipants.php.

364 : int
365 {
366 global $DIC;
367
368 $rbacreview = $DIC->rbac()->review();
369 $lroles = $rbacreview->getRolesOfRoleFolder($a_ref_id, false);
370 return $rbacreview->getNumberOfAssignedUsers($lroles);
371 }

References $DIC.

◆ lookupSubscribers()

static ilParticipants::lookupSubscribers ( int  $a_obj_id)
static
Returns
int[]

Definition at line 1095 of file class.ilParticipants.php.

1095 : array
1096 {
1097 global $DIC;
1098
1099 $ilDB = $DIC['ilDB'];
1100 $subscribers = array();
1101 $query = "SELECT usr_id FROM il_subscribers " .
1102 "WHERE obj_id = " . $ilDB->quote($a_obj_id, 'integer') . " " .
1103 "ORDER BY sub_time ";
1104
1105 $res = $ilDB->query($query);
1106 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
1107 $subscribers[] = (int) $row->usr_id;
1108 }
1109 return $subscribers;
1110 }

References $DIC, $ilDB, $res, ilDBConstants\FETCHMODE_OBJECT, and ILIAS\Repository\int().

+ Here is the call graph for this function:

◆ lookupSubscribersData()

static ilParticipants::lookupSubscribersData ( int  $a_obj_id)
static
Parameters
int$a_usr_id
Returns
array<int, array<{time: int, usr_id: int, subject: string}>>

Definition at line 1320 of file class.ilParticipants.php.

1320 : array
1321 {
1322 global $DIC;
1323
1324 $ilDB = $DIC->database();
1325 $query = 'SELECT * FROM il_subscribers ' .
1326 'WHERE obj_id = ' . $ilDB->quote($a_obj_id, 'integer');
1327 $res = $ilDB->query($query);
1328
1329 $data = array();
1330 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
1331 $data[$row->usr_id]['time'] = (int) $row->sub_time;
1332 $data[$row->usr_id]['usr_id'] = (int) $row->usr_id;
1333 $data[$row->usr_id]['subject'] = (string) $row->subject;
1334 }
1335 return $data;
1336 }
$data
Definition: storeScorm.php:45

References $data, $DIC, $ilDB, $res, ilDBConstants\FETCHMODE_OBJECT, and ILIAS\Repository\int().

Referenced by ilSubscriberTableGUI\readSubscriberData().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readParticipants()

ilParticipants::readParticipants ( )
protected

Definition at line 920 of file class.ilParticipants.php.

920 : void
921 {
922 $this->roles = $this->rbacReview->getRolesOfRoleFolder($this->ref_id, false);
923 $this->participants = [];
924 $this->members = $this->admins = $this->tutors = [];
925
926 $additional_roles = [];
927 $auto_generated_roles = [];
928 foreach ($this->roles as $role_id) {
929 $title = $this->objectDataCache->lookupTitle($role_id);
930 switch (substr($title, 0, 8)) {
931 case 'il_crs_m':
932 $auto_generated_roles[$role_id] = self::IL_ROLE_POSITION_MEMBER;
933 $this->role_data[self::IL_CRS_MEMBER] = $role_id;
934 $this->participants = array_unique(array_merge(
935 $assigned = $this->rbacReview->assignedUsers($role_id),
936 $this->participants
937 ));
938 $this->members = array_unique(array_merge($assigned, $this->members));
939 $this->role_assignments[$role_id] = $assigned;
940 break;
941
942 case 'il_crs_a':
943 $auto_generated_roles[$role_id] = self::IL_ROLE_POSITION_ADMIN;
944 $this->role_data[self::IL_CRS_ADMIN] = $role_id;
945 $this->participants = array_unique(array_merge(
946 $assigned = $this->rbacReview->assignedUsers($role_id),
947 $this->participants
948 ));
949 $this->admins = $this->rbacReview->assignedUsers($role_id);
950 $this->role_assignments[$role_id] = $assigned;
951 break;
952
953 case 'il_crs_t':
954 $auto_generated_roles[$role_id] = self::IL_ROLE_POSITION_TUTOR;
955 $this->role_data[self::IL_CRS_TUTOR] = $role_id;
956 $this->participants = array_unique(array_merge(
957 $assigned = $this->rbacReview->assignedUsers($role_id),
958 $this->participants
959 ));
960 $this->tutors = $this->rbacReview->assignedUsers($role_id);
961 $this->role_assignments[$role_id] = $assigned;
962 break;
963
964 case 'il_grp_a':
965 $auto_generated_roles[$role_id] = self::IL_ROLE_POSITION_ADMIN;
966 $this->role_data[self::IL_GRP_ADMIN] = $role_id;
967 $this->participants = array_unique(array_merge(
968 $assigned = $this->rbacReview->assignedUsers($role_id),
969 $this->participants
970 ));
971 $this->admins = $this->rbacReview->assignedUsers($role_id);
972 $this->role_assignments[$role_id] = $assigned;
973 break;
974
975 case 'il_grp_m':
976 $auto_generated_roles[$role_id] = self::IL_ROLE_POSITION_MEMBER;
977 $this->role_data[self::IL_GRP_MEMBER] = $role_id;
978 $this->participants = array_unique(array_merge(
979 $assigned = $this->rbacReview->assignedUsers($role_id),
980 $this->participants
981 ));
982 $this->members = $this->rbacReview->assignedUsers($role_id);
983 $this->role_assignments[$role_id] = $assigned;
984 break;
985
986 case 'il_sess_':
987 $this->role_data[self::IL_SESS_MEMBER] = $role_id;
988 $this->participants = array_unique(array_merge(
989 $assigned = $this->rbacReview->assignedUsers($role_id),
990 $this->participants
991 ));
992 $this->members = $this->rbacReview->assignedUsers($role_id);
993 break;
994
995 case 'il_lso_m':
996 $auto_generated_roles[$role_id] = self::IL_ROLE_POSITION_MEMBER;
997 $this->role_data[self::IL_LSO_MEMBER] = $role_id;
998 $this->participants = array_unique(array_merge(
999 $assigned = $this->rbacReview->assignedUsers($role_id),
1000 $this->participants
1001 ));
1002 $this->members = $this->rbacReview->assignedUsers($role_id);
1003 $this->role_assignments[$role_id] = $assigned;
1004 break;
1005
1006 case 'il_lso_a':
1007 $auto_generated_roles[$role_id] = self::IL_ROLE_POSITION_ADMIN;
1008 $this->role_data[self::IL_LSO_ADMIN] = $role_id;
1009 $this->participants = array_unique(array_merge(
1010 $assigned = $this->rbacReview->assignedUsers($role_id),
1011 $this->participants
1012 ));
1013 $this->admins = $this->rbacReview->assignedUsers($role_id);
1014 $this->role_assignments[$role_id] = $assigned;
1015 break;
1016
1017 default:
1018 $additional_roles[$role_id] = $title;
1019 $this->participants = array_unique(array_merge(
1020 $assigned = $this->rbacReview->assignedUsers($role_id),
1021 $this->participants
1022 ));
1023 $this->members = array_unique(array_merge($assigned, $this->members));
1024 $this->role_assignments[$role_id] = $assigned;
1025 break;
1026 }
1027 }
1028 asort($auto_generated_roles);
1029 asort($additional_roles);
1030 $this->roles_sorted = $auto_generated_roles + $additional_roles;
1031 }

References ILIAS\Repository\objectDataCache().

Referenced by __construct().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readParticipantsStatus()

ilParticipants::readParticipantsStatus ( )
protected

Read status of participants (blocked, notification, passed)

Reimplemented in ilSessionParticipants.

Definition at line 1036 of file class.ilParticipants.php.

1036 : void
1037 {
1038 $query = "SELECT * FROM obj_members " .
1039 "WHERE obj_id = " . $this->ilDB->quote($this->obj_id, 'integer') . " ";
1040 $res = $this->ilDB->query($query);
1041 $this->participants_status = [];
1042 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
1043 $this->participants_status[(int) $row->usr_id]['blocked'] = (bool) $row->blocked;
1044 $this->participants_status[(int) $row->usr_id]['notification'] = (bool) $row->notification;
1045 $this->participants_status[(int) $row->usr_id]['passed'] = (bool) $row->passed;
1046 $this->participants_status[(int) $row->usr_id]['contact'] = (bool) $row->contact;
1047 }
1048 }

References $res, ilDBConstants\FETCHMODE_OBJECT, and ILIAS\Repository\int().

Referenced by __construct().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readSubscriberData()

ilParticipants::readSubscriberData ( int  $a_usr_id)
protected
Returns
array<{time: int, usr_id: int, subject: string}>

Definition at line 1300 of file class.ilParticipants.php.

1300 : array
1301 {
1302 $query = "SELECT * FROM il_subscribers " .
1303 "WHERE obj_id = " . $this->ilDB->quote($this->obj_id, 'integer') . " " .
1304 "AND usr_id = " . $this->ilDB->quote($a_usr_id, 'integer');
1305
1306 $res = $this->ilDB->query($query);
1307 $data = [];
1308 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
1309 $data["time"] = (int) $row->sub_time;
1310 $data["usr_id"] = (int) $row->usr_id;
1311 $data['subject'] = (string) $row->subject;
1312 }
1313 return $data;
1314 }

References $data, $res, ilDBConstants\FETCHMODE_OBJECT, and ILIAS\Repository\int().

+ Here is the call graph for this function:

◆ readSubscribers()

ilParticipants::readSubscribers ( )
protected
Todo:
fix performance; check if method is in use

Definition at line 1281 of file class.ilParticipants.php.

1281 : void
1282 {
1283 $this->subscribers = [];
1284 $query = "SELECT usr_id FROM il_subscribers " .
1285 "WHERE obj_id = " . $this->ilDB->quote($this->obj_id, 'integer') . " " .
1286 "ORDER BY sub_time ";
1287
1288 $res = $this->ilDB->query($query);
1289 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
1290 if (!ilObjectFactory::getInstanceByObjId((int) $row->usr_id, false)) {
1291 $this->deleteSubscriber((int) $row->usr_id);
1292 }
1293 $this->subscribers[] = (int) $row->usr_id;
1294 }
1295 }

References $res, ilDBConstants\FETCHMODE_OBJECT, ilObjectFactory\getInstanceByObjId(), and ILIAS\Repository\int().

+ Here is the call graph for this function:

◆ setRoleOrderPosition()

ilParticipants::setRoleOrderPosition ( int  $a_user_id)

Set role order position.

Definition at line 1388 of file class.ilParticipants.php.

1388 : string
1389 {
1390 $counter = 0;
1391 $sortable_assignments = '9999999999';
1392 foreach ($this->roles_sorted as $role_id => $trash) {
1393 if (in_array($a_user_id, (array) $this->role_assignments[$role_id])) {
1394 $sortable_assignments = substr_replace($sortable_assignments, '1', $counter, 1);
1395 }
1396 ++$counter;
1397 }
1398 return $sortable_assignments;
1399 }

◆ updateBlocked()

ilParticipants::updateBlocked ( int  $a_usr_id,
bool  $a_blocked 
)

Update blocked status.

Definition at line 738 of file class.ilParticipants.php.

738 : void
739 {
740 $this->participants_status[$a_usr_id]['blocked'] = (int) $a_blocked;
741 $query = "SELECT * FROM obj_members " .
742 "WHERE obj_id = " . $this->ilDB->quote($this->obj_id, 'integer') . " " .
743 "AND usr_id = " . $this->ilDB->quote($a_usr_id, 'integer');
744 $res = $this->ilDB->query($query);
745 if ($res->numRows()) {
746 $query = "UPDATE obj_members SET " .
747 "blocked = " . $this->ilDB->quote((int) $a_blocked, 'integer') . " " .
748 "WHERE obj_id = " . $this->ilDB->quote($this->obj_id, 'integer') . " " .
749 "AND usr_id = " . $this->ilDB->quote($a_usr_id, 'integer');
750 } else {
751 $query = "INSERT INTO obj_members (blocked,obj_id,usr_id,notification,passed) " .
752 "VALUES ( " .
753 $this->ilDB->quote((int) $a_blocked, 'integer') . ", " .
754 $this->ilDB->quote($this->obj_id, 'integer') . ", " .
755 $this->ilDB->quote($a_usr_id, 'integer') . ", " .
756 $this->ilDB->quote(0, 'integer') . ", " .
757 $this->ilDB->quote(0, 'integer') .
758 ") ON DUPLICATE KEY UPDATE blocked = VALUES(blocked)";
759 }
760 $res = $this->ilDB->manipulate($query);
761 }

References $res, and ILIAS\Repository\int().

+ Here is the call graph for this function:

◆ updateContact()

ilParticipants::updateContact ( int  $a_usr_id,
bool  $a_contact 
)

Definition at line 763 of file class.ilParticipants.php.

763 : void
764 {
765 $this->ilDB->manipulate(
766 'UPDATE obj_members SET ' .
767 'contact = ' . $this->ilDB->quote($a_contact, 'integer') . ' ' .
768 'WHERE obj_id = ' . $this->ilDB->quote($this->obj_id, 'integer') . ' ' .
769 'AND usr_id = ' . $this->ilDB->quote($a_usr_id, 'integer')
770 );
771 $this->participants_status[$a_usr_id]['contact'] = $a_contact;
772 }

◆ updateNotification()

ilParticipants::updateNotification ( int  $a_usr_id,
bool  $a_notification 
)

Update notification status.

Definition at line 792 of file class.ilParticipants.php.

792 : void
793 {
794 $this->participants_status[$a_usr_id]['notification'] = $a_notification;
795
796 $query = "SELECT * FROM obj_members " .
797 "WHERE obj_id = " . $this->ilDB->quote($this->obj_id, 'integer') . " " .
798 "AND usr_id = " . $this->ilDB->quote($a_usr_id, 'integer');
799 $res = $this->ilDB->query($query);
800 if ($res->numRows()) {
801 $query = "UPDATE obj_members SET " .
802 "notification = " . $this->ilDB->quote((int) $a_notification, 'integer') . " " .
803 "WHERE obj_id = " . $this->ilDB->quote($this->obj_id, 'integer') . " " .
804 "AND usr_id = " . $this->ilDB->quote($a_usr_id, 'integer');
805 } else {
806 $query = "INSERT INTO obj_members (notification,obj_id,usr_id,passed,blocked) " .
807 "VALUES ( " .
808 $this->ilDB->quote((int) $a_notification, 'integer') . ", " .
809 $this->ilDB->quote($this->obj_id, 'integer') . ", " .
810 $this->ilDB->quote($a_usr_id, 'integer') . ", " .
811 $this->ilDB->quote(0, 'integer') . ", " .
812 $this->ilDB->quote(0, 'integer') .
813 ") ON DUPLICATE KEY UPDATE notification = VALUES(notification)";
814 }
815 $res = $this->ilDB->manipulate($query);
816 }

References $res.

Referenced by ilLearningSequenceMembershipGUI\updateParticipantsStatus().

+ Here is the caller graph for this function:

◆ updateRoleAssignments()

ilParticipants::updateRoleAssignments (   $a_usr_id,
  $a_roles 
)

Update role assignments @access public.

Parameters
intusr_id
int[]array of new roles

Definition at line 653 of file class.ilParticipants.php.

653 : void
654 {
655 foreach ($this->getRoles() as $role_id) {
656 if ($this->rbacReview->isAssigned($a_usr_id, $role_id)) {
657 if (!in_array($role_id, $a_roles)) {
658 $this->rbacAdmin->deassignUser($role_id, $a_usr_id);
659 }
660 } elseif (in_array($role_id, $a_roles)) {
661 $this->rbacAdmin->assignUser($role_id, $a_usr_id);
662 }
663 }
664 $this->rbacReview->clearCaches();
665 $this->readParticipants();
666 $this->readParticipantsStatus();
667 }
getRoles()
Get object roles.

◆ updateSubject()

ilParticipants::updateSubject ( int  $a_usr_id,
string  $a_subject 
)

Definition at line 1218 of file class.ilParticipants.php.

1218 : void
1219 {
1220 $query = "UPDATE il_subscribers " .
1221 "SET subject = " . $this->ilDB->quote($a_subject, 'text') . " " .
1222 "WHERE usr_id = " . $this->ilDB->quote($a_usr_id, 'integer') . " " .
1223 "AND obj_id = " . $this->ilDB->quote($this->obj_id, 'integer') . " ";
1224 $res = $this->ilDB->manipulate($query);
1225 }

References $res.

◆ updateSubscriptionTime()

ilParticipants::updateSubscriptionTime ( int  $a_usr_id,
int  $a_subtime 
)

Definition at line 1209 of file class.ilParticipants.php.

1209 : void
1210 {
1211 $query = "UPDATE il_subscribers " .
1212 "SET sub_time = " . $this->ilDB->quote($a_subtime, 'integer') . " " .
1213 "WHERE usr_id = " . $this->ilDB->quote($a_usr_id, 'integer') . " " .
1214 "AND obj_id = " . $this->ilDB->quote($this->obj_id, 'integer') . " ";
1215 $res = $this->ilDB->manipulate($query);
1216 }

References $res.

Field Documentation

◆ $admins

array ilParticipants::$admins = []
protected

Definition at line 56 of file class.ilParticipants.php.

◆ $component

string ilParticipants::$component = ''
protected

Definition at line 44 of file class.ilParticipants.php.

Referenced by getComponent().

◆ $error

ilErrorHandling ilParticipants::$error
protected

Definition at line 65 of file class.ilParticipants.php.

◆ $eventHandler

ilAppEventHandler ilParticipants::$eventHandler
protected

Definition at line 58 of file class.ilParticipants.php.

◆ $ilDB

ilDBInterface ilParticipants::$ilDB
protected

Definition at line 62 of file class.ilParticipants.php.

◆ $lng

ilLanguage ilParticipants::$lng
protected

Definition at line 63 of file class.ilParticipants.php.

◆ $logger

◆ $members

array ilParticipants::$members = []
protected

Definition at line 54 of file class.ilParticipants.php.

◆ $obj_id

◆ $objectDataCache

ilObjectDataCache ilParticipants::$objectDataCache
protected

Definition at line 61 of file class.ilParticipants.php.

◆ $participants

array ilParticipants::$participants = []
protected

Definition at line 52 of file class.ilParticipants.php.

◆ $participants_status

array ilParticipants::$participants_status = []
protected

Definition at line 53 of file class.ilParticipants.php.

◆ $rbacAdmin

ilRbacAdmin ilParticipants::$rbacAdmin
protected

Definition at line 60 of file class.ilParticipants.php.

◆ $rbacReview

ilRbacReview ilParticipants::$rbacReview
protected

Definition at line 59 of file class.ilParticipants.php.

◆ $recommended_content_manager

ilRecommendedContentManager ilParticipants::$recommended_content_manager
protected

Definition at line 66 of file class.ilParticipants.php.

◆ $ref_id

int ilParticipants::$ref_id = 0
protected

◆ $role_assignments

array ilParticipants::$role_assignments = []
protected

Definition at line 51 of file class.ilParticipants.php.

◆ $role_data

array ilParticipants::$role_data = []
protected

Definition at line 49 of file class.ilParticipants.php.

◆ $roles

array ilParticipants::$roles = []
protected

◆ $roles_sorted

array ilParticipants::$roles_sorted = []
protected

Definition at line 50 of file class.ilParticipants.php.

◆ $subscribers

array ilParticipants::$subscribers = []
protected

Definition at line 57 of file class.ilParticipants.php.

◆ $tutors

array ilParticipants::$tutors = []
protected

Definition at line 55 of file class.ilParticipants.php.

◆ $type

string ilParticipants::$type = ''
protected

◆ IL_CRS_ADMIN

◆ IL_CRS_MEMBER

◆ IL_CRS_TUTOR

◆ IL_GRP_ADMIN

◆ IL_GRP_MEMBER

◆ IL_LSO_ADMIN

const ilParticipants::IL_LSO_ADMIN = 7

◆ IL_LSO_MEMBER

const ilParticipants::IL_LSO_MEMBER = 8

◆ IL_ROLE_POSITION_ADMIN

const ilParticipants::IL_ROLE_POSITION_ADMIN = 1

Definition at line 40 of file class.ilParticipants.php.

◆ IL_ROLE_POSITION_MEMBER

const ilParticipants::IL_ROLE_POSITION_MEMBER = 3

Definition at line 42 of file class.ilParticipants.php.

◆ IL_ROLE_POSITION_TUTOR

const ilParticipants::IL_ROLE_POSITION_TUTOR = 2

Definition at line 41 of file class.ilParticipants.php.

◆ IL_SESS_MEMBER

const ilParticipants::IL_SESS_MEMBER = 6

The documentation for this class was generated from the following file: