/**
  * Global user settings
  *
  * Allows to define global settings for user accounts
  *
  * Note: The Global user settings form allows to specify default values
  *       for some user preferences. To avoid redundant implementations, 
  *       specification of default values can be done elsewhere in ILIAS
  *       are not supported by this form. 
  */
 function exportObject()
 {
     global $ilias, $ilCtrl;
     if ($_POST["cmd"]["export"]) {
         $this->object->buildExportFile($_POST["export_type"]);
         $this->ctrl->redirectByClass("ilobjuserfoldergui", "export");
         exit;
     }
     $this->tpl->addBlockfile('ADM_CONTENT', 'adm_content', 'tpl.usr_export.html', 'Services/User');
     $export_types = array("userfolder_export_excel_x86", "userfolder_export_csv", "userfolder_export_xml");
     // create table
     include_once "./Services/Table/classes/class.ilTableGUI.php";
     $tbl = new ilTableGUI();
     // load files templates
     $this->tpl->addBlockfile("EXPORT_FILES", "export_files", "tpl.table.html");
     // load template for table content data
     $this->tpl->addBlockfile("TBL_CONTENT", "tbl_content", "tpl.usr_export_file_row.html", "Services/User");
     $num = 0;
     $tbl->setTitle($this->lng->txt("userfolder_export_files"));
     $tbl->setHeaderNames(array("", $this->lng->txt("userfolder_export_file"), $this->lng->txt("userfolder_export_file_size"), $this->lng->txt("date")));
     $tbl->setHeaderVars(array(), $ilCtrl->getParameterArray($this, "export"));
     $tbl->enabled["sort"] = false;
     $tbl->setColumnWidth(array("1%", "49%", "25%", "25%"));
     // control
     $tbl->setOrderColumn($_GET["sort_by"]);
     $tbl->setOrderDirection($_GET["sort_order"]);
     $tbl->setLimit($_GET["limit"]);
     $tbl->setOffset($_GET["offset"]);
     $tbl->setMaxCount($this->maxcount);
     // ???
     $this->tpl->setVariable("COLUMN_COUNTS", 4);
     // delete button
     $this->tpl->setVariable("IMG_ARROW", ilUtil::getImagePath("arrow_downright.png"));
     $this->tpl->setVariable("ALT_ARROW", $this->lng->txt("actions"));
     $this->tpl->setCurrentBlock("tbl_action_btn");
     $this->tpl->setVariable("BTN_NAME", "confirmDeleteExportFile");
     $this->tpl->setVariable("BTN_VALUE", $this->lng->txt("delete"));
     $this->tpl->parseCurrentBlock();
     $this->tpl->setCurrentBlock("tbl_action_btn");
     $this->tpl->setVariable("BTN_NAME", "downloadExportFile");
     $this->tpl->setVariable("BTN_VALUE", $this->lng->txt("download"));
     $this->tpl->parseCurrentBlock();
     // footer
     $tbl->setFooter("tblfooter", $this->lng->txt("previous"), $this->lng->txt("next"));
     //$tbl->disable("footer");
     $export_files = $this->object->getExportFiles();
     $tbl->setMaxCount(count($export_files));
     $export_files = array_slice($export_files, $_GET["offset"], $_GET["limit"]);
     $tbl->render();
     if (count($export_files) > 0) {
         $i = 0;
         foreach ($export_files as $exp_file) {
             $this->tpl->setCurrentBlock("tbl_content");
             $this->tpl->setVariable("TXT_FILENAME", $exp_file["filename"]);
             $css_row = ilUtil::switchColor($i++, "tblrow1", "tblrow2");
             $this->tpl->setVariable("CSS_ROW", $css_row);
             $this->tpl->setVariable("TXT_SIZE", $exp_file["filesize"]);
             $this->tpl->setVariable("CHECKBOX_ID", $exp_file["filename"]);
             $file_arr = explode("__", $exp_file["filename"]);
             $this->tpl->setVariable('TXT_DATE', ilDatePresentation::formatDate(new ilDateTime($file_arr[0], IL_CAL_UNIX)));
             $this->tpl->parseCurrentBlock();
         }
         $this->tpl->setCurrentBlock("selectall");
         $this->tpl->setVariable("SELECT_ALL", $this->lng->txt("select_all"));
         $this->tpl->setVariable("CSS_ROW", $css_row);
         $this->tpl->parseCurrentBlock();
     }
     //if is_array
     /*
     else
     
     {
     	$this->tpl->setCurrentBlock("notfound");
     	$this->tpl->setVariable("TXT_OBJECT_NOT_FOUND", $this->lng->txt("obj_not_found"));
     	$this->tpl->setVariable("NUM_COLS", 3);
     	$this->tpl->parseCurrentBlock();
     }
     */
     $this->tpl->parseCurrentBlock();
     foreach ($export_types as $export_type) {
         $this->tpl->setCurrentBlock("option");
         $this->tpl->setVariable("OPTION_VALUE", $export_type);
         $this->tpl->setVariable("OPTION_TEXT", $this->lng->txt($export_type));
         $this->tpl->parseCurrentBlock();
     }
     $this->tpl->setVariable("EXPORT_BUTTON", $this->lng->txt("create_export_file"));
     $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
 }
 /**
  * Print out statistics about the language
  */
 function statisticsObject()
 {
     $modules = ilObjLanguageExt::_getModules($this->object->key);
     $data = array();
     $total = array("", 0, 0, 0);
     foreach ($modules as $module) {
         $row = array();
         $row[0] = $module;
         $row[1] = count($this->object->getAllValues(array($module)));
         $row[2] = count($this->object->getChangedValues(array($module)));
         $row[3] = $row[1] - $row[2];
         $total[1] += $row[1];
         $total[2] += $row[2];
         $total[3] += $row[3];
         $data[] = $row;
     }
     $total[0] = "<b>" . $this->lng->txt("language_all_modules") . "</b>";
     $total[1] = "<b>" . $total[1] . "</b>";
     $total[2] = "<b>" . $total[2] . "</b>";
     $total[3] = "<b>" . $total[3] . "</b>";
     $data[] = $total;
     // prepare the templates for output
     $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.lang_statistics.html", "Services/Language");
     $this->tpl->addBlockFile("TABLE_STATISTICS", "table_statistics", "tpl.table.html");
     $this->tpl->addBlockFile("TBL_CONTENT", "tbl_content", "tpl.obj_tbl_rows.html");
     // create and configure the table object
     include_once 'Services/Table/classes/class.ilTableGUI.php';
     $tbl = new ilTableGUI();
     $tbl->disable('title');
     $tbl->disable('sort');
     $tbl->disable('numinfo');
     $tbl->setHeaderNames(array($this->lng->txt("module"), $this->lng->txt("language_scope_global"), $this->lng->txt("language_scope_local"), $this->lng->txt("language_scope_unchanged")));
     $tbl->setColumnWidth(array("25%", "25%", "25%", "25%"));
     $tbl->setLimit(count($data));
     $tbl->setData($data);
     // show the table
     $tbl->render();
     //		$this->tpl->show();
 }
 function view()
 {
     global $ilAccess, $ilErr;
     // MINIMUM ACCESS LEVEL = 'write'
     if (!$ilAccess->checkAccess("read", '', $this->course_obj->getRefId())) {
         $ilErr->raiseError($this->lng->txt('msg_no_perm_write'), $ilErr->MESSAGE);
     }
     $this->is_tutor = $ilAccess->checkAccess('write', '', $this->course_obj->getRefId());
     $this->download_allowed = ($this->is_tutor or $this->course_obj->getArchiveType() == $this->course_obj->ARCHIVE_DOWNLOAD);
     $this->course_obj->initCourseArchiveObject();
     $this->course_obj->archives_obj->initCourseFilesObject();
     $archives = $this->is_tutor ? $this->course_obj->archives_obj->getArchives() : $this->course_obj->archives_obj->getPublicArchives();
     require_once "./Services/Table/classes/class.ilTableGUI.php";
     $tbl = new ilTableGUI();
     $this->__showArchivesMenu();
     $this->tpl->addBlockfile("ADM_CONTENT", "adm_content", "tpl.table.html");
     $this->tpl->addBlockfile("TBL_CONTENT", "tbl_content", "tpl.crs_archives_row.html", 'Modules/Course');
     $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
     $tbl->setTitle($this->lng->txt("crs_header_archives"));
     if ($this->download_allowed or $this->is_tutor) {
         $header_names = array('', $this->lng->txt("type"), $this->lng->txt("crs_file_name"), $this->lng->txt("crs_size"), $this->lng->txt("crs_create_date"), $this->lng->txt("crs_archive_lang"));
         $header_vars = array("", "type", "name", "size", "date", "lang");
         $column_width = array("1%", "9%", "30%", "20%", "20%", "20%");
         $this->tpl->setVariable("COLUMN_COUNTS", 6);
     } else {
         $header_names = array($this->lng->txt("type"), $this->lng->txt("crs_file_name"), $this->lng->txt("crs_create_date"), $this->lng->txt("crs_size"), $this->lng->txt("crs_archive_lang"));
         $header_vars = array("type", "name", "date", "size", "lang");
         $column_width = array("10%", "30%", "20%", "20%", "20%");
         $this->tpl->setVariable("COLUMN_COUNTS", 5);
     }
     $tbl->setHeaderNames($header_names);
     $tbl->setHeaderVars($header_vars, array("ref_id" => $this->course_obj->getRefId(), "cmd" => "view", "cmdClass" => strtolower(get_class($this))));
     $tbl->setColumnWidth($column_width);
     // control
     $tbl->setOrderColumn($_GET["sort_by"]);
     $tbl->setOrderDirection($_GET["sort_order"]);
     $tbl->setLimit($_GET["limit"]);
     $tbl->setOffset($_GET["offset"]);
     $tbl->disable("sort");
     if ($this->download_allowed) {
         $this->tpl->setVariable("IMG_ARROW", ilUtil::getImagePath("arrow_downright.png"));
         if ($this->is_tutor) {
             // delete
             $this->tpl->setCurrentBlock("tbl_action_btn");
             $this->tpl->setVariable("BTN_NAME", "confirmDeleteArchives");
             $this->tpl->setVariable("BTN_VALUE", $this->lng->txt("delete"));
             $this->tpl->parseCurrentBlock();
         }
         // download
         $this->tpl->setCurrentBlock("tbl_action_btn");
         $this->tpl->setVariable("BTN_NAME", "downloadArchives");
         $this->tpl->setVariable("BTN_VALUE", $this->lng->txt("download"));
         $this->tpl->parseCurrentBlock();
     }
     $tbl->setFooter("tblfooter", $this->lng->txt("previous"), $this->lng->txt("next"));
     $tbl->setMaxCount(count($archives));
     $archives = array_slice($archives, $_GET['offset'], $_GET['limit']);
     $tbl->render();
     if (!count($archives)) {
         $this->tpl->setCurrentBlock("notfound");
         $this->tpl->setVariable("TXT_OBJECT_NOT_FOUND", $this->lng->txt("obj_not_found"));
         $this->tpl->setVariable("NUM_COLS", 6);
         $this->tpl->parseCurrentBlock();
     }
     $counter = 0;
     foreach ($archives as $archive_data) {
         $this->tpl->setCurrentBlock("tbl_content");
         $this->tpl->setVariable("CSS_ROW", ilUtil::switchColor($counter++, 'tblrow1', 'tblrow2'));
         if ($this->download_allowed) {
             $this->tpl->setVariable("VAL_CHECK", ilUtil::formCheckbox(0, "archives[]", $archive_data['archive_id']));
         }
         // Type
         switch ($archive_data["archive_type"]) {
             case $this->course_obj->archives_obj->ARCHIVE_XML:
                 $type = $this->lng->txt("crs_xml");
                 break;
             case $this->course_obj->archives_obj->ARCHIVE_HTML:
                 $type = $this->lng->txt("crs_html");
                 break;
             case $this->course_obj->archives_obj->ARCHIVE_PDF:
                 $type = $this->lng->txt("crs_pdf");
                 break;
         }
         $this->tpl->setVariable("VAL_TYPE", $type);
         // Name
         if ($archive_data['archive_type'] == $this->course_obj->archives_obj->ARCHIVE_HTML) {
             $link = '<a href="' . $this->course_obj->archives_obj->course_files_obj->getOnlineLink($archive_data['archive_name']) . '"' . ' target="_blank">' . $archive_data["archive_name"] . '</a>';
         } else {
             $link = $archive_data['archive_name'];
         }
         $this->tpl->setVariable("VAL_NAME", $link);
         $this->tpl->setVariable("VAL_SIZE", $archive_data['archive_size']);
         $this->tpl->setVariable('VAL_DATE', ilDatePresentation::formatDate(new ilDateTime($archive_data['archive_name'], IL_CAL_UNIX)));
         if ($archive_data["archive_lang"]) {
             $this->tpl->setVariable("VAL_LANG", $this->lng->txt('lang_' . $archive_data["archive_lang"]));
         } else {
             $this->tpl->setVariable("VAL_LANG", $this->lng->txt('crs_not_available'));
         }
         $this->tpl->parseCurrentBlock();
     }
     $this->tpl->parseCurrentBlock();
 }
 /**
  * get versions table
  */
 function getVersionsTable($a_header_params, $a_user_comment = false)
 {
     global $ilCtrl;
     $ref_id = $a_header_params["ref_id"];
     require_once "./Services/Table/classes/class.ilTableGUI.php";
     $tbl = new ilTableGUI(0, false);
     // table header
     $tbl->setTitle($this->lng->txt("versions"));
     $tbl->setHeaderNames(array($this->lng->txt("date") . "/" . $this->lng->txt("user"), $this->lng->txt("action")));
     $tbl->setColumnWidth(array("40%", "60%"));
     $cols = array("date_user", "action");
     if ($a_header_params == "") {
         $a_header_params = array();
     }
     $header_params = $a_header_params;
     $tbl->setHeaderVars($cols, $header_params);
     // table variables
     $tbl->setOrderColumn($_GET["sort_by"]);
     $tbl->setOrderDirection($_GET["sort_order"]);
     $tbl->setLimit($_GET["limit"]);
     $tbl->setOffset($_GET["offset"]);
     $tbl->setMaxCount($this->maxcount);
     // ???
     $tbl->disable("header");
     // footer
     $tbl->setFooter("tblfooter", $this->lng->txt("previous"), $this->lng->txt("next"));
     // get history entries
     $entries = ilHistory::_getEntriesForObject($this->obj_id, $this->obj_type);
     $tbl->setMaxCount(count($entries));
     $entries = array_slice($entries, $_GET["offset"], $_GET["limit"]);
     $this->tpl =& $tbl->getTemplateObject();
     $this->tpl->addBlockfile("TBL_CONTENT", "tbl_content", "tpl.history_row.html", "Services/History");
     if (count($entries) > 0) {
         $i = 0;
         foreach ($entries as $entry) {
             $this->tpl->setCurrentBlock("tbl_content");
             $css_row = $css_row != "tblrow1" ? "tblrow1" : "tblrow2";
             $this->tpl->setVariable("CSS_ROW", $css_row);
             $this->tpl->setVariable('TXT_DATE', ilDatePresentation::formatDate(new ilDateTime($entry['date'], IL_CAL_DATETIME)));
             $name = ilObjUser::_lookupName($entry["user_id"]);
             $this->tpl->setVariable("TXT_USER", $name["title"] . " " . $name["firstname"] . " " . $name["lastname"] . " [" . $entry["user_id"] . "]");
             $info_params = explode(",", $entry["info_params"]);
             $info_text = $this->lng->txt("hist_" . $this->obj_type . "_" . $entry["action"]);
             $i = 1;
             foreach ($info_params as $info_param) {
                 $info_text = str_replace("%" . $i, $info_param, $info_text);
                 $i++;
             }
             $this->tpl->setVariable("TXT_ACTION", $info_text);
             if ($a_user_comment) {
                 $this->tpl->setCurrentBlock("user_comment");
                 $this->tpl->setVariable("TXT_USER_COMMENT", $entry["user_comment"]);
                 $this->tpl->parseCurrentBlock();
                 $this->tpl->setCurrentBlock("tbl_content");
             }
             $this->tpl->setCurrentBlock("dl_link");
             $this->tpl->setVariable("TXT_DL", $this->lng->txt("download"));
             $ilCtrl->setParameterByClass("ilobjfilegui", "hist_id", $entry["hist_entry_id"]);
             $this->tpl->setVariable("DL_LINK", $ilCtrl->getLinkTargetByClass("ilobjfilegui", "sendfile"));
             $this->tpl->setCurrentBlock("tbl_content");
             $this->tpl->parseCurrentBlock();
         }
     } else {
         $this->tpl->setCurrentBlock("tbl_content_cell");
         $this->tpl->setVariable("TBL_CONTENT_CELL", $this->lng->txt("hist_no_entries"));
         $this->tpl->setVariable("TBL_COL_SPAN", 4);
         $this->tpl->parseCurrentBlock();
         $this->tpl->setCurrentBlock("tbl_content_row");
         $this->tpl->setVariable("ROWCOLOR", "tblrow1");
         $this->tpl->parseCurrentBlock();
     }
     $tbl->render();
     //$this->tpl->parseCurrentBlock();
     return $this->tpl->get();
 }
 /**
  * show download list
  */
 function showDownloadList()
 {
     global $ilBench, $ilAccess, $ilias, $lng, $ilTabs;
     if (!$ilAccess->checkAccess("read", "", $_GET["ref_id"])) {
         $ilias->raiseError($lng->txt("permission_denied"), $ilias->error_obj->MESSAGE);
     }
     $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.glo_download_list.html", "Modules/Glossary");
     $this->setTabs();
     $ilTabs->activateTab("download");
     // set title header
     $this->tpl->setTitle($this->glossary->getTitle());
     //$this->tpl->setVariable("IMG_HEADER", ilUtil::getImagePath("icon_glo_b.png"));
     $this->tpl->setTitleIcon(ilUtil::getImagePath("icon_glo_b.png"));
     // create table
     require_once "./Services/Table/classes/class.ilTableGUI.php";
     $tbl = new ilTableGUI();
     // load files templates
     $this->tpl->addBlockfile("DOWNLOAD_TABLE", "download_table", "tpl.table.html");
     // load template for table content data
     $this->tpl->addBlockfile("TBL_CONTENT", "tbl_content", "tpl.download_file_row.html", "Modules/Glossary");
     $export_files = array();
     $types = array("xml", "html");
     foreach ($types as $type) {
         if ($this->glossary->getPublicExportFile($type) != "") {
             $dir = $this->glossary->getExportDirectory($type);
             if (is_file($this->glossary->getExportDirectory($type) . "/" . $this->glossary->getPublicExportFile($type))) {
                 $size = filesize($this->glossary->getExportDirectory($type) . "/" . $this->glossary->getPublicExportFile($type));
                 $export_files[] = array("type" => $type, "file" => $this->glossary->getPublicExportFile($type), "size" => $size);
             }
         }
     }
     $num = 0;
     $tbl->setTitle($this->lng->txt("download"));
     $tbl->setHeaderNames(array($this->lng->txt("cont_format"), $this->lng->txt("cont_file"), $this->lng->txt("size"), $this->lng->txt("date"), ""));
     $cols = array("format", "file", "size", "date", "download");
     $header_params = array("ref_id" => $_GET["ref_id"], "obj_id" => $_GET["obj_id"], "cmd" => "showDownloadList", "cmdClass" => strtolower(get_class($this)));
     $tbl->setHeaderVars($cols, $header_params);
     $tbl->setColumnWidth(array("10%", "30%", "20%", "20%", "20%"));
     $tbl->disable("sort");
     // control
     $tbl->setOrderColumn($_GET["sort_by"]);
     $tbl->setOrderDirection($_GET["sort_order"]);
     $tbl->setLimit($_GET["limit"]);
     $tbl->setOffset($_GET["offset"]);
     $tbl->setMaxCount($this->maxcount);
     // ???
     $this->tpl->setVariable("COLUMN_COUNTS", 5);
     // footer
     //$tbl->setFooter("tblfooter",$this->lng->txt("previous"),$this->lng->txt("next"));
     $tbl->disable("footer");
     $tbl->setMaxCount(count($export_files));
     $export_files = array_slice($export_files, $_GET["offset"], $_GET["limit"]);
     $tbl->render();
     if (count($export_files) > 0) {
         $i = 0;
         foreach ($export_files as $exp_file) {
             $this->tpl->setCurrentBlock("tbl_content");
             $this->tpl->setVariable("TXT_FILENAME", $exp_file["file"]);
             $css_row = ilUtil::switchColor($i++, "tblrow1", "tblrow2");
             $this->tpl->setVariable("CSS_ROW", $css_row);
             $this->tpl->setVariable("TXT_SIZE", $exp_file["size"]);
             $this->tpl->setVariable("TXT_FORMAT", strtoupper($exp_file["type"]));
             $this->tpl->setVariable("CHECKBOX_ID", $exp_file["type"] . ":" . $exp_file["file"]);
             $file_arr = explode("__", $exp_file["file"]);
             $this->tpl->setVariable("TXT_DATE", date("Y-m-d H:i:s", $file_arr[0]));
             $this->tpl->setVariable("TXT_DOWNLOAD", $this->lng->txt("download"));
             $this->ctrl->setParameter($this, "type", $exp_file["type"]);
             $this->tpl->setVariable("LINK_DOWNLOAD", $this->ctrl->getLinkTarget($this, "downloadExportFile"));
             $this->tpl->parseCurrentBlock();
         }
     } else {
         $this->tpl->setVariable("TXT_OBJECT_NOT_FOUND", $this->lng->txt("obj_not_found"));
         $this->tpl->setVariable("NUM_COLS", 5);
         $this->tpl->parseCurrentBlock();
     }
     //$this->tpl->show();
 }
 /**
 * show tracking data
 */
 function showTrackingItems()
 {
     include_once './Services/PrivacySecurity/classes/class.ilPrivacySettings.php';
     $privacy = ilPrivacySettings::_getInstance();
     if (!$privacy->enabledSahsProtocolData()) {
         $this->ilias->raiseError($this->lng->txt('permission_denied'), $this->ilias->error_obj->MESSAGE);
     }
     include_once "./Services/Table/classes/class.ilTableGUI.php";
     //set search
     if ($_POST["search_string"] != "") {
         $_SESSION["scorm_search_string"] = trim($_POST["search_string"]);
     } else {
         if (isset($_POST["search_string"]) && $_POST["search_string"] == "") {
             unset($_SESSION["scorm_search_string"]);
         }
     }
     // load template for search additions
     $this->tpl->addBlockfile("ADM_CONTENT", "adm_content", "tpl_scorm_track_items_search.html", "Modules/ScormAicc");
     // load template for table
     $this->tpl->addBlockfile("USR_TABLE", "usr_table", "tpl.table.html");
     // load template for table content data
     $this->tpl->addBlockfile("TBL_CONTENT", "tbl_content", "tpl.scorm_track_items.html", "Modules/ScormAicc");
     $num = 5;
     $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
     // create table
     $tbl = new ilTableGUI();
     // title & header columns
     if (isset($_SESSION["scorm_search_string"])) {
         $tbl->setTitle($this->lng->txt("cont_tracking_items") . ' - Aktive Suche: "' . $_SESSION["scorm_search_string"] . '"');
     } else {
         $tbl->setTitle($this->lng->txt("cont_tracking_items"));
     }
     $tbl->setHeaderNames(array("", $this->lng->txt("name"), $this->lng->txt("last_access"), $this->lng->txt("attempts"), $this->lng->txt("version")));
     $header_params = $this->ctrl->getParameterArray($this, "showTrackingItems");
     $tbl->setColumnWidth(array("1%", "50%", "29%", "10%", "10%"));
     $cols = array("user_id", "username", "last_access", "attempts", "version");
     $tbl->setHeaderVars($cols, $header_params);
     //set defaults
     $_GET["sort_order"] = $_GET["sort_order"] ? $_GET["sort_order"] : "asc";
     $_GET["sort_by"] = $_GET["sort_by"] ? $_GET["sort_by"] : "username";
     // control
     $tbl->setOrderColumn($_GET["sort_by"]);
     $tbl->setOrderDirection($_GET["sort_order"]);
     $tbl->setLimit($_GET["limit"]);
     $tbl->setOffset($_GET["offset"]);
     $tbl->setMaxCount($this->maxcount);
     $this->tpl->setVariable("COLUMN_COUNTS", 5);
     // delete button
     $this->tpl->setVariable("IMG_ARROW", ilUtil::getImagePath("arrow_downright.png"));
     $this->tpl->setCurrentBlock("tbl_action_btn");
     $this->tpl->setVariable("BTN_NAME", "deleteTrackingForUser");
     $this->tpl->setVariable("BTN_VALUE", $this->lng->txt("delete"));
     $this->tpl->parseCurrentBlock();
     // decrease attempts
     $this->tpl->setCurrentBlock("tbl_action_btn");
     $this->tpl->setVariable("BTN_NAME", "decreaseAttempts");
     $this->tpl->setVariable("BTN_VALUE", $this->lng->txt("decrease_attempts"));
     $this->tpl->parseCurrentBlock();
     // export aggregated data for selected users
     $this->tpl->setCurrentBlock("tbl_action_btn");
     $this->tpl->setVariable("BTN_NAME", "exportSelected");
     $this->tpl->setVariable("BTN_VALUE", $this->lng->txt("export"));
     $this->tpl->parseCurrentBlock();
     // add search and export all
     // export aggregated data for all users
     $this->tpl->setVariable("EXPORT_ACTION", $this->ctrl->getFormAction($this));
     $this->tpl->setVariable("EXPORT_ALL_VALUE", $this->lng->txt('cont_export_all'));
     $this->tpl->setVariable("EXPORT_ALL_NAME", "exportAll");
     $this->tpl->setVariable("IMPORT_VALUE", $this->lng->txt('import'));
     $this->tpl->setVariable("IMPORT_NAME", "Import");
     $this->tpl->setVariable("SEARCH_TXT_SEARCH", $this->lng->txt('search'));
     $this->tpl->setVariable("SEARCH_ACTION", $this->ctrl->getFormAction($this));
     $this->tpl->setVariable("SEARCH_NAME", 'showTrackingItems');
     if (isset($_SESSION["scorm_search_string"])) {
         $this->tpl->setVariable("STYLE", 'display:inline;');
     } else {
         $this->tpl->setVariable("STYLE", 'display:none;');
     }
     $this->tpl->setVariable("SEARCH_VAL", $_SESSION["scorm_search_string"]);
     $this->tpl->setVariable("SEARCH_VALUE", $this->lng->txt('search_users'));
     $this->tpl->parseCurrentBlock();
     // footer
     $tbl->setFooter("tblfooter", $this->lng->txt("previous"), $this->lng->txt("next"));
     $items = $this->object->getTrackedUsers($_SESSION["scorm_search_string"]);
     $tbl->setMaxCount(count($items));
     $items = ilUtil::sortArray($items, $_GET["sort_by"], $_GET["sort_order"]);
     $items = array_slice($items, $_GET["offset"], $_GET["limit"]);
     $tbl->render();
     if (count($items) > 0) {
         foreach ($items as $item) {
             if (ilObject::_exists($item["user_id"]) && ilObject::_lookUpType($item["user_id"]) == "usr") {
                 $user = new ilObjUser($item["user_id"]);
                 $this->tpl->setCurrentBlock("tbl_content");
                 $this->tpl->setVariable("VAL_USERNAME", $item["username"]);
                 $this->tpl->setVariable("VAL_LAST", ilDatePresentation::formatDate(new ilDateTime($item["last_access"], IL_CAL_DATETIME)));
                 $this->tpl->setVariable("VAL_ATTEMPT", $item["attempts"]);
                 $this->tpl->setVariable("VAL_VERSION", $item['version']);
                 $this->ctrl->setParameter($this, "user_id", $item["user_id"]);
                 $this->ctrl->setParameter($this, "obj_id", $_GET["obj_id"]);
                 $this->tpl->setVariable("LINK_ITEM", $this->ctrl->getLinkTarget($this, "showTrackingItem"));
                 $this->tpl->setVariable("CHECKBOX_ID", $item["user_id"]);
                 $css_row = ilUtil::switchColor($i++, "tblrow1", "tblrow2");
                 $this->tpl->setVariable("CSS_ROW", $css_row);
                 $this->tpl->parseCurrentBlock();
             }
         }
         $this->tpl->setCurrentBlock("selectall");
         $this->tpl->setVariable("SELECT_ALL", $this->lng->txt("select_all"));
         $this->tpl->setVariable("CSS_ROW", $css_row);
         $this->tpl->parseCurrentBlock();
     } else {
         $this->tpl->setCurrentBlock("notfound");
         $this->tpl->setVariable("TXT_OBJECT_NOT_FOUND", $this->lng->txt("obj_not_found"));
         $this->tpl->setVariable("NUM_COLS", $num);
         $this->tpl->parseCurrentBlock();
     }
 }
 /**
  * display object list
  *
  * @access	public
  */
 function displayList()
 {
     include_once "./Services/Table/classes/class.ilTableGUI.php";
     return;
     // load template for table
     $this->tpl->addBlockfile("ADM_CONTENT", "adm_content", "tpl.table.html");
     // load template for table content data
     $this->tpl->addBlockfile("TBL_CONTENT", "tbl_content", "tpl.obj_tbl_rows.html");
     $num = 0;
     $obj_str = $this->call_by_reference ? "" : "&obj_id=" . $this->obj_id;
     $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
     // create table
     $tbl = new ilTableGUI();
     // title & header columns
     $tbl->setTitle($this->object->getTitle());
     foreach ($this->data["cols"] as $val) {
         $header_names[] = $this->lng->txt($val);
     }
     $tbl->setHeaderNames($header_names);
     //$header_params = array("ref_id" => $this->ref_id);
     $header_params = $this->ctrl->getParameterArray($this, "view");
     $tbl->setHeaderVars($this->data["cols"], $header_params);
     $tbl->setColumnWidth(array("15", "75%", "25%"));
     // control
     $tbl->setOrderColumn($_GET["sort_by"]);
     $tbl->setOrderDirection($_GET["sort_order"]);
     $tbl->setLimit($_GET["limit"]);
     $tbl->setOffset($_GET["offset"]);
     $tbl->setMaxCount($this->maxcount);
     // footer
     $tbl->setFooter("tblfooter", $this->lng->txt("previous"), $this->lng->txt("next"));
     //$tbl->disable("footer");
     // render table
     $tbl->render();
     if (is_array($this->data["data"][0])) {
         //table cell
         for ($i = 0; $i < count($this->data["data"]); $i++) {
             $data = $this->data["data"][$i];
             $ctrl = $this->data["ctrl"][$i];
             // color changing
             $css_row = ilUtil::switchColor($i + 1, "tblrow1", "tblrow2");
             $this->tpl->setCurrentBlock("table_cell");
             $this->tpl->setVariable("CELLSTYLE", "tblrow1");
             $this->tpl->parseCurrentBlock();
             foreach ($data as $key => $val) {
                 //build link
                 /*
                 
                 $n = 0;
                 
                 foreach ($ctrl as $key2 => $val2)
                 {
                 	$link .= $key2."=".$val2;
                 
                 	if ($n < count($ctrl)-1)
                 	{
                     	$link .= "&";
                 		$n++;
                 	}
                 }
                 
                 if ($key == "title")
                 {
                 	$name_field = explode("#separator#",$val);
                 }
                 
                 if ($key == "title" || $key == "type")
                 {
                 	$this->tpl->setCurrentBlock("begin_link");
                 	$this->tpl->setVariable("LINK_TARGET", $link);
                 
                 	$this->tpl->parseCurrentBlock();
                 	$this->tpl->touchBlock("end_link");
                 }
                 
                 $this->tpl->setCurrentBlock("text");
                 
                 if ($key == "type")
                 {
                 	$val = ilUtil::getImageTagByType($val,$this->tpl->tplPath);						
                 }
                 
                 if ($key == "title")
                 {
                 	$this->tpl->setVariable("TEXT_CONTENT", $name_field[0]);
                 	
                 	$this->tpl->setCurrentBlock("subtitle");
                 	$this->tpl->setVariable("DESC", $name_field[1]);
                 	$this->tpl->parseCurrentBlock();
                 }
                 else
                 {
                 	$this->tpl->setVariable("TEXT_CONTENT", $val);
                 }
                 				
                 $this->tpl->parseCurrentBlock();
                 
                 $this->tpl->setCurrentBlock("table_cell");
                 $this->tpl->parseCurrentBlock();
                 */
             }
             //foreach
             $this->tpl->setCurrentBlock("tbl_content");
             $this->tpl->setVariable("CSS_ROW", $css_row);
             $this->tpl->parseCurrentBlock();
         }
         //for
     } else {
         $this->tpl->setCurrentBlock("notfound");
         $this->tpl->setVariable("TXT_OBJECT_NOT_FOUND", $this->lng->txt("obj_not_found"));
         $this->tpl->setVariable("NUM_COLS", $num);
         $this->tpl->parseCurrentBlock();
     }
 }
 /**
  * show download list
  */
 function showDownloadList()
 {
     //$this->tpl = new ilTemplate("tpl.lm_toc.html", true, true, true);
     $this->tpl->setCurrentBlock("ContentStyle");
     if (!$this->offlineMode()) {
         $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET", ilObjStyleSheet::getContentStylePath($this->lm->getStyleSheetId()));
     } else {
         $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET", "content_style/content.css");
     }
     $this->tpl->parseCurrentBlock();
     $this->renderPageTitle();
     $this->tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
     $this->tpl->getStandardTemplate();
     $this->tpl->setVariable("TABS", $this->lm_gui->setilLMMenu($this->offlineMode(), $this->getExportFormat(), "download", true));
     $this->ilLocator();
     //$this->tpl->stopTitleFloating();
     $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.lm_download_list.html", "Modules/LearningModule");
     // set title header
     $this->tpl->setTitle($this->lm->getTitle());
     $this->tpl->setTitleIcon(ilUtil::getImagePath("icon_lm.svg"));
     /*
     		$this->tpl->setVariable("TXT_BACK", $this->lng->txt("back"));
     		$this->ctrl->setParameter($this, "obj_id", $_GET["obj_id"]);
     		$this->tpl->setVariable("LINK_BACK",
     			$this->ctrl->getLinkTarget($this, "")); */
     // output copyright information
     include_once 'Services/MetaData/classes/class.ilMD.php';
     $md = new ilMD($this->lm->getId(), 0, $this->lm->getType());
     if (is_object($md_rights = $md->getRights())) {
         $copyright = $md_rights->getDescription();
         include_once 'Services/MetaData/classes/class.ilMDUtils.php';
         $copyright = ilMDUtils::_parseCopyright($copyright);
         if ($copyright != "") {
             $this->lng->loadLanguageModule("meta");
             $this->tpl->setCurrentBlock("copyright");
             $this->tpl->setVariable("TXT_COPYRIGHT", $this->lng->txt("meta_copyright"));
             $this->tpl->setVariable("LM_COPYRIGHT", $copyright);
             $this->tpl->parseCurrentBlock();
         }
     }
     // create table
     require_once "./Services/Table/classes/class.ilTableGUI.php";
     $tbl = new ilTableGUI();
     // load files templates
     $this->tpl->addBlockfile("DOWNLOAD_TABLE", "download_table", "tpl.table.html");
     // load template for table content data
     $this->tpl->addBlockfile("TBL_CONTENT", "tbl_content", "tpl.download_file_row.html", "Modules/LearningModule");
     $export_files = array();
     $types = array("xml", "html", "scorm");
     foreach ($types as $type) {
         if ($this->lm->getPublicExportFile($type) != "") {
             if (is_file($this->lm->getExportDirectory($type) . "/" . $this->lm->getPublicExportFile($type))) {
                 $dir = $this->lm->getExportDirectory($type);
                 $size = filesize($this->lm->getExportDirectory($type) . "/" . $this->lm->getPublicExportFile($type));
                 $export_files[] = array("type" => $type, "file" => $this->lm->getPublicExportFile($type), "size" => $size);
             }
         }
     }
     $num = 0;
     $tbl->setTitle($this->lng->txt("download"));
     $tbl->setHeaderNames(array($this->lng->txt("cont_format"), $this->lng->txt("cont_file"), $this->lng->txt("size"), $this->lng->txt("date"), ""));
     $cols = array("format", "file", "size", "date", "download");
     $header_params = array("ref_id" => $_GET["ref_id"], "obj_id" => $_GET["obj_id"], "cmd" => "showDownloadList", "cmdClass" => strtolower(get_class($this)));
     $tbl->setHeaderVars($cols, $header_params);
     $tbl->setColumnWidth(array("10%", "30%", "20%", "20%", "20%"));
     $tbl->disable("sort");
     // control
     $tbl->setOrderColumn($_GET["sort_by"]);
     $tbl->setOrderDirection($_GET["sort_order"]);
     $tbl->setLimit($_GET["limit"]);
     $tbl->setOffset($_GET["offset"]);
     $tbl->setMaxCount($this->maxcount);
     // ???
     //$this->tpl->setVariable("COLUMN_COUNTS", 5);
     // footer
     //$tbl->setFooter("tblfooter",$this->lng->txt("previous"),$this->lng->txt("next"));
     $tbl->disable("footer");
     $tbl->setMaxCount(count($export_files));
     $export_files = array_slice($export_files, $_GET["offset"], $_GET["limit"]);
     $tbl->render();
     if (count($export_files) > 0) {
         $i = 0;
         foreach ($export_files as $exp_file) {
             if (!$exp_file["size"] > 0) {
                 continue;
             }
             $this->tpl->setCurrentBlock("tbl_content");
             $this->tpl->setVariable("TXT_FILENAME", $exp_file["file"]);
             $css_row = ilUtil::switchColor($i++, "tblrow1", "tblrow2");
             $this->tpl->setVariable("CSS_ROW", $css_row);
             $this->tpl->setVariable("TXT_SIZE", $exp_file["size"]);
             $this->tpl->setVariable("TXT_FORMAT", strtoupper($exp_file["type"]));
             $this->tpl->setVariable("CHECKBOX_ID", $exp_file["type"] . ":" . $exp_file["file"]);
             $file_arr = explode("__", $exp_file["file"]);
             $this->tpl->setVariable("TXT_DATE", date("Y-m-d H:i:s", $file_arr[0]));
             $this->tpl->setVariable("TXT_DOWNLOAD", $this->lng->txt("download"));
             $this->ctrl->setParameter($this, "type", $exp_file["type"]);
             $this->tpl->setVariable("LINK_DOWNLOAD", $this->ctrl->getLinkTarget($this, "downloadExportFile"));
             $this->tpl->parseCurrentBlock();
         }
     } else {
         $this->tpl->setCurrentBlock("notfound");
         $this->tpl->setVariable("TXT_OBJECT_NOT_FOUND", $this->lng->txt("obj_not_found"));
         $this->tpl->setVariable("NUM_COLS", 5);
         $this->tpl->parseCurrentBlock();
     }
     $this->tpl->show();
 }
 /**
  * list sessions of all user
  *
  * @access public
  * @param
  * @return
  */
 public function eventsListObject()
 {
     global $ilErr, $ilAccess, $ilUser, $tree;
     if (!$ilAccess->checkAccess('write', '', $this->object->getRefId())) {
         $ilErr->raiseError($this->lng->txt('msg_no_perm_read'), $ilErr->MESSAGE);
     }
     $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.sess_list.html', 'Modules/Session');
     $this->__showButton($this->ctrl->getLinkTarget($this, 'exportCSV'), $this->lng->txt('event_csv_export'));
     include_once 'Modules/Session/classes/class.ilEventParticipants.php';
     $this->tpl->addBlockfile("EVENTS_TABLE", "events_table", "tpl.table.html");
     $this->tpl->addBlockfile('TBL_CONTENT', 'tbl_content', 'tpl.sess_list_row.html', 'Modules/Session');
     $members_obj = $this->initContainer(true);
     $members = $members_obj->getParticipants();
     $members = ilUtil::_sortIds($members, 'usr_data', 'lastname', 'usr_id');
     // Table
     $tbl = new ilTableGUI();
     $tbl->setTitle($this->lng->txt("event_overview"), 'icon_usr.png', $this->lng->txt('obj_usr'));
     $this->ctrl->setParameter($this, 'offset', (int) $_GET['offset']);
     $course_ref_id = $tree->checkForParentType($this->object->getRefId(), 'crs');
     $events = array();
     foreach ($tree->getSubtree($tree->getNodeData($course_ref_id), false, 'sess') as $event_id) {
         $tmp_event = ilObjectFactory::getInstanceByRefId($event_id, false);
         if (!is_object($tmp_event) or $tmp_event->getType() != 'sess') {
             continue;
         }
         $events[] = $tmp_event;
     }
     $headerNames = array();
     $headerVars = array();
     $colWidth = array();
     $headerNames[] = $this->lng->txt('name');
     $headerVars[] = "name";
     $colWidth[] = '20%';
     for ($i = 1; $i <= count($events); $i++) {
         $headerNames[] = $i;
         $headerVars[] = "event_" . $i;
         $colWidth[] = 80 / count($events) . "%";
     }
     $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
     $tbl->setHeaderNames($headerNames);
     $tbl->setHeaderVars($headerVars, $this->ctrl->getParameterArray($this, 'eventsList'));
     $tbl->setColumnWidth($colWidth);
     $tbl->setOrderColumn($_GET["sort_by"]);
     $tbl->setOrderDirection($_GET["sort_order"]);
     $tbl->setOffset($_GET["offset"]);
     $tbl->setLimit($ilUser->getPref("hits_per_page"));
     $tbl->setMaxCount(count($members));
     $tbl->setFooter("tblfooter", $this->lng->txt("previous"), $this->lng->txt("next"));
     $sliced_users = array_slice($members, $_GET['offset'], $_SESSION['tbl_limit']);
     $tbl->disable('sort');
     $tbl->render();
     $counter = 0;
     foreach ($sliced_users as $user_id) {
         foreach ($events as $event_obj) {
             $this->tpl->setCurrentBlock("eventcols");
             $event_part = new ilEventParticipants($this->object->getId());
             $this->tpl->setVariable("IMAGE_PARTICIPATED", $event_part->hasParticipated($user_id) ? ilUtil::getImagePath('icon_ok.png') : ilUtil::getImagePath('icon_not_ok.png'));
             $this->tpl->setVariable("PARTICIPATED", $event_part->hasParticipated($user_id) ? $this->lng->txt('event_participated') : $this->lng->txt('event_not_participated'));
             $this->tpl->parseCurrentBlock();
         }
         $this->tpl->setCurrentBlock("tbl_content");
         $name = ilObjUser::_lookupName($user_id);
         $this->tpl->setVariable("CSS_ROW", ilUtil::switchColor($counter++, 'tblrow1', 'tblrow2'));
         $this->tpl->setVariable("LASTNAME", $name['lastname']);
         $this->tpl->setVariable("FIRSTNAME", $name['firstname']);
         $this->tpl->setVariable("LOGIN", ilObjUser::_lookupLogin($user_id));
         $this->tpl->parseCurrentBlock();
     }
     $this->tpl->setVariable("HEAD_TXT_LEGEND", $this->lng->txt("legend"));
     $this->tpl->setVariable("HEAD_TXT_DIGIT", $this->lng->txt("event_digit"));
     $this->tpl->setVariable("HEAD_TXT_EVENT", $this->lng->txt("event"));
     $this->tpl->setVariable("HEAD_TXT_LOCATION", $this->lng->txt("event_location"));
     $this->tpl->setVariable("HEAD_TXT_DATE_TIME", $this->lng->txt("event_date_time"));
     $i = 1;
     foreach ($events as $event_obj) {
         $this->tpl->setCurrentBlock("legend_loop");
         $this->tpl->setVariable("LEGEND_CSS_ROW", ilUtil::switchColor($counter++, 'tblrow1', 'tblrow2'));
         $this->tpl->setVariable("LEGEND_DIGIT", $i++);
         $this->tpl->setVariable("LEGEND_EVENT_TITLE", $event_obj->getTitle());
         $this->tpl->setVariable("LEGEND_EVENT_DESCRIPTION", $event_obj->getDescription());
         $this->tpl->setVariable("LEGEND_EVENT_LOCATION", $event_obj->getLocation());
         $this->tpl->setVariable("LEGEND_EVENT_APPOINTMENT", $event_obj->getFirstAppointment()->appointmentToString());
         $this->tpl->parseCurrentBlock();
     }
 }
 /**
  * show client list
  */
 function showClientList()
 {
     global $tpl, $ilIliasIniFile, $ilCtrl;
     //echo "1";
     if (!$ilIliasIniFile->readVariable("clients", "list")) {
         $this->processIndexPHP();
         return;
     }
     //echo "2";
     $tpl = new ilTemplate("tpl.main.html", true, true);
     $tpl->setAddFooter(false);
     // no client yet
     // to do: get standard style
     $tpl->setVariable("PAGETITLE", "Client List");
     $tpl->setVariable("LOCATION_STYLESHEET", "./templates/default/delos.css");
     // load client list template
     self::initStartUpTemplate("tpl.client_list.html");
     // load template for table
     $tpl->addBlockfile("CLIENT_LIST", "client_list", "tpl.table.html");
     // load template for table content data
     $tpl->addBlockfile("TBL_CONTENT", "tbl_content", "tpl.obj_tbl_rows.html");
     // load table content data
     require_once "setup/classes/class.ilClientList.php";
     require_once "setup/classes/class.ilClient.php";
     require_once "setup/classes/class.ilDBConnections.php";
     require_once "./Services/Table/classes/class.ilTableGUI.php";
     $this->db_connections = new ilDBConnections();
     $clientlist = new ilClientList($this->db_connections);
     $list = $clientlist->getClients();
     if (count($list) == 0) {
         header("Location: ./setup/setup.php");
         exit;
     }
     $hasPublicSection = false;
     foreach ($list as $key => $client) {
         $client->setDSN();
         if ($client->checkDatabaseExists(true) and $client->ini->readVariable("client", "access") and $client->getSetting("setup_ok")) {
             $this->ctrl->setParameter($this, "client_id", $key);
             $tmp = array();
             $tmp[] = $client->getName();
             $tmp[] = "<a href=\"" . "login.php?cmd=force_login&client_id=" . urlencode($key) . "\">Login page</a>";
             if ($client->getSetting('pub_section')) {
                 $hasPublicSection = true;
                 $tmp[] = "<a href=\"" . "ilias.php?baseClass=ilRepositoryGUI&client_id=" . urlencode($key) . "\">Start page</a>";
             } else {
                 $tmp[] = '';
             }
             $data[] = $tmp;
         }
     }
     // create table
     $tbl = new ilTableGUI();
     // title & header columns
     if ($hasPublicSection) {
         $tbl->setTitle("Available Clients");
         $tbl->setHeaderNames(array("Installation Name", "Login", "Public Access"));
         $tbl->setHeaderVars(array("name", "index", "login"));
         $tbl->setColumnWidth(array("50%", "25%", "25%"));
     } else {
         $tbl->setTitle("Available Clients");
         $tbl->setHeaderNames(array("Installation Name", "Login", ''));
         $tbl->setHeaderVars(array("name", "login", ''));
         $tbl->setColumnWidth(array("70%", "25%", '1px'));
     }
     // control
     $tbl->setOrderColumn($_GET["sort_by"], "name");
     $tbl->setOrderDirection($_GET["sort_order"]);
     $tbl->setLimit($_GET["limit"]);
     $tbl->setOffset($_GET["offset"]);
     // content
     $tbl->setData($data);
     $tbl->disable("icon");
     $tbl->disable("numinfo");
     $tbl->disable("sort");
     $tbl->disable("footer");
     // render table
     $tbl->render();
     $tpl->show("DEFAULT", true, true);
 }
 function sco_resources()
 {
     global $tpl, $lng, $ilCtrl;
     $this->setTabs();
     $this->setLocator();
     $i = 0;
     $export_files = $this->getExportResources();
     // create table
     require_once "./Services/Table/classes/class.ilTableGUI.php";
     $tbl = new ilTableGUI();
     // load files templates
     $tpl->addBlockfile("ADM_CONTENT", "adm_content", "tpl.table.html");
     // load template for table content data
     $tpl->addBlockfile("TBL_CONTENT", "tbl_content", "tpl.download_file_row.html", "Modules/LearningModule");
     $num = 0;
     $tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
     $tbl->setTitle($lng->txt("cont_files"));
     $tbl->setHeaderNames(array($lng->txt("cont_format"), $lng->txt("cont_file"), $lng->txt("size"), $lng->txt("date"), ""));
     $cols = array("format", "file", "size", "date", "download");
     $header_params = array("ref_id" => $_GET["ref_id"], "obj_id" => $_GET["obj_id"], "cmd" => "sco_resources", "cmdClass" => strtolower(get_class($this)), "cmdNode" => $_GET["cmdNode"], "baseClass" => $_GET["baseClass"]);
     $tbl->setHeaderVars($cols, $header_params);
     $tbl->setColumnWidth(array("10%", "30%", "20%", "20%", "20%"));
     $tbl->disable("sort");
     $tbl->setOrderColumn($_GET["sort_by"]);
     $tbl->setOrderDirection($_GET["sort_order"]);
     $tbl->setLimit($_GET["limit"]);
     $tbl->setOffset($_GET["offset"]);
     $tbl->setMaxCount($this->maxcount);
     // ???
     $tbl->setMaxCount(count($export_files));
     // footer
     $tbl->setFooter("tblfooter", $lng->txt("previous"), $lng->txt("next"));
     //$tbl->disable("footer");
     $tbl->setMaxCount(count($export_files));
     $export_files = array_slice($export_files, $_GET["offset"], $_GET["limit"]);
     $tbl->render();
     if (count($export_files) > 0) {
         $i = 0;
         foreach ($export_files as $exp_file) {
             /* remote files (youtube videos) have no size, so we allow them now
             			if (!$exp_file["size"] > 0)
             			{
             				continue;
             			}
             			*/
             $tpl->setCurrentBlock("tbl_content");
             $tpl->setVariable("TXT_FILENAME", $exp_file["file"]);
             $css_row = ilUtil::switchColor($i++, "tblrow1", "tblrow2");
             $tpl->setVariable("CSS_ROW", $css_row);
             $tpl->setVariable("TXT_SIZE", $exp_file["size"]);
             $tpl->setVariable("TXT_FORMAT", $exp_file["type"]);
             $tpl->setVariable("TXT_DATE", $exp_file["date"]);
             if ($exp_file["size"] > 0) {
                 $tpl->setVariable("TXT_DOWNLOAD", $lng->txt("download"));
                 $ilCtrl->setParameter($this, "resource", rawurlencode($exp_file["path"]));
                 $ilCtrl->setParameter($this, "file_id", rawurlencode($exp_file["file_id"]));
                 $tpl->setVariable("LINK_DOWNLOAD", $ilCtrl->getLinkTarget($this, "downloadResource"));
             } else {
                 $tpl->setVariable("TXT_DOWNLOAD", $lng->txt("show"));
                 $tpl->setVariable("LINK_TARGET", " target=\"_blank\"");
                 $tpl->setVariable("LINK_DOWNLOAD", $exp_file["path"]);
             }
             $tpl->parseCurrentBlock();
         }
     }
     //if is_array
     /* not found in template?
     		else
     		{
     			$tpl->setCurrentBlock("notfound");
     			$tpl->setVariable("TXT_OBJECT_NOT_FOUND", $lng->txt("obj_not_found"));
     			$tpl->setVariable("NUM_COLS", 4);
     			$tpl->parseCurrentBlock();
     		}		
     		 */
     // $tpl->parseCurrentBlock();
 }
 /**
  * Show file list of available export files
  *
  * @access public
  * 
  */
 public function showFileList()
 {
     global $ilUser;
     if (!count($files = $this->fss_export->getMemberExportFiles())) {
         return false;
     }
     $a_tpl = new ilTemplate('tpl.table.html', true, true);
     $a_tpl->addBlockfile("TBL_CONTENT", "tbl_content", "tpl.member_export_file_row.html", "Modules/Course");
     $a_tpl->setVariable('FORMACTION', $this->ctrl->getFormaction($this));
     include_once "./Services/Table/classes/class.ilTableGUI.php";
     $tbl = new ilTableGUI();
     // load template for table content data
     $tbl->setTitle($this->lng->txt("ps_export_files"));
     $tbl->setHeaderNames(array("", $this->lng->txt("type"), $this->lng->txt("ps_size"), $this->lng->txt("date")));
     $cols = array("", "type", "size", "date");
     $header_params = $this->ctrl->getParameterArray($this, 'show');
     $tbl->setHeaderVars($cols, $header_params);
     $tbl->setColumnWidth(array("1%", "9%", "45%", "45%"));
     // control
     $tbl->setOrderColumn($_GET["sort_by"]);
     $tbl->setOrderDirection($_GET["sort_order"]);
     $tbl->setLimit($ilUser->getPref('hits_per_page', 9999));
     $tbl->setOffset($_GET["offset"]);
     $tbl->setMaxCount(count($files));
     $tbl->disable("sort");
     $a_tpl->setVariable("COLUMN_COUNTS", 4);
     $files = array_reverse($files);
     $files = array_slice($files, $_GET["offset"], $_GET["limit"]);
     $num = 0;
     $i = 0;
     foreach ($files as $exp_file) {
         $a_tpl->setCurrentBlock("tbl_content");
         $a_tpl->setVariable("TXT_FILENAME", $exp_file["file"]);
         $css_row = ilUtil::switchColor($i++, "tblrow1", "tblrow2");
         $a_tpl->setVariable("CSS_ROW", $css_row);
         $a_tpl->setVariable("TXT_SIZE", $exp_file['size']);
         $a_tpl->setVariable("TXT_TYPE", strtoupper($exp_file["type"]));
         $a_tpl->setVariable("CHECKBOX_ID", $exp_file["timest"]);
         $a_tpl->setVariable("TXT_DATE", date("Y-m-d H:i", $exp_file['timest']));
         $a_tpl->parseCurrentBlock();
     }
     // delete button
     $a_tpl->setVariable("IMG_ARROW", ilUtil::getImagePath("arrow_downright.png"));
     $a_tpl->setCurrentBlock("tbl_action_btn");
     $a_tpl->setVariable("BTN_NAME", "confirmDeleteExportFile");
     $a_tpl->setVariable("BTN_VALUE", $this->lng->txt("delete"));
     $a_tpl->parseCurrentBlock();
     $a_tpl->setCurrentBlock("tbl_action_btn");
     $a_tpl->setVariable("BTN_NAME", "downloadExportFile");
     $a_tpl->setVariable("BTN_VALUE", $this->lng->txt("download"));
     $a_tpl->parseCurrentBlock();
     // footer
     $tbl->setFooter("tblfooter", $this->lng->txt("previous"), $this->lng->txt("next"));
     //$tbl->disable("footer");
     $tbl->setTemplate($a_tpl);
     $tbl->render();
     #$this->tpl->setCurrentBlock('file_list');
     $this->tpl->setVariable('FILE_LIST_TABLE', $a_tpl->get());
     #$this->tpl->parseCurrentBlock();
 }
 /**
  * show tracking data
  */
 function showTrackingItems()
 {
     include_once './Services/PrivacySecurity/classes/class.ilPrivacySettings.php';
     $privacy = ilPrivacySettings::_getInstance();
     if (!$privacy->enabledSahsProtocolData()) {
         $this->ilias->raiseError($this->lng->txt('permission_denied'), $this->ilias->error_obj->MESSAGE);
     }
     include_once "./Services/Table/classes/class.ilTableGUI.php";
     // load template for table
     $this->tpl->addBlockfile("ADM_CONTENT", "adm_content", "tpl.table.html");
     // load template for table content data
     $this->tpl->addBlockfile("TBL_CONTENT", "tbl_content", "tpl.scorm_track_items.html", "Modules/ScormAicc");
     $num = 1;
     $this->tpl->setVariable("FORMACTION", "adm_object.php?ref_id=" . $this->ref_id . "{$obj_str}&cmd=gateway");
     // create table
     $tbl = new ilTableGUI();
     // title & header columns
     $tbl->setTitle($this->lng->txt("cont_tracking_items"));
     $tbl->setHeaderNames(array($this->lng->txt("title")));
     $header_params = array("ref_id" => $this->ref_id, "cmd" => $_GET["cmd"], "cmdClass" => get_class($this));
     $cols = array("title");
     $tbl->setHeaderVars($cols, $header_params);
     $tbl->setColumnWidth(array("100%"));
     // control
     $tbl->setOrderColumn($_GET["sort_by"]);
     $tbl->setOrderDirection($_GET["sort_order"]);
     $tbl->setLimit($_GET["limit"]);
     $tbl->setOffset($_GET["offset"]);
     $tbl->setMaxCount($this->maxcount);
     //$this->tpl->setVariable("COLUMN_COUNTS",count($this->data["cols"]));
     //$this->showActions(true);
     // footer
     $tbl->setFooter("tblfooter", $this->lng->txt("previous"), $this->lng->txt("next"));
     #$tbl->disable("footer");
     //$items = $this->object->getTrackingItems();
     $items = $this->object->getTrackedItems();
     //$objs = ilUtil::sortArray($objs, $_GET["sort_by"], $_GET["sort_order"]);
     $tbl->setMaxCount(count($items));
     $items = array_slice($items, $_GET["offset"], $_GET["limit"]);
     $tbl->render();
     if (count($items) > 0) {
         foreach ($items as $item) {
             $this->tpl->setCurrentBlock("tbl_content");
             $this->tpl->setVariable("TXT_ITEM_TITLE", $item->getTitle());
             $this->ctrl->setParameter($this, "obj_id", $item->getId());
             $this->tpl->setVariable("LINK_ITEM", $this->ctrl->getLinkTarget($this, "showTrackingItem"));
             $css_row = ilUtil::switchColor($i++, "tblrow1", "tblrow2");
             $this->tpl->setVariable("CSS_ROW", $css_row);
             $this->tpl->parseCurrentBlock();
         }
     } else {
         $this->tpl->setCurrentBlock("notfound");
         $this->tpl->setVariable("TXT_OBJECT_NOT_FOUND", $this->lng->txt("obj_not_found"));
         $this->tpl->setVariable("NUM_COLS", $num);
         $this->tpl->parseCurrentBlock();
     }
 }
 /**
  * quick term list
  */
 function quickList()
 {
     global $ilUser, $tpl;
     return;
     include_once "./Modules/Glossary/classes/class.ilTermQuickListTableGUI.php";
     $tab = new ilTermQuickListTableGUI($this, "listTerms");
     $tpl->setLeftContent($tab->getHTML());
     $this->tpl->addBlockFile("CONTENT", "content", "tpl.glossary_short_list.html", "Modules/Glossary");
     //		$this->tpl->addBlockFile("EXPLORER_TOP", "exp_top", "tpl.explorer_top.html");
     //		$this->tpl->setVariable("IMG_SPACE", ilUtil::getImagePath("spacer.png", false));
     $this->tpl->setVariable("FORMACTION1", $this->ctrl->getFormAction($this));
     $this->tpl->setVariable("CMD_REFR", "quickList");
     $this->tpl->setVariable("TXT_REFR", $this->lng->txt("refresh"));
     $this->tpl->setVariable("TXT_EXPLORER_HEADER", $this->lng->txt("cont_terms"));
     include_once "./Services/Table/classes/class.ilTableGUI.php";
     // glossary term list template
     // load template for table
     $this->tpl->addBlockfile("SHORT_LIST", "list", "tpl.table.html");
     // load template for table content data
     $this->tpl->addBlockfile("TBL_CONTENT", "tbl_content", "tpl.term_short_tbl_row.html", true);
     $num = 0;
     $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
     // create table
     $tbl = new ilTableGUI();
     // title & header columns
     //$tbl->setTitle($this->lng->txt("cont_terms"));
     //$tbl->setHelp("tbl_help.php","icon_help.png",$this->lng->txt("help"));
     $tbl->setHeaderNames(array($this->lng->txt("cont_term")));
     $cols = array("term");
     $header_params = $this->ctrl->getParameterArrayByClass("ilobjglossarygui", "listTerms");
     $header_params["cmd"] = "quickList";
     $tbl->setHeaderVars($cols, $header_params);
     $tbl->setColumnWidth(array("100%"));
     $tbl->disable("title");
     // control
     $tbl->setOrderColumn($_GET["sort_by"]);
     $tbl->setOrderDirection($_GET["sort_order"]);
     $tbl->setLimit($_GET["limit"]);
     $tbl->setOffset($_GET["offset"]);
     $tbl->disable("header");
     $term_list = $this->object->getTermList();
     $tbl->setMaxCount(count($term_list));
     $this->tpl->setVariable("COLUMN_COUNT", 1);
     // footer
     $tbl->setFooter("tblfooter", $this->lng->txt("previous"), $this->lng->txt("next"));
     // sorting array
     $term_list = array_slice($term_list, $_GET["offset"], $_GET["limit"]);
     // render table
     $tbl->render();
     if (count($term_list) > 0) {
         $i = 1;
         foreach ($term_list as $key => $term) {
             $defs = ilGlossaryDefinition::getDefinitionList($term["id"]);
             $sep = ": ";
             for ($j = 0; $j < count($defs); $j++) {
                 $def = $defs[$j];
                 // edit
                 $this->tpl->setCurrentBlock("definition");
                 $this->tpl->setVariable("SEP", $sep);
                 $this->ctrl->setParameterByClass("ilglossarydefpagegui", "term_id", $term["id"]);
                 $this->ctrl->setParameterByClass("ilglossarydefpagegui", "def", $def["id"]);
                 $this->tpl->setVariable("LINK_EDIT_DEF", $this->ctrl->getLinkTargetByClass(array("ilglossarytermgui", "iltermdefinitioneditorgui", "ilglossarydefpagegui"), "edit"));
                 $this->tpl->setVariable("TEXT_DEF", $this->lng->txt("glo_definition_abbr") . ($j + 1));
                 $this->tpl->parseCurrentBlock();
                 $sep = ", ";
             }
             $this->tpl->setCurrentBlock("tbl_content");
             $css_row = ilUtil::switchColor(++$i, "tblrow1", "tblrow2");
             // edit term link
             $this->tpl->setVariable("TEXT_TERM", $term["term"]);
             $this->ctrl->setParameter($this, "term_id", $term["id"]);
             $this->tpl->setVariable("LINK_EDIT_TERM", $this->ctrl->getLinkTargetByClass("ilglossarytermgui", "editTerm"));
             $this->tpl->setVariable("CSS_ROW", $css_row);
             $this->tpl->parseCurrentBlock();
         }
     } else {
         //$this->tpl->setCurrentBlock("notfound");
         $this->tpl->setVariable("TXT_OBJECT_NOT_FOUND", $this->lng->txt("obj_not_found"));
         $this->tpl->setVariable("NUM_COLS", $num);
         //$this->tpl->parseCurrentBlock();
     }
 }
 function askDeleteObjective()
 {
     global $rbacsystem;
     // MINIMUM ACCESS LEVEL = 'write'
     if (!$rbacsystem->checkAccess("write", $this->course_obj->getRefId())) {
         $this->ilias->raiseError($this->lng->txt("msg_no_perm_write"), $this->ilErr->MESSAGE);
     }
     if (!count($_POST['objective'])) {
         ilUtil::sendFailure($this->lng->txt('crs_no_objective_selected'));
         $this->listObjectives();
         return true;
     }
     $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.crs_objectives.html", 'Modules/Course');
     ilUtil::sendQuestion($this->lng->txt('crs_delete_objectve_sure'));
     $tpl =& new ilTemplate("tpl.table.html", true, true);
     $tpl->addBlockfile("TBL_CONTENT", "tbl_content", "tpl.crs_objectives_delete_row.html", 'Modules/Course');
     $counter = 0;
     foreach ($_POST['objective'] as $objective_id) {
         $objective_obj = $this->__initObjectivesObject($objective_id);
         $tpl->setCurrentBlock("tbl_content");
         $tpl->setVariable("ROWCOL", ilUtil::switchColor(++$counter, "tblrow2", "tblrow1"));
         $tpl->setVariable("TITLE", $objective_obj->getTitle());
         $tpl->setVariable("DESCRIPTION", $objective_obj->getDescription());
         $tpl->parseCurrentBlock();
     }
     $tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
     // Show action row
     $tpl->setCurrentBlock("tbl_action_btn");
     $tpl->setVariable("BTN_NAME", 'deleteObjectives');
     $tpl->setVariable("BTN_VALUE", $this->lng->txt('delete'));
     $tpl->parseCurrentBlock();
     $tpl->setCurrentBlock("tbl_action_btn");
     $tpl->setVariable("BTN_NAME", 'listObjectives');
     $tpl->setVariable("BTN_VALUE", $this->lng->txt('cancel'));
     $tpl->parseCurrentBlock();
     $tpl->setCurrentBlock("tbl_action_row");
     $tpl->setVariable("COLUMN_COUNTS", 1);
     $tpl->setVariable("IMG_ARROW", ilUtil::getImagePath('arrow_downright.png'));
     $tpl->parseCurrentBlock();
     // create table
     $tbl = new ilTableGUI();
     $tbl->setStyle('table', 'std');
     // title & header columns
     $tbl->setTitle($this->lng->txt("crs_objectives"), "icon_lobj.png", $this->lng->txt("crs_objectives"));
     $tbl->setHeaderNames(array($this->lng->txt("title")));
     $tbl->setHeaderVars(array("title"), array("ref_id" => $this->course_obj->getRefId(), "cmdClass" => "ilcourseobjectivesgui", "cmdNode" => $_GET["cmdNode"]));
     $tbl->setColumnWidth(array("50%"));
     $tbl->setLimit($_GET["limit"]);
     $tbl->setOffset($_GET["offset"]);
     $tbl->setMaxCount(count($_POST['objective']));
     // footer
     $tbl->disable("footer");
     $tbl->disable('sort');
     // render table
     $tbl->setTemplate($tpl);
     $tbl->render();
     $this->tpl->setVariable("OBJECTIVES_TABLE", $tpl->get());
     // Save marked objectives
     $_SESSION['crs_delete_objectives'] = $_POST['objective'];
     return true;
 }
 /**
  * administrate files of media object
  */
 function editFilesObject()
 {
     // standard item
     $std_item =& $this->object->getMediaItem("Standard");
     if ($this->object->hasFullscreenItem()) {
         $full_item =& $this->object->getMediaItem("Fullscreen");
     }
     // create table
     require_once "./Services/Table/classes/class.ilTableGUI.php";
     $tbl = new ilTableGUI();
     // determine directory
     $cur_subdir = $_GET["cdir"];
     if ($_GET["newdir"] == "..") {
         $cur_subdir = substr($cur_subdir, 0, strrpos($cur_subdir, "/"));
     } else {
         if (!empty($_GET["newdir"])) {
             if (!empty($cur_subdir)) {
                 $cur_subdir = $cur_subdir . "/" . $_GET["newdir"];
             } else {
                 $cur_subdir = $_GET["newdir"];
             }
         }
     }
     $cur_subdir = str_replace(".", "", $cur_subdir);
     $mob_dir = ilUtil::getWebspaceDir() . "/mobs/mm_" . $this->object->getId();
     $cur_dir = !empty($cur_subdir) ? $mob_dir . "/" . $cur_subdir : $mob_dir;
     // load files templates
     $this->tpl->addBlockfile("ADM_CONTENT", "adm_content", "tpl.mob_files.html", "Services/MediaObjects");
     $this->ctrl->setParameter($this, "cdir", urlencode($cur_subdir));
     $this->tpl->setVariable("FORMACTION1", $this->ctrl->getFormAction($this));
     //echo "--".$this->getTargetScript().
     //"&hier_id=".$_GET["hier_id"]."&cdir=".$cur_subdir."&cmd=post"."--<br>";
     $this->tpl->setVariable("TXT_NEW_DIRECTORY", $this->lng->txt("cont_new_dir"));
     $this->tpl->setVariable("TXT_NEW_FILE", $this->lng->txt("cont_new_file"));
     $this->tpl->setVariable("CMD_NEW_DIR", "createDirectory");
     $this->tpl->setVariable("CMD_NEW_FILE", "uploadFile");
     $this->tpl->setVariable("BTN_NEW_DIR", $this->lng->txt("create"));
     $this->tpl->setVariable("BTN_NEW_FILE", $this->lng->txt("upload"));
     //
     $this->tpl->addBlockfile("FILE_TABLE", "files", "tpl.table.html");
     // load template for table content data
     $this->tpl->addBlockfile("TBL_CONTENT", "tbl_content", "tpl.mob_file_row.html", "Services/MediaObjects");
     $num = 0;
     $obj_str = $this->call_by_reference ? "" : "&obj_id=" . $this->obj_id;
     $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
     $tbl->setTitle($this->lng->txt("cont_files") . " " . $cur_subdir);
     //$tbl->setHelp("tbl_help.php","icon_help.gif",$this->lng->txt("help"));
     $tbl->setHeaderNames(array("", "", $this->lng->txt("cont_dir_file"), $this->lng->txt("cont_size"), $this->lng->txt("cont_purpose")));
     $cols = array("", "", "dir_file", "size", "purpose");
     $header_params = array("ref_id" => $_GET["ref_id"], "obj_id" => $_GET["obj_id"], "cmd" => "editFiles", "hier_id" => $_GET["hier_id"], "item_id" => $_GET["item_id"]);
     $tbl->setHeaderVars($cols, $header_params);
     $tbl->setColumnWidth(array("1%", "1%", "33%", "33%", "32%"));
     // control
     $tbl->setOrderColumn($_GET["sort_by"]);
     $tbl->setOrderDirection($_GET["sort_order"]);
     $tbl->setLimit($_GET["limit"]);
     $tbl->setOffset($_GET["offset"]);
     $tbl->setMaxCount($this->maxcount);
     // ???
     //$tbl->setMaxCount(30);		// ???
     $this->tpl->setVariable("COLUMN_COUNTS", 5);
     // delete button
     $this->tpl->setVariable("IMG_ARROW", ilUtil::getImagePath("arrow_downright.svg"));
     $this->tpl->setCurrentBlock("tbl_action_btn");
     $this->tpl->setVariable("BTN_NAME", "deleteFile");
     $this->tpl->setVariable("BTN_VALUE", $this->lng->txt("delete"));
     $this->tpl->parseCurrentBlock();
     $this->tpl->setCurrentBlock("tbl_action_btn");
     $this->tpl->setVariable("BTN_NAME", "assignStandard");
     $this->tpl->setVariable("BTN_VALUE", $this->lng->txt("cont_assign_std"));
     $this->tpl->parseCurrentBlock();
     $this->tpl->setCurrentBlock("tbl_action_btn");
     $this->tpl->setVariable("BTN_NAME", "assignFullscreen");
     $this->tpl->setVariable("BTN_VALUE", $this->lng->txt("cont_assign_full"));
     $this->tpl->parseCurrentBlock();
     // footer
     $tbl->setFooter("tblfooter", $this->lng->txt("previous"), $this->lng->txt("next"));
     //$tbl->disable("footer");
     $entries = ilUtil::getDir($cur_dir);
     //$objs = ilUtil::sortArray($objs, $_GET["sort_by"], $_GET["sort_order"]);
     $tbl->setMaxCount(count($entries));
     $entries = array_slice($entries, $_GET["offset"], $_GET["limit"]);
     $tbl->render();
     if (count($entries) > 0) {
         $i = 0;
         foreach ($entries as $entry) {
             if ($entry["entry"] == "." || $entry["entry"] == ".." && empty($cur_subdir)) {
                 continue;
             }
             //$this->tpl->setVariable("ICON", $obj["title"]);
             if ($entry["type"] == "dir") {
                 $this->tpl->setCurrentBlock("FileLink");
                 $this->ctrl->setParameter($this, "cdir", $cur_subdir);
                 $this->ctrl->setParameter($this, "newdir", rawurlencode($entry["entry"]));
                 $this->tpl->setVariable("LINK_FILENAME", $this->ctrl->getLinkTarget($this, "editFiles"));
                 $this->tpl->setVariable("TXT_FILENAME", $entry["entry"]);
                 $this->tpl->parseCurrentBlock();
                 $this->tpl->setVariable("ICON", "<img src=\"" . ilUtil::getImagePath("icon_cat.svg") . "\">");
             } else {
                 $this->tpl->setCurrentBlock("File");
                 $this->tpl->setVariable("TXT_FILENAME2", $entry["entry"]);
                 $this->tpl->parseCurrentBlock();
             }
             $this->tpl->setCurrentBlock("tbl_content");
             $css_row = ilUtil::switchColor($i++, "tblrow1", "tblrow2");
             $this->tpl->setVariable("CSS_ROW", $css_row);
             $this->tpl->setVariable("TXT_SIZE", $entry["size"]);
             $this->tpl->setVariable("CHECKBOX_ID", $entry["entry"]);
             $compare = !empty($cur_subdir) ? $cur_subdir . "/" . $entry["entry"] : $entry["entry"];
             $purpose = array();
             if ($std_item->getLocation() == $compare) {
                 $purpose[] = $this->lng->txt("cont_std_view");
             }
             if ($this->object->hasFullscreenItem()) {
                 if ($full_item->getLocation() == $compare) {
                     $purpose[] = $this->lng->txt("cont_fullscreen");
                 }
             }
             $this->tpl->setVariable("TXT_PURPOSE", implode($purpose, ", "));
             $this->tpl->parseCurrentBlock();
         }
     } else {
         $this->tpl->setCurrentBlock("notfound");
         $this->tpl->setVariable("TXT_OBJECT_NOT_FOUND", $this->lng->txt("obj_not_found"));
         $this->tpl->setVariable("NUM_COLS", 4);
         $this->tpl->parseCurrentBlock();
     }
     $this->tpl->parseCurrentBlock();
 }