24 include_once
'./Services/User/classes/class.ilObjUser.php';
25 include_once
"Services/Mail/classes/class.ilMail.php";
62 $ilCtrl->setContext($ilUser->getId(),
65 $ilMainMenu->setActive(
"desktop");
66 $this->lng->loadLanguageModule(
"pdesk");
69 if (
$_SESSION[
"AccountId"] == ANONYMOUS_USER_ID)
71 $this->ilias->raiseError($this->lng->txt(
"msg_not_available_for_anon"),$this->ilias->error_obj->MESSAGE);
73 $this->cmdClass =
$_GET[
'cmdClass'];
85 $next_class = $this->ctrl->getNextClass();
86 $this->ctrl->setReturn($this,
"show");
92 if ($ilUser->getProfileIncomplete() && $next_class !=
"ilpersonalprofilegui")
94 $this->ctrl->redirectByClass(
"ilpersonalprofilegui");
99 if( ($ilUser->isPasswordChangeDemanded() || $ilUser->isPasswordExpired())
100 && $next_class !=
"ilpersonalprofilegui"
103 $this->ctrl->redirectByClass(
"ilpersonalprofilegui");
107 if(
$_GET[
'PDHistory'])
115 include_once
"Services/Mail/classes/class.ilMail.php";
118 $next_class ==
'ilmailaddressbookgui' && ($this->ilias->getSetting(
"disable_contacts") ||
120 !$this->ilias->getSetting(
"disable_contacts_require_mail") &&
121 !$rbacsystem->checkAccess(
'mail_visible',$mail->getMailObjectReferenceId())
132 case "ilfeedbackgui":
135 $this->tpl->setTitle($this->lng->txt(
"personal_desktop"));
141 include_once(
"Services/Feedback/classes/class.ilFeedbackGUI.php");
143 $ret =& $this->ctrl->forwardCommand($feedback_gui);
146 case "ilbookmarkadministrationgui":
147 if ($ilSetting->get(
'disable_bookmarks'))
154 include_once(
"./Services/PersonalDesktop/classes/class.ilBookmarkAdministrationGUI.php");
156 if ($bookmark_gui->getMode() ==
'tree') {
162 $ret =& $this->ctrl->forwardCommand($bookmark_gui);
166 case "ilpersonalprofilegui":
169 include_once(
"./Services/User/classes/class.ilPersonalProfileGUI.php");
171 $ret =& $this->ctrl->forwardCommand($profile_gui);
176 include_once(
'./Services/User/classes/class.ilObjUserGUI.php');
178 $ret =& $this->ctrl->forwardCommand($user_gui);
181 case 'ilcalendarpresentationgui':
185 include_once(
'./Services/Calendar/classes/class.ilCalendarPresentationGUI.php');
187 $ret = $this->ctrl->forwardCommand($cal);
193 if ($ilSetting->get(
'disable_notes'))
202 include_once(
"./Services/Notes/classes/class.ilPDNotesGUI.php");
204 $ret =& $this->ctrl->forwardCommand($pd_notes_gui);
211 include_once(
"./Services/News/classes/class.ilPDNewsGUI.php");
213 $ret =& $this->ctrl->forwardCommand($pd_news_gui);
216 case "illearningprogressgui":
219 include_once
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
221 $ret =& $this->ctrl->forwardCommand($new_gui);
228 include_once(
"./Services/Block/classes/class.ilColumnGUI.php");
235 case 'ilmailaddressbookgui':
238 $this->tpl->setTitle($this->lng->txt(
"personal_desktop"));
243 include_once
'Services/Contact/classes/class.ilMailAddressbookGUI.php';
245 $ret = $this->ctrl->forwardCommand($mailgui);
253 $cmd = $this->ctrl->getCmd(
"show");
269 if(substr(
$key, 0, strlen(
'param_')) ==
'param_')
271 $this->ctrl->setParameterByClass(
$_GET[
'redirectClass'], substr(
$key, strlen(
'param_')), $val);
283 $this->tpl->getStandardTemplate();
296 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.adm_content.html");
297 $this->tpl->addBlockFile(
"STATUSLINE",
"statusline",
"tpl.statusline.html");
307 $this->pd_tpl =
new ilTemplate(
"tpl.usr_personaldesktop.html",
true,
true);
308 $this->tpl->getStandardTemplate();
317 $this->tpl->setTitle($this->lng->txt(
"personal_desktop"));
334 include_once(
"Services/Block/classes/class.ilColumnGUI.php");
338 if ($ilCtrl->getNextClass() ==
"ilcolumngui" &&
341 $html = $ilCtrl->forwardCommand($column_gui);
345 if (!$ilCtrl->isAsynch())
354 $html = $ilCtrl->forwardCommand($column_gui);
361 $html = $ilCtrl->forwardCommand($column_gui);
366 $html = $ilCtrl->getHTML($column_gui);
380 include_once(
"Services/Block/classes/class.ilColumnGUI.php");
384 if ($ilCtrl->getNextClass() ==
"ilcolumngui" &&
388 $html = $ilCtrl->forwardCommand($column_gui);
392 if (!$ilCtrl->isAsynch())
394 $html = $ilCtrl->getHTML($column_gui);
408 include_once(
"Services/Block/classes/class.ilColumnGUI.php");
412 if ($ilCtrl->getNextClass() ==
"ilcolumngui" &&
416 $html = $ilCtrl->forwardCommand($column_gui);
420 if (!$ilCtrl->isAsynch())
422 $html = $ilCtrl->getHTML($column_gui);
432 $this->pd_tpl =
new ilTemplate(
"tpl.usr_personaldesktop.html",
true,
true);
433 $this->tpl->getStandardTemplate();
442 $this->tpl->setTitle($this->lng->txt(
"personal_desktop"));
453 if (strlen($err_msg) > 0)
455 $this->ilias->raiseError($this->lng->txt($err_msg),$this->ilias->error_obj->MESSAGE);
465 include_once(
"Services/Mail/classes/class.ilPDSysMessageBlockGUI.php");
467 return $sys_block->getHTML();
476 include_once(
"./Services/Feedback/classes/class.ilPDFeedbackBlockGUI.php");
478 return $fb_block->getHTML();
480 include_once(
'Services/Feedback/classes/class.ilFeedbackGUI.php');
482 return $feedback_gui->getPDFeedbackListHTML();
498 $key_sorta = explode(
";", $key_sort);
500 $multikeys = array_keys($array);
501 $keys = array_keys($array[$multikeys[0]]);
503 for($m=0; $m < count($key_sorta); $m++) {
504 $nkeys[$m] = trim($key_sorta[$m]);
506 $n += count($key_sorta);
508 for($i=0; $i < count($keys); $i++){
509 if(!in_array($keys[$i], $key_sorta)) {
510 $nkeys[
$n] = $keys[$i];
515 for($u=0;$u<count($array); $u++) {
516 $arr = $array[$multikeys[$u]];
517 for($s=0; $s<count($nkeys); $s++) {
519 $output[$multikeys[$u]][$k] = $array[$multikeys[$u]][$k];
542 $who_is_online =
true;
548 $ilTabs->addTarget(
"overview", $this->ctrl->getLinkTarget($this));
549 if ((strtolower(
$_GET[
"baseClass"]) ==
"ilpersonaldesktopgui" &&
550 (strtolower($this->cmdClass) ==
"ilpersonaldesktopgui" ||
551 $this->cmdClass ==
"" || (strtolower($this->cmdClass)) ==
"ilfeedbackgui"
552 || $ilCtrl->getNextClass() ==
"ilcolumngui")))
554 $ilTabs->setTabActive(
"overview");
558 $ilTabs->addTarget(
"personal_profile", $this->ctrl->getLinkTargetByClass(
"ilPersonalProfileGUI"));
559 if (strtolower($this->cmdClass) ==
"ilpersonalprofilegui")
561 $ilTabs->setTabActive(
"personal_profile");
565 if (
$_SESSION[
"AccountId"] != ANONYMOUS_USER_ID)
568 if ($ilSetting->get(
"block_activated_news"))
570 $ilTabs->addTarget(
"news", $this->ctrl->getLinkTargetByClass(
"ilpdnewsgui"));
571 if ($ilCtrl->getNextClass() ==
"ilpdnewsgui")
573 $ilTabs->setTabActive(
"news");
578 include_once(
'./Services/Calendar/classes/class.ilCalendarSettings.php');
580 if($settings->isEnabled())
582 $ilTabs->addTarget(
"calendar", $this->ctrl->getLinkTargetByClass(
"ilcalendarpresentationgui"));
583 if (strtolower($this->cmdClass) ==
"ilcalendarpresentationgui")
585 $ilTabs->setTabActive(
"calendar");
590 if (!$this->ilias->getSetting(
"disable_notes"))
592 $ilTabs->addTarget(
"notes_and_comments", $this->ctrl->getLinkTargetByClass(
"ilpdnotesgui"));
593 if (strtolower($this->cmdClass) ==
"ilpdnotesgui" ||
594 strtolower($this->cmdClass) ==
"ilnotegui")
596 $ilTabs->setTabActive(
"notes_and_comments");
601 if (!$this->ilias->getSetting(
"disable_bookmarks"))
603 $ilTabs->addTarget(
"bookmarks", $this->ctrl->getLinkTargetByClass(
"ilbookmarkadministrationgui"));
604 if (strtolower($this->cmdClass) ==
"ilbookmarkadministrationgui")
606 $ilTabs->setTabActive(
"bookmarks");
611 include_once
"Services/Mail/classes/class.ilMail.php";
614 if (!$this->ilias->getSetting(
"disable_contacts") && ($this->ilias->getSetting(
"disable_contacts_require_mail") || $rbacsystem->checkAccess(
'mail_visible',$mail->getMailObjectReferenceId())))
616 $ilTabs->addTarget(
"mail_addressbook", $this->ctrl->getLinkTargetByClass(
"ilmailaddressbookgui"));
617 if (strtolower($this->cmdClass) ==
"ilmailaddressbookgui")
619 $ilTabs->setTabActive(
"mail_addressbook");
625 include_once(
"Services/Tracking/classes/class.ilObjUserTracking.php");
628 $ilTabs->addTarget(
"learning_progress", $this->ctrl->getLinkTargetByClass(
"ilLearningProgressGUI"));
629 $cmd_classes = array(
'illplistofobjectsgui',
'illplistofsettingsgui',
'illearningprogressgui',
'illplistofprogressgui');
630 if (in_array(strtolower($this->cmdClass),$cmd_classes))
632 $ilTabs->setTabActive(
"learning_progress");
642 $this->ctrl->redirectByClass(
"ilpersonalprofilegui");
650 if ($this->ilias->getSetting(
"disable_bookmarks"))
657 $this->ctrl->redirectByClass(
"ilbookmarkadministrationgui");
665 if ($this->ilias->getSetting(
'disable_notes'))
672 $this->ctrl->redirectByClass(
"ilpdnotesgui");
680 $this->ctrl->redirectByClass(
"ilpdnewsgui");
688 $this->ctrl->redirectByClass(
"illearningprogressgui");
693 $stored_classes = array(
'ilpersonaldesktopgui',
694 'ilpersonalprofilegui',
696 'ilcalendarpresentationgui',
697 'ilbookmarkadministrationgui',
698 'illearningprogressgui');
700 if(isset(
$_SESSION[
'il_pd_history']) and in_array(
$_SESSION[
'il_pd_history'],$stored_classes))
706 $this->ctrl->getNextClass($this);
712 $this->cmdClass = $a_class;
721 if ($pd_set->get(
"enable_block_moving"))
723 $a_column_gui->setEnableMovement(
true);
736 $this->tpl->setTitle($this->lng->txt(
"personal_desktop"));