ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilObjGlossary Class Reference

Class ilObjGlossary. More...

+ Inheritance diagram for ilObjGlossary:
+ Collaboration diagram for ilObjGlossary:

Public Member Functions

 __construct ($a_id=0, $a_call_by_reference=true)
 Constructor @access public. More...
 
 create ($a_upload=false)
 create glossary object More...
 
 read ()
 read data of content object More...
 
 getDescription ()
 get description of glossary object More...
 
 setDescription ($a_description)
 set description of glossary object More...
 
 setVirtualMode ($a_mode)
 set glossary type (virtual: fixed/level/subtree, normal:none) More...
 
 getVirtualMode ()
 get glossary type (normal or virtual) More...
 
 isVirtual ()
 returns true if glossary type is virtual (any mode) More...
 
 getTitle ()
 get title of glossary object More...
 
 setTitle ($a_title)
 set title of glossary object More...
 
 setPresentationMode ($a_val)
 Set presentation mode. More...
 
 getPresentationMode ()
 Get presentation mode. More...
 
 setSnippetLength ($a_val)
 Set snippet length. More...
 
 getSnippetLength ()
 Get snippet length. More...
 
 setOnline ($a_online)
 
 getOnline ()
 
 setActiveGlossaryMenu ($a_act_glo_menu)
 
 isActiveGlossaryMenu ()
 
 setActiveDownloads ($a_down)
 
 isActiveDownloads ()
 
 getStyleSheetId ()
 Get ID of assigned style sheet object. More...
 
 setStyleSheetId ($a_style_id)
 Set ID of assigned style sheet object. More...
 
 setShowTaxonomy ($a_val)
 Set show taxonomy. More...
 
 getShowTaxonomy ()
 Get show taxonomy. More...
 
 setAutoGlossaries ($a_val)
 Set auto glossaries. More...
 
 getAutoGlossaries ()
 Get auto glossaries. More...
 
 removeAutoGlossary ($a_glo_id)
 Remove auto glossary. More...
 
 update ()
 Update object. More...
 
 updateAutoGlossaries ()
 Update auto glossaries. More...
 
 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. More...
 
 getFirstLetters ($a_tax_node=0)
 Get term list. More...
 
 getAllGlossaryIds ($a_include_offline_childs=false, $ids_are_ref_ids=false)
 Get all glossary ids. More...
 
 createImportDirectory ()
 creates data directory for import files (data_dir/glo_data/glo_<id>/import, depending on data directory that is set in ILIAS setup/ini) More...
 
 getImportDirectory ()
 get import directory of glossary More...
 
 createExportDirectory ($a_type="xml")
 Creates export directory. More...
 
 getExportDirectory ($a_type="xml")
 Get export directory of glossary. More...
 
 getExportFiles ()
 Get export files. More...
 
 setPublicExportFile ($a_type, $a_file)
 specify public export file for type More...
 
 getPublicExportFile ($a_type)
 get public export file More...
 
 exportHTML ($a_target_dir, $log)
 export html package More...
 
 exportHTMLGlossaryTerms (&$a_glo_gui, $a_target_dir)
 export glossary terms More...
 
 exportHTMLMOB ($a_target_dir, &$a_glo_gui, $a_mob_id)
 export media object to html More...
 
 exportHTMLFile ($a_target_dir, $a_file_id)
 export file object More...
 
 exportXML (&$a_xml_writer, $a_inst, $a_target_dir, &$expLog)
 export object to xml (see ilias_co.dtd) More...
 
 exportXMLGlossaryItems (&$a_xml_writer, $a_inst, &$expLog)
 export page objects to xml (see ilias_co.dtd) More...
 
 exportXMLMetaData (&$a_xml_writer)
 export content objects meta data to xml (see ilias_co.dtd) More...
 
 exportXMLMediaObjects (&$a_xml_writer, $a_inst, $a_target_dir, &$expLog)
 export media objects to xml (see ilias_co.dtd) More...
 
 exportFileItems ($a_target_dir, &$expLog)
 export files of file itmes More...
 
 modifyExportIdentifier ($a_tag, $a_param, $a_value)
 
 delete ()
 delete glossary and all related data More...
 
 getXMLZip ()
 Get zipped xml file for glossary. More...
 
 getTaxonomyId ()
 Get taxonomy. More...
 
 cloneObject ($a_target_id, $a_copy_id=0, $a_omit_tree=false)
 Clone glossary. More...
 
 removeOfflineGlossaries ($a_glo_ids, $ids_are_ref_ids=false)
 Remove offline glossaries from obj id array. More...
 
 autoLinkGlossaryTerms ($a_glo_ref_id)
 Auto link glossary terms. More...
 
 supportsLongTextQuery ()
 Is long text search supported. More...
 
- Public Member Functions inherited from ilObject
 __construct ($a_id=0, $a_reference=true)
 Constructor @access public. More...
 
 withReferences ()
 determines wehter objects are referenced or not (got ref ids or not) More...
 
 read ()
 read object data from db into object More...
 
 getId ()
 get object id @access public More...
 
 setId ($a_id)
 set object id @access public More...
 
 setRefId ($a_id)
 set reference id @access public More...
 
 getRefId ()
 get reference id @access public More...
 
 getType ()
 get object type @access public More...
 
 setType ($a_type)
 set object type @access public More...
 
 getPresentationTitle ()
 get presentation title Normally same as title Overwritten for sessions More...
 
 getTitle ()
 get object title @access public More...
 
 getUntranslatedTitle ()
 get untranslated object title @access public More...
 
 setTitle ($a_title)
 set object title More...
 
 getDescription ()
 get object description More...
 
 setDescription ($a_desc)
 set object description More...
 
 getLongDescription ()
 get object long description (stored in object_description) More...
 
 getImportId ()
 get import id More...
 
 setImportId ($a_import_id)
 set import id More...
 
 getOwner ()
 get object owner More...
 
 getOwnerName ()
 
 setOwner ($a_owner)
 set object owner More...
 
 getCreateDate ()
 get create date @access public More...
 
 getLastUpdateDate ()
 get last update date @access public More...
 
 getDiskUsage ()
 Gets the disk usage of the object in bytes. More...
 
 create ()
 create More...
 
 update ()
 update object in db More...
 
 MDUpdateListener ($a_element)
 Meta data update listener. More...
 
 createMetaData ()
 create meta data entry More...
 
 updateMetaData ()
 update meta data entry More...
 
 deleteMetaData ()
 delete meta data entry More...
 
 updateOwner ()
 update owner of object in db More...
 
 putInTree ($a_parent_ref)
 maybe this method should be in tree object!? More...
 
 setPermissions ($a_parent_ref)
 set permissions of object More...
 
 setParentRolePermissions ($a_parent_ref)
 Initialize the permissions of parent roles (local roles of categories, global roles...) This method is overwritten in e.g courses, groups for building permission intersections with non_member templates. More...
 
 createReference ()
 creates reference for object More...
 
 countReferences ()
 count references of object More...
 
 initDefaultRoles ()
 init default roles settings Purpose of this function is to create a local role folder and local roles, that are needed depending on the object type If you want to setup default local roles you MUST overwrite this method in derived object classes (see ilObjForum for an example) @access public More...
 
 applyDidacticTemplate ($a_tpl_id)
 Apply template. More...
 
 setRegisterMode ($a_bool)
 
 isUserRegistered ($a_user_id=0)
 
 requireRegistration ()
 
 getXMLZip ()
 
 getHTMLDirectory ()
 
 appendCopyInfo ($a_target_id, $a_copy_id)
 Prepend Copy info if object with same name exists in that container. More...
 
 cloneDependencies ($a_target_id, $a_copy_id)
 Clone object dependencies. More...
 
 cloneMetaData ($target_obj)
 Copy meta data. More...
 
 getPossibleSubObjects ($a_filter=true)
 get all possible subobjects of this type the object can decide which types of subobjects are possible jut in time overwrite if the decision distinguish from standard model More...
 

Static Public Member Functions

static _lookupOnline ($a_id)
 check wether content object is online More...
 
static lookupSnippetLength ($a_id)
 Lookup snippet length. More...
 
static lookupAutoGlossaries ($a_id)
 Lookup auto glossaries. More...
 
static getDeletionDependencies ($a_obj_id)
 Get deletion dependencies. More...
 
static getAdvMDSubItemTitle ($a_obj_id, $a_sub_type, $a_sub_id)
 
- Static Public Member Functions inherited from ilObject
static _lookupObjIdByImportId ($a_import_id)
 
static _lookupImportId ($a_obj_id)
 
static _lookupOwnerName ($a_owner_id)
 lookup owner name for owner id More...
 
static _getIdForImportId ($a_import_id)
 get current object id for import id (static) More...
 
static _getAllReferences ($a_id)
 get all reference ids of object More...
 
static _lookupTitle ($a_id)
 lookup object title More...
 
static _lookupOwner ($a_id)
 lookup object owner More...
 
static _getIdsForTitle ($title, $type='', $partialmatch=false)
 
static _lookupDescription ($a_id)
 lookup object description More...
 
static _lookupLastUpdate ($a_id, $a_as_string=false)
 lookup last update More...
 
static _getLastUpdateOfObjects ($a_objs)
 Get last update for a set of media objects. More...
 
static _lookupObjId ($a_id)
 
static _setDeletedDate ($a_ref_id)
 only called in ilTree::saveSubTree More...
 
static setDeletedDates ($a_ref_ids)
 Set deleted date @global type $ilDB. More...
 
static _resetDeletedDate ($a_ref_id)
 only called in ilObjectGUI::insertSavedNodes More...
 
static _lookupDeletedDate ($a_ref_id)
 only called in ilObjectGUI::insertSavedNodes More...
 
static _writeTitle ($a_obj_id, $a_title)
 write title to db (static) More...
 
static _writeDescription ($a_obj_id, $a_desc)
 write description to db (static) More...
 
static _writeImportId ($a_obj_id, $a_import_id)
 write import id to db (static) More...
 
static _lookupType ($a_id, $a_reference=false)
 lookup object type More...
 
static _isInTrash ($a_ref_id)
 checks wether object is in trash More...
 
static _hasUntrashedReference ($a_obj_id)
 checks wether an object has at least one reference that is not in trash More...
 
static _lookupObjectId ($a_ref_id)
 lookup object id More...
 
static _getObjectsDataForType ($a_type, $a_omit_trash=false)
 get all objects of a certain type More...
 
static _exists ($a_id, $a_reference=false, $a_type=null)
 checks if an object exists in object_data@access public More...
 
static _getObjectsByType ($a_obj_type="", $a_owner="")
 Get objects by type. More...
 
static _prepareCloneSelection ($a_ref_ids, $new_type, $show_path=true)
 Prepare copy wizard object selection. More...
 
static _getIcon ( $a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
 Get icon for repository item. More...
 
static collectDeletionDependencies (&$deps, $a_ref_id, $a_obj_id, $a_type, $a_depth=0)
 Collect deletion dependencies. More...
 
static getDeletionDependencies ($a_obj_id)
 Get deletion dependencies. More...
 
static getLongDescriptions (array $a_obj_ids)
 Get long description data. More...
 
static getAllOwnedRepositoryObjects ($a_user_id)
 Get all ids of objects user owns. More...
 
static fixMissingTitles ($a_type, array &$a_obj_title_map)
 Try to fix missing object titles. More...
 
static _lookupCreationDate ($a_id)
 Lookup creation date. More...
 
static hasAutoRating ($a_type, $a_ref_id)
 Check if auto rating is active for parent group/course. More...
 
static getAdvMDSubItemTitle ($a_obj_id, $a_sub_type, $a_sub_id)
 

Data Fields

 $auto_glossaries = array()
 
- Data Fields inherited from ilObject
const TITLE_LENGTH = 255
 max length of object title More...
 
const DESC_LENGTH = 128
 
 $lng
 
 $id
 
 $ref_id
 
 $type
 
 $title
 
 $untranslatedTitle
 
 $desc
 
 $long_desc
 
 $owner
 
 $create_date
 
 $last_update
 
 $import_id
 
 $register = false
 
 $referenced
 
 $objectList
 
 $max_title
 
 $max_desc
 
 $add_dots
 

Static Protected Member Functions

static lookup ($a_id, $a_property)
 Lookup glossary property. More...
 

Protected Attributes

 $tpl
 
 $db
 
 $user
 
- Protected Attributes inherited from ilObject
 $objDefinition
 
 $db
 
 $log
 
 $error
 
 $tree
 
 $app_event_handler
 
 $rbacadmin
 
 $rbacreview
 

Detailed Description

Class ilObjGlossary.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 20 of file class.ilObjGlossary.php.

Constructor & Destructor Documentation

◆ __construct()

ilObjGlossary::__construct (   $a_id = 0,
  $a_call_by_reference = true 
)

Constructor @access public.

Reimplemented from ilObject.

Definition at line 47 of file class.ilObjGlossary.php.

48 {
49 global $DIC;
50 $this->error = $DIC["ilErr"];
51 $this->tpl = $DIC["tpl"];
52
53 $this->db = $DIC->database();
54 $this->user = $DIC->user();
55 $this->type = "glo";
56 parent::__construct($a_id, $a_call_by_reference);
57 }
user()
Definition: user.php:4
error($a_errmsg)
set error message @access public
global $DIC
Definition: saml.php:7

References $DIC, error(), and user().

+ Here is the call graph for this function:

Member Function Documentation

◆ _lookupOnline()

static ilObjGlossary::_lookupOnline (   $a_id)
static

check wether content object is online

Definition at line 256 of file class.ilObjGlossary.php.

257 {
258 global $DIC;
259
260 $db = $DIC->database();
261
262 $q = "SELECT is_online FROM glossary WHERE id = " .
263 $db->quote($a_id, "integer");
264 $lm_set = $db->query($q);
265 $lm_rec = $db->fetchAssoc($lm_set);
266
267 return ilUtil::yn2tf($lm_rec["is_online"]);
268 }
static yn2tf($a_yn)
convert "y"/"n" to true/false
$lm_set

References $db, $DIC, $lm_set, and ilUtil\yn2tf().

Referenced by ilRepositoryExplorer\isClickable(), and ilRepositoryExplorerGUI\isNodeClickable().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ autoLinkGlossaryTerms()

ilObjGlossary::autoLinkGlossaryTerms (   $a_glo_ref_id)

Auto link glossary terms.

Parameters

return

Definition at line 1335 of file class.ilObjGlossary.php.

1336 {
1337 // get terms of target glossary
1338 include_once("./Modules/Glossary/classes/class.ilGlossaryTerm.php");
1339 $terms = ilGlossaryTerm::getTermList($a_glo_ref_id);
1340
1341 // for each get page: get content
1342 $source_terms = ilGlossaryTerm::getTermList($this->getRefId());
1343 $found_pages = array();
1344 foreach ($source_terms as $source_term) {
1345 $source_defs = ilGlossaryDefinition::getDefinitionList($source_term["id"]);
1346
1347 for ($j = 0; $j < count($source_defs); $j++) {
1348 $def = $source_defs[$j];
1349 $pg = new ilGlossaryDefPage($def["id"]);
1350
1351 $c = $pg->getXMLContent();
1352 foreach ($terms as $t) {
1353 if (is_int(stripos($c, $t["term"]))) {
1354 $found_pages[$def["id"]]["terms"][] = $t;
1355 if (!is_object($found_pages[$def["id"]]["page"])) {
1356 $found_pages[$def["id"]]["page"] = $pg;
1357 }
1358 }
1359 }
1360 reset($terms);
1361 }
1362 }
1363
1364 // ilPCParagraph autoLinkGlossariesPage with page and terms
1365 include_once("./Services/COPage/classes/class.ilPCParagraph.php");
1366 foreach ($found_pages as $id => $fp) {
1367 ilPCParagraph::autoLinkGlossariesPage($fp["page"], $fp["terms"]);
1368 }
1369 }
Glossary definition page object.
static getDefinitionList($a_term_id)
static
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.
getRefId()
get reference id @access public
static autoLinkGlossariesPage($a_page, $a_terms)
Auto link glossary of whole page.
$def
Definition: croninfo.php:21

References $def, ilObject\$id, $t, ilPCParagraph\autoLinkGlossariesPage(), ilGlossaryDefinition\getDefinitionList(), ilObject\getRefId(), and ilGlossaryTerm\getTermList().

+ Here is the call graph for this function:

◆ cloneObject()

ilObjGlossary::cloneObject (   $a_target_id,
  $a_copy_id = 0,
  $a_omit_tree = false 
)

Clone glossary.

Parameters
inttarget ref_id
intcopy id

Definition at line 1199 of file class.ilObjGlossary.php.

1200 {
1201 $new_obj = parent::cloneObject($a_target_id, $a_copy_id, $a_omit_tree);
1202 $this->cloneMetaData($new_obj);
1203
1204 //copy online status if object is not the root copy object
1205 $cp_options = ilCopyWizardOptions::_getInstance($a_copy_id);
1206
1207 if (!$cp_options->isRootNode($this->getRefId())) {
1208 $new_obj->setOnline($this->getOnline());
1209 }
1210
1211 // $new_obj->setTitle($this->getTitle());
1212 $new_obj->setDescription($this->getDescription());
1213 $new_obj->setVirtualMode($this->getVirtualMode());
1214 $new_obj->setPresentationMode($this->getPresentationMode());
1215 $new_obj->setSnippetLength($this->getSnippetLength());
1216 $new_obj->setAutoGlossaries($this->getAutoGlossaries());
1217 $new_obj->update();
1218
1219 // set/copy stylesheet
1220 include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
1221 $style_id = $this->getStyleSheetId();
1222 if ($style_id > 0 && !ilObjStyleSheet::_lookupStandard($style_id)) {
1223 include_once("./Services/Object/classes/class.ilObjectFactory.php");
1224 $style_obj = ilObjectFactory::getInstanceByObjId($style_id);
1225 $new_id = $style_obj->ilClone();
1226 $new_obj->setStyleSheetId($new_id);
1227 $new_obj->update();
1228 }
1229
1230 // copy taxonomy
1231 if (($tax_id = $this->getTaxonomyId()) > 0) {
1232 // clone it
1233 include_once("./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
1234 $tax = new ilObjTaxonomy($tax_id);
1235 $new_tax = $tax->cloneObject(0, 0, true);
1236 $map = $tax->getNodeMapping();
1237
1238 // assign new taxonomy to new glossary
1239 ilObjTaxonomy::saveUsage($new_tax->getId(), $new_obj->getId());
1240 }
1241
1242 // assign new tax/new glossary
1243 // handle mapping
1244
1245 // prepare tax node assignments objects
1246 include_once("./Services/Taxonomy/classes/class.ilTaxNodeAssignment.php");
1247 if ($tax_id > 0) {
1248 $tax_ass = new ilTaxNodeAssignment("glo", $this->getId(), "term", $tax_id);
1249 $new_tax_ass = new ilTaxNodeAssignment("glo", $new_obj->getId(), "term", $new_tax->getId());
1250 }
1251
1252 // copy terms
1253 $term_mappings = array();
1254 foreach (ilGlossaryTerm::getTermList($this->getRefId()) as $term) {
1255 $new_term_id = ilGlossaryTerm::_copyTerm($term["id"], $new_obj->getId());
1256 $term_mappings[$term["id"]] = $new_term_id;
1257
1258 // copy tax node assignments
1259 if ($tax_id > 0) {
1260 $assignmts = $tax_ass->getAssignmentsOfItem($term["id"]);
1261 foreach ($assignmts as $a) {
1262 if ($map[$a["node_id"]] > 0) {
1263 $new_tax_ass->addAssignment($map[$a["node_id"]], $new_term_id);
1264 }
1265 }
1266 }
1267 }
1268
1269 // add mapping of term_ids to copy wizard options
1270 if (!empty($term_mappings)) {
1271 $cp_options->appendMapping($this->getRefId() . '_glo_terms', (array) $term_mappings);
1272 }
1273
1274
1275 return $new_obj;
1276 }
static _getInstance($a_copy_id)
Get instance of copy wizard options.
static _copyTerm($a_term_id, $a_glossary_id)
Copy a term to a glossary.
getAutoGlossaries()
Get auto glossaries.
getSnippetLength()
Get snippet length.
getTaxonomyId()
Get taxonomy.
getPresentationMode()
Get presentation mode.
getStyleSheetId()
Get ID of assigned style sheet object.
getDescription()
get description of glossary object
getVirtualMode()
get glossary type (normal or virtual)
static _lookupStandard($a_id)
Lookup standard flag.
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
cloneMetaData($target_obj)
Copy meta data.
getId()
get object id @access public
Taxonomy node <-> item assignment.

References ilGlossaryTerm\_copyTerm(), ilCopyWizardOptions\_getInstance(), ilObjStyleSheet\_lookupStandard(), ilObject\cloneMetaData(), getAutoGlossaries(), getDescription(), ilObject\getId(), ilObjectFactory\getInstanceByObjId(), getOnline(), getPresentationMode(), ilObject\getRefId(), getSnippetLength(), getStyleSheetId(), getTaxonomyId(), ilGlossaryTerm\getTermList(), getVirtualMode(), and ilObjTaxonomy\saveUsage().

+ Here is the call graph for this function:

◆ create()

ilObjGlossary::create (   $a_upload = false)

create glossary object

Definition at line 62 of file class.ilObjGlossary.php.

63 {
64 parent::create();
65
66 // meta data will be created by
67 // import parser
68 if (!$a_upload) {
69 $this->createMetaData();
70 }
71
72 $this->db->manipulate("INSERT INTO glossary (id, is_online, glossary.virtual, pres_mode, snippet_length) VALUES (" .
73 $this->db->quote($this->getId(), "integer") . "," .
74 $this->db->quote("n", "text") . "," .
75 $this->db->quote($this->getVirtualMode(), "text") . "," .
76 $this->db->quote("table", "text") . "," .
77 $this->db->quote(200, "integer") .
78 ")");
79 $this->setPresentationMode("table");
80 $this->setSnippetLength(200);
81
82 $this->updateAutoGlossaries();
83
84 if (((int) $this->getStyleSheetId()) > 0) {
85 include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
87 }
88 }
setSnippetLength($a_val)
Set snippet length.
updateAutoGlossaries()
Update auto glossaries.
setPresentationMode($a_val)
Set presentation mode.
static writeStyleUsage($a_obj_id, $a_style_id)
Write style usage.
createMetaData()
create meta data entry

References ilObject\createMetaData(), ilObject\getId(), getStyleSheetId(), setPresentationMode(), setSnippetLength(), updateAutoGlossaries(), and ilObjStyleSheet\writeStyleUsage().

+ Here is the call graph for this function:

◆ createExportDirectory()

ilObjGlossary::createExportDirectory (   $a_type = "xml")

Creates export directory.

Definition at line 631 of file class.ilObjGlossary.php.

632 {
633 include_once("./Services/Export/classes/class.ilExport.php");
634 return ilExport::_createExportDirectory($this->getId(), $a_type, $this->getType());
635 }
static _createExportDirectory($a_obj_id, $a_export_type="xml", $a_obj_type="")
getType()
get object type @access public
$a_type
Definition: workflow.php:92

References $a_type, ilExport\_createExportDirectory(), ilObject\getId(), and ilObject\getType().

+ Here is the call graph for this function:

◆ createImportDirectory()

ilObjGlossary::createImportDirectory ( )

creates data directory for import files (data_dir/glo_data/glo_<id>/import, depending on data directory that is set in ILIAS setup/ini)

Definition at line 593 of file class.ilObjGlossary.php.

594 {
596
597 $glo_data_dir = ilUtil::getDataDir() . "/glo_data";
598 ilUtil::makeDir($glo_data_dir);
599 if (!is_writable($glo_data_dir)) {
600 $ilErr->raiseError("Glossary Data Directory (" . $glo_data_dir
601 . ") not writeable.", $ilErr->error_obj->FATAL);
602 }
603
604 // create glossary directory (data_dir/glo_data/glo_<id>)
605 $glo_dir = $glo_data_dir . "/glo_" . $this->getId();
606 ilUtil::makeDir($glo_dir);
607 if (!@is_dir($glo_dir)) {
608 $ilErr->raiseError("Creation of Glossary Directory failed.", $ilErr->FATAL);
609 }
610 // create Import subdirectory (data_dir/glo_data/glo_<id>/import)
611 $import_dir = $glo_dir . "/import";
612 ilUtil::makeDir($import_dir);
613 if (!@is_dir($import_dir)) {
614 $ilErr->raiseError("Creation of Export Directory failed.", $ilErr->FATAL);
615 }
616 }
static getDataDir()
get data directory (outside webspace)
static makeDir($a_dir)
creates a new directory and inherits all filesystem permissions of the parent directory You may pass ...
global $ilErr
Definition: raiseError.php:16

References ilObject\$error, $ilErr, ilUtil\getDataDir(), ilObject\getId(), and ilUtil\makeDir().

+ Here is the call graph for this function:

◆ delete()

ilObjGlossary::delete ( )

delete glossary and all related data

this method has been tested on may 9th 2004 meta data, terms, definitions, definition meta data and definition pages have been deleted correctly as desired

@access public

Returns
boolean true if all object data were removed; false if only a references were removed

Definition at line 1113 of file class.ilObjGlossary.php.

1114 {
1115 // always call parent delete function first!!
1116 if (!parent::delete()) {
1117 return false;
1118 }
1119
1120 // delete terms
1121 if (!$this->isVirtual()) {
1122 $terms = $this->getTermList();
1123 foreach ($terms as $term) {
1124 $term_obj = new ilGlossaryTerm($term["id"]);
1125 $term_obj->delete();
1126 }
1127 }
1128
1129 // delete term references
1130 include_once("./Modules/Glossary/classes/class.ilGlossaryTermReferences.php");
1131 $refs = new ilGlossaryTermReferences($this->getId());
1132 $refs->delete();
1133
1134 // delete glossary data entry
1135 $q = "DELETE FROM glossary WHERE id = " . $this->db->quote($this->getId());
1136 $this->db->query($q);
1137
1138 // delete meta data
1139 $this->deleteMetaData();
1140
1141 return true;
1142 }
Class ilGlossaryTerm.
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.
isVirtual()
returns true if glossary type is virtual (any mode)
deleteMetaData()
delete meta data entry

References ilObject\deleteMetaData(), ilObject\getId(), getTermList(), and isVirtual().

+ Here is the call graph for this function:

◆ exportFileItems()

ilObjGlossary::exportFileItems (   $a_target_dir,
$expLog 
)

export files of file itmes

Definition at line 1074 of file class.ilObjGlossary.php.

1075 {
1076 include_once("./Modules/File/classes/class.ilObjFile.php");
1077
1078 foreach ($this->file_ids as $file_id) {
1079 $expLog->write(date("[y-m-d H:i:s] ") . "File Item " . $file_id);
1080 $file_obj = new ilObjFile($file_id, false);
1081 $file_obj->export($a_target_dir);
1082 unset($file_obj);
1083 }
1084 }
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
Class ilObjFile.

References date.

Referenced by exportXML().

+ Here is the caller graph for this function:

◆ exportHTML()

ilObjGlossary::exportHTML (   $a_target_dir,
  $log 
)

export html package

Definition at line 681 of file class.ilObjGlossary.php.

682 {
684
685 // initialize temporary target directory
686 ilUtil::delDir($a_target_dir);
687 ilUtil::makeDir($a_target_dir);
688
689 // init mathjax rendering for export
690 include_once './Services/MathJax/classes/class.ilMathJax.php';
692
693 include_once("./Services/COPage/classes/class.ilCOPageHTMLExport.php");
694 $this->co_page_html_export = new ilCOPageHTMLExport($a_target_dir);
695 $this->co_page_html_export->createDirectories();
696
697 // export system style sheet
698 $location_stylesheet = ilUtil::getStyleSheetLocation("filesystem");
699 $style_name = $this->user->prefs["style"] . ".css";
700 copy($location_stylesheet, $a_target_dir . "/" . $style_name);
701 $location_stylesheet = ilUtil::getStyleSheetLocation();
702
703 if ($this->getStyleSheetId() < 1) {
704 $cont_stylesheet = "Services/COPage/css/content.css";
705 copy($cont_stylesheet, $a_target_dir . "/content.css");
706 } else {
707 $content_style_img_dir = $a_target_dir . "/images";
708 ilUtil::makeDir($content_style_img_dir);
709 $style = new ilObjStyleSheet($this->getStyleSheetId());
710 $style->writeCSSFile($a_target_dir . "/content.css", "images");
711 $style->copyImagesToDir($content_style_img_dir);
712 }
713
714 // export syntax highlighting style
715 $syn_stylesheet = ilObjStyleSheet::getSyntaxStylePath();
716 copy($syn_stylesheet, $a_target_dir . "/syntaxhighlight.css");
717
718 // get glossary presentation gui class
719 include_once("./Modules/Glossary/classes/class.ilGlossaryPresentationGUI.php");
720 $_GET["cmd"] = "nop";
721 $glo_gui = new ilGlossaryPresentationGUI();
722 $glo_gui->setOfflineMode(true);
723 $glo_gui->setOfflineDirectory($a_target_dir);
724
725 // could be implemented in the future if other export
726 // formats are supported (e.g. scorm)
727 //$glo_gui->setExportFormat($a_export_format);
728
729 // export terms
730 $this->exportHTMLGlossaryTerms($glo_gui, $a_target_dir);
731
732 // export all media objects
733 foreach ($this->offline_mobs as $mob) {
734 $this->exportHTMLMOB($a_target_dir, $glo_gui, $mob, "_blank");
735 }
736 $_GET["obj_type"] = "MediaObject";
737 $_GET["obj_id"] = $a_mob_id;
738 $_GET["cmd"] = "";
739
740 // export all file objects
741 foreach ($this->offline_files as $file) {
742 $this->exportHTMLFile($a_target_dir, $file);
743 }
744
745 // export images
746 $image_dir = $a_target_dir . "/images";
747 ilUtil::makeDir($image_dir);
748 ilUtil::makeDir($image_dir . "/browser");
749 copy(
750 ilUtil::getImagePath("enlarge.svg", false, "filesystem"),
751 $image_dir . "/enlarge.svg"
752 );
753 copy(
754 ilUtil::getImagePath("browser/blank.png", false, "filesystem"),
755 $image_dir . "/browser/plus.png"
756 );
757 copy(
758 ilUtil::getImagePath("browser/blank.png", false, "filesystem"),
759 $image_dir . "/browser/minus.png"
760 );
761 copy(
762 ilUtil::getImagePath("browser/blank.png", false, "filesystem"),
763 $image_dir . "/browser/blank.png"
764 );
765 copy(
766 ilUtil::getImagePath("icon_st.svg", false, "filesystem"),
767 $image_dir . "/icon_st.svg"
768 );
769 copy(
770 ilUtil::getImagePath("icon_pg.svg", false, "filesystem"),
771 $image_dir . "/icon_pg.svg"
772 );
773 copy(
774 ilUtil::getImagePath("nav_arr_L.png", false, "filesystem"),
775 $image_dir . "/nav_arr_L.png"
776 );
777 copy(
778 ilUtil::getImagePath("nav_arr_R.png", false, "filesystem"),
779 $image_dir . "/nav_arr_R.png"
780 );
781
782 // template workaround: reset of template
783 $tpl = new ilTemplate("tpl.main.html", true, true);
784 $tpl->setVariable("LOCATION_STYLESHEET", $location_stylesheet);
785 $tpl->addBlockFile("CONTENT", "content", "tpl.adm_content.html");
786
787 // zip everything
788 if (true) {
789 // zip it all
790 $date = time();
791 $zip_file = $this->getExportDirectory("html") . "/" . $date . "__" . IL_INST_ID . "__" .
792 $this->getType() . "_" . $this->getId() . ".zip";
793 //echo "zip-".$a_target_dir."-to-".$zip_file;
794 ilUtil::zip($a_target_dir, $zip_file);
795 ilUtil::delDir($a_target_dir);
796 }
797 }
$_GET["client_id"]
HTML export class for pages.
Class ilGlossaryPresentationGUI.
static getInstance()
Singleton: get instance.
const PURPOSE_EXPORT
exportHTMLMOB($a_target_dir, &$a_glo_gui, $a_mob_id)
export media object to html
exportHTMLGlossaryTerms(&$a_glo_gui, $a_target_dir)
export glossary terms
exportHTMLFile($a_target_dir, $a_file_id)
export file object
getExportDirectory($a_type="xml")
Get export directory of glossary.
Class ilObjStyleSheet.
static getSyntaxStylePath()
get syntax style path
special template class to simplify handling of ITX/PEAR
static delDir($a_dir, $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
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 getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
$style
Definition: example_012.php:70
if(!file_exists("$old.txt")) if( $old===$new) if(file_exists("$new.txt")) $file

References $_GET, $file, $style, $tpl, ilUtil\delDir(), exportHTMLFile(), exportHTMLGlossaryTerms(), exportHTMLMOB(), getExportDirectory(), ilObject\getId(), ilUtil\getImagePath(), ilMathJax\getInstance(), getStyleSheetId(), ilUtil\getStyleSheetLocation(), ilObjStyleSheet\getSyntaxStylePath(), ilObject\getType(), ilUtil\makeDir(), ilMathJax\PURPOSE_EXPORT, user(), and ilUtil\zip().

+ Here is the call graph for this function:

◆ exportHTMLFile()

ilObjGlossary::exportHTMLFile (   $a_target_dir,
  $a_file_id 
)

export file object

Definition at line 932 of file class.ilObjGlossary.php.

933 {
934 $file_dir = $a_target_dir . "/files/file_" . $a_file_id;
935 ilUtil::makeDir($file_dir);
936 include_once("./Modules/File/classes/class.ilObjFile.php");
937 $file_obj = new ilObjFile($a_file_id, false);
938 $source_file = $file_obj->getDirectory($file_obj->getVersion()) . "/" . $file_obj->getFileName();
939 if (!is_file($source_file)) {
940 $source_file = $file_obj->getDirectory() . "/" . $file_obj->getFileName();
941 }
942 copy($source_file, $file_dir . "/" . $file_obj->getFileName());
943 }

References ilUtil\makeDir().

Referenced by exportHTML().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ exportHTMLGlossaryTerms()

ilObjGlossary::exportHTMLGlossaryTerms ( $a_glo_gui,
  $a_target_dir 
)

export glossary terms

Definition at line 803 of file class.ilObjGlossary.php.

804 {
805 include_once("./Services/COPage/classes/class.ilCOPageHTMLExport.php");
806 $copage_export = new ilCOPageHTMLExport($a_target_dir);
807 $copage_export->exportSupportScripts();
808
809 // index.html file
810 $a_glo_gui->tpl = new ilTemplate("tpl.main.html", true, true);
811 $style_name = $this->user->prefs["style"] . ".css";
812 ;
813 $a_glo_gui->tpl->setVariable("LOCATION_STYLESHEET", "./" . $style_name);
814 $a_glo_gui->tpl->addBlockFile("CONTENT", "content", "tpl.adm_content.html");
815 $a_glo_gui->tpl->setTitle($this->getTitle());
816
817 $content = $a_glo_gui->listTerms();
818 $file = $a_target_dir . "/index.html";
819
820 // open file
821 if (!($fp = @fopen($file, "w+"))) {
822 die("<b>Error</b>: Could not open \"" . $file . "\" for writing" .
823 " in <b>" . __FILE__ . "</b> on line <b>" . __LINE__ . "</b><br />");
824 }
825 chmod($file, 0770);
826 fwrite($fp, $content);
827 fclose($fp);
828
829 $terms = $this->getTermList();
830
831 $this->offline_mobs = array();
832 $this->offline_files = array();
833
834 foreach ($terms as $term) {
835 $a_glo_gui->tpl = new ilTemplate("tpl.main.html", true, true);
836 $a_glo_gui->tpl = $copage_export->getPreparedMainTemplate();
837 //$tpl->addBlockFile("CONTENT", "content", "tpl.adm_content.html");
838
839 // set style
840 $style_name = $this->user->prefs["style"] . ".css";
841 ;
842 $a_glo_gui->tpl->setVariable("LOCATION_STYLESHEET", "./" . $style_name);
843
844 $_GET["term_id"] = $term["id"];
845 $_GET["frame"] = "_blank";
846 $content = $a_glo_gui->listDefinitions($_GET["ref_id"], $term["id"], false);
847 $file = $a_target_dir . "/term_" . $term["id"] . ".html";
848
849 // open file
850 if (!($fp = @fopen($file, "w+"))) {
851 die("<b>Error</b>: Could not open \"" . $file . "\" for writing" .
852 " in <b>" . __FILE__ . "</b> on line <b>" . __LINE__ . "</b><br />");
853 }
854 chmod($file, 0770);
855 fwrite($fp, $content);
856 fclose($fp);
857
858 // store linked/embedded media objects of glosssary term
859 include_once("./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
860 $defs = ilGlossaryDefinition::getDefinitionList($term["id"]);
861 foreach ($defs as $def) {
862 $def_mobs = ilObjMediaObject::_getMobsOfObject("gdf:pg", $def["id"]);
863 foreach ($def_mobs as $def_mob) {
864 $this->offline_mobs[$def_mob] = $def_mob;
865 }
866
867 // get all files of page
868 include_once("./Modules/File/classes/class.ilObjFile.php");
869 $def_files = ilObjFile::_getFilesOfObject("gdf:pg", $def["id"]);
870 $this->offline_files = array_merge($this->offline_files, $def_files);
871 }
872 }
873 }
static _getFilesOfObject($a_type, $a_id, $a_usage_hist_nr=0, $a_usage_lang="-")
get all files of an object
getTitle()
get title of glossary object
static _getMobsOfObject($a_type, $a_id, $a_usage_hist_nr=0, $a_lang="-")
get mobs of object

References $_GET, $def, $file, ilObjFile\_getFilesOfObject(), ilObjMediaObject\_getMobsOfObject(), ilGlossaryDefinition\getDefinitionList(), getTermList(), getTitle(), and user().

Referenced by exportHTML().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ exportHTMLMOB()

ilObjGlossary::exportHTMLMOB (   $a_target_dir,
$a_glo_gui,
  $a_mob_id 
)

export media object to html

Definition at line 878 of file class.ilObjGlossary.php.

879 {
881
882 $mob_dir = $a_target_dir . "/mobs";
883
884 $source_dir = ilUtil::getWebspaceDir() . "/mobs/mm_" . $a_mob_id;
885 if (@is_dir($source_dir)) {
886 ilUtil::makeDir($mob_dir . "/mm_" . $a_mob_id);
887 ilUtil::rCopy($source_dir, $mob_dir . "/mm_" . $a_mob_id);
888 }
889
890 $tpl = new ilTemplate("tpl.main.html", true, true);
891 $tpl->addBlockFile("CONTENT", "content", "tpl.adm_content.html");
892 $_GET["obj_type"] = "MediaObject";
893 $_GET["mob_id"] = $a_mob_id;
894 $_GET["cmd"] = "";
895 $content = $a_glo_gui->media();
896 $file = $a_target_dir . "/media_" . $a_mob_id . ".html";
897
898 // open file
899 if (!($fp = @fopen($file, "w+"))) {
900 die("<b>Error</b>: Could not open \"" . $file . "\" for writing" .
901 " in <b>" . __FILE__ . "</b> on line <b>" . __LINE__ . "</b><br />");
902 }
903 chmod($file, 0770);
904 fwrite($fp, $content);
905 fclose($fp);
906
907 // fullscreen
908 include_once("./Services/MediaObjects/classes/class.ilObjMediaObject.php");
909 $mob_obj = new ilObjMediaObject($a_mob_id);
910 if ($mob_obj->hasFullscreenItem()) {
911 $tpl = new ilTemplate("tpl.main.html", true, true);
912 $tpl->addBlockFile("CONTENT", "content", "tpl.adm_content.html");
913 $_GET["mob_id"] = $a_mob_id;
914 $_GET["cmd"] = "fullscreen";
915 $content = $a_glo_gui->fullscreen();
916 $file = $a_target_dir . "/fullscreen_" . $a_mob_id . ".html";
917
918 // open file
919 if (!($fp = @fopen($file, "w+"))) {
920 die("<b>Error</b>: Could not open \"" . $file . "\" for writing" .
921 " in <b>" . __FILE__ . "</b> on line <b>" . __LINE__ . "</b><br />");
922 }
923 chmod($file, 0770);
924 fwrite($fp, $content);
925 fclose($fp);
926 }
927 }
Class ilObjMediaObject.
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.

References $_GET, $file, $tpl, ilUtil\getWebspaceDir(), ilUtil\makeDir(), and ilUtil\rCopy().

Referenced by exportHTML().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ exportXML()

ilObjGlossary::exportXML ( $a_xml_writer,
  $a_inst,
  $a_target_dir,
$expLog 
)

export object to xml (see ilias_co.dtd)

Parameters
object$a_xml_writerilXmlWriter object that receives the xml data

Definition at line 952 of file class.ilObjGlossary.php.

953 {
954 // export glossary
955 $attrs = array();
956 $attrs["Type"] = "Glossary";
957 $a_xml_writer->xmlStartTag("ContentObject", $attrs);
958
959 // MetaData
960 $this->exportXMLMetaData($a_xml_writer);
961
962 // collect media objects
963 $terms = $this->getTermList();
964 $this->mob_ids = array();
965 $this->file_ids = array();
966 foreach ($terms as $term) {
967 include_once "./Modules/Glossary/classes/class.ilGlossaryDefinition.php";
968
970
971 foreach ($defs as $def) {
972 $this->page_object = new ilGlossaryDefPage($def["id"]);
973 $this->page_object->buildDom();
974 $this->page_object->insertInstIntoIDs(IL_INST_ID);
975 $mob_ids = $this->page_object->collectMediaObjects(false);
976 include_once("./Services/COPage/classes/class.ilPCFileList.php");
977 $file_ids = ilPCFileList::collectFileItems($this->page_object, $this->page_object->getDomDoc());
978 foreach ($mob_ids as $mob_id) {
979 $this->mob_ids[$mob_id] = $mob_id;
980 }
981 foreach ($file_ids as $file_id) {
982 $this->file_ids[$file_id] = $file_id;
983 }
984 }
985 }
986
987 // export media objects
988 $expLog->write(date("[y-m-d H:i:s] ") . "Start Export Media Objects");
989 $this->exportXMLMediaObjects($a_xml_writer, $a_inst, $a_target_dir, $expLog);
990 $expLog->write(date("[y-m-d H:i:s] ") . "Finished Export Media Objects");
991
992 // FileItems
993 $expLog->write(date("[y-m-d H:i:s] ") . "Start Export File Items");
994 $this->exportFileItems($a_target_dir, $expLog);
995 $expLog->write(date("[y-m-d H:i:s] ") . "Finished Export File Items");
996
997 // Glossary
998 $expLog->write(date("[y-m-d H:i:s] ") . "Start Export Glossary Items");
999 $this->exportXMLGlossaryItems($a_xml_writer, $a_inst, $expLog);
1000 $expLog->write(date("[y-m-d H:i:s] ") . "Finished Export Glossary Items");
1001
1002 $a_xml_writer->xmlEndTag("ContentObject");
1003 }
exportFileItems($a_target_dir, &$expLog)
export files of file itmes
exportXMLGlossaryItems(&$a_xml_writer, $a_inst, &$expLog)
export page objects to xml (see ilias_co.dtd)
exportXMLMediaObjects(&$a_xml_writer, $a_inst, $a_target_dir, &$expLog)
export media objects to xml (see ilias_co.dtd)
exportXMLMetaData(&$a_xml_writer)
export content objects meta data to xml (see ilias_co.dtd)
static collectFileItems($a_page, $a_domdoc)
Get all file items that are used within the page.

References $def, ilPCFileList\collectFileItems(), date, exportFileItems(), exportXMLGlossaryItems(), exportXMLMediaObjects(), exportXMLMetaData(), ilGlossaryDefinition\getDefinitionList(), and getTermList().

+ Here is the call graph for this function:

◆ exportXMLGlossaryItems()

ilObjGlossary::exportXMLGlossaryItems ( $a_xml_writer,
  $a_inst,
$expLog 
)

export page objects to xml (see ilias_co.dtd)

Parameters
object$a_xml_writerilXmlWriter object that receives the xml data

Definition at line 1011 of file class.ilObjGlossary.php.

1012 {
1013 $attrs = array();
1014 $a_xml_writer->xmlStartTag("Glossary", $attrs);
1015
1016 // MetaData
1017 $this->exportXMLMetaData($a_xml_writer);
1018
1019 $terms = $this->getTermList();
1020
1021 // export glossary terms
1022 reset($terms);
1023 foreach ($terms as $term) {
1024 $expLog->write(date("[y-m-d H:i:s] ") . "Page Object " . $page["obj_id"]);
1025
1026 // export xml to writer object
1027 $glo_term = new ilGlossaryTerm($term["id"]);
1028 $glo_term->exportXML($a_xml_writer, $a_inst);
1029
1030 unset($glo_term);
1031 }
1032
1033 $a_xml_writer->xmlEndTag("Glossary");
1034 }

References date, exportXMLMetaData(), and getTermList().

Referenced by exportXML().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ exportXMLMediaObjects()

ilObjGlossary::exportXMLMediaObjects ( $a_xml_writer,
  $a_inst,
  $a_target_dir,
$expLog 
)

export media objects to xml (see ilias_co.dtd)

Parameters
object$a_xml_writerilXmlWriter object that receives the xml data

Definition at line 1057 of file class.ilObjGlossary.php.

1058 {
1059 include_once("./Services/MediaObjects/classes/class.ilObjMediaObject.php");
1060
1061 foreach ($this->mob_ids as $mob_id) {
1062 $expLog->write(date("[y-m-d H:i:s] ") . "Media Object " . $mob_id);
1063 $media_obj = new ilObjMediaObject($mob_id);
1064 $media_obj->exportXML($a_xml_writer, $a_inst);
1065 $media_obj->exportFiles($a_target_dir);
1066 unset($media_obj);
1067 }
1068 }

References date.

Referenced by exportXML().

+ Here is the caller graph for this function:

◆ exportXMLMetaData()

ilObjGlossary::exportXMLMetaData ( $a_xml_writer)

export content objects meta data to xml (see ilias_co.dtd)

Parameters
object$a_xml_writerilXmlWriter object that receives the xml data

Definition at line 1042 of file class.ilObjGlossary.php.

1043 {
1044 include_once("Services/MetaData/classes/class.ilMD2XML.php");
1045 $md2xml = new ilMD2XML($this->getId(), 0, $this->getType());
1046 $md2xml->setExportMode(true);
1047 $md2xml->startExport();
1048 $a_xml_writer->appendXML($md2xml->getXML());
1049 }

References ilObject\getId(), and ilObject\getType().

Referenced by exportXML(), and exportXMLGlossaryItems().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAdvMDSubItemTitle()

static ilObjGlossary::getAdvMDSubItemTitle (   $a_obj_id,
  $a_sub_type,
  $a_sub_id 
)
static

Implements ilAdvancedMetaDataSubItems.

Definition at line 1315 of file class.ilObjGlossary.php.

1316 {
1317 global $DIC;
1318
1319 $lng = $DIC->language();
1320
1321 if ($a_sub_type == "term") {
1322 $lng->loadLanguageModule("glo");
1323
1324 include_once "Modules/Glossary/classes/class.ilGlossaryTerm.php";
1325 return $lng->txt("glo_term") . ' "' . ilGlossaryTerm::_lookGlossaryTerm($a_sub_id) . '"';
1326 }
1327 }
static _lookGlossaryTerm($term_id)
get glossary term

References $DIC, ilObject\$lng, and ilGlossaryTerm\_lookGlossaryTerm().

+ Here is the call graph for this function:

◆ getAllGlossaryIds()

ilObjGlossary::getAllGlossaryIds (   $a_include_offline_childs = false,
  $ids_are_ref_ids = false 
)

Get all glossary ids.

Parameters

return

Definition at line 525 of file class.ilObjGlossary.php.

526 {
527 global $DIC;
528
529 $tree = $DIC->repositoryTree();
530
531 if ($this->isVirtual()) {
532 $glo_ids = array();
533
534 $virtual_mode = $this->getRefId() ? $this->getVirtualMode() : '';
535 switch ($virtual_mode) {
536 case "level":
537 $glo_arr = $tree->getChildsByType($tree->getParentId($this->getRefId()), "glo");
538 foreach ($glo_arr as $glo) {
539 {
540 if ($ids_are_ref_ids) {
541 $glo_ids[] = $glo['child'];
542 } else {
543 $glo_ids[] = $glo['obj_id'];
544 }
545 }
546 }
547 break;
548
549 case "subtree":
550 $subtree_nodes = $tree->getSubTree($tree->getNodeData($tree->getParentId($this->getRefId())));
551
552 foreach ($subtree_nodes as $node) {
553 if ($node['type'] == 'glo') {
554 if ($ids_are_ref_ids) {
555 $glo_ids[] = $node['child'];
556 } else {
557 $glo_ids[] = $node['obj_id'];
558 }
559 }
560 }
561 break;
562 }
563 if (!$a_include_offline_childs) {
564 $glo_ids = ilObjGlossary::removeOfflineGlossaries($glo_ids, $ids_are_ref_ids);
565 }
566 // always show entries of current glossary (if no permission is given, user will not come to the presentation screen)
567 // see bug #14477
568 if ($ids_are_ref_ids) {
569 if (!in_array($this->getRefId(), $glo_ids)) {
570 $glo_ids[] = $this->getRefId();
571 }
572 } else {
573 if (!in_array($this->getId(), $glo_ids)) {
574 $glo_ids[] = $this->getId();
575 }
576 }
577 } else {
578 if ($ids_are_ref_ids) {
579 $glo_ids = $this->getRefId();
580 } else {
581 $glo_ids = $this->getId();
582 }
583 }
584
585 return $glo_ids;
586 }
removeOfflineGlossaries($a_glo_ids, $ids_are_ref_ids=false)
Remove offline glossaries from obj id array.

References $DIC, ilObject\$tree, ilObject\getId(), ilObject\getRefId(), getVirtualMode(), isVirtual(), and removeOfflineGlossaries().

Referenced by getFirstLetters(), and getTermList().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAutoGlossaries()

ilObjGlossary::getAutoGlossaries ( )

Get auto glossaries.

Returns
array int

Definition at line 382 of file class.ilObjGlossary.php.

383 {
385 }

References $auto_glossaries.

Referenced by ilGlossaryAutoLinkTableGUI\__construct(), cloneObject(), removeAutoGlossary(), and updateAutoGlossaries().

+ Here is the caller graph for this function:

◆ getDeletionDependencies()

static ilObjGlossary::getDeletionDependencies (   $a_obj_id)
static

Get deletion dependencies.

Reimplemented from ilObject.

Definition at line 1158 of file class.ilObjGlossary.php.

1159 {
1160 global $DIC;
1161
1162 $lng = $DIC->language();
1163
1164 $dep = array();
1165 include_once("./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php");
1167 foreach ($sms as $sm) {
1168 $lng->loadLanguageModule("content");
1169 $dep[$sm] = $lng->txt("glo_used_in_scorm");
1170 }
1171 //echo "-".$a_obj_id."-";
1172 //var_dump($dep);
1173 return $dep;
1174 }
static getScormModulesForGlossary($a_glo_id)
Get SCORM modules that assign a certain glossary.

References $DIC, ilObject\$lng, and ilObjSAHSLearningModule\getScormModulesForGlossary().

+ Here is the call graph for this function:

◆ getDescription()

ilObjGlossary::getDescription ( )

get description of glossary object

Returns
string description

Reimplemented from ilObject.

Definition at line 132 of file class.ilObjGlossary.php.

133 {
134 return parent::getDescription();
135 }
static getDescription()
Definition: Php.php:51

References Gettext\Languages\Exporter\getDescription().

Referenced by cloneObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getExportDirectory()

ilObjGlossary::getExportDirectory (   $a_type = "xml")

Get export directory of glossary.

Definition at line 640 of file class.ilObjGlossary.php.

641 {
642 include_once("./Services/Export/classes/class.ilExport.php");
643 return ilExport::_getExportDirectory($this->getId(), $a_type, $this->getType());
644 }
static _getExportDirectory($a_obj_id, $a_type="xml", $a_obj_type="", $a_entity="")
Get export directory for an repository object.

References $a_type, ilExport\_getExportDirectory(), ilObject\getId(), and ilObject\getType().

Referenced by exportHTML().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getExportFiles()

ilObjGlossary::getExportFiles ( )

Get export files.

Definition at line 649 of file class.ilObjGlossary.php.

650 {
651 include_once("./Services/Export/classes/class.ilExport.php");
652 return ilExport::_getExportFiles($this->getId(), array("xml", "html"), $this->getType());
653 }
static _getExportFiles($a_obj_id, $a_export_types="", $a_obj_type="")
Get Export Files for a repository object.

References ilExport\_getExportFiles(), ilObject\getId(), and ilObject\getType().

+ Here is the call graph for this function:

◆ getFirstLetters()

ilObjGlossary::getFirstLetters (   $a_tax_node = 0)

Get term list.

Definition at line 512 of file class.ilObjGlossary.php.

513 {
514 $glo_ids = $this->getAllGlossaryIds();
515 $first_letters = ilGlossaryTerm::getFirstLetters($glo_ids, $a_tax_node);
516 return $first_letters;
517 }
static getFirstLetters($a_glo_id, $a_tax_node=0)
Get all terms for given set of glossary ids.
getAllGlossaryIds($a_include_offline_childs=false, $ids_are_ref_ids=false)
Get all glossary ids.

References getAllGlossaryIds(), and ilGlossaryTerm\getFirstLetters().

+ Here is the call graph for this function:

◆ getImportDirectory()

ilObjGlossary::getImportDirectory ( )

get import directory of glossary

Definition at line 621 of file class.ilObjGlossary.php.

622 {
623 $export_dir = ilUtil::getDataDir() . "/glo_data" . "/glo_" . $this->getId() . "/import";
624
625 return $export_dir;
626 }

References ilUtil\getDataDir(), and ilObject\getId().

+ Here is the call graph for this function:

◆ getOnline()

ilObjGlossary::getOnline ( )

Definition at line 248 of file class.ilObjGlossary.php.

249 {
250 return $this->online;
251 }

Referenced by cloneObject().

+ Here is the caller graph for this function:

◆ getPresentationMode()

ilObjGlossary::getPresentationMode ( )

Get presentation mode.

Returns
string presentation mode

Definition at line 216 of file class.ilObjGlossary.php.

217 {
218 return $this->pres_mode;
219 }

Referenced by cloneObject().

+ Here is the caller graph for this function:

◆ getPublicExportFile()

ilObjGlossary::getPublicExportFile (   $a_type)

get public export file

Parameters
string$a_typetype ("xml" / "html")
Returns
string $a_file file name

Definition at line 673 of file class.ilObjGlossary.php.

674 {
675 return $this->public_export_file[$a_type];
676 }

References $a_type.

◆ getShowTaxonomy()

ilObjGlossary::getShowTaxonomy ( )

Get show taxonomy.

Returns
bool show taxonomy

Definition at line 353 of file class.ilObjGlossary.php.

354 {
355 return $this->show_tax;
356 }

◆ getSnippetLength()

ilObjGlossary::getSnippetLength ( )

Get snippet length.

Returns
int snippet length

Definition at line 236 of file class.ilObjGlossary.php.

237 {
238 return ($this->snippet_length > 0)
239 ? $this->snippet_length
240 : null;
241 }

Referenced by cloneObject().

+ Here is the caller graph for this function:

◆ getStyleSheetId()

ilObjGlossary::getStyleSheetId ( )

Get ID of assigned style sheet object.

Definition at line 324 of file class.ilObjGlossary.php.

325 {
326 return $this->style_id;
327 }

Referenced by cloneObject(), create(), exportHTML(), and update().

+ Here is the caller graph for this function:

◆ getTaxonomyId()

ilObjGlossary::getTaxonomyId ( )

Get taxonomy.

Returns
int taxononmy ID

Definition at line 1181 of file class.ilObjGlossary.php.

1182 {
1183 include_once("./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
1184 $tax_ids = ilObjTaxonomy::getUsageOfObject($this->getId());
1185 if (count($tax_ids) > 0) {
1186 // glossaries handle max. one taxonomy
1187 return $tax_ids[0];
1188 }
1189 return 0;
1190 }
static getUsageOfObject($a_obj_id, $a_include_titles=false)
Get usage of object.

References ilObject\getId(), and ilObjTaxonomy\getUsageOfObject().

Referenced by cloneObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTermList()

ilObjGlossary::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.

Definition at line 480 of file class.ilObjGlossary.php.

490 {
491 if ($a_omit_virtual) {
492 $glo_ref_ids[] = $this->getRefId();
493 } else {
494 $glo_ref_ids = $this->getAllGlossaryIds($a_include_offline_childs, true);
495 }
497 $glo_ref_ids,
498 $searchterm,
499 $a_letter,
500 $a_def,
501 $a_tax_node,
502 $a_add_amet_fields,
503 $a_amet_filter,
504 $a_include_references
505 );
506 return $list;
507 }
if(isset($_REQUEST['delete'])) $list
Definition: registry.php:41

References $list, getAllGlossaryIds(), ilObject\getRefId(), and ilGlossaryTerm\getTermList().

Referenced by delete(), exportHTMLGlossaryTerms(), exportXML(), and exportXMLGlossaryItems().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTitle()

ilObjGlossary::getTitle ( )

get title of glossary object

Returns
string title

Reimplemented from ilObject.

Definition at line 187 of file class.ilObjGlossary.php.

188 {
189 return parent::getTitle();
190 }

Referenced by exportHTMLGlossaryTerms().

+ Here is the caller graph for this function:

◆ getVirtualMode()

ilObjGlossary::getVirtualMode ( )

get glossary type (normal or virtual)

Definition at line 169 of file class.ilObjGlossary.php.

170 {
171 return $this->virtual_mode;
172 }

Referenced by cloneObject(), and getAllGlossaryIds().

+ Here is the caller graph for this function:

◆ getXMLZip()

ilObjGlossary::getXMLZip ( )

Get zipped xml file for glossary.

Reimplemented from ilObject.

Definition at line 1147 of file class.ilObjGlossary.php.

1148 {
1149 include_once("./Modules/Glossary/classes/class.ilGlossaryExport.php");
1150 $glo_exp = new ilGlossaryExport($this);
1151 return $glo_exp->buildExportFile();
1152 }
Export class for content objects.

◆ isActiveDownloads()

ilObjGlossary::isActiveDownloads ( )

Definition at line 316 of file class.ilObjGlossary.php.

317 {
318 return $this->downloads_active;
319 }

◆ isActiveGlossaryMenu()

ilObjGlossary::isActiveGlossaryMenu ( )

Definition at line 306 of file class.ilObjGlossary.php.

307 {
308 return $this->glo_menu_active;
309 }

◆ isVirtual()

ilObjGlossary::isVirtual ( )

returns true if glossary type is virtual (any mode)

Definition at line 177 of file class.ilObjGlossary.php.

178 {
179 return $this->virtual;
180 }

Referenced by delete(), and getAllGlossaryIds().

+ Here is the caller graph for this function:

◆ lookup()

static ilObjGlossary::lookup (   $a_id,
  $a_property 
)
staticprotected

Lookup glossary property.

Parameters
intglossary id
stringproperty

Definition at line 276 of file class.ilObjGlossary.php.

277 {
278 global $DIC;
279
280 $db = $DIC->database();
281
282 $set = $db->query("SELECT $a_property FROM glossary WHERE id = " .
283 $db->quote($a_id, "integer"));
284 $rec = $db->fetchAssoc($set);
285
286 return $rec[$a_property];
287 }

References $db, and $DIC.

Referenced by lookupSnippetLength().

+ Here is the caller graph for this function:

◆ lookupAutoGlossaries()

static ilObjGlossary::lookupAutoGlossaries (   $a_id)
static

Lookup auto glossaries.

Parameters

return

Definition at line 459 of file class.ilObjGlossary.php.

460 {
461 global $DIC;
462
463 $db = $DIC->database();
464
465 // read auto glossaries
466 $set = $db->query(
467 "SELECT * FROM glo_glossaries " .
468 " WHERE id = " . $db->quote($a_id, "integer")
469 );
470 $glos = array();
471 while ($rec = $db->fetchAssoc($set)) {
472 $glos[] = $rec["glo_id"];
473 }
474 return $glos;
475 }

References $db, and $DIC.

Referenced by ilGlossaryDefPage\beforePageContentUpdate().

+ Here is the caller graph for this function:

◆ lookupSnippetLength()

static ilObjGlossary::lookupSnippetLength (   $a_id)
static

Lookup snippet length.

Parameters
intglossary id
Returns
int snippet length

Definition at line 295 of file class.ilObjGlossary.php.

296 {
297 return ilObjGlossary::lookup($a_id, "snippet_length");
298 }
static lookup($a_id, $a_property)
Lookup glossary property.

References lookup().

Referenced by ilGlossaryDefinition\shortenShortText().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ modifyExportIdentifier()

ilObjGlossary::modifyExportIdentifier (   $a_tag,
  $a_param,
  $a_value 
)

Definition at line 1091 of file class.ilObjGlossary.php.

1092 {
1093 if ($a_tag == "Identifier" && $a_param == "Entry") {
1094 $a_value = "il_" . IL_INST_ID . "_glo_" . $this->getId();
1095 }
1096
1097 return $a_value;
1098 }

References ilObject\getId().

+ Here is the call graph for this function:

◆ read()

ilObjGlossary::read ( )

read data of content object

Reimplemented from ilObject.

Definition at line 93 of file class.ilObjGlossary.php.

94 {
95 parent::read();
96 # echo "Glossary<br>\n";
97
98 $q = "SELECT * FROM glossary WHERE id = " .
99 $this->db->quote($this->getId(), "integer");
100 $gl_set = $this->db->query($q);
101 $gl_rec = $this->db->fetchAssoc($gl_set);
102 $this->setOnline(ilUtil::yn2tf($gl_rec["is_online"]));
103 $this->setVirtualMode($gl_rec["virtual"]);
104 $this->setPublicExportFile("xml", $gl_rec["public_xml_file"]);
105 $this->setPublicExportFile("html", $gl_rec["public_html_file"]);
106 $this->setActiveGlossaryMenu(ilUtil::yn2tf($gl_rec["glo_menu_active"]));
107 $this->setActiveDownloads(ilUtil::yn2tf($gl_rec["downloads_active"]));
108 $this->setPresentationMode($gl_rec["pres_mode"]);
109 $this->setSnippetLength($gl_rec["snippet_length"]);
110 $this->setShowTaxonomy($gl_rec["show_tax"]);
111
112 include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
114
115 // read auto glossaries
116 $set = $this->db->query(
117 "SELECT * FROM glo_glossaries " .
118 " WHERE id = " . $this->db->quote($this->getId(), "integer")
119 );
120 $glos = array();
121 while ($rec = $this->db->fetchAssoc($set)) {
122 $glos[] = $rec["glo_id"];
123 }
124 $this->setAutoGlossaries($glos);
125 }
setVirtualMode($a_mode)
set glossary type (virtual: fixed/level/subtree, normal:none)
setPublicExportFile($a_type, $a_file)
specify public export file for type
setStyleSheetId($a_style_id)
Set ID of assigned style sheet object.
setShowTaxonomy($a_val)
Set show taxonomy.
setAutoGlossaries($a_val)
Set auto glossaries.
setActiveGlossaryMenu($a_act_glo_menu)
static lookupObjectStyle($a_obj_id)
Lookup object style.

References ilObject\getId(), ilObjStyleSheet\lookupObjectStyle(), setActiveDownloads(), setActiveGlossaryMenu(), setAutoGlossaries(), setOnline(), setPresentationMode(), setPublicExportFile(), setShowTaxonomy(), setSnippetLength(), setStyleSheetId(), setVirtualMode(), and ilUtil\yn2tf().

+ Here is the call graph for this function:

◆ removeAutoGlossary()

ilObjGlossary::removeAutoGlossary (   $a_glo_id)

Remove auto glossary.

Parameters

return

Definition at line 393 of file class.ilObjGlossary.php.

394 {
395 $glo_ids = array();
396 foreach ($this->getAutoGlossaries() as $g) {
397 if ($g != $a_glo_id) {
398 $glo_ids[] = $g;
399 }
400 }
401 $this->setAutoGlossaries($glo_ids);
402 }

References getAutoGlossaries(), and setAutoGlossaries().

+ Here is the call graph for this function:

◆ removeOfflineGlossaries()

ilObjGlossary::removeOfflineGlossaries (   $a_glo_ids,
  $ids_are_ref_ids = false 
)

Remove offline glossaries from obj id array.

Parameters

return

Definition at line 1284 of file class.ilObjGlossary.php.

1285 {
1286 $glo_ids = $a_glo_ids;
1287 if ($ids_are_ref_ids) {
1288 $glo_ids = array_map(function ($id) {
1290 }, $a_glo_ids);
1291 }
1292
1293 $set = $this->db->query(
1294 "SELECT id FROM glossary " .
1295 " WHERE " . $this->db->in("id", $glo_ids, false, "integer") .
1296 " AND is_online = " . $this->db->quote("y", "text")
1297 );
1298 $online_glo_ids = array();
1299 while ($rec = $this->db->fetchAssoc($set)) {
1300 $online_glo_ids[] = $rec["id"];
1301 }
1302
1303 if (!$ids_are_ref_ids) {
1304 return $online_glo_ids;
1305 }
1306
1307 $online_ref_ids = array_filter($a_glo_ids, function ($ref_id) use ($online_glo_ids) {
1308 return in_array(ilObject::_lookupObjectId($ref_id), $online_glo_ids);
1309 });
1310
1311
1312 return $online_ref_ids;
1313 }
static _lookupObjectId($a_ref_id)
lookup object id

References ilObject\$id, ilObject\$ref_id, and ilObject\_lookupObjectId().

Referenced by getAllGlossaryIds().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setActiveDownloads()

ilObjGlossary::setActiveDownloads (   $a_down)

Definition at line 311 of file class.ilObjGlossary.php.

312 {
313 $this->downloads_active = $a_down;
314 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setActiveGlossaryMenu()

ilObjGlossary::setActiveGlossaryMenu (   $a_act_glo_menu)

Definition at line 301 of file class.ilObjGlossary.php.

302 {
303 $this->glo_menu_active = $a_act_glo_menu;
304 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setAutoGlossaries()

ilObjGlossary::setAutoGlossaries (   $a_val)

Set auto glossaries.

Parameters
array$a_valint

Definition at line 363 of file class.ilObjGlossary.php.

364 {
365 $this->auto_glossaries = array();
366 if (is_array($a_val)) {
367 foreach ($a_val as $v) {
368 $v = (int) $v;
369 if ($v > 0 && ilObject::_lookupType($v) == "glo" &&
370 !in_array($v, $this->auto_glossaries)) {
371 $this->auto_glossaries[] = $v;
372 }
373 }
374 }
375 }
static _lookupType($a_id, $a_reference=false)
lookup object type

References ilObject\_lookupType().

Referenced by read(), and removeAutoGlossary().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setDescription()

ilObjGlossary::setDescription (   $a_description)

set description of glossary object

Reimplemented from ilObject.

Definition at line 140 of file class.ilObjGlossary.php.

141 {
142 parent::setDescription($a_description);
143 }

◆ setOnline()

ilObjGlossary::setOnline (   $a_online)

Definition at line 243 of file class.ilObjGlossary.php.

244 {
245 $this->online = $a_online;
246 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setPresentationMode()

ilObjGlossary::setPresentationMode (   $a_val)

Set presentation mode.

Parameters
stringpresentation mode

Definition at line 206 of file class.ilObjGlossary.php.

207 {
208 $this->pres_mode = $a_val;
209 }

Referenced by create(), and read().

+ Here is the caller graph for this function:

◆ setPublicExportFile()

ilObjGlossary::setPublicExportFile (   $a_type,
  $a_file 
)

specify public export file for type

Parameters
string$a_typetype ("xml" / "html")
string$a_filefile name

Definition at line 661 of file class.ilObjGlossary.php.

662 {
663 $this->public_export_file[$a_type] = $a_file;
664 }

References $a_type.

Referenced by read().

+ Here is the caller graph for this function:

◆ setShowTaxonomy()

ilObjGlossary::setShowTaxonomy (   $a_val)

Set show taxonomy.

Parameters
bool$a_valshow taxonomy

Definition at line 343 of file class.ilObjGlossary.php.

344 {
345 $this->show_tax = $a_val;
346 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setSnippetLength()

ilObjGlossary::setSnippetLength (   $a_val)

Set snippet length.

Parameters
intsnippet length

Definition at line 226 of file class.ilObjGlossary.php.

227 {
228 $this->snippet_length = $a_val;
229 }

Referenced by create(), and read().

+ Here is the caller graph for this function:

◆ setStyleSheetId()

ilObjGlossary::setStyleSheetId (   $a_style_id)

Set ID of assigned style sheet object.

Definition at line 332 of file class.ilObjGlossary.php.

333 {
334 $this->style_id = $a_style_id;
335 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setTitle()

ilObjGlossary::setTitle (   $a_title)

set title of glossary object

Reimplemented from ilObject.

Definition at line 195 of file class.ilObjGlossary.php.

196 {
197 parent::setTitle($a_title);
198 // $this->meta_data->setTitle($a_title);
199 }

◆ setVirtualMode()

ilObjGlossary::setVirtualMode (   $a_mode)

set glossary type (virtual: fixed/level/subtree, normal:none)

Definition at line 149 of file class.ilObjGlossary.php.

150 {
151 switch ($a_mode) {
152 case "level":
153 case "subtree":
154 // case "fixed":
155 $this->virtual_mode = $a_mode;
156 $this->virtual = true;
157 break;
158
159 default:
160 $this->virtual_mode = "none";
161 $this->virtual = false;
162 break;
163 }
164 }

Referenced by read().

+ Here is the caller graph for this function:

◆ supportsLongTextQuery()

ilObjGlossary::supportsLongTextQuery ( )

Is long text search supported.

Returns
bool

Definition at line 1376 of file class.ilObjGlossary.php.

1377 {
1378 if ($this->db->getDBType() == "oracle") {
1379 return false;
1380 }
1381 return true;
1382 }

◆ update()

ilObjGlossary::update ( )

Update object.

Reimplemented from ilObject.

Definition at line 407 of file class.ilObjGlossary.php.

408 {
409 $this->updateMetaData();
410
411 $this->db->manipulate("UPDATE glossary SET " .
412 " is_online = " . $this->db->quote(ilUtil::tf2yn($this->getOnline()), "text") . "," .
413 " glossary.virtual = " . $this->db->quote($this->getVirtualMode(), "text") . "," .
414 " public_xml_file = " . $this->db->quote($this->getPublicExportFile("xml"), "text") . "," .
415 " public_html_file = " . $this->db->quote($this->getPublicExportFile("html"), "text") . "," .
416 " glo_menu_active = " . $this->db->quote(ilUtil::tf2yn($this->isActiveGlossaryMenu()), "text") . "," .
417 " downloads_active = " . $this->db->quote(ilUtil::tf2yn($this->isActiveDownloads()), "text") . ", " .
418 " pres_mode = " . $this->db->quote($this->getPresentationMode(), "text") . ", " .
419 " show_tax = " . $this->db->quote((int) $this->getShowTaxonomy(), "integer") . ", " .
420 " snippet_length = " . $this->db->quote((int) $this->getSnippetLength(), "integer") . " " .
421 " WHERE id = " . $this->db->quote($this->getId(), "integer"));
422
423 include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
425
426 $this->updateAutoGlossaries();
428 }
updateMetaData()
update meta data entry
static tf2yn($a_tf)
convert true/false to "y"/"n"
update($pash, $contents, Config $config)

References ilObject\getId(), getStyleSheetId(), ilUtil\tf2yn(), League\Flysystem\Adapter\Polyfill\update(), updateAutoGlossaries(), ilObject\updateMetaData(), and ilObjStyleSheet\writeStyleUsage().

+ Here is the call graph for this function:

◆ updateAutoGlossaries()

ilObjGlossary::updateAutoGlossaries ( )

Update auto glossaries.

Parameters

return

Definition at line 437 of file class.ilObjGlossary.php.

438 {
439 // update auto glossaries
440 $this->db->manipulate(
441 "DELETE FROM glo_glossaries WHERE " .
442 " id = " . $this->db->quote($this->getId(), "integer")
443 );
444 foreach ($this->getAutoGlossaries() as $glo_id) {
445 $this->db->manipulate("INSERT INTO glo_glossaries " .
446 "(id, glo_id) VALUES (" .
447 $this->db->quote($this->getId(), "integer") . "," .
448 $this->db->quote($glo_id, "integer") .
449 ")");
450 }
451 }

References getAutoGlossaries().

Referenced by create(), and update().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $auto_glossaries

ilObjGlossary::$auto_glossaries = array()

Definition at line 36 of file class.ilObjGlossary.php.

Referenced by getAutoGlossaries().

◆ $db

ilObjGlossary::$db
protected

Definition at line 31 of file class.ilObjGlossary.php.

Referenced by _lookupOnline(), lookup(), and lookupAutoGlossaries().

◆ $tpl

ilObjGlossary::$tpl
protected

Definition at line 25 of file class.ilObjGlossary.php.

Referenced by exportHTML(), and exportHTMLMOB().

◆ $user

ilObjGlossary::$user
protected

Definition at line 41 of file class.ilObjGlossary.php.


The documentation for this class was generated from the following file: