5require_once(
"./Services/Object/classes/class.ilObjectGUI.php");
 
    6require_once(
"./Modules/Glossary/classes/class.ilObjGlossary.php");
 
    7require_once(
"./Modules/Glossary/classes/class.ilGlossaryTermGUI.php");
 
    8require_once(
"./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
 
    9require_once(
"./Modules/Glossary/classes/class.ilTermDefinitionEditorGUI.php");
 
   10require_once(
"./Services/COPage/classes/class.ilPCParagraph.php");
 
   40                $this->tabs_gui = $ilTabs;
 
   45                $this->offline = 
false;
 
   46                $this->ctrl->saveParameter($this, array(
"ref_id", 
"letter", 
"tax_node"));
 
   49                include_once(
"./Modules/Glossary/classes/class.ilObjGlossaryGUI.php");
 
   51                $this->glossary = $this->glossary_gui->object;
 
   55                $this->term_id = (int) 
$_GET[
"term_id"];
 
   56                $glo_ids = $this->glossary->getAllGlossaryIds();
 
   57                if (!is_array($glo_ids))
 
   59                        $glo_ids = array($glo_ids);
 
   62                include_once(
"./Modules/Glossary/classes/class.ilGlossaryTermReferences.php");
 
   69                $this->tax_id = $this->glossary->getTaxonomyId();
 
   70                if ($this->tax_id > 0 && $this->glossary->getShowTaxonomy())
 
   72                        include_once(
"./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
 
   75                if ((
int) 
$_GET[
"tax_node"] > 1 && $this->tax->getTree()->readRootId() != 
$_GET[
"tax_node"])
 
   77                        $this->tax_node = (int) 
$_GET[
"tax_node"];
 
   87                $this->offline = $a_offline;
 
   95                return $this->offline;
 
  103                $this->offline_dir = $a_dir;
 
  112                return $this->offline_dir;
 
  123                $lng->loadLanguageModule(
"content");
 
  125                $next_class = $this->ctrl->getNextClass($this);
 
  126                $cmd = $this->ctrl->getCmd(
"listTerms");
 
  129                if (!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]) &&
 
  130                        !($ilAccess->checkAccess(
"visible", 
"", 
$_GET[
"ref_id"]) &&
 
  131                                (
$cmd == 
"infoScreen" || strtolower($next_class) == 
"ilinfoscreengui")))
 
  133                        $ilias->raiseError(
$lng->txt(
"permission_denied"),
$ilias->error_obj->MESSAGE);
 
  136                if (
$cmd != 
"listDefinitions")
 
  148                        case "ilinfoscreengui":
 
  152                        case "ilpresentationlisttablegui":
 
  154                                $this->ctrl->forwardCommand($prtab);
 
  167                $this->tpl->getStandardTemplate();
 
  168                $title = $this->glossary->getTitle();
 
  170                $this->tpl->setTitle(
$title);
 
  182                global $ilNavigationHistory, $ilAccess, 
$ilias, 
$lng, $ilToolbar, 
$ilCtrl, $ilTabs;
 
  185                if (!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))
 
  187                        $ilias->raiseError(
$lng->txt(
"permission_denied"),
$ilias->error_obj->MESSAGE);
 
  192                        $ilNavigationHistory->addItem(
$_GET[
"ref_id"],
 
  193                                $this->ctrl->getLinkTarget($this, 
"listTerms"), 
"glo");
 
  196                        include_once(
"./Services/Form/classes/class.ilAlphabetInputGUI.php");
 
  198                        $first_letters = $this->glossary->getFirstLetters($this->tax_node);
 
  199                        if (!is_array($first_letters))
 
  203                        if (!in_array(
$_GET[
"letter"], $first_letters))
 
  207                        $ai->setLetters($first_letters);
 
  208                        $ai->setParentCommand($this, 
"chooseLetter");
 
  209                        $ai->setHighlighted(
$_GET[
"letter"]);
 
  210                        $ilToolbar->addInputItem(
$ai, 
true);
 
  215                $ilCtrl->setParameter($this, 
"term_id", 
"");
 
  217                $ilTabs->activateTab(
"terms");
 
  232                if (!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))
 
  234                        $ilias->raiseError(
$lng->txt(
"permission_denied"),
$ilias->error_obj->MESSAGE);
 
  237                $this->lng->loadLanguageModule(
"meta");
 
  244                $oldoffset = (is_numeric (
$_GET[
"oldoffset"]))?
$_GET[
"oldoffset"]:
$_GET[
"offset"];
 
  246                if ($this->glossary->getPresentationMode() == 
"full_def")
 
  249                        $this->tpl->setCurrentBlock(
"ContentStyle");
 
  252                                $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
 
  257                                $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
"content.css");
 
  259                        $this->tpl->parseCurrentBlock();
 
  262                        $this->tpl->setCurrentBlock(
"SyntaxStyle");
 
  265                                $this->tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
 
  270                                $this->tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
 
  271                                        "syntaxhighlight.css");
 
  273                        $this->tpl->parseCurrentBlock();
 
  281                        $tpl->setContent(
$ilCtrl->getHTML($table));
 
  285                        $this->tpl->setVariable(
"ADM_CONTENT", $table->getHTML());
 
  286                        return $this->tpl->get();
 
  298                include_once(
"./Modules/Glossary/classes/class.ilPresentationListTableGUI.php");
 
  300                        $this->
offlineMode(), $this->tax_node, $this->glossary->getTaxonomyId());
 
  312                $prtab->resetOffset();
 
  313                $prtab->writeFilterToSession();
 
  325                $prtab->resetOffset();
 
  326                $prtab->resetFilter();
 
  347                        $term_id = $this->term_id;
 
  351                        $term_id = $a_term_id;
 
  354                if (!$ilAccess->checkAccess(
"read", 
"", 
$ref_id))
 
  356                        $ilias->raiseError(
$lng->txt(
"permission_denied"),
$ilias->error_obj->MESSAGE);
 
  360                if ($this->glossary->getPresentationMode() != 
"full_def")
 
  371                        require_once(
"./Modules/Glossary/classes/class.ilGlossaryDefPageGUI.php");
 
  372                        $tpl->getStandardTemplate();
 
  377                                $style_name = 
$ilUser->prefs[
"style"].
".css";;
 
  378                                $tpl->setVariable(
"LOCATION_STYLESHEET",
"./".$style_name);
 
  386                        $tpl->setCurrentBlock(
"ContentStyle");
 
  389                                $tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
 
  394                                $tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
"content.css");
 
  396                        $tpl->parseCurrentBlock();
 
  399                        $tpl->setCurrentBlock(
"SyntaxStyle");
 
  402                                $tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
 
  407                                $tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
 
  408                                        "syntaxhighlight.css");
 
  410                        $tpl->parseCurrentBlock();
 
  413                        $tpl->setTitle($this->lng->txt(
"cont_term").
": ".$term->getTerm());
 
  417                        if($ilAccess->checkAccess(
"write", 
"", 
$_GET[
"ref_id"]))
 
  419                                $cmd = array(
"edit" => $this->ctrl->getLinkTargetByClass(array(
"ilglossaryeditorgui", 
"ilobjglossarygui", 
"ilglossarytermgui", 
"ilobjectmetadatagui"), 
""));                            
 
  421                        include_once 
"Services/Object/classes/class.ilObjectMetaDataGUI.php";
 
  423                        $tpl->setRightContent($mdgui->getBlockHTML(
$cmd));
 
  426                        $tpl->addBlockfile(
"ADM_CONTENT", 
"def_list", 
"tpl.glossary_definition_list.html", 
"Modules/Glossary");
 
  430                        $tpl = 
new ilTemplate(
"tpl.glossary_definition_list.html", 
true, 
true, 
"Modules/Glossary");
 
  434                $tpl->setVariable(
"TXT_TERM", $term->getTerm());
 
  435                $this->mobs = array();
 
  440                        $tpl->setCurrentBlock(
"toc");
 
  441                        for($j=1; $j<=count($defs); $j++)
 
  443                                $tpl->setCurrentBlock(
"toc_item");
 
  444                                $tpl->setVariable(
"TOC_DEF_NR", $j);
 
  445                                $tpl->setVariable(
"TOC_DEF", 
$lng->txt(
"cont_definition"));
 
  446                                $tpl->parseCurrentBlock();
 
  448                        $tpl->setCurrentBlock(
"toc");
 
  449                        $tpl->parseCurrentBlock();
 
  452                for($j=0; $j<count($defs); $j++)
 
  456                        $page_gui->setGlossary($this->glossary);
 
  457                        $page_gui->setOutputMode($a_page_mode);
 
  458                        $page_gui->setStyleId($this->glossary->getStyleSheetId());
 
  459                        $page = $page_gui->getPageObject();
 
  463                        $int_links = $page->getInternalLinks();
 
  465                        $page_gui->setLinkXML($link_xml);
 
  469                                $page_gui->setOutputMode(
"offline");
 
  473                        $page_gui->setFullscreenLink($this->
getLink(
$ref_id, 
"fullscreen", $term_id, $def[
"id"]));
 
  475                        $page_gui->setTemplateOutput(
false);
 
  476                        $page_gui->setRawPageContent(
true);
 
  477                        $page_gui->setFileDownloadLink($this->
getLink(
$ref_id, 
"downloadFile"));
 
  480                                $output = $page_gui->showPage();
 
  484                                $output = $page_gui->presentation($page_gui->getOutputMode());
 
  487                        if (count($defs) > 1)
 
  489                                $tpl->setCurrentBlock(
"definition_header");
 
  490                                $tpl->setVariable(
"TXT_DEFINITION",
 
  491                                        $this->lng->txt(
"cont_definition").
" ".($j+1));
 
  492                                $tpl->setVariable(
"DEF_NR", ($j+1));
 
  493                                $tpl->parseCurrentBlock();
 
  496                        $tpl->setCurrentBlock(
"definition");
 
  498                        $tpl->parseCurrentBlock();
 
  506                        $backlist_shown = 
false;
 
  507                        foreach ($sources as $src)
 
  509                                $type = explode(
':',$src[
'type']);
 
  511                                if ($type[0] == 
'lm')
 
  513                                        if ($type[1] == 
'pg')
 
  518                                                $tpl->setCurrentBlock(
'backlink_item');
 
  521                                                foreach($ref_ids as $rid)
 
  523                                                        if ($ilAccess->checkAccess(
"read", 
"", $rid))
 
  530                                                        $tpl->setCurrentBlock(
"backlink_item");
 
  531                                                        $tpl->setVariable(
"BACKLINK_LINK",ILIAS_HTTP_PATH.
"/goto.php?target=".$type[1].
"_".$src[
'id']);
 
  532                                                        $tpl->setVariable(
"BACKLINK_ITEM",$lm_title.
": ".
$title);
 
  533                                                        $tpl->parseCurrentBlock();
 
  534                                                        $backlist_shown = 
true;
 
  541                                $tpl->setCurrentBlock(
"backlink_list");
 
  542                                $tpl->setVariable(
"BACKLINK_TITLE",$this->lng->txt(
'glo_term_used_in'));
 
  543                                $tpl->parseCurrentBlock();
 
  549                        $tpl->setCurrentBlock(
"perma_link");
 
  550                        $tpl->setVariable(
"PERMA_LINK", ILIAS_HTTP_PATH.
 
  553                                "_".$term_id.
"_".
$ref_id.
"&client_id=".CLIENT_ID);
 
  554                        $tpl->setVariable(
"TXT_PERMA_LINK", $this->lng->txt(
"perma_link"));
 
  555                        $tpl->setVariable(
"PERMA_TARGET", 
"_top");
 
  556                        $tpl->parseCurrentBlock();
 
  565                        include_once 
'./Services/Search/classes/class.ilUserSearchCache.php';
 
  568                        $search_string = $cache->getQuery();
 
  570                        include_once(
"./Services/UIComponent/TextHighlighter/classes/class.ilTextHighlighterGUI.php");
 
  571                        include_once(
"./Services/Search/classes/class.ilQueryParser.php");
 
  575                        $words = $p->getQuotedWords();
 
  576                        if (is_array($words))
 
  578                                foreach ($words as 
$w)
 
  583                        $this->fill_on_load_code = 
true;
 
  604                        $ilHelp->setScreenIdComponent(
"glo");
 
  606                        $ilCtrl->setParameter($this, 
"term_id", 
"");
 
  607                        $this->ctrl->setParameter($this, 
"offset", 
$_GET[
"offset"]);
 
  608                        if (!empty ($_REQUEST[
"term"]))
 
  610                                $this->ctrl->setParameter($this, 
"term", $_REQUEST[
"term"]);
 
  611                                $this->ctrl->setParameter($this, 
"oldoffset", 
$_GET[
"oldoffset"]);
 
  612                                $back = 
$ilCtrl->getLinkTarget($this, 
"searchTerms");
 
  616                                $back = 
$ilCtrl->getLinkTarget($this, 
"listTerms");
 
  618                        $ilCtrl->setParameter($this, 
"term_id", $this->term_id);
 
  619                        $ilCtrl->saveParameter($this, 
"term_id");
 
  621                        $ilTabs->setBackTarget($this->lng->txt(
"obj_glo"), $back);
 
  623                        $ilTabs->addTab(
"term_content",
 
  624                                $lng->txt(
"content"),
 
  625                                $ilCtrl->getLinkTarget($this, 
"listDefinitions"));
 
  627                        $ilTabs->addTab(
"print_view",
 
  628                                $lng->txt(
"print_view"),
 
  629                                $ilCtrl->getLinkTarget($this, 
"printViewSelection"));
 
  631                        $ilCtrl->setParameterByClass(
"ilglossarytermgui", 
"term_id", $this->term_id);
 
  632                        include_once(
"./Modules/Glossary/classes/class.ilGlossaryTerm.php");
 
  635                                $ilTabs->addNonTabbedLink(
"editing_view",
 
  636                                $lng->txt(
"glo_editing_view"),
 
  637                                $ilCtrl->getLinkTargetByClass(array(
"ilglossaryeditorgui", 
"ilobjglossarygui", 
"ilglossarytermgui"), 
"listDefinitions"));
 
  640                        $ilTabs->activateTab($a_act);
 
  659                $this->tpl = 
new ilTemplate(
"tpl.fullscreen.html", 
true, 
true, 
"Services/COPage");
 
  660                include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
 
  662                $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
 
  673                require_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
 
  684                $xsl = file_get_contents(
"./Services/COPage/xsl/page.xsl");
 
  685                $args = array( 
'/_xml' => $xml, 
'/_xsl' => $xsl );
 
  695                        $enlarge_path = 
"images/enlarge.svg";
 
  701                $this->ctrl->setParameter($this, 
"obj_type", 
"MediaObject");
 
  704                $this->ctrl->clearParameters($this);
 
  706                $params = array (
'mode' => $mode, 
'enlarge_path' => $enlarge_path,
 
  707                        'link_params' => 
"ref_id=".
$_GET[
"ref_id"],
'fullscreen_link' => $fullscreen_link,
 
  708                        'ref_id' => 
$_GET[
"ref_id"], 
'pg_frame' => $pg_frame, 
'webspace_path' => $wb_path);
 
  709                $output = xslt_process($xh,
"arg:/_xml",
"arg:/_xsl",NULL,$args, 
$params);
 
  714                $this->tpl->setVariable(
"MEDIA_CONTENT", 
$output);
 
  716                $this->tpl->parseCurrentBlock();
 
  719                        $html = $this->tpl->get();
 
  732                if (!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))
 
  734                        $ilias->raiseError(
$lng->txt(
"permission_denied"),
$ilias->error_obj->MESSAGE);
 
  737                $this->tpl->addBlockFile(
"ADM_CONTENT", 
"adm_content", 
"tpl.glo_download_list.html", 
"Modules/Glossary");
 
  740                $ilTabs->activateTab(
"download");
 
  743                $this->tpl->setTitle($this->glossary->getTitle());
 
  747                require_once(
"./Services/Table/classes/class.ilTableGUI.php");
 
  751                $this->tpl->addBlockfile(
"DOWNLOAD_TABLE", 
"download_table", 
"tpl.table.html");
 
  754                $this->tpl->addBlockfile(
"TBL_CONTENT", 
"tbl_content", 
"tpl.download_file_row.html", 
"Modules/Glossary");
 
  756                $export_files = array();
 
  757                $types = array(
"xml", 
"html");
 
  758                foreach($types as $type)
 
  760                        if ($this->glossary->getPublicExportFile($type) != 
"")
 
  762                                $dir = $this->glossary->getExportDirectory($type);
 
  763                                if (is_file($this->glossary->getExportDirectory($type).
"/".
 
  764                                        $this->glossary->getPublicExportFile($type)))
 
  766                                        $size = filesize($this->glossary->getExportDirectory($type).
"/".
 
  767                                                $this->glossary->getPublicExportFile($type));
 
  768                                        $export_files[] = array(
"type" => $type,
 
  769                                                "file" => $this->glossary->getPublicExportFile($type),
 
  777                $tbl->setTitle($this->lng->txt(
"download"));
 
  779                $tbl->setHeaderNames(array($this->lng->txt(
"cont_format"),
 
  780                        $this->lng->txt(
"cont_file"),
 
  781                        $this->lng->txt(
"size"), $this->lng->txt(
"date"),
 
  784                $cols = array(
"format", 
"file", 
"size", 
"date", 
"download");
 
  785                $header_params = array(
"ref_id" => 
$_GET[
"ref_id"], 
"obj_id" => 
$_GET[
"obj_id"],
 
  786                        "cmd" => 
"showDownloadList", 
"cmdClass" => strtolower(get_class($this)));
 
  787                $tbl->setHeaderVars($cols, $header_params);
 
  788                $tbl->setColumnWidth(array(
"10%", 
"30%", 
"20%", 
"20%",
"20%"));
 
  789                $tbl->disable(
"sort");
 
  793                $tbl->setOrderDirection(
$_GET[
"sort_order"]);
 
  796                $tbl->setMaxCount($this->maxcount);             
 
  802                $tbl->disable(
"footer");
 
  804                $tbl->setMaxCount(count($export_files));
 
  805                $export_files = array_slice($export_files, 
$_GET[
"offset"], 
$_GET[
"limit"]);
 
  808                if(count($export_files) > 0)
 
  811                        foreach($export_files as $exp_file)
 
  813                                $this->tpl->setCurrentBlock(
"tbl_content");
 
  814                                $this->tpl->setVariable(
"TXT_FILENAME", $exp_file[
"file"]);
 
  817                                $this->tpl->setVariable(
"CSS_ROW", $css_row);
 
  819                                $this->tpl->setVariable(
"TXT_SIZE", $exp_file[
"size"]);
 
  820                                $this->tpl->setVariable(
"TXT_FORMAT", strtoupper($exp_file[
"type"]));
 
  821                                $this->tpl->setVariable(
"CHECKBOX_ID", $exp_file[
"type"].
":".$exp_file[
"file"]);
 
  823                                $file_arr = explode(
"__", $exp_file[
"file"]);
 
  824                                $this->tpl->setVariable(
"TXT_DATE", 
date(
"Y-m-d H:i:s",$file_arr[0]));
 
  826                                $this->tpl->setVariable(
"TXT_DOWNLOAD", $this->lng->txt(
"download"));
 
  827                                $this->ctrl->setParameter($this, 
"type", $exp_file[
"type"]);
 
  828                                $this->tpl->setVariable(
"LINK_DOWNLOAD",
 
  829                                        $this->ctrl->getLinkTarget($this, 
"downloadExportFile"));
 
  831                                $this->tpl->parseCurrentBlock();
 
  836                        $this->tpl->setVariable(
"TXT_OBJECT_NOT_FOUND", $this->lng->txt(
"obj_not_found"));
 
  837                        $this->tpl->setVariable(
"NUM_COLS", 5);
 
  838                        $this->tpl->parseCurrentBlock();
 
  851                if (!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))
 
  853                        $ilias->raiseError(
$lng->txt(
"permission_denied"),
$ilias->error_obj->MESSAGE);
 
  856                $file = $this->glossary->getPublicExportFile(
$_GET[
"type"]);
 
  857                if ($this->glossary->getPublicExportFile(
$_GET[
"type"]) != 
"")
 
  859                        $dir = $this->glossary->getExportDirectory(
$_GET[
"type"]);
 
  860                        if (is_file($dir.
"/".
$file))
 
  866                $this->
ilias->raiseError($this->lng->txt(
"file_not_found"),$this->ilias->error_obj->MESSAGE);
 
  879                require_once (
"./Modules/Glossary/classes/class.ilGlossaryLocatorGUI.php");
 
  881                $gloss_loc->setMode(
"presentation");
 
  882                if (!empty($this->term_id))
 
  885                        $gloss_loc->setTerm($term);
 
  887                $gloss_loc->setGlossary($this->glossary);
 
  889                $gloss_loc->display();
 
  899                if (!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))
 
  901                        $ilias->raiseError(
$lng->txt(
"permission_denied"),
$ilias->error_obj->MESSAGE);
 
  905                include_once(
"./Modules/File/classes/class.ilObjFile.php");
 
  907                $fileObj->sendFile();
 
  925                if ($a_layoutframes == 
"")
 
  927                        $a_layoutframes = array();
 
  929                $link_info = 
"<IntLinkInfos>";
 
  930                foreach ($a_int_links as $int_link)
 
  934                        if (substr(
$target, 0, 4) == 
"il__")
 
  938                                $type = $int_link[
"Type"];
 
  939                                $targetframe = ($int_link[
"TargetFrame"] != 
"")
 
  940                                        ? $int_link[
"TargetFrame"]
 
  944                                $anc = $anc_add = 
"";
 
  945                                if ($int_link[
"Anchor"] != 
"")
 
  947                                        $anc = $int_link[
"Anchor"];
 
  948                                        $anc_add = 
"_".rawurlencode($int_link[
"Anchor"]);
 
  951                                if ($targetframe == 
"New")
 
  963                                        case "StructureObject":
 
  965                                                $cont_obj = $this->content_object;
 
  966                                                if ($type == 
"PageObject")
 
  968                                                        $href = 
"./goto.php?target=pg_".$target_id.$anc_add;
 
  972                                                        $href = 
"./goto.php?target=st_".$target_id;
 
  982                                                                $href = 
"term_".$target_id.
".html";
 
  986                                                                $this->ctrl->setParameter($this, 
"term_id", 
$target_id);
 
  987                                                                $href = $this->ctrl->getLinkTarget($this, 
"listDefinitions");
 
  988                                                                $href = str_replace(
"&", 
"&", $href);
 
  993                                                        $href = 
"./goto.php?target=git_".$target_id;
 
 1000                                                        $href = 
"media_".$target_id.
".html";
 
 1004                                                        $this->ctrl->setParameter($this, 
"obj_type", $type);
 
 1005                                                        $this->ctrl->setParameter($this, 
"mob_id", 
$target_id);
 
 1006                                                        $href = $this->ctrl->getLinkTarget($this, 
"media");
 
 1007                                                        $href = str_replace(
"&", 
"&", $href);
 
 1011                                        case "RepositoryItem":
 
 1014                                                $href = 
"./goto.php?target=".$obj_type.
"_".
$target_id;
 
 1016                                                $ltarget = $t_frame;
 
 1020                                                include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
 
 1025                                $anc_par = 
'Anchor="'.$anc.
'"';
 
 1027                                $link_info.=
"<IntLinkInfo Target=\"$target\" Type=\"$type\" ".
 
 1028                                        "TargetFrame=\"$targetframe\" LinkHref=\"$href\" LinkTarget=\"$ltarget\" $anc_par/>";
 
 1030                                $this->ctrl->clearParameters($this);
 
 1033                $link_info.= 
"</IntLinkInfos>";
 
 1042        function getLink($a_ref_id, $a_cmd = 
"", $a_term_id = 
"", $a_def_id = 
"",
 
 1058                                        $this->ctrl->setParameter($this, 
"def_id", $a_def_id);
 
 1059                                        $link = $this->ctrl->getLinkTarget($this, 
"fullscreen");
 
 1063                                        $link.= 
"&cmd=".$a_cmd;
 
 1066                                                $this->ctrl->setParameter($this, 
"frame", $a_frame);
 
 1068                                        if ($a_obj_id != 
"")
 
 1073                                                                $this->ctrl->setParameter($this, 
"mob_id", $a_obj_id);
 
 1077                                                                $this->ctrl->setParameter($this, 
"def_id", $a_def_id);
 
 1083                                                $this->ctrl->setParameter($this, 
"obj_type", 
$a_type);
 
 1085                                        $link = $this->ctrl->getLinkTarget($this, $a_cmd);
 
 1094                                case "downloadFile":
 
 1098                                        $link = 
"fullscreen.html";              
 
 1105                                        $link = 
"term_".$a_obj_id.
".html";
 
 1109                                        $link = 
"media_".$a_obj_id.
".html";
 
 1116                $this->ctrl->clearParameters($this);
 
 1130                $ilCtrl->saveParameter($this, 
"term_id");
 
 1132                if ((
int) $this->term_id == 0)
 
 1135                        $ilTabs->activateTab(
"print_view");
 
 1141                        $tpl->setTitle($this->lng->txt(
"cont_term").
": ".$term->getTerm());
 
 1147                $tpl->setContent($this->form->getHTML());
 
 1157                $terms = $this->glossary->getTermList();
 
 1159                include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
 1161                $this->form->setTarget(
"print_view");
 
 1162                $this->form->setFormAction(
$ilCtrl->getFormAction($this));
 
 1166                $radg->setValue(
"glossary");
 
 1169                        if ((
int) $this->term_id > 0)
 
 1172                                $radg->addOption($op1);
 
 1173                                $radg->setValue(
"term");
 
 1178                                .
" (".
$lng->txt(
"cont_terms").
": ".count($terms).
")", 
"glossary");
 
 1179                        $radg->addOption($op2);
 
 1182                        if (($t_id = $this->glossary->getTaxonomyId()) > 0 && $this->glossary->getShowTaxonomy())
 
 1185                                $radg->addOption($op4);
 
 1188                                include_once(
"./Services/Taxonomy/classes/class.ilTaxAssignInputGUI.php");
 
 1191                                if ($this->tax_node > 0)
 
 1193                                        $si->setValue((
int) $this->tax_node);
 
 1195                                $op4->addSubItem(
$si);
 
 1201                        $radg->addOption($op3);
 
 1203                        include_once(
"./Services/Form/classes/class.ilNestedListInputGUI.php");
 
 1205                        $op3->addSubItem($nl);
 
 1207                        foreach ($terms as 
$t)
 
 1209                                $nl->addListNode(
$t[
"id"], 
$t[
"term"], 0, 
false, 
false);
 
 1212                $this->form->addItem($radg);
 
 1214                $this->form->addCommandButton(
"printView", 
$lng->txt(
"cont_show_print_view"));
 
 1215                $this->form->setPreventDoubleSubmission(
false);
 
 1217                $this->form->setTitle(
$lng->txt(
"cont_print_selection"));
 
 1228                global $ilAccess, 
$tpl;
 
 1230                if (!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))
 
 1236                switch (
$_POST[
"sel_type"])
 
 1239                                $ts = $this->glossary->getTermList();
 
 1242                                        $terms[] = 
$t[
"id"];
 
 1247                                include_once(
"./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
 
 1248                                $t_id = $this->glossary->getTaxonomyId();
 
 1250                                foreach ($items as $i)
 
 1252                                        if ($i[
"item_type"] == 
"term")
 
 1254                                                $terms[] = $i[
"item_id"];
 
 1260                                if (is_array(
$_POST[
"obj_id"]))
 
 1262                                        $terms = 
$_POST[
"obj_id"];
 
 1271                                $terms = array($this->term_id);
 
 1291                include_once(
"./Services/jQuery/classes/class.iljQueryUtil.php");
 
 1296                foreach ($terms as $t_id)
 
 1300                $tpl->setVariable(
"CONTENT", $page_content.
 
 1301                '<script type="text/javascript" language="javascript1.2"> 
 1303                        il.Util.addOnLoad(function () { 
 1319                $ilHelp->setScreenIdComponent(
"glo");
 
 1321                $oldoffset = (is_numeric (
$_GET[
"oldoffset"]))?
$_GET[
"oldoffset"]:
$_GET[
"offset"];
 
 1325                        if ($this->ctrl->getCmd() != 
"listDefinitions")
 
 1327                                if ($ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))
 
 1329                                        $this->tabs_gui->addTab(
"terms",
 
 1330                                                $lng->txt(
"cont_terms"),
 
 1331                                                $ilCtrl->getLinkTarget($this, 
"listTerms"));
 
 1334                                $this->tabs_gui->addTab(
"info",
 
 1335                                        $lng->txt(
"info_short"),
 
 1336                                        $ilCtrl->getLinkTarget($this, 
"infoScreen"));
 
 1338                                $this->tabs_gui->addTab(
"print_view",
 
 1339                                        $lng->txt(
"cont_print_view"),
 
 1340                                        $ilCtrl->getLinkTarget($this, 
"printViewSelection"));
 
 1343                                if ($ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))
 
 1348                                                if ($this->glossary->isActiveDownloads())
 
 1350                                                        $this->tabs_gui->addTab(
"download",
 
 1351                                                                $lng->txt(
"download"),
 
 1352                                                                $ilCtrl->getLinkTarget($this, 
"showDownloadList"));
 
 1357                                if ($ilAccess->checkAccess(
"write", 
"", (
int) 
$_GET[
"ref_id"]) ||
 
 1358                                        $ilAccess->checkAccess(
"edit_content", 
"", (
int) 
$_GET[
"ref_id"]))
 
 1360                                        include_once(
"./Modules/Glossary/classes/class.ilGlossaryTerm.php");
 
 1361                                        $this->tabs_gui->addNonTabbedLink(
"editing_view",
 
 1362                                                $lng->txt(
"glo_editing_view"),
 
 1363                                                "ilias.php?baseClass=ilGlossaryEditorGUI&ref_id=".(int) 
$_GET[
"ref_id"],
 
 1371                        $this->tabs_gui->addTarget(
"cont_back",
 
 1372                                "index.html#term_".$this->term_id, 
"",
 
 1378                include_once(
"./Modules/Glossary/classes/class.ilGlossaryDefPage.php");
 
 1380                $pg_obj->send_paragraph (
$_GET[
"par_id"], 
$_GET[
"downloadtitle"]);
 
 1391                $this->ctrl->setCmd(
"showSummary");
 
 1392                $this->ctrl->setCmdClass(
"ilinfoscreengui");
 
 1410                global 
$ilBench, $ilAccess, $ilTabs;
 
 1413                $ilTabs->activateTab(
"info");
 
 1414                $this->lng->loadLanguageModule(
"meta");
 
 1416                include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
 
 1419                $info->enablePrivateNotes();
 
 1422                $info->enableNews();
 
 1423                if ($ilAccess->checkAccess(
"write", 
"", 
$_GET[
"ref_id"]))
 
 1425                        $info->enableNewsEditing();
 
 1427                        $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
 
 1428                        if ($enable_internal_rss)
 
 1430                                $info->setBlockProperty(
"news", 
"settings", 
true);
 
 1435                if ($ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))
 
 1452                $info->addMetaDataSections($this->glossary->getId(),0, $this->glossary->getType());
 
 1454                include_once(
"./Modules/Glossary/classes/class.ilObjGlossaryGUI.php");
 
 1459                        $this->tpl->setContent(
$info->getHTML());
 
 1460                        return $this->tpl->get();
 
 1465                        $this->ctrl->forwardCommand(
$info);
 
 1479                $ilCtrl->redirect($this, 
"listTerms");
 
 1491                if (!$this->
offlineMode() && $this->glossary->getShowTaxonomy())
 
 1493                        include_once(
"./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
 
 1495                        if (count($tax_ids) > 0)
 
 1497                                include_once(
"./Services/Taxonomy/classes/class.ilTaxonomyExplorerGUI.php");
 
 1499                                        "ilglossarypresentationgui", 
"listTerms");
 
 1500                                if (!$tax_exp->handleCommand())
 
 1503                                        $tpl->setLeftContent($tax_exp->getHTML().
" ");
 
 1508                                include_once(
"./Services/Taxonomy/classes/class.ilObjTaxonomyGUI.php");
 
 1510                                        "ilglossarypresentationgui", 
"listTerms", 
$lng->txt(
"cont_all_topics")));
 
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
An exception for terminatinating execution or to throw for unit testing.
const IL_PAGE_PRESENTATION
Glossary definition page GUI class.
Glossary definition page object.
static getDefinitionList($a_term_id)
static
Class ilGlossaryPresentationGUI.
downloadFile()
download file of file lists
outputInfoScreen()
info screen call from inside learning module
printViewSelection()
Print view selection.
getPresentationTable()
Get presentation table.
getOfflineDirectory()
Get offline directory.
showDownloadList()
show download list
initPrintViewSelectionForm()
Init print view selection form.
media($a_mode="media")
show media object
chooseLetter()
Choose first letter.
setOfflineDirectory($a_dir)
Set offline directory.
infoScreen()
this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually,...
setOfflineMode($a_offline=true)
set offline mode (content is generated for offline package)
resetFilter()
Reset filter (note: this function existed before data table filter has been introduced.
getLinkXML($a_int_links)
get link targets
setLocator($a_tree="", $a_id="")
set Locator
fullscreen()
show fullscreen view
__construct()
Constructor @access public.
applyFilter()
Apply filter.
listTermByGiven()
list glossary terms
showTaxonomy()
Show taxonomy.
listDefinitions($a_ref_id=0, $a_term_id=0, $a_get_html=false, $a_page_mode=IL_PAGE_PRESENTATION)
list definitions of a term
listTerms()
List all terms.
executeCommand()
execute command
downloadExportFile()
send download file (xml/html)
offlineMode()
checks wether offline content generation is activated
showDefinitionTabs($a_act)
Definitions tabs.
getLink($a_ref_id, $a_cmd="", $a_term_id="", $a_def_id="", $a_frame="", $a_type="")
handles links for learning module presentation
static isReferenced($a_glo_id, $a_term_id)
Is a term referenced by one or multiple glossaries.
static _lookGlossaryID($term_id)
get glossary id form term id
static _getSourcesOfTarget($a_target_type, $a_target_id, $a_target_inst)
get all sources of a link target
static _lookupContObjID($a_id)
get learning module / digibook id for lm object
static _getPresentationTitle($a_pg_id, $a_mode=IL_CHAPTER_TITLE, $a_include_numbers=false, $a_time_scheduled_activation=false, $a_force_content=false, $a_lm_id=0, $a_lang="-")
presentation title doesn't have to be page title, it may be chapter title + page title or chapter tit...
static addUsagesToInfo($info, $glo_id)
Add usages to info.
static getContentPrintStyle()
get content print style
static getSyntaxStylePath()
get syntax style path
static getContentStylePath($a_style_id)
get content style path
static getTreeHTML($a_tax_id, $a_class, $a_cmd, $a_target_class, $a_target_cmd, $a_root_node_title="")
Get tree html.
static getUsageOfObject($a_obj_id, $a_include_titles=false)
Get usage of object.
static getSubTreeItems($a_comp, $a_obj_id, $a_item_type, $a_tax_id, $a_node)
Get all assigned items under a node.
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
static _getAllReferences($a_id)
get all reference ids of object
static _lookupType($a_id, $a_reference=false)
lookup object type
Term list table for presentation mode.
This class represents an option in a radio group.
Taxonomy explorer GUI class.
special template class to simplify handling of ITX/PEAR
static highlight($a_dom_node_id, $a_text, $a_tpl=null)
Searches for all occurences of a text (case-insensitive) and highlights it.
static _getInstance($a_usr_id)
Get singleton instance.
static getWebspaceDir($mode="filesystem")
get webspace directory
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
static switchColor($a_num, $a_css1, $a_css2)
switches style sheets for each even $a_num (used for changing colors of different result rows)
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static deliverFile($a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.
static getGotoForWikiPageTarget($a_target, $a_offline=false)
Get goto href for internal wiki page link target.
static initjQuery($a_tpl=null)
Init jQuery.
if(!is_dir( $entity_dir)) exit("Fatal Error ([A-Za-z0-9]+)\s+" &#(? foreach( $entity_files as $file) $output
redirection script todo: (a better solution should control the processing via a xml file)
if(!file_exists("$old.txt")) if( $old===$new) if(file_exists("$new.txt")) $file