46 $this->main_tpl = $DIC->ui()->mainTemplate();
48 $this->
access = ilMyStaffAccess::getInstance();
50 $this->usr_id = $DIC->http()->request()->getQueryParams()[
'usr_id'];
51 $DIC->ctrl()->setParameter($this,
'usr_id', $this->usr_id);
67 $this->main_tpl->setOnScreenMessage(
'failure', $DIC->language()->txt(
"permission_denied"),
true);
68 $DIC->ctrl()->redirectByClass(ilDashboardGUI::class,
"");
71 if ($this->
access->hasCurrentUserAccessToUser($this->usr_id)) {
74 $this->main_tpl->setOnScreenMessage(
'failure', $DIC->language()->txt(
"permission_denied"),
true);
75 $DIC->ctrl()->redirectByClass(ilDashboardGUI::class,
"");
85 $cmd = $DIC->ctrl()->getCmd();
86 $next_class = $DIC->ctrl()->getNextClass();
88 switch ($next_class) {
89 case strtolower(ilMStShowUserCoursesGUI::class):
90 $this->
addTabs(self::TAB_SHOW_COURSES);
92 $DIC->ctrl()->forwardCommand($gui);
94 case strtolower(ilUserCertificateGUI::class):
95 $this->
addTabs(self::TAB_SHOW_CERTIFICATES);
102 $DIC->ctrl()->forwardCommand($gui);
105 case strtolower(ilMStShowUserCompetencesGUI::class):
106 $this->
addTabs(self::TAB_SHOW_COMPETENCES);
108 $DIC->ctrl()->forwardCommand($gui);
110 case strtolower(ilEmployeeTalkMyStaffUserGUI::class):
111 $this->
addTabs(self::TAB_SHOW_TALKS);
113 ilMyStaffAccess::getInstance(),
116 $DIC->http()->request(),
117 $DIC->ui()->mainTemplate(),
124 $DIC->ctrl()->forwardCommand($gui);
129 case self::CMD_SHOW_USER:
130 $this->
addTabs(self::TAB_SHOW_USER);
143 $DIC->ctrl()->redirectByClass(ilMStShowUserCoursesGUI::class);
152 if (!$user->hasPublicProfile()) {
153 $DIC->ctrl()->redirectByClass(self::class, self::CMD_INDEX);
157 $DIC->ui()->mainTemplate()->setContent($pub_profile->getEmbeddable());
164 $DIC->ctrl()->redirect($this);
167 protected function addTabs(
string $active_tab_id): void
171 $DIC->tabs()->setBackTarget($DIC->language()->txt(
'mst_list_users'), $DIC->ctrl()->getLinkTargetByClass(array(
173 ilMStListUsersGUI::class,
176 if ($this->
access->hasCurrentUserAccessToCourseMemberships()) {
177 $DIC->tabs()->addTab(
178 self::TAB_SHOW_COURSES,
179 $DIC->language()->txt(
'mst_list_courses'),
180 $DIC->ctrl()->getLinkTargetByClass(array(
183 ilMStShowUserCoursesGUI::class,
188 if ($this->
access->hasCurrentUserAccessToCertificates()) {
189 $DIC->tabs()->addTab(
190 self::TAB_SHOW_CERTIFICATES,
191 $DIC->language()->txt(
'mst_list_certificates'),
192 $DIC->ctrl()->getLinkTargetByClass(array(
195 ilUserCertificateGUI::class,
200 if ($this->
access->hasCurrentUserAccessToCompetences()) {
201 $DIC->tabs()->addTab(
202 self::TAB_SHOW_COMPETENCES,
203 $DIC->language()->txt(
'mst_list_competences'),
204 $DIC->ctrl()->getLinkTargetByClass(array(
207 ilMStShowUserCompetencesGUI::class,
213 if ($user->hasPublicProfile()) {
214 $DIC->ctrl()->setParameterByClass(self::class,
'usr_id', $this->usr_id);
215 $public_profile_url = $DIC->ctrl()->getLinkTargetByClass(self::class, self::CMD_SHOW_USER);
216 $DIC->tabs()->addTab(self::TAB_SHOW_USER, $DIC->language()->txt(
'public_profile'), $public_profile_url);
219 if ($this->
access->hasCurrentUserAccessToTalks()) {
220 $DIC->ctrl()->setParameterByClass(strtolower(self::class),
'usr_id', $this->usr_id);
221 $DIC->tabs()->addTab(self::TAB_SHOW_TALKS, $DIC->language()->txt(
'etal_talks'), $DIC->ctrl()->getLinkTargetByClass([
222 strtolower(ilMyStaffGUI::class),
223 strtolower(self::class),
224 strtolower(ilEmployeeTalkMyStaffUserGUI::class)
225 ], ControlFlowCommand::INDEX));
228 if ($active_tab_id) {
229 $DIC->tabs()->activateTab($active_tab_id);
const TAB_SHOW_CERTIFICATES
static getNamePresentation( $a_user_id, bool $a_user_image=false, bool $a_profile_link=false, string $a_profile_back_link="", bool $a_force_first_lastname=false, bool $a_omit_login=false, bool $a_sortable=true, bool $a_return_data_array=false, $a_ctrl_path="ilpublicuserprofilegui")
Default behaviour is:
addTabs(string $active_tab_id)
Class ilEmployeeTalkMyStaffUserGUI.
const TAB_SHOW_COMPETENCES
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...
static _getPersonalPicturePath(int $a_usr_id, string $a_size="small", bool $a_force_pic=false, bool $a_prevent_no_photo_image=false, bool $html_export=false)
ilGlobalTemplateInterface $main_tpl
Class ilMStShowUserCompetencesGUI.