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");
81 if (isset(
$_GET[
'PDHistory']) &&
$_GET[
'PDHistory'])
90 $next_class ==
'ilmailaddressbookgui' && ($this->ilias->getSetting(
"disable_contacts") ||
92 !$this->ilias->getSetting(
"disable_contacts_require_mail") &&
103 case "ilbookmarkadministrationgui":
104 if ($ilSetting->get(
'disable_bookmarks'))
110 include_once(
"./Services/Bookmarks/classes/class.ilBookmarkAdministrationGUI.php");
112 if ($bookmark_gui->getMode() ==
'tree') {
118 $ret =& $this->ctrl->forwardCommand($bookmark_gui);
122 case "ilpersonalprofilegui":
125 include_once(
"./Services/User/classes/class.ilPersonalProfileGUI.php");
127 $ret =& $this->ctrl->forwardCommand($profile_gui);
131 case "ilpersonalsettingsgui":
134 include_once(
"./Services/User/classes/class.ilPersonalSettingsGUI.php");
136 $ret =& $this->ctrl->forwardCommand($settings_gui);
141 include_once(
'./Services/User/classes/class.ilObjUserGUI.php');
143 $ret =& $this->ctrl->forwardCommand($user_gui);
146 case 'ilcalendarpresentationgui':
149 $this->tpl->setTitle($this->lng->txt(
"calendar"));
151 include_once(
'./Services/Calendar/classes/class.ilCalendarPresentationGUI.php');
153 $ret = $this->ctrl->forwardCommand($cal);
159 if ($ilSetting->get(
'disable_notes'))
168 include_once(
"./Services/Notes/classes/class.ilPDNotesGUI.php");
170 $ret =& $this->ctrl->forwardCommand($pd_notes_gui);
177 include_once(
"./Services/News/classes/class.ilPDNewsGUI.php");
179 $ret =& $this->ctrl->forwardCommand($pd_news_gui);
182 case "illearningprogressgui":
185 include_once
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
187 $ret =& $this->ctrl->forwardCommand($new_gui);
194 include_once(
"./Services/Block/classes/class.ilColumnGUI.php");
201 case 'ilmailaddressbookgui':
204 $this->tpl->setTitle($this->lng->txt(
"mail_addressbook"));
206 include_once
'Services/Contact/classes/class.ilMailAddressbookGUI.php';
208 $ret = $this->ctrl->forwardCommand($mailgui);
211 case 'ilpersonalworkspacegui':
214 include_once
'Services/PersonalWorkspace/classes/class.ilPersonalWorkspaceGUI.php';
216 $ret = $this->ctrl->forwardCommand($wsgui);
220 case 'ilportfoliorepositorygui':
223 include_once
'Modules/Portfolio/classes/class.ilPortfolioRepositoryGUI.php';
225 $ret = $this->ctrl->forwardCommand($pfgui);
229 case 'ilpersonalskillsgui':
231 include_once
'./Services/Skill/classes/class.ilPersonalSkillsGUI.php';
234 $ret = $this->ctrl->forwardCommand($skgui);
245 $cmd = $this->ctrl->getCmd(
"show");
260 foreach(
$_GET as $key => $val)
262 if(substr($key, 0, strlen(
'param_')) ==
'param_')
264 $this->ctrl->setParameterByClass(
$_GET[
'redirectClass'], substr($key, strlen(
'param_')), $val);
276 $this->tpl->getStandardTemplate();
288 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.adm_content.html");
289 $this->tpl->addBlockFile(
"STATUSLINE",
"statusline",
"tpl.statusline.html");
299 include_once(
"Services/Block/classes/class.ilBlockSetting.php");
303 $this->pd_tpl =
new ilTemplate(
"tpl.usr_personaldesktop.html",
true,
true,
"Services/PersonalDesktop");
304 $this->tpl->getStandardTemplate();
313 $this->tpl->setTitle($this->lng->txt(
"overview"));
320 if(count($this->action_menu->getItems()))
328 $this->action_menu->setAsynch(
false);
329 $this->action_menu->setAsynchUrl(
'');
330 $this->action_menu->setListTitle($lng->txt(
'actions'));
331 $this->action_menu->setId(
'act_pd');
332 $this->action_menu->setSelectionHeaderClass(
'small');
333 $this->action_menu->setItemLinkClass(
'xsmall');
334 $this->action_menu->setLinksMode(
'il_ContainerItemCommand2');
336 $this->action_menu->setUseImages(
false);
338 $htpl =
new ilTemplate(
'tpl.header_action.html',
true,
true,
'Services/Repository');
339 $htpl->setVariable(
'ACTION_DROP_DOWN', $this->action_menu->getHTML());
341 $tpl->setHeaderActionMenu($htpl->get());
353 global
$ilCtrl, $ilPluginAdmin;
355 include_once(
"Services/Block/classes/class.ilColumnGUI.php");
359 if ($ilCtrl->getNextClass() ==
"ilcolumngui" &&
362 $html = $ilCtrl->forwardCommand($column_gui);
366 if (!$ilCtrl->isAsynch())
375 $html = $ilCtrl->forwardCommand($column_gui);
382 $html = $ilCtrl->forwardCommand($column_gui);
390 include_once(
"./Services/UIComponent/classes/class.ilUIHookProcessor.php");
392 array(
"personal_desktop_gui" => $this));
393 if (!$uip->replaced())
395 $html = $ilCtrl->getHTML($column_gui);
397 $html = $uip->getHTML($html);
412 include_once(
"Services/Block/classes/class.ilColumnGUI.php");
421 if ($ilCtrl->getNextClass() ==
"ilcolumngui" &&
425 $html = $ilCtrl->forwardCommand($column_gui);
429 if (!$ilCtrl->isAsynch())
434 include_once(
"./Services/UIComponent/classes/class.ilUIHookProcessor.php");
436 array(
"personal_desktop_gui" => $this));
437 if (!$uip->replaced())
439 $html = $ilCtrl->getHTML($column_gui);
441 $html = $uip->getHTML($html);
455 include_once(
"Services/Block/classes/class.ilColumnGUI.php");
464 if ($ilCtrl->getNextClass() ==
"ilcolumngui" &&
468 $html = $ilCtrl->forwardCommand($column_gui);
472 if (!$ilCtrl->isAsynch())
477 include_once(
"./Services/UIComponent/classes/class.ilUIHookProcessor.php");
479 array(
"personal_desktop_gui" => $this));
480 if (!$uip->replaced())
482 $html = $ilCtrl->getHTML($column_gui);
484 $html = $uip->getHTML($html);
494 $this->pd_tpl =
new ilTemplate(
"tpl.usr_personaldesktop.html",
true,
true,
"Services/PersonalDesktop");
495 $this->tpl->getStandardTemplate();
504 $this->tpl->setTitle($this->lng->txt(
"personal_desktop"));
515 if (strlen($err_msg) > 0)
517 $this->ilias->raiseError($this->lng->txt($err_msg),$this->ilias->error_obj->MESSAGE);
527 include_once(
"Services/Mail/classes/class.ilPDSysMessageBlockGUI.php");
529 return $sys_block->getHTML();
545 $key_sorta = explode(
";", $key_sort);
547 $multikeys = array_keys($array);
548 $keys = array_keys($array[$multikeys[0]]);
550 for($m=0; $m < count($key_sorta); $m++) {
551 $nkeys[$m] = trim($key_sorta[$m]);
553 $n += count($key_sorta);
555 for($i=0; $i < count($keys); $i++){
556 if(!in_array($keys[$i], $key_sorta)) {
557 $nkeys[
$n] = $keys[$i];
562 for($u=0;$u<count($array); $u++) {
563 $arr = $array[$multikeys[$u]];
564 for($s=0; $s<count($nkeys); $s++) {
566 $output[$multikeys[$u]][$k] = $array[$multikeys[$u]][$k];
581 $ilHelp->setScreenIdComponent(
"pd");
591 if ($ilSetting->get(
'disable_my_memberships') == 0)
593 $ilUser->writePref(
'pd_view', 1);
605 if ($ilSetting->get(
'disable_my_offers') == 0)
607 $ilUser->writePref(
'pd_view', 0);
618 $this->ctrl->redirectByClass(
"ilpersonalprofilegui");
627 $this->ctrl->setParameterByClass(
"ilportfoliorepositorygui",
"shr_id",
$_REQUEST[
"dsh"]);
634 $this->ctrl->setParameterByClass(
"ilobjportfoliogui",
"prt_id", (
int)
$_GET[
"prt_id"]);
635 $this->ctrl->setParameterByClass(
"ilobjportfoliogui",
"gtp", (
int)$_GET[
"gtp"]);
636 $this->ctrl->redirectByClass(array(
"ilportfoliorepositorygui",
"ilobjportfoliogui"),
"preview");
640 $this->ctrl->redirectByClass(
"ilportfoliorepositorygui",
$cmd);
649 $this->ctrl->redirectByClass(
"ilpersonalsettingsgui");
657 if ($this->ilias->getSetting(
"disable_bookmarks"))
664 $this->ctrl->redirectByClass(
"ilbookmarkadministrationgui");
672 if ($this->ilias->getSetting(
'disable_notes'))
679 $this->ctrl->redirectByClass(
"ilpdnotesgui");
687 $this->ctrl->redirectByClass(
"ilpdnewsgui");
695 $this->ctrl->redirectByClass(
"illearningprogressgui");
703 $this->ctrl->redirectByClass(
"ilcalendarpresentationgui");
711 $this->ctrl->redirectByClass(
"ilmailaddressbookgui");
723 $this->ctrl->setParameterByClass(
"ilpersonalworkspacegui",
"shr_id",
$_REQUEST[
"dsh"]);
729 $this->ctrl->setParameterByClass(
"ilpersonalworkspacegui",
"wsp_id", (
int)
$_REQUEST[
"wsp_id"]);
734 $this->ctrl->setParameterByClass(
"ilpersonalworkspacegui",
"gtp", (
int)
$_REQUEST[
"gtp"]);
737 $this->ctrl->redirectByClass(
"ilpersonalworkspacegui",
$cmd);
745 $this->ctrl->redirectByClass(
"ilpersonalskillsgui");
750 $stored_classes = array(
'ilpersonaldesktopgui',
751 'ilpersonalprofilegui',
753 'ilcalendarpresentationgui',
754 'ilbookmarkadministrationgui',
755 'illearningprogressgui');
757 if(isset(
$_SESSION[
'il_pd_history']) and in_array(
$_SESSION[
'il_pd_history'],$stored_classes))
763 $this->ctrl->getNextClass($this);
769 $this->cmdClass = $a_class;
779 if ($pd_set->get(
"enable_block_moving"))
781 $a_column_gui->setEnableMovement(
true);
783 $a_column_gui->setActionMenu($this->action_menu);
795 $this->tpl->setTitle($this->lng->txt(
"personal_desktop"));