5require_once(
"./Services/Object/classes/class.ilObject.php");
 
    6require_once(
"./Modules/Glossary/classes/class.ilGlossaryTerm.php");
 
    7include_once(
"./Services/AdvancedMetaData/interfaces/interface.ilAdvancedMetaDataSubItems.php");
 
   47    public function __construct($a_id = 0, $a_call_by_reference = 
true)
 
   50        $this->
error = $DIC[
"ilErr"];
 
   51        $this->tpl = 
$DIC[
"tpl"];
 
   53        $this->db = 
$DIC->database();
 
   54        $this->
user = $DIC->user();
 
   56        parent::__construct($a_id, $a_call_by_reference);
 
   62    public function create($a_upload = 
false)
 
   74                'id' => array(
'integer', $this->
getId()),
 
   75                'is_online' => array(
'text', 
'n'),
 
   77                'pres_mode' => array(
'text', 
'table'),
 
   78                'snippet_length' => array(
'integer', 200)
 
   88            include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
 
   99        #               echo "Glossary<br>\n";
 
  101        $q = 
"SELECT * FROM glossary WHERE id = " .
 
  102            $this->db->quote($this->
getId(), 
"integer");
 
  103        $gl_set = $this->db->query($q);
 
  104        $gl_rec = $this->db->fetchAssoc($gl_set);
 
  115        include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
 
  119        $set = $this->db->query(
 
  120            "SELECT * FROM glo_glossaries " .
 
  121            " WHERE id = " . $this->db->quote($this->getId(), 
"integer")
 
  124        while ($rec = $this->db->fetchAssoc($set)) {
 
  125            $glos[] = $rec[
"glo_id"];
 
  145        parent::setDescription($a_description);
 
  158                $this->virtual_mode = $a_mode;
 
  159                $this->
virtual = 
true;
 
  163                $this->virtual_mode = 
"none";
 
  164                $this->
virtual = 
false;
 
  174        return $this->virtual_mode;
 
  182        return $this->virtual;
 
  192        return parent::getTitle();
 
  200        parent::setTitle($a_title);
 
  211        $this->pres_mode = $a_val;
 
  221        return $this->pres_mode;
 
  231        $this->snippet_length = $a_val;
 
  241        return ($this->snippet_length > 0)
 
  242            ? $this->snippet_length
 
  248        $this->online = $a_online;
 
  253        return $this->online;
 
  265        $q = 
"SELECT is_online FROM glossary WHERE id = " .
 
  266            $db->quote($a_id, 
"integer");
 
  279    protected static function lookup($a_id, $a_property)
 
  285        $set = 
$db->query(
"SELECT $a_property FROM glossary WHERE id = " .
 
  286            $db->quote($a_id, 
"integer"));
 
  287        $rec = 
$db->fetchAssoc($set);
 
  289        return $rec[$a_property];
 
  306        $this->glo_menu_active = $a_act_glo_menu;
 
  311        return $this->glo_menu_active;
 
  316        $this->downloads_active = $a_down;
 
  321        return $this->downloads_active;
 
  329        return $this->style_id;
 
  337        $this->style_id = $a_style_id;
 
  348        $this->show_tax = $a_val;
 
  358        return $this->show_tax;
 
  368        $this->auto_glossaries = array();
 
  369        if (is_array($a_val)) {
 
  370            foreach ($a_val as $v) {
 
  382        $glo_id = (int) $glo_id;
 
  384            !in_array($glo_id, $this->auto_glossaries)) {
 
  385            $this->auto_glossaries[] = $glo_id;
 
  409            if ($g != $a_glo_id) {
 
  437                'id' => array(
'integer', $this->
getId())
 
  440        include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
 
  457        $this->db->manipulate(
 
  458            "DELETE FROM glo_glossaries WHERE " .
 
  459            " id = " . $this->db->quote($this->getId(), 
"integer")
 
  465                    'id' => array(
'integer', $this->
getId()),
 
  466                    'glo_id' => array(
'integer', $glo_id)
 
  486            "SELECT * FROM glo_glossaries " .
 
  487            " WHERE id = " . 
$db->quote($a_id, 
"integer")
 
  490        while ($rec = 
$db->fetchAssoc($set)) {
 
  491            $glos[] = $rec[
"glo_id"];
 
  504        $a_include_offline_childs = 
false,
 
  505        $a_add_amet_fields = 
false,
 
  506        array $a_amet_filter = 
null,
 
  507        $a_omit_virtual = 
false,
 
  508        $a_include_references = 
false 
  510        if ($a_omit_virtual) {
 
  523            $a_include_references
 
  535        return $first_letters;
 
  554            switch ($virtual_mode) {
 
  556                    $glo_arr = 
$tree->getChildsByType(
$tree->getParentId($this->getRefId()), 
"glo");
 
  557                    foreach ($glo_arr as $glo) {
 
  559                            if ($ids_are_ref_ids) {
 
  560                                $glo_ids[] = $glo[
'child'];
 
  562                                $glo_ids[] = $glo[
'obj_id'];
 
  569                    $subtree_nodes = 
$tree->getSubTree(
$tree->getNodeData(
$tree->getParentId($this->getRefId())));
 
  571                    foreach ($subtree_nodes as $node) {
 
  572                        if ($node[
'type'] == 
'glo') {
 
  573                            if ($ids_are_ref_ids) {
 
  574                                $glo_ids[] = $node[
'child'];
 
  576                                $glo_ids[] = $node[
'obj_id'];
 
  582            if (!$a_include_offline_childs) {
 
  587            if ($ids_are_ref_ids) {
 
  588                if (!in_array($this->
getRefId(), $glo_ids)) {
 
  592                if (!in_array($this->
getId(), $glo_ids)) {
 
  593                    $glo_ids[] = $this->
getId();
 
  597            if ($ids_are_ref_ids) {
 
  600                $glo_ids = $this->
getId();
 
  618        if (!is_writable($glo_data_dir)) {
 
  619            $ilErr->raiseError(
"Glossary Data Directory (" . $glo_data_dir
 
  620                . 
") not writeable.", 
$ilErr->error_obj->FATAL);
 
  624        $glo_dir = $glo_data_dir . 
"/glo_" . $this->
getId();
 
  626        if (!@is_dir($glo_dir)) {
 
  627            $ilErr->raiseError(
"Creation of Glossary Directory failed.", 
$ilErr->FATAL);
 
  630        $import_dir = $glo_dir . 
"/import";
 
  632        if (!@is_dir($import_dir)) {
 
  633            $ilErr->raiseError(
"Creation of Export Directory failed.", 
$ilErr->FATAL);
 
  652        include_once(
"./Services/Export/classes/class.ilExport.php");
 
  661        include_once(
"./Services/Export/classes/class.ilExport.php");
 
  670        include_once(
"./Services/Export/classes/class.ilExport.php");
 
  682        $this->public_export_file[
$a_type] = $a_file;
 
  694        return $this->public_export_file[
$a_type];
 
  709        include_once 
'./Services/MathJax/classes/class.ilMathJax.php';
 
  712        include_once(
"./Services/COPage/classes/class.ilCOPageHTMLExport.php");
 
  714        $this->co_page_html_export->createDirectories();
 
  718        $style_name = $this->
user->prefs[
"style"] . 
".css";
 
  719        copy($location_stylesheet, $a_target_dir . 
"/" . $style_name);
 
  723            $cont_stylesheet = 
"Services/COPage/css/content.css";
 
  724            copy($cont_stylesheet, $a_target_dir . 
"/content.css");
 
  726            $content_style_img_dir = $a_target_dir . 
"/images";
 
  729            $style->writeCSSFile($a_target_dir . 
"/content.css", 
"images");
 
  730            $style->copyImagesToDir($content_style_img_dir);
 
  735        copy($syn_stylesheet, $a_target_dir . 
"/syntaxhighlight.css");
 
  738        include_once(
"./Modules/Glossary/classes/class.ilGlossaryPresentationGUI.php");
 
  739        $_GET[
"cmd"] = 
"nop";
 
  741        $glo_gui->setOfflineMode(
true);
 
  742        $glo_gui->setOfflineDirectory($a_target_dir);
 
  752        foreach ($this->offline_mobs as $mob) {
 
  753            $this->
exportHTMLMOB($a_target_dir, $glo_gui, $mob, 
"_blank");
 
  755        $_GET[
"obj_type"] = 
"MediaObject";
 
  756        $_GET[
"obj_id"] = $a_mob_id;
 
  760        foreach ($this->offline_files as $file) {
 
  765        $image_dir = $a_target_dir . 
"/images";
 
  770            $image_dir . 
"/enlarge.svg" 
  774            $image_dir . 
"/browser/plus.png" 
  778            $image_dir . 
"/browser/minus.png" 
  782            $image_dir . 
"/browser/blank.png" 
  786            $image_dir . 
"/icon_st.svg" 
  790            $image_dir . 
"/icon_pg.svg" 
  794            $image_dir . 
"/nav_arr_L.png" 
  798            $image_dir . 
"/nav_arr_R.png" 
  803        $tpl->setVariable(
"LOCATION_STYLESHEET", $location_stylesheet);
 
  804        $tpl->addBlockFile(
"CONTENT", 
"content", 
"tpl.adm_content.html");
 
  810            $zip_file = $this->
getExportDirectory(
"html") . 
"/" . $date . 
"__" . IL_INST_ID . 
"__" .
 
  824        include_once(
"./Services/COPage/classes/class.ilCOPageHTMLExport.php");
 
  826        $copage_export->exportSupportScripts();
 
  829        $a_glo_gui->tpl = 
new ilTemplate(
"tpl.main.html", 
true, 
true);
 
  830        $style_name = $this->
user->prefs[
"style"] . 
".css";
 
  832        $a_glo_gui->tpl->setVariable(
"LOCATION_STYLESHEET", 
"./" . $style_name);
 
  833        $a_glo_gui->tpl->addBlockFile(
"CONTENT", 
"content", 
"tpl.adm_content.html");
 
  834        $a_glo_gui->tpl->setTitle($this->
getTitle());
 
  836        $content = $a_glo_gui->listTerms();
 
  837        $file = $a_target_dir . 
"/index.html";
 
  840        if (!($fp = @fopen($file, 
"w+"))) {
 
  841            die(
"<b>Error</b>: Could not open \"" . $file . 
"\" for writing" .
 
  842                " in <b>" . __FILE__ . 
"</b> on line <b>" . __LINE__ . 
"</b><br />");
 
  845        fwrite($fp, $content);
 
  850        $this->offline_mobs = array();
 
  851        $this->offline_files = array();
 
  853        foreach ($terms as $term) {
 
  854            $a_glo_gui->tpl = 
new ilTemplate(
"tpl.main.html", 
true, 
true);
 
  855            $a_glo_gui->tpl = $copage_export->getPreparedMainTemplate();
 
  859            $style_name = $this->
user->prefs[
"style"] . 
".css";
 
  861            $a_glo_gui->tpl->setVariable(
"LOCATION_STYLESHEET", 
"./" . $style_name);
 
  863            $_GET[
"term_id"] = $term[
"id"];
 
  864            $_GET[
"frame"] = 
"_blank";
 
  865            $content = $a_glo_gui->listDefinitions(
$_GET[
"ref_id"], $term[
"id"], 
false);
 
  866            $file = $a_target_dir . 
"/term_" . $term[
"id"] . 
".html";
 
  869            if (!($fp = @fopen($file, 
"w+"))) {
 
  870                die(
"<b>Error</b>: Could not open \"" . $file . 
"\" for writing" .
 
  871                    " in <b>" . __FILE__ . 
"</b> on line <b>" . __LINE__ . 
"</b><br />");
 
  874            fwrite($fp, $content);
 
  878            include_once(
"./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
 
  880            foreach ($defs as 
$def) {
 
  882                foreach ($def_mobs as $def_mob) {
 
  883                    $this->offline_mobs[$def_mob] = $def_mob;
 
  887                include_once(
"./Modules/File/classes/class.ilObjFile.php");
 
  889                $this->offline_files = array_merge($this->offline_files, $def_files);
 
  901        $mob_dir = $a_target_dir . 
"/mobs";
 
  904        if (@is_dir($source_dir)) {
 
  910        $tpl->addBlockFile(
"CONTENT", 
"content", 
"tpl.adm_content.html");
 
  911        $_GET[
"obj_type"] = 
"MediaObject";
 
  912        $_GET[
"mob_id"] = $a_mob_id;
 
  914        $content = $a_glo_gui->media();
 
  915        $file = $a_target_dir . 
"/media_" . $a_mob_id . 
".html";
 
  918        if (!($fp = @fopen($file, 
"w+"))) {
 
  919            die(
"<b>Error</b>: Could not open \"" . $file . 
"\" for writing" .
 
  920                " in <b>" . __FILE__ . 
"</b> on line <b>" . __LINE__ . 
"</b><br />");
 
  923        fwrite($fp, $content);
 
  927        include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
 
  929        if ($mob_obj->hasFullscreenItem()) {
 
  931            $tpl->addBlockFile(
"CONTENT", 
"content", 
"tpl.adm_content.html");
 
  932            $_GET[
"mob_id"] = $a_mob_id;
 
  933            $_GET[
"cmd"] = 
"fullscreen";
 
  934            $content = $a_glo_gui->fullscreen();
 
  935            $file = $a_target_dir . 
"/fullscreen_" . $a_mob_id . 
".html";
 
  938            if (!($fp = @fopen($file, 
"w+"))) {
 
  939                die(
"<b>Error</b>: Could not open \"" . $file . 
"\" for writing" .
 
  940                    " in <b>" . __FILE__ . 
"</b> on line <b>" . __LINE__ . 
"</b><br />");
 
  943            fwrite($fp, $content);
 
  953        $file_dir = $a_target_dir . 
"/files/file_" . $a_file_id;
 
  955        include_once(
"./Modules/File/classes/class.ilObjFile.php");
 
  956        $file_obj = 
new ilObjFile($a_file_id, 
false);
 
  957        $source_file = $file_obj->getDirectory($file_obj->getVersion()) . 
"/" . $file_obj->getFileName();
 
  958        if (!is_file($source_file)) {
 
  959            $source_file = $file_obj->getDirectory() . 
"/" . $file_obj->getFileName();
 
  961        copy($source_file, $file_dir . 
"/" . $file_obj->getFileName());
 
  971    public function exportXML(&$a_xml_writer, $a_inst, $a_target_dir, &$expLog)
 
  975        $attrs[
"Type"] = 
"Glossary";
 
  976        $a_xml_writer->xmlStartTag(
"ContentObject", $attrs);
 
  983        $this->mob_ids = array();
 
  984        $this->file_ids = array();
 
  985        foreach ($terms as $term) {
 
  986            include_once 
"./Modules/Glossary/classes/class.ilGlossaryDefinition.php";
 
  990            foreach ($defs as 
$def) {
 
  992                $this->page_object->buildDom();
 
  993                $this->page_object->insertInstIntoIDs(IL_INST_ID);
 
  994                $mob_ids = $this->page_object->collectMediaObjects(
false);
 
  995                include_once(
"./Services/COPage/classes/class.ilPCFileList.php");
 
  997                foreach ($mob_ids as $mob_id) {
 
  998                    $this->mob_ids[$mob_id] = $mob_id;
 
 1000                foreach ($file_ids as $file_id) {
 
 1001                    $this->file_ids[$file_id] = $file_id;
 
 1007        $expLog->write(date(
"[y-m-d H:i:s] ") . 
"Start Export Media Objects");
 
 1009        $expLog->write(date(
"[y-m-d H:i:s] ") . 
"Finished Export Media Objects");
 
 1012        $expLog->write(date(
"[y-m-d H:i:s] ") . 
"Start Export File Items");
 
 1014        $expLog->write(date(
"[y-m-d H:i:s] ") . 
"Finished Export File Items");
 
 1017        $expLog->write(date(
"[y-m-d H:i:s] ") . 
"Start Export Glossary Items");
 
 1019        $expLog->write(date(
"[y-m-d H:i:s] ") . 
"Finished Export Glossary Items");
 
 1021        $a_xml_writer->xmlEndTag(
"ContentObject");
 
 1033        $a_xml_writer->xmlStartTag(
"Glossary", $attrs);
 
 1042        foreach ($terms as $term) {
 
 1043            $expLog->write(date(
"[y-m-d H:i:s] ") . 
"Page Object " . $page[
"obj_id"]);
 
 1047            $glo_term->exportXML($a_xml_writer, $a_inst);
 
 1052        $a_xml_writer->xmlEndTag(
"Glossary");
 
 1063        include_once(
"Services/MetaData/classes/class.ilMD2XML.php");
 
 1065        $md2xml->setExportMode(
true);
 
 1066        $md2xml->startExport();
 
 1067        $a_xml_writer->appendXML($md2xml->getXML());
 
 1078        include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
 
 1080        foreach ($this->mob_ids as $mob_id) {
 
 1081            $expLog->write(date(
"[y-m-d H:i:s] ") . 
"Media Object " . $mob_id);
 
 1083            $media_obj->exportXML($a_xml_writer, $a_inst);
 
 1084            $media_obj->exportFiles($a_target_dir);
 
 1095        include_once(
"./Modules/File/classes/class.ilObjFile.php");
 
 1097        foreach ($this->file_ids as $file_id) {
 
 1098            $expLog->write(date(
"[y-m-d H:i:s] ") . 
"File Item " . $file_id);
 
 1099            $file_obj = 
new ilObjFile($file_id, 
false);
 
 1100            $file_obj->export($a_target_dir);
 
 1112        if ($a_tag == 
"Identifier" && $a_param == 
"Entry") {
 
 1113            $a_value = 
"il_" . IL_INST_ID . 
"_glo_" . $this->
getId();
 
 1132    public function delete()
 
 1135        if (!parent::delete()) {
 
 1142            foreach ($terms as $term) {
 
 1144                $term_obj->delete();
 
 1149        include_once(
"./Modules/Glossary/classes/class.ilGlossaryTermReferences.php");
 
 1154        $q = 
"DELETE FROM glossary WHERE id = " . $this->db->quote($this->
getId());
 
 1155        $this->db->query($q);
 
 1168        include_once(
"./Modules/Glossary/classes/class.ilGlossaryExport.php");
 
 1170        return $glo_exp->buildExportFile();
 
 1184        include_once(
"./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php");
 
 1186        foreach ($sms as $sm) {
 
 1187            $lng->loadLanguageModule(
"content");
 
 1188            $dep[$sm] = 
$lng->txt(
"glo_used_in_scorm");
 
 1202        include_once(
"./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
 
 1204        if (count($tax_ids) > 0) {
 
 1218    public function cloneObject($a_target_id, $a_copy_id = 0, $a_omit_tree = 
false)
 
 1220        $new_obj = parent::cloneObject($a_target_id, $a_copy_id, $a_omit_tree);
 
 1226        if (!$cp_options->isRootNode($this->getRefId())) {
 
 1227            $new_obj->setOnline($this->
getOnline());
 
 1239        include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
 
 1242            include_once(
"./Services/Object/classes/class.ilObjectFactory.php");
 
 1244            $new_id = $style_obj->ilClone();
 
 1245            $new_obj->setStyleSheetId($new_id);
 
 1252            include_once(
"./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
 
 1254            $new_tax = $tax->cloneObject(0, 0, 
true);
 
 1255            $map = $tax->getNodeMapping();
 
 1265        include_once(
"./Services/Taxonomy/classes/class.ilTaxNodeAssignment.php");
 
 1268            $new_tax_ass = 
new ilTaxNodeAssignment(
"glo", $new_obj->getId(), 
"term", $new_tax->getId());
 
 1272        $term_mappings = array();
 
 1275            $term_mappings[$term[
"id"]] = $new_term_id;
 
 1279                $assignmts = $tax_ass->getAssignmentsOfItem($term[
"id"]);
 
 1280                foreach ($assignmts as $a) {
 
 1281                    if (
$map[$a[
"node_id"]] > 0) {
 
 1282                        $new_tax_ass->addAssignment(
$map[$a[
"node_id"]], $new_term_id);
 
 1289        if (!empty($term_mappings)) {
 
 1290            $cp_options->appendMapping($this->
getRefId() . 
'_glo_terms', (array) $term_mappings);
 
 1305        $glo_ids = $a_glo_ids;
 
 1306        if ($ids_are_ref_ids) {
 
 1307            $glo_ids = array_map(
function (
$id) {
 
 1312        $set = $this->db->query(
 
 1313            "SELECT id FROM glossary " .
 
 1314            " WHERE " . $this->db->in(
"id", $glo_ids, 
false, 
"integer") .
 
 1315            " AND is_online = " . $this->db->quote(
"y", 
"text")
 
 1317        $online_glo_ids = array();
 
 1318        while ($rec = $this->db->fetchAssoc($set)) {
 
 1319            $online_glo_ids[] = $rec[
"id"];
 
 1322        if (!$ids_are_ref_ids) {
 
 1323            return $online_glo_ids;
 
 1326        $online_ref_ids = array_filter($a_glo_ids, 
function (
$ref_id) use ($online_glo_ids) {
 
 1331        return $online_ref_ids;
 
 1340        if ($a_sub_type == 
"term") {
 
 1341            $lng->loadLanguageModule(
"glo");
 
 1343            include_once 
"Modules/Glossary/classes/class.ilGlossaryTerm.php";
 
 1357        include_once(
"./Modules/Glossary/classes/class.ilGlossaryTerm.php");
 
 1362        $found_pages = array();
 
 1363        foreach ($source_terms as $source_term) {
 
 1366            for ($j = 0; $j < count($source_defs); $j++) {
 
 1367                $def = $source_defs[$j];
 
 1370                $c = $pg->getXMLContent();
 
 1371                foreach ($terms as 
$t) {
 
 1372                    if (is_int(stripos(
$c, 
$t[
"term"]))) {
 
 1373                        $found_pages[
$def[
"id"]][
"terms"][] = 
$t;
 
 1374                        if (!is_object($found_pages[
$def[
"id"]][
"page"])) {
 
 1375                            $found_pages[
$def[
"id"]][
"page"] = $pg;
 
 1384        include_once(
"./Services/COPage/classes/class.ilPCParagraph.php");
 
 1385        foreach ($found_pages as 
$id => $fp) {
 
An exception for terminatinating execution or to throw for unit testing.
error($a_errmsg)
set error message @access public
HTML export class for pages.
static _getInstance($a_copy_id)
Get instance of copy wizard options.
static _getExportFiles($a_obj_id, $a_export_types="", $a_obj_type="")
Get Export Files for a repository object.
static _getExportDirectory($a_obj_id, $a_type="xml", $a_obj_type="", $a_entity="")
Get export directory for an repository object.
static _createExportDirectory($a_obj_id, $a_export_type="xml", $a_obj_type="")
Glossary definition page object.
static getDefinitionList($a_term_id)
static
Export class for content objects.
Class ilGlossaryPresentationGUI.
static getTermList( $a_glo_ref_id, $searchterm="", $a_first_letter="", $a_def="", $a_tax_node=0, $a_add_amet_fields=false, array $a_amet_filter=null, $a_include_references=false)
Get all terms for given set of glossary ids.
static _copyTerm($a_term_id, $a_glossary_id)
Copy a term to a glossary.
static _lookGlossaryTerm($term_id)
get glossary term
static getFirstLetters($a_glo_id, $a_tax_node=0)
Get all terms for given set of glossary ids.
static getInstance()
Singleton: get instance.
static _getFilesOfObject($a_type, $a_id, $a_usage_hist_nr=0, $a_usage_lang="-")
get all files of an object
getImportDirectory()
get import directory of glossary
setVirtualMode($a_mode)
set glossary type (virtual: fixed/level/subtree, normal:none)
exportHTML($a_target_dir, $log)
export html package
removeOfflineGlossaries($a_glo_ids, $ids_are_ref_ids=false)
Remove offline glossaries from obj id array.
setPublicExportFile($a_type, $a_file)
specify public export file for type
getAutoGlossaries()
Get auto glossaries.
setTitle($a_title)
set title of glossary object
getPublicExportFile($a_type)
get public export file
getExportFiles()
Get export files.
getTermList( $searchterm="", $a_letter="", $a_def="", $a_tax_node=0, $a_include_offline_childs=false, $a_add_amet_fields=false, array $a_amet_filter=null, $a_omit_virtual=false, $a_include_references=false)
Get term list.
setStyleSheetId($a_style_id)
Set ID of assigned style sheet object.
supportsLongTextQuery()
Is long text search supported.
setActiveDownloads($a_down)
getAllGlossaryIds($a_include_offline_childs=false, $ids_are_ref_ids=false)
Get all glossary ids.
removeAutoGlossary($a_glo_id)
Remove auto glossary.
getSnippetLength()
Get snippet length.
exportFileItems($a_target_dir, &$expLog)
export files of file itmes
static lookupAutoGlossaries($a_id)
Lookup auto glossaries.
exportHTMLMOB($a_target_dir, &$a_glo_gui, $a_mob_id)
export media object to html
exportXML(&$a_xml_writer, $a_inst, $a_target_dir, &$expLog)
export object to xml (see ilias_co.dtd)
create($a_upload=false)
create glossary object
addAutoGlossary($glo_id)
Add auto glossary.
getShowTaxonomy()
Get show taxonomy.
createExportDirectory($a_type="xml")
Creates export directory.
exportXMLGlossaryItems(&$a_xml_writer, $a_inst, &$expLog)
export page objects to xml (see ilias_co.dtd)
cloneObject($a_target_id, $a_copy_id=0, $a_omit_tree=false)
Clone glossary.
getXMLZip()
Get zipped xml file for glossary.
getTaxonomyId()
Get taxonomy.
__construct($a_id=0, $a_call_by_reference=true)
Constructor @access public.
read()
read data of content object
setSnippetLength($a_val)
Set snippet length.
getPresentationMode()
Get presentation mode.
getStyleSheetId()
Get ID of assigned style sheet object.
isVirtual()
returns true if glossary type is virtual (any mode)
static getDeletionDependencies($a_obj_id)
Get deletion dependencies.
static getAdvMDSubItemTitle($a_obj_id, $a_sub_type, $a_sub_id)
static lookupSnippetLength($a_id)
Lookup snippet length.
setShowTaxonomy($a_val)
Set show taxonomy.
exportHTMLGlossaryTerms(&$a_glo_gui, $a_target_dir)
export glossary terms
createImportDirectory()
creates data directory for import files (data_dir/glo_data/glo_<id>/import, depending on data directo...
exportHTMLFile($a_target_dir, $a_file_id)
export file object
autoLinkGlossaryTerms($a_glo_ref_id)
Auto link glossary terms.
getDescription()
get description of glossary object
updateAutoGlossaries()
Update auto glossaries.
exportXMLMediaObjects(&$a_xml_writer, $a_inst, $a_target_dir, &$expLog)
export media objects to xml (see ilias_co.dtd)
getExportDirectory($a_type="xml")
Get export directory of glossary.
modifyExportIdentifier($a_tag, $a_param, $a_value)
static lookup($a_id, $a_property)
Lookup glossary property.
exportXMLMetaData(&$a_xml_writer)
export content objects meta data to xml (see ilias_co.dtd)
static _lookupOnline($a_id)
check wether content object is online
getFirstLetters($a_tax_node=0)
Get term list.
getVirtualMode()
get glossary type (normal or virtual)
getTitle()
get title of glossary object
setAutoGlossaries($a_val)
Set auto glossaries.
setPresentationMode($a_val)
Set presentation mode.
setActiveGlossaryMenu($a_act_glo_menu)
setDescription($a_description)
set description of glossary object
static getScormModulesForGlossary($a_glo_id)
Get SCORM modules that assign a certain glossary.
static _lookupStandard($a_id)
Lookup standard flag.
static lookupObjectStyle($a_obj_id)
Lookup object style.
static getSyntaxStylePath()
get syntax style path
static writeStyleUsage($a_obj_id, $a_style_id)
Write style usage.
static getUsageOfObject($a_obj_id, $a_include_titles=false)
Get usage of object.
static saveUsage($a_tax_id, $a_obj_id)
Save Usage.
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
Class ilObject Basic functions for all objects.
getType()
get object type @access public
static _lookupObjectId($a_ref_id)
lookup object id
deleteMetaData()
delete meta data entry
updateMetaData()
update meta data entry
createMetaData()
create meta data entry
getRefId()
get reference id @access public
cloneMetaData($target_obj)
Copy meta data.
getId()
get object id @access public
static _lookupType($a_id, $a_reference=false)
lookup object type
static collectFileItems($a_page, $a_domdoc)
Get all file items that are used within the page.
static autoLinkGlossariesPage($a_page, $a_terms)
Auto link glossary of whole page.
Taxonomy node <-> item assignment.
special template class to simplify handling of ITX/PEAR
static getDataDir()
get data directory (outside webspace)
static delDir($a_dir, $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
static tf2yn($a_tf)
convert true/false to "y"/"n"
static getWebspaceDir($mode="filesystem")
get webspace directory
static rCopy($a_sdir, $a_tdir, $preserveTimeAttributes=false)
Copies content of a directory $a_sdir recursively to a directory $a_tdir.
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
static zip($a_dir, $a_file, $compress_content=false)
zips given directory/file into given zip.file
static yn2tf($a_yn)
convert "y"/"n" to true/false
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static makeDir($a_dir)
creates a new directory and inherits all filesystem permissions of the parent directory You may pass ...
update($pash, $contents, Config $config)
if(isset($_REQUEST['delete'])) $list