19declare(strict_types=1);
63 $this->tool_context =
$DIC->globalScreen()->tool()->context();
64 $this->
user = $DIC->user();
66 $this->
help = $DIC->help();
67 $this->tpl =
$DIC->ui()->mainTemplate();
68 $this->
lng = $DIC->language();
69 $this->
ctrl = $DIC->ctrl();
72 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'msg_not_available_for_anon'),
true);
73 $DIC->ctrl()->redirectToURL(
'login.php?cmd=force_login');
76 $this->
ctrl->setContextObject(
81 $this->
lng->loadLanguageModule(
'pdesk');
82 $this->
lng->loadLanguageModule(
'pd');
83 $this->
lng->loadLanguageModule(
'dash');
84 $this->
lng->loadLanguageModule(
'mmbr');
86 $params = $DIC->http()->request()->getQueryParams();
87 $this->cmdClass = (
$params[
'cmdClass'] ??
'');
88 $this->requested_view = (
int) (
$params[
'view'] ?? 0);
89 $this->requested_prt_id = (
int) (
$params[
'prt_id'] ?? 0);
90 $this->requested_gtp = (
int) (
$params[
'gtp'] ?? 0);
91 $this->requested_dsh = (string) (
$params[
'dsh'] ??
null);
92 $this->requested_wsp_id = (
int) (
$params[
'wsp_id'] ?? 0);
94 $this->
ctrl->saveParameter($this, [
'view']);
100 $context->
stack()->desktop();
103 $next_class = $this->
ctrl->getNextClass();
104 $this->
ctrl->setReturn($this,
'show');
105 switch ($next_class) {
106 case strtolower(PersonalProfileGUI::class):
110 $this->
ctrl->forwardCommand($profile_gui);
113 case strtolower(PersonalSettingsGUI::class):
117 $this->
ctrl->forwardCommand($settings_gui);
120 case strtolower(ilLocalUserPasswordSettingsGUI::class):
124 $this->
ctrl->forwardCommand($settings_gui);
127 case strtolower(ilCalendarPresentationGUI::class):
130 $this->tpl->setTitle($this->
lng->txt(
'calendar'));
133 $this->
ctrl->forwardCommand($cal);
134 $this->tpl->printToStdout();
137 case strtolower(ilPDNotesGUI::class):
139 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'permission_denied'),
true);
147 $this->
ctrl->forwardCommand($pd_notes_gui);
150 case strtolower(ilPDNewsGUI::class):
154 $this->
ctrl->forwardCommand($pd_news_gui);
157 case strtolower(ilColumnGUI::class):
158 if (strtolower(
$cmdClass = $this->
ctrl->getCmdClass()) === strtolower(ilSelectedItemsBlockGUI::class)) {
160 $ret = $this->
ctrl->forwardCommand($gui);
162 $this->tpl->setContent($ret);
163 $this->tpl->printToStdout();
172 case strtolower(ilContactGUI::class):
179 $this->tpl->setTitle($this->
lng->txt(
'mail_addressbook'));
184 case strtolower(ilPersonalWorkspaceGUI::class):
186 $this->
ctrl->forwardCommand($wsgui);
187 $this->tpl->printToStdout();
190 case strtolower(ilPortfolioRepositoryGUI::class):
194 $this->
ctrl->forwardCommand($pfgui);
195 $this->tpl->printToStdout();
198 case strtolower(ilAchievementsGUI::class):
202 $this->
ctrl->forwardCommand($achievegui);
205 case strtolower(ilMyStaffGUI::class):
208 $this->
ctrl->forwardCommand($mstgui);
210 case strtolower(ilGroupUserActionsGUI::class):
214 $this->
ctrl->forwardCommand($ggui);
215 $this->tpl->printToStdout();
217 case strtolower(ilDashboardLearningSequenceGUI::class):
218 case strtolower(ilMembershipBlockGUI::class):
219 case strtolower(ilDashboardRecommendedContentGUI::class):
220 case strtolower(ilSelectedItemsBlockGUI::class):
221 case strtolower(ilStudyProgrammeDashboardViewGUI::class):
222 $gui =
new $next_class();
223 $ret = $this->
ctrl->forwardCommand($gui);
224 if ($ret !==
'' && $ret !==
null) {
225 $this->tpl->setContent($ret);
227 $this->tpl->printToStdout();
229 case strtolower(ilObjStudyProgrammeGUI::class):
231 $ret = $this->
ctrl->forwardCommand($gui);
232 $this->tpl->printToStdout();
235 $context->current()->addAdditionalData(self::DISENGAGE_MAINBAR,
true);
238 $cmd = $this->
ctrl->getCmd(
'show');
246 $this->tpl->loadStandardTemplate();
253 $this->tpl->setTitle($this->
lng->txt(
"dash_dashboard"));
266 $this->tpl->setContent($content);
268 $this->tpl->printToStdout();
278 if ($ilCtrl->getNextClass() ==
'ilcolumngui' &&
280 $html = $ilCtrl->forwardCommand($column_gui);
282 if (!$ilCtrl->isAsynch()) {
286 $html = $ilCtrl->forwardCommand($column_gui);
290 $html = $ilCtrl->forwardCommand($column_gui);
296 'components/ILIAS/Dashboard',
298 [
'personal_desktop_gui' => $this]
300 if (!$uip->replaced()) {
303 $html = $uip->getHTML($html);
322 if ($ilCtrl->getNextClass() ==
'ilcolumngui' &&
325 $html = $ilCtrl->forwardCommand($column_gui);
327 if (!$ilCtrl->isAsynch()) {
331 'components/ILIAS/Dashboard',
333 [
'personal_desktop_gui' => $this]
335 if (!$uip->replaced()) {
336 $html = $ilCtrl->getHTML($column_gui);
338 $html = $uip->getHTML($html);
347 $this->tpl->loadStandardTemplate();
350 $this->tpl->setTitle($this->
lng->txt(
'personal_desktop'));
364 if ($viewSettings->enabledMemberships()) {
365 $this->
ctrl->setParameter($this,
'view', $viewSettings->getMembershipsView());
367 $this->
ctrl->redirect($this,
'show');
373 if ($viewSettings->enabledSelectedItems()) {
374 $this->
ctrl->setParameter($this,
'view', $viewSettings->getSelectedItemsView());
381 $this->
ctrl->redirectByClass([self::class, PersonalProfileGUI::class]);
387 if ($this->requested_dsh !=
'') {
388 $this->
ctrl->setParameterByClass(ilPortfolioRepositoryGUI::class,
'shr_id', $this->requested_dsh);
392 if ($this->requested_prt_id > 0) {
393 $this->
ctrl->setParameterByClass(ilObjPortfolioGUI::class,
'prt_id', $this->requested_prt_id);
394 $this->
ctrl->setParameterByClass(ilObjPortfolioGUI::class,
'gtp', $this->requested_gtp);
395 $this->
ctrl->redirectByClass([ilPortfolioRepositoryGUI::class, ilObjPortfolioGUI::class],
'preview');
397 $this->
ctrl->redirectByClass(ilPortfolioRepositoryGUI::class, $cmd);
403 $this->
ctrl->redirectByClass(PersonalSettingsGUI::class);
408 $this->
ctrl->redirectByClass(ilPDNewsGUI::class);
414 $request =
$DIC->http()->request();
416 $query_params = $request->getQueryParams();
418 if (array_key_exists(
'cal_view', $query_params) && $query_params[
'cal_view']) {
419 $cal_view = $query_params[
'cal_view'];
420 $this->
ctrl->setParameter($this,
'cal_view', $cal_view);
423 if (!empty($query_params[
'cal_agenda_per'])) {
424 $cal_period = $query_params[
'cal_agenda_per'];
425 $this->
ctrl->setParameter($this,
'cal_agenda_per', $cal_period);
428 $this->
ctrl->redirectByClass(ilCalendarPresentationGUI::class);
434 if ($this->requested_dsh !=
'') {
435 $this->
ctrl->setParameterByClass(ilPersonalWorkspaceGUI::class,
'shr_id', $this->requested_dsh);
439 if ($this->requested_wsp_id > 0) {
440 $this->
ctrl->setParameterByClass(ilPersonalWorkspaceGUI::class,
'wsp_id', $this->requested_wsp_id);
443 if ($this->requested_gtp) {
444 $this->
ctrl->setParameterByClass(ilPersonalWorkspaceGUI::class,
'gtp', $this->requested_gtp);
447 $this->
ctrl->redirectByClass(ilPersonalWorkspaceGUI::class, $cmd);
452 $this->
ctrl->redirectByClass(ilMyStaffGUI::class);
457 $this->
ctrl->redirectByClass([ilAchievementsGUI::class, ilBadgeProfileGUI::class]);
462 $this->
ctrl->redirectByClass(ilPersonalSkillsGUI::class);
467 $this->tpl->setTitle($this->
lng->txt(
'dash_dashboard'));
477 $this->
ctrl->redirect($this,
'show');
483 $tpl =
new ilTemplate(
'tpl.dashboard.html',
true,
true,
'components/ILIAS/Dashboard');
486 foreach ($settings->getViewPositions() as $view_position) {
487 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...
readonly ContextServices $tool_context
const CMD_JUMP_TO_MY_STAFF
readonly ilSetting $settings
readonly 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...
@ilCtrl_Calls ilPDNewsGUI: ilNewsTimelineGUI, ilCommonActionDispatcherGUI, ILIAS\User\Profile\PublicP...
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