5 include_once
'./Services/User/classes/class.ilObjUser.php';
6 include_once
"Services/Mail/classes/class.ilMail.php";
41 $ilCtrl->setContext($ilUser->getId(),
44 $ilMainMenu->setActive(
"desktop");
45 $this->lng->loadLanguageModule(
"pdesk");
48 if (
$_SESSION[
"AccountId"] == ANONYMOUS_USER_ID)
50 $this->ilias->raiseError($this->lng->txt(
"msg_not_available_for_anon"),$this->ilias->error_obj->MESSAGE);
52 $this->cmdClass =
$_GET[
'cmdClass'];
64 $next_class = $this->ctrl->getNextClass();
65 $this->ctrl->setReturn($this,
"show");
71 if ($ilUser->getProfileIncomplete() && $next_class !=
"ilpersonalprofilegui")
73 $this->ctrl->redirectByClass(
"ilpersonalprofilegui");
78 if( ($ilUser->isPasswordChangeDemanded() || $ilUser->isPasswordExpired())
79 && $next_class !=
"ilpersonalprofilegui"
82 $this->ctrl->redirectByClass(
"ilpersonalprofilegui");
86 if (isset(
$_GET[
'PDHistory']) &&
$_GET[
'PDHistory'])
94 include_once
"Services/Mail/classes/class.ilMail.php";
97 $next_class ==
'ilmailaddressbookgui' && ($this->ilias->getSetting(
"disable_contacts") ||
99 !$this->ilias->getSetting(
"disable_contacts_require_mail") &&
100 !$rbacsystem->checkAccess(
'mail_visible',$mail->getMailObjectReferenceId())
110 case "ilfeedbackgui":
113 $this->tpl->setTitle($this->lng->txt(
"personal_desktop"));
119 include_once(
"Services/Feedback/classes/class.ilFeedbackGUI.php");
121 $ret =& $this->ctrl->forwardCommand($feedback_gui);
124 case "ilbookmarkadministrationgui":
125 if ($ilSetting->get(
'disable_bookmarks'))
132 include_once(
"./Services/PersonalDesktop/classes/class.ilBookmarkAdministrationGUI.php");
134 if ($bookmark_gui->getMode() ==
'tree') {
140 $ret =& $this->ctrl->forwardCommand($bookmark_gui);
144 case "ilpersonalprofilegui":
147 include_once(
"./Services/User/classes/class.ilPersonalProfileGUI.php");
149 $ret =& $this->ctrl->forwardCommand($profile_gui);
154 include_once(
'./Services/User/classes/class.ilObjUserGUI.php');
156 $ret =& $this->ctrl->forwardCommand($user_gui);
159 case 'ilcalendarpresentationgui':
163 include_once(
'./Services/Calendar/classes/class.ilCalendarPresentationGUI.php');
165 $ret = $this->ctrl->forwardCommand($cal);
171 if ($ilSetting->get(
'disable_notes'))
180 include_once(
"./Services/Notes/classes/class.ilPDNotesGUI.php");
182 $ret =& $this->ctrl->forwardCommand($pd_notes_gui);
189 include_once(
"./Services/News/classes/class.ilPDNewsGUI.php");
191 $ret =& $this->ctrl->forwardCommand($pd_news_gui);
194 case "illearningprogressgui":
197 include_once
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
199 $ret =& $this->ctrl->forwardCommand($new_gui);
206 include_once(
"./Services/Block/classes/class.ilColumnGUI.php");
213 case 'ilmailaddressbookgui':
216 $this->tpl->setTitle($this->lng->txt(
"personal_desktop"));
221 include_once
'Services/Contact/classes/class.ilMailAddressbookGUI.php';
223 $ret = $this->ctrl->forwardCommand($mailgui);
231 $cmd = $this->ctrl->getCmd(
"show");
246 foreach(
$_GET as $key => $val)
248 if(substr($key, 0, strlen(
'param_')) ==
'param_')
250 $this->ctrl->setParameterByClass(
$_GET[
'redirectClass'], substr($key, strlen(
'param_')), $val);
262 $this->tpl->getStandardTemplate();
275 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.adm_content.html");
276 $this->tpl->addBlockFile(
"STATUSLINE",
"statusline",
"tpl.statusline.html");
286 include_once(
"Services/Block/classes/class.ilBlockSetting.php");
290 $this->pd_tpl =
new ilTemplate(
"tpl.usr_personaldesktop.html",
true,
true);
291 $this->tpl->getStandardTemplate();
300 $this->tpl->setTitle($this->lng->txt(
"personal_desktop"));
317 include_once(
"Services/Block/classes/class.ilColumnGUI.php");
321 if ($ilCtrl->getNextClass() ==
"ilcolumngui" &&
324 $html = $ilCtrl->forwardCommand($column_gui);
328 if (!$ilCtrl->isAsynch())
337 $html = $ilCtrl->forwardCommand($column_gui);
344 $html = $ilCtrl->forwardCommand($column_gui);
349 $html = $ilCtrl->getHTML($column_gui);
363 include_once(
"Services/Block/classes/class.ilColumnGUI.php");
372 if ($ilCtrl->getNextClass() ==
"ilcolumngui" &&
376 $html = $ilCtrl->forwardCommand($column_gui);
380 if (!$ilCtrl->isAsynch())
382 $html = $ilCtrl->getHTML($column_gui);
396 include_once(
"Services/Block/classes/class.ilColumnGUI.php");
405 if ($ilCtrl->getNextClass() ==
"ilcolumngui" &&
409 $html = $ilCtrl->forwardCommand($column_gui);
413 if (!$ilCtrl->isAsynch())
415 $html = $ilCtrl->getHTML($column_gui);
425 $this->pd_tpl =
new ilTemplate(
"tpl.usr_personaldesktop.html",
true,
true);
426 $this->tpl->getStandardTemplate();
435 $this->tpl->setTitle($this->lng->txt(
"personal_desktop"));
446 if (strlen($err_msg) > 0)
448 $this->ilias->raiseError($this->lng->txt($err_msg),$this->ilias->error_obj->MESSAGE);
458 include_once(
"Services/Mail/classes/class.ilPDSysMessageBlockGUI.php");
460 return $sys_block->getHTML();
469 include_once(
"./Services/Feedback/classes/class.ilPDFeedbackBlockGUI.php");
471 return $fb_block->getHTML();
473 include_once(
'Services/Feedback/classes/class.ilFeedbackGUI.php');
475 return $feedback_gui->getPDFeedbackListHTML();
491 $key_sorta = explode(
";", $key_sort);
493 $multikeys = array_keys($array);
494 $keys = array_keys($array[$multikeys[0]]);
496 for($m=0; $m < count($key_sorta); $m++) {
497 $nkeys[$m] = trim($key_sorta[$m]);
499 $n += count($key_sorta);
501 for($i=0; $i < count($keys); $i++){
502 if(!in_array($keys[$i], $key_sorta)) {
503 $nkeys[$n] = $keys[$i];
508 for($u=0;$u<count($array); $u++) {
509 $arr = $array[$multikeys[$u]];
510 for($s=0; $s<count($nkeys); $s++) {
512 $output[$multikeys[$u]][$k] = $array[$multikeys[$u]][$k];
532 if (isset(
$_GET[
"cmd"]))
537 if (preg_match(
"/whois/",
$command))
539 $who_is_online =
true;
545 $ilTabs->addTarget(
"overview", $this->ctrl->getLinkTarget($this));
546 if ((strtolower(
$_GET[
"baseClass"]) ==
"ilpersonaldesktopgui" &&
547 (strtolower($this->cmdClass) ==
"ilpersonaldesktopgui" ||
548 $this->cmdClass ==
"" || (strtolower($this->cmdClass)) ==
"ilfeedbackgui"
549 || $ilCtrl->getNextClass() ==
"ilcolumngui")))
551 $ilTabs->setTabActive(
"overview");
555 $ilTabs->addTarget(
"personal_profile", $this->ctrl->getLinkTargetByClass(
"ilPersonalProfileGUI"));
556 if (strtolower($this->cmdClass) ==
"ilpersonalprofilegui")
558 $ilTabs->setTabActive(
"personal_profile");
562 if (
$_SESSION[
"AccountId"] != ANONYMOUS_USER_ID)
565 if ($ilSetting->get(
"block_activated_news"))
567 $ilTabs->addTarget(
"news", $this->ctrl->getLinkTargetByClass(
"ilpdnewsgui"));
568 if ($ilCtrl->getNextClass() ==
"ilpdnewsgui")
570 $ilTabs->setTabActive(
"news");
575 include_once(
'./Services/Calendar/classes/class.ilCalendarSettings.php');
577 if($settings->isEnabled())
579 $ilTabs->addTarget(
"calendar", $this->ctrl->getLinkTargetByClass(
"ilcalendarpresentationgui"));
580 if (strtolower($this->cmdClass) ==
"ilcalendarpresentationgui")
582 $ilTabs->setTabActive(
"calendar");
587 if (!$this->ilias->getSetting(
"disable_notes"))
589 $ilTabs->addTarget(
"notes_and_comments", $this->ctrl->getLinkTargetByClass(
"ilpdnotesgui"));
590 if (strtolower($this->cmdClass) ==
"ilpdnotesgui" ||
591 strtolower($this->cmdClass) ==
"ilnotegui")
593 $ilTabs->setTabActive(
"notes_and_comments");
598 if (!$this->ilias->getSetting(
"disable_bookmarks"))
600 $ilTabs->addTarget(
"bookmarks", $this->ctrl->getLinkTargetByClass(
"ilbookmarkadministrationgui"));
601 if (strtolower($this->cmdClass) ==
"ilbookmarkadministrationgui")
603 $ilTabs->setTabActive(
"bookmarks");
608 include_once
"Services/Mail/classes/class.ilMail.php";
611 if (!$this->ilias->getSetting(
"disable_contacts") && ($this->ilias->getSetting(
"disable_contacts_require_mail") || $rbacsystem->checkAccess(
'mail_visible',$mail->getMailObjectReferenceId())))
613 $ilTabs->addTarget(
"mail_addressbook", $this->ctrl->getLinkTargetByClass(
"ilmailaddressbookgui"));
614 if (strtolower($this->cmdClass) ==
"ilmailaddressbookgui")
616 $ilTabs->setTabActive(
"mail_addressbook");
622 include_once(
"Services/Tracking/classes/class.ilObjUserTracking.php");
625 $ilTabs->addTarget(
"learning_progress", $this->ctrl->getLinkTargetByClass(
"ilLearningProgressGUI"));
626 $cmd_classes = array(
'illplistofobjectsgui',
'illplistofsettingsgui',
'illearningprogressgui',
'illplistofprogressgui');
627 if (in_array(strtolower($this->cmdClass),$cmd_classes))
629 $ilTabs->setTabActive(
"learning_progress");
639 $this->ctrl->redirectByClass(
"ilpersonalprofilegui");
647 if ($this->ilias->getSetting(
"disable_bookmarks"))
654 $this->ctrl->redirectByClass(
"ilbookmarkadministrationgui");
662 if ($this->ilias->getSetting(
'disable_notes'))
669 $this->ctrl->redirectByClass(
"ilpdnotesgui");
677 $this->ctrl->redirectByClass(
"ilpdnewsgui");
685 $this->ctrl->redirectByClass(
"illearningprogressgui");
690 $stored_classes = array(
'ilpersonaldesktopgui',
691 'ilpersonalprofilegui',
693 'ilcalendarpresentationgui',
694 'ilbookmarkadministrationgui',
695 'illearningprogressgui');
697 if(isset(
$_SESSION[
'il_pd_history']) and in_array(
$_SESSION[
'il_pd_history'],$stored_classes))
703 $this->ctrl->getNextClass($this);
709 $this->cmdClass = $a_class;
718 if ($pd_set->get(
"enable_block_moving"))
720 $a_column_gui->setEnableMovement(
true);
733 $this->tpl->setTitle($this->lng->txt(
"personal_desktop"));