46 $this->
user = $DIC->user();
47 $this->
lng = $DIC->language();
48 $this->
ctrl = $DIC->ctrl();
50 $this->ui_fac = $DIC->ui()->factory();
51 $this->ui_ren = $DIC->ui()->renderer();
54 if (!$this->ws_tree->readRootId()) {
59 $this->top_skill_id = $a_top_skill_id;
60 $this->tref_id = $a_tref_id;
61 $this->basic_skill_id = $a_basic_skill_id;
65 $tree_repo = $DIC->skills()->internal()->repo()->getTreeRepo();
66 $tree_id = $tree_repo->getTreeIdForNodeId($this->basic_skill_id);
67 $node_manager = $DIC->skills()->internal()->manager()->getTreeNodeManager($tree_id);
68 $title = $node_manager->getWrittenPath($this->basic_skill_id);
82 $this->
setRowTemplate(
"tpl.skill_materials_row.html",
"Services/Skill");
94 foreach ($this->skill->getLevelData() as $k => $v) {
101 protected function fillRow(array $a_set): void
108 $ilCtrl->setParameter($this->parent_obj,
"level_id", $a_set[
"id"]);
109 foreach ($mat as $m) {
110 $this->tpl->setCurrentBlock(
"mat");
111 $obj_id = $this->ws_tree->lookupObjectId($m[
"wsp_id"]);
113 $mat_icon = $this->ui_fac->symbol()->icon()->standard(
115 $this->
lng->txt(
"icon") .
" " . $this->
lng->txt($obj_type),
118 $this->tpl->setVariable(
122 $this->tpl->setVariable(
"MAT_IMG", $this->ui_ren->render($mat_icon));
123 $this->tpl->setVariable(
"TXT_REMOVE",
$lng->
txt(
"remove"));
124 $ilCtrl->setParameter($this->parent_obj,
"wsp_id", $m[
"wsp_id"]);
125 $this->tpl->setVariable(
"HREF_REMOVE", $ilCtrl->getLinkTarget($this->parent_obj,
"removeMaterial"));
127 $obj_id = $this->ws_tree->lookupObjectId($m[
"wsp_id"]);
128 $url = $this->ws_access->getGotoLink($m[
"wsp_id"], $obj_id);
129 $this->tpl->setVariable(
"HREF_MAT",
$url);
130 $this->tpl->parseCurrentBlock();
133 $this->tpl->setCurrentBlock(
"cmd");
134 $this->tpl->setVariable(
"HREF_CMD", $ilCtrl->getLinkTarget(
138 $this->tpl->setVariable(
"TXT_CMD",
$lng->
txt(
"skmg_assign_materials"));
139 $this->tpl->parseCurrentBlock();
140 $ilCtrl->setParameter($this->parent_obj,
"level_id",
"");
142 $this->tpl->setVariable(
"LEVEL_ID", $a_set[
"id"]);
143 $this->tpl->setVariable(
"SKILL_ID", $this->basic_skill_id);
144 $this->tpl->setVariable(
"TXT_SKILL", $a_set[
"title"]);
145 $this->tpl->setVariable(
"TXT_SKILL_DESC", $a_set[
"description"]);
static getAssignedMaterial(int $a_user_id, int $a_tref_id, int $a_level)
Get assigned material (for a skill level and user)
ILIAS UI Renderer $ui_ren
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...
setEnableTitle(bool $a_enabletitle)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getInstance(int $a_id=0)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupTitle(int $obj_id)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
__construct( $a_parent_obj, string $a_parent_cmd, int $a_top_skill_id, int $a_tref_id, int $a_basic_skill_id)
ilWorkspaceAccessHandler $ws_access
__construct(Container $dic, ilPlugin $plugin)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setLimit(int $a_limit=0, int $a_default_limit=0)
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)
disable(string $a_module_name)
createTreeForUser(int $a_user_id)
Create personal workspace tree for user.
static _lookupType(int $id, bool $reference=false)
setEnableHeader(bool $a_enableheader)