24 include_once(
'./Services/Membership/classes/class.ilParticipants.php');
66 if (isset(self::$instances[$a_obj_id]) and self::$instances[$a_obj_id]) {
67 return self::$instances[$a_obj_id];
80 $rbacreview = $DIC[
'rbacreview'];
82 $lrol = $rbacreview->getRolesOfRoleFolder($a_ref_id,
false);
85 foreach ($lrol as $role) {
87 switch (substr($title, 0, 8)) {
105 public function add($a_usr_id, $a_role)
118 $ilAppEventHandler = $DIC[
'ilAppEventHandler'];
119 $ilLog = $DIC[
'ilLog'];
121 parent::addSubscriber($a_usr_id);
123 $GLOBALS[
'DIC']->logger()->grp()->info(
'Raise new event: Modules/Group addSubscriber.');
124 $ilAppEventHandler->raise(
129 'usr_id' => $a_usr_id
148 $rbacreview = $DIC[
'rbacreview'];
149 $ilObjDataCache = $DIC[
'ilObjDataCache'];
150 $ilDB = $DIC[
'ilDB'];
151 $ilLog = $DIC[
'ilLog'];
153 $local_roles = $rbacreview->getRolesOfRoleFolder($a_ref_id,
false);
154 return $rbacreview->isAssignedToAtLeastOneGivenRole($a_usr_id, $local_roles);
165 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
167 $mail->forceSendingMail($a_force_sending_mail);
173 $mail->setRefId($this->ref_id);
174 $mail->setRecipients(array($a_usr_id));
181 $mail->setRefId($this->ref_id);
182 $mail->setRecipients(array($a_usr_id));
189 $mail->setAdditionalInformation(array(
'usr_id' => $a_usr_id));
190 $mail->setRefId($this->ref_id);
198 $mail->setRefId($this->ref_id);
199 $mail->setRecipients(array($a_usr_id));
206 $mail->setAdditionalInformation(array(
'usr_id' => $a_usr_id));
207 $mail->setRefId($this->ref_id);
215 $mail->setRefId($this->ref_id);
216 $mail->setRecipients(array($a_usr_id));
223 $mail->setAdditionalInformation(array(
'usr_id' => $a_usr_id));
224 $mail->setRefId($this->ref_id);
232 $mail->setRefId($this->ref_id);
233 $mail->setRecipients(array($a_usr_id));
240 $mail->setRefId($this->ref_id);
241 $mail->setRecipients(array($a_usr_id));
247 include_once(
'./Modules/Group/classes/class.ilGroupWaitingList.php');
249 $pos = $wl->getPosition($a_usr_id);
252 $mail->setRefId($this->ref_id);
253 $mail->setRecipients(array($a_usr_id));
254 $mail->setAdditionalInformation(array(
'position' => $pos));
261 $mail->setRefId($this->ref_id);
262 $mail->setRecipients(array($a_usr_id));
getObjId()
get current obj_id
const TYPE_NOTIFICATION_REGISTRATION_REQUEST
const TYPE_NOTIFICATION_UNSUBSCRIBE
static _isParticipant($a_ref_id, $a_usr_id)
Static function to check if a user is a participant of the container object.
const TYPE_ACCEPTED_SUBSCRIPTION_MEMBER
const TYPE_STATUS_CHANGED
const TYPE_SUBSCRIBE_MEMBER
const TYPE_DISMISS_MEMBER
static _lookupTitle($a_id)
lookup object title
static getMemberRoles($a_ref_id)
Get member roles (not auto generated)
static _getAllReferences($a_id)
get all reference ids of object
add($a_usr_id, $a_role)
Add user to role.
__construct($a_obj_id)
Constructor.
const TYPE_NOTIFICATION_REGISTRATION
sendNotification($a_type, $a_usr_id, $a_force_sending_mail=false)
Send notification mail.
const TYPE_WAITING_LIST_MEMBER
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
const TYPE_UNSUBSCRIBE_MEMBER
static _getInstanceByObjId($a_obj_id)
Get singleton instance.
const TYPE_REFUSED_SUBSCRIPTION_MEMBER
addRecommendation($a_usr_id)
Add desktop item.
__construct(Container $dic, ilPlugin $plugin)
getNotificationRecipients()
Get admin, tutor which have notification enabled.
const TYPE_ADMISSION_MEMBER