19 declare(strict_types=1);
47 return self::ACTION_ID;
52 return $this->test_access->checkManageParticipantsAccess();
61 return $this->ui_factory->table()->action()->standard(
62 $this->
lng->txt(
'remove_participants'),
72 array $selected_participants,
73 bool $all_participants_selected
75 return $this->ui_factory->modal()->interruptive(
76 $this->
lng->txt(
'confirm'),
77 $this->
lng->txt(
'remove_selected_participants_confirmation'),
78 $url_builder->
buildURI()->__toString()
81 fn(
Participant $v) => $this->ui_factory->modal()->interruptiveItem()->standard(
83 $this->test_obj->getAnonymity()
84 ? $this->
lng->txt(
'anonymous')
87 $selected_participants
89 )->withActionButtonLabel($this->
lng->txt(
'remove'));
95 array $selected_participants,
96 bool $all_participants_selected
98 if (!$this->test_access->checkManageParticipantsAccess()) {
99 $this->tpl->setOnScreenMessage(
101 $this->
lng->txt(
'no_permission'),
107 $this->participant_repository->removeParticipants($selected_participants);
109 $this->tpl->setOnScreenMessage(
111 $this->
lng->txt(
'tst_selected_user_data_deleted'),
124 return $this->
lng->txt(
'delete_participants_no_valid_participants_selected');
This describes commonalities between the different modals.
getTableAction(URLBuilder $url_builder, URLBuilderToken $row_id_token, URLBuilderToken $action_token, URLBuilderToken $action_type_token)
buildURI()
Get a URI representation of the full URL including query string and fragment/hash.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupFullname(int $a_user_id)
onSubmit(URLBuilder $url_builder, ServerRequestInterface $request, array $selected_participants, bool $all_participants_selected)
getSelectionErrorMessage()
__construct(private readonly Language $lng, private readonly \ilGlobalTemplateInterface $tpl, private readonly UIFactory $ui_factory, private readonly ParticipantRepository $participant_repository, private readonly \ilTestAccess $test_access, private readonly \ilObjTest $test_obj)
const MESSAGE_TYPE_SUCCESS
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
allowActionForRecord(Participant $record)
getModal(URLBuilder $url_builder, array $selected_participants, bool $all_participants_selected)
withParameter(URLBuilderToken $token, string|array $value)
Change an acquired parameter's value if the supplied token is valid.
const MESSAGE_TYPE_FAILURE