19declare(strict_types=1);
63 $this->tool_context =
$DIC->globalScreen()->tool()->context();
64 $this->
user = $DIC->user();
66 $this->
help = $DIC->help();
68 $this->
lng = $DIC->language();
69 $this->
ctrl = $DIC->ctrl();
72 $DIC->ui()->mainTemplate()->setOnScreenMessage(
'failure', $this->
lng->txt(
'msg_not_available_for_anon'),
true);
73 $DIC->ctrl()->redirectToURL(
'login.php?cmd=force_login');
78 $this->
ctrl->setContextObject(
83 $this->
lng->loadLanguageModule(
'pdesk');
84 $this->
lng->loadLanguageModule(
'pd');
85 $this->
lng->loadLanguageModule(
'dash');
86 $this->
lng->loadLanguageModule(
'mmbr');
88 $params = $DIC->http()->request()->getQueryParams();
89 $this->cmdClass = (
$params[
'cmdClass'] ??
'');
90 $this->requested_view = (
int) (
$params[
'view'] ?? 0);
91 $this->requested_prt_id = (
int) (
$params[
'prt_id'] ?? 0);
92 $this->requested_gtp = (
int) (
$params[
'gtp'] ?? 0);
93 $this->requested_dsh = (string) (
$params[
'dsh'] ??
null);
94 $this->requested_wsp_id = (
int) (
$params[
'wsp_id'] ?? 0);
96 $this->
ctrl->saveParameter($this, [
'view']);
105 $next_class = $this->
ctrl->getNextClass();
106 $this->
ctrl->setReturn($this,
'show');
107 switch ($next_class) {
108 case strtolower(PersonalProfileGUI::class):
112 $this->
ctrl->forwardCommand($profile_gui);
115 case strtolower(PersonalSettingsGUI::class):
119 $this->
ctrl->forwardCommand($settings_gui);
122 case strtolower(ilLocalUserPasswordSettingsGUI::class):
126 $this->
ctrl->forwardCommand($settings_gui);
129 case strtolower(ilCalendarPresentationGUI::class):
132 $this->tpl->setTitle($this->
lng->txt(
'calendar'));
135 $this->
ctrl->forwardCommand($cal);
136 $this->tpl->printToStdout();
139 case strtolower(ilPDNotesGUI::class):
141 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'permission_denied'),
true);
149 $this->
ctrl->forwardCommand($pd_notes_gui);
152 case strtolower(ilPDNewsGUI::class):
156 $this->
ctrl->forwardCommand($pd_news_gui);
159 case strtolower(ilColumnGUI::class):
160 if (strtolower(
$cmdClass = $this->
ctrl->getCmdClass()) === strtolower(ilSelectedItemsBlockGUI::class)) {
162 $ret = $this->
ctrl->forwardCommand($gui);
164 $this->tpl->setContent($ret);
165 $this->tpl->printToStdout();
174 case strtolower(ilContactGUI::class):
181 $this->tpl->setTitle($this->
lng->txt(
'mail_addressbook'));
186 case strtolower(ilPersonalWorkspaceGUI::class):
188 $this->
ctrl->forwardCommand($wsgui);
189 $this->tpl->printToStdout();
192 case strtolower(ilPortfolioRepositoryGUI::class):
196 $this->
ctrl->forwardCommand($pfgui);
197 $this->tpl->printToStdout();
200 case strtolower(ilAchievementsGUI::class):
204 $this->
ctrl->forwardCommand($achievegui);
207 case strtolower(ilMyStaffGUI::class):
210 $this->
ctrl->forwardCommand($mstgui);
212 case strtolower(ilGroupUserActionsGUI::class):
216 $this->
ctrl->forwardCommand($ggui);
217 $this->tpl->printToStdout();
219 case strtolower(ilDashboardLearningSequenceGUI::class):
220 case strtolower(ilMembershipBlockGUI::class):
221 case strtolower(ilDashboardRecommendedContentGUI::class):
222 case strtolower(ilSelectedItemsBlockGUI::class):
223 case strtolower(ilStudyProgrammeDashboardViewGUI::class):
224 $gui =
new $next_class();
225 $ret = $this->
ctrl->forwardCommand($gui);
226 if ($ret !==
'' && $ret !==
null) {
227 $this->tpl->setContent($ret);
229 $this->tpl->printToStdout();
231 case strtolower(ilObjStudyProgrammeGUI::class):
233 $ret = $this->
ctrl->forwardCommand($gui);
234 $this->tpl->printToStdout();
237 $context->current()->addAdditionalData(self::DISENGAGE_MAINBAR,
true);
240 $cmd = $this->
ctrl->getCmd(
'show');
248 $this->tpl->loadStandardTemplate();
255 $this->tpl->setTitle($this->
lng->txt(
"dash_dashboard"));
268 $this->tpl->setContent($content);
270 $this->tpl->printToStdout();
280 if ($ilCtrl->getNextClass() ==
'ilcolumngui' &&
282 $html = $ilCtrl->forwardCommand($column_gui);
284 if (!$ilCtrl->isAsynch()) {
288 $html = $ilCtrl->forwardCommand($column_gui);
292 $html = $ilCtrl->forwardCommand($column_gui);
298 'components/ILIAS/Dashboard',
300 [
'personal_desktop_gui' => $this]
302 if (!$uip->replaced()) {
305 $html = $uip->getHTML($html);
324 if ($ilCtrl->getNextClass() ==
'ilcolumngui' &&
327 $html = $ilCtrl->forwardCommand($column_gui);
329 if (!$ilCtrl->isAsynch()) {
333 'components/ILIAS/Dashboard',
335 [
'personal_desktop_gui' => $this]
337 if (!$uip->replaced()) {
338 $html = $ilCtrl->getHTML($column_gui);
340 $html = $uip->getHTML($html);
349 $this->tpl->loadStandardTemplate();
352 $this->tpl->setTitle($this->
lng->txt(
'personal_desktop'));
366 if ($viewSettings->enabledMemberships()) {
367 $this->
ctrl->setParameter($this,
'view', $viewSettings->getMembershipsView());
369 $this->
ctrl->redirect($this,
'show');
375 if ($viewSettings->enabledSelectedItems()) {
376 $this->
ctrl->setParameter($this,
'view', $viewSettings->getSelectedItemsView());
383 $this->
ctrl->redirectByClass([self::class, PersonalProfileGUI::class]);
389 if ($this->requested_dsh !=
'') {
390 $this->
ctrl->setParameterByClass(ilPortfolioRepositoryGUI::class,
'shr_id', $this->requested_dsh);
394 if ($this->requested_prt_id > 0) {
395 $this->
ctrl->setParameterByClass(ilObjPortfolioGUI::class,
'prt_id', $this->requested_prt_id);
396 $this->
ctrl->setParameterByClass(ilObjPortfolioGUI::class,
'gtp', $this->requested_gtp);
397 $this->
ctrl->redirectByClass([ilPortfolioRepositoryGUI::class, ilObjPortfolioGUI::class],
'preview');
399 $this->
ctrl->redirectByClass(ilPortfolioRepositoryGUI::class, $cmd);
405 $this->
ctrl->redirectByClass(PersonalSettingsGUI::class);
410 $this->
ctrl->redirectByClass(ilPDNewsGUI::class);
416 $request =
$DIC->http()->request();
418 $query_params = $request->getQueryParams();
420 if (array_key_exists(
'cal_view', $query_params) && $query_params[
'cal_view']) {
421 $cal_view = $query_params[
'cal_view'];
422 $this->
ctrl->setParameter($this,
'cal_view', $cal_view);
425 if (!empty($query_params[
'cal_agenda_per'])) {
426 $cal_period = $query_params[
'cal_agenda_per'];
427 $this->
ctrl->setParameter($this,
'cal_agenda_per', $cal_period);
430 $this->
ctrl->redirectByClass(ilCalendarPresentationGUI::class);
436 if ($this->requested_dsh !=
'') {
437 $this->
ctrl->setParameterByClass(ilPersonalWorkspaceGUI::class,
'shr_id', $this->requested_dsh);
441 if ($this->requested_wsp_id > 0) {
442 $this->
ctrl->setParameterByClass(ilPersonalWorkspaceGUI::class,
'wsp_id', $this->requested_wsp_id);
445 if ($this->requested_gtp) {
446 $this->
ctrl->setParameterByClass(ilPersonalWorkspaceGUI::class,
'gtp', $this->requested_gtp);
449 $this->
ctrl->redirectByClass(ilPersonalWorkspaceGUI::class, $cmd);
454 $this->
ctrl->redirectByClass(ilMyStaffGUI::class);
459 $this->
ctrl->redirectByClass([ilAchievementsGUI::class, ilBadgeProfileGUI::class]);
464 $this->
ctrl->redirectByClass(ilPersonalSkillsGUI::class);
469 $this->tpl->setTitle($this->
lng->txt(
'dash_dashboard'));
479 $this->
ctrl->redirect($this,
'show');
485 $tpl =
new ilTemplate(
'tpl.dashboard.html',
true,
true,
'components/ILIAS/Dashboard');
488 foreach ($settings->getViewPositions() as $view_position) {
489 if (
$settings->isViewEnabled($view_position)) {
GUI class for personal profile.
@ilCtrl_Calls ILIAS\User\Settings\PersonalSettingsGUI: ILIAS\User\Account\DeleteAccountGUI @ilCtrl_Ca...
@ilCtrl_Calls ilAchievementsGUI: ilPersonalSkillsGUI, ilBadgeProfileGUI, ilLearningHistoryGUI,...
static preloadPDBlockSettings()
Preload pd info.
Column user interface class.
Class ilCtrl provides processing control methods.
@ilCtrl_Calls ilDashboardGUI: ILIAS\User\Profile\PersonalProfileGUI @ilCtrl_Calls ilDashboardGUI: ilO...
ContextServices $tool_context
const CMD_JUMP_TO_MY_STAFF
ilGlobalTemplateInterface $tpl
@ilCtrl_Calls ilDashboardPageGUI: ilPageEditorGUI, ilEditClipboardGUI, ilMDEditorGUI @ilCtrl_isCalled...
static isLanguageAvailable(string $lang)
setScreenIdComponent(string $a_comp)
Class ilObjStudyProgrammeGUI class @ilCtrl_Calls ilObjStudyProgrammeGUI: ilPermissionGUI @ilCtrl_Call...
GUI class for personal workspace.
Portfolio repository gui class.
static get(string $a_var)
static set(string $a_var, $a_val)
Set a value.
special template class to simplify handling of ITX/PEAR
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
static redirect(string $a_script)
setVariable(string $variable, $value='')
Sets the given variable to the given value.
get(string $part=self::DEFAULT_BLOCK)
Renders the given block and returns the html string.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const VIEW_RECOMMENDED_CONTENT
const VIEW_MY_STUDYPROGRAMME
const VIEW_SELECTED_ITEMS
const VIEW_MY_MEMBERSHIPS
const VIEW_LEARNING_SEQUENCES
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params