5 include_once
'./Services/User/classes/class.ilObjUser.php';
6 include_once
"Services/Mail/classes/class.ilMail.php";
7 include_once
'Services/Mail/classes/class.ilMailGlobalServices.php';
44 $ilCtrl->setContext($ilUser->getId(),
47 $ilMainMenu->setActive(
"desktop");
48 $this->lng->loadLanguageModule(
"pdesk");
51 if (
$_SESSION[
"AccountId"] == ANONYMOUS_USER_ID)
53 $this->ilias->raiseError($this->lng->txt(
"msg_not_available_for_anon"),$this->ilias->error_obj->MESSAGE);
55 $this->cmdClass =
$_GET[
'cmdClass'];
67 $next_class = $this->ctrl->getNextClass();
68 $this->ctrl->setReturn($this,
"show");
74 if( ($ilUser->isPasswordChangeDemanded() || $ilUser->isPasswordExpired())
75 && $next_class !=
"ilpersonalsettingsgui"
78 $this->ctrl->redirectByClass(
"ilpersonalsettingsgui");
82 if ($ilUser->getProfileIncomplete() && $next_class !=
"ilpersonalprofilegui" && !($ilUser->isPasswordChangeDemanded() || $ilUser->isPasswordExpired()))
84 $this->ctrl->redirectByClass(
"ilpersonalprofilegui");
88 if (isset(
$_GET[
'PDHistory']) &&
$_GET[
'PDHistory'])
97 $next_class ==
'ilmailaddressbookgui' && ($this->ilias->getSetting(
"disable_contacts") ||
99 !$this->ilias->getSetting(
"disable_contacts_require_mail") &&
111 case "ilfeedbackgui":
114 $this->tpl->setTitle($this->lng->txt(
"personal_desktop"));
120 include_once(
"Services/Feedback/classes/class.ilFeedbackGUI.php");
122 $ret =& $this->ctrl->forwardCommand($feedback_gui);
125 case "ilbookmarkadministrationgui":
126 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);
153 case "ilpersonalsettingsgui":
156 include_once(
"./Services/User/classes/class.ilPersonalSettingsGUI.php");
158 $ret =& $this->ctrl->forwardCommand($settings_gui);
163 include_once(
'./Services/User/classes/class.ilObjUserGUI.php');
165 $ret =& $this->ctrl->forwardCommand($user_gui);
168 case 'ilcalendarpresentationgui':
171 $this->tpl->setTitle($this->lng->txt(
"calendar"));
173 include_once(
'./Services/Calendar/classes/class.ilCalendarPresentationGUI.php');
175 $ret = $this->ctrl->forwardCommand($cal);
181 if ($ilSetting->get(
'disable_notes'))
190 include_once(
"./Services/Notes/classes/class.ilPDNotesGUI.php");
192 $ret =& $this->ctrl->forwardCommand($pd_notes_gui);
199 include_once(
"./Services/News/classes/class.ilPDNewsGUI.php");
201 $ret =& $this->ctrl->forwardCommand($pd_news_gui);
204 case "illearningprogressgui":
207 include_once
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
209 $ret =& $this->ctrl->forwardCommand($new_gui);
216 include_once(
"./Services/Block/classes/class.ilColumnGUI.php");
223 case 'ilmailaddressbookgui':
226 $this->tpl->setTitle($this->lng->txt(
"mail_addressbook"));
228 include_once
'Services/Contact/classes/class.ilMailAddressbookGUI.php';
230 $ret = $this->ctrl->forwardCommand($mailgui);
233 case 'ilpersonalworkspacegui':
236 include_once
'Services/PersonalWorkspace/classes/class.ilPersonalWorkspaceGUI.php';
238 $ret = $this->ctrl->forwardCommand($wsgui);
242 case 'ilobjportfoliogui':
245 include_once
'Services/Portfolio/classes/class.ilObjPortfolioGUI.php';
247 $ret = $this->ctrl->forwardCommand($pfgui);
251 case 'ilpersonalskillsgui':
253 include_once
'./Services/Skill/classes/class.ilPersonalSkillsGUI.php';
256 $ret = $this->ctrl->forwardCommand($skgui);
267 $cmd = $this->ctrl->getCmd(
"show");
282 foreach(
$_GET as $key => $val)
284 if(substr($key, 0, strlen(
'param_')) ==
'param_')
286 $this->ctrl->setParameterByClass(
$_GET[
'redirectClass'], substr($key, strlen(
'param_')), $val);
298 $this->tpl->getStandardTemplate();
311 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.adm_content.html");
312 $this->tpl->addBlockFile(
"STATUSLINE",
"statusline",
"tpl.statusline.html");
322 include_once(
"Services/Block/classes/class.ilBlockSetting.php");
326 $this->pd_tpl =
new ilTemplate(
"tpl.usr_personaldesktop.html",
true,
true);
327 $this->tpl->getStandardTemplate();
336 $this->tpl->setTitle($this->lng->txt(
"overview"));
351 global
$ilCtrl, $ilPluginAdmin;
353 include_once(
"Services/Block/classes/class.ilColumnGUI.php");
357 if ($ilCtrl->getNextClass() ==
"ilcolumngui" &&
360 $html = $ilCtrl->forwardCommand($column_gui);
364 if (!$ilCtrl->isAsynch())
373 $html = $ilCtrl->forwardCommand($column_gui);
380 $html = $ilCtrl->forwardCommand($column_gui);
388 include_once(
"./Services/UIComponent/classes/class.ilUIHookProcessor.php");
390 array(
"personal_desktop_gui" => $this));
391 if (!$uip->replaced())
393 $html = $ilCtrl->getHTML($column_gui);
395 $html = $uip->getHTML($html);
410 include_once(
"Services/Block/classes/class.ilColumnGUI.php");
419 if ($ilCtrl->getNextClass() ==
"ilcolumngui" &&
423 $html = $ilCtrl->forwardCommand($column_gui);
427 if (!$ilCtrl->isAsynch())
432 include_once(
"./Services/UIComponent/classes/class.ilUIHookProcessor.php");
434 array(
"personal_desktop_gui" => $this));
435 if (!$uip->replaced())
437 $html = $ilCtrl->getHTML($column_gui);
439 $html = $uip->getHTML($html);
453 include_once(
"Services/Block/classes/class.ilColumnGUI.php");
462 if ($ilCtrl->getNextClass() ==
"ilcolumngui" &&
466 $html = $ilCtrl->forwardCommand($column_gui);
470 if (!$ilCtrl->isAsynch())
475 include_once(
"./Services/UIComponent/classes/class.ilUIHookProcessor.php");
477 array(
"personal_desktop_gui" => $this));
478 if (!$uip->replaced())
480 $html = $ilCtrl->getHTML($column_gui);
482 $html = $uip->getHTML($html);
492 $this->pd_tpl =
new ilTemplate(
"tpl.usr_personaldesktop.html",
true,
true);
493 $this->tpl->getStandardTemplate();
502 $this->tpl->setTitle($this->lng->txt(
"personal_desktop"));
513 if (strlen($err_msg) > 0)
515 $this->ilias->raiseError($this->lng->txt($err_msg),$this->ilias->error_obj->MESSAGE);
525 include_once(
"Services/Mail/classes/class.ilPDSysMessageBlockGUI.php");
527 return $sys_block->getHTML();
536 include_once(
"./Services/Feedback/classes/class.ilPDFeedbackBlockGUI.php");
538 return $fb_block->getHTML();
540 include_once(
'Services/Feedback/classes/class.ilFeedbackGUI.php');
542 return $feedback_gui->getPDFeedbackListHTML();
558 $key_sorta = explode(
";", $key_sort);
560 $multikeys = array_keys($array);
561 $keys = array_keys($array[$multikeys[0]]);
563 for($m=0; $m < count($key_sorta); $m++) {
564 $nkeys[$m] = trim($key_sorta[$m]);
566 $n += count($key_sorta);
568 for($i=0; $i < count($keys); $i++){
569 if(!in_array($keys[$i], $key_sorta)) {
570 $nkeys[
$n] = $keys[$i];
575 for($u=0;$u<count($array); $u++) {
576 $arr = $array[$multikeys[$u]];
577 for($s=0; $s<count($nkeys); $s++) {
579 $output[$multikeys[$u]][$k] = $array[$multikeys[$u]][$k];
602 if ($ilSetting->get(
'disable_my_memberships') == 0)
604 $ilUser->writePref(
'pd_view', 1);
616 if ($ilSetting->get(
'disable_my_offers') == 0)
618 $ilUser->writePref(
'pd_view', 0);
629 $this->ctrl->redirectByClass(
"ilpersonalprofilegui");
641 $this->ctrl->setParameterByClass(
"ilobjportfoliogui",
"user",
$_REQUEST[
"dsh"]);
648 $this->ctrl->setParameterByClass(
"ilobjportfoliogui",
"prt_id",
$_GET[
"prt_id"]);
649 $this->ctrl->redirectByClass(
"ilobjportfoliogui",
"preview");
653 $this->ctrl->redirectByClass(
"ilobjportfoliogui",
$cmd);
662 $this->ctrl->redirectByClass(
"ilpersonalsettingsgui");
670 if ($this->ilias->getSetting(
"disable_bookmarks"))
677 $this->ctrl->redirectByClass(
"ilbookmarkadministrationgui");
685 if ($this->ilias->getSetting(
'disable_notes'))
692 $this->ctrl->redirectByClass(
"ilpdnotesgui");
700 $this->ctrl->redirectByClass(
"ilpdnewsgui");
708 $this->ctrl->redirectByClass(
"illearningprogressgui");
716 $this->ctrl->redirectByClass(
"ilcalendarpresentationgui");
724 $this->ctrl->redirectByClass(
"ilmailaddressbookgui");
736 $this->ctrl->setParameterByClass(
"ilpersonalworkspacegui",
"user",
$_REQUEST[
"dsh"]);
742 $this->ctrl->setParameterByClass(
"ilpersonalworkspacegui",
"wsp_id", (
int)
$_REQUEST[
"wsp_id"]);
747 $this->ctrl->setParameterByClass(
"ilpersonalworkspacegui",
"gtp", (
int)
$_REQUEST[
"gtp"]);
750 $this->ctrl->redirectByClass(
"ilpersonalworkspacegui",
$cmd);
758 $this->ctrl->redirectByClass(
"ilpersonalskillsgui");
763 $stored_classes = array(
'ilpersonaldesktopgui',
764 'ilpersonalprofilegui',
766 'ilcalendarpresentationgui',
767 'ilbookmarkadministrationgui',
768 'illearningprogressgui');
770 if(isset(
$_SESSION[
'il_pd_history']) and in_array(
$_SESSION[
'il_pd_history'],$stored_classes))
776 $this->ctrl->getNextClass($this);
782 $this->cmdClass = $a_class;
791 if ($pd_set->get(
"enable_block_moving"))
793 $a_column_gui->setEnableMovement(
true);
806 $this->tpl->setTitle($this->lng->txt(
"personal_desktop"));