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';
8 include_once
'Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php';
50 $ilCtrl->setContext($ilUser->getId(),
53 $ilMainMenu->setActive(
"desktop");
54 $this->lng->loadLanguageModule(
"pdesk");
57 if (
$_SESSION[
"AccountId"] == ANONYMOUS_USER_ID)
59 $this->ilias->raiseError($this->lng->txt(
"msg_not_available_for_anon"),$this->ilias->error_obj->MESSAGE);
61 $this->cmdClass =
$_GET[
'cmdClass'];
75 $next_class = $this->ctrl->getNextClass();
76 $this->ctrl->setReturn($this,
"show");
83 if( ($ilUser->isPasswordChangeDemanded() || $ilUser->isPasswordExpired())
84 && $next_class !=
"ilpersonalsettingsgui"
87 $this->ctrl->redirectByClass(
"ilpersonalsettingsgui");
91 if ($ilUser->getProfileIncomplete() && $next_class !=
"ilpersonalprofilegui" && !($ilUser->isPasswordChangeDemanded() || $ilUser->isPasswordExpired()))
93 $this->ctrl->redirectByClass(
"ilpersonalprofilegui");
98 if (isset(
$_GET[
'PDHistory']) &&
$_GET[
'PDHistory'])
107 $next_class ==
'ilmailaddressbookgui' && ($this->ilias->getSetting(
"disable_contacts") ||
109 !$this->ilias->getSetting(
"disable_contacts_require_mail") &&
120 case "ilbookmarkadministrationgui":
121 if ($ilSetting->get(
'disable_bookmarks'))
127 include_once(
"./Services/Bookmarks/classes/class.ilBookmarkAdministrationGUI.php");
129 if ($bookmark_gui->getMode() ==
'tree') {
135 $ret =& $this->ctrl->forwardCommand($bookmark_gui);
139 case "ilpersonalprofilegui":
142 include_once(
"./Services/User/classes/class.ilPersonalProfileGUI.php");
144 $ret =& $this->ctrl->forwardCommand($profile_gui);
148 case "ilpersonalsettingsgui":
151 include_once(
"./Services/User/classes/class.ilPersonalSettingsGUI.php");
153 $ret =& $this->ctrl->forwardCommand($settings_gui);
158 include_once(
'./Services/User/classes/class.ilObjUserGUI.php');
160 $ret =& $this->ctrl->forwardCommand($user_gui);
163 case 'ilcalendarpresentationgui':
166 $this->tpl->setTitle($this->lng->txt(
"calendar"));
168 include_once(
'./Services/Calendar/classes/class.ilCalendarPresentationGUI.php');
170 $ret = $this->ctrl->forwardCommand($cal);
176 if ($ilSetting->get(
'disable_notes'))
185 include_once(
"./Services/Notes/classes/class.ilPDNotesGUI.php");
187 $ret =& $this->ctrl->forwardCommand($pd_notes_gui);
194 include_once(
"./Services/News/classes/class.ilPDNewsGUI.php");
196 $ret =& $this->ctrl->forwardCommand($pd_news_gui);
199 case "illearningprogressgui":
202 include_once
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
204 $ret =& $this->ctrl->forwardCommand($new_gui);
211 include_once(
"./Services/Block/classes/class.ilColumnGUI.php");
218 case 'ilmailaddressbookgui':
221 $this->tpl->setTitle($this->lng->txt(
"mail_addressbook"));
223 include_once
'Services/Contact/classes/class.ilMailAddressbookGUI.php';
225 $ret = $this->ctrl->forwardCommand($mailgui);
228 case 'ilpersonalworkspacegui':
231 include_once
'Services/PersonalWorkspace/classes/class.ilPersonalWorkspaceGUI.php';
233 $ret = $this->ctrl->forwardCommand($wsgui);
237 case 'ilobjportfoliogui':
240 include_once
'Services/Portfolio/classes/class.ilObjPortfolioGUI.php';
242 $ret = $this->ctrl->forwardCommand($pfgui);
246 case 'ilpersonalskillsgui':
248 include_once
'./Services/Skill/classes/class.ilPersonalSkillsGUI.php';
251 $ret = $this->ctrl->forwardCommand($skgui);
262 $cmd = $this->ctrl->getCmd(
"show");
277 foreach(
$_GET as $key => $val)
279 if(substr($key, 0, strlen(
'param_')) ==
'param_')
281 $this->ctrl->setParameterByClass(
$_GET[
'redirectClass'], substr($key, strlen(
'param_')), $val);
293 $this->tpl->getStandardTemplate();
305 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.adm_content.html");
306 $this->tpl->addBlockFile(
"STATUSLINE",
"statusline",
"tpl.statusline.html");
316 include_once(
"Services/Block/classes/class.ilBlockSetting.php");
320 $this->pd_tpl =
new ilTemplate(
"tpl.usr_personaldesktop.html",
true,
true,
"Services/PersonalDesktop");
321 $this->tpl->getStandardTemplate();
330 $this->tpl->setTitle($this->lng->txt(
"overview"));
337 if(count($this->action_menu->getItems()))
345 $this->action_menu->setAsynch(
false);
346 $this->action_menu->setAsynchUrl(
'');
347 $this->action_menu->setListTitle($lng->txt(
'actions'));
348 $this->action_menu->setId(
'act_pd');
349 $this->action_menu->setSelectionHeaderClass(
'small');
350 $this->action_menu->setItemLinkClass(
'xsmall');
351 $this->action_menu->setLinksMode(
'il_ContainerItemCommand2');
353 $this->action_menu->setUseImages(
false);
355 $htpl =
new ilTemplate(
'tpl.header_action.html',
true,
true,
'Services/Repository');
356 $htpl->setVariable(
'ACTION_DROP_DOWN', $this->action_menu->getHTML());
358 $tpl->setHeaderActionMenu($htpl->get());
370 global
$ilCtrl, $ilPluginAdmin;
372 include_once(
"Services/Block/classes/class.ilColumnGUI.php");
376 if ($ilCtrl->getNextClass() ==
"ilcolumngui" &&
379 $html = $ilCtrl->forwardCommand($column_gui);
383 if (!$ilCtrl->isAsynch())
392 $html = $ilCtrl->forwardCommand($column_gui);
399 $html = $ilCtrl->forwardCommand($column_gui);
407 include_once(
"./Services/UIComponent/classes/class.ilUIHookProcessor.php");
409 array(
"personal_desktop_gui" => $this));
410 if (!$uip->replaced())
412 $html = $ilCtrl->getHTML($column_gui);
414 $html = $uip->getHTML($html);
429 include_once(
"Services/Block/classes/class.ilColumnGUI.php");
438 if ($ilCtrl->getNextClass() ==
"ilcolumngui" &&
442 $html = $ilCtrl->forwardCommand($column_gui);
446 if (!$ilCtrl->isAsynch())
451 include_once(
"./Services/UIComponent/classes/class.ilUIHookProcessor.php");
453 array(
"personal_desktop_gui" => $this));
454 if (!$uip->replaced())
456 $html = $ilCtrl->getHTML($column_gui);
458 $html = $uip->getHTML($html);
472 include_once(
"Services/Block/classes/class.ilColumnGUI.php");
481 if ($ilCtrl->getNextClass() ==
"ilcolumngui" &&
485 $html = $ilCtrl->forwardCommand($column_gui);
489 if (!$ilCtrl->isAsynch())
494 include_once(
"./Services/UIComponent/classes/class.ilUIHookProcessor.php");
496 array(
"personal_desktop_gui" => $this));
497 if (!$uip->replaced())
499 $html = $ilCtrl->getHTML($column_gui);
501 $html = $uip->getHTML($html);
511 $this->pd_tpl =
new ilTemplate(
"tpl.usr_personaldesktop.html",
true,
true,
"Services/PersonalDesktop");
512 $this->tpl->getStandardTemplate();
521 $this->tpl->setTitle($this->lng->txt(
"personal_desktop"));
532 if (strlen($err_msg) > 0)
534 $this->ilias->raiseError($this->lng->txt($err_msg),$this->ilias->error_obj->MESSAGE);
544 include_once(
"Services/Mail/classes/class.ilPDSysMessageBlockGUI.php");
546 return $sys_block->getHTML();
562 $key_sorta = explode(
";", $key_sort);
564 $multikeys = array_keys($array);
565 $keys = array_keys($array[$multikeys[0]]);
567 for($m=0; $m < count($key_sorta); $m++) {
568 $nkeys[$m] = trim($key_sorta[$m]);
570 $n += count($key_sorta);
572 for($i=0; $i < count($keys); $i++){
573 if(!in_array($keys[$i], $key_sorta)) {
574 $nkeys[
$n] = $keys[$i];
579 for($u=0;$u<count($array); $u++) {
580 $arr = $array[$multikeys[$u]];
581 for($s=0; $s<count($nkeys); $s++) {
583 $output[$multikeys[$u]][$k] = $array[$multikeys[$u]][$k];
598 $ilHelp->setScreenIdComponent(
"pd");
608 if ($ilSetting->get(
'disable_my_memberships') == 0)
610 $ilUser->writePref(
'pd_view', 1);
622 if ($ilSetting->get(
'disable_my_offers') == 0)
624 $ilUser->writePref(
'pd_view', 0);
635 $this->ctrl->redirectByClass(
"ilpersonalprofilegui");
647 $this->ctrl->setParameterByClass(
"ilobjportfoliogui",
"user",
$_REQUEST[
"dsh"]);
654 $this->ctrl->setParameterByClass(
"ilobjportfoliogui",
"prt_id",
$_GET[
"prt_id"]);
655 $this->ctrl->redirectByClass(
"ilobjportfoliogui",
"preview");
659 $this->ctrl->redirectByClass(
"ilobjportfoliogui",
$cmd);
668 $this->ctrl->redirectByClass(
"ilpersonalsettingsgui");
676 if ($this->ilias->getSetting(
"disable_bookmarks"))
683 $this->ctrl->redirectByClass(
"ilbookmarkadministrationgui");
691 if ($this->ilias->getSetting(
'disable_notes'))
698 $this->ctrl->redirectByClass(
"ilpdnotesgui");
706 $this->ctrl->redirectByClass(
"ilpdnewsgui");
714 $this->ctrl->redirectByClass(
"illearningprogressgui");
722 $this->ctrl->redirectByClass(
"ilcalendarpresentationgui");
730 $this->ctrl->redirectByClass(
"ilmailaddressbookgui");
742 $this->ctrl->setParameterByClass(
"ilpersonalworkspacegui",
"user",
$_REQUEST[
"dsh"]);
748 $this->ctrl->setParameterByClass(
"ilpersonalworkspacegui",
"wsp_id", (
int)
$_REQUEST[
"wsp_id"]);
753 $this->ctrl->setParameterByClass(
"ilpersonalworkspacegui",
"gtp", (
int)
$_REQUEST[
"gtp"]);
756 $this->ctrl->redirectByClass(
"ilpersonalworkspacegui",
$cmd);
764 $this->ctrl->redirectByClass(
"ilpersonalskillsgui");
769 $stored_classes = array(
'ilpersonaldesktopgui',
770 'ilpersonalprofilegui',
772 'ilcalendarpresentationgui',
773 'ilbookmarkadministrationgui',
774 'illearningprogressgui');
776 if(isset(
$_SESSION[
'il_pd_history']) and in_array(
$_SESSION[
'il_pd_history'],$stored_classes))
782 $this->ctrl->getNextClass($this);
788 $this->cmdClass = $a_class;
798 if ($pd_set->get(
"enable_block_moving"))
800 $a_column_gui->setEnableMovement(
true);
802 $a_column_gui->setActionMenu($this->action_menu);
814 $this->tpl->setTitle($this->lng->txt(
"personal_desktop"));