3 declare(strict_types=1);
48 if ($this->
http->wrapper()->post()->has(
'visible_participants')) {
49 $this->requested_visible_participants = (array) $this->
http->wrapper()->post()->retrieve(
50 'visible_participants',
51 $this->
refinery->custom()->transformation(
function ($v) {
55 } elseif ($this->
http->wrapper()->query()->has(
'visible_participants')) {
56 $this->requested_visible_participants = (array) $this->
http->wrapper()->query()->retrieve(
57 'visible_participants',
58 $this->
refinery->custom()->transformation(
function ($v) {
64 if ($this->
http->wrapper()->post()->has(
'participated')) {
65 $this->requested_participated = (array) $this->
http->wrapper()->post()->retrieve(
67 $this->
refinery->custom()->transformation(
function ($v) {
73 if ($this->
http->wrapper()->post()->has(
'registered')) {
74 $this->requested_registered = (array) $this->
http->wrapper()->post()->retrieve(
76 $this->
refinery->custom()->transformation(
function ($v) {
82 if ($this->
http->wrapper()->post()->has(
'contact')) {
83 $this->requested_contact = (array) $this->
http->wrapper()->post()->retrieve(
85 $this->
refinery->custom()->transformation(
function ($v) {
91 if ($this->
http->wrapper()->post()->has(
'excused')) {
92 $this->requested_excused = (array) $this->
http->wrapper()->post()->retrieve(
94 $this->
refinery->custom()->transformation(
function ($v) {
100 if ($this->
http->wrapper()->post()->has(
'mark')) {
101 $this->requested_mark = (array) $this->
http->wrapper()->post()->retrieve(
103 $this->
refinery->custom()->transformation(
function ($v) {
109 if ($this->
http->wrapper()->post()->has(
'comment')) {
110 $this->requested_comment = (array) $this->
http->wrapper()->post()->retrieve(
112 $this->
refinery->custom()->transformation(
function ($v) {
118 if ($this->
http->wrapper()->post()->has(
'notification')) {
119 $this->requested_notification = (array) $this->
http->wrapper()->post()->retrieve(
121 $this->
refinery->custom()->transformation(
function ($v) {
127 if ($this->
http->wrapper()->post()->has(
'participants')) {
128 $this->requested_participants = (array) $this->
http->wrapper()->post()->retrieve(
130 $this->
refinery->custom()->transformation(
function ($v) {
156 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.sess_edit_members.html',
'Modules/Session');
170 $parent_object = parent::getParentObject();
171 return $parent_object;
191 if ($member_ref = $this->tree->checkForParentType(
192 $this->getParentObject()->getRefId(),
195 $member_ref_id = $member_ref;
196 } elseif ($member_ref = $this->tree->checkForParentType(
197 $this->getParentObject()->getRefId(),
200 $member_ref_id = $member_ref;
202 $this->
logger->warning(
'Cannot find parent course or group for ref_id: ' . $this->
getParentObject()->getRefId());
207 $this->
lng->txt(
'sess_mem_tbl_header'),
215 $subscriber->setTitle($this->
lng->txt(
'group_new_registrations'));
227 $waiting = $wait->getUserIds();
229 foreach ($this->requested_visible_participants as $part_id) {
230 if (in_array($part_id, $waiting)) {
235 $participated = (bool) ($this->requested_participated[$part_id] ??
false);
236 $registered = (bool) ($this->requested_registered[$part_id] ??
false);
237 $contact = (bool) ($this->requested_contact[$part_id] ??
false);
238 $excused = (bool) ($this->requested_excused[$part_id] ??
false);
240 $part_id = (
int) $part_id;
242 if ($part->isAssigned($part_id) && !$participated && !$registered) {
243 $part->delete($part_id);
245 if (!$part->isAssigned($part_id) && ($participated || $registered)) {
249 $event_part->setUserId($part_id);
252 $event_part->setNotificationEnabled((
bool) ($this->requested_notification[$part_id] ??
false));
253 $event_part->setParticipated($participated);
254 $event_part->setRegistered($registered);
255 $event_part->setContact($contact);
256 $event_part->setExcused($excused);
257 $event_part->updateUser();
260 $this->tpl->setOnScreenMessage(
'success', $this->
getLanguage()->txt(
'settings_saved'),
true);
261 $this->
getCtrl()->redirect($this,
'participants');
269 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'no_checkbox'),
true);
270 $this->
ctrl->redirect($this,
'participants');
274 $confirm->setFormAction($this->
ctrl->getFormAction($this,
'confirmDeleteParticipants'));
275 $confirm->setHeaderText($this->
lng->txt($this->getParentObject()->getType() .
'_header_delete_members'));
276 $confirm->setConfirm($this->
lng->txt(
'confirm'),
'deleteParticipants');
277 $confirm->setCancel($this->
lng->txt(
'cancel'),
'participants');
285 $name[
'lastname'] .
', ' . $name[
'firstname'] .
' [' . $name[
'login'] .
']',
290 $this->tpl->setContent($confirm->getHTML());
300 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
301 $this->
ctrl->redirect($this,
'participants');
309 $event_part->setUserId($part_id);
310 $event_part->setParticipated(
false);
311 $event_part->setRegistered(
false);
312 $event_part->setMark(
'');
313 $event_part->setComment(
'');
314 $event_part->updateUser();
317 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt($this->getParentObject()->getType() .
"_members_deleted"),
true);
318 $this->
ctrl->redirect($this,
"participants");
337 $data[
'registered'] = (bool) (
$data[
'registered'] ??
false);
338 $data[
'participated'] = (bool) (
$data[
'participated'] ??
false);
340 if ($filters && $filters[
"registered"] && !
$data[
"registered"]) {
346 $this->
lng->txt(
'yes') :
347 $this->
lng->txt(
'no');
348 $data[
'participated'] =
$data[
'participated'] ?
349 $this->
lng->txt(
'yes') :
350 $this->
lng->txt(
'no');
362 return $this->
lng->txt(
"sess_mail_type");
373 return $context_options;
array $requested_registered
Base class for member tab content.
checkPermissionBool(string $a_permission, string $a_cmd='', string $a_type='', int $a_ref_id=0)
initParticipantTemplate()
checkRbacOrPositionAccessBool(string $a_rbac_perm, string $a_pos_perm, int $a_ref_id=0)
No support for positions in sessions Check if rbac or position access is granted. ...
Class ilMailMemberSessionRoles.
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
checkPermission(string $a_permission, string $a_cmd="")
Check permission If not granted redirect to parent gui.
static getInstance(int $a_ref_id)
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
ilObjectGUI $repository_gui
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupName(int $a_user_id)
lookup user name
getAttendanceListUserData(int $user_id, array $filters=[])
getParticipantTableTitle()
initParticipantTableGUI()
confirmDeleteParticipants()
static http()
Fetches the global http state from ILIAS.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
array $requested_participants
Class ilObjectGUI Basic methods of all Output classes.
static getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id
GUI class for course/group subscriptions.
ilParticipants $participants
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
array $requested_notification
array $requested_visible_participants
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(ilObjectGUI $repository_gui, ilObject $repository_obj)
Class ilAbstractMailMemberRoles.
array $requested_participated
getPrintMemberData(array $a_members)