ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilGroupParticipants Class Reference
+ Inheritance diagram for ilGroupParticipants:
+ Collaboration diagram for ilGroupParticipants:

Public Member Functions

 __construct ($a_obj_id)
 Constructor.
 addSubscriber ($a_usr_id)
 Add subscriber.
 sendNotification ($a_type, $a_usr_id)
 Send notification mail.
- Public Member Functions inherited from ilParticipants
 __construct ($a_component_name, $a_obj_id)
 Singleton Constructor.
 getObjId ()
 get current obj_id
 getType ()
 Get object type.
 getNotificationRecipients ()
 Get admin, tutor which have notification enabled.
 getCountMembers ()
 Get number of members (not participants)
 getCountParticipants ()
 Get number of participants.
 getParticipants ()
 Get all participants ids.
 getMembers ()
 Get all members ids (admins and tutors are not members) Use get participants to fetch all.
 getAdmins ()
 Get all admins ids.
 getCountAdmins ()
 Get number of admins.
 getTutors ()
 Get all tutors ids.
 isAdmin ($a_usr_id)
 is user admin
 isTutor ($a_usr_id)
 is user tutor
 isMember ($a_usr_id)
 is user member
 isAssigned ($a_usr_id)
 check if user is assigned
 isLastAdmin ($a_usr_id)
 Check if user is last admin.
 getRoles ()
 Get course roles.
 getAssignedRoles ($a_usr_id)
 Get assigned roles.
 updateRoleAssignments ($a_usr_id, $a_roles)
 Update role assignments.
 checkLastAdmin ($a_usr_ids)
 Check if user for deletion are last admins.
 isBlocked ($a_usr_id)
 Check if user is blocked.
 hasPassed ($a_usr_id)
 Check if user has passed course.
 delete ($a_usr_id)
 Drop user from all roles.
 updateBlocked ($a_usr_id, $a_blocked)
 Update blocked status.
 updateNotification ($a_usr_id, $a_notification)
 Update notification status.
 add ($a_usr_id, $a_role)
 Add user to course.
 deleteParticipants ($a_user_ids)
 Delete users.
 addDesktopItem ($a_usr_id)
 Add desktop item.
 dropDesktopItem ($a_usr_id)
 Drop desktop item.
 isNotificationEnabled ($a_usr_id)
 check if notification is enabled
 isGroupingMember ($a_usr_id, $a_field= '')
 Check grouping membership.
 getSubscribers ()
 get all subscribers
 getCountSubscribers ()
 get number of subscribers
 getSubscriberData ($a_usr_id)
 get subscriber data
 assignSubscribers ($a_usr_ids)
 Assign subscribers.
 assignSubscriber ($a_usr_id)
 Assign subscriber.
 autoFillSubscribers ()
 Assign subscriber.
 updateSubscriptionTime ($a_usr_id, $a_subtime)
 Update subscription time.
 updateSubject ($a_usr_id, $a_subject)
 update subject
 deleteSubscriber ($a_usr_id)
 Delete subsciber.
 deleteSubscribers ($a_usr_ids)
 Delete subscibers.
 isSubscriber ($a_usr_id)
 check if is subscriber

Static Public Member Functions

static _getInstanceByObjId ($a_obj_id)
 Get singleton instance.
static getMemberRoles ($a_ref_id)
 Get member roles (not auto generated)
static _isParticipant ($a_ref_id, $a_usr_id)
 Static function to check if a user is a participant of the container object.
- Static Public Member Functions inherited from ilParticipants
static getInstanceByObjId ($a_obj_id)
 Get instance by obj type.
static hasParticipantListAccess ($a_obj_id, $a_usr_id=null)
 Check if (current) user has access to the participant list.
static _getMembershipByType ($a_usr_id, $a_type, $a_only_member_role=false)
 get membership by type Get course or group membership
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.
static _isBlocked ($a_obj_id, $a_usr_id)
 Check if user is blocked.
static _hasPassed ($a_obj_id, $a_usr_id)
 Check if user has passed course.
static _deleteAllEntries ($a_obj_id)
 Delete all entries Normally called for course deletion.
static _deleteUser ($a_usr_id)
 Delete user data.
static getDefaultMemberRole ($a_ref_id)
static lookupSubscribers ($a_obj_id)
static _isSubscriber ($a_obj_id, $a_usr_id)
 check if user is subscriber
static lookupSubscribersData ($a_obj_id)

Data Fields

const COMPONENT_NAME = 'Modules/Group'

Static Protected Attributes

static $instances = array()

Additional Inherited Members

- Protected Member Functions inherited from ilParticipants
 getComponent ()
 Get component name Used for raising events.
 readParticipants ()
 Read participants.
 readParticipantsStatus ()
 Read status of participants (blocked, notification, passed)
 readSubscribers ()
 read subscribers
 readSubscriberData ($a_usr_id)
 read subscribers
- Protected Attributes inherited from ilParticipants
 $component = ''
 $obj_id = 0
 $type = ''
 $ref_id = 0
 $roles = array()
 $role_data = array()
 $participants = array()
 $participants_status = array()
 $members = array()
 $tutors = array()
 $admins = array()
 $subscribers = array()
 $ilDB
 $lng

Detailed Description

Author
Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 36 of file class.ilGroupParticipants.php.

Constructor & Destructor Documentation

ilGroupParticipants::__construct (   $a_obj_id)

Constructor.

protected

Parameters
intobj_id of container

Definition at line 48 of file class.ilGroupParticipants.php.

{
$this->type = 'grp';
parent::__construct(self::COMPONENT_NAME,$a_obj_id);
}

Member Function Documentation

static ilGroupParticipants::_getInstanceByObjId (   $a_obj_id)
static

Get singleton instance.

public

Parameters
intobj_id
Returns
object ilGroupParticipants

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

Referenced by ilGroupEditParticipantsTableGUI\__construct(), ilObjCourseGrouping\_checkGroupingDependencies(), ilCourseParticipantsGroupsGUI\add(), ilObjGroupGUI\addUserObject(), ilSoapGroupAdministration\assignGroupMember(), ilPortfolioAccessHandler\checkAccessOfUser(), ilWorkspaceAccessHandler\checkAccessOfUser(), ilForumNotification\checkParentNodeTree(), ilObjGroup\cloneObject(), ilObjGroupGUI\confirmDeleteMembersObject(), ilGroupMembershipMailNotification\createGroupStatus(), ilObjGroupGUI\editMembersObject(), ilObjGroupGUI\executeCommand(), ilParticipants\getInstanceByObjId(), ilGroupLP\getMembers(), ilLPStatusCollection\getMembers(), ilMilestoneResponsiblesTableGUI\getParticipantsAndResponsibles(), ilTrQuery\getParticipantsForObject(), ilGroupXMLWriter\ilGroupXMLWriter(), ilObjGroupGUI\initAttendanceList(), ilObjSessionGUI\initContainer(), ilCourseParticipantsGroupsTableGUI\initGroups(), ilMemberExport\initMembers(), ilGroupRegistrationGUI\initParticipants(), ilObjGroup\initParticipants(), ilSoapGroupAdministration\isAssignedToGroup(), ilObjGroupGUI\leaveObject(), ilObjGroupAccess\lookupRegistrationInfo(), ilObjGroupGUI\membersObject(), ilGroupParticipantsTableGUI\parse(), ilObjGroupGUI\printMembersOutputObject(), ilECSCmsCourseMemberCommandQueueHandler\refreshAssignmentStatus(), ilObjGroup\register(), ilCourseParticipantsGroupsGUI\remove(), ilObjGroupGUI\saveObject(), ilMailSearchGroupsGUI\showMyGroups(), and ilObjGroupGUI\updateMembersObject().

{
if(isset(self::$instances[$a_obj_id]) and self::$instances[$a_obj_id])
{
return self::$instances[$a_obj_id];
}
return self::$instances[$a_obj_id] = new ilGroupParticipants($a_obj_id);
}

+ Here is the caller graph for this function:

static ilGroupParticipants::_isParticipant (   $a_ref_id,
  $a_usr_id 
)
static

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

public

Parameters
intref_id
intuser id

Reimplemented from ilParticipants.

Definition at line 126 of file class.ilGroupParticipants.php.

References ilParticipants\$ilDB, and $ilLog.

Referenced by ilObjGroupAccess\_checkAccess(), ilStartUpGUI\_checkGoto(), ilObjGroupGUI\getTabs(), and ilObjGroupGUI\initHeaderAction().

{
global $rbacreview,$ilObjDataCache,$ilDB,$ilLog;
$local_roles = $rbacreview->getRolesOfRoleFolder($a_ref_id,false);
return $rbacreview->isAssignedToAtLeastOneGivenRole($a_usr_id, $local_roles);
}

+ Here is the caller graph for this function:

ilGroupParticipants::addSubscriber (   $a_usr_id)

Add subscriber.

public

Reimplemented from ilParticipants.

Definition at line 99 of file class.ilGroupParticipants.php.

References $ilLog, and ilParticipants\getObjId().

{
global $ilAppEventHandler, $ilLog;
$ilLog->write(__METHOD__.': Raise new event: Modules/Group addSubscriber');
$ilAppEventHandler->raise(
"Modules/Group",
'addSubscriber',
array(
'obj_id' => $this->getObjId(),
'usr_id' => $a_usr_id
)
);
}

+ Here is the call graph for this function:

static ilGroupParticipants::getMemberRoles (   $a_ref_id)
static

Get member roles (not auto generated)

Parameters
int$a_ref_id

Definition at line 76 of file class.ilGroupParticipants.php.

References ilParticipants\$roles, and ilObject\_lookupTitle().

Referenced by ilObjGroupGUI\membersObject().

{
global $rbacreview;
$lrol = $rbacreview->getRolesOfRoleFolder($a_ref_id,false);
$roles = array();
foreach($lrol as $role)
{
$title = ilObject::_lookupTitle($role);
switch(substr($title,0,8))
{
case 'il_grp_a':
case 'il_grp_m':
continue;
default:
$roles[$role] = $role;
}
}
return $roles;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilGroupParticipants::sendNotification (   $a_type,
  $a_usr_id 
)

Send notification mail.

Parameters
int$a_type
int$a_usr_id
Returns

Definition at line 140 of file class.ilGroupParticipants.php.

References ilParticipants\getNotificationRecipients(), ilGroupMembershipMailNotification\TYPE_ACCEPTED_SUBSCRIPTION_MEMBER, ilGroupMembershipMailNotification\TYPE_ADMISSION_MEMBER, ilGroupMembershipMailNotification\TYPE_DISMISS_MEMBER, ilGroupMembershipMailNotification\TYPE_NOTIFICATION_REGISTRATION, ilGroupMembershipMailNotification\TYPE_NOTIFICATION_REGISTRATION_REQUEST, ilGroupMembershipMailNotification\TYPE_NOTIFICATION_UNSUBSCRIBE, ilGroupMembershipMailNotification\TYPE_REFUSED_SUBSCRIPTION_MEMBER, ilGroupMembershipMailNotification\TYPE_STATUS_CHANGED, ilGroupMembershipMailNotification\TYPE_SUBSCRIBE_MEMBER, ilGroupMembershipMailNotification\TYPE_UNSUBSCRIBE_MEMBER, and ilGroupMembershipMailNotification\TYPE_WAITING_LIST_MEMBER.

{
include_once './Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
switch($a_type)
{
$mail->setRefId($this->ref_id);
$mail->setRecipients(array($a_usr_id));
$mail->send();
break;
$mail->setRefId($this->ref_id);
$mail->setRecipients(array($a_usr_id));
$mail->send();
break;
$mail->setAdditionalInformation(array('usr_id' => $a_usr_id));
$mail->setRefId($this->ref_id);
$mail->setRecipients($this->getNotificationRecipients());
$mail->send();
break;
$mail->setRefId($this->ref_id);
$mail->setRecipients(array($a_usr_id));
$mail->send();
break;
$mail->setAdditionalInformation(array('usr_id' => $a_usr_id));
$mail->setRefId($this->ref_id);
$mail->setRecipients($this->getNotificationRecipients());
$mail->send();
break;
$mail->setRefId($this->ref_id);
$mail->setRecipients(array($a_usr_id));
$mail->send();
break;
$mail->setAdditionalInformation(array('usr_id' => $a_usr_id));
$mail->setRefId($this->ref_id);
$mail->setRecipients($this->getNotificationRecipients());
$mail->send();
break;
$mail->setRefId($this->ref_id);
$mail->setRecipients(array($a_usr_id));
$mail->send();
break;
$mail->setRefId($this->ref_id);
$mail->setRecipients(array($a_usr_id));
$mail->send();
break;
include_once('./Modules/Group/classes/class.ilGroupWaitingList.php');
$wl = new ilGroupWaitingList($this->obj_id);
$pos = $wl->getPosition($a_usr_id);
$mail->setRefId($this->ref_id);
$mail->setRecipients(array($a_usr_id));
$mail->setAdditionalInformation(array('position' => $pos));
$mail->send();
break;
$mail->setRefId($this->ref_id);
$mail->setRecipients(array($a_usr_id));
$mail->send();
break;
}
return true;
}

+ Here is the call graph for this function:

Field Documentation

ilGroupParticipants::$instances = array()
staticprotected

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

const ilGroupParticipants::COMPONENT_NAME = 'Modules/Group'

Definition at line 38 of file class.ilGroupParticipants.php.


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