/** * Fill table row */ protected function fillRow($a_set) { global $lng; $this->tpl->setVariable("VAL_TITLE", $a_set["title"]); $this->tpl->setVariable("PAGE_ID", $a_set["obj_id"]); $exp_id = ilLMPageObject::getExportId($this->parent_obj->object->getId(), $a_set["obj_id"], $a_set["type"]); if ($this->validation) { if (!preg_match("/^[a-zA-Z_]*\$/", trim($_POST["exportid"][$a_set["obj_id"]]))) { // @todo: move to style $this->tpl->setVariable("STYLE", " style='background-color: #FCEAEA;' "); $this->tpl->setVariable("ALERT_IMG", ilUtil::img(ilUtil::getImagePath("icon_alert.svg"), $lng->txt("alert"))); } $this->tpl->setVariable("EXPORT_ID", ilUtil::prepareFormOutput(ilUtil::stripSlashes($_POST["exportid"][$a_set["obj_id"]]))); } else { $this->tpl->setVariable("EXPORT_ID", ilUtil::prepareFormOutput($exp_id)); } if ($this->cnt_exp_ids[$exp_id] > 1) { $this->tpl->setVariable("ITEM_ADD_TXT", $lng->txt("cont_exp_id_used_multiple")); $this->tpl->setVariable("ALERT_IMG", ilUtil::img(ilUtil::getImagePath("icon_alert.svg"), $lng->txt("alert"))); if (!$this->dup_info_given) { ilUtil::sendInfo($lng->txt("content_some_export_ids_multiple_times")); $this->dup_info_given = true; } } }
/** * Fill table row */ protected function fillRow($a_set) { global $lng, $ilCtrl, $ilUser; include_once "./Services/Skill/classes/class.ilPersonalSkill.php"; $mat = ilPersonalSkill::getAssignedMaterial($ilUser->getId(), $this->tref_id, $a_set["id"]); $ilCtrl->setParameter($this->parent_obj, "level_id", $a_set["id"]); foreach ($mat as $m) { $this->tpl->setCurrentBlock("mat"); $obj_id = $this->ws_tree->lookupObjectId($m["wsp_id"]); $this->tpl->setVariable("MAT_TITLE", ilObject::_lookupTitle($obj_id)); $this->tpl->setVariable("MAT_IMG", ilUtil::img(ilUtil::getImagePath("icon_" . ilObject::_lookupType($obj_id) . ".svg"))); $this->tpl->setVariable("TXT_REMOVE", $lng->txt("remove")); $ilCtrl->setParameter($this->parent_obj, "wsp_id", $m["wsp_id"]); $this->tpl->setVariable("HREF_REMOVE", $ilCtrl->getLinkTarget($this->parent_obj, "removeMaterial")); $obj_id = $this->ws_tree->lookupObjectId($m["wsp_id"]); $url = $this->ws_access->getGotoLink($m["wsp_id"], $obj_id); $this->tpl->setVariable("HREF_MAT", $url); $this->tpl->parseCurrentBlock(); } $this->tpl->setCurrentBlock("cmd"); $this->tpl->setVariable("HREF_CMD", $ilCtrl->getLinkTarget($this->parent_obj, "assignMaterial")); $this->tpl->setVariable("TXT_CMD", $lng->txt("skmg_assign_materials")); $this->tpl->parseCurrentBlock(); $ilCtrl->setParameter($this->parent_obj, "level_id", ""); $this->tpl->setVariable("LEVEL_ID", $a_set["id"]); $this->tpl->setVariable("SKILL_ID", $this->basic_skill_id); $this->tpl->setVariable("TXT_SKILL", $a_set["title"]); $this->tpl->setVariable("TXT_SKILL_DESC", $a_set["description"]); }
protected function parseData() { $this->determineOffsetAndOrder(); $this->determineLimit(); $xdglRequestList = ilUserSetting::getCollection(); $xdglRequestList->orderBy($this->getOrderField(), $this->getOrderDirection()); $xdglRequestList->innerjoin('object_data', 'global_role', 'obj_id', array('title')); foreach ($this->filter as $field => $value) { if ($value) { $xdglRequestList->where(array($field => $value)); } } $this->setMaxCount($xdglRequestList->count()); if (!$xdglRequestList->hasSets()) { // ilUtil::sendInfo('Keine Ergebnisse für diesen Filter'); } $xdglRequestList->limit($this->getOffset(), $this->getOffset() + $this->getLimit()); $xdglRequestList->orderBy('title'); $a_data = $xdglRequestList->getArray(); if (ilUserDefaultsPlugin::is50()) { $img_on = ilUtil::img(ilUtil::getImagePath('icon_ok.svg')); $img_off = ilUtil::img(ilUtil::getImagePath('icon_not_ok.svg')); } else { $img_on = ilUtil::img(ilUtil::getImagePath('icon_led_on_s.png')); $img_off = ilUtil::img(ilUtil::getImagePath('icon_led_off_s.png')); } foreach ($a_data as $k => $d) { $a_data[$k]['status_image'] = $d['status'] == ilUserSetting::STATUS_ACTIVE ? $img_on : $img_off; } $this->setData($a_data); }
/** * Fill table row */ protected function fillRow($a_set) { global $lng; //var_dump($a_set); $this->tpl->setVariable("ICON", ilUtil::img(ilObject::_getIcon($a_set["obj_id"], "tiny"), $a_set["type_txt"])); $this->tpl->setVariable("TITLE", $a_set["title"]); $this->tpl->setVariable("CMD", $a_set["cmd"]); }
public function getHTML() { global $ilCtrl, $tpl, $lng, $ilUser; if (!$this->isContainer) { #return ''; } if ($_GET['baseClass'] == 'ilSearchController') { // return ''; } include_once "Services/jQuery/classes/class.iljQueryUtil.php"; iljQueryUtil::initjQuery(); iljQueryUtil::initjQueryUI(); $this->tpl = new ilTemplate('tpl.main_menu_search.html', true, true, 'Services/Search'); if ($ilUser->getId() != ANONYMOUS_USER_ID) { if (ilSearchSettings::getInstance()->isLuceneUserSearchEnabled() or (int) $_GET['ref_id']) { $this->tpl->setCurrentBlock("position"); $this->tpl->setVariable('TXT_GLOBALLY', $lng->txt("search_globally")); $this->tpl->setVariable('ROOT_ID', ROOT_FOLDER_ID); $this->tpl->parseCurrentBlock(); } else { $this->tpl->setCurrentBlock("position_hid"); $this->tpl->setVariable('ROOT_ID_HID', ROOT_FOLDER_ID); $this->tpl->parseCurrentBlock(); } if ((int) $_GET['ref_id']) { $this->tpl->setCurrentBlock('position_rep'); $this->tpl->setVariable('TXT_CURRENT_POSITION', $lng->txt("search_at_current_position")); $this->tpl->setVariable('REF_ID', (int) $_GET["ref_id"]); $this->tpl->parseCurrentBlock(); } } if ($ilUser->getId() != ANONYMOUS_USER_ID && ilSearchSettings::getInstance()->isLuceneUserSearchEnabled()) { $this->tpl->setCurrentBlock('usr_search'); $this->tpl->setVariable('TXT_USR_SEARCH', $this->lng->txt('search_users')); $this->tpl->parseCurrentBlock(); } $this->tpl->setVariable('FORMACTION', 'ilias.php?baseClass=ilSearchController&cmd=post' . '&rtoken=' . $ilCtrl->getRequestToken() . '&fallbackCmd=remoteSearch'); $this->tpl->setVariable('BTN_SEARCH', $this->lng->txt('search')); // $this->tpl->setVariable('ID_AUTOCOMPLETE', "mm_sr_auto"); $this->tpl->setVariable('AC_DATASOURCE', "ilias.php?baseClass=ilSearchController&cmd=autoComplete"); $this->tpl->setVariable('IMG_MM_SEARCH', ilUtil::img(ilUtil::getImagePath("icon_seas.svg"), $lng->txt("search"))); if ($ilUser->getId() != ANONYMOUS_USER_ID) { $this->tpl->setVariable('HREF_SEARCH_LINK', "ilias.php?baseClass=ilSearchController"); $this->tpl->setVariable('TXT_SEARCH_LINK', $lng->txt("last_search_result")); } // #10555 - we need the overlay for the autocomplete which is always active $this->tpl->setVariable('TXT_SEARCH', $lng->txt("search")); include_once "./Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php"; $ov = new ilOverlayGUI("mm_search_menu"); //$ov->setTrigger("main_menu_search", "none", // "main_menu_search", "tr", "br"); //$ov->setAnchor("main_menu_search", "tr", "br"); $ov->setAutoHide(false); $ov->add(); return $this->tpl->get(); }
/** * fill row * * @access public * @param $a_set */ public function fillRow($a_set) { global $ilCtrl; $ilObjEntry = new ilBibliographicEntry($this->parent_obj->object->getFiletype(), $a_set['entry_id']); $this->tpl->setVariable("SINGLE_ENTRY", $ilObjEntry->getOverwiew()); //Detail-Link $ilCtrl->setParameterByClass("ilObjBibliographicGUI", "entryId", $a_set['entry_id']); $this->tpl->setVariable("DETAIL_LINK", $ilCtrl->getLinkTargetByClass("ilObjBibliographicGUI", "showDetails")); $this->tpl->setVariable("VIEW_IMAGE_SRC", ilUtil::img(ilUtil::getImagePath("cmd_view_s.png"))); }
/** * Fill table row */ protected function fillRow($a_set) { global $lng, $objDefinition; $img = ilObject::_getIcon($obj_id, "small", $a_set["type"]); if (is_file($img)) { $alt = $objDefinition->isPlugin($a_set["type"]) ? $lng->txt("icon") . " " . ilPlugin::lookupTxt("rep_robj", $a_set["type"], "obj_" . $a_set["type"]) : $lng->txt("icon") . " " . $lng->txt("obj_" . $a_set["type"]); $this->tpl->setVariable("IMG_TYPE", ilUtil::img($img, $alt)); } $this->tpl->setVariable("ID", $a_set["ref_id"]); $this->tpl->setVariable("VAL_TITLE", $a_set["title"]); $this->tpl->setVariable("VAL_LAST_CHANGE", $a_set["last_update"]); }
/** * Fill table row */ protected function fillRow($a_set) { global $lng; $this->tpl->setVariable("FILENAME", $a_set["filename"]); $piname = pathinfo($a_set["filename"]); $th_path = ilObjMediaObject::getThumbnailPath($this->mob->getId(), basename($a_set["filename"], "." . $piname['extension']) . ".png"); if (!is_file($th_path)) { $this->mob->makeThumbnail("overlays/" . $a_set["filename"], basename($a_set["filename"], "." . $piname['extension']) . ".png"); } if (is_file($th_path)) { $this->tpl->setVariable("THUMB", ilUtil::img($th_path)); } }
/** * Fill table row */ protected function fillRow($a_set) { global $lng; $this->tpl->setVariable("ITEM_REF_ID", $a_set["child"]); $this->tpl->setVariable("TITLE", $a_set["title"]); $this->tpl->setVariable("IMG", ilUtil::img(ilObject::_getIcon($a_set["obj_id"], "tiny"))); if (in_array($a_set["child"], $this->items)) { $this->tpl->setVariable("IMG_ASSIGNED", ilUtil::img(ilUtil::getImagePath("icon_ok.png"))); $this->tpl->setVariable("CHECKED", "checked='checked'"); } else { $this->tpl->setVariable("IMG_ASSIGNED", ilUtil::img(ilUtil::getImagePath("icon_not_ok.png"))); } }
/** * Fill table row */ protected function fillRow($a_set) { global $lng, $ilCtrl; //var_dump($a_set); // icon... // check activation include_once "./Modules/LearningModule/classes/class.ilLMPage.php"; $active = ilLMPage::_lookupActive($a_set["obj_id"], $this->lm->getType(), $this->lm_set->get("time_scheduled_page_activation")); // is page scheduled? $img_sc = $this->lm_set->get("time_scheduled_page_activation") && ilLMPage::_isScheduledActivation($a_set["obj_id"], $this->lm->getType()) ? "_sc" : ""; if (!$active) { $img = "icon_pg_d" . $img_sc . ".svg"; $alt = $lng->txt("cont_page_deactivated"); } else { if (ilLMPage::_lookupContainsDeactivatedElements($a_set["obj_id"], $this->lm->getType())) { $img = "icon_pg_del" . $img_sc . ".svg"; $alt = $lng->txt("cont_page_deactivated_elements"); } else { $img = "icon_pg" . $img_sc . ".svg"; $alt = $this->lng->txt("pg"); } } $this->tpl->setVariable("ICON", ilUtil::img(ilUtil::getImagePath($img), $alt)); // title/link $ilCtrl->setParameter($this, "backcmd", ""); $ilCtrl->setParameterByClass("ilLMPageObjectGUI", "obj_id", $a_set["obj_id"]); $this->tpl->setVariable("HREF_TITLE", $ilCtrl->getLinkTargetByClass("ilLMPageObjectGUI", "edit")); $this->tpl->setVariable("TITLE", $a_set["title"]); $this->tpl->setVariable("ID", $a_set["obj_id"]); // context if ($this->lm->lm_tree->isInTree($a_set["obj_id"])) { $path_str = $this->parent_obj->getContextPath($a_set["obj_id"]); } else { $path_str = "---"; } // check whether page is header or footer $add_str = ""; if ($a_set["obj_id"] == $this->lm->getHeaderPage()) { $add_str = " <b>(" . $lng->txt("cont_header") . ")</b>"; } if ($a_set["obj_id"] == $this->lm->getFooterPage()) { $add_str .= " <b>(" . $lng->txt("cont_footer") . ")</b>"; } $this->tpl->setVariable("USAGE", $path_str . $add_str); // layout if ($this->lm->getLayoutPerPage()) { if (($l = ilLMObject::lookupLayout($a_set["obj_id"])) != "") { $this->tpl->setVariable("LAYOUT", $lng->txt("cont_layout_" . $l)); } } }
/** * Fill table row */ protected function fillRow($a_set) { global $lng, $tree; $ref_id = $a_set["rep_ref_id"]; $obj_id = ilObject::_lookupObjId($ref_id); $this->tpl->setVariable("TITLE", ilObject::_lookupTitle($obj_id)); $this->tpl->setVariable("IMG", ilUtil::img(ilObject::_getIcon($obj_id, "tiny"))); $this->tpl->setVariable("ID", $ref_id); $path = $tree->getPathFull($ref_id); $path_items = array(); foreach ($path as $p) { if ($p["type"] != "root" && $p["child"] != $ref_id) { $path_items[] = $p["title"]; } } $this->tpl->setVariable("PATH", implode($path_items, " > ")); }
/** * @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(); }
/** * fill row * * @access public * @param * @return */ public function fillRow($data) { if (strlen($data['description'])) { $this->tpl->setCurrentBlock('description'); $this->tpl->setVariable("DESCRIPTION", ilUtil::prepareFormOutput($data['description'])); $this->tpl->parseCurrentBlock(); } if ($this->show_postponed) { if ($data['postponed']) { $this->tpl->setCurrentBlock('postponed'); $this->tpl->setVariable('POSTPONED', $this->lng->txt('postponed')); $this->tpl->parseCurrentBlock(); } else { $this->tpl->setCurrentBlock('postponed'); $this->tpl->touchBlock('postponed'); $this->tpl->parseCurrentBlock(); } } if ($this->show_marker) { if ($data['marked']) { $this->tpl->setCurrentBlock('marked_img'); $this->tpl->setVariable("HREF_MARKED", ilUtil::img('./templates/default/images/marked.svg', $this->lng->txt("tst_question_marked"), '24px', '24px')); $this->tpl->parseCurrentBlock(); $this->tpl->setCurrentBlock('marker'); $this->tpl->parseCurrentBlock(); } else { $this->tpl->setCurrentBlock('marker'); $this->tpl->touchBlock('marker'); $this->tpl->parseCurrentBlock(); } } // obligatory icon if ($data["obligatory"]) { $OBLIGATORY = "<img src=\"" . ilUtil::getImagePath("obligatory.gif", "Modules/Test") . "\" alt=\"" . $this->lng->txt("question_obligatory") . "\" title=\"" . $this->lng->txt("question_obligatory") . "\" />"; } else { $OBLIGATORY = ''; } $this->tpl->setVariable("QUESTION_OBLIGATORY", $OBLIGATORY); $this->tpl->setVariable("ORDER", $data['order']); $this->tpl->setVariable("TITLE", ilUtil::prepareFormOutput($data['title'])); $this->tpl->setVariable("HREF", $data['href']); }
/** * @param bool $show_upload * @param bool $show_create_folders * * @return ilCloudGroupedListGUI */ public function getGroupedListItems($show_upload = false, $show_create_folders = false) { global $lng; $this->gl = new ilCloudGroupedListGUI(); $this->addItemsBefore(); $this->gl->setAsDropDown(true); if ($show_upload) { ilFileUploadGUI::initFileUpload(); $icon_path = './Modules/Cloud/templates/images/icon_file_s.svg'; $icon_path = ilUtil::getImagePath('icon_file.svg'); $img = ilUtil::img($icon_path); $a_ttip = $lng->txt('cld_info_add_file_to_current_directory'); $this->gl->addEntry($img . ' ' . $lng->txt('cld_add_file'), 'javascript:il.CloudFileList.uploadFile();', '_top', '', '', 'il_cld_add_file', $a_ttip, 'bottom center', 'top center', false); } if ($show_create_folders) { $icon_path = './Modules/Cloud/templates/images/icon_folder_s.svg'; $icon_path = ilUtil::getImagePath('icon_fold.svg'); $img1 = ilUtil::img($icon_path); $a_ttip1 = $lng->txt('cld_info_add_folder_to_current_directory'); $this->gl->addEntry($img1 . ' ' . $lng->txt('cld_add_folder'), 'javascript:il.CloudFileList.createFolder();', '_top', '', '', 'il_cld_add_file', $a_ttip1, 'bottom center', 'top center', false); } $this->addItemsAfter(); return $this->gl; }
/** * Fill table row */ protected function fillRow($a_set) { global $lng, $ilCtrl; switch ($a_set["type"]) { // category case "scat": $ilCtrl->setParameterByClass("ilskillcategorygui", "obj_id", $a_set["child"]); $ret = $ilCtrl->getLinkTargetByClass("ilskillcategorygui", "listItems"); $ilCtrl->setParameterByClass("ilskillcategorygui", "obj_id", $_GET["obj_id"]); break; // skill template reference // skill template reference case "sktr": $tid = ilSkillTemplateReference::_lookupTemplateId($a_set["child"]); $ilCtrl->setParameterByClass("ilskilltemplatereferencegui", "tref_id", $a_set["child"]); $ilCtrl->setParameterByClass("ilskilltemplatereferencegui", "obj_id", $tid); $ret = $ilCtrl->getLinkTargetByClass("ilskilltemplatereferencegui", "listItems"); $ilCtrl->setParameterByClass("ilskilltemplatereferencegui", "obj_id", $_GET["obj_id"]); $ilCtrl->setParameterByClass("ilskilltemplatereferencegui", "tref_id", $_GET["tref_id"]); break; // skill // skill case "skll": $ilCtrl->setParameterByClass("ilbasicskillgui", "obj_id", $a_set["child"]); $ret = $ilCtrl->getLinkTargetByClass("ilbasicskillgui", "edit"); $ilCtrl->setParameterByClass("ilbasicskillgui", "obj_id", $_GET["obj_id"]); break; // -------- // template // -------- // template case "sktp": $ilCtrl->setParameterByClass("ilbasicskilltemplategui", "obj_id", $a_set["child"]); $ret = $ilCtrl->getLinkTargetByClass("ilbasicskilltemplategui", "edit"); $ilCtrl->setParameterByClass("ilbasicskilltemplategui", "obj_id", $_GET["obj_id"]); break; // template category // template category case "sctp": $ilCtrl->setParameterByClass("ilskilltemplatecategorygui", "obj_id", $a_set["child"]); $ret = $ilCtrl->getLinkTargetByClass("ilskilltemplatecategorygui", "listItems"); $ilCtrl->setParameterByClass("ilskilltemplatecategorygui", "obj_id", $_GET["obj_id"]); break; } if ($this->tref_id == 0) { $this->tpl->setCurrentBlock("cb"); $this->tpl->setVariable("CB_ID", $a_set["child"]); $this->tpl->parseCurrentBlock(); $this->tpl->setCurrentBlock("nr"); $this->tpl->setVariable("OBJ_ID", $a_set["child"]); $this->tpl->setVariable("ORDER_NR", $a_set["order_nr"]); $this->tpl->parseCurrentBlock(); } $this->tpl->setVariable("HREF_TITLE", $ret); $this->tpl->setVariable("TITLE", $a_set["title"]); $icon = ilSkillTreeNode::getIconPath($a_set["child"], $a_set["type"], "", ilSkillTreeNode::_lookupStatus($a_set["child"])); $this->tpl->setVariable("ICON", ilUtil::img($icon, "")); }
protected function getDetailItems($a_obj_id) { $data = array(); $all_status = array_merge(array("mem_cnt"), $this->status); include_once "Services/Tracking/classes/class.ilTrQuery.php"; foreach (ilTrQuery::getObjectLPStatistics(array($a_obj_id), $this->filter["yearmonth"]) as $item) { $month = "month_" . $item["yyyy"] . "-" . str_pad($item["mm"], 2, "0", STR_PAD_LEFT); foreach ($all_status as $status) { // status-id to field name if ($status != "mem_cnt") { $field = $this->status_map[$status]; } else { $field = $status; } // aggregated fields foreach ($this->types as $type) { $value = $item[$field . "_" . $type]; $idx = $item["yyyy"] . "-" . str_pad($item["mm"], 2, "0", STR_PAD_LEFT); $data[$status . "_" . $type]["month_" . $idx] = $value; } } } // add captions foreach (array_keys($data) as $figure) { $status = substr($figure, 0, -4); $type = substr($figure, -3); if ($status != "mem_cnt") { $path = ilLearningProgressBaseGUI::_getImagePathForStatus((int) $status); $text = ilLearningProgressBaseGUI::_getStatusText((int) $status); $icon = ilUtil::img($path, $text); $text = $icon . " " . $text; } else { $text = $this->lng->txt("members"); } if ($type != "avg") { $caption = $text . " " . $this->lng->txt("trac_object_stat_lp_" . $type); } else { $caption = $text . " Ø"; } $data[$figure]["figure"] = $caption; } $this->setData($data); }
/** * 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(); $gl->setAsDropDown(true); include_once "./Services/Link/classes/class.ilLink.php"; $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(); $gl->setAsDropDown(true); // overview $gl->addEntry($lng->txt("overview"), "ilias.php?baseClass=ilPersonalDesktopGUI&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&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&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&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&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&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&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&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&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&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&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&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&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(); $gl->setAsDropDown(true); // shop_content $gl->addEntry($lng->txt("content"), "ilias.php?baseClass=ilShopController&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&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(); }
/** * Fill table row */ protected function fillRow($data) { global $ilCtrl, $lng; if (!$this->isPercentageAvailable($data["obj_id"])) { $data["percentage"] = NULL; } foreach ($this->getSelectedColumns() as $c) { $val = trim($data[$c]) == "" ? " " : $data[$c]; if ($data[$c] != "" || $c == "status") { switch ($c) { case "first_access": $val = ilDatePresentation::formatDate(new ilDateTime($data[$c], IL_CAL_DATETIME)); break; case "last_access": $val = ilDatePresentation::formatDate(new ilDateTime($data[$c], IL_CAL_UNIX)); break; case "status": include_once "./Services/Tracking/classes/class.ilLearningProgressBaseGUI.php"; $path = ilLearningProgressBaseGUI::_getImagePathForStatus($data[$c]); $text = ilLearningProgressBaseGUI::_getStatusText($data[$c]); $val = ilUtil::img($path, $text); if ($data["type"] != "lobj" && $data["type"] != "sco") { $timing = $this->showTimingsWarning($data["ref_id"], $this->user_id); if ($timing) { if ($timing !== true) { $timing = ": " . ilDatePresentation::formatDate(new ilDate($timing, IL_CAL_UNIX)); } else { $timing = ""; } $this->tpl->setCurrentBlock('warning_img'); $this->tpl->setVariable('WARNING_IMG', ilUtil::getImagePath('time_warn.png')); $this->tpl->setVariable('WARNING_ALT', $this->lng->txt('trac_time_passed') . $timing); $this->tpl->parseCurrentBlock(); } } break; case "spent_seconds": include_once "./Services/Utilities/classes/class.ilFormat.php"; $val = ilFormat::_secondsToString($data[$c]); break; case "percentage": $val = $data[$c] . "%"; break; } } if ($c == "mark" && in_array($this->type, array("lm", "dbk"))) { $val = "-"; } if ($c == "spent_seconds" && in_array($this->type, array("exc"))) { $val = "-"; } if ($c == "percentage" && (in_array(strtolower($this->status_class), array("illpstatusmanual", "illpstatusscormpackage", "illpstatustestfinished")) || $this->type == "exc")) { $val = "-"; } $this->tpl->setCurrentBlock("user_field"); $this->tpl->setVariable("VAL_UF", $val); $this->tpl->parseCurrentBlock(); } if ($data["title"] == "") { $data["title"] = "--" . $lng->txt("none") . "--"; } $this->tpl->setVariable("ICON", ilObject::_getIcon("", "tiny", $data["type"])); $this->tpl->setVariable("ICON_ALT", $lng->txt($data["type"])); if (in_array($data['type'], array('fold', 'grp')) && $data['obj_id'] != $this->obj_id) { if ($data['type'] == 'fold') { $object_gui = 'ilobjfoldergui'; } else { $object_gui = 'ilobjgroupgui'; } $this->tpl->setCurrentBlock('title_linked'); // link structure gets too complicated if ($_GET["baseClass"] != "ilPersonalDesktopGUI" && $_GET["baseClass"] != "ilAdministrationGUI") { $old = $ilCtrl->getParameterArrayByClass('illplistofobjectsgui'); $ilCtrl->setParameterByClass('illplistofobjectsgui', 'ref_id', $data["ref_id"]); $ilCtrl->setParameterByClass('illplistofobjectsgui', 'details_id', $data["ref_id"]); $ilCtrl->setParameterByClass('illplistofobjectsgui', 'user_id', $this->user_id); $url = $ilCtrl->getLinkTargetByClass(array('ilrepositorygui', $object_gui, 'illearningprogressgui', 'illplistofobjectsgui'), 'userdetails'); $ilCtrl->setParameterByClass('illplistofobjectsgui', 'ref_id', $old["ref_id"]); $ilCtrl->setParameterByClass('illplistofobjectsgui', 'details_id', $old["details_id"]); $ilCtrl->setParameterByClass('illplistofobjectsgui', 'user_id', $old["user_id"]); } else { $url = "#"; } $this->tpl->setVariable("URL_TITLE", $url); $this->tpl->setVariable("VAL_TITLE", $data["title"]); $this->tpl->parseCurrentBlock(); } else { $this->tpl->setCurrentBlock('title_plain'); $this->tpl->setVariable("VAL_TITLE", $data["title"]); $this->tpl->parseCurrentBlock(); } if (!in_array($data["type"], array("sco", "lobj")) && !$this->getPrintMode()) { $this->tpl->setCurrentBlock("item_command"); $ilCtrl->setParameterByClass("illplistofobjectsgui", "userdetails_id", $data["ref_id"]); $this->tpl->setVariable("HREF_COMMAND", $ilCtrl->getLinkTargetByClass("illplistofobjectsgui", 'edituser')); $this->tpl->setVariable("TXT_COMMAND", $lng->txt('edit')); $ilCtrl->setParameterByClass("illplistofobjectsgui", "userdetails_id", ""); $this->tpl->parseCurrentBlock(); } }
/** * Standard Version of Fill Row. Most likely to * be overwritten by derived class. */ protected function fillRow($a_set) { global $lng, $ilCtrl, $ilAccess; $this->tpl->setCurrentBlock("link"); switch ($a_set["type"]) { case "fold": $this->tpl->setVariable("TXT_TITLE", $a_set["title"]); $ilCtrl->setParameter($this->parent_obj, $this->folder_par, $a_set["obj_id"]); $this->tpl->setVariable("LINK_VIEW", $ilCtrl->getLinkTarget($this->parent_obj, $this->parent_cmd)); $this->tpl->parseCurrentBlock(); if ($ilAccess->checkAccess("write", "", $this->media_pool->getRefId()) && $this->getMode() == ilMediaPoolTableGUI::IL_MEP_EDIT) { $this->tpl->setCurrentBlock("edit"); $this->tpl->setVariable("TXT_EDIT", $lng->txt("edit")); $ilCtrl->setParameter($this->parent_obj, $this->folder_par, $a_set["obj_id"]); $this->tpl->setVariable("EDIT_LINK", $ilCtrl->getLinkTarget($this->parent_obj, "editFolder")); $ilCtrl->setParameter($this->parent_obj, $this->folder_par, $_GET[$this->folder_par]); $this->tpl->parseCurrentBlock(); } $this->tpl->setCurrentBlock("tbl_content"); $this->tpl->setVariable("IMG", ilUtil::img(ilUtil::getImagePath("icon_" . $a_set["type"] . ".svg"))); $ilCtrl->setParameter($this->parent_obj, $this->folder_par, $this->current_folder); break; case "pg": if ($this->getMode() == ilMediaPoolTableGUI::IL_MEP_SELECT || $this->getMode() == ilMediaPoolTableGUI::IL_MEP_SELECT_SINGLE) { $this->tpl->setVariable("TXT_NO_LINK_TITLE", $a_set["title"]); } else { $this->tpl->setVariable("ONCLICK", "il.MediaPool.preview('" . $a_set["child"] . "'); return false;"); $this->tpl->setVariable("TXT_TITLE", $a_set["title"]); $ilCtrl->setParameterByClass("ilobjmediapoolgui", "mepitem_id", $a_set["child"]); } if ($ilAccess->checkAccess("write", "", $this->media_pool->getRefId()) && $this->getMode() == ilMediaPoolTableGUI::IL_MEP_EDIT) { $this->tpl->setCurrentBlock("edit"); $this->tpl->setVariable("TXT_EDIT", $lng->txt("edit")); $ilCtrl->setParameterByClass("ilmediapoolpagegui", "mepitem_id", $a_set["child"]); $this->tpl->setVariable("EDIT_LINK", $ilCtrl->getLinkTargetByClass("ilmediapoolpagegui", "edit")); $this->tpl->parseCurrentBlock(); } $this->tpl->setCurrentBlock("tbl_content"); $this->tpl->setVariable("IMG", ilUtil::img(ilUtil::getImagePath("icon_pg.svg"))); $ilCtrl->setParameter($this->parent_obj, $this->folder_par, $this->current_folder); break; case "mob": $this->tpl->setVariable("ONCLICK", "il.MediaPool.preview('" . $a_set["child"] . "'); return false;"); $this->tpl->setVariable("TXT_TITLE", $a_set["title"]); $ilCtrl->setParameterByClass("ilobjmediaobjectgui", "mepitem_id", $a_set["child"]); $ilCtrl->setParameter($this->parent_obj, "mob_id", $a_set["foreign_id"]); // edit link if ($ilAccess->checkAccess("write", "", $this->media_pool->getRefId()) && $this->getMode() == ilMediaPoolTableGUI::IL_MEP_EDIT) { $this->tpl->setCurrentBlock("edit"); $this->tpl->setVariable("TXT_EDIT", $lng->txt("edit")); $this->tpl->setVariable("EDIT_LINK", $ilCtrl->getLinkTargetByClass("ilobjmediaobjectgui", "edit")); $this->tpl->parseCurrentBlock(); } $this->tpl->setCurrentBlock("link"); $this->tpl->setCurrentBlock("tbl_content"); // output thumbnail (or mob icon) if (ilObject::_lookupType($a_set["foreign_id"]) == "mob") { $mob = new ilObjMediaObject($a_set["foreign_id"]); $med = $mob->getMediaItem("Standard"); $target = ""; if ($med) { $target = $med->getThumbnailTarget(); } if ($target != "") { $this->tpl->setVariable("IMG", ilUtil::img($target)); } else { $this->tpl->setVariable("IMG", ilUtil::img(ilUtil::getImagePath("icon_" . $a_set["type"] . ".svg"))); } if ($med && ilUtil::deducibleSize($med->getFormat()) && $med->getLocationType() == "Reference") { $size = @getimagesize($med->getLocation()); if ($size[0] > 0 && $size[1] > 0) { $wr = $size[0] / 80; $hr = $size[1] / 80; $r = max($wr, hr); $w = (int) ($size[0] / $r); $h = (int) ($size[1] / $r); $this->tpl->setVariable("IMG", ilUtil::img($med->getLocation(), "", $w, $h)); } } // output media info include_once "./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php"; $this->tpl->setVariable("MEDIA_INFO", ilObjMediaObjectGUI::_getMediaInfoHTML($mob)); $ilCtrl->setParameter($this->parent_obj, $this->folder_par, $this->current_folder); } break; } if ($ilAccess->checkAccess("write", "", $this->media_pool->getRefId())) { if ($this->getMode() == ilMediaPoolTableGUI::IL_MEP_EDIT || $this->getMode() == ilMediaPoolTableGUI::IL_MEP_SELECT && $a_set["type"] == "mob" || $this->getMode() == ilMediaPoolTableGUI::IL_MEP_SELECT_CONTENT && $a_set["type"] == "pg") { $this->tpl->setCurrentBlock("chbox"); $this->tpl->setVariable("CHECKBOX_ID", $a_set["child"]); $this->tpl->parseCurrentBlock(); $this->tpl->setCurrentBlock("tbl_content"); } else { if ($this->getMode() == ilMediaPoolTableGUI::IL_MEP_SELECT_SINGLE && $a_set["type"] == "mob") { $this->tpl->setCurrentBlock("radio"); $this->tpl->setVariable("RADIO_ID", $a_set["child"]); $this->tpl->parseCurrentBlock(); $this->tpl->setCurrentBlock("tbl_content"); } } } }
/** * 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&ref_id=" . $titems[$e]["ref_id"] . "&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&ref_id=" . $titems[$e]["ref_id"] . "&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; }
function showGallery() { global $tpl, $ilTabs; $tpl->addJavascript("./Modules/MediaCast/js/MediaCast.js"); $ilTabs->activateTab("content"); $this->addContentSubTabs("content"); $ctpl = new ilTemplate("tpl.mcst_content.html", true, true, "Modules/MediaCast"); include_once "./Services/MediaObjects/classes/class.ilObjMediaObject.php"; foreach ($this->object->getSortedItemsArray() as $item) { $mob = new ilObjMediaObject($item["mob_id"]); $med = $mob->getMediaItem("Standard"); $ctpl->setCurrentBlock("item"); $ctpl->setVariable("TITLE", $item["title"]); $ctpl->setVariable("TIME", $item["playtime"]); $ctpl->setVariable("ID", $item["id"]); if ($mob->getVideoPreviewPic() != "") { $ctpl->setVariable("PREVIEW_PIC", ilUtil::img($mob->getVideoPreviewPic(), $item["title"], 320, 240)); } else { $ctpl->setVariable("PREVIEW_PIC", ilUtil::img(ilUtil::getImagePath("mcst_preview.png"), $item["title"], 320, 240)); } // player if (is_object($med)) { include_once "./Services/MediaObjects/classes/class.ilMediaPlayerGUI.php"; $mpl = new ilMediaPlayerGUI(); if (strcasecmp("Reference", $med->getLocationType()) == 0) { $mpl->setFile($med->getLocation()); } else { $mpl->setFile(ilObjMediaObject::_getURL($mob->getId()) . "/" . $med->getLocation()); } $mpl->setMimeType($med->getFormat()); //$mpl->setDisplayHeight($med->getHeight()); $mpl->setDisplayHeight("480"); $mpl->setDisplayWidth("640"); $mpl->setVideoPreviewPic($mob->getVideoPreviewPic()); $mpl->setTitle($item["title"]); $mpl->setDescription($item["content"]); $mpl->setForceAudioPreview(true); $med_alt = $mob->getMediaItem("VideoAlternative"); if (is_object($med_alt)) { $mpl->setAlternativeVideoFile(ilObjMediaObject::_getURL($mob->getId()) . "/" . $med_alt->getLocation()); $mpl->setAlternativeVideoMimeType($med_alt->getFormat()); } $ctpl->setVariable("PLAYER", $mpl->getPreviewHtml()); } $ctpl->parseCurrentBlock(); } $feed_icon_html = $this->getFeedIconsHTML(); if ($feed_icon_html != "") { $feed_icon_html = '<p>' . $feed_icon_html . '</p>'; } $tpl->setContent($feed_icon_html . $ctpl->get()); }
/** * @param array $record_data * * @return bool|void */ public function fillRow($record_data) { global $ilUser, $ilAccess; $record_obj = $record_data['_record']; /** * @var $record_obj ilDataCollectionRecord * @var $ilAccess ilAccessHandler */ foreach ($this->table->getVisibleFields() as $field) { $title = $field->getTitle(); $this->tpl->setCurrentBlock("field"); $content = $record_data[$title]; if ($content === false or $content === NULL) { $content = ''; } // SW - This ensures to display also zeros in the table... $this->tpl->setVariable("CONTENT", $content); $this->tpl->parseCurrentBlock(); if ($field->getLearningProgress()) { $this->tpl->setCurrentBlock("field"); $this->tpl->setVariable("CONTENT", $record_data["_status_" . $title]); $this->tpl->parseCurrentBlock(); } } if ($record_data["_front"]) { $this->tpl->setCurrentBlock('view'); $this->tpl->setVariable("VIEW_IMAGE_LINK", $record_data["_front"]); $this->tpl->setVariable("VIEW_IMAGE_SRC", ilUtil::img(ilUtil::getImagePath("cmd_view_s.png"))); $this->tpl->parseCurrentBlock(); } $this->tpl->setVariable("ACTIONS", $record_data["_actions"]); if ($this->mode == ilDataCollectionRecordListGUI::MODE_MANAGE) { if ($record_obj->getOwner() == $ilUser->getId() or $ilAccess->checkAccess('write', '', $_GET['ref_id'])) { $this->tpl->setCurrentBlock('mode_manage'); $this->tpl->setVariable('RECORD_ID', $record_obj->getId()); $this->tpl->parseCurrentBlock(); } else { $this->tpl->touchBlock('mode_manage_no_owner'); } } return true; }
/** * Insert resources * * @param * @return */ static function insertResourcesIntoPageContent($a_content) { global $objDefinition, $tree, $lng; $ref_id = (int) $_GET["ref_id"]; $obj_id = (int) ilObject::_lookupObjId($ref_id); $obj_type = ilObject::_lookupType($obj_id); // determine type -> group $type_to_grp = array(); $type_grps = $objDefinition->getGroupedRepositoryObjectTypes($obj_type); foreach ($type_grps as $grp => $def) { foreach ($def["objs"] as $t) { $type_to_grp[$t] = $grp; } } $childs = $tree->getChilds($ref_id); $childs_by_type = array(); $item_groups = array(); foreach ($childs as $child) { $childs_by_type[$type_to_grp[$child["type"]]][] = $child; if ($child["type"] == "itgr") { $item_groups[(int) $child["ref_id"]] = $child["title"]; } } // handle "by type" lists foreach ($type_grps as $type => $v) { if (is_int(strpos($a_content, "[list-" . $type . "]"))) { // render block $tpl = new ilTemplate("tpl.resource_block.html", true, true, "Services/COPage"); $cnt = 0; if (is_array($childs_by_type[$type]) && count($childs_by_type[$type]) > 0) { foreach ($childs_by_type[$type] as $child) { $tpl->setCurrentBlock("row"); $tpl->setVariable("IMG", ilUtil::img(ilObject::_getIcon($child["obj_id"], "small"))); $tpl->setVariable("TITLE", $child["title"]); $tpl->parseCurrentBlock(); $cnt++; } $tpl->setVariable("HEADER", $lng->txt("objs_" . $type)); $a_content = str_replace("[list-" . $type . "]", $tpl->get(), $a_content); } else { $tpl->setCurrentBlock("row"); $tpl->setVariable("TITLE", $lng->txt("no_items")); $tpl->parseCurrentBlock(); $tpl->setVariable("HEADER", $lng->txt("objs_" . $type)); $a_content = str_replace("[list-" . $type . "]", $tpl->get(), $a_content); } } } // handle item groups while (eregi("\\[(item-group-([0-9]*))\\]", $a_content, $found)) { $itgr_ref_id = (int) $found[2]; // check whether this item group is child -> insert editing html if (isset($item_groups[$itgr_ref_id])) { include_once "./Modules/ItemGroup/classes/class.ilItemGroupItems.php"; $itgr_items = new ilItemGroupItems($itgr_ref_id); $items = $itgr_items->getValidItems(); // render block $tpl = new ilTemplate("tpl.resource_block.html", true, true, "Services/COPage"); foreach ($items as $it_ref_id) { $it_obj_id = ilObject::_lookupObjId($it_ref_id); $it_title = ilObject::_lookupTitle($it_obj_id); $tpl->setCurrentBlock("row"); $tpl->setVariable("IMG", ilUtil::img(ilObject::_getIcon($it_obj_id, "small"))); $tpl->setVariable("TITLE", $it_title); $tpl->parseCurrentBlock(); } $tpl->setVariable("HEADER", $item_groups[$itgr_ref_id]); $html = $tpl->get(); } else { $html = "<i>" . $lng->txt("cont_element_refers_removed_itgr") . "</i>"; } $a_content = eregi_replace("\\[" . $found[1] . "\\]", $html, $a_content); } return $a_content; }
protected function parseValue($id, $value, $type) { global $lng; $lng->loadLanguageModule("trac"); switch ($id) { case "status": include_once "./Services/Tracking/classes/class.ilLearningProgressBaseGUI.php"; $path = ilLearningProgressBaseGUI::_getImagePathForStatus($value); $text = ilLearningProgressBaseGUI::_getStatusText($value); $value = ilUtil::img($path, $text); break; } //BLUM round if ($id == "launch_data" || $id == "suspend_data") { return $value; } if (is_numeric($value)) { return round($value, 2); } return $value; }
/** * Get layout option * * @return object layout form option */ static function getLayoutOption($a_txt, $a_var, $a_def_option = "") { global $lng; // default layout $layout = new ilRadioGroupInputGUI($a_txt, $a_var); if ($a_def_option != "") { if (is_file($im = ilUtil::getImagePath("layout_" . $a_def_option . ".png"))) { $im_tag = ilUtil::img($im, $a_def_option); } $layout->addOption(new ilRadioOption("<table><tr><td>" . $im_tag . "</td><td><b>" . $lng->txt("cont_lm_default_layout") . "</b>: " . $lng->txt("cont_layout_" . $a_def_option) . "</td></tr></table>", "")); } foreach (ilObjContentObject::getAvailableLayouts() as $l) { $im_tag = ""; if (is_file($im = ilUtil::getImagePath("layout_" . $l . ".png"))) { $im_tag = ilUtil::img($im, $l); } $layout->addOption(new ilRadioOption("<table><tr><td style='padding: 0px 5px 5px;'>" . $im_tag . "</td><td style='padding:5px;'><b>" . $lng->txt("cont_layout_" . $l) . "</b>: " . $lng->txt("cont_layout_" . $l . "_desc") . "</td></tr></table>", $l)); } return $layout; }
/** * fill row * * @access public * @param * @return */ public function fillRow($data) { if ($this->isShowPointsEnabled()) { $this->tpl->setCurrentBlock('points'); $this->tpl->setVariable("POINTS", $data['points']); $this->tpl->parseCurrentBlock(); } if (strlen($data['description'])) { $this->tpl->setCurrentBlock('description'); $this->tpl->setVariable("DESCRIPTION", ilUtil::prepareFormOutput($data['description'])); $this->tpl->parseCurrentBlock(); } if ($this->isShowMarkerEnabled()) { if ($data['marked']) { $this->tpl->setCurrentBlock('marked_img'); $this->tpl->setVariable("HREF_MARKED", ilUtil::img('./templates/default/images/marked.svg', $this->lng->txt("tst_question_marked"), '24px', '24px')); $this->tpl->parseCurrentBlock(); } else { $this->tpl->touchBlock('marker'); } } if ($this->isShowObligationsEnabled()) { // obligatory answer status $value = ' '; if ($data['isAnswered']) { $value = $this->lng->txt("yes"); } $this->tpl->setCurrentBlock('answered_col'); $this->tpl->setVariable('ANSWERED', $value); $this->tpl->parseCurrentBlock(); // obligatory icon if ($data["obligatory"]) { $OBLIGATORY = "<img src=\"" . ilUtil::getImagePath("obligatory.gif", "Modules/Test") . "\" alt=\"" . $this->lng->txt("question_obligatory") . "\" title=\"" . $this->lng->txt("question_obligatory") . "\" />"; } else { $OBLIGATORY = ''; } $this->tpl->setVariable("QUESTION_OBLIGATORY", $OBLIGATORY); } $this->tpl->setVariable("ORDER", $data['order']); $this->tpl->setVariable("TITLE", ilUtil::prepareFormOutput($data['title'])); $this->tpl->setVariable("HREF", $data['href']); $this->tpl->setVariable("POSTPONED", $data['postponed']); if ($data["worked_through"]) { $this->tpl->setVariable("WORKED_THROUGH", $this->lng->txt("yes")); } else { $this->tpl->setVariable("WORKED_THROUGH", ' '); } }
/** * Fill table row */ protected function fillRow($a_set) { global $lng, $objDefinition; $obj_id = $a_set["obj_id"]; $ref_id = $a_set["ref_id"]; $type = $a_set['type']; $title = $a_set['title']; $description = $a_set['description']; $relevance = $a_set['relevance']; if (!$type) { return false; } include_once './Services/Search/classes/Lucene/class.ilLuceneSearchObjectListGUIFactory.php'; $item_list_gui = ilLuceneSearchObjectListGUIFactory::factory($type); $item_list_gui->initItem($ref_id, $obj_id, $title, $description); $item_list_gui->setContainerObject($this->parent_obj); $item_list_gui->setSearchFragment($this->presenter->lookupContent($obj_id, 0)); $item_list_gui->setSeparateCommands(true); ilObjectActivation::addListGUIActivationProperty($item_list_gui, $a_set); $this->presenter->appendAdditionalInformation($item_list_gui, $ref_id, $obj_id, $type); $this->tpl->setVariable("ACTION_HTML", $item_list_gui->getCommandsHTML()); if ($html = $item_list_gui->getListItemHTML($ref_id, $obj_id, $title, $description)) { $item_html[$ref_id]['html'] = $html; $item_html[$ref_id]['type'] = $type; } $this->tpl->setVariable("HREF_IMG", $item_list_gui->default_command["link"]); global $lng; if ($this->enabledRelevance()) { $width1 = (int) ((int) $relevance / 2); $width2 = (int) (50 - $width1); $this->tpl->setCurrentBlock('relev'); $this->tpl->setVariable('VAL_REL', sprintf("%d %%", $relevance)); $this->tpl->setVariable('WIDTH_A', $width1); $this->tpl->setVariable('WIDTH_B', $width2); $this->tpl->setVariable('IMG_A', ilUtil::getImagePath("relevance_blue.png")); $this->tpl->setVariable('IMG_B', ilUtil::getImagePath("relevance_dark.png")); $this->tpl->parseCurrentBlock(); } $this->tpl->setVariable("ITEM_HTML", $html); if (!$objDefinition->isPlugin($type)) { $type_txt = $lng->txt('icon') . ' ' . $lng->txt('obj_' . $type); $icon = ilUtil::getImagePath('icon_' . $type . '.png'); } else { include_once "./Services/Component/classes/class.ilPlugin.php"; $type_txt = ilPlugin::lookupTxt("rep_robj", $type, "obj_" . $type); $icon = ilObject::_getIcon($obj_id, 'small', $type); } $this->tpl->setVariable("TYPE_IMG", ilUtil::img($icon, $type_txt)); }
/** * Detail view of a mail */ public function showMail() { /** * @var $ilUser ilObjUser * @var $ilToolbar ilToolbarGUI * @var $ilTabs ilTabsGUI */ global $ilUser, $ilToolbar, $ilTabs; if ($_SESSION['mail_id']) { $_GET['mail_id'] = $_SESSION['mail_id']; $_SESSION['mail_id'] = ''; } $ilTabs->clearTargets(); $ilTabs->setBackTarget($this->lng->txt('back_to_folder'), $this->ctrl->getFormAction($this, 'showFolder')); $this->umail->markRead(array((int) $_GET['mail_id'])); $mailData = $this->umail->getMail((int) $_GET['mail_id']); $this->tpl->setTitle($this->lng->txt('mail_mails_of')); require_once 'Services/Form/classes/class.ilPropertyFormGUI.php'; $form = new ilPropertyFormGUI(); $form->setPreventDoubleSubmission(false); $form->setTableWidth('100%'); $this->ctrl->setParameter($this, 'mail_id', (int) $_GET['mail_id']); $form->setFormAction($this->ctrl->getFormAction($this, 'showMail')); $this->ctrl->clearParameters($this); $form->setTitle($this->lng->txt('mail_mails_of')); if ('tree' == ilSession::get(ilMailGUI::VIEWMODE_SESSION_KEY)) { $this->tpl->setVariable('FORM_TARGET', ilFrameTargetInfo::_getFrame('MainContent')); } include_once 'Services/Accessibility/classes/class.ilAccessKeyGUI.php'; /** * @var $sender ilObjUser */ $sender = ilObjectFactory::getInstanceByObjId($mailData['sender_id'], false); if ($sender && $sender->getId() && $sender->getId() != ANONYMOUS_USER_ID) { $this->ctrl->setParameterByClass('ilmailformgui', 'mail_id', (int) $_GET['mail_id']); $this->ctrl->setParameterByClass('ilmailformgui', 'type', 'reply'); $this->ctrl->clearParametersByClass('iliasmailformgui'); $ilToolbar->addButton($this->lng->txt('reply'), $this->ctrl->getLinkTargetByClass('ilmailformgui'), '', ilAccessKey::REPLY); $this->ctrl->clearParameters($this); } $this->ctrl->setParameterByClass('ilmailformgui', 'mail_id', (int) $_GET['mail_id']); $this->ctrl->setParameterByClass('ilmailformgui', 'type', 'forward'); $this->ctrl->clearParametersByClass('iliasmailformgui'); $ilToolbar->addButton($this->lng->txt('forward'), $this->ctrl->getLinkTargetByClass('ilmailformgui'), '', ilAccessKey::FORWARD_MAIL); $this->ctrl->clearParameters($this); $this->ctrl->setParameter($this, 'mail_id', (int) $_GET['mail_id']); $ilToolbar->addButton($this->lng->txt('print'), $this->ctrl->getLinkTarget($this, 'printMail'), '_blank'); $this->ctrl->clearParameters($this); $this->ctrl->setParameter($this, 'mail_id', (int) $_GET['mail_id']); $this->ctrl->setParameter($this, 'selected_cmd', 'deleteMails'); $ilToolbar->addButton($this->lng->txt('delete'), $this->ctrl->getLinkTarget($this), '', ilAccessKey::DELETE); $this->ctrl->clearParameters($this); if ($sender && $sender->getId() && $sender->getId() != ANONYMOUS_USER_ID) { $linked_fullname = $sender->getPublicName(); $picture = ilUtil::img($sender->getPersonalPicturePath('xsmall'), $sender->getPublicName()); $add_to_addb_button = ''; if (in_array(ilObjUser::_lookupPref($sender->getId(), 'public_profile'), array('y', 'g'))) { $this->ctrl->setParameter($this, 'mail_id', (int) $_GET['mail_id']); $this->ctrl->setParameter($this, 'user', $sender->getId()); $linked_fullname = '<br /><a href="' . $this->ctrl->getLinkTarget($this, 'showUser') . '" title="' . $linked_fullname . '">' . $linked_fullname . '</a>'; $this->ctrl->clearParameters($this); } if ($sender->getId() != $ilUser->getId()) { require_once 'Services/Contact/classes/class.ilAddressbook.php'; $abook = new ilAddressbook($ilUser->getId()); if ($abook->checkEntryByLogin($sender->getLogin()) == 0) { $tplbtn = new ilTemplate('tpl.buttons.html', true, true); $tplbtn->setCurrentBlock('btn_cell'); $this->ctrl->setParameter($this, 'mail_id', (int) $_GET['mail_id']); $tplbtn->setVariable('BTN_LINK', $this->ctrl->getLinkTarget($this, 'add')); $this->ctrl->clearParameters($this); $tplbtn->setVariable('BTN_TXT', $this->lng->txt('mail_add_to_addressbook')); $tplbtn->parseCurrentBlock(); $add_to_addb_button = '<br />' . $tplbtn->get(); } } $from = new ilCustomInputGUI($this->lng->txt('from')); $from->setHtml($picture . ' ' . $linked_fullname . $add_to_addb_button); $form->addItem($from); } else { if (!$sender || !$sender->getId()) { $from = new ilCustomInputGUI($this->lng->txt('from')); $from->setHtml($mailData['import_name'] . ' (' . $this->lng->txt('user_deleted') . ')'); $form->addItem($from); } else { $from = new ilCustomInputGUI($this->lng->txt('from')); $from->setHtml(ilUtil::img(ilUtil::getImagePath('HeaderIconAvatar.svg'), ilMail::_getIliasMailerName()) . '<br />' . ilMail::_getIliasMailerName()); $form->addItem($from); } } $to = new ilCustomInputGUI($this->lng->txt('mail_to')); $to->setHtml(ilUtil::htmlencodePlainString($this->umail->formatNamesForOutput($mailData['rcp_to']), false)); $form->addItem($to); if ($mailData['rcp_cc']) { $cc = new ilCustomInputGUI($this->lng->txt('cc')); $cc->setHtml(ilUtil::htmlencodePlainString($this->umail->formatNamesForOutput($mailData['rcp_cc']), false)); $form->addItem($cc); } if ($mailData['rcp_bcc']) { $bcc = new ilCustomInputGUI($this->lng->txt('bc')); $bcc->setHtml(ilUtil::htmlencodePlainString($this->umail->formatNamesForOutput($mailData['rcp_bcc']), false)); $form->addItem($bcc); } $subject = new ilCustomInputGUI($this->lng->txt('subject')); $subject->setHtml(ilUtil::htmlencodePlainString($mailData['m_subject'], true)); $form->addItem($subject); $date = new ilCustomInputGUI($this->lng->txt('date')); $date->setHtml(ilDatePresentation::formatDate(new ilDateTime($mailData['send_time'], IL_CAL_DATETIME))); $form->addItem($date); $message = new ilCustomInputGUI($this->lng->txt('message')); $message->setHtml(ilUtil::htmlencodePlainString($mailData['m_message'], true)); $form->addItem($message); if ($mailData['attachments']) { $att = new ilCustomInputGUI($this->lng->txt('attachments')); $radiog = new ilRadioGroupInputGUI('', 'filename'); foreach ($mailData['attachments'] as $file) { $radiog->addOption(new ilRadioOption($file, md5($file))); } $att->setHtml($radiog->render()); $form->addCommandButton('deliverFile', $this->lng->txt('download')); $form->addItem($att); } $isTrashFolder = false; if ($this->mbox->getTrashFolder() == $_GET['mobj_id']) { $isTrashFolder = true; } $current_folder_data = $this->mbox->getFolderData((int) $_GET['mobj_id']); $selectOptions = array(); $actions = $this->mbox->getActions((int) $_GET["mobj_id"]); foreach ($actions as $key => $action) { if ($key == 'moveMails') { $folders = $this->mbox->getSubFolders(); foreach ($folders as $folder) { if (($folder["type"] != 'trash' || !$isTrashFolder) && $folder['obj_id'] != $current_folder_data['obj_id']) { $optionText = ''; if ($folder['type'] != 'user_folder') { $optionText = $action . ' ' . $this->lng->txt('mail_' . $folder['title']) . ($folder['type'] == 'trash' ? ' (' . $this->lng->txt('delete') . ')' : ''); } else { $optionText = $action . ' ' . $folder['title']; } $selectOptions[$folder['obj_id']] = $optionText; } } } } if ($current_folder_data['type'] == 'user_folder') { $txt_folder = $current_folder_data['title']; } else { $txt_folder = $this->lng->txt('mail_' . $current_folder_data['title']); } $ilToolbar->addSeparator(); $ilToolbar->addText(sprintf($this->lng->txt('current_folder'), $txt_folder)); if (is_array($selectOptions) && count($selectOptions)) { include_once 'Services/Form/classes/class.ilSelectInputGUI.php'; $actions = new ilSelectInputGUI('', 'selected_cmd'); $actions->setOptions($selectOptions); $this->ctrl->setParameter($this, 'mail_id', (int) $_GET['mail_id']); $ilToolbar->setFormAction($this->ctrl->getFormAction($this, 'showMail')); $ilToolbar->addInputItem($actions); $ilToolbar->addFormButton($this->lng->txt('submit'), 'changeFolder'); } // Navigation $prevMail = $this->umail->getPreviousMail((int) $_GET['mail_id']); $nextMail = $this->umail->getNextMail((int) $_GET['mail_id']); if (is_array($prevMail) || is_array($nextMail)) { $ilToolbar->addSeparator(); if ($prevMail['mail_id']) { $this->ctrl->setParameter($this, 'mail_id', $prevMail['mail_id']); $ilToolbar->addButton($this->lng->txt('previous'), $this->ctrl->getLinkTarget($this, 'showMail')); $this->ctrl->clearParameters($this); } if ($nextMail['mail_id']) { $this->ctrl->setParameter($this, 'mail_id', $nextMail['mail_id']); $ilToolbar->addButton($this->lng->txt('next'), $this->ctrl->getLinkTarget($this, 'showMail')); $this->ctrl->clearParameters($this); } } $this->tpl->setContent($form->getHTML()); $this->tpl->show(); }
public static function _getPaymethodSymbol($a_paymethod) { switch ($a_paymethod) { case '1': case 'pm_bill': case 'bill': case 'PAY_METHOD_BILL': return ''; break; case '2': case 'pm_bmf': case 'bmf': case 'PAY_METHOD_BMF': return ''; break; case '3': case 'pm_paypal': case 'paypal': case 'PAY_METHOD_PAYPAL': return ilUtil::img('./templates/default/images/payment/paypal_48.png'); break; case '4': case 'pm_epay': case 'epay': case 'PAY_METHOD_EPAY': return ''; break; case 'PAY_METHOD_NOT_SPECIFIED': return ''; break; default: break; } }
/** * Render node * * @param * @return */ function renderNode($a_node, $tpl) { $this->listItemStart($tpl, $a_node); // select mode? if ($this->select_postvar != "") { if ($this->select_multi) { $tpl->setCurrentBlock("cb"); if (in_array($this->getNodeId($a_node), $this->selected_nodes)) { $tpl->setVariable("CHECKED", 'checked="checked"'); } $tpl->setVariable("CB_VAL", $this->getNodeId($a_node)); $tpl->setVariable("CB_NAME", $this->select_postvar . "[]"); $tpl->parseCurrentBlock(); } else { $tpl->setCurrentBlock("rd"); if (in_array($this->getNodeId($a_node), $this->selected_nodes)) { $tpl->setVariable("SELECTED", 'checked="checked"'); } $tpl->setVariable("RD_VAL", $this->getNodeId($a_node)); $tpl->setVariable("RD_NAME", $this->select_postvar); $tpl->parseCurrentBlock(); } } if ($this->isNodeHighlighted($a_node)) { $tpl->touchBlock("hl"); } $tpl->setCurrentBlock("content"); if ($this->getNodeIcon($a_node) != "") { $tpl->setVariable("ICON", ilUtil::img($this->getNodeIcon($a_node), $this->getNodeIconAlt($a_node)) . " "); } $tpl->setVariable("CONTENT", $this->getNodeContent($a_node)); $tpl->setVariable("HREF", $this->getNodeHref($a_node)); $target = $this->getNodeTarget($a_node); if ($target != "") { $tpl->setVariable("TARGET", 'target="' . $target . '"'); } if (!$this->isNodeClickable($a_node)) { $tpl->setVariable("ONCLICK", 'onclick="return false;"'); $tpl->setVariable("A_CLASS", 'class="disabled"'); } else { $onclick = $this->getNodeOnClick($a_node); if ($onclick != "") { $tpl->setVariable("ONCLICK", 'onclick="' . $onclick . '"'); } } $tpl->parseCurrentBlock(); $tpl->touchBlock("tag"); if (!$this->getAjax() || in_array($this->getNodeId($a_node), $this->open_nodes)) { $this->renderChilds($this->getNodeId($a_node), $tpl); } $this->listItemEnd($tpl); }