19 declare(strict_types=1);
46 $this->skill_manager = $DIC->skills()->internal()->manager();
47 $this->tree_repo = $DIC->skills()->internal()->repo()->getTreeRepo();
48 $this->admin_gui_request = $DIC->skills()->internal()->gui()->admin_request();
51 $this->requested_ref_id = $this->admin_gui_request->getRefId();
55 $levels = $this->skill_manager->getProfileManager()->getSkillLevels($this->
profile->getId());
57 foreach ($levels as $level) {
59 "profile_id" => $level->getProfileId(),
60 "base_skill_id" => $level->getBaseSkillId(),
61 "tref_id" => $level->getTrefId(),
62 "level_id" => $level->getLevelId(),
63 "order_nr" => $level->getOrderNr()
68 $this->
setTitle($this->
lng->txt(
"skmg_target_levels"));
70 $access_manager = $this->skill_manager->getTreeAccessManager($this->requested_ref_id);
71 if ($access_manager->hasManageProfilesPermission()) {
73 $this->
addColumn($this->
lng->txt(
"skmg_order"),
"",
"1px");
77 if ($access_manager->hasManageProfilesPermission()) {
82 $this->
setRowTemplate(
"tpl.skill_profile_level_row.html",
"components/ILIAS/Skill");
84 if ($access_manager->hasManageProfilesPermission()) {
85 $this->
addMultiCommand(
"confirmLevelAssignmentRemoval", $this->
lng->txt(
"skmg_remove_levels"));
86 if (count($this->skill_manager->getProfileManager()->getSkillLevels($this->
profile->getId())) > 0) {
92 protected function fillRow(array $a_set): void
94 $tree_id = $this->tree_repo->getTreeIdForNodeId($a_set[
"base_skill_id"]);
95 $node_manager = $this->skill_manager->getTreeNodeManager($tree_id);
96 $this->tpl->setVariable(
98 $node_manager->getWrittenPath(
99 $a_set[
"base_skill_id"],
106 $access_manager = $this->skill_manager->getTreeAccessManager($this->requested_ref_id);
107 if ($access_manager->hasManageProfilesPermission()) {
108 $this->tpl->setCurrentBlock(
"checkbox");
109 $this->tpl->setVariable(
111 ($a_set[
"base_skill_id"]) .
":" . ($a_set[
"tref_id"]) .
":" . ($a_set[
"level_id"]) .
112 ":" . ($a_set[
"order_nr"])
114 $this->tpl->setVariable(
"SKILL_ID", $a_set[
"base_skill_id"]);
115 $this->tpl->setVariable(
"TREF_ID", $a_set[
"tref_id"]);
116 $this->tpl->parseCurrentBlock();
118 $this->tpl->setCurrentBlock(
"order");
119 $this->tpl->setVariable(
"ORDER_NR", $a_set[
"order_nr"]);
120 $this->tpl->parseCurrentBlock();
122 $this->tpl->setCurrentBlock(
"cmd");
123 $this->tpl->setVariable(
"CMD", $this->
lng->txt(
"edit"));
124 $this->
ctrl->setParameter($this->parent_obj,
"cskill_id", $a_set[
"base_skill_id"] .
":" . $a_set[
"tref_id"]);
125 $this->tpl->setVariable(
"CMD_HREF", $this->
ctrl->getLinkTarget($this->parent_obj,
"updateLevelOfSelectedSkill"));
126 $this->tpl->parseCurrentBlock();
TableGUI class for skill profile levels.
setFormAction(string $a_form_action, bool $a_multipart=false)
addCommandButton(string $a_cmd, string $a_text, string $a_onclick='', string $a_id="", string $a_class="")
Request wrapper for guis in skill administration.
static lookupLevelTitle(int $a_id)
SkillInternalManagerService $skill_manager
Skill internal manager service.
__construct( $a_parent_obj, string $a_parent_cmd, Profile\SkillProfile $a_profile)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
ilSkillTreeRepository $tree_repo
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
__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)
SkillAdminGUIRequest $admin_gui_request
addMultiCommand(string $a_cmd, string $a_text)
Profile SkillProfile $profile