24 include_once
'./Services/User/classes/class.ilObjUser.php';
25 include_once
"Services/Mail/classes/class.ilMail.php";
60 $ilCtrl->setContext($ilUser->getId(),
63 $ilMainMenu->setActive(
"desktop");
64 $this->lng->loadLanguageModule(
"pdesk");
67 if (
$_SESSION[
"AccountId"] == ANONYMOUS_USER_ID)
69 $this->ilias->raiseError($this->lng->txt(
"msg_not_available_for_anon"),$this->ilias->error_obj->MESSAGE);
71 $this->cmdClass =
$_GET[
'cmdClass'];
83 $next_class = $this->ctrl->getNextClass();
84 $this->ctrl->setReturn($this,
"show");
90 if ($ilUser->getProfileIncomplete() && $next_class !=
"ilpersonalprofilegui")
92 $this->ctrl->redirectByClass(
"ilpersonalprofilegui");
96 if( $ilUser->isPasswordChangeDemanded() && $next_class !=
"ilpersonalprofilegui" )
98 ilUtil::sendInfo( $this->lng->txt(
'password_change_on_first_login_demand'), true );
100 $this->ctrl->redirectByClass(
"ilpersonalprofilegui");
104 if( $ilUser->isPasswordExpired() && $next_class !=
"ilpersonalprofilegui" )
106 $msg = $this->lng->txt(
'password_expired');
107 $password_age = $ilUser->getPasswordAge();
111 $this->ctrl->redirectByClass(
"ilpersonalprofilegui");
115 if(
$_GET[
'PDHistory'])
124 case "ilfeedbackgui":
127 $this->tpl->setTitle($this->lng->txt(
"personal_desktop"));
129 $this->lng->txt(
"personal_desktop"));
131 include_once(
"Services/Feedback/classes/class.ilFeedbackGUI.php");
133 $ret =& $this->ctrl->forwardCommand($feedback_gui);
136 case "ilbookmarkadministrationgui":
137 if ($ilSetting->get(
'disable_bookmarks'))
144 include_once(
"./Services/PersonalDesktop/classes/class.ilBookmarkAdministrationGUI.php");
146 if ($bookmark_gui->getMode() ==
'tree') {
152 $ret =& $this->ctrl->forwardCommand($bookmark_gui);
156 case "ilpersonalprofilegui":
159 include_once(
"./Services/User/classes/class.ilPersonalProfileGUI.php");
161 $ret =& $this->ctrl->forwardCommand($profile_gui);
166 include_once(
'./Services/User/classes/class.ilObjUserGUI.php');
168 $ret =& $this->ctrl->forwardCommand($user_gui);
171 case 'ilcalendarpresentationgui':
175 include_once(
'./Services/Calendar/classes/class.ilCalendarPresentationGUI.php');
177 $ret = $this->ctrl->forwardCommand($cal);
183 if ($ilSetting->get(
'disable_notes'))
192 include_once(
"./Services/Notes/classes/class.ilPDNotesGUI.php");
194 $ret =& $this->ctrl->forwardCommand($pd_notes_gui);
201 include_once(
"./Services/News/classes/class.ilPDNewsGUI.php");
203 $ret =& $this->ctrl->forwardCommand($pd_news_gui);
206 case "illearningprogressgui":
209 include_once
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
211 $ret =& $this->ctrl->forwardCommand($new_gui);
218 include_once(
"./Services/Block/classes/class.ilColumnGUI.php");
227 $cmd = $this->ctrl->getCmd(
"show");
240 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.adm_content.html");
241 $this->tpl->addBlockFile(
"STATUSLINE",
"statusline",
"tpl.statusline.html");
242 $this->tpl->addBlockFile(
"LOCATOR",
"locator",
"tpl.locator.html");
252 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.adm_content.html");
253 $this->tpl->addBlockFile(
"STATUSLINE",
"statusline",
"tpl.statusline.html");
254 $this->tpl->addBlockFile(
"LOCATOR",
"locator",
"tpl.locator.html");
264 $this->pd_tpl =
new ilTemplate(
"tpl.usr_personaldesktop.html",
true,
true);
265 $this->tpl->getStandardTemplate();
274 $this->lng->txt(
"personal_desktop"));
275 $this->tpl->setTitle($this->lng->txt(
"personal_desktop"));
292 include_once(
"Services/Block/classes/class.ilColumnGUI.php");
296 if ($ilCtrl->getNextClass() ==
"ilcolumngui" &&
299 $html = $ilCtrl->forwardCommand($column_gui);
303 if (!$ilCtrl->isAsynch())
312 $html = $ilCtrl->forwardCommand($column_gui);
319 $html = $ilCtrl->forwardCommand($column_gui);
324 $html = $ilCtrl->getHTML($column_gui);
338 include_once(
"Services/Block/classes/class.ilColumnGUI.php");
342 if ($ilCtrl->getNextClass() ==
"ilcolumngui" &&
346 $html = $ilCtrl->forwardCommand($column_gui);
350 if (!$ilCtrl->isAsynch())
352 $html = $ilCtrl->getHTML($column_gui);
366 include_once(
"Services/Block/classes/class.ilColumnGUI.php");
370 if ($ilCtrl->getNextClass() ==
"ilcolumngui" &&
374 $html = $ilCtrl->forwardCommand($column_gui);
378 if (!$ilCtrl->isAsynch())
380 $html = $ilCtrl->getHTML($column_gui);
390 $this->pd_tpl =
new ilTemplate(
"tpl.usr_personaldesktop.html",
true,
true);
391 $this->tpl->getStandardTemplate();
400 $this->lng->txt(
"personal_desktop"));
401 $this->tpl->setTitle($this->lng->txt(
"personal_desktop"));
412 $ilUser->dropDesktopItem(
$_GET[
"item_ref_id"],
$_GET[
"type"]);
423 $ilUser->addDesktopItem(
$_GET[
"item_ref_id"],
$_GET[
"type"]);
433 if (strlen($err_msg) > 0)
435 $this->ilias->raiseError($this->lng->txt($err_msg),$this->ilias->error_obj->MESSAGE);
445 include_once(
"Services/Mail/classes/class.ilPDSysMessageBlockGUI.php");
447 return $sys_block->getHTML();
456 include_once(
"./Services/Feedback/classes/class.ilPDFeedbackBlockGUI.php");
458 return $fb_block->getHTML();
460 include_once(
'Services/Feedback/classes/class.ilFeedbackGUI.php');
462 return $feedback_gui->getPDFeedbackListHTML();
478 $key_sorta = explode(
";", $key_sort);
480 $multikeys = array_keys($array);
481 $keys = array_keys($array[$multikeys[0]]);
483 for($m=0; $m < count($key_sorta); $m++) {
484 $nkeys[$m] = trim($key_sorta[$m]);
486 $n += count($key_sorta);
488 for($i=0; $i < count($keys); $i++){
489 if(!in_array($keys[$i], $key_sorta)) {
490 $nkeys[
$n] = $keys[$i];
495 for($u=0;$u<count($array); $u++) {
496 $arr = $array[$multikeys[$u]];
497 for($s=0; $s<count($nkeys); $s++) {
499 $output[$multikeys[$u]][$k] = $array[$multikeys[$u]][$k];
514 $this->tpl->addBlockFile(
"TABS",
"tabs",
"tpl.tabs.html");
522 $who_is_online =
true;
528 $inc_type = (strtolower(
$_GET[
"baseClass"]) ==
"ilpersonaldesktopgui" &&
529 (strtolower($this->cmdClass) ==
"ilpersonaldesktopgui" ||
530 $this->cmdClass ==
"" || (strtolower($this->cmdClass)) ==
"ilfeedbackgui"
531 || $ilCtrl->getNextClass() ==
"ilcolumngui"))
534 $inhalt1[] = array(
$inc_type, $this->ctrl->getLinkTarget($this), $this->lng->txt(
"overview"));
537 $inc_type = (strtolower($this->cmdClass) ==
"ilpersonalprofilegui")
541 $inhalt1[] = array($inc_type, $this->ctrl->getLinkTargetByClass(
"ilPersonalProfileGUI"),
542 $this->lng->txt(
"personal_profile"));
544 if (
$_SESSION[
"AccountId"] != ANONYMOUS_USER_ID)
547 if ($ilSetting->get(
"block_activated_news"))
549 $inc_type = ($ilCtrl->getNextClass() ==
"ilpdnewsgui")
554 $this->ctrl->getLinkTargetByClass(
"ilpdnewsgui"),
555 $this->lng->txt(
"news"));
559 include_once(
'./Services/Calendar/classes/class.ilCalendarSettings.php');
561 if($settings->isEnabled())
563 $inc_type = (strtolower($this->cmdClass) ==
"ilcalendarpresentationgui")
568 $this->ctrl->getLinkTargetByClass(
"ilcalendarpresentationgui"),
569 $this->lng->txt(
"calendar"));
573 if (!$this->ilias->getSetting(
"disable_notes"))
575 $inc_type = (strtolower($this->cmdClass) ==
"ilpdnotesgui" ||
576 strtolower($this->cmdClass) ==
"ilnotegui")
580 $this->ctrl->getLinkTargetByClass(
"ilpdnotesgui"),
581 $this->lng->txt(
"private_notes"));
585 if (!$this->ilias->getSetting(
"disable_bookmarks"))
587 $inc_type = (strtolower($this->cmdClass) ==
"ilbookmarkadministrationgui")
591 $this->ctrl->getLinkTargetByClass(
"ilbookmarkadministrationgui"),
592 $this->lng->txt(
"bookmarks"));
598 include_once(
"Services/Tracking/classes/class.ilObjUserTracking.php");
601 $cmd_classes = array(
'illplistofobjectsgui',
'illplistofsettingsgui',
'illearningprogressgui',
'illplistofprogressgui');
602 $inc_type = in_array(strtolower($this->cmdClass),$cmd_classes) ?
'tabactive' :
'tabinactive';
604 $inhalt1[] = array($inc_type, $this->ctrl->getLinkTargetByClass(
"ilLearningProgressGUI"),
605 $this->lng->txt(
"learning_progress"));
608 for ( $i=0; $i<
sizeof(
$inhalt1); $i++)
611 { $this->tpl->setCurrentBlock(
"tab");
612 $this->tpl->setVariable(
"TAB_TYPE",
$inhalt1[$i][0]);
613 $this->tpl->setVariable(
"TAB_LINK",
$inhalt1[$i][1]);
614 $this->tpl->setVariable(
"TAB_TEXT",
$inhalt1[$i][2]);
615 $this->tpl->setVariable(
"TAB_TARGET",
$inhalt1[$i][3]);
616 $this->tpl->parseCurrentBlock();
620 $this->tpl->setCurrentBlock(
"tabs");
621 $this->tpl->parseCurrentBlock();
629 $this->ctrl->redirectByClass(
"ilpersonalprofilegui");
637 if ($this->ilias->getSetting(
"disable_bookmarks"))
644 $this->ctrl->redirectByClass(
"ilbookmarkadministrationgui");
652 if ($this->ilias->getSetting(
'disable_notes'))
659 $this->ctrl->redirectByClass(
"ilpdnotesgui");
667 $this->ctrl->redirectByClass(
"ilpdnewsgui");
675 $this->ctrl->redirectByClass(
"illearningprogressgui");
680 $stored_classes = array(
'ilpersonaldesktopgui',
681 'ilpersonalprofilegui',
683 'ilcalendarpresentationgui',
684 'ilbookmarkadministrationgui',
685 'illearningprogressgui');
687 if(isset(
$_SESSION[
'il_pd_history']) and in_array(
$_SESSION[
'il_pd_history'],$stored_classes))
693 $this->ctrl->getNextClass($this);
699 $this->cmdClass = $a_class;
708 if ($pd_set->get(
"enable_block_moving"))
710 $a_column_gui->setEnableMovement(
true);
720 $this->lng->txt(
"personal_desktop"));
721 $this->tpl->setTitle($this->lng->txt(
"personal_desktop"));