ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 @ilCtrl_Calls 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.

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:26

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

+ Here is the call graph for this function:

Member Function Documentation

◆ executeCommand()

ilContSkillPresentationGUI::executeCommand ( )

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

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)
@inheritDoc

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

+ Here is the call graph for this function:

◆ getPersonalSkillsGUI()

ilContSkillPresentationGUI::getPersonalSkillsGUI ( )
protected

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

91 {
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.

References $lng, and getSubtreeObjectIds().

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

+ 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.

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 }

References $DIC.

Referenced by getPersonalSkillsGUI().

+ 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.

141 : bool
142 {
143 global $DIC;
144
145 $access = $DIC->access();
146
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 _lookupContainerSetting(int $a_id, string $a_keyword, ?string $a_default_value=null)
static _lookupObjId(int $ref_id)
ILIAS Setting Class.
$ref_id
Definition: ltiauth.php:66

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

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

+ 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.

83 : void
84 {
85 $type = $this->container->getType();
86 $ref_id = $this->container->getRefId();
87 $this->tpl->setPermanentLink($type, $ref_id, "comp");
88 }

References $ref_id.

Referenced by executeCommand().

+ Here is the caller graph for this function:

◆ showProfiles()

ilContSkillPresentationGUI::showProfiles ( )

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

104 : void
105 {
107
108 $tabs->activateSubTab("mem_profiles");
109
110 $gui = $this->getPersonalSkillsGUI();
111 $gui->listAllProfilesForGap();
112 }
activateSubTab(string $a_id)

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

+ Here is the call graph for this function:

◆ showRecords()

ilContSkillPresentationGUI::showRecords ( )

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

114 : void
115 {
117
118 $tabs->activateSubTab("mem_records");
119
120 $gui = $this->getPersonalSkillsGUI();
121 $gui->listRecordsForGap();
122 }

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

+ 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: