ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
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...
 

Static Public Member Functions

static isAccessible ($ref_id)
 Is container skill presentation accessible. More...
 

Protected Member Functions

 setPermanentLink ()
 Set permanent link. More...
 
 getPersonalSkillsGUI ()
 Get personal skills gui. More...
 
 getSubtreeObjectIds ()
 

Protected Attributes

 $ctrl
 
 $tabs
 
 $lng
 
 $tpl
 
 $container_gui
 
 $container
 
 $user
 
 $container_skills
 
 $container_global_profiles
 
 $container_local_profiles
 
 $container_skill_collector
 

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 74 of file class.ilContSkillPresentationGUI.php.

References $DIC, and user().

75  {
76  global $DIC;
77 
78  $this->ctrl = $DIC->ctrl();
79  $this->tabs = $DIC->tabs();
80  $this->lng = $DIC->language();
81  $this->tpl = $DIC["tpl"];
82  $this->user = $DIC->user();
83 
84  $this->container_gui = $a_container_gui;
85  $this->container = $a_container_gui->object;
86 
87  include_once("./Services/Container/Skills/classes/class.ilContainerSkills.php");
88  $this->container_skills = new ilContainerSkills($this->container->getId());
89  $this->container_global_profiles = new ilContainerGlobalProfiles($this->container->getId());
90  $this->container_local_profiles = new ilContainerLocalProfiles($this->container->getId());
91 
92  $this->container_skill_collector = new ilContSkillCollector(
93  $this->container_skills,
94  $this->container_global_profiles,
95  $this->container_local_profiles
96  );
97  }
Skills of a container.
user()
Definition: user.php:4
Global competence profiles of a container.
global $DIC
Definition: goto.php:24
Local competence profiles of a container.
Collector of skills for a container.
+ Here is the call graph for this function:

Member Function Documentation

◆ executeCommand()

ilContSkillPresentationGUI::executeCommand ( )

Execute command.

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

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

103  {
104  $ctrl = $this->ctrl;
105  $tabs = $this->tabs;
106 
107  $tabs->activateSubTab("list");
108 
109  $next_class = $this->ctrl->getNextClass($this);
110  $cmd = $this->ctrl->getCmd("show");
111  $this->setPermanentLink();
112 
113  switch ($next_class) {
114  case "ilpersonalskillsgui":
115  $ctrl->forwardCommand($this->getPersonalSkillsGUI());
116  break;
117 
118  default:
119  if (in_array($cmd, array("show"))) {
120  $this->$cmd();
121  }
122  }
123  }
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 142 of file class.ilContSkillPresentationGUI.php.

References $lng, and getSubtreeObjectIds().

Referenced by executeCommand(), and show().

143  {
144  $lng = $this->lng;
145 
146  $gui = new ilPersonalSkillsGUI();
147  $gui->setGapAnalysisActualStatusModePerObject($this->container->getId());
148  $gui->setTriggerObjectsFilter($this->getSubtreeObjectIds());
149  $gui->setHistoryView(true); // NOT IMPLEMENTED YET
150  $skills = $this->container_skill_collector->getSkillsForPresentationGUI();
151  $gui->setObjectSkills($this->container_skills->getId(), $skills);
152  $gui->setObjectSkillProfiles($this->container_global_profiles, $this->container_local_profiles);
153  return $gui;
154  }
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 167 of file class.ilContSkillPresentationGUI.php.

References $DIC.

Referenced by getPersonalSkillsGUI().

168  {
169  global $DIC; /* @var ILIAS\DI\Container $DIC */
170 
171  $nodes = $DIC->repositoryTree()->getSubTree(
172  $DIC->repositoryTree()->getNodeData($this->container->getRefId())
173  );
174 
175  $objects = array();
176 
177  foreach ($nodes as $node) {
178  $objects[] = $node['obj_id'];
179  }
180 
181 
182  return $objects;
183  }
global $DIC
Definition: goto.php:24
+ Here is the caller graph for this function:

◆ isAccessible()

static ilContSkillPresentationGUI::isAccessible (   $ref_id)
static

Is container skill presentation accessible.

Parameters
$ref_id
Returns
bool

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

References $DIC, ilContainer\_lookupContainerSetting(), ilObject\_lookupObjId(), and ilObjectServiceSettingsGUI\SKILLS.

Referenced by ilObjGroupGUI\_goto(), ilObjCourseGUI\_goto(), and ilObjCourseGUI\getTabs().

191  {
192  global $DIC;
193 
194  $access = $DIC->access();
195 
196  $obj_id = ilObject::_lookupObjId($ref_id);
197  if ($access->checkAccess('read', '', $ref_id) && ilContainer::_lookupContainerSetting(
198  $obj_id,
200  false
201  )) {
202  $skmg_set = new ilSetting("skmg");
203  if ($skmg_set->get("enable_skmg")) {
204  return true;
205  }
206  }
207  return false;
208  }
static _lookupObjId($a_id)
global $DIC
Definition: goto.php:24
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=null)
Lookup a container setting.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setPermanentLink()

ilContSkillPresentationGUI::setPermanentLink ( )
protected

Set permanent link.

Parameters

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

References $type.

Referenced by executeCommand().

131  {
132  $type = $this->container->getType();
133  $ref_id = $this->container->getRefId();
134  $this->tpl->setPermanentLink($type, "", $ref_id . "_comp", "", "");
135  }
$type
+ Here is the caller graph for this function:

◆ show()

ilContSkillPresentationGUI::show ( )

Show.

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

References getPersonalSkillsGUI().

162  {
163  $gui = $this->getPersonalSkillsGUI();
164  $gui->listProfilesForGap();
165  }
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_global_profiles

ilContSkillPresentationGUI::$container_global_profiles
protected

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

◆ $container_gui

ilContSkillPresentationGUI::$container_gui
protected

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

◆ $container_local_profiles

ilContSkillPresentationGUI::$container_local_profiles
protected

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

◆ $container_skill_collector

ilContSkillPresentationGUI::$container_skill_collector
protected

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

◆ $container_skills

ilContSkillPresentationGUI::$container_skills
protected

Definition at line 52 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: