ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilContainerSkillGUI.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2017 ILIAS open source, Extended GPL, see docs/LICENSE */
4
13{
17 protected $ctrl;
18
22 protected $tabs;
23
27 protected $lng;
28
32 protected $container_gui;
33
34
38 protected $container;
39
43 protected $access;
44
50 public function __construct($a_container_gui)
51 {
52 global $DIC;
53
54 $this->ctrl = $DIC->ctrl();
55 $this->tabs = $DIC->tabs();
56 $this->lng = $DIC->language();
57 $this->access = $DIC->access();
58
59 $this->container_gui = $a_container_gui;
60 $this->container = $a_container_gui->object;
61 $this->ref_id = $this->container->getRefId();
62 }
63
67 public function executeCommand()
68 {
70
71 $next_class = $this->ctrl->getNextClass($this);
72 $cmd = $this->ctrl->getCmd("show");
73
74 $this->addTabs();
75
76 switch ($next_class) {
77 case "ilcontskillpresentationgui":
78 if ($this->access->checkAccess("read", "", $this->ref_id)) {
79 include_once("./Services/Container/Skills/classes/class.ilContSkillPresentationGUI.php");
80 $gui = new ilContSkillPresentationGUI($this->container_gui);
81 $ctrl->forwardCommand($gui);
82 }
83 break;
84
85 case "ilcontskilladmingui":
86 if ($this->access->checkAccess("write", "", $this->ref_id) || $this->access->checkAccess("grade", "", $this->ref_id)) {
87 include_once("./Services/Container/Skills/classes/class.ilContSkillAdminGUI.php");
88 $gui = new ilContSkillAdminGUI($this->container_gui);
89 $ctrl->forwardCommand($gui);
90 }
91 break;
92
93 default:
94 /*if (in_array($cmd, array("show")))
95 {
96 $this->$cmd();
97 }*/
98 }
99 }
100
106 public function addTabs()
107 {
111
112 if ($this->access->checkAccess("read", "", $this->ref_id)) {
113 $tabs->addSubTab(
114 "list",
115 $lng->txt("cont_skill_show"),
116 $ctrl->getLinkTargetByClass("ilContSkillPresentationGUI", "")
117 );
118 }
119
120 if ($this->access->checkAccess("grade", "", $this->ref_id)) {
121 $tabs->addSubTab(
122 "members",
123 $lng->txt("cont_skill_members"),
124 $ctrl->getLinkTargetByClass("ilContSkillAdminGUI", "listMembers")
125 );
126 }
127
128 if ($this->access->checkAccess("write", "", $this->ref_id)) {
129 $tabs->addSubTab(
130 "competences",
131 $lng->txt("cont_skill_assigned_comp"),
132 $ctrl->getLinkTargetByClass("ilContSkillAdminGUI", "listCompetences")
133 );
134
135 $tabs->addSubTab(
136 "settings",
137 $lng->txt("settings"),
138 $ctrl->getLinkTargetByClass("ilContSkillAdminGUI", "settings")
139 );
140 }
141 }
142}
An exception for terminatinating execution or to throw for unit testing.
Container skills administration.
Skill presentatio for container (course/group)
Skills for container (course/group) (top gui class)
__construct($a_container_gui)
Constructor.
executeCommand()
Execute command.
$DIC
Definition: xapitoken.php:46