ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilContSkillPresentationGUI.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 $tpl;
33
37 protected $container_gui;
38
42 protected $container;
43
47 protected $user;
48
54 public function __construct($a_container_gui)
55 {
56 global $DIC;
57
58 $this->ctrl = $DIC->ctrl();
59 $this->tabs = $DIC->tabs();
60 $this->lng = $DIC->language();
61 $this->tpl = $DIC["tpl"];
62 $this->user = $DIC->user();
63
64 $this->container_gui = $a_container_gui;
65 $this->container = $a_container_gui->object;
66
67 include_once("./Services/Container/Skills/classes/class.ilContainerSkills.php");
68 $this->container_skills = new ilContainerSkills($this->container->getId());
69 }
70
74 public function executeCommand()
75 {
78
79 $tabs->activateSubTab("list");
80
81 $next_class = $this->ctrl->getNextClass($this);
82 $cmd = $this->ctrl->getCmd("show");
83
84 switch ($next_class) {
85 case "ilpersonalskillsgui":
86 $ctrl->forwardCommand($this->getPersonalSkillsGUI());
87 break;
88
89 default:
90 if (in_array($cmd, array("show"))) {
91 $this->$cmd();
92 }
93 }
94 }
95
101 protected function getPersonalSkillsGUI()
102 {
104
105 include_once("./Services/Skill/classes/class.ilPersonalSkillsGUI.php");
106 $gui = new ilPersonalSkillsGUI();
107 $gui->setGapAnalysisActualStatusModePerObject($this->container->getId());
108 $gui->setHistoryView(true); // NOT IMPLEMENTED YET
109 $skills = array_map(function ($v) {
110 return array(
111 "base_skill_id" => $v["skill_id"],
112 "tref_id" => $v["tref_id"]
113 );
114 }, $this->container_skills->getSkills());
115 $gui->setObjectSkills($this->container_skills->getId(), $skills);
116 return $gui;
117 }
118
119
120
124 public function show()
125 {
126 $gui = $this->getPersonalSkillsGUI();
127 $gui->listProfilesForGap();
128 }
129}
user()
Definition: user.php:4
An exception for terminatinating execution or to throw for unit testing.
Skill presentatio for container (course/group)
getPersonalSkillsGUI()
Get personal skills gui.
__construct($a_container_gui)
Constructor.
Skills of a container.
Personal skills GUI class.
global $DIC
Definition: saml.php:7