3declare(strict_types=1);
52 if (isset(self::$instances[$a_ref_id]) && self::$instances[$a_ref_id] instanceof
self) {
53 return self::$instances[$a_ref_id];
55 return self::$instances[$a_ref_id] =
new self($a_ref_id);
80 $this->participants_status = [];
82 $this->participants_status[$mem_uid][
'blocked'] =
false;
83 $this->participants_status[$mem_uid][
'notification_enabled'] = (bool) $info[
'notification_enabled'];
84 $this->participants_status[$mem_uid][
'passed'] =
false;
85 $this->participants_status[$mem_uid][
'contact'] = (bool) $info[
'contact'];
92 public function add(
int $a_usr_id,
int $a_role = 0): bool
100 public function register(
int $a_usr_id):
bool
102 $this->
logger->debug(
'Registering user: ' . $a_usr_id .
' for session: ' . $this->
getObjId());
113 $this->
delete($a_usr_id);
119 public function sendNotification(
int $a_type,
int $a_usr_id,
bool $a_force_email =
false): void
126 $mail->setRefId($this->ref_id);
127 $mail->setRecipients([$a_usr_id]);
132 $this->
logger->warning(
'Invalid notfication type given: ' . $a_type);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _isRegistered(int $a_usr_id, int $a_event_id)
static _getAllReferences(int $id)
get all reference ids for object ID
static _lookupObjId(int $ref_id)
Base class for course and group participants.
getParticipants()
Get all participants ids.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const TYPE_ACCEPTED_SUBSCRIPTION_MEMBER
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
unregister(int $a_usr_id)
ilEventParticipants $event_part
checkLastAdmin(array $a_usr_ids)
no last admin restrictions for sessions
add(int $a_usr_id, int $a_role=0)
Add user to session member role.
static getInstance(int $a_ref_id)
static _isParticipant(int $a_ref_id, int $a_usr_id)
Static function to check if a user is a participant of the container object.
static _getInstanceByObjId(int $a_obj_id)
__construct(int $a_ref_id)
readParticipantsStatus()
Read status of participants (blocked, notification, passed)
sendNotification(int $a_type, int $a_usr_id, bool $a_force_email=false)
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc