ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilContSkillPresentationGUI Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Collaboration diagram for ilContSkillPresentationGUI:

Public Member Functions

 __construct (ilContainerGUI $a_container_gui)
 
 executeCommand ()
 
 show ()
 

Static Public Member Functions

static isAccessible (int $ref_id)
 

Protected Member Functions

 setPermanentLink ()
 
 getPersonalSkillsGUI ()
 
 getSubtreeObjectIds ()
 

Protected Attributes

ilCtrl $ctrl
 
ilTabsGUI $tabs
 
ilLanguage $lng
 
ilGlobalTemplateInterface $tpl
 
ilContainerGUI $container_gui
 
ilContainer $container
 
ilObjUser $user
 
ilContainerSkills $container_skills
 
ilContainerGlobalProfiles $container_global_profiles
 
ilContainerLocalProfiles $container_local_profiles
 
ilContSkillCollector $container_skill_collector
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Skill presentation for container (course/group)

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

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

Constructor & Destructor Documentation

◆ __construct()

ilContSkillPresentationGUI::__construct ( ilContainerGUI  $a_container_gui)

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

References $DIC, ILIAS\Repository\ctrl(), ilObjectGUI\getObject(), ILIAS\Repository\lng(), ILIAS\Repository\tabs(), and ILIAS\Repository\user().

41  {
42  global $DIC;
43 
44  $this->ctrl = $DIC->ctrl();
45  $this->tabs = $DIC->tabs();
46  $this->lng = $DIC->language();
47  $this->tpl = $DIC["tpl"];
48  $this->user = $DIC->user();
49 
50  $this->container_gui = $a_container_gui;
51  /* @var $obj ilContainer */
52  $obj = $this->container_gui->getObject();
53  $this->container = $obj;
54 
55  $this->container_skills = new ilContainerSkills($this->container->getId());
56  $this->container_global_profiles = new ilContainerGlobalProfiles($this->container->getId());
57  $this->container_local_profiles = new ilContainerLocalProfiles($this->container->getId());
58 
59  $this->container_skill_collector = new ilContSkillCollector(
60  $this->container_skills,
61  $this->container_global_profiles,
62  $this->container_local_profiles
63  );
64  }
Skills of a container.
global $DIC
Definition: feed.php:28
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Collector of skills for a container.
+ Here is the call graph for this function:

Member Function Documentation

◆ executeCommand()

ilContSkillPresentationGUI::executeCommand ( )

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

References $ctrl, $tabs, ilTabsGUI\activateSubTab(), ILIAS\Repository\ctrl(), ilCtrl\forwardCommand(), getPersonalSkillsGUI(), and setPermanentLink().

66  : void
67  {
70 
71  $tabs->activateSubTab("list");
72 
73  $next_class = $this->ctrl->getNextClass($this);
74  $cmd = $this->ctrl->getCmd("show");
75  $this->setPermanentLink();
76 
77  switch ($next_class) {
78  case "ilpersonalskillsgui":
80  break;
81 
82  default:
83  if ($cmd === "show") {
84  $this->$cmd();
85  }
86  }
87  }
activateSubTab(string $a_id)
forwardCommand(object $a_gui_object)
+ Here is the call graph for this function:

◆ getPersonalSkillsGUI()

ilContSkillPresentationGUI::getPersonalSkillsGUI ( )
protected

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

References $lng, and getSubtreeObjectIds().

Referenced by executeCommand(), and show().

97  {
98  $lng = $this->lng;
99 
100  $gui = new ilPersonalSkillsGUI();
101  $gui->setGapAnalysisActualStatusModePerObject($this->container->getId());
102  $gui->setTriggerObjectsFilter($this->getSubtreeObjectIds());
103  $gui->setHistoryView(true); // NOT IMPLEMENTED YET
104  $skills = $this->container_skill_collector->getSkillsForPresentationGUI();
105  $gui->setObjectSkills($this->container_skills->getId(), $skills);
106  $gui->setObjectSkillProfiles($this->container_global_profiles, $this->container_local_profiles);
107  return $gui;
108  }
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 116 of file class.ilContSkillPresentationGUI.php.

References $DIC.

Referenced by getPersonalSkillsGUI().

116  : array
117  {
118  global $DIC; /* @var ILIAS\DI\Container $DIC */
119 
120  $nodes = $DIC->repositoryTree()->getSubTree(
121  $DIC->repositoryTree()->getNodeData($this->container->getRefId())
122  );
123 
124  $objects = [];
125 
126  foreach ($nodes as $node) {
127  $objects[] = $node['obj_id'];
128  }
129 
130  return $objects;
131  }
global $DIC
Definition: feed.php:28
+ Here is the caller graph for this function:

◆ isAccessible()

static ilContSkillPresentationGUI::isAccessible ( int  $ref_id)
static

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

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

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

133  : bool
134  {
135  global $DIC;
136 
137  $access = $DIC->access();
138 
139  $obj_id = ilObject::_lookupObjId($ref_id);
140  if ($access->checkAccess('read', '', $ref_id) && ilContainer::_lookupContainerSetting(
141  $obj_id,
143  '0'
144  )) {
145  $skmg_set = new ilSetting("skmg");
146  if ($skmg_set->get("enable_skmg")) {
147  return true;
148  }
149  }
150  return false;
151  }
static _lookupContainerSetting(int $a_id, string $a_keyword, string $a_default_value=null)
static _lookupObjId(int $ref_id)
global $DIC
Definition: feed.php:28
$ref_id
Definition: ltiauth.php:67
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setPermanentLink()

ilContSkillPresentationGUI::setPermanentLink ( )
protected

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

References $ref_id, and $type.

Referenced by executeCommand().

89  : void
90  {
91  $type = $this->container->getType();
92  $ref_id = $this->container->getRefId();
93  $this->tpl->setPermanentLink($type, 0, $ref_id . "_comp", "", "");
94  }
$type
$ref_id
Definition: ltiauth.php:67
+ Here is the caller graph for this function:

◆ show()

ilContSkillPresentationGUI::show ( )

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

References getPersonalSkillsGUI().

110  : void
111  {
112  $gui = $this->getPersonalSkillsGUI();
113  $gui->listProfilesForGap();
114  }
+ Here is the call graph for this function:

Field Documentation

◆ $container

ilContainer ilContSkillPresentationGUI::$container
protected

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

◆ $container_global_profiles

ilContainerGlobalProfiles ilContSkillPresentationGUI::$container_global_profiles
protected

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

◆ $container_gui

ilContainerGUI ilContSkillPresentationGUI::$container_gui
protected

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

◆ $container_local_profiles

ilContainerLocalProfiles ilContSkillPresentationGUI::$container_local_profiles
protected

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

◆ $container_skill_collector

ilContSkillCollector ilContSkillPresentationGUI::$container_skill_collector
protected

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

◆ $container_skills

ilContainerSkills ilContSkillPresentationGUI::$container_skills
protected

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

◆ $ctrl

ilCtrl ilContSkillPresentationGUI::$ctrl
protected

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

Referenced by executeCommand().

◆ $lng

ilLanguage ilContSkillPresentationGUI::$lng
protected

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

Referenced by getPersonalSkillsGUI().

◆ $tabs

ilTabsGUI ilContSkillPresentationGUI::$tabs
protected

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

Referenced by executeCommand().

◆ $tpl

ilGlobalTemplateInterface ilContSkillPresentationGUI::$tpl
protected

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

◆ $user

ilObjUser ilContSkillPresentationGUI::$user
protected

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


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