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 && (int) $_GET["ref_id"] > 0) {
         $this->tpl->setCurrentBlock("position");
         $this->tpl->setVariable('TXT_GLOBALLY', $lng->txt("search_globally"));
         $this->tpl->setVariable('TXT_CURRENT_POSITION', $lng->txt("search_at_current_position"));
         $this->tpl->setVariable('REF_ID', (int) $_GET["ref_id"]);
         $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();
     }
     $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_s.png")));
     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"));
         $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 footer row
  */
 function fillFooter()
 {
     global $lng, $ilCtrl, $ilUser;
     $footer = false;
     // select all checkbox
     if (strlen($this->getFormName()) && strlen($this->getSelectAllCheckbox()) && $this->dataExists()) {
         $this->tpl->setCurrentBlock("select_all_checkbox");
         $this->tpl->setVariable("SELECT_ALL_TXT_SELECT_ALL", $lng->txt("select_all"));
         $this->tpl->setVariable("SELECT_ALL_CHECKBOX_NAME", $this->getSelectAllCheckbox());
         $this->tpl->setVariable("SELECT_ALL_FORM_NAME", $this->getFormName());
         $this->tpl->setVariable("CHECKBOXNAME", "chb_select_all_" . $this->unique_id);
         $this->tpl->parseCurrentBlock();
     }
     // table footer numinfo
     if ($this->enabled["numinfo"] && $this->enabled["footer"]) {
         $start = $this->offset + 1;
         // compute num info
         if (!$this->dataExists()) {
             $start = 0;
         }
         $end = $this->offset + $this->limit;
         if ($end > $this->max_count or $this->limit == 0) {
             $end = $this->max_count;
         }
         if ($this->max_count > 0) {
             if ($this->lang_support) {
                 $numinfo = "(" . $start . " - " . $end . " " . strtolower($this->lng->txt("of")) . " " . $this->max_count . ")";
             } else {
                 $numinfo = "(" . $start . " - " . $end . " of " . $this->max_count . ")";
             }
         }
         if ($this->max_count > 0) {
             if ($this->getEnableNumInfo()) {
                 $this->tpl->setCurrentBlock("tbl_footer_numinfo");
                 $this->tpl->setVariable("NUMINFO", $numinfo);
                 $this->tpl->parseCurrentBlock();
             }
         }
         $footer = true;
     }
     // table footer linkbar
     if ($this->enabled["linkbar"] && $this->enabled["footer"] && $this->limit != 0 && $this->max_count > 0) {
         $layout = array("link" => $this->footer_style, "prev" => $this->footer_previous, "next" => $this->footer_next);
         //if (!$this->getDisplayAsBlock())
         //{
         $linkbar = $this->getLinkbar("1");
         $this->tpl->setCurrentBlock("tbl_footer_linkbar");
         $this->tpl->setVariable("LINKBAR", $linkbar);
         $this->tpl->parseCurrentBlock();
         $linkbar = true;
         //}
         $footer = true;
     }
     // column selector
     if (count($this->getSelectableColumns()) > 0) {
         $items = array();
         foreach ($this->getSelectableColumns() as $k => $c) {
             $items[$k] = array("txt" => $c["txt"], "selected" => $this->isColumnSelected($k));
         }
         include_once "./Services/UIComponent/CheckboxListOverlay/classes/class.ilCheckboxListOverlayGUI.php";
         $cb_over = new ilCheckboxListOverlayGUI("tbl_" . $this->getId());
         $cb_over->setLinkTitle($lng->txt("columns"));
         $cb_over->setItems($items);
         //$cb_over->setUrl("./ilias.php?baseClass=ilTablePropertiesStorage&table_id=".
         //		$this->getId()."&cmd=saveSelectedFields&user_id=".$ilUser->getId());
         $cb_over->setFormCmd($this->getParentCmd());
         $cb_over->setFieldVar("tblfs" . $this->getId());
         $cb_over->setHiddenVar("tblfsh" . $this->getId());
         $cb_over->setSelectionHeaderClass("ilTableMenuItem");
         $column_selector = $cb_over->getHTML();
         $footer = true;
     }
     if ($this->getShowTemplates() && is_object($ilUser)) {
         // template handling
         if (isset($_REQUEST["tbltplcrt"]) && $_REQUEST["tbltplcrt"]) {
             if ($this->saveTemplate($_REQUEST["tbltplcrt"])) {
                 ilUtil::sendSuccess($lng->txt("tbl_template_created"));
             }
         } else {
             if (isset($_REQUEST["tbltpldel"]) && $_REQUEST["tbltpldel"]) {
                 if ($this->deleteTemplate($_REQUEST["tbltpldel"])) {
                     ilUtil::sendSuccess($lng->txt("tbl_template_deleted"));
                 }
             }
         }
         $create_id = "template_create_overlay_" . $this->getId();
         $delete_id = "template_delete_overlay_" . $this->getId();
         $list_id = "template_stg_" . $this->getId();
         include_once "./Services/Table/classes/class.ilTableTemplatesStorage.php";
         $storage = new ilTableTemplatesStorage();
         $templates = $storage->getNames($this->getContext(), $ilUser->getId());
         include_once "./Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php";
         // form to delete template
         if (count($templates)) {
             $overlay = new ilOverlayGUI($delete_id);
             $overlay->setTrigger($list_id . "_delete");
             $overlay->setAnchor("ilAdvSelListAnchorElement_" . $list_id);
             $overlay->setAutoHide(false);
             $overlay->add();
             $lng->loadLanguageModule("form");
             $this->tpl->setCurrentBlock("template_editor_delete_item");
             $this->tpl->setVariable("TEMPLATE_DELETE_OPTION_VALUE", "");
             $this->tpl->setVariable("TEMPLATE_DELETE_OPTION", "- " . $lng->txt("form_please_select") . " -");
             $this->tpl->parseCurrentBlock();
             foreach ($templates as $name) {
                 $this->tpl->setVariable("TEMPLATE_DELETE_OPTION_VALUE", $name);
                 $this->tpl->setVariable("TEMPLATE_DELETE_OPTION", $name);
                 $this->tpl->parseCurrentBlock();
             }
             $this->tpl->setCurrentBlock("template_editor_delete");
             $this->tpl->setVariable("TEMPLATE_DELETE_ID", $delete_id);
             $this->tpl->setVariable("TXT_TEMPLATE_DELETE", $lng->txt("tbl_template_delete"));
             $this->tpl->setVariable("TXT_TEMPLATE_DELETE_SUBMIT", $lng->txt("delete"));
             $this->tpl->setVariable("TEMPLATE_DELETE_CMD", $this->parent_cmd);
             $this->tpl->parseCurrentBlock();
         }
         // form to save new template
         $overlay = new ilOverlayGUI($create_id);
         $overlay->setTrigger($list_id . "_create");
         $overlay->setAnchor("ilAdvSelListAnchorElement_" . $list_id);
         $overlay->setAutoHide(false);
         $overlay->add();
         $this->tpl->setCurrentBlock("template_editor");
         $this->tpl->setVariable("TEMPLATE_CREATE_ID", $create_id);
         $this->tpl->setVariable("TXT_TEMPLATE_CREATE", $lng->txt("tbl_template_create"));
         $this->tpl->setVariable("TXT_TEMPLATE_CREATE_SUBMIT", $lng->txt("save"));
         $this->tpl->setVariable("TEMPLATE_CREATE_CMD", $this->parent_cmd);
         $this->tpl->parseCurrentBlock();
         // load saved template
         include_once "./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php";
         $alist = new ilAdvancedSelectionListGUI();
         $alist->setId($list_id);
         $alist->addItem($lng->txt("tbl_template_create"), "create", "#");
         if (count($templates)) {
             $alist->addItem($lng->txt("tbl_template_delete"), "delete", "#");
             foreach ($templates as $name) {
                 $ilCtrl->setParameter($this->parent_obj, $this->prefix . "_tpl", urlencode($name));
                 $alist->addItem($name, $name, $ilCtrl->getLinkTarget($this->parent_obj, $this->parent_cmd));
                 $ilCtrl->setParameter($this->parent_obj, $this->prefix . "_tpl", "");
             }
         }
         $alist->setListTitle($lng->txt("tbl_templates"));
         $this->tpl->setVariable("TEMPLATE_SELECTOR", " " . $alist->getHTML());
     }
     if ($footer) {
         $this->tpl->setCurrentBlock("tbl_footer");
         $this->tpl->setVariable("COLUMN_COUNT", $this->getColumnCount());
         if ($this->getDisplayAsBlock()) {
             $this->tpl->setVariable("BLK_CLASS", "Block");
         }
         $this->tpl->parseCurrentBlock();
         // top navigation, if number info or linkbar given
         if ($numinfo != "" || $linkbar != "" || $column_selector != "" || count($this->filters) > 0 || count($this->optional_filters) > 0) {
             if (is_object($ilUser) && (count($this->filters) || count($this->optional_filters))) {
                 $this->tpl->setCurrentBlock("filter_activation");
                 $this->tpl->setVariable("TXT_ACTIVATE_FILTER", $lng->txt("show_filter"));
                 $this->tpl->setVariable("FILA_ID", $this->getId());
                 if ($this->getId() != "") {
                     $this->tpl->setVariable("SAVE_URLA", "./ilias.php?baseClass=ilTablePropertiesStorage&table_id=" . $this->getId() . "&cmd=showFilter&user_id=" . $ilUser->getId());
                 }
                 $this->tpl->parseCurrentBlock();
                 if (!$this->getDisableFilterHiding()) {
                     $this->tpl->setCurrentBlock("filter_deactivation");
                     $this->tpl->setVariable("TXT_HIDE", $lng->txt("hide_filter"));
                     if ($this->getId() != "") {
                         $this->tpl->setVariable("SAVE_URL", "./ilias.php?baseClass=ilTablePropertiesStorage&table_id=" . $this->getId() . "&cmd=hideFilter&user_id=" . $ilUser->getId());
                         $this->tpl->setVariable("FILD_ID", $this->getId());
                     }
                     $this->tpl->parseCurrentBlock();
                 }
             }
             if ($numinfo != "" && $this->getEnableNumInfo()) {
                 $this->tpl->setCurrentBlock("top_numinfo");
                 $this->tpl->setVariable("NUMINFO", $numinfo);
                 $this->tpl->parseCurrentBlock();
             }
             if ($linkbar != "" && !$this->getDisplayAsBlock()) {
                 $linkbar = $this->getLinkbar("2");
                 $this->tpl->setCurrentBlock("top_linkbar");
                 $this->tpl->setVariable("LINKBAR", $linkbar);
                 $this->tpl->parseCurrentBlock();
             }
             // column selector
             $this->tpl->setVariable("COLUMN_SELECTOR", $column_selector);
             // row selector
             if ($this->getShowRowsSelector() && is_object($ilUser)) {
                 include_once "./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php";
                 $alist = new ilAdvancedSelectionListGUI();
                 $alist->setId("sellst_rows_" . $this->getId());
                 $hpp = $ilUser->getPref("hits_per_page") != 9999 ? $ilUser->getPref("hits_per_page") : $lng->txt("unlimited");
                 $options = array(0 => $lng->txt("default") . " (" . $hpp . ")", 5 => 5, 10 => 10, 15 => 15, 20 => 20, 30 => 30, 40 => 40, 50 => 50, 100 => 100, 200 => 200, 400 => 400, 800 => 800);
                 foreach ($options as $k => $v) {
                     $ilCtrl->setParameter($this->parent_obj, $this->prefix . "_trows", $k);
                     $alist->addItem($v, $k, $ilCtrl->getLinkTarget($this->parent_obj, $this->parent_cmd));
                     $ilCtrl->setParameter($this->parent_obj, $this->prefix . "_trows", "");
                 }
                 $alist->setListTitle($this->getRowSelectorLabel() ? $this->getRowSelectorLabel() : $lng->txt("rows"));
                 $this->tpl->setVariable("ROW_SELECTOR", $alist->getHTML());
             }
             // export
             if (count($this->export_formats) && $this->dataExists()) {
                 include_once "./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php";
                 $alist = new ilAdvancedSelectionListGUI();
                 $alist->setId("sellst_xpt");
                 foreach ($this->export_formats as $format => $caption_lng_id) {
                     $ilCtrl->setParameter($this->parent_obj, $this->prefix . "_xpt", $format);
                     $url = $ilCtrl->getLinkTarget($this->parent_obj, $this->parent_cmd);
                     $ilCtrl->setParameter($this->parent_obj, $this->prefix . "_xpt", "");
                     $caption = $lng->txt($caption_lng_id);
                     //this part is necessary, because the labels for xls- and csv-Export are fetched from the ilias-lang-files, while the label for pdf-export is fetched from the lang-file of the plugin. If the ilias-lang-file does not contain a translation for the caption_lng_id, it will set it into '-'es. In that case the caption comes from the plugin and we just use the string that is there.
                     if (strpos($caption, '-') === 0 && strpos($caption, '-', strlen($caption) - 1) === strlen($caption) - 1) {
                         $alist->addItem($caption_lng_id, $format, $url);
                     } else {
                         $alist->addItem($lng->txt($caption_lng_id), $format, $url);
                     }
                 }
                 $alist->setListTitle($lng->txt("export"));
                 $this->tpl->setVariable("EXPORT_SELECTOR", " " . $alist->getHTML());
             }
             $this->tpl->setCurrentBlock("top_navigation");
             $this->tpl->setVariable("COLUMN_COUNT", $this->getColumnCount());
             if ($this->getDisplayAsBlock()) {
                 $this->tpl->setVariable("BLK_CLASS", "Block");
             }
             $this->tpl->parseCurrentBlock();
         }
     }
 }
 /**
  * Get selection list HTML
  */
 public function getHTML()
 {
     global $lng;
     $items = $this->getItems();
     include_once "./Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php";
     $overlay = new ilOverlayGUI("ilChkboxListOverlay_" . $this->getId());
     $overlay->setAnchor("ilChkboxListAnchorEl_" . $this->getId());
     $overlay->setTrigger("ilChkboxListTrigger_" . $this->getId());
     $overlay->setAutoHide(false);
     //$overlay->setSize("300px", "300px");
     $overlay->add();
     $tpl = new ilTemplate("tpl.checkbox_list_overlay.html", true, true, "Services/UIComponent/CheckboxListOverlay", "DEFAULT", false, true);
     $tpl->setCurrentBlock("top_img");
     switch ($this->getHeaderIcon()) {
         case ilCheckboxListOverlayGUI::DOWN_ARROW_LIGHT:
             $tpl->setVariable("IMG_DOWN", ilUtil::getImagePath(ilCheckboxListOverlayGUI::DOWN_ARROW_LIGHT));
             break;
         case ilCheckboxListOverlayGUI::DOWN_ARROW_DARK:
             $tpl->setVariable("IMG_DOWN", ilUtil::getImagePath(ilCheckboxListOverlayGUI::DOWN_ARROW_DARK));
             break;
         default:
             $tpl->setVariable("IMG_DOWN", $this->getHeaderIcon());
             break;
     }
     // do not repeat title (accessibility) -> empty alt
     $tpl->setVariable("TXT_SEL_TOP", $this->getLinkTitle());
     $tpl->setVariable("ALT_SEL_TOP", "");
     $tpl->setVariable("CLASS_SEL_TOP", $this->getSelectionHeaderClass());
     $tpl->parseCurrentBlock();
     reset($items);
     foreach ($items as $k => $v) {
         $tpl->setCurrentBlock("list_entry");
         $tpl->setVariable("VAR", $this->getFieldVar());
         $tpl->setVariable("VAL_ENTRY", $k);
         $tpl->setVariable("TXT_ENTRY", $v["txt"]);
         if ($v["selected"]) {
             $tpl->setVariable("CHECKED", "checked='checked'");
         }
         $tpl->parseCurrentBlock();
     }
     $tpl->setVariable("ID", $this->getId());
     $tpl->setVariable("HIDDEN_VAR", $this->getHiddenVar());
     $tpl->setVariable("CMD_SUBMIT", $this->getFormCmd());
     $tpl->setVariable("VAL_SUBMIT", $lng->txt("refresh"));
     return $tpl->get();
 }
 /**
  * desc
  *
  * @param
  * @return
  */
 function renderMainMenuListEntries($a_tpl, $a_call_get = true)
 {
     global $rbacsystem, $lng, $ilias, $tree, $ilUser, $ilSetting, $ilAccess;
     // personal desktop
     if ($_SESSION["AccountId"] != ANONYMOUS_USER_ID) {
         /*$this->renderEntry($a_tpl, "desktop",
         		$lng->txt("personal_desktop"),
         		$this->getScriptTarget("ilias.php?baseClass=ilPersonalDesktopGUI"),
         		$this->target);*/
         //			$this->renderDropDown($a_tpl, "desktop");
         $this->renderEntry($a_tpl, "desktop", $lng->txt("personal_desktop"), "#");
         include_once "./Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php";
         $ov = new ilOverlayGUI("mm_desk_ov");
         $ov->setTrigger("mm_desk_tr");
         $ov->setAnchor("mm_desk_tr");
         $ov->setAutoHide(false);
         $ov->add();
     }
     // repository
     if ($ilAccess->checkAccess('visible', '', ROOT_FOLDER_ID)) {
         include_once './Services/Link/classes/class.ilLink.php';
         $nd = $tree->getNodeData(ROOT_FOLDER_ID);
         $title = $nd["title"];
         if ($title == "ILIAS") {
             $title = $lng->txt("repository");
         }
         //$this->renderEntry($a_tpl, "repository",
         //	$title,
         //	ilLink::_getStaticLink(1,'root',true),
         //	$this->target);
         if ($_SESSION["AccountId"] != ANONYMOUS_USER_ID || IS_PAYMENT_ENABLED) {
             $this->renderEntry($a_tpl, "repository", $title, "#");
             include_once "./Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php";
             $ov = new ilOverlayGUI("mm_rep_ov");
             $ov->setTrigger("mm_rep_tr");
             $ov->setAnchor("mm_rep_tr");
             $ov->setAutoHide(false);
             $ov->add();
         }
     }
     // search
     include_once 'Services/Search/classes/class.ilSearchSettings.php';
     if ($rbacsystem->checkAccess('search', ilSearchSettings::_getSearchSettingRefId())) {
         /*			$this->renderEntry($a_tpl, "search",
         				$lng->txt("search"),
         				$this->getScriptTarget('ilias.php?baseClass=ilSearchController'),
         				$this->target); */
     }
     // webshop
     if (IS_PAYMENT_ENABLED) {
         $title = $lng->txt("shop");
         $this->renderEntry($a_tpl, "shop", $title, "#");
         include_once "./Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php";
         $ov = new ilOverlayGUI("mm_shop_ov");
         $ov->setTrigger("mm_shop_tr");
         $ov->setAnchor("mm_shop_tr");
         $ov->setAutoHide(false);
         $ov->add();
     }
     // administration
     if (ilMainMenuGUI::_checkAdministrationPermission()) {
         //$this->renderEntry($a_tpl, "administration",
         //	$lng->txt("administration"),
         //	$this->getScriptTarget("ilias.php?baseClass=ilAdministrationGUI"),
         //	$this->target);
         $this->renderDropDown($a_tpl, "administration");
     }
     // navigation history
     /*		require_once("Services/Navigation/classes/class.ilNavigationHistoryGUI.php");
     		$nav_hist = new ilNavigationHistoryGUI();
     		$nav_html = $nav_hist->getHTML();
     		if ($nav_html != "")
     		{
     
     			$a_tpl->setCurrentBlock("nav_history");
     			$a_tpl->setVariable("TXT_LAST_VISITED", $lng->txt("last_visited"));
     			$a_tpl->setVariable("NAVIGATION_HISTORY", $nav_html);
     			$a_tpl->parseCurrentBlock();
     		}*/
     if ($a_call_get) {
         return $a_tpl->get();
     }
     return "";
 }
 function getExerciseInfo($a_assignment_id, $a_add_submit = false)
 {
     include_once "Modules/Exercise/classes/class.ilExAssignment.php";
     $ass = new ilExAssignment($a_assignment_id);
     $exercise_id = $ass->getExerciseId();
     if (!$exercise_id) {
         return;
     }
     // is the assignment still open?
     $times_up = false;
     if ($ass->getDeadline() && $ass->getDeadline() - time() <= 0) {
         $times_up = true;
     }
     // exercise goto
     include_once "./Services/Link/classes/class.ilLink.php";
     $exc_ref_id = array_shift(ilObject::_getAllReferences($exercise_id));
     $exc_link = ilLink::_getStaticLink($exc_ref_id, "exc");
     $info = sprintf($this->lng->txt("prtf_exercise_info"), $ass->getTitle(), "<a href=\"" . $exc_link . "\">" . ilObject::_lookupTitle($exercise_id) . "</a>");
     // submit button
     if ($a_add_submit && !$times_up) {
         $this->ctrl->setParameter($this, "exc", $exercise_id);
         $this->ctrl->setParameter($this, "ass", $a_assignment_id);
         $submit_link = $this->ctrl->getLinkTarget($this, "finalize");
         $this->ctrl->setParameter($this, "ass", "");
         $this->ctrl->setParameter($this, "exc", "");
         include_once "Services/UIComponent/Button/classes/class.ilLinkButton.php";
         $button = ilLinkButton::getInstance();
         $button->setCaption("prtf_finalize_portfolio");
         $button->setPrimary(true);
         $button->setUrl($submit_link);
         $info .= " " . $button->render();
     }
     // submitted files
     $submitted = ilExAssignment::getDeliveredFiles($exercise_id, $a_assignment_id, $this->user_id, true);
     if ($submitted) {
         $submitted = array_pop($submitted);
         $this->ctrl->setParameter($this, "ass", $a_assignment_id);
         $dl_link = $this->ctrl->getLinkTarget($this, "downloadExcSubFile");
         $this->ctrl->setParameter($this, "ass", "");
         $rel = ilDatePresentation::useRelativeDates();
         ilDatePresentation::setUseRelativeDates(false);
         include_once "Services/UIComponent/Button/classes/class.ilLinkButton.php";
         $button = ilLinkButton::getInstance();
         $button->setCaption("download");
         $button->setUrl($dl_link);
         $info .= "<br />" . sprintf($this->lng->txt("prtf_exercise_submitted_info"), ilDatePresentation::formatDate(new ilDateTime($submitted["ts"], IL_CAL_DATETIME)), $button->render());
         ilDatePresentation::setUseRelativeDates($rel);
     }
     // work instructions incl. files
     $tooltip = "";
     $ass = $ass->getInstruction();
     if ($ass) {
         $tooltip .= nl2br($ass);
     }
     $ass_files = ilExAssignment::getFiles($exercise_id, $a_assignment_id);
     if (count($ass_files) > 0) {
         $tooltip .= "<br /><br />";
         foreach ($ass_files as $file) {
             $this->ctrl->setParameter($this, "ass", $a_assignment_id);
             $this->ctrl->setParameter($this, "file", urlencode($file["name"]));
             $dl_link = $this->ctrl->getLinkTarget($this, "downloadExcAssFile");
             $this->ctrl->setParameter($this, "file", "");
             $this->ctrl->setParameter($this, "ass", "");
             $tooltip .= $file["name"] . ": <a href=\"" . $dl_link . "\">" . $this->lng->txt("download") . "</a>";
         }
     }
     if ($tooltip) {
         $ol_id = "exc_ass_" . $a_assignment_id;
         include_once "Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php";
         $overlay = new ilOverlayGUI($ol_id);
         // overlay
         $overlay->setAnchor($ol_id . "_tr");
         $overlay->setTrigger($ol_id . "_tr", "click", $ol_id . "_tr");
         $overlay->setAutoHide(false);
         // $overlay->setCloseElementId($cl_id);
         $overlay->add();
         // trigger
         $overlay->addTrigger($ol_id . "_tr", "click", $ol_id . "_tr");
         $info .= "<div id=\"" . $ol_id . "_tr\"><a href=\"#\">" . $this->lng->txt("exc_instruction") . "</a></div>" . "<div id=\"" . $ol_id . "\" style=\"display:none; background-color:white; border: 1px solid #bbb; padding: 10px;\">" . $tooltip . "</div>";
     }
     return $info;
 }