ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilContainerSkillGUI.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
29{
30 protected ilCtrl $ctrl;
31 protected ilTabsGUI $tabs;
32 protected ilLanguage $lng;
37 protected int $ref_id = 0;
38
39 public function __construct(ilContainerGUI $a_container_gui)
40 {
41 global $DIC;
42
43 $this->ctrl = $DIC->ctrl();
44 $this->tabs = $DIC->tabs();
45 $this->lng = $DIC->language();
46 $this->access = $DIC->access();
47
48 $this->container_gui = $a_container_gui;
49 /* @var $obj ilContainer */
50 $obj = $this->container_gui->getObject();
51 $this->container = $obj;
52 $this->ref_id = $this->container->getRefId();
53 $this->skmg_settings = new ilSkillManagementSettings();
54 }
55
56 public function executeCommand(): void
57 {
59
60 $next_class = $this->ctrl->getNextClass($this);
61 $cmd = $this->ctrl->getCmd("showProfiles");
62
63 $this->addTabs();
64
65 switch ($next_class) {
66 case "ilcontskillpresentationgui":
67 if ($this->access->checkAccess("read", "", $this->ref_id)) {
68 $gui = new ilContSkillPresentationGUI($this->container_gui);
69 $ctrl->forwardCommand($gui);
70 }
71 break;
72
73 case "ilcontskilladmingui":
74 if ($this->access->checkAccess("write", "", $this->ref_id) || $this->access->checkAccess("grade", "", $this->ref_id)) {
75 $gui = new ilContSkillAdminGUI($this->container_gui);
76 $ctrl->forwardCommand($gui);
77 }
78 break;
79
80 default:
81 /*if (in_array($cmd, array("show")))
82 {
83 $this->$cmd();
84 }*/
85 }
86 }
87
88 public function addTabs(): void
89 {
93
94 if ($this->access->checkAccess("read", "", $this->ref_id)) {
96 "mem_profiles",
97 $lng->txt("cont_skill_profiles"),
98 $ctrl->getLinkTargetByClass("ilContSkillPresentationGUI", "")
99 );
101 "mem_records",
102 $lng->txt("cont_skill_records"),
103 $ctrl->getLinkTargetByClass("ilContSkillPresentationGUI", "showRecords")
104 );
105 }
106
107 if ($this->access->checkAccess("grade", "", $this->ref_id)) {
109 "members",
110 $lng->txt("cont_skill_members"),
111 $ctrl->getLinkTargetByClass("ilContSkillAdminGUI", "listMembers")
112 );
113 }
114
115 if ($this->access->checkAccess("write", "", $this->ref_id)) {
117 "competences",
118 $lng->txt("cont_skill_assigned_comp"),
119 $ctrl->getLinkTargetByClass("ilContSkillAdminGUI", "listCompetences")
120 );
121
122 if ($this->skmg_settings->getLocalAssignmentOfProfiles()
123 || $this->skmg_settings->getAllowLocalProfiles()) {
125 "profiles",
126 $lng->txt("cont_skill_assigned_profiles"),
127 $ctrl->getLinkTargetByClass("ilContSkillAdminGUI", "listProfiles")
128 );
129 }
130
132 "settings",
133 $lng->txt("settings"),
134 $ctrl->getLinkTargetByClass("ilContSkillAdminGUI", "settings")
135 );
136 }
137 }
138}
Container skills administration.
Skill presentation for container (course/group)
Class ilContainerGUI This is a base GUI class for all container objects in ILIAS: root folder,...
Skills for container (course/group) (top gui class)
__construct(ilContainerGUI $a_container_gui)
ilSkillManagementSettings $skmg_settings
Class ilContainer.
Class ilCtrl provides processing control methods.
forwardCommand(object $a_gui_object)
@inheritDoc
getLinkTargetByClass( $a_class, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
@inheritDoc
language handling
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...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
addSubTab(string $a_id, string $a_text, string $a_link, string $a_frame="")
Interface ilAccessHandler This interface combines all available interfaces which can be called via gl...
global $DIC
Definition: shib_login.php:26