ILIAS  trunk Revision v11.0_alpha-1749-g1a06bdef097
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilContSkillPresentationGUI Class Reference

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

+ Collaboration diagram for ilContSkillPresentationGUI:

Public Member Functions

 __construct (ilContainerGUI $a_container_gui)
 
 executeCommand ()
 
 showProfiles ()
 
 showRecords ()
 

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
 
ILIAS Container Skills ContainerSkillManager $cont_skill_manager
 
int $cont_member_role_id = 0
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ilContSkillPresentationGUI::__construct ( ilContainerGUI  $a_container_gui)

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

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

42  {
43  global $DIC;
44 
45  $this->ctrl = $DIC->ctrl();
46  $this->tabs = $DIC->tabs();
47  $this->lng = $DIC->language();
48  $this->tpl = $DIC["tpl"];
49  $this->user = $DIC->user();
50 
51  $this->container_gui = $a_container_gui;
52  /* @var $obj ilContainer */
53  $obj = $this->container_gui->getObject();
54  $this->container = $obj;
55  $this->cont_member_role_id = ilParticipants::getDefaultMemberRole($this->container->getRefId());
56 
57  $this->cont_skill_manager = $DIC->skills()->internalContainer()->manager()->getSkillManager(
58  $this->container->getId(),
59  $this->container->getRefId()
60  );
61  }
static getDefaultMemberRole(int $a_ref_id)
global $DIC
Definition: shib_login.php:22
+ Here is the call graph for this function:

Member Function Documentation

◆ executeCommand()

ilContSkillPresentationGUI::executeCommand ( )

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

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

63  : void
64  {
66 
67  $next_class = $this->ctrl->getNextClass($this);
68  $cmd = $this->ctrl->getCmd("showProfiles");
69  $this->setPermanentLink();
70 
71  switch ($next_class) {
72  case "ilpersonalskillsgui":
74  break;
75 
76  default:
77  if (in_array($cmd, ["showProfiles", "showRecords"])) {
78  $this->$cmd();
79  }
80  }
81  }
forwardCommand(object $a_gui_object)
+ Here is the call graph for this function:

◆ getPersonalSkillsGUI()

ilContSkillPresentationGUI::getPersonalSkillsGUI ( )
protected

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

References $lng, and getSubtreeObjectIds().

Referenced by executeCommand(), showProfiles(), and showRecords().

91  {
92  $lng = $this->lng;
93 
94  $gui = new ilPersonalSkillsGUI();
95  $gui->setGapAnalysisActualStatusModePerObject($this->container->getId());
96  $gui->setTriggerObjectsFilter($this->getSubtreeObjectIds());
97  $gui->setHistoryView(true); // NOT IMPLEMENTED YET
98  $skills = $this->cont_skill_manager->getSkillsForPresentationGUI();
99  $gui->setObjectSkills($this->container->getId(), $skills);
100  $gui->setObjectSkillProfiles($this->cont_member_role_id);
101  return $gui;
102  }
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 124 of file class.ilContSkillPresentationGUI.php.

References $DIC.

Referenced by getPersonalSkillsGUI().

124  : array
125  {
126  global $DIC; /* @var ILIAS\DI\Container $DIC */
127 
128  $nodes = $DIC->repositoryTree()->getSubTree(
129  $DIC->repositoryTree()->getNodeData($this->container->getRefId())
130  );
131 
132  $objects = [];
133 
134  foreach ($nodes as $node) {
135  $objects[] = $node['obj_id'];
136  }
137 
138  return $objects;
139  }
global $DIC
Definition: shib_login.php:22
+ Here is the caller graph for this function:

◆ isAccessible()

static ilContSkillPresentationGUI::isAccessible ( int  $ref_id)
static

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

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

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

141  : bool
142  {
143  global $DIC;
144 
145  $access = $DIC->access();
146 
147  $obj_id = ilObject::_lookupObjId($ref_id);
148  if ($access->checkAccess('read', '', $ref_id) && ilContainer::_lookupContainerSetting(
149  $obj_id,
151  '0'
152  )) {
153  $skmg_set = new ilSetting("skmg");
154  if ($skmg_set->get("enable_skmg")) {
155  return true;
156  }
157  }
158  return false;
159  }
static _lookupObjId(int $ref_id)
$ref_id
Definition: ltiauth.php:65
global $DIC
Definition: shib_login.php:22
static _lookupContainerSetting(int $a_id, string $a_keyword, ?string $a_default_value=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setPermanentLink()

ilContSkillPresentationGUI::setPermanentLink ( )
protected

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

References $ref_id.

Referenced by executeCommand().

83  : void
84  {
85  $type = $this->container->getType();
86  $ref_id = $this->container->getRefId();
87  $this->tpl->setPermanentLink($type, $ref_id, "comp");
88  }
$ref_id
Definition: ltiauth.php:65
+ Here is the caller graph for this function:

◆ showProfiles()

ilContSkillPresentationGUI::showProfiles ( )

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

References $tabs, ilTabsGUI\activateSubTab(), and getPersonalSkillsGUI().

104  : void
105  {
106  $tabs = $this->tabs;
107 
108  $tabs->activateSubTab("mem_profiles");
109 
110  $gui = $this->getPersonalSkillsGUI();
111  $gui->listAllProfilesForGap();
112  }
activateSubTab(string $a_id)
+ Here is the call graph for this function:

◆ showRecords()

ilContSkillPresentationGUI::showRecords ( )

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

References $tabs, ilTabsGUI\activateSubTab(), and getPersonalSkillsGUI().

114  : void
115  {
116  $tabs = $this->tabs;
117 
118  $tabs->activateSubTab("mem_records");
119 
120  $gui = $this->getPersonalSkillsGUI();
121  $gui->listRecordsForGap();
122  }
activateSubTab(string $a_id)
+ Here is the call graph for this function:

Field Documentation

◆ $cont_member_role_id

int ilContSkillPresentationGUI::$cont_member_role_id = 0
protected

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

◆ $cont_skill_manager

ILIAS Container Skills ContainerSkillManager ilContSkillPresentationGUI::$cont_skill_manager
protected

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

◆ $container

ilContainer ilContSkillPresentationGUI::$container
protected

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

◆ $container_gui

ilContainerGUI ilContSkillPresentationGUI::$container_gui
protected

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

◆ $ctrl

ilCtrl ilContSkillPresentationGUI::$ctrl
protected

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

Referenced by executeCommand().

◆ $lng

ilLanguage ilContSkillPresentationGUI::$lng
protected

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

Referenced by getPersonalSkillsGUI().

◆ $tabs

ilTabsGUI ilContSkillPresentationGUI::$tabs
protected

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

Referenced by showProfiles(), and showRecords().

◆ $tpl

ilGlobalTemplateInterface ilContSkillPresentationGUI::$tpl
protected

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

◆ $user

ilObjUser ilContSkillPresentationGUI::$user
protected

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


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