5 include_once(
"Services/Block/classes/class.ilBlockGUI.php");
6 include_once
'./Services/PersonalDesktop/interfaces/interface.ilDesktopItemHandling.php';
36 $lng->loadLanguageModule(
'pd');
37 $lng->loadLanguageModule(
'cntr');
46 $this->allow_moving =
false;
58 include_once
'./Services/PersonalDesktop/classes/class.ilDesktopItemGUI.php';
61 $ilCtrl->redirectByClass(
'ilpersonaldesktopgui',
'show');
71 include_once
'./Services/PersonalDesktop/classes/class.ilDesktopItemGUI.php';
74 $ilCtrl->redirectByClass(
'ilpersonaldesktopgui',
'show');
87 if(in_array((
int)
$_GET[
'view'], $this->allowed_views))
89 $ilUser->writePref(
'pd_view', (
int)$_GET[
'view']);
93 @reset($this->allowed_views);
94 $view = (int)@current($this->allowed_views);
95 $ilUser->writePref(
'pd_view',
$view);
98 $ilCtrl->redirectByClass(
'ilpersonaldesktopgui',
'show');
110 $this->allowed_views = array();
113 if($ilSetting->get(
'disable_my_offers') == 1 &&
114 $ilSetting->get(
'disable_my_memberships') == 1)
117 $ilSetting->set(
'personal_items_default_view', self::VIEW_MY_OFFERS);
121 else if($ilSetting->get(
'disable_my_offers') == 0 &&
122 $ilSetting->get(
'disable_my_memberships') == 0)
127 else if($ilSetting->get(
'disable_my_offers') == 0 &&
128 $ilSetting->get(
'disable_my_memberships') == 1)
137 $this->view = $ilUser->getPref(
'pd_view');
138 if($this->view ===
false || !in_array((
int)$this->view, $this->allowed_views))
140 $ilUser->writePref(
'pd_view', (
int)$ilSetting->get(
'personal_items_default_view'));
141 $this->view = (int)$ilSetting->get(
'personal_items_default_view');
161 $cmd = array_shift(array_keys(
$cmd));
166 case "confirmRemove":
190 $ilDB->useSlave(
true);
193 if($ilSetting->get(
'disable_my_offers') == 0 &&
194 $ilSetting->get(
'disable_my_memberships') == 0)
209 $this->
setData(array(
"dummy"));
211 include_once
"Services/Object/classes/class.ilObjectListGUI.php";
212 ilObjectListGUI::prepareJSLinks(
"",
213 $ilCtrl->getLinkTargetByClass(array(
"ilcommonactiondispatchergui",
"ilnotegui"),
"",
"",
true,
false),
214 $ilCtrl->getLinkTargetByClass(array(
"ilcommonactiondispatchergui",
"iltagginggui"),
"",
"",
true,
false));
218 case self::VIEW_MY_MEMBERSHIPS:
220 if ($ilSetting->get(
'disable_my_offers') == 0)
222 $tpl->setTitle($lng->txt(
"my_courses_groups"));
224 $this->
setTitle($this->lng->txt(
'pd_my_memberships'));
228 case self::VIEW_MY_OFFERS:
231 if(!in_array(self::VIEW_MY_MEMBERSHIPS, $this->allowed_views))
233 $this->
setTitle($this->lng->txt(
'selected_items'));
237 $this->
setTitle($this->lng->txt(
'pd_my_offers'));
248 $ilCtrl->clearParametersByClass(
"ilpersonaldesktopgui");
249 $ilCtrl->clearParameters($this);
251 $ilDB->useSlave(
false);
263 $next_class = $ilCtrl->getNextClass();
264 $cmd = $ilCtrl->getCmd(
"getHTML");
268 case "ilcommonactiondispatchergui":
269 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
271 $ilCtrl->forwardCommand($gui);
275 if(method_exists($this,
$cmd))
277 return $this->
$cmd();
282 return $this->
$cmd();
289 return $this->content;
294 $this->content = $a_content;
306 $this->tpl->setVariable(
"BLOCK_ROW", $this->
getContent());
324 $this->tpl->setVariable(
"FCOLSPAN", $this->
getColSpan());
325 if ($this->tpl->blockExists(
"block_footer"))
327 $this->tpl->setCurrentBlock(
"block_footer");
328 $this->tpl->parseCurrentBlock();
354 $ilCtrl->getLinkTarget($this,
"orderPDItemsByType"),
355 $ilCtrl->getLinkTarget($this,
"orderPDItemsByType",
"",
true),
357 false,
false, ($ilUser->getPref(
"pd_order_items") !=
'location')
373 $ilCtrl->getLinkTarget($this,
"orderPDItemsByLocation"),
374 $ilCtrl->getLinkTarget($this,
"orderPDItemsByLocation",
"",
true),
376 false,
false, ($ilUser->getPref(
"pd_order_items") ==
'location')
381 $lng->txt(
"pd_remove_multiple") :
382 $lng->txt(
"pd_unsubscribe_multiple_memberships"),
383 $ilCtrl->getLinkTarget($this,
"manage"),
397 global $tree,
$ilUser, $ilObjDataCache;
399 include_once
'Services/Membership/classes/class.ilParticipants.php';
402 if(is_array($types) && count($types))
404 foreach($types as $type)
423 $items = array_merge($crs_mbs, $grp_mbs);
426 $references = array();
427 foreach($items as $key => $obj_id)
430 foreach($item_references as
$ref_id)
432 if($tree->isInTree($ref_id))
434 $title = $ilObjDataCache->lookupTitle($obj_id);
435 $type = $ilObjDataCache->lookupType($obj_id);
437 $parent_ref_id = $tree->getParentId($ref_id);
438 $par_left = $tree->getLeftValue($parent_ref_id);
439 $par_left = sprintf(
"%010d", $par_left);
441 $references[$par_left . $title .
$ref_id] = array(
446 'description' => $ilObjDataCache->lookupDescription($obj_id),
447 'parent_ref' => $parent_ref_id
453 return is_array($references) ? $references : array();
468 $item_html = array();
469 if(count($items) > 0)
471 include_once(
"./Services/Object/classes/class.ilObjectListGUIPreloader.php");
473 foreach($items as $item)
475 $preloader->addItem($item[
"obj_id"], $item[
"type"], $item[
"ref_id"]);
477 $preloader->preload();
481 foreach($items as $item)
485 if ($cur_obj_type != $item[
"type"])
494 $item_list_gui->enableNotes(
false);
495 $item_list_gui->enableComments(
false);
496 $item_list_gui->enableTags(
false);
498 $item_list_gui->enableIcon(
true);
499 $item_list_gui->enableDelete(
false);
500 $item_list_gui->enableCut(
false);
501 $item_list_gui->enableCopy(
false);
502 $item_list_gui->enablePayment(
false);
503 $item_list_gui->enableLink(
false);
504 $item_list_gui->enableInfoScreen(
true);
505 if ($ilSetting->get(
'disable_my_offers') == 1)
507 $item_list_gui->enableSubscribe(
false);
511 $item_list_gui->enableSubscribe(
true);
513 $item_list_gui->setContainerObject($this);
517 $item_list_gui->enableDescription(
false);
518 $item_list_gui->enableProperties(
false);
519 $item_list_gui->enablePreconditions(
false);
523 $item_list_gui->enableCommands(
true,
true);
527 $ilBench->start(
"ilPersonalDesktopGUI",
"getListHTML");
529 if (is_object($item_list_gui))
536 if(!$rbacsystem->checkAccess(
"leave", $item[
"ref_id"]))
538 $item_list_gui->enableCheckbox(
false);
542 $item_list_gui->enableCheckbox(
true);
546 $html = $item_list_gui->getListItemHTML($item[
"ref_id"],
547 $item[
"obj_id"], $item[
"title"], $item[
"description"]);
548 $ilBench->stop(
"ilPersonalDesktopGUI",
"getListHTML");
552 $item_html[] = array(
554 "item_ref_id" => $item[
"ref_id"],
555 "item_obj_id" => $item[
"obj_id"],
556 "parent_ref" => $item[
"parent_ref"],
557 "type" => $item[
"type"],
558 'item_icon_image_type' => $item_list_gui->getIconImageType()
566 if (count($item_html) > 0)
571 foreach($item_html as $item)
574 if ($cur_parent_ref != $item[
"parent_ref"])
576 if ($ilSetting->get(
"icon_position_in_lists") ==
"item_rows")
585 $cur_parent_ref = $item[
"parent_ref"];
589 $this->
addStandardRow(
$tpl, $item[
"html"], $item[
"item_ref_id"], $item[
"item_obj_id"],
590 $item[
'item_icon_image_type'],
591 "th_".$cur_parent_ref);
613 $objtype_groups = $objDefinition->getGroupedRepositoryObjectTypes(
614 array(
"cat",
"crs",
"grp",
"fold"));
617 foreach($objtype_groups as $grp => $grpdata)
621 "title" => $this->lng->txt(
"objs_".$grp),
622 "types" => $grpdata[
"objs"]);
625 include_once(
"./Services/Object/classes/class.ilObjectListGUIPreloader.php");
627 foreach ($types as
$t)
630 $title = $t[
"title"];
635 if (count($items) > 0)
638 foreach($items as $item)
640 $preloader->addItem($item[
"obj_id"], $item[
"type"], $item[
"ref_id"]);
642 $preloader->preload();
648 $item_html = array();
652 $rel_header =
"th_".$grp;
661 if (strcmp($a_type,
"tst") == 0) {
662 $items = $this->multiarray_sort($items,
"used_tries; title");
663 foreach ($items as $tst_item) {
664 if (!isset($tst_item[
"used_tries"])) {
667 elseif ($tst_item[
"used_tries"] == 0) {
673 foreach($items as $item)
676 if ($cur_obj_type != $item[
"type"])
678 $class = $objDefinition->getClassName($item[
"type"]);
679 $location = $objDefinition->getLocation($item[
"type"]);
680 $full_class =
"ilObj".$class.
"ListGUI";
681 include_once(
$location.
"/class.".$full_class.
".php");
682 $item_list_gui =
new $full_class();
685 $item_list_gui->enableNotes(
false);
686 $item_list_gui->enableComments(
false);
687 $item_list_gui->enableTags(
false);
689 $item_list_gui->enableIcon(
true);
690 $item_list_gui->enableDelete(
false);
691 $item_list_gui->enableCut(
false);
692 $item_list_gui->enableCopy(
false);
693 $item_list_gui->enablePayment(
false);
694 $item_list_gui->enableLink(
false);
695 $item_list_gui->enableInfoScreen(
true);
696 if ($ilSetting->get(
'disable_my_offers') == 1)
698 $item_list_gui->enableSubscribe(
false);
702 $item_list_gui->enableSubscribe(
true);
705 $item_list_gui->setContainerObject($this);
708 $item_list_gui->enableCheckbox(
true);
712 $item_list_gui->enableDescription(
false);
713 $item_list_gui->enableProperties(
false);
714 $item_list_gui->enablePreconditions(
false);
715 $item_list_gui->enableNoticeProperties(
false);
719 $item_list_gui->enableCommands(
true,
true);
723 $ilBench->start(
"ilPersonalDesktopGUI",
"getListHTML");
730 if(!$rbacsystem->checkAccess(
"leave", $item[
"ref_id"]))
732 $item_list_gui->enableCheckbox(
false);
736 $item_list_gui->enableCheckbox(
true);
740 $html = $item_list_gui->getListItemHTML($item[
"ref_id"],
741 $item[
"obj_id"], $item[
"title"], $item[
"description"]);
742 $ilBench->stop(
"ilPersonalDesktopGUI",
"getListHTML");
746 $item_html[] = array(
748 "item_ref_id" => $item[
"ref_id"],
749 "item_obj_id" => $item[
"obj_id"],
750 'item_icon_image_type' => (method_exists($item_list_gui,
'getIconImageType')) ?
751 $item_list_gui->getIconImageType() :
759 if (count($item_html) > 0)
764 if ($ilSetting->get(
"icon_position_in_lists") ==
"item_rows")
776 foreach($item_html as $item)
779 $ilSetting->get(
"icon_position_in_lists") ==
"item_rows")
782 $this->
addStandardRow(
$tpl, $item[
"html"], $item[
"item_ref_id"], $item[
"item_obj_id"],
783 $item[
'item_icon_image_type'],
789 $this->
addStandardRow(
$tpl, $item[
"html"], $item[
"item_ref_id"], $item[
"item_obj_id"],
"", $rel_header);
812 switch($ilUser->getPref(
'pd_order_items'))
835 switch ($ilUser->getPref(
"pd_order_items"))
849 $tpl->setCurrentBlock(
"select_all_row");
850 $tpl->setVariable(
"CHECKBOXNAME",
"ilToolbarSelectAll");
851 $tpl->setVariable(
"SEL_ALL_PARENT",
"ilToolbar");
852 $tpl->setVariable(
"SEL_ALL_CB_NAME",
"id");
853 $tpl->setVariable(
"TXT_SELECT_ALL", $this->lng->txt(
"select_all"));
854 $tpl->parseCurrentBlock();
867 $items = $ilUser->getDesktopItems();
868 if (count($items) > 0)
870 include_once(
"./Services/Object/classes/class.ilObjectListGUIPreloader.php");
872 foreach($items as $item)
874 $preloader->addItem($item[
"obj_id"], $item[
"type"], $item[
"ref_id"]);
876 $preloader->preload();
884 $objtype_groups = $objDefinition->getGroupedRepositoryObjectTypes(
885 array(
"cat",
"crs",
"grp",
"fold"));
888 foreach($objtype_groups as $grp => $grpdata)
892 "title" => $this->lng->txt(
"objs_".$grp),
893 "types" => $grpdata[
"objs"]);
896 foreach ($types as
$t)
900 $title = $t[
"title"];
903 $items = $ilUser->getDesktopItems($type);
904 $item_html = array();
908 $rel_header =
"th_".$grp;
911 if (count($items) > 0)
919 if (strcmp($a_type,
"tst") == 0) {
920 $items = $this->multiarray_sort($items,
"used_tries; title");
921 foreach ($items as $tst_item) {
922 if (!isset($tst_item[
"used_tries"])) {
925 elseif ($tst_item[
"used_tries"] == 0) {
931 foreach($items as $item)
934 if ($cur_obj_type != $item[
"type"])
936 $class = $objDefinition->getClassName($item[
"type"]);
937 $location = $objDefinition->getLocation($item[
"type"]);
938 $full_class =
"ilObj".$class.
"ListGUI";
939 include_once(
$location.
"/class.".$full_class.
".php");
940 $item_list_gui =
new $full_class();
943 $item_list_gui->enableNotes(
false);
944 $item_list_gui->enableComments(
false);
945 $item_list_gui->enableTags(
false);
947 $item_list_gui->enableIcon(
true);
948 $item_list_gui->enableDelete(
false);
949 $item_list_gui->enableCut(
false);
950 $item_list_gui->enableCopy(
false);
951 $item_list_gui->enablePayment(
false);
952 $item_list_gui->enableLink(
false);
953 $item_list_gui->enableInfoScreen(
true);
954 $item_list_gui->setContainerObject($this);
958 $item_list_gui->enableCheckbox(
true);
963 $item_list_gui->enableDescription(
false);
964 $item_list_gui->enableProperties(
false);
965 $item_list_gui->enablePreconditions(
false);
966 $item_list_gui->enableNoticeProperties(
false);
970 $item_list_gui->enableCommands(
true,
true);
974 $ilBench->start(
"ilPersonalDesktopGUI",
"getListHTML");
978 $html = $item_list_gui->getListItemHTML($item[
"ref_id"],
979 $item[
"obj_id"], $item[
"title"], $item[
"description"]);
980 $ilBench->stop(
"ilPersonalDesktopGUI",
"getListHTML");
984 $item_html[] = array(
986 "item_ref_id" => $item[
"ref_id"],
987 "item_obj_id" => $item[
"obj_id"],
988 'item_icon_image_type' => (method_exists($item_list_gui,
'getIconImageType')) ?
989 $item_list_gui->getIconImageType() :
997 if (count($item_html) > 0)
1002 if ($ilSetting->get(
"icon_position_in_lists") ==
"item_rows")
1014 foreach($item_html as $item)
1017 $ilSetting->get(
"icon_position_in_lists") ==
"item_rows")
1020 $this->
addStandardRow(
$tpl, $item[
"html"], $item[
"item_ref_id"], $item[
"item_obj_id"],
1021 $item[
'item_icon_image_type'],
1027 $this->
addStandardRow(
$tpl, $item[
"html"], $item[
"item_ref_id"], $item[
"item_obj_id"],
"", $rel_header);
1047 $items = $ilUser->getDesktopItems();
1048 $item_html = array();
1051 if (count($items) > 0)
1053 include_once(
"./Services/Object/classes/class.ilObjectListGUIPreloader.php");
1055 foreach($items as $item)
1057 $preloader->addItem($item[
"obj_id"], $item[
"type"], $item[
"ref_id"]);
1059 $preloader->preload();
1063 foreach($items as $item)
1067 if ($cur_obj_type != $item[
"type"])
1076 $item_list_gui->enableNotes(
false);
1077 $item_list_gui->enableComments(
false);
1078 $item_list_gui->enableTags(
false);
1080 $item_list_gui->enableIcon(
true);
1081 $item_list_gui->enableDelete(
false);
1082 $item_list_gui->enableCut(
false);
1083 $item_list_gui->enableCopy(
false);
1084 $item_list_gui->enablePayment(
false);
1085 $item_list_gui->enableLink(
false);
1086 $item_list_gui->enableInfoScreen(
true);
1090 $item_list_gui->enableDescription(
false);
1091 $item_list_gui->enableProperties(
false);
1092 $item_list_gui->enablePreconditions(
false);
1096 $item_list_gui->enableCommands(
true,
true);
1100 $ilBench->start(
"ilPersonalDesktopGUI",
"getListHTML");
1104 $item_list_gui->setContainerObject($this);
1105 $html = $item_list_gui->getListItemHTML($item[
"ref_id"],
1106 $item[
"obj_id"], $item[
"title"], $item[
"description"]);
1107 $ilBench->stop(
"ilPersonalDesktopGUI",
"getListHTML");
1111 $item_html[] = array(
1113 "item_ref_id" => $item[
"ref_id"],
1114 "item_obj_id" => $item[
"obj_id"],
1115 "parent_ref" => $item[
"parent_ref"],
1116 "type" => $item[
"type"],
1117 'item_icon_image_type' => $item_list_gui->getIconImageType()
1124 if (count($item_html) > 0)
1126 $cur_parent_ref = 0;
1129 foreach($item_html as $item)
1132 if ($cur_parent_ref != $item[
"parent_ref"])
1134 if ($ilSetting->get(
"icon_position_in_lists") ==
"item_rows")
1143 $cur_parent_ref = $item[
"parent_ref"];
1147 $this->
addStandardRow(
$tpl, $item[
"html"], $item[
"item_ref_id"], $item[
"item_obj_id"],
1148 $item[
'item_icon_image_type'],
1149 "th_".$cur_parent_ref);
1161 $this->cur_row_type =
"";
1172 $tpl =
new ilTemplate(
"tpl.pd_list_block.html",
true,
true,
"Services/PersonalDesktop");
1173 $this->cur_row_type =
"";
1182 global $objDefinition;
1184 if (!isset($this->item_list_guis[$a_type]))
1186 $class = $objDefinition->getClassName($a_type);
1193 $location = $objDefinition->getLocation($a_type);
1199 $full_class =
"ilObj".$class.
"ListGUI";
1201 include_once(
$location.
"/class.".$full_class.
".php");
1202 $item_list_gui =
new $full_class();
1203 $this->item_list_guis[$a_type] =& $item_list_gui;
1207 $item_list_gui =& $this->item_list_guis[$a_type];
1212 $item_list_gui->enableCheckbox(
true);
1216 return $item_list_gui;
1228 global $objDefinition;
1231 if (!$objDefinition->isPlugin($a_type))
1233 $title = $this->lng->txt(
"objs_".$a_type);
1237 include_once(
"./Services/Component/classes/class.ilPlugin.php");
1242 $header_id =
"th_".$a_type;
1246 $a_tpl->setCurrentBlock(
"container_header_row_image");
1247 $a_tpl->setVariable(
"HEADER_IMG", $icon);
1248 $a_tpl->setVariable(
"HEADER_ALT", $title);
1252 $a_tpl->setCurrentBlock(
"container_header_row");
1255 $a_tpl->setVariable(
"BLOCK_HEADER_CONTENT", $title);
1256 $a_tpl->setVariable(
"BLOCK_HEADER_ID", $header_id);
1257 $a_tpl->parseCurrentBlock();
1258 $a_tpl->touchBlock(
"container_row");
1274 if (!in_array($type, array(
"lm",
"dbk",
"sahs",
"htlm")))
1284 if ($ilSetting->get(
"custom_icons") &&
1285 in_array($type, array(
"cat",
"grp",
"crs",
"root")))
1287 require_once(
"./Services/Container/classes/class.ilContainer.php");
1294 if ($tree->getRootId() != $par_id)
1300 $nd = $tree->getNodeData(ROOT_FOLDER_ID);
1301 $title = $nd[
"title"];
1302 if ($title ==
"ILIAS")
1304 $title = $this->lng->txt(
"repository");
1333 $a_tpl->setCurrentBlock(
"container_header_row");
1336 $a_tpl->setVariable(
"BLOCK_HEADER_CONTENT", $title);
1339 $a_tpl->parseCurrentBlock();
1340 $a_tpl->touchBlock(
"container_row");
1351 $a_image_type =
"", $a_related_header =
"")
1355 $this->cur_row_type = ($this->cur_row_type ==
"row_type_1")
1358 $a_tpl->touchBlock($this->cur_row_type);
1360 if ($a_image_type !=
"")
1362 if (!is_array($a_image_type) && !in_array($a_image_type, array(
"lm",
"dbk",
"htlm",
"sahs")))
1365 $title = $this->lng->txt(
"obj_".$a_image_type);
1370 $title = $this->lng->txt(
"learning_resource");
1374 if ($ilSetting->get(
"custom_icons") &&
1375 in_array($a_image_type, array(
"cat",
"grp",
"crs")))
1377 require_once(
"./Services/Container/classes/class.ilContainer.php");
1384 $a_tpl->setCurrentBlock(
"block_row_image");
1385 $a_tpl->setVariable(
"ROW_IMG", $icon);
1386 $a_tpl->setVariable(
"ROW_ALT", $title);
1387 $a_tpl->parseCurrentBlock();
1391 $a_tpl->setVariable(
"ROW_NBSP",
" ");
1393 $a_tpl->setCurrentBlock(
"container_standard_row");
1394 $a_tpl->setVariable(
"BLOCK_ROW_CONTENT", $a_html);
1395 $rel_headers = ($a_related_header !=
"")
1396 ?
"th_selected_items ".$a_related_header
1397 :
"th_selected_items";
1398 $a_tpl->setVariable(
"BLOCK_ROW_HEADERS", $rel_headers);
1399 $a_tpl->parseCurrentBlock();
1400 $a_tpl->touchBlock(
"container_row");
1410 switch((
int)$this->view)
1412 case self::VIEW_MY_MEMBERSHIPS:
1413 $tpl =
new ilTemplate(
'tpl.pd_my_memberships_intro.html',
true,
true,
'Services/PersonalDesktop');
1415 $tpl->setVariable(
'TXT_WELCOME', $lng->txt(
'pd_my_memberships_intro'));
1416 $tpl->setVariable(
'TXT_INTRO_1', $lng->txt(
'pd_my_memberships_intro2'));
1419 case self::VIEW_MY_OFFERS:
1422 $nd = $tree->getNodeData(ROOT_FOLDER_ID);
1423 $title = $nd[
"title"];
1424 if ($title ==
"ILIAS")
1426 $title = $lng->txt(
"repository");
1429 $tpl =
new ilTemplate(
"tpl.pd_intro.html",
true,
true,
"Services/PersonalDesktop");
1431 $tpl->setVariable(
"TXT_WELCOME", $lng->txt(
"pdesk_intro"));
1432 $tpl->setVariable(
"TXT_INTRO_1", sprintf($lng->txt(
"pdesk_intro2"), $lng->txt(
"to_desktop")));
1433 include_once(
"./Services/Link/classes/class.ilLink.php");
1434 $tpl->setVariable(
"TXT_INTRO_2", sprintf($lng->txt(
"pdesk_intro3"),
1435 '<a href="'.ilLink::_getStaticLink(1,
'root',
true).
'">'.$title.
'</a>'));
1436 $tpl->setVariable(
"TXT_INTRO_3", $lng->txt(
"pdesk_intro4"));
1450 $ilUser->writePref(
"pd_order_items",
"location");
1452 if ($ilCtrl->isAsynch())
1459 $ilCtrl->redirectByClass(
"ilpersonaldesktopgui",
"show");
1470 $ilUser->writePref(
"pd_order_items",
"type");
1472 if ($ilCtrl->isAsynch())
1479 $ilCtrl->redirectByClass(
"ilpersonaldesktopgui",
"show");
1489 $this->manage =
true;
1493 $top_tb->setFormAction($ilCtrl->getFormAction($this));
1495 if ($this->view == self::VIEW_MY_OFFERS)
1497 $top_tb->addFormButton($lng->txt(
"remove"),
"confirmRemove");
1501 $top_tb->addFormButton($lng->txt(
"pd_unsubscribe_memberships"),
"confirmRemove");
1503 $top_tb->addSeparator();
1504 $top_tb->addFormButton($lng->txt(
"cancel"),
"getHTML");
1505 $top_tb->setCloseFormTag(
false);
1509 if ($this->view == self::VIEW_MY_OFFERS)
1511 $bot_tb->addFormButton($lng->txt(
"remove"),
"confirmRemove");
1515 $bot_tb->addFormButton($lng->txt(
"pd_unsubscribe_memberships"),
"confirmRemove");
1517 $bot_tb->addSeparator();
1518 $bot_tb->addFormButton($lng->txt(
"cancel"),
"getHTML");
1519 $bot_tb->setOpenFormTag(
false);
1521 return $top_tb->getHTML().$this->getHTML().$bot_tb->getHTML();
1556 if(!
sizeof(
$_POST[
"id"]))
1559 $ilCtrl->redirect($this,
"manage");
1562 if($this->view == self::VIEW_MY_OFFERS)
1564 $question = $this->lng->txt(
"pd_info_delete_sure_remove");
1565 $cmd =
"confirmedRemove";
1569 $question = $this->lng->txt(
"pd_info_delete_sure_unsubscribe");
1570 $cmd =
"confirmedUnsubscribe";
1573 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
1575 $cgui->setHeaderText($question);
1577 $cgui->setFormAction($ilCtrl->getFormAction($this));
1578 $cgui->setCancel($this->lng->txt(
"cancel"),
"manage");
1579 $cgui->setConfirm($this->lng->txt(
"confirm"),
$cmd);
1587 $cgui->addItem(
"ref_id[]", $ref_id, $title,
1589 $this->lng->txt(
"icon").
" ".$this->lng->txt(
"obj_".$type));
1592 return $cgui->getHTML();
1599 if(!
sizeof(
$_POST[
"ref_id"]))
1601 $ilCtrl->redirect($this,
"manage");
1611 $ilCtrl->redirectByClass(
"ilpersonaldesktopgui",
"show");
1618 if(!
sizeof(
$_POST[
"ref_id"]))
1620 $ilCtrl->redirect($this,
"manage");
1625 if($ilAccess->checkAccess(
"leave",
"", $ref_id))
1631 include_once
"Modules/Course/classes/class.ilCourseParticipants.php";
1633 $members->delete($ilUser->getId());
1635 $members->sendUnsubscribeNotificationToAdmins($ilUser->getId());
1636 $members->sendNotification(
1637 $members->NOTIFY_UNSUBSCRIBE,
1644 include_once
"Modules/Group/classes/class.ilGroupParticipants.php";
1646 $members->delete($ilUser->getId());
1648 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1649 $members->sendNotification(
1653 $members->sendNotification(
1664 include_once
'./Modules/Forum/classes/class.ilForumNotification.php';
1671 $ilCtrl->redirectByClass(
"ilpersonaldesktopgui",
"show");