19 declare(strict_types=1);
60 $this->tool_context = $DIC->globalScreen()->tool()->context();
61 $this->
user = $DIC->user();
63 $this->
help = $DIC->help();
64 $tpl = $DIC->ui()->mainTemplate();
65 $this->
lng = $DIC->language();
66 $this->
ctrl = $DIC->ctrl();
69 $DIC->ui()->mainTemplate()->setOnScreenMessage(
'failure', $this->
lng->txt(
'msg_not_available_for_anon'),
true);
70 $DIC->ctrl()->redirectToURL(
'login.php?cmd=force_login');
75 $this->
ctrl->setContextObject(
80 $this->
lng->loadLanguageModule(
'pdesk');
81 $this->
lng->loadLanguageModule(
'pd');
82 $this->
lng->loadLanguageModule(
'dash');
83 $this->
lng->loadLanguageModule(
'mmbr');
85 $params = $DIC->http()->request()->getQueryParams();
86 $this->cmdClass = (
$params[
'cmdClass'] ??
'');
87 $this->requested_view = (
int) (
$params[
'view'] ?? 0);
88 $this->requested_prt_id = (
int) (
$params[
'prt_id'] ?? 0);
89 $this->requested_gtp = (
int) (
$params[
'gtp'] ?? 0);
90 $this->requested_dsh = (string) (
$params[
'dsh'] ??
null);
91 $this->requested_wsp_id = (
int) (
$params[
'wsp_id'] ?? 0);
93 $this->
ctrl->saveParameter($this, [
'view']);
102 $next_class = $this->
ctrl->getNextClass();
103 $this->
ctrl->setReturn($this,
'show');
104 switch ($next_class) {
105 case strtolower(ilPersonalProfileGUI::class):
109 $this->
ctrl->forwardCommand($profile_gui);
112 case strtolower(ilPersonalSettingsGUI::class):
116 $this->
ctrl->forwardCommand($settings_gui);
119 case strtolower(ilCalendarPresentationGUI::class):
122 $this->tpl->setTitle($this->
lng->txt(
'calendar'));
125 $this->
ctrl->forwardCommand($cal);
126 $this->tpl->printToStdout();
129 case strtolower(ilPDNotesGUI::class):
131 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'permission_denied'),
true);
139 $this->
ctrl->forwardCommand($pd_notes_gui);
142 case strtolower(ilPDNewsGUI::class):
146 $this->
ctrl->forwardCommand($pd_news_gui);
149 case strtolower(ilColumnGUI::class):
150 if (strtolower($cmdClass = $this->
ctrl->getCmdClass()) === strtolower(ilSelectedItemsBlockGUI::class)) {
152 $ret = $this->
ctrl->forwardCommand($gui);
154 $this->tpl->setContent($ret);
155 $this->tpl->printToStdout();
164 case strtolower(ilContactGUI::class):
171 $this->tpl->setTitle($this->
lng->txt(
'mail_addressbook'));
176 case strtolower(ilPersonalWorkspaceGUI::class):
178 $this->
ctrl->forwardCommand($wsgui);
179 $this->tpl->printToStdout();
182 case strtolower(ilPortfolioRepositoryGUI::class):
186 $this->
ctrl->forwardCommand($pfgui);
187 $this->tpl->printToStdout();
190 case strtolower(ilAchievementsGUI::class):
194 $this->
ctrl->forwardCommand($achievegui);
197 case strtolower(ilMyStaffGUI::class):
200 $this->
ctrl->forwardCommand($mstgui);
202 case strtolower(ilGroupUserActionsGUI::class):
206 $this->
ctrl->forwardCommand($ggui);
207 $this->tpl->printToStdout();
209 case strtolower(ilDashboardLearningSequenceGUI::class):
210 case strtolower(ilMembershipBlockGUI::class):
211 case strtolower(ilDashboardRecommendedContentGUI::class):
212 case strtolower(ilSelectedItemsBlockGUI::class):
213 case strtolower(ilStudyProgrammeDashboardViewGUI::class):
214 $gui =
new $next_class();
215 $ret = $this->
ctrl->forwardCommand($gui);
216 if ($ret !==
'' && $ret !==
null) {
217 $this->tpl->setContent($ret);
219 $this->tpl->printToStdout();
221 case strtolower(ilObjStudyProgrammeGUI::class):
223 $ret = $this->
ctrl->forwardCommand($gui);
224 $this->tpl->printToStdout();
227 $context->current()->addAdditionalData(self::DISENGAGE_MAINBAR,
true);
230 $cmd = $this->
ctrl->getCmd(
'show');
238 $this->tpl->loadStandardTemplate();
245 $this->tpl->setTitle($this->
lng->txt(
"dash_dashboard"));
258 $this->tpl->setContent($content);
260 $this->tpl->printToStdout();
270 if ($ilCtrl->getNextClass() ==
'ilcolumngui' &&
272 $html = $ilCtrl->forwardCommand($column_gui);
274 if (!$ilCtrl->isAsynch()) {
278 $html = $ilCtrl->forwardCommand($column_gui);
282 $html = $ilCtrl->forwardCommand($column_gui);
288 'components/ILIAS/Dashboard',
290 [
'personal_desktop_gui' => $this]
292 if (!$uip->replaced()) {
295 $html = $uip->getHTML($html);
314 if ($ilCtrl->getNextClass() ==
'ilcolumngui' &&
317 $html = $ilCtrl->forwardCommand($column_gui);
319 if (!$ilCtrl->isAsynch()) {
323 'components/ILIAS/Dashboard',
325 [
'personal_desktop_gui' => $this]
327 if (!$uip->replaced()) {
328 $html = $ilCtrl->getHTML($column_gui);
330 $html = $uip->getHTML($html);
339 $this->tpl->loadStandardTemplate();
342 $this->tpl->setTitle($this->
lng->txt(
'personal_desktop'));
356 if ($viewSettings->enabledMemberships()) {
357 $this->
ctrl->setParameter($this,
'view', $viewSettings->getMembershipsView());
359 $this->
ctrl->redirect($this,
'show');
365 if ($viewSettings->enabledSelectedItems()) {
366 $this->
ctrl->setParameter($this,
'view', $viewSettings->getSelectedItemsView());
373 $this->
ctrl->redirectByClass(ilPersonalProfileGUI::class);
379 if ($this->requested_dsh !=
'') {
380 $this->
ctrl->setParameterByClass(ilPortfolioRepositoryGUI::class,
'shr_id', $this->requested_dsh);
384 if ($this->requested_prt_id > 0) {
385 $this->
ctrl->setParameterByClass(ilObjPortfolioGUI::class,
'prt_id', $this->requested_prt_id);
386 $this->
ctrl->setParameterByClass(ilObjPortfolioGUI::class,
'gtp', $this->requested_gtp);
387 $this->
ctrl->redirectByClass([ilPortfolioRepositoryGUI::class, ilObjPortfolioGUI::class],
'preview');
389 $this->
ctrl->redirectByClass(ilPortfolioRepositoryGUI::class, $cmd);
395 $this->
ctrl->redirectByClass(ilPersonalSettingsGUI::class);
400 $this->
ctrl->redirectByClass(ilPDNewsGUI::class);
406 $request = $DIC->http()->request();
408 $query_params = $request->getQueryParams();
410 if (array_key_exists(
'cal_view', $query_params) && $query_params[
'cal_view']) {
411 $cal_view = $query_params[
'cal_view'];
412 $this->
ctrl->setParameter($this,
'cal_view', $cal_view);
415 if (!empty($query_params[
'cal_agenda_per'])) {
416 $cal_period = $query_params[
'cal_agenda_per'];
417 $this->
ctrl->setParameter($this,
'cal_agenda_per', $cal_period);
420 $this->
ctrl->redirectByClass(ilCalendarPresentationGUI::class);
426 if ($this->requested_dsh !=
'') {
427 $this->
ctrl->setParameterByClass(ilPersonalWorkspaceGUI::class,
'shr_id', $this->requested_dsh);
431 if ($this->requested_wsp_id > 0) {
432 $this->
ctrl->setParameterByClass(ilPersonalWorkspaceGUI::class,
'wsp_id', $this->requested_wsp_id);
435 if ($this->requested_gtp) {
436 $this->
ctrl->setParameterByClass(ilPersonalWorkspaceGUI::class,
'gtp', $this->requested_gtp);
439 $this->
ctrl->redirectByClass(ilPersonalWorkspaceGUI::class, $cmd);
444 $this->
ctrl->redirectByClass(ilMyStaffGUI::class);
449 $this->
ctrl->redirectByClass([ilAchievementsGUI::class, ilBadgeProfileGUI::class]);
454 $this->
ctrl->redirectByClass(ilPersonalSkillsGUI::class);
459 $this->tpl->setTitle($this->
lng->txt(
'dash_dashboard'));
469 $this->
ctrl->redirect($this,
'show');
475 $tpl =
new ilTemplate(
'tpl.dashboard.html',
true,
true,
'components/ILIAS/Dashboard');
478 foreach ($settings->getViewPositions() as $view_position) {
479 if ($settings->isViewEnabled($view_position)) {
static get(string $a_var)
GUI class for personal workspace.
Class ilObjStudyProgrammeGUI class ilObjStudyProgrammeGUI: ilPermissionGUI ilObjStudyProgrammeGUI: ...
ContextServices $tool_context
const VIEW_MY_STUDYPROGRAMME
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
ilDashboardPageGUI: ilPageEditorGUI, ilEditClipboardGUI, ilMDEditorGUI ilDashboardPageGUI: ilAdminis...
setVariable(string $variable, $value='')
Sets the given variable to the given value.
const CMD_JUMP_TO_MY_STAFF
Portfolio repository gui class.
ilGlobalTemplateInterface $tpl
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const VIEW_RECOMMENDED_CONTENT
const VIEW_LEARNING_SEQUENCES
Column user interface class.
setScreenIdComponent(string $a_comp)
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
get(string $part=self::DEFAULT_BLOCK)
Renders the given block and returns the html string.
static redirect(string $a_script)
GUI class for personal profile.
static preloadPDBlockSettings()
Preload pd info.
const VIEW_MY_MEMBERSHIPS
static isLanguageAvailable(string $lang)
const VIEW_SELECTED_ITEMS
static set(string $a_var, $a_val)
Set a value.