19declare(strict_types=1);
29use Psr\Http\Message\ServerRequestInterface;
38 private readonly UIFactory $ui_factory,
52 return $this->test_access->checkManageParticipantsAccess();
62 $this->
lng->txt(
'remove_participants'),
64 ->withParameter($action_token, self::
ACTION_ID)
72 array $selected_participants,
73 bool $all_participants_selected
76 $this->
lng->txt(
'confirm'),
77 $this->
lng->txt(
'remove_selected_participants_confirmation'),
78 $url_builder->buildURI()->__toString()
82 (string) $v->getUserId(),
83 $this->test_obj->getAnonymity()
84 ? $this->
lng->txt(
'anonymous')
85 : \
ilObjUser::_lookupFullname($v->getUserId())
87 $selected_participants
89 )->withActionButtonLabel($this->
lng->txt(
'remove'));
94 ServerRequestInterface $request,
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');
Builds a Color from either hex- or rgb values.
getSelectionErrorMessage()
allowActionForRecord(Participant $record)
__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)
getTableAction(URLBuilder $url_builder, URLBuilderToken $row_id_token, URLBuilderToken $action_token, URLBuilderToken $action_type_token)
onSubmit(URLBuilder $url_builder, ServerRequestInterface $request, array $selected_participants, bool $all_participants_selected)
getModal(URLBuilder $url_builder, array $selected_participants, bool $all_participants_selected)
return['delivery_method'=> 'php',]
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const MESSAGE_TYPE_SUCCESS
const MESSAGE_TYPE_FAILURE
This describes commonalities between the different modals.
modal(string $title="", string $cancel_label="")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
if(!file_exists('../ilias.ini.php'))