/**
  * @param bool $delete
  * @param ilCloudFileNode $node
  * @return string $html
  */
 public function getGroupedListItemsHTML($showUpload = false, $showCreateFolders = false)
 {
     global $lng;
     include_once "./Services/UIComponent/GroupedList/classes/class.ilGroupedListGUI.php";
     $this->gl = new ilGroupedListGUI();
     $this->addItemsBefore();
     if ($showUpload) {
         include_once "Services/FileUpload/classes/class.ilFileUploadGUI.php";
         ilFileUploadGUI::initFileUpload();
         $icon_path = "./Modules/Cloud/templates/images/icon_file_s.png";
         $this->gl->addEntry(ilUtil::img($icon_path) . " " . $lng->txt("cld_add_file"), "javascript:il.CloudFileList.uploadFile();", "_top", "", "", "il_cld_add_file", $lng->txt("cld_info_add_file_to_current_directory"), "bottom center", "top center", false);
     }
     if ($showCreateFolders) {
         $icon_path = "./Modules/Cloud/templates/images/icon_folder_s.png";
         $this->gl->addEntry(ilUtil::img($icon_path) . " " . $lng->txt("cld_add_folder"), "javascript:il.CloudFileList.createFolder();", "_top", "", "", "il_cld_add_file", $lng->txt("cld_info_add_folder_to_current_directory"), "bottom center", "top center", false);
     }
     $this->addItemsAfter();
     return $this->gl->getHTML();
 }
Пример #2
0
 /**
  * Get HTML
  */
 function getHTML()
 {
     global $lng;
     include_once "./Services/UIComponent/Panel/classes/class.ilPanelGUI.php";
     $panel = ilPanelGUI::getInstance();
     $panel->setPanelStyle(ilPanelGUI::PANEL_STYLE_SECONDARY);
     $panel->setHeadingStyle(ilPanelGUI::HEADING_STYLE_BLOCK);
     $panel->setHeading($this->getHeading());
     include_once "./Services/UIComponent/GroupedList/classes/class.ilGroupedListGUI.php";
     $list = new ilGroupedListGUI();
     foreach ($this->items as $i) {
         $item_tpl = new ilTemplate("tpl.checklist_item.html", true, true, "Services/UIComponent/Checklist");
         if (!is_array($i["info"]) && $i["info"] != "") {
             $i["info"] = array($i["info"]);
         }
         if (is_array($i["info"]) && count($i["info"]) > 0) {
             foreach ($i["info"] as $info) {
                 $item_tpl->setCurrentBlock("info");
                 $item_tpl->setVariable("INFO_MSG", $info);
                 $item_tpl->parseCurrentBlock();
             }
         }
         $item_tpl->setVariable("TXT_STEP", $i["txt"]);
         switch ($i["status"]) {
             case self::STATUS_OK:
                 $item_tpl->setVariable("STATUS_IMG", ilUtil::getImagePath("icon_ok.svg"));
                 $item_tpl->setVariable("STATUS_ALT", $lng->txt("uic_checklist_ok"));
                 break;
             case self::STATUS_NOT_OK:
                 $item_tpl->setVariable("STATUS_IMG", ilUtil::getImagePath("icon_not_ok.svg"));
                 $item_tpl->setVariable("STATUS_ALT", $lng->txt("uic_checklist_not_ok"));
                 break;
         }
         $list->addEntry($item_tpl->get(), $i["href"], "", "", $i["highlighted"] ? "ilHighlighted" : "");
     }
     $ch_tpl = new ilTemplate("tpl.checklist.html", true, true, "Services/UIComponent/Checklist");
     $ch_tpl->setVariable("LIST", $list->getHTML());
     $panel->setBody($ch_tpl->get());
     return $panel->getHTML();
 }
Пример #3
0
 /**
  * Render help button
  *
  * @param
  * @return
  */
 function renderHelpButtons()
 {
     global $ilHelp, $lng, $ilCtrl, $tpl, $ilSetting, $ilUser;
     // screen id
     if (defined("OH_REF_ID") && OH_REF_ID > 0) {
         if ($ilHelp->getScreenId() != "") {
             if ($this->getMode() == self::MODE_FULL) {
                 $this->tpl->setCurrentBlock("screen_id");
                 $this->tpl->setVariable("SCREEN_ID", $ilHelp->getScreenId());
                 $this->tpl->parseCurrentBlock();
             }
         }
     }
     $help_active = false;
     include_once "./Services/UIComponent/GroupedList/classes/class.ilGroupedListGUI.php";
     $helpl = new ilGroupedListGUI();
     $helpl->setAsDropDown(true, true);
     if ($ilHelp->hasSections()) {
         $help_active = true;
         $lng->loadLanguageModule("help");
         //$this->tpl->setCurrentBlock("help_icon");
         // add javascript needed by help (to do: move to help class)
         $tpl->addJavascript("./Services/Help/js/ilHelp.js");
         include_once "./Services/Accordion/classes/class.ilAccordionGUI.php";
         $acc = new ilAccordionGUI();
         $acc->addJavascript();
         $acc->addCss();
         include_once "./Services/UIComponent/Tooltip/classes/class.ilTooltipGUI.php";
         ilTooltipGUI::addTooltip("help_tr", $lng->txt("help_open_online_help"), "", "bottom center", "top center", false);
         $helpl->addEntry("<span>&nbsp;</span> " . $lng->txt("help_topcis"), "#", "", "il.Help.listHelp(event, false);");
     }
     $module_id = (int) $ilSetting->get("help_module");
     if ((OH_REF_ID > 0 || $module_id > 0) && $ilUser->getLanguage() == "de" && $ilSetting->get("help_mode") != "1") {
         $help_active = true;
         $lng->loadLanguageModule("help");
         $tpl->addJavascript("./Services/Help/js/ilHelp.js");
         include_once "./Services/UIComponent/Tooltip/classes/class.ilTooltipGUI.php";
         ilTooltipGUI::addTooltip("help_tt", $lng->txt("help_toggle_tooltips"), "", "bottom center", "top center", false);
         $helpl->addEntry('<span id="help_tt_switch_on" class="glyphicon glyphicon-ok"></span> ' . $lng->txt("help_tooltips"), "#", "", "return il.Help.switchTooltips(event);");
     }
     if ($help_active) {
         $this->tpl->setCurrentBlock("help");
         $this->tpl->setVariable("TXT_HELP", $lng->txt("help"));
         $this->tpl->setVariable("HELP_SELECT", $helpl->getHTML());
         $this->tpl->parseCurrentBlock();
         // always set ajax url
         $ts = $ilCtrl->getTargetScript();
         $ilCtrl->setTargetScript("ilias.php");
         $ilHelp->setCtrlPar();
         $tpl->addOnLoadCode("il.Help.setAjaxUrl('" . $ilCtrl->getLinkTargetByClass("ilhelpgui", "", "", true) . "');");
         $ilCtrl->setTargetScript($ts);
     }
 }
 /**
  * Render main menu entry
  *
  * @param
  * @return
  */
 function renderEntry($a_tpl, $a_id, $a_txt, $a_script, $a_target = "_top")
 {
     global $lng, $ilNavigationHistory, $ilSetting, $rbacsystem, $ilCtrl;
     $id = strtolower($a_id);
     $id_up = strtoupper($a_id);
     $a_tpl->setCurrentBlock("entry_" . $id);
     include_once "./Services/UIComponent/GroupedList/classes/class.ilGroupedListGUI.php";
     // repository
     if ($a_id == "repository") {
         $gl = new ilGroupedListGUI();
         include_once "./Services/Link/classes/class.ilLink.php";
         $a_tpl->setVariable("ARROW_IMG", ilUtil::getImagePath("mm_down_arrow.png"));
         $icon = ilUtil::img(ilObject::_getIcon(ilObject::_lookupObjId(1), "tiny"));
         $gl->addEntry($icon . " " . $a_txt . " - " . $lng->txt("rep_main_page"), ilLink::_getStaticLink(1, 'root', true), "_top");
         $items = $ilNavigationHistory->getItems();
         reset($items);
         $cnt = 0;
         $first = true;
         foreach ($items as $k => $item) {
             if ($cnt >= 10) {
                 break;
             }
             if (!isset($item["ref_id"]) || !isset($_GET["ref_id"]) || ($item["ref_id"] != $_GET["ref_id"] || !$first)) {
                 if ($cnt == 0) {
                     $gl->addGroupHeader($lng->txt("last_visited"), "ilLVNavEnt");
                 }
                 $obj_id = ilObject::_lookupObjId($item["ref_id"]);
                 $cnt++;
                 $icon = ilUtil::img(ilObject::_getIcon($obj_id, "tiny"));
                 $ititle = ilUtil::shortenText(strip_tags($item["title"]), 50, true);
                 // #11023
                 $gl->addEntry($icon . " " . $ititle, $item["link"], "_top", "", "ilLVNavEnt");
             }
             $first = false;
         }
         if ($cnt > 0) {
             $gl->addEntry("» " . $lng->txt("remove_entries"), "#", "", "return il.MainMenu.removeLastVisitedItems('" . $ilCtrl->getLinkTargetByClass("ilnavigationhistorygui", "removeEntries", "", true) . "');", "ilLVNavEnt");
         }
         $a_tpl->setVariable("REP_EN_OV", $gl->getHTML());
     }
     // desktop
     if ($a_id == "desktop") {
         $gl = new ilGroupedListGUI();
         $a_tpl->setVariable("ARROW_IMG", ilUtil::getImagePath("mm_down_arrow.png"));
         // overview
         $gl->addEntry($lng->txt("overview"), "ilias.php?baseClass=ilPersonalDesktopGUI&amp;cmd=jumpToSelectedItems", "_top", "", "", "mm_pd_sel_items", ilHelp::getMainMenuTooltip("mm_pd_sel_items"), "left center", "right center", false);
         // my groups and courses, if both is available
         if ($ilSetting->get('disable_my_offers') == 0 && $ilSetting->get('disable_my_memberships') == 0) {
             $gl->addEntry($lng->txt("my_courses_groups"), "ilias.php?baseClass=ilPersonalDesktopGUI&amp;cmd=jumpToMemberships", "_top", "", "", "mm_pd_crs_grp", ilHelp::getMainMenuTooltip("mm_pd_crs_grp"), "left center", "right center", false);
         }
         // bookmarks
         if (!$this->ilias->getSetting("disable_bookmarks")) {
             $gl->addEntry($lng->txt("bookmarks"), "ilias.php?baseClass=ilPersonalDesktopGUI&amp;cmd=jumpToBookmarks", "_top", "", "", "mm_pd_bookm", ilHelp::getMainMenuTooltip("mm_pd_bookm"), "left center", "right center", false);
         }
         // private notes
         if (!$this->ilias->getSetting("disable_notes")) {
             $gl->addEntry($lng->txt("notes_and_comments"), "ilias.php?baseClass=ilPersonalDesktopGUI&amp;cmd=jumpToNotes", "_top", "", "", "mm_pd_notes", ilHelp::getMainMenuTooltip("mm_pd_notes"), "left center", "right center", false);
         }
         // news
         if ($ilSetting->get("block_activated_news")) {
             $gl->addEntry($lng->txt("news"), "ilias.php?baseClass=ilPersonalDesktopGUI&amp;cmd=jumpToNews", "_top", "", "", "mm_pd_news", ilHelp::getMainMenuTooltip("mm_pd_news"), "left center", "right center", false);
         }
         // overview is always active
         $gl->addSeparator();
         $separator = false;
         if (!$ilSetting->get("disable_personal_workspace")) {
             // workspace
             $gl->addEntry($lng->txt("personal_workspace"), "ilias.php?baseClass=ilPersonalDesktopGUI&amp;cmd=jumpToWorkspace", "_top", "", "", "mm_pd_wsp", ilHelp::getMainMenuTooltip("mm_pd_wsp"), "left center", "right center", false);
             $separator = true;
         }
         // portfolio
         if ($ilSetting->get('user_portfolios')) {
             $gl->addEntry($lng->txt("portfolio"), "ilias.php?baseClass=ilPersonalDesktopGUI&amp;cmd=jumpToPortfolio", "_top", "", "", "mm_pd_port", ilHelp::getMainMenuTooltip("mm_pd_port"), "left center", "right center", false);
             $separator = true;
         }
         // skills
         $skmg_set = new ilSetting("skmg");
         if ($skmg_set->get("enable_skmg")) {
             $gl->addEntry($lng->txt("skills"), "ilias.php?baseClass=ilPersonalDesktopGUI&amp;cmd=jumpToSkills", "_top", "", "", "mm_pd_skill", ilHelp::getMainMenuTooltip("mm_pd_skill"), "left center", "right center", false);
             $separator = true;
         }
         // Learning Progress
         include_once "Services/Tracking/classes/class.ilObjUserTracking.php";
         if (ilObjUserTracking::_enabledLearningProgress() && (ilObjUserTracking::_hasLearningProgressOtherUsers() || ilObjUserTracking::_hasLearningProgressLearner())) {
             //$ilTabs->addTarget("learning_progress", $this->ctrl->getLinkTargetByClass("ilLearningProgressGUI"));
             $gl->addEntry($lng->txt("learning_progress"), "ilias.php?baseClass=ilPersonalDesktopGUI&amp;cmd=jumpToLP", "_top", "", "", "mm_pd_lp", ilHelp::getMainMenuTooltip("mm_pd_lp"), "left center", "right center", false);
             $separator = true;
         }
         if ($separator) {
             $gl->addSeparator();
         }
         $separator = false;
         // calendar
         include_once './Services/Calendar/classes/class.ilCalendarSettings.php';
         $settings = ilCalendarSettings::_getInstance();
         if ($settings->isEnabled()) {
             $gl->addEntry($lng->txt("calendar"), "ilias.php?baseClass=ilPersonalDesktopGUI&amp;cmd=jumpToCalendar", "_top", "", "", "mm_pd_cal", ilHelp::getMainMenuTooltip("mm_pd_cal"), "left center", "right center", false);
             $separator = true;
         }
         // mail
         if ($this->mail) {
             $gl->addEntry($lng->txt('mail'), 'ilias.php?baseClass=ilMailGUI', '_top', "", "", "mm_pd_mail", ilHelp::getMainMenuTooltip("mm_pd_mail"), "left center", "right center", false);
             $separator = true;
         }
         // contacts
         if (!$this->ilias->getSetting('disable_contacts') && ($this->ilias->getSetting('disable_contacts_require_mail') || $rbacsystem->checkAccess('internal_mail', ilMailGlobalServices::getMailObjectRefId()))) {
             $gl->addEntry($lng->txt('mail_addressbook'), 'ilias.php?baseClass=ilPersonalDesktopGUI&amp;cmd=jumpToContacts', '_top', "", "", "mm_pd_contacts", ilHelp::getMainMenuTooltip("mm_pd_contacts"), "left center", "right center", false);
             $separator = true;
         }
         if ($separator) {
             $gl->addSeparator();
         }
         // profile
         $gl->addEntry($lng->txt("personal_profile"), "ilias.php?baseClass=ilPersonalDesktopGUI&amp;cmd=jumpToProfile", "_top", "", "", "mm_pd_profile", ilHelp::getMainMenuTooltip("mm_pd_profile"), "left center", "right center", false);
         // settings
         $gl->addEntry($lng->txt("personal_settings"), "ilias.php?baseClass=ilPersonalDesktopGUI&amp;cmd=jumpToSettings", "_top", "", "", "mm_pd_sett", ilHelp::getMainMenuTooltip("mm_pd_sett"), "left center", "right center", false);
         $a_tpl->setVariable("DESK_CONT_OV", $gl->getHTML());
     }
     if (IS_PAYMENT_ENABLED) {
         // shop
         if ($a_id == "shop") {
             $gl = new ilGroupedListGUI();
             $a_tpl->setVariable("ARROW_IMG", ilUtil::getImagePath("mm_down_arrow.png"));
             // shop_content
             $gl->addEntry($lng->txt("content"), "ilias.php?baseClass=ilShopController&amp;cmd=firstpage", "_top");
             // shoppingcart
             include_once 'Services/Payment/classes/class.ilPaymentShoppingCart.php';
             global $ilUser;
             $objShoppingCart = new ilPaymentShoppingCart($ilUser);
             $items = $objShoppingCart->getEntries();
             if (count($items) > 0) {
                 $gl->addEntry($lng->txt("shoppingcart") . ' (' . count($items) . ')', "ilias.php?baseClass=ilShopController&amp;cmdClass=ilshopshoppingcartgui", "_top");
             }
             $a_tpl->setVariable("SHOP_CONT_OV", $gl->getHTML());
         }
     }
     $a_tpl->setVariable("TXT_" . $id_up, $a_txt);
     $a_tpl->setVariable("SCRIPT_" . $id_up, $a_script);
     $a_tpl->setVariable("TARGET_" . $id_up, $a_target);
     if ($this->active == $a_id || $this->active == "" && $a_id == "repository") {
         $a_tpl->setVariable("MM_CLASS", "MMActive");
         $a_tpl->setVariable("SEL", '<span class="ilAccHidden">(' . $lng->txt("stat_selected") . ')</span>');
     } else {
         $a_tpl->setVariable("MM_CLASS", "MMInactive");
     }
     if ($a_id == "repository") {
         include_once "./Services/Accessibility/classes/class.ilAccessKey.php";
         if (ilAccessKey::getKey(ilAccessKey::LAST_VISITED) != "") {
             $a_tpl->setVariable("ACC_KEY_REPOSITORY", 'accesskey="' . ilAccessKey::getKey(ilAccessKey::LAST_VISITED) . '"');
         }
     }
     if ($a_id == "desktop") {
         include_once "./Services/Accessibility/classes/class.ilAccessKey.php";
         if (ilAccessKey::getKey(ilAccessKey::PERSONAL_DESKTOP) != "") {
             $a_tpl->setVariable("ACC_KEY_DESKTOP", 'accesskey="' . ilAccessKey::getKey(ilAccessKey::PERSONAL_DESKTOP) . '"');
         }
     }
     $a_tpl->parseCurrentBlock();
 }
 /**
  * Get drop down
  */
 function getDropDown()
 {
     global $tree, $rbacsystem, $lng, $ilSetting, $objDefinition;
     $tpl = new ilTemplate("tpl.admin_drop_down.html", true, true, "Services/Administration");
     $objects = $tree->getChilds(SYSTEM_FOLDER_ID);
     foreach ($objects as $object) {
         $new_objects[$object["title"] . ":" . $object["child"]] = $object;
         //have to set it manually as translation type of main node cannot be "sys" as this type is a orgu itself.
         if ($object["type"] == "orgu") {
             $new_objects[$object["title"] . ":" . $object["child"]]["title"] = $lng->txt("obj_orgu");
         }
     }
     // add entry for switching to repository admin
     // note: please see showChilds methods which prevents infinite look
     $new_objects[$lng->txt("repository_admin") . ":" . ROOT_FOLDER_ID] = array("tree" => 1, "child" => ROOT_FOLDER_ID, "ref_id" => ROOT_FOLDER_ID, "depth" => 3, "type" => "root", "title" => $lng->txt("repository_admin"), "description" => $lng->txt("repository_admin_desc"), "desc" => $lng->txt("repository_admin_desc"));
     //$nd = $tree->getNodeData(SYSTEM_FOLDER_ID);
     //var_dump($nd);
     $new_objects[$lng->txt("general_settings") . ":" . SYSTEM_FOLDER_ID] = array("tree" => 1, "child" => SYSTEM_FOLDER_ID, "ref_id" => SYSTEM_FOLDER_ID, "depth" => 2, "type" => "adm", "title" => $lng->txt("general_settings"));
     ksort($new_objects);
     // determine items to show
     $items = array();
     foreach ($new_objects as $c) {
         // check visibility
         if ($tree->getParentId($c["ref_id"]) == ROOT_FOLDER_ID && $c["type"] != "adm" && $_GET["admin_mode"] != "repository") {
             continue;
         }
         // these objects may exist due to test cases that didnt clear
         // data properly
         if ($c["type"] == "" || $c["type"] == "objf" || $c["type"] == "xxx") {
             continue;
         }
         $accessible = $rbacsystem->checkAccess('visible,read', $c["ref_id"]);
         if (!$accessible) {
             continue;
         }
         if ($c["ref_id"] == ROOT_FOLDER_ID && !$rbacsystem->checkAccess('write', $c["ref_id"])) {
             continue;
         }
         if ($c["type"] == "rolf" && $c["ref_id"] != ROLE_FOLDER_ID) {
             continue;
         }
         $items[] = $c;
     }
     $cnt = 0;
     $titems = array();
     foreach ($items as $i) {
         $titems[$i["type"]] = $i;
     }
     // admin menu layout
     $layout = array(1 => array("basic" => array("adm", "stys", "adve", "lngf", "cmps", "accs", "hlps", "trac"), "users" => array("usrf", 'tos', "rolf", "auth", "ps", "orgu")), 2 => array("services" => array("pdts", "nwss", "tags", "prfa", "skmg", "cals", "mail", "---", "seas", "mds", "cert", 'ecss', "pays", "extt")), 3 => array("objects" => array("reps", "---", "blga", "chta", "crss", "facs", "frma", "grps", "lrss", "mcts", "mobs", "svyf", "assf", "wbrs", "wiks", "---", 'otpl', 'sysc', "root", "recf")));
     // now get all items and groups that are accessible
     $groups = array();
     for ($i = 1; $i <= 3; $i++) {
         $groups[$i] = array();
         foreach ($layout[$i] as $group => $entries) {
             $groups[$i][$group] = array();
             $entries_since_last_sep = false;
             foreach ($entries as $e) {
                 if ($e == "---" || $titems[$e]["type"] != "") {
                     if ($e == "---" && $entries_since_last_sep) {
                         $groups[$i][$group][] = $e;
                         $entries_since_last_sep = false;
                     } else {
                         if ($e != "---") {
                             $groups[$i][$group][] = $e;
                             $entries_since_last_sep = true;
                         }
                     }
                 }
             }
         }
     }
     include_once "./Services/UIComponent/GroupedList/classes/class.ilGroupedListGUI.php";
     $gl = new ilGroupedListGUI();
     for ($i = 1; $i <= 3; $i++) {
         if ($i > 1) {
             $gl->nextColumn();
         }
         foreach ($groups[$i] as $group => $entries) {
             if (count($entries) > 0) {
                 $gl->addGroupHeader($lng->txt("adm_" . $group));
                 foreach ($entries as $e) {
                     if ($e == "---") {
                         $gl->addSeparator();
                     } else {
                         $path = ilUtil::getImagePath("icon_" . $titems[$e]["type"] . "_s.png");
                         $icon = $path != "" ? ilUtil::img($path) . " " : "";
                         if ($_GET["admin_mode"] == "settings" && $titems[$e]["ref_id"] == ROOT_FOLDER_ID) {
                             $gl->addEntry($icon . $titems[$e]["title"], "ilias.php?baseClass=ilAdministrationGUI&amp;ref_id=" . $titems[$e]["ref_id"] . "&amp;admin_mode=repository", "_top", "", "", "mm_adm_rep", ilHelp::getMainMenuTooltip("mm_adm_rep"), "bottom center", "top center", false);
                         } else {
                             $gl->addEntry($icon . $titems[$e]["title"], "ilias.php?baseClass=ilAdministrationGUI&amp;ref_id=" . $titems[$e]["ref_id"] . "&amp;cmd=jump", "_top", "", "", "mm_adm_" . $titems[$e]["type"], ilHelp::getMainMenuTooltip("mm_adm_" . $titems[$e]["type"]), "bottom center", "top center", false);
                         }
                     }
                 }
             }
         }
     }
     //$gl->addSeparator();
     echo $gl->getHTML();
     exit;
 }
 /**
  * Get rendered html of sub object list
  * 
  * @return string
  */
 protected function getHTML()
 {
     global $ilCtrl;
     if ($this->mode != ilObjectDefinition::MODE_WORKSPACE && !isset($this->url_creation)) {
         $base_url = "ilias.php?baseClass=ilRepositoryGUI&ref_id=" . $this->parent_ref_id . "&cmd=create";
     } else {
         $base_url = $this->url_creation;
     }
     $base_url = $ilCtrl->appendRequestTokenParameterString($base_url);
     if ($this->url_creation_callback) {
         $base_url .= "&crtcb=" . $this->url_creation_callback;
     }
     include_once "./Services/UIComponent/GroupedList/classes/class.ilGroupedListGUI.php";
     $gl = new ilGroupedListGUI();
     $gl->setAsDropDown(true, true);
     foreach ($this->sub_objects as $item) {
         switch ($item["type"]) {
             case "column_separator":
                 $gl->nextColumn();
                 break;
                 /*
                 case "separator":
                 	$gl->addSeparator();
                 	break;
                 */
             /*
             case "separator":
             	$gl->addSeparator();
             	break;
             */
             case "group":
                 $gl->addGroupHeader($item["title"]);
                 break;
             case "object":
                 $type = $item["value"];
                 $path = ilObject::_getIcon('', 'tiny', $type);
                 $icon = $path != "" ? ilUtil::img($path) . " " : "";
                 $url = $base_url . "&new_type=" . $type;
                 $ttip = ilHelp::getObjCreationTooltipText($type);
                 $gl->addEntry($icon . $item["title"], $url, "_top", "", "", $type, $ttip, "bottom center", "top center", false);
                 break;
         }
     }
     $this->gl = $gl;
     return $gl->getHTML();
 }
 /**
  * Show online help
  */
 function showHelp()
 {
     global $ilHelp, $lng, $ilSetting;
     if ($_GET["help_screen_id"] != "") {
         ilSession::set("help_screen_id", $_GET["help_screen_id"]);
         $help_screen_id = $_GET["help_screen_id"];
     } else {
         $help_screen_id = ilSession::get("help_screen_id");
     }
     $this->resetCurrentPage();
     $id_arr = explode(".", $help_screen_id);
     include_once "./Services/Help/classes/class.ilHelpMapping.php";
     $help_arr = ilHelpMapping::getHelpSectionsForId($id_arr[0], $id_arr[1]);
     $hm = (int) $ilSetting->get("help_module");
     if ((OH_REF_ID > 0 || $hm > 0) && count($help_arr) > 0) {
         if (OH_REF_ID > 0) {
             $oh_lm_id = ilObject::_lookupObjId(OH_REF_ID);
         } else {
             include_once "./Services/Help/classes/class.ilObjHelpSettings.php";
             $oh_lm_id = ilObjHelpSettings::lookupModuleLmId($hm);
         }
         include_once "./Services/Accordion/classes/class.ilAccordionGUI.php";
         $acc = new ilAccordionGUI();
         $acc->setId("oh_acc");
         $acc->setBehaviour(ilAccordionGUI::FIRST_OPEN);
         foreach ($help_arr as $h_id) {
             include_once "./Modules/LearningModule/classes/class.ilLMObject.php";
             $st_id = $h_id;
             if (!ilLMObject::_exists($st_id)) {
                 continue;
             }
             $pages = ilLMObject::getPagesOfChapter($oh_lm_id, $st_id);
             include_once "./Services/UIComponent/GroupedList/classes/class.ilGroupedListGUI.php";
             $grp_list = new ilGroupedListGUI();
             foreach ($pages as $pg) {
                 $grp_list->addEntry(ilLMObject::_lookupTitle($pg["child"]), "#", "", "return il.Help.showPage(" . $pg["child"] . ");");
             }
             $acc->addItem(ilLMObject::_lookupTitle($st_id), $grp_list->getHTML());
         }
         $h_tpl = new ilTemplate("tpl.help.html", true, true, "Services/Help");
         $h_tpl->setVariable("HEAD", $lng->txt("help"));
         $h_tpl->setVariable("CONTENT", $acc->getHTML());
         $h_tpl->setVariable("CLOSE_IMG", ilUtil::img(ilUtil::getImagePath("icon_close2_s.png")));
         echo $h_tpl->get();
     }
     exit;
 }