19declare(strict_types=1);
39 private array $objects,
43 private int $start_ref_id = 0,
45 private int $end_ref_id = 0,
49 private int $ref_id = 0,
53 private ?\
ilCtrl $ctrl =
null,
55 private ?\Psr\Http\Message\ServerRequestInterface
$request =
null,
66 $data = $this->objects;
69 if ($this->
filter !==
null) {
70 $view_controls[] = $this->filter;
83 $leading_icon = $ui_factory->symbol()->icon()->custom(
88 $actions = $env[
'actions']($record);
89 $content = $env[
'content']($record);
90 $headline = $env[
'headline']($record);
93 ->withHeadline($headline)
94 ->withLeadingSymbol($leading_icon)
95 ->withSubheadline($record->description)
96 ->withTags(...$env[
'tags']($record))
97 ->withContent($content)
98 ->withFurtherFieldsHeadline($this->
lng->txt(
'lso_adaptive_information'))
99 ->withFurtherFields($env[
'further_fields']($record))
103 $table = $this->ui_factory->table()->presentation(
104 $this->
lng->txt(
'table_sequence_content'),
108 ->withEnvironment($environment)
111 $html = $this->ui_renderer->render($table);
113 if ($modals !== []) {
114 $html .= $this->ui_renderer->render($modals);
129 return $this->ui_renderer->render(
130 $this->ui_factory->link()->standard($record->title, $record->href)
137 $dropdown_items = [];
139 $ref_id = $lso->getRefId();
140 $obj_id = $lso->getId();
157 $action_data = $this->parent_gui->getTableActionHandler()->collectActions(
163 foreach ($action_data as
$id => $action) {
164 if ($action->is_divider) {
165 $dropdown_items[] = $this->ui_factory->divider()->horizontal();
169 $label = $action->label;
170 $link = $action->link;
171 if (strpos($link,
'http') !== 0 && strpos($link,
'ilias.php') ===
false) {
172 $this->
ctrl->setParameter($this->parent_gui,
'item_ref_id', $record->ref_id);
173 $link = $this->
ctrl->getLinkTarget($this->parent_gui, $link);
176 $dropdown_items[] = $this->ui_factory->button()->shy($label, $link);
180 $modals[$record->ref_id] = $delete_modal;
181 $dropdown_items[] = $this->ui_factory->button()->shy(
182 $this->
lng->txt(
'delete'),
184 )->withOnClick($delete_modal->getShowSignal());
186 return $this->ui_factory->dropdown()->standard($dropdown_items)->withLabel(
'');
195 if ($issues !==
null) {
196 $items[$this->
lng->txt(
'lso_adaptive_misconfigured')] = $issues;
199 return $this->ui_factory->listing()->descriptive($items);
203 $this->
lng->txt(
'lso_adaptive_previous_object') .
':' => htmlspecialchars(trim($record->previous_objects)),
204 $this->
lng->txt(
'lso_adaptive_next_object') .
':' => htmlspecialchars(trim($record->next_objects)),
208 'headline' => $headline,
210 'actions' => $actions,
211 'content' => $content,
212 'further_fields' => $further_fields,
221 $this->
ctrl->setParameter($this->parent_gui,
'item_ref_id',
'');
222 $form_action = $this->
ctrl->getFormAction(
227 $item = $this->ui_factory->modal()->interruptiveItem()->keyValue(
229 $this->
lng->txt(
'title'),
233 return $this->ui_factory->modal()->interruptive(
234 $this->
lng->txt(
'delete'),
235 $this->lng->txt(
'info_delete_sure'),
238 ->withAffectedItems([$item])
239 ->withActionButtonLabel($this->
lng->txt(
'delete'));
249 if ($conditions === []) {
250 return $this->
lng->txt(
'no_conditions');
253 $listing = $this->ui_factory->listing()->property();
254 foreach ($conditions as $condition) {
255 $listing = $condition->value ===
''
256 ? $listing->withProperty($condition->title, $condition->title,
false)
257 : $listing->withProperty($condition->title, $condition->value);
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Controls adaptive learning sequence content management.
getSpecificActions(int $ref_id, int $start_ref_id, int $end_ref_id)
Gets actions specific to an adaptive learning sequence item.
Describes the status of an item in the adaptive content table: the tags shown below its title and the...
getTags(\ilObjLearningSequenceContentData $record)
The status tags of the item.
getConfigurationIssues(\ilObjLearningSequenceContentData $record)
The configuration issues of a misconfigured item, or null if its configuration is fine.
Renders the adaptive learning sequence content table.
buildEnvironment(array &$modals, LSOAdaptiveItemStatus $item_status)
Builds the presentation table environment.
buildConditionListing(array $conditions)
Builds a listing of condition titles and values.
buildDeleteModal(int $ref_id, string $title)
Builds the delete confirmation modal for an item.
render()
Creates the adaptive content table.
__construct()
Constructor setup ILIAS global object @access public.
Class ilCtrl provides processing control methods.
Data transfer object for an item in the learning sequence content table.
static getInstanceByRefId(int $ref_id)
This is how the factory for UI elements looks.
An entity that renders components to a string output.
$request
@ilCtrl_Calls ilObjLearningSequenceContentGUI: ilObjLearningSequenceConditionsGUI
readonly UIRenderer $ui_renderer
readonly ilGlobalTemplateInterface $tpl
filter(string $filter_id, array $class_path, string $cmd, bool $activated=true, bool $expanded=true)
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.