50 int $a_mode = self::MODE_SCAT,
55 $this->
ctrl = $DIC->ctrl();
56 $this->
lng = $DIC->language();
57 $this->
access = $DIC->access();
58 $this->admin_gui_request = $DIC->skills()->internal()->gui()->admin_request();
59 $this->ui_fac = $DIC->ui()->factory();
60 $this->ui_ren = $DIC->ui()->renderer();
62 $ilCtrl = $DIC->ctrl();
63 $lng = $DIC->language();
65 $this->tref_id = $a_tref_id;
66 $ilCtrl->setParameter($a_parent_obj,
"tmpmode", $a_mode);
68 $this->requested_node_id = $this->admin_gui_request->getNodeId();
69 $this->requested_tref_id = $this->admin_gui_request->getTrefId();
70 $this->requested_ref_id = $this->admin_gui_request->getRefId();
72 $this->mode = $a_mode;
73 $this->skill_tree = $DIC->skills()->internal()->repo()->getTreeRepo()->getTreeForNodeId($a_obj_id);
74 $this->tree_access_manager = $DIC->skills()->internal()->manager()->getTreeAccessManager($this->requested_ref_id);
78 if ($this->mode == self::MODE_SCAT) {
79 $this->manage_perm = $this->tree_access_manager->hasManageCompetencesPermission();
80 $childs = $this->skill_tree->getChildsByTypeFilter(
82 array(
"skrt",
"skll",
"scat",
"sktr")
86 } elseif ($this->mode == self::MODE_SCTP) {
87 $this->manage_perm = $this->tree_access_manager->hasManageCompetenceTemplatesPermission();
88 $childs = $this->skill_tree->getChildsByTypeFilter(
90 array(
"skrt",
"sktp",
"sctp")
98 if ($this->tref_id == 0 && $this->manage_perm) {
102 if ($this->tref_id == 0) {
103 $this->
addColumn($this->
lng->txt(
"skmg_order"),
"",
"1px");
108 $this->
setRowTemplate(
"tpl.skill_cat_row.html",
"Services/Skill");
110 if ($this->tref_id == 0 && $this->manage_perm) {
114 if ($a_mode == self::MODE_SCAT) {
121 protected function fillRow(array $a_set): void
127 switch ($a_set[
"type"]) {
131 $ret = $ilCtrl->getLinkTargetByClass(
"ilskillcategorygui",
"listItems");
132 $ilCtrl->setParameterByClass(
"ilskillcategorygui",
"node_id", $this->requested_node_id);
138 $ilCtrl->setParameterByClass(
"ilskilltemplatereferencegui",
"tref_id", $a_set[
"child"]);
139 $ilCtrl->setParameterByClass(
"ilskilltemplatereferencegui",
"node_id", $tid);
140 $ret = $ilCtrl->getLinkTargetByClass(
"ilskilltemplatereferencegui",
"listItems");
141 $ilCtrl->setParameterByClass(
"ilskilltemplatereferencegui",
"node_id", $this->requested_node_id);
142 $ilCtrl->setParameterByClass(
"ilskilltemplatereferencegui",
"tref_id", $this->requested_tref_id);
147 $ilCtrl->setParameterByClass(
"ilbasicskillgui",
"node_id", $a_set[
"child"]);
148 $ret = $ilCtrl->getLinkTargetByClass(
"ilbasicskillgui",
"edit");
149 $ilCtrl->setParameterByClass(
"ilbasicskillgui",
"node_id", $this->requested_node_id);
156 $ilCtrl->setParameterByClass(
"ilbasicskilltemplategui",
"node_id", $a_set[
"child"]);
157 $ret = $ilCtrl->getLinkTargetByClass(
"ilbasicskilltemplategui",
"edit");
158 $ilCtrl->setParameterByClass(
"ilbasicskilltemplategui",
"node_id", $this->requested_node_id);
163 $ilCtrl->setParameterByClass(
"ilskilltemplatecategorygui",
"node_id", $a_set[
"child"]);
164 $ret = $ilCtrl->getLinkTargetByClass(
"ilskilltemplatecategorygui",
"listItems");
165 $ilCtrl->setParameterByClass(
"ilskilltemplatecategorygui",
"node_id", $this->requested_node_id);
169 if ($this->tref_id == 0) {
170 if ($this->manage_perm) {
171 $this->tpl->setCurrentBlock(
"cb");
172 $this->tpl->setVariable(
"CB_ID", $a_set[
"child"]);
173 $this->tpl->parseCurrentBlock();
176 $this->tpl->setCurrentBlock(
"nr");
177 $this->tpl->setVariable(
"OBJ_ID", $a_set[
"child"]);
178 $this->tpl->setVariable(
"ORDER_NR", $a_set[
"order_nr"]);
179 if (!$this->manage_perm) {
180 $this->tpl->touchBlock(
"disabled");
182 $this->tpl->parseCurrentBlock();
185 $this->tpl->setVariable(
"HREF_TITLE", $ret);
187 $this->tpl->setVariable(
"TITLE", $a_set[
"title"]);
194 $icon = $this->ui_fac->symbol()->icon()->custom(
199 $this->tpl->setVariable(
"ICON", $this->ui_ren->render(
$icon));
static _lookupTemplateId(int $a_obj_id)
static _lookupStatus(int $a_obj_id)
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
setFormAction(string $a_form_action, bool $a_multipart=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
addCommandButton(string $a_cmd, string $a_text, string $a_onclick='', string $a_id="", string $a_class="")
Request wrapper for guis in skill administration.
__construct( $a_parent_obj, string $a_parent_cmd, int $a_obj_id, int $a_mode=self::MODE_SCAT, int $a_tref_id=0)
setParameterByClass(string $a_class, string $a_parameter, $a_value)
ILIAS UI Renderer $ui_ren
SkillTreeAccess $tree_access_manager
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
static getIconPath(int $a_obj_id, string $a_type, string $a_size="", int $a_status=0)
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
SkillAdminGUIRequest $admin_gui_request
__construct(Container $dic, ilPlugin $plugin)
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
addMultiCommand(string $a_cmd, string $a_text)
static sortArray(array $array, string $a_array_sortby_key, string $a_array_sortorder="asc", bool $a_numeric=false, bool $a_keep_keys=false)