ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilContSkillPresentationGUI Class Reference

Skill presentatio for container (course/group) More...

+ Collaboration diagram for ilContSkillPresentationGUI:

Public Member Functions

 __construct ($a_container_gui)
 Constructor. More...
 
 executeCommand ()
 Execute command. More...
 
 show ()
 Show. More...
 

Protected Member Functions

 getPersonalSkillsGUI ()
 Get personal skills gui. More...
 
 getSubtreeObjectIds ()
 

Protected Attributes

 $ctrl
 
 $tabs
 
 $lng
 
 $tpl
 
 $container_gui
 
 $container
 
 $user
 

Detailed Description

Skill presentatio for container (course/group)

Author
Alex Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

ilContSkillPresentationGUI: ilPersonalSkillsGUI

Definition at line 12 of file class.ilContSkillPresentationGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilContSkillPresentationGUI::__construct (   $a_container_gui)

Constructor.

Parameters

Definition at line 54 of file class.ilContSkillPresentationGUI.php.

References $DIC, and user().

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  }
global $DIC
Definition: saml.php:7
Skills of a container.
user()
Definition: user.php:4
+ Here is the call graph for this function:

Member Function Documentation

◆ executeCommand()

ilContSkillPresentationGUI::executeCommand ( )

Execute command.

Definition at line 74 of file class.ilContSkillPresentationGUI.php.

References $ctrl, $tabs, and getPersonalSkillsGUI().

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  }
getPersonalSkillsGUI()
Get personal skills gui.
+ Here is the call graph for this function:

◆ getPersonalSkillsGUI()

ilContSkillPresentationGUI::getPersonalSkillsGUI ( )
protected

Get personal skills gui.

Returns
ilPersonalSkillsGUI

Definition at line 101 of file class.ilContSkillPresentationGUI.php.

References $lng, and getSubtreeObjectIds().

Referenced by executeCommand(), and show().

102  {
103  $lng = $this->lng;
104 
105  include_once("./Services/Skill/classes/class.ilPersonalSkillsGUI.php");
106  $gui = new ilPersonalSkillsGUI();
107  $gui->setGapAnalysisActualStatusModePerObject($this->container->getId());
108  $gui->setTriggerObjectsFilter($this->getSubtreeObjectIds());
109  $gui->setHistoryView(true); // NOT IMPLEMENTED YET
110  $skills = array_map(function ($v) {
111  return array(
112  "base_skill_id" => $v["skill_id"],
113  "tref_id" => $v["tref_id"]
114  );
115  }, $this->container_skills->getSkills());
116  $gui->setObjectSkills($this->container_skills->getId(), $skills);
117  return $gui;
118  }
Personal skills GUI class.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSubtreeObjectIds()

ilContSkillPresentationGUI::getSubtreeObjectIds ( )
protected

Definition at line 131 of file class.ilContSkillPresentationGUI.php.

References $DIC, and $nodes.

Referenced by getPersonalSkillsGUI().

132  {
133  global $DIC; /* @var ILIAS\DI\Container $DIC */
134 
135  $nodes = $DIC->repositoryTree()->getSubTree(
136  $DIC->repositoryTree()->getNodeData($this->container->getRefId())
137  );
138 
139  $objects = array();
140 
141  foreach ($nodes as $node) {
142  $objects[] = $node['obj_id'];
143  }
144 
145 
146  return $objects;
147  }
global $DIC
Definition: saml.php:7
+ Here is the caller graph for this function:

◆ show()

ilContSkillPresentationGUI::show ( )

Show.

Definition at line 125 of file class.ilContSkillPresentationGUI.php.

References getPersonalSkillsGUI().

126  {
127  $gui = $this->getPersonalSkillsGUI();
128  $gui->listProfilesForGap();
129  }
getPersonalSkillsGUI()
Get personal skills gui.
+ Here is the call graph for this function:

Field Documentation

◆ $container

ilContSkillPresentationGUI::$container
protected

Definition at line 42 of file class.ilContSkillPresentationGUI.php.

◆ $container_gui

ilContSkillPresentationGUI::$container_gui
protected

Definition at line 37 of file class.ilContSkillPresentationGUI.php.

◆ $ctrl

ilContSkillPresentationGUI::$ctrl
protected

Definition at line 17 of file class.ilContSkillPresentationGUI.php.

Referenced by executeCommand().

◆ $lng

ilContSkillPresentationGUI::$lng
protected

Definition at line 27 of file class.ilContSkillPresentationGUI.php.

Referenced by getPersonalSkillsGUI().

◆ $tabs

ilContSkillPresentationGUI::$tabs
protected

Definition at line 22 of file class.ilContSkillPresentationGUI.php.

Referenced by executeCommand().

◆ $tpl

ilContSkillPresentationGUI::$tpl
protected

Definition at line 32 of file class.ilContSkillPresentationGUI.php.

◆ $user

ilContSkillPresentationGUI::$user
protected

Definition at line 47 of file class.ilContSkillPresentationGUI.php.


The documentation for this class was generated from the following file: