19declare(strict_types=1);
34use Psr\Http\Message\ServerRequestInterface;
42 private readonly UIFactory $ui_factory,
63 return $this->ui_factory->table()->action()->single(
64 $this->
lng->txt(
'personal_settings_show'),
66 ->withParameter($action_token, self::
ACTION_ID)
74 if (count($selected_templates) !== 1) {
75 throw new \InvalidArgumentException(
'Expected exactly one template to show');
77 $template = reset($selected_templates);
81 'timezone' => new \DateTimeZone($this->
user->getTimeZone()),
82 'date_format' => $this->
user->getDateFormat()->toString()
85 $settings_id = $template->getSettingsId();
86 $settings_info = array_merge(
87 $this->main_settings_repository->getById($settings_id)->getArrayForLog($this->information_generator),
88 $this->score_settings_repository->getById($settings_id)->getArrayForLog($this->information_generator),
91 $modal_content[] = $this->information_generator->parseForTable(
92 array_map(
static fn(mixed $v): mixed => $v ??
'', $settings_info),
96 $mark_steps = $this->
repository->lookupMarkSteps($template->getId());
97 $mark_schema = $this->marks_repository->getMarkSchemaBySteps($mark_steps);
99 $modal_content[] = $this->ui_factory->legacy()->content(
"<h4>{$this->lng->txt('mark_schema')}</h4>");
102 $modal_content[] = $this->information_generator->parseForTable(
103 $mark_schema->toLog($this->information_generator),
107 return $this->ui_factory->modal()->roundtrip(
108 $this->
lng->txt(
'additional_info'),
110 )->withCancelButtonLabel($this->
lng->txt(
'ok'));
115 ServerRequestInterface $request,
116 array $selected_templates,
Builds a Color from either hex- or rgb values.
onSubmit(URLBuilder $url_builder, ServerRequestInterface $request, array $selected_templates,)
__construct(private readonly Language $lng, private readonly UIFactory $ui_factory, private readonly \ilObjUser $user, private readonly PersonalSettingsRepository $repository, private readonly MainSettingsRepository $main_settings_repository, private readonly ScoreSettingsRepository $score_settings_repository, private readonly MarksRepository $marks_repository, private readonly AdditionalInformationGenerator $information_generator,)
buildTableAction(URLBuilder $url_builder, URLBuilderToken $row_id_token, URLBuilderToken $action_token, URLBuilderToken $action_type_token)
buildModal(URLBuilder $url_builder, array $selected_templates)
return['delivery_method'=> 'php',]
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This describes commonalities between the different modals.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...