3 declare(strict_types=1);
21 parent::__construct($parent_gui, $cmd);
23 $this->parent_gui = $parent_gui;
26 $this->access = $access;
27 $this->advanced_selection_list_gui = $advanced_selection_list_gui;
28 $this->ls_item_online_status = $ls_item_online_status;
30 $this->
setTitle($this->lng->txt(
"table_sequence_content"));
31 $this->
setRowTemplate(
"tpl.content_table.html",
"Modules/LearningSequence");
32 $this->
setFormAction($this->ctrl->getFormAction($this->parent_gui));
41 $this->
addColumn($this->lng->txt(
"table_position"));
42 $this->
addColumn($this->lng->txt(
"table_title"));
43 $this->
addColumn($this->lng->txt(
"table_online"));
44 $this->
addColumn($this->lng->txt(
"table_may_proceed"));
45 $this->
addColumn($this->lng->txt(
"table_actions"));
54 $this->parent_gui->getFieldName($this->parent_gui::FIELD_ORDER, $set->getRefId())
57 $ni->setDisabled($this->set_is_used);
58 $ni->setValue(($set->getOrderNumber() + 1) * 10);
60 if ($this->ls_item_online_status->hasOnlineStatus($set->getRefId())) {
63 $this->parent_gui->getFieldName($this->parent_gui::FIELD_ONLINE, $set->getRefId())
65 $cb->setChecked($set->isOnline());
68 $cb->setChecked(
true);
69 $cb->setDisabled(
true);
71 $this->tpl->setVariable(
"ONLINE", $cb->render());
75 $this->parent_gui->getFieldName($this->parent_gui::FIELD_POSTCONDITION_TYPE, $set->getRefId())
77 $options = $this->parent_gui->getPossiblePostConditionsForType($set->getType());
80 $si->setValue($set->getPostCondition()->getConditionOperator());
83 $obj_link = $this->
getEditLink($set->getRefId(), $set->getType(), $action_items);
87 '<a href="%s">%s</a>',
92 $this->tpl->setVariable(
"ID", $set->getRefId());
93 $this->tpl->setVariable(
"IMAGE", $set->getIconPath());
94 $this->tpl->setVariable(
"ORDER", $ni->render());
95 $this->tpl->setVariable(
"TITLE", $title);
96 $this->tpl->setVariable(
"POST_CONDITIONS",
$si->render());
97 $this->tpl->setVariable(
"ACTIONS", $this->
getItemActionsMenu($set->getRefId(), $set->getType()));
98 $this->tpl->setVariable(
"TYPE", $set->getType());
106 $item_list_gui->initItem($ref_id, $item_obj_id);
108 $item_list_gui->enableCut(
true);
109 $item_list_gui->enableDelete(
true);
110 $item_list_gui->enableLink(
true);
111 $item_list_gui->enableTimings(
false);
113 $lso_gui = $this->parent_gui->parent_gui;
114 $item_list_gui->setContainerObject($lso_gui);
116 return $item_list_gui->getCommandsHTML();
123 $item_list_gui->initItem($ref_id, $item_obj_id);
124 return $item_list_gui->getCommands();
133 case $this->ls_item_online_status::S_LEARNMODULE_IL:
134 case $this->ls_item_online_status::S_LEARNMODULE_HTML:
135 case $this->ls_item_online_status::S_SURVEY:
136 $prop_for_type =
'properties';
139 case $this->ls_item_online_status::S_SAHS:
140 case $this->ls_item_online_status::S_CONTENTPAGE:
141 case $this->ls_item_online_status::S_EXERCISE:
142 case $this->ls_item_online_status::S_FILE:
143 $prop_for_type =
'edit';
146 case $this->ls_item_online_status::S_TEST:
147 $prop_for_type =
'ilObjTestSettingsGeneralGUI::showForm';
150 case $this->ls_item_online_status::S_IND_ASSESSMENT:
155 $props = array_filter(
157 function ($action_item) use ($prop_for_type) {
159 return $action_item[
'cmd'] === $prop_for_type;
163 if (count($props) > 0) {
164 return array_shift($props)[
'link'];
getListGuiFor(string $type)
setExternalSorting($a_val)
Set external sorting.
This class provides processing control methods.
__construct(ilObjLearningSequenceContentGUI $parent_gui, string $cmd, ilCtrl $ctrl, ilLanguage $lng, ilAccess $access, ilAdvancedSelectionListGUI $advanced_selection_list_gui, LSItemOnlineStatus $ls_item_online_status)
getItemActionsMenu(int $ref_id, string $type)
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
getActionMenuItems(int $ref_id, string $type)
setTopCommands($a_val)
Set top commands (display command buttons on top of table, too)
static _lookupObjId($a_id)
Class ilObjLearningSequenceContentGUI.
getStdLink(int $ref_id, string $type)
setEnableAllCommand($a_value)
Enable actions for all entries in current result.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
getEditLink(int $ref_id, string $type, array $action_items)
User interface class for advanced drop-down selection lists.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
static _getListGUIByType($a_type, $a_context=ilObjectListGUI::CONTEXT_REPOSITORY)
addColumn( $a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.
setShowRowsSelector($a_value)
Toggle rows-per-page selector.
setEnableHeader($a_enableheader)
Set Enable Header.
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
setLimit($a_limit=0, $a_default_limit=0)