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();
         }
     }
 }
 function getExerciseInfo($a_assignment_id)
 {
     global $lng, $ilCtrl, $ilUser;
     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($lng->txt("blog_exercise_info"), $ass->getTitle(), "<a href=\"" . $exc_link . "\">" . ilObject::_lookupTitle($exercise_id) . "</a>");
     // submit button
     if (!$times_up) {
         $ilCtrl->setParameter($this, "exc", $exercise_id);
         $ilCtrl->setParameter($this, "ass", $a_assignment_id);
         $submit_link = $ilCtrl->getLinkTarget($this, "finalize");
         $ilCtrl->setParameter($this, "ass", "");
         $ilCtrl->setParameter($this, "exc", "");
         $info .= " <a class=\"submit emphsubmit\" href=\"" . $submit_link . "\">" . $lng->txt("blog_finalize_blog") . "</a>";
     }
     // submitted files
     $submitted = ilExAssignment::getDeliveredFiles($exercise_id, $a_assignment_id, $ilUser->getId(), true);
     if ($submitted) {
         $submitted = array_pop($submitted);
         $ilCtrl->setParameter($this, "ass", $a_assignment_id);
         $dl_link = $ilCtrl->getLinkTarget($this, "downloadExcSubFile");
         $ilCtrl->setParameter($this, "ass", "");
         $rel = ilDatePresentation::useRelativeDates();
         ilDatePresentation::setUseRelativeDates(false);
         $info .= "<br />" . sprintf($lng->txt("blog_exercise_submitted_info"), ilDatePresentation::formatDate(new ilDateTime($submitted["ts"], IL_CAL_DATETIME)), "<a href=\"" . $dl_link . "\" class=\"submit\">" . $lng->txt("download") . "</a>");
         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) {
             $ilCtrl->setParameter($this, "ass", $a_assignment_id);
             $ilCtrl->setParameter($this, "file", urlencode($file["name"]));
             $dl_link = $ilCtrl->getLinkTarget($this, "downloadExcAssFile");
             $ilCtrl->setParameter($this, "file", "");
             $ilCtrl->setParameter($this, "ass", "");
             $tooltip .= $file["name"] . ": <a href=\"" . $dl_link . "\">" . $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->add();
         $info .= "<div id=\"" . $ol_id . "_tr\"><a href=\"#\">" . $lng->txt("exc_instruction") . "</a></div>" . "<div id=\"" . $ol_id . "\" style=\"display:none; padding:10px;\" class=\"ilOverlay\">" . $tooltip . "</div>";
     }
     return "<div>" . $info . "</div>";
 }
 /**
  * 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 addToolbar($root_node)
 {
     global $lng, $ilToolbar, $tpl;
     $create_list_gui = ilCloudConnector::getItemCreationListGUIClass($this->getService());
     $list_gui_html = $create_list_gui->getGroupedListItemsHTML($this->getPermUploadItems(), $this->getPermCreateFolders());
     if ($list_gui_html) {
         // toolbar
         $ov_id = "il_add_new_cld_item_v";
         $ov_trigger_id = $ov_id . "_tr";
         $toolbar_locator = new ilLocatorGUI();
         $toolbar_locator->addItem($this->getGuiClass()->object->getTitle(), ilCloudPluginFileTreeGUI::getLinkToFolder($root_node));
         $ilToolbar->setId('xcld_toolbar');
         $ilToolbar->addText("<div class='xcld_locator'>" . $toolbar_locator->getHtml() . "</div>");
         $ilToolbar->addSeparator();
         $ilToolbar->addButton($lng->txt("cld_add_new_item"), "#", "", "", "", $ov_trigger_id, 'submit emphsubmit');
         include_once "Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php";
         $ov = new ilOverlayGUI($ov_id);
         $ov->add();
         $ov->addTrigger($ov_trigger_id, "click", $ov_trigger_id, false, "tl", "tr");
         $tpl->setVariable("SELECT_OBJTYPE_REPOS", '<div id="' . $ov_id . '" class="ilOverlay ilNoDisplay">' . $list_gui_html . '</div>');
     }
 }
 /**
  * Get HTML for rating of an object (and a user)
  */
 function getHTML()
 {
     global $lng;
     $categories = array();
     if ($this->enable_categories) {
         $categories = ilRatingCategory::getAllForObject($this->obj_id);
     }
     $may_rate = $this->getUserId() != ANONYMOUS_USER_ID;
     $has_overlay = false;
     if ($may_rate || $categories) {
         $has_overlay = true;
     }
     $ttpl = new ilTemplate("tpl.rating_input.html", true, true, "Services/Rating");
     // user rating
     $user_rating = 0;
     if ($may_rate) {
         $user_rating = round(ilRating::getRatingForUserAndObject($this->obj_id, $this->obj_type, $this->sub_obj_id, $this->sub_obj_type, $this->getUserId()));
     }
     // (1) overall rating
     $rating = ilRating::getOverallRatingForObject($this->obj_id, $this->obj_type, $this->sub_obj_id, $this->sub_obj_type);
     for ($i = 1; $i <= 5; $i++) {
         if ($i == $user_rating) {
             $ttpl->setCurrentBlock("rating_mark");
             $ttpl->setVariable("SRC_MARK", ilUtil::getImagePath("icon_rate_marker.png"));
             $ttpl->parseCurrentBlock();
         }
         $ttpl->setCurrentBlock("rating_icon");
         if ($rating["avg"] >= $i) {
             $ttpl->setVariable("SRC_ICON", ilUtil::getImagePath("icon_rate_on.png"));
         } else {
             if ($rating["avg"] + 1 <= $i) {
                 $ttpl->setVariable("SRC_ICON", ilUtil::getImagePath("icon_rate_off.png"));
             } else {
                 $nr = round(($rating["avg"] + 1 - $i) * 10);
                 $ttpl->setVariable("SRC_ICON", ilUtil::getImagePath("icon_rate_{$nr}.png"));
             }
         }
         $ttpl->setVariable("ALT_ICON", "(" . $i . "/5)");
         $ttpl->parseCurrentBlock();
     }
     $ttpl->setCurrentBlock("rating_icon");
     if ($rating["cnt"] == 0) {
         $tt = $lng->txt("rat_not_rated_yet");
     } else {
         if ($rating["cnt"] == 1) {
             $tt = $lng->txt("rat_one_rating");
         } else {
             $tt = sprintf($lng->txt("rat_nr_ratings"), $rating["cnt"]);
         }
     }
     include_once "./Services/UIComponent/Tooltip/classes/class.ilTooltipGUI.php";
     ilTooltipGUI::addTooltip($this->id . "_tt", $tt);
     if ($rating["cnt"] > 0) {
         $ttpl->setCurrentBlock("rat_nr");
         $ttpl->setVariable("RT_NR", $rating["cnt"]);
         $ttpl->parseCurrentBlock();
     }
     // add overlay (trigger)
     if ($has_overlay) {
         include_once "./Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php";
         $ov = new ilOverlayGUI($this->id);
         $ov->setTrigger("tr_" . $this->id, "click", "tr_" . $this->id);
         $ov->add();
         $ttpl->setCurrentBlock("act_rat_start");
         $ttpl->setVariable("ID", $this->id);
         $ttpl->setVariable("SRC_ARROW", ilUtil::getImagePath("mm_down_arrow_dark.png"));
         $ttpl->parseCurrentBlock();
         $ttpl->setCurrentBlock("act_rat_end");
         $ttpl->setVariable("SRC_ARROW", ilUtil::getImagePath("mm_down_arrow_dark.png"));
         $ttpl->parseCurrentBlock();
     }
     $ttpl->parseCurrentBlock();
     // (2) user rating
     if ($has_overlay) {
         $ttpl->setVariable("RATING_DETAILS", $this->renderDetails("rtov_", $may_rate, $categories));
         $ttpl->setCurrentBlock("user_rating");
         $ttpl->setVariable("ID", $this->id);
         $ttpl->parseCurrentBlock();
     }
     $ttpl->setVariable("TTID", $this->id);
     return $ttpl->get();
 }
 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;
 }
 /**
  * Fill table row
  */
 protected function fillRow($d)
 {
     global $lng, $ilCtrl;
     $this->tpl->setVariable("TXT_ASS_TITLE", $d["title"]);
     $file_info = ilExAssignment::getDownloadedFilesInfoForTableGUIS($this->parent_obj, $this->exc_id, $d["type"], $d["id"], $this->part_id, $this->parent_cmd);
     $has_no_team_yet = false;
     if ($d["type"] == ilExAssignment::TYPE_UPLOAD_TEAM) {
         $members = ilExAssignment::getTeamMembersByAssignmentId($d["id"], $this->part_id);
         // #11957
         if (sizeof($members)) {
             $this->tpl->setCurrentBlock("ass_members");
             foreach ($members as $member_id) {
                 $this->tpl->setVariable("TXT_MEMBER_NAME", ilObjUser::_lookupFullname($member_id));
                 $this->tpl->parseCurrentBlock();
             }
             $ilCtrl->setParameter($this->parent_obj, "lpart", $this->part_id);
             $this->tpl->setVariable("HREF_LOG", $ilCtrl->getLinkTarget($this->parent_obj, "showTeamLog"));
             $this->tpl->setVariable("TXT_LOG", $lng->txt("exc_team_log"));
             $ilCtrl->setParameter($this->parent_obj, "lpart", "");
         } else {
             // #11957
             $has_no_team_yet = true;
             $this->tpl->setCurrentBlock("team_info");
             $this->tpl->setVariable("TXT_TEAM_INFO", $lng->txt("exc_no_team_yet"));
             $this->tpl->setVariable("TXT_CREATE_TEAM", $lng->txt("exc_create_team"));
             $ilCtrl->setParameter($this->parent_obj, "ass_id", $d["id"]);
             $ilCtrl->setParameter($this->parent_obj, "lpart", $this->part_id);
             $this->tpl->setVariable("URL_CREATE_TEAM", $ilCtrl->getLinkTarget($this->getParentObject(), "createSingleMemberTeam"));
             $ilCtrl->setParameter($this->parent_obj, "lpart", "");
             $ilCtrl->setParameter($this->parent_obj, "ass_id", "");
             if ($file_info["files"]["count"]) {
                 $this->tpl->setVariable("TEAM_FILES_INFO", "<br />" . $file_info["files"]["txt"] . ": " . $file_info["files"]["count"]);
             }
             $this->tpl->parseCurrentBlock();
         }
     }
     if (!$has_no_team_yet) {
         $this->tpl->setVariable("VAL_CHKBOX", ilUtil::formCheckbox(0, "assid[" . $d["id"] . "]", 1));
         $this->tpl->setVariable("VAL_ID", $d["id"]);
         $this->tpl->setVariable("VAL_LAST_SUBMISSION", $file_info["last_submission"]["value"]);
         $this->tpl->setVariable("TXT_LAST_SUBMISSION", $file_info["last_submission"]["txt"]);
         $this->tpl->setVariable("TXT_SUBMITTED_FILES", $file_info["files"]["txt"]);
         $this->tpl->setVariable("VAL_SUBMITTED_FILES", $file_info["files"]["count"]);
         if ($file_info["files"]["download_url"]) {
             $this->tpl->setCurrentBlock("download_link");
             $this->tpl->setVariable("LINK_DOWNLOAD", $file_info["files"]["download_url"]);
             $this->tpl->setVariable("TXT_DOWNLOAD", $file_info["files"]["download_txt"]);
             $this->tpl->parseCurrentBlock();
         }
         if ($file_info["files"]["download_new_url"]) {
             $this->tpl->setCurrentBlock("download_link");
             $this->tpl->setVariable("LINK_NEW_DOWNLOAD", $file_info["files"]["download_new_url"]);
             $this->tpl->setVariable("TXT_NEW_DOWNLOAD", $file_info["files"]["download_new_txt"]);
             $this->tpl->parseCurrentBlock();
         }
         // note
         $this->tpl->setVariable("TXT_NOTE", $lng->txt("exc_note_for_tutor"));
         $this->tpl->setVariable("NAME_NOTE", "notice[" . $d["id"] . "]");
         $this->tpl->setVariable("VAL_NOTE", ilUtil::prepareFormOutput(ilExAssignment::lookupNoticeOfUser($d["id"], $this->part_id)));
         // comment for learner
         $lcomment_value = ilExAssignment::lookupCommentForUser($d["id"], $this->part_id);
         $overlay_id = "excasscomm_" . $d["id"] . "_" . $this->part_id;
         $overlay_trigger_id = $overlay_id . "_tr";
         $overlay = new ilOverlayGUI($overlay_id);
         $overlay->setAnchor($overlay_trigger_id);
         $overlay->setTrigger($overlay_trigger_id, "click", $overlay_trigger_id);
         $overlay->add();
         $this->tpl->setVariable("LCOMMENT_ID", $overlay_id . "_snip");
         $this->tpl->setVariable("LCOMMENT_SNIPPET", ilUtil::shortenText($lcomment_value, 25, true));
         $this->tpl->setVariable("COMMENT_OVERLAY_TRIGGER_ID", $overlay_trigger_id);
         $this->tpl->setVariable("COMMENT_OVERLAY_TRIGGER_TEXT", $lng->txt("exc_comment_for_learner_edit"));
         $lcomment_form = new ilPropertyFormGUI();
         $lcomment_form->setId($overlay_id);
         $lcomment_form->setPreventDoubleSubmission(false);
         $lcomment = new ilTextAreaInputGUI($lng->txt("exc_comment_for_learner"), "lcomment_" . $d["id"] . "_" . $this->part_id);
         $lcomment->setInfo($lng->txt("exc_comment_for_learner_info"));
         $lcomment->setValue($lcomment_value);
         $lcomment->setCols(45);
         $lcomment->setRows(5);
         $lcomment_form->addItem($lcomment);
         //$lcomment_form->addCommandButton("save", $lng->txt("save"));
         // $lcomment_form->addCommandButton("cancel", $lng->txt("cancel"));
         $this->overlay_tpl->setCurrentBlock("overlay_bl");
         $this->overlay_tpl->setVariable("COMMENT_OVERLAY_ID", $overlay_id);
         $this->overlay_tpl->setVariable("COMMENT_OVERLAY_FORM", $lcomment_form->getHTML());
         $this->overlay_tpl->parseCurrentBlock();
         /*			
         $this->tpl->setVariable("TXT_LCOMMENT", $lng->txt("exc_comment_for_learner"));
         $this->tpl->setVariable("NAME_LCOMMENT",
         	"lcomment[".$d["id"]."]");
         $lpcomment = ilExAssignment::lookupCommentForUser($d["id"], $this->part_id);
         $this->tpl->setVariable("VAL_LCOMMENT",
         	ilUtil::prepareFormOutput($lpcomment));
         */
         // solved
         //$this->tpl->setVariable("CHKBOX_SOLVED",
         //	ilUtil::formCheckbox($this->exc->members_obj->getStatusByMember($member_id),"solved[$member_id]",1));
         $status = ilExAssignment::lookupStatusOfUser($d["id"], $this->part_id);
         $this->tpl->setVariable("SEL_" . strtoupper($status), ' selected="selected" ');
         $this->tpl->setVariable("TXT_NOTGRADED", $lng->txt("exc_notgraded"));
         $this->tpl->setVariable("TXT_PASSED", $lng->txt("exc_passed"));
         $this->tpl->setVariable("TXT_FAILED", $lng->txt("exc_failed"));
         if (($sd = ilExAssignment::lookupStatusTimeOfUser($d["id"], $this->part_id)) > 0) {
             $this->tpl->setCurrentBlock("status_date");
             $this->tpl->setVariable("TXT_LAST_CHANGE", $lng->txt("last_change"));
             $this->tpl->setVariable('VAL_STATUS_DATE', ilDatePresentation::formatDate(new ilDateTime($sd, IL_CAL_DATETIME)));
             $this->tpl->parseCurrentBlock();
         }
         switch ($status) {
             case "passed":
                 $pic = "scorm/passed.svg";
                 break;
             case "failed":
                 $pic = "scorm/failed.svg";
                 break;
             default:
                 $pic = "scorm/not_attempted.svg";
                 break;
         }
         $this->tpl->setVariable("IMG_STATUS", ilUtil::getImagePath($pic));
         $this->tpl->setVariable("ALT_STATUS", $lng->txt("exc_" . $status));
         // mark
         $this->tpl->setVariable("TXT_MARK", $lng->txt("exc_mark"));
         $this->tpl->setVariable("NAME_MARK", "mark[" . $d["id"] . "]");
         $mark = ilExAssignment::lookupMarkOfUser($d["id"], $this->part_id);
         $this->tpl->setVariable("VAL_MARK", ilUtil::prepareFormOutput($mark));
         // feedback
         $ilCtrl->setParameter($this->parent_obj, "member_id", $this->part_id);
         if (($ft = ilExAssignment::lookupFeedbackTimeOfUser($d["id"], $this->part_id)) > 0) {
             $this->tpl->setCurrentBlock("feedback_date");
             $this->tpl->setVariable("TXT_FEEDBACK_MAIL_SENT", sprintf($lng->txt("exc_sent_at"), ilDatePresentation::formatDate(new ilDateTime($ft, IL_CAL_DATETIME))));
             $this->tpl->parseCurrentBlock();
         }
         $ilCtrl->setParameter($this, "rcp_to", $this->user->getLogin());
         $this->tpl->setVariable("LINK_FEEDBACK", $ilCtrl->getLinkTarget($this->parent_obj, "redirectFeedbackMail"));
         //"ilias.php?baseClass=ilMailGUI&type=new&rcp_to=".$mem_obj->getLogin());
         $this->tpl->setVariable("TXT_FEEDBACK", $lng->txt("exc_send_mail"));
         $ilCtrl->setParameter($this->parent_obj, "rcp_to", "");
         if ($d["type"] == ilExAssignment::TYPE_UPLOAD_TEAM) {
             $feedback_id = "t" . ilExAssignment::getTeamIdByAssignment($d["id"], $this->part_id);
         } else {
             $feedback_id = $this->part_id;
         }
         $storage = new ilFSStorageExercise($this->exc_id, $d["id"]);
         $cnt_files = $storage->countFeedbackFiles($feedback_id);
         $ilCtrl->setParameter($this->parent_obj, "fsmode", "feedbackpart");
         $this->tpl->setVariable("LINK_FILE_FEEDBACK", $ilCtrl->getLinkTargetByClass("ilfilesystemgui", "listFiles"));
         if ($cnt_files == 0) {
             $this->tpl->setVariable("TXT_FILE_FEEDBACK", $lng->txt("exc_add_feedback_file"));
         } else {
             $this->tpl->setVariable("TXT_FILE_FEEDBACK", $lng->txt("exc_fb_files") . " (" . $cnt_files . ")");
         }
         // peer review / rating
         if ($d["type"] != ilExAssignment::TYPE_UPLOAD_TEAM && $d["peer"]) {
             $this->tpl->setCurrentBlock("peer_review_bl");
             $this->tpl->setVariable("TXT_PEER_REVIEW", $lng->txt("exc_peer_review_show"));
             $ilCtrl->setParameter($this->parent_obj, "grd", 2);
             $this->tpl->setVariable("LINK_PEER_REVIEW", $ilCtrl->getLinkTarget($this->parent_obj, "showPersonalPeerReview"));
             $ilCtrl->setParameter($this->parent_obj, "grd", "");
             $rating = new ilRatingGUI();
             $rating->setObject($d["id"], "ass", $this->part_id, "peer");
             $rating->setUserId(0);
             $this->tpl->setVariable("VAL_RATING", $rating->getHTML(true, false));
             $this->tpl->parseCurrentBlock();
         }
         $ilCtrl->setParameter($this->parent_obj, "ass_id", $_GET["ass_id"]);
     } else {
         $this->tpl->touchBlock("member_has_no_team_bl");
     }
 }
 /**
  * Add new item selection to current page incl. toolbar (trigger) and overlay
  */
 public function render()
 {
     global $ilToolbar, $tpl, $lng;
     if ($this->mode == ilObjectDefinition::MODE_WORKSPACE) {
         if (!$this->parsePersonalWorkspace()) {
             return;
         }
     } else {
         if (!$this->parseRepository()) {
             return;
         }
     }
     $ov_id = "il_add_new_item_ov";
     $ov_trigger_id = $ov_id . "_tr";
     include_once "Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php";
     $ov = new ilOverlayGUI($ov_id);
     //		$ov->setAnchor($ov_trigger_id, "tl", "tr");
     //		$ov->setTrigger($ov_trigger_id, "click", $ov_trigger_id);
     $ov->add();
     // trigger
     $ov->addTrigger($ov_trigger_id, "click", $ov_trigger_id, false, "tl", "tr");
     // toolbar
     $ilToolbar->addButton($lng->txt("cntr_add_new_item"), "#", "", "", "", $ov_trigger_id, 'submit emphsubmit');
     // css?
     $tpl->setVariable("SELECT_OBJTYPE_REPOS", '<div id="' . $ov_id . '" style="display:none;" class="ilOverlay">' . $this->getHTML() . '</div>');
 }
 /**
  * Fill table row
  */
 protected function fillRow($member)
 {
     global $lng, $ilCtrl;
     include_once "./Services/Object/classes/class.ilObjectFactory.php";
     $member_id = $member["usr_id"];
     if (!($mem_obj = ilObjectFactory::getInstanceByObjId($member_id, false))) {
         return;
     }
     $has_no_team_yet = substr($member["team_id"], 0, 3) == "nty";
     if (!$has_no_team_yet) {
         // mail sent
         if ($this->sent_col) {
             if (ilExAssignment::lookupStatusSentOfUser($this->ass_id, $member_id)) {
                 $this->tpl->setCurrentBlock("mail_sent");
                 if (($st = ilExAssignment::lookupSentTimeOfUser($this->ass_id, $member_id)) > 0) {
                     $this->tpl->setVariable("TXT_MAIL_SENT", sprintf($lng->txt("exc_sent_at"), ilDatePresentation::formatDate(new ilDateTime($st, IL_CAL_DATETIME))));
                 } else {
                     $this->tpl->setVariable("TXT_MAIL_SENT", $lng->txt("sent"));
                 }
                 $this->tpl->parseCurrentBlock();
             } else {
                 $this->tpl->setCurrentBlock("mail_sent");
                 $this->tpl->setVariable("TXT_MAIL_SENT", "&nbsp;");
                 $this->tpl->parseCurrentBlock();
             }
         }
         // checkbox
         $this->tpl->setVariable("VAL_CHKBOX", ilUtil::formCheckbox(0, "member[{$member_id}]", 1));
         $this->tpl->setVariable("VAL_ID", $member_id);
     }
     $file_info = ilExAssignment::getDownloadedFilesInfoForTableGUIS($this->parent_obj, $this->exc_id, $this->type, $this->ass_id, $member_id, $this->parent_cmd);
     // name and login
     if (!isset($member["team"])) {
         $this->tpl->setVariable("TXT_NAME", $member["name"]);
         if (in_array("login", $this->selected)) {
             $this->tpl->setVariable("TXT_LOGIN", "[" . $member["login"] . "]");
         }
         if (in_array("image", $this->selected)) {
             // image
             $this->tpl->setVariable("USR_IMAGE", $mem_obj->getPersonalPicturePath("xxsmall"));
             $this->tpl->setVariable("USR_ALT", $lng->txt("personal_picture"));
         }
     } else {
         $this->tpl->setCurrentBlock("team_member");
         asort($member["team"]);
         foreach ($member["team"] as $member_name) {
             $this->tpl->setVariable("TXT_MEMBER_NAME", $member_name);
             $this->tpl->parseCurrentBlock();
         }
         if (!$has_no_team_yet) {
             $this->tpl->setCurrentBlock("team_log");
             $ilCtrl->setParameter($this->parent_obj, "lmem", $member_id);
             $this->tpl->setVariable("HREF_LOG", $ilCtrl->getLinkTarget($this->parent_obj, "showTeamLog"));
             $this->tpl->setVariable("TXT_LOG", $lng->txt("exc_team_log"));
             $ilCtrl->setParameter($this->parent_obj, "lmem", "");
             $this->tpl->parseCurrentBlock();
         } else {
             // #11957
             $this->tpl->setCurrentBlock("team_info");
             $this->tpl->setVariable("TXT_TEAM_INFO", $lng->txt("exc_no_team_yet"));
             $this->tpl->setVariable("TXT_CREATE_TEAM", $lng->txt("exc_create_team"));
             $ilCtrl->setParameter($this->parent_obj, "lmem", $member_id);
             $this->tpl->setVariable("URL_CREATE_TEAM", $ilCtrl->getLinkTarget($this->getParentObject(), "createSingleMemberTeam"));
             $ilCtrl->setParameter($this->parent_obj, "lmem", "");
             if ($file_info["files"]["count"]) {
                 $this->tpl->setVariable("TEAM_FILES_INFO", "<br />" . $file_info["files"]["txt"] . ": " . $file_info["files"]["count"]);
             }
             $this->tpl->parseCurrentBlock();
         }
     }
     if (!$has_no_team_yet) {
         $this->tpl->setVariable("VAL_LAST_SUBMISSION", $file_info["last_submission"]["value"]);
         $this->tpl->setVariable("TXT_LAST_SUBMISSION", $file_info["last_submission"]["txt"]);
         $this->tpl->setVariable("TXT_SUBMITTED_FILES", $file_info["files"]["txt"]);
         $this->tpl->setVariable("VAL_SUBMITTED_FILES", $file_info["files"]["count"]);
         if ($file_info["files"]["download_url"]) {
             $this->tpl->setCurrentBlock("download_link");
             $this->tpl->setVariable("LINK_DOWNLOAD", $file_info["files"]["download_url"]);
             $this->tpl->setVariable("TXT_DOWNLOAD", $file_info["files"]["download_txt"]);
             $this->tpl->parseCurrentBlock();
         }
         if ($file_info["files"]["download_new_url"]) {
             $this->tpl->setCurrentBlock("download_link");
             $this->tpl->setVariable("LINK_NEW_DOWNLOAD", $file_info["files"]["download_new_url"]);
             $this->tpl->setVariable("TXT_NEW_DOWNLOAD", $file_info["files"]["download_new_txt"]);
             $this->tpl->parseCurrentBlock();
         }
         // note
         $this->tpl->setVariable("TXT_NOTE", $lng->txt("exc_note_for_tutor"));
         $this->tpl->setVariable("NAME_NOTE", "notice[{$member_id}]");
         $this->tpl->setVariable("VAL_NOTE", ilUtil::prepareFormOutput(ilExAssignment::lookupNoticeOfUser($this->ass_id, $member_id)));
         // comment for learner
         $lcomment_value = ilExAssignment::lookupCommentForUser($this->ass_id, $member_id);
         $overlay_id = "excasscomm_" . $this->ass_id . "_" . $member_id;
         $overlay_trigger_id = $overlay_id . "_tr";
         $overlay = new ilOverlayGUI($overlay_id);
         $overlay->setAnchor($overlay_trigger_id);
         $overlay->setTrigger($overlay_trigger_id, "click", $overlay_trigger_id);
         $overlay->add();
         $this->tpl->setVariable("LCOMMENT_ID", $overlay_id . "_snip");
         $this->tpl->setVariable("LCOMMENT_SNIPPET", ilUtil::shortenText($lcomment_value, 25, true));
         $this->tpl->setVariable("COMMENT_OVERLAY_TRIGGER_ID", $overlay_trigger_id);
         $this->tpl->setVariable("COMMENT_OVERLAY_TRIGGER_TEXT", $lng->txt("exc_comment_for_learner_edit"));
         $lcomment_form = new ilPropertyFormGUI();
         $lcomment_form->setId($overlay_id);
         $lcomment_form->setPreventDoubleSubmission(false);
         $lcomment = new ilTextAreaInputGUI($lng->txt("exc_comment_for_learner"), "lcomment_" . $this->ass_id . "_" . $member_id);
         $lcomment->setInfo($lng->txt("exc_comment_for_learner_info"));
         $lcomment->setValue($lcomment_value);
         $lcomment->setCols(45);
         $lcomment->setRows(10);
         $lcomment_form->addItem($lcomment);
         $lcomment_form->addCommandButton("save", $lng->txt("save"));
         // $lcomment_form->addCommandButton("cancel", $lng->txt("cancel"));
         $this->overlay_tpl->setCurrentBlock("overlay_bl");
         $this->overlay_tpl->setVariable("COMMENT_OVERLAY_ID", $overlay_id);
         $this->overlay_tpl->setVariable("COMMENT_OVERLAY_FORM", $lcomment_form->getHTML());
         $this->overlay_tpl->parseCurrentBlock();
         // solved
         //$this->tpl->setVariable("CHKBOX_SOLVED",
         //	ilUtil::formCheckbox($this->exc->members_obj->getStatusByMember($member_id),"solved[$member_id]",1));
         $status = ilExAssignment::lookupStatusOfUser($this->ass_id, $member_id);
         $this->tpl->setVariable("SEL_" . strtoupper($status), ' selected="selected" ');
         $this->tpl->setVariable("TXT_NOTGRADED", $lng->txt("exc_notgraded"));
         $this->tpl->setVariable("TXT_PASSED", $lng->txt("exc_passed"));
         $this->tpl->setVariable("TXT_FAILED", $lng->txt("exc_failed"));
         if (($sd = ilExAssignment::lookupStatusTimeOfUser($this->ass_id, $member_id)) > 0) {
             $this->tpl->setCurrentBlock("status_date");
             $this->tpl->setVariable("TXT_LAST_CHANGE", $lng->txt("last_change"));
             $this->tpl->setVariable('VAL_STATUS_DATE', ilDatePresentation::formatDate(new ilDateTime($sd, IL_CAL_DATETIME)));
             $this->tpl->parseCurrentBlock();
         }
         switch ($status) {
             case "passed":
                 $pic = "scorm/passed.svg";
                 break;
             case "failed":
                 $pic = "scorm/failed.svg";
                 break;
             default:
                 $pic = "scorm/not_attempted.svg";
                 break;
         }
         $this->tpl->setVariable("IMG_STATUS", ilUtil::getImagePath($pic));
         $this->tpl->setVariable("ALT_STATUS", $lng->txt("exc_" . $status));
         // mark
         $this->tpl->setVariable("TXT_MARK", $lng->txt("exc_mark"));
         $this->tpl->setVariable("NAME_MARK", "mark[{$member_id}]");
         $mark = ilExAssignment::lookupMarkOfUser($this->ass_id, $member_id);
         $this->tpl->setVariable("VAL_MARK", ilUtil::prepareFormOutput($mark));
         // feedback
         $ilCtrl->setParameter($this->parent_obj, "member_id", $member_id);
         if (($ft = ilExAssignment::lookupFeedbackTimeOfUser($this->ass_id, $member_id)) > 0) {
             $this->tpl->setCurrentBlock("feedback_date");
             $this->tpl->setVariable("TXT_FEEDBACK_MAIL_SENT", sprintf($lng->txt("exc_sent_at"), ilDatePresentation::formatDate(new ilDateTime($ft, IL_CAL_DATETIME))));
             $this->tpl->parseCurrentBlock();
         }
         // feedback mail
         $this->tpl->setVariable("LINK_FEEDBACK", $ilCtrl->getLinkTarget($this->parent_obj, "redirectFeedbackMail"));
         $this->tpl->setVariable("TXT_FEEDBACK", $lng->txt("exc_send_mail"));
         if ($this->type == ilExAssignment::TYPE_UPLOAD_TEAM) {
             $feedback_id = "t" . $member["team_id"];
         } else {
             $feedback_id = $member_id;
         }
         // file feedback
         $cnt_files = $this->storage->countFeedbackFiles($feedback_id);
         $ilCtrl->setParameter($this->parent_obj, "fsmode", "feedback");
         $this->tpl->setVariable("LINK_FILE_FEEDBACK", $ilCtrl->getLinkTargetByClass("ilfilesystemgui", "listFiles"));
         if ($cnt_files == 0) {
             $this->tpl->setVariable("TXT_FILE_FEEDBACK", $lng->txt("exc_add_feedback_file"));
         } else {
             $this->tpl->setVariable("TXT_FILE_FEEDBACK", $lng->txt("exc_fb_files") . " (" . $cnt_files . ")");
         }
         // peer review / rating
         if (!isset($member["team"]) && $this->peer_review) {
             $this->tpl->setCurrentBlock("peer_review_bl");
             $this->tpl->setVariable("TXT_PEER_REVIEW", $lng->txt("exc_peer_review_show"));
             $ilCtrl->setParameter($this->parent_obj, "grd", 1);
             $this->tpl->setVariable("LINK_PEER_REVIEW", $ilCtrl->getLinkTarget($this->parent_obj, "showPersonalPeerReview"));
             $ilCtrl->setParameter($this->parent_obj, "grd", "");
             $rating = new ilRatingGUI();
             $rating->setObject($this->ass_id, "ass", $member_id, "peer");
             $rating->setUserId(0);
             $this->tpl->setVariable("VAL_RATING", $rating->getHTML(true, false));
             $this->tpl->parseCurrentBlock();
         }
         $this->tpl->parseCurrentBlock();
     } else {
         $this->tpl->touchBlock("member_has_no_team_bl");
     }
 }