ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilObjGlossary Class Reference

Class ilObjGlossary. More...

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

Public Member Functions

 ilObjGlossary ($a_id=0, $a_call_by_reference=true)
 Constructor public.
 create ($a_upload=false)
 create glossary object
 read ()
 read data of content object
 getDescription ()
 get description of glossary object
 setDescription ($a_description)
 set description of glossary object
 setVirtualMode ($a_mode)
 set glossary type (virtual: fixed/level/subtree, normal:none)
 getVirtualMode ()
 get glossary type (normal or virtual)
 isVirtual ()
 returns true if glossary type is virtual (any mode)
 getTitle ()
 get title of glossary object
 setTitle ($a_title)
 set title of glossary object
 setPresentationMode ($a_val)
 Set presentation mode.
 getPresentationMode ()
 Get presentation mode.
 setSnippetLength ($a_val)
 Set snippet length.
 getSnippetLength ()
 Get snippet length.
 setOnline ($a_online)
 getOnline ()
 _lookupOnline ($a_id)
 check wether content object is online
 setActiveGlossaryMenu ($a_act_glo_menu)
 isActiveGlossaryMenu ()
 setActiveDownloads ($a_down)
 isActiveDownloads ()
 getStyleSheetId ()
 Get ID of assigned style sheet object.
 setStyleSheetId ($a_style_id)
 Set ID of assigned style sheet object.
 setShowTaxonomy ($a_val)
 Set show taxonomy.
 getShowTaxonomy ()
 Get show taxonomy.
 update ()
 Update object.
 getTermList ($searchterm="", $a_letter="", $a_def="", $a_tax_node=0, $a_include_offline_childs=false, $a_add_amet_fields=false, $a_amet_filter="")
 Get term list.
 getFirstLetters ($a_tax_node=0)
 Get term list.
 getAllGlossaryIds ($a_include_offline_childs=false)
 Get all glossary ids.
 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)
 getImportDirectory ()
 get import directory of glossary
 createExportDirectory ($a_type="xml")
 Creates export directory.
 getExportDirectory ($a_type="xml")
 Get export directory of glossary.
 getExportFiles ()
 Get export files.
 setPublicExportFile ($a_type, $a_file)
 specify public export file for type
 getPublicExportFile ($a_type)
 get public export file
 exportHTML ($a_target_dir, $log)
 export html package
 exportHTMLGlossaryTerms (&$a_glo_gui, $a_target_dir)
 export glossary terms
 exportHTMLMOB ($a_target_dir, &$a_glo_gui, $a_mob_id)
 export media object to html
 exportHTMLFile ($a_target_dir, $a_file_id)
 export file object
 exportXML (&$a_xml_writer, $a_inst, $a_target_dir, &$expLog)
 export object to xml (see ilias_co.dtd)
 exportXMLGlossaryItems (&$a_xml_writer, $a_inst, &$expLog)
 export page objects to xml (see ilias_co.dtd)
 exportXMLMetaData (&$a_xml_writer)
 export content objects meta data 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)
 exportFileItems ($a_target_dir, &$expLog)
 export files of file itmes
 modifyExportIdentifier ($a_tag, $a_param, $a_value)
 delete ()
 delete glossary and all related data
 notify ($a_event, $a_ref_id, $a_parent_non_rbac_id, $a_node_id, $a_params=0)
 notifys an object about an event occured Based on the event happend, each object may decide how it reacts.
 getXMLZip ()
 Get zipped xml file for glossary.
 getTaxonomyId ()
 Get taxonomy.
 cloneObject ($a_target_id, $a_copy_id=0)
 Clone glossary.
 removeOfflineGlossaries ($a_glo_ids)
 Remove offline glossaries from obj id array.
- Public Member Functions inherited from ilObject
 ilObject ($a_id=0, $a_reference=true)
 Constructor public.
 withReferences ()
 determines wehter objects are referenced or not (got ref ids or not)
 read ($a_force_db=false)
 read object data from db into object
 getId ()
 get object id public
 setId ($a_id)
 set object id public
 setRefId ($a_id)
 set reference id public
 getRefId ()
 get reference id public
 getType ()
 get object type public
 setType ($a_type)
 set object type public
 getPresentationTitle ()
 get presentation title Normally same as title Overwritten for sessions
 getUntranslatedTitle ()
 get untranslated object title public
 getLongDescription ()
 get object long description (stored in object_description)
 getImportId ()
 get import id
 setImportId ($a_import_id)
 set import id
 getOwner ()
 get object owner
 getOwnerName ()
 _lookupOwnerName ($a_owner_id)
 lookup owner name for owner id
 setOwner ($a_owner)
 set object owner
 getCreateDate ()
 get create date public
 getLastUpdateDate ()
 get last update date public
 getDiskUsage ()
 Gets the disk usage of the object in bytes.
 setObjDataRecord ($a_record)
 set object_data record (note: this method should only be called from the ilObjectFactory class)
 create ()
 create
 MDUpdateListener ($a_element)
 Meta data update listener.
 createMetaData ()
 create meta data entry
 updateMetaData ()
 update meta data entry
 deleteMetaData ()
 delete meta data entry
 updateOwner ()
 update owner of object in db
 _getIdForImportId ($a_import_id)
 get current object id for import id (static)
 _lookupOwner ($a_id)
 lookup object owner
 _lookupLastUpdate ($a_id, $a_as_string=false)
 lookup last update
 _getLastUpdateOfObjects ($a_objs)
 Get last update for a set of media objects.
 _setDeletedDate ($a_ref_id)
 only called in ilTree::saveSubTree
 _resetDeletedDate ($a_ref_id)
 only called in ilObjectGUI::insertSavedNodes
 _lookupDeletedDate ($a_ref_id)
 only called in ilObjectGUI::insertSavedNodes
 _writeTitle ($a_obj_id, $a_title)
 write title to db (static)
 _writeDescription ($a_obj_id, $a_desc)
 write description to db (static)
 _writeImportId ($a_obj_id, $a_import_id)
 write import id to db (static)
 _isInTrash ($a_ref_id)
 checks wether object is in trash
 _hasUntrashedReference ($a_obj_id)
 checks wether an object has at least one reference that is not in trash
 _getObjectsDataForType ($a_type, $a_omit_trash=false)
 get all objects of a certain type
 putInTree ($a_parent_ref)
 maybe this method should be in tree object!?
 setPermissions ($a_parent_ref)
 set permissions of object
 createReference ()
 creates reference for object
 countReferences ()
 count references of object
 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) public
 createRoleFolder ()
 creates a local role folder
 applyDidacticTemplate ($a_tpl_id)
 Apply template.
 setRegisterMode ($a_bool)
 isUserRegistered ($a_user_id=0)
 requireRegistration ()
 getHTMLDirectory ()
 cloneObject ($a_target_id, $a_copy_id=0, $a_omit_tree=false)
 Clone object permissions, put in tree ...
 appendCopyInfo ($a_target_id, $a_copy_id)
 Prepend Copy info if object with same name exists in that container.
 cloneDependencies ($a_target_id, $a_copy_id)
 Clone object dependencies.
 cloneMetaData ($target_obj)
 Copy meta data.
 _lookupCreationDate ($a_id)
 Lookup creation date.

Static Public Member Functions

static lookupSnippetLength ($a_id)
 Lookup snippet length.
static getDeletionDependencies ($a_obj_id)
 Get deletion dependencies.
- Static Public Member Functions inherited from ilObject
static _lookupObjIdByImportId ($a_import_id)
static _getAllReferences ($a_id)
 get all reference ids of object
static _lookupTitle ($a_id)
 lookup object title
static _getIdsForTitle ($title, $type= '', $partialmatch=false)
static _lookupDescription ($a_id)
 lookup object description
static _lookupObjId ($a_id)
static setDeletedDates ($a_ref_ids)
 Set deleted date type $ilDB.
static _lookupType ($a_id, $a_reference=false)
 lookup object type
static _lookupObjectId ($a_ref_id)
 lookup object id
static _exists ($a_id, $a_reference=false, $a_type=null)
 checks if an object exists in object_data
static _getObjectsByType ($a_obj_type="", $a_owner="")
 Get objects by type.
static _prepareCloneSelection ($a_ref_ids, $new_type, $show_path=true)
 Prepare copy wizard object selection.
static _getIcon ($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
 Get icon for repository item.
static collectDeletionDependencies (&$deps, $a_ref_id, $a_obj_id, $a_type, $a_depth=0)
 Collect deletion dependencies.
static getLongDescriptions (array $a_obj_ids)
 Get long description data.
static getAllOwnedRepositoryObjects ($a_user_id)
 Get all ids of objects user owns.
static hasAutoRating ($a_type, $a_ref_id)
 Check if auto rating is active for parent group/course.

Static Protected Member Functions

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

Additional Inherited Members

- Data Fields inherited from ilObject
const TITLE_LENGTH = 255
 max length of object title
const DESC_LENGTH = 128
 $ilias
 $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
 $obj_data_record
 object_data record

Detailed Description

Class ilObjGlossary.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
Id:
class.ilObjGlossary.php 47283 2014-01-15 18:04:51Z akill

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

Member Function Documentation

ilObjGlossary::_lookupOnline (   $a_id)

check wether content object is online

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

References ilUtil\yn2tf().

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

{
global $ilDB;
$q = "SELECT is_online FROM glossary WHERE id = ".
$ilDB->quote($a_id, "integer");
$lm_set = $ilDB->query($q);
$lm_rec = $ilDB->fetchAssoc($lm_set);
return ilUtil::yn2tf($lm_rec["is_online"]);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Clone glossary.

Parameters
inttarget ref_id
intcopy id

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

References ilObject\$ilias, $ilUser, ilGlossaryTerm\_copyTerm(), ilObjStyleSheet\_lookupStandard(), ilObject\cloneMetaData(), getDescription(), ilObject\getId(), getPresentationMode(), getSnippetLength(), getStyleSheetId(), getTaxonomyId(), ilGlossaryTerm\getTermList(), getTitle(), getVirtualMode(), and ilObjTaxonomy\saveUsage().

{
global $ilDB, $ilUser, $ilias;
$new_obj = parent::cloneObject($a_target_id,$a_copy_id);
$this->cloneMetaData($new_obj);
$new_obj->setTitle($this->getTitle());
$new_obj->setDescription($this->getDescription());
$new_obj->setVirtualMode($this->getVirtualMode());
$new_obj->setPresentationMode($this->getPresentationMode());
$new_obj->setSnippetLength($this->getSnippetLength());
$new_obj->update();
// set/copy stylesheet
include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
$style_id = $this->getStyleSheetId();
if ($style_id > 0 && !ilObjStyleSheet::_lookupStandard($style_id))
{
$style_obj = $ilias->obj_factory->getInstanceByObjId($style_id);
$new_id = $style_obj->ilClone();
$new_obj->setStyleSheetId($new_id);
$new_obj->update();
}
// copy taxonomy
if (($tax_id = $this->getTaxonomyId()) > 0)
{
// clone it
include_once("./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
$tax = new ilObjTaxonomy($tax_id);
$new_tax = $tax->cloneObject(0,0,true);
$map = $tax->getNodeMapping();
// assign new taxonomy to new glossary
ilObjTaxonomy::saveUsage($new_tax->getId(), $new_obj->getId());
}
// assign new tax/new glossary
// handle mapping
// prepare tax node assignments objects
include_once("./Services/Taxonomy/classes/class.ilTaxNodeAssignment.php");
if ($tax_id > 0)
{
$tax_ass = new ilTaxNodeAssignment("glo", $this->getId(), "term", $tax_id);
$new_tax_ass = new ilTaxNodeAssignment("glo", $new_obj->getId(), "term", $new_tax->getId());
}
// copy terms
foreach (ilGlossaryTerm::getTermList($this->getId()) as $term)
{
$new_term_id = ilGlossaryTerm::_copyTerm($term["id"], $new_obj->getId());
// copy tax node assignments
if ($tax_id > 0)
{
$assignmts = $tax_ass->getAssignmentsOfItem($term["id"]);
foreach ($assignmts as $a)
{
if ($map[$a["node_id"]] > 0)
{
$new_tax_ass->addAssignment($map[$a["node_id"]] ,$new_term_id);
}
}
}
}
return $new_obj;
}

+ Here is the call graph for this function:

ilObjGlossary::create (   $a_upload = false)

create glossary object

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

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

{
global $ilDB;
// meta data will be created by
// import parser
if (!$a_upload)
{
$this->createMetaData();
}
$ilDB->manipulate("INSERT INTO glossary (id, is_online, virtual, pres_mode, snippet_length) VALUES (".
$ilDB->quote($this->getId(), "integer").",".
$ilDB->quote("n", "text").",".
$ilDB->quote($this->getVirtualMode(), "text").",".
$ilDB->quote("table", "text").",".
$ilDB->quote(200, "integer").
")");
$this->setPresentationMode("table");
$this->setSnippetLength(200);
if (((int) $this->getStyleSheetId()) > 0)
{
include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
}
}

+ Here is the call graph for this function:

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

Creates export directory.

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

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

{
include_once("./Services/Export/classes/class.ilExport.php");
return ilExport::_createExportDirectory($this->getId(), $a_type, $this->getType());
}

+ Here is the call graph for this function:

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 438 of file class.ilObjGlossary.php.

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

{
$glo_data_dir = ilUtil::getDataDir()."/glo_data";
ilUtil::makeDir($glo_data_dir);
if(!is_writable($glo_data_dir))
{
$this->ilias->raiseError("Glossary Data Directory (".$glo_data_dir
.") not writeable.",$this->ilias->error_obj->FATAL);
}
// create glossary directory (data_dir/glo_data/glo_<id>)
$glo_dir = $glo_data_dir."/glo_".$this->getId();
ilUtil::makeDir($glo_dir);
if(!@is_dir($glo_dir))
{
$this->ilias->raiseError("Creation of Glossary Directory failed.",$this->ilias->error_obj->FATAL);
}
// create Import subdirectory (data_dir/glo_data/glo_<id>/import)
$import_dir = $glo_dir."/import";
ilUtil::makeDir($import_dir);
if(!@is_dir($import_dir))
{
$this->ilias->raiseError("Creation of Export Directory failed.",$this->ilias->error_obj->FATAL);
}
}

+ Here is the call graph for this function:

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

public

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

Reimplemented from ilObject.

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

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

{
global $ilDB;
// always call parent delete function first!!
if (!parent::delete())
{
return false;
}
// delete terms
if (!$this->isVirtual())
{
$terms = $this->getTermList();
foreach ($terms as $term)
{
$term_obj =& new ilGlossaryTerm($term["id"]);
$term_obj->delete();
}
}
// delete glossary data entry
$q = "DELETE FROM glossary WHERE id = ".$ilDB->quote($this->getId());
$ilDB->query($q);
// delete meta data
$this->deleteMetaData();
/*
$nested = new ilNestedSetXML();
$nested->init($this->getId(), $this->getType());
$nested->deleteAllDBData();
*/
return true;
}

+ Here is the call graph for this function:

ilObjGlossary::exportFileItems (   $a_target_dir,
$expLog 
)

export files of file itmes

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

Referenced by exportXML().

{
include_once("./Modules/File/classes/class.ilObjFile.php");
foreach ($this->file_ids as $file_id)
{
$expLog->write(date("[y-m-d H:i:s] ")."File Item ".$file_id);
$file_obj = new ilObjFile($file_id, false);
$file_obj->export($a_target_dir);
unset($file_obj);
}
}

+ Here is the caller graph for this function:

ilObjGlossary::exportHTML (   $a_target_dir,
  $log 
)

export html package

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

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

{
global $ilias, $tpl;
// initialize temporary target directory
ilUtil::delDir($a_target_dir);
ilUtil::makeDir($a_target_dir);
include_once("./Services/COPage/classes/class.ilCOPageHTMLExport.php");
$this->co_page_html_export = new ilCOPageHTMLExport($a_target_dir);
$this->co_page_html_export->createDirectories();
// export system style sheet
$location_stylesheet = ilUtil::getStyleSheetLocation("filesystem");
$style_name = $ilias->account->prefs["style"].".css";
copy($location_stylesheet, $a_target_dir."/".$style_name);
$location_stylesheet = ilUtil::getStyleSheetLocation();
if ($this->getStyleSheetId() < 1)
{
$cont_stylesheet = "Services/COPage/css/content.css";
copy($cont_stylesheet, $a_target_dir."/content.css");
}
else
{
$content_style_img_dir = $a_target_dir."/images";
ilUtil::makeDir($content_style_img_dir);
$style = new ilObjStyleSheet($this->getStyleSheetId());
$style->writeCSSFile($a_target_dir."/content.css", "images");
$style->copyImagesToDir($content_style_img_dir);
}
// export syntax highlighting style
copy($syn_stylesheet, $a_target_dir."/syntaxhighlight.css");
// get glossary presentation gui class
include_once("./Modules/Glossary/classes/class.ilGlossaryPresentationGUI.php");
$_GET["cmd"] = "nop";
$glo_gui =& new ilGlossaryPresentationGUI();
$glo_gui->setOfflineMode(true);
$glo_gui->setOfflineDirectory($a_target_dir);
// could be implemented in the future if other export
// formats are supported (e.g. scorm)
//$glo_gui->setExportFormat($a_export_format);
// export terms
$this->exportHTMLGlossaryTerms($glo_gui, $a_target_dir);
// export all media objects
foreach ($this->offline_mobs as $mob)
{
$this->exportHTMLMOB($a_target_dir, $glo_gui, $mob, "_blank");
}
$_GET["obj_type"] = "MediaObject";
$_GET["obj_id"] = $a_mob_id;
$_GET["cmd"] = "";
// export all file objects
foreach ($this->offline_files as $file)
{
$this->exportHTMLFile($a_target_dir, $file);
}
// export images
$image_dir = $a_target_dir."/images";
ilUtil::makeDir($image_dir);
ilUtil::makeDir($image_dir."/browser");
copy(ilUtil::getImagePath("enlarge.png", false, "filesystem"),
$image_dir."/enlarge.png");
copy(ilUtil::getImagePath("browser/blank.png", false, "filesystem"),
$image_dir."/browser/plus.png");
copy(ilUtil::getImagePath("browser/blank.png", false, "filesystem"),
$image_dir."/browser/minus.png");
copy(ilUtil::getImagePath("browser/blank.png", false, "filesystem"),
$image_dir."/browser/blank.png");
copy(ilUtil::getImagePath("icon_st.png", false, "filesystem"),
$image_dir."/icon_st.png");
copy(ilUtil::getImagePath("icon_pg.png", false, "filesystem"),
$image_dir."/icon_pg.png");
copy(ilUtil::getImagePath("nav_arr_L.png", false, "filesystem"),
$image_dir."/nav_arr_L.png");
copy(ilUtil::getImagePath("nav_arr_R.png", false, "filesystem"),
$image_dir."/nav_arr_R.png");
// template workaround: reset of template
$tpl = new ilTemplate("tpl.main.html", true, true);
$tpl->setVariable("LOCATION_STYLESHEET",$location_stylesheet);
$tpl->addBlockFile("CONTENT", "content", "tpl.adm_content.html");
// zip everything
if (true)
{
// zip it all
$date = time();
$zip_file = $this->getExportDirectory("html")."/".$date."__".IL_INST_ID."__".
$this->getType()."_".$this->getId().".zip";
//echo "zip-".$a_target_dir."-to-".$zip_file;
ilUtil::zip($a_target_dir, $zip_file);
ilUtil::delDir($a_target_dir);
}
}

+ Here is the call graph for this function:

ilObjGlossary::exportHTMLFile (   $a_target_dir,
  $a_file_id 
)

export file object

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

References ilUtil\makeDir().

Referenced by exportHTML().

{
$file_dir = $a_target_dir."/files/file_".$a_file_id;
ilUtil::makeDir($file_dir);
include_once("./Modules/File/classes/class.ilObjFile.php");
$file_obj = new ilObjFile($a_file_id, false);
$source_file = $file_obj->getDirectory($file_obj->getVersion())."/".$file_obj->getFileName();
if (!is_file($source_file))
{
$source_file = $file_obj->getDirectory()."/".$file_obj->getFileName();
}
copy($source_file, $file_dir."/".$file_obj->getFileName());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjGlossary::exportHTMLGlossaryTerms ( $a_glo_gui,
  $a_target_dir 
)

export glossary terms

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

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

Referenced by exportHTML().

{
global $ilUser;
include_once("./Services/COPage/classes/class.ilCOPageHTMLExport.php");
$copage_export = new ilCOPageHTMLExport($a_target_dir);
$copage_export->exportSupportScripts();
// index.html file
$a_glo_gui->tpl = new ilTemplate("tpl.main.html", true, true);
$style_name = $ilUser->prefs["style"].".css";;
$a_glo_gui->tpl->setVariable("LOCATION_STYLESHEET","./".$style_name);
$a_glo_gui->tpl->addBlockFile("CONTENT", "content", "tpl.adm_content.html");
$a_glo_gui->tpl->setTitle($this->getTitle());
$content = $a_glo_gui->listTerms();
$file = $a_target_dir."/index.html";
// open file
if (!($fp = @fopen($file,"w+")))
{
die ("<b>Error</b>: Could not open \"".$file."\" for writing".
" in <b>".__FILE__."</b> on line <b>".__LINE__."</b><br />");
}
chmod($file, 0770);
fwrite($fp, $content);
fclose($fp);
$terms = $this->getTermList();
$this->offline_mobs = array();
$this->offline_files = array();
foreach($terms as $term)
{
$a_glo_gui->tpl = new ilTemplate("tpl.main.html", true, true);
$a_glo_gui->tpl = $copage_export->getPreparedMainTemplate();
//$tpl->addBlockFile("CONTENT", "content", "tpl.adm_content.html");
// set style
$style_name = $ilUser->prefs["style"].".css";;
$a_glo_gui->tpl->setVariable("LOCATION_STYLESHEET","./".$style_name);
$_GET["term_id"] = $term["id"];
$_GET["frame"] = "_blank";
$content =& $a_glo_gui->listDefinitions($_GET["ref_id"],$term["id"],false);
$file = $a_target_dir."/term_".$term["id"].".html";
// open file
if (!($fp = @fopen($file,"w+")))
{
die ("<b>Error</b>: Could not open \"".$file."\" for writing".
" in <b>".__FILE__."</b> on line <b>".__LINE__."</b><br />");
}
chmod($file, 0770);
fwrite($fp, $content);
fclose($fp);
// store linked/embedded media objects of glosssary term
include_once("./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
foreach($defs as $def)
{
$def_mobs = ilObjMediaObject::_getMobsOfObject("gdf:pg", $def["id"]);
foreach($def_mobs as $def_mob)
{
$this->offline_mobs[$def_mob] = $def_mob;
}
// get all files of page
include_once("./Modules/File/classes/class.ilObjFile.php");
$def_files = ilObjFile::_getFilesOfObject("gdf:pg", $def["id"]);
$this->offline_files = array_merge($this->offline_files, $def_files);
}
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

export media object to html

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

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

Referenced by exportHTML().

{
global $tpl;
$mob_dir = $a_target_dir."/mobs";
$source_dir = ilUtil::getWebspaceDir()."/mobs/mm_".$a_mob_id;
if (@is_dir($source_dir))
{
ilUtil::makeDir($mob_dir."/mm_".$a_mob_id);
ilUtil::rCopy($source_dir, $mob_dir."/mm_".$a_mob_id);
}
$tpl = new ilTemplate("tpl.main.html", true, true);
$tpl->addBlockFile("CONTENT", "content", "tpl.adm_content.html");
$_GET["obj_type"] = "MediaObject";
$_GET["mob_id"] = $a_mob_id;
$_GET["cmd"] = "";
$content =& $a_glo_gui->media();
$file = $a_target_dir."/media_".$a_mob_id.".html";
// open file
if (!($fp = @fopen($file,"w+")))
{
die ("<b>Error</b>: Could not open \"".$file."\" for writing".
" in <b>".__FILE__."</b> on line <b>".__LINE__."</b><br />");
}
chmod($file, 0770);
fwrite($fp, $content);
fclose($fp);
// fullscreen
include_once("./Services/MediaObjects/classes/class.ilObjMediaObject.php");
$mob_obj = new ilObjMediaObject($a_mob_id);
if ($mob_obj->hasFullscreenItem())
{
$tpl = new ilTemplate("tpl.main.html", true, true);
$tpl->addBlockFile("CONTENT", "content", "tpl.adm_content.html");
$_GET["mob_id"] = $a_mob_id;
$_GET["cmd"] = "fullscreen";
$content = $a_glo_gui->fullscreen();
$file = $a_target_dir."/fullscreen_".$a_mob_id.".html";
// open file
if (!($fp = @fopen($file,"w+")))
{
die ("<b>Error</b>: Could not open \"".$file."\" for writing".
" in <b>".__FILE__."</b> on line <b>".__LINE__."</b><br />");
}
chmod($file, 0770);
fwrite($fp, $content);
fclose($fp);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 795 of file class.ilObjGlossary.php.

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

{
global $ilBench;
// export glossary
$attrs = array();
$attrs["Type"] = "Glossary";
$a_xml_writer->xmlStartTag("ContentObject", $attrs);
// MetaData
$this->exportXMLMetaData($a_xml_writer);
// collect media objects
$terms = $this->getTermList();
$this->mob_ids = array();
$this->file_ids = array();
foreach ($terms as $term)
{
include_once "./Modules/Glossary/classes/class.ilGlossaryDefinition.php";
foreach($defs as $def)
{
$this->page_object = new ilGlossaryDefPage($def["id"]);
$this->page_object->buildDom();
$this->page_object->insertInstIntoIDs(IL_INST_ID);
$mob_ids = $this->page_object->collectMediaObjects(false);
include_once("./Services/COPage/classes/class.ilPCFileList.php");
$file_ids = ilPCFileList::collectFileItems($this->page_object, $this->page_object->getDomDoc());
foreach($mob_ids as $mob_id)
{
$this->mob_ids[$mob_id] = $mob_id;
}
foreach($file_ids as $file_id)
{
$this->file_ids[$file_id] = $file_id;
}
}
}
// export media objects
$expLog->write(date("[y-m-d H:i:s] ")."Start Export Media Objects");
$ilBench->start("GlossaryExport", "exportMediaObjects");
$this->exportXMLMediaObjects($a_xml_writer, $a_inst, $a_target_dir, $expLog);
$ilBench->stop("GlossaryExport", "exportMediaObjects");
$expLog->write(date("[y-m-d H:i:s] ")."Finished Export Media Objects");
// FileItems
$expLog->write(date("[y-m-d H:i:s] ")."Start Export File Items");
$ilBench->start("ContentObjectExport", "exportFileItems");
$this->exportFileItems($a_target_dir, $expLog);
$ilBench->stop("ContentObjectExport", "exportFileItems");
$expLog->write(date("[y-m-d H:i:s] ")."Finished Export File Items");
// Glossary
$expLog->write(date("[y-m-d H:i:s] ")."Start Export Glossary Items");
$ilBench->start("GlossaryExport", "exportGlossaryItems");
$this->exportXMLGlossaryItems($a_xml_writer, $a_inst, $expLog);
$ilBench->stop("GlossaryExport", "exportGlossaryItems");
$expLog->write(date("[y-m-d H:i:s] ")."Finished Export Glossary Items");
$a_xml_writer->xmlEndTag("ContentObject");
}

+ Here is the call graph for this function:

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 866 of file class.ilObjGlossary.php.

References $ilBench, exportXMLMetaData(), and getTermList().

Referenced by exportXML().

{
global $ilBench;
$attrs = array();
$a_xml_writer->xmlStartTag("Glossary", $attrs);
// MetaData
$this->exportXMLMetaData($a_xml_writer);
$terms = $this->getTermList();
// export glossary terms
reset($terms);
foreach ($terms as $term)
{
$ilBench->start("GlossaryExport", "exportGlossaryItem");
$expLog->write(date("[y-m-d H:i:s] ")."Page Object ".$page["obj_id"]);
// export xml to writer object
$ilBench->start("GlossaryExport", "exportGlossaryItem_getGlossaryTerm");
$glo_term = new ilGlossaryTerm($term["id"]);
$ilBench->stop("GlossaryExport", "exportGlossaryItem_getGlossaryTerm");
$ilBench->start("GlossaryExport", "exportGlossaryItem_XML");
$glo_term->exportXML($a_xml_writer, $a_inst);
$ilBench->stop("GlossaryExport", "exportGlossaryItem_XML");
unset($glo_term);
$ilBench->stop("GlossaryExport", "exportGlossaryItem");
}
$a_xml_writer->xmlEndTag("Glossary");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 922 of file class.ilObjGlossary.php.

Referenced by exportXML().

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

+ Here is the caller graph for this function:

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 907 of file class.ilObjGlossary.php.

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

Referenced by exportXML(), and exportXMLGlossaryItems().

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjGlossary::getAllGlossaryIds (   $a_include_offline_childs = false)

Get all glossary ids.

Parameters
@return

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

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

Referenced by getFirstLetters(), and getTermList().

{
global $tree;
if ($this->isVirtual())
{
$glo_ids = array();
$virtual_mode = $this->getRefId() ? $this->getVirtualMode() : '';
switch ($virtual_mode)
{
case "level":
$glo_arr = $tree->getChildsByType($tree->getParentId($this->getRefId()),"glo");
$glo_ids[] = $this->getId();
foreach ($glo_arr as $glo)
{
{
$glo_ids[] = $glo['obj_id'];
}
}
if (!$a_include_offline_childs)
{
}
break;
case "subtree":
$subtree_nodes = $tree->getSubTree($tree->getNodeData($tree->getParentId($this->getRefId())));
foreach ($subtree_nodes as $node)
{
if ($node['type'] == 'glo')
{
$glo_ids[] = $node['obj_id'];
}
}
if (!$a_include_offline_childs)
{
}
break;
// fallback to none virtual mode in case of error
default:
$glo_ids[] = $this->getId();
break;
}
}
else
{
$glo_ids = $this->getId();
}
return $glo_ids;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilObjGlossary::getDeletionDependencies (   $a_obj_id)
static

Get deletion dependencies.

Reimplemented from ilObject.

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

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

{
global $lng;
$dep = array();
include_once("./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php");
foreach ($sms as $sm)
{
$lng->loadLanguageModule("content");
$dep[$sm] = $lng->txt("glo_used_in_scorm");
}
//echo "-".$a_obj_id."-";
//var_dump($dep);
return $dep;
}

+ Here is the call graph for this function:

ilObjGlossary::getDescription ( )

get description of glossary object

Returns
string description

Reimplemented from ilObject.

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

Referenced by cloneObject().

{
}

+ Here is the caller graph for this function:

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

Get export directory of glossary.

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

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

Referenced by exportHTML().

{
include_once("./Services/Export/classes/class.ilExport.php");
return ilExport::_getExportDirectory($this->getId(), $a_type, $this->getType());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjGlossary::getExportFiles ( )

Get export files.

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

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

{
include_once("./Services/Export/classes/class.ilExport.php");
return ilExport::_getExportFiles($this->getId(), array("xml", "html"), $this->getType());
}

+ Here is the call graph for this function:

ilObjGlossary::getFirstLetters (   $a_tax_node = 0)

Get term list.

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

References getAllGlossaryIds().

{
$glo_ids = $this->getAllGlossaryIds();
$first_letters = ilGlossaryTerm::getFirstLetters($glo_ids, $a_tax_node);
return $first_letters;
}

+ Here is the call graph for this function:

ilObjGlossary::getImportDirectory ( )

get import directory of glossary

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

References ilUtil\getDataDir().

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

+ Here is the call graph for this function:

ilObjGlossary::getOnline ( )

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

{
return $this->online;
}
ilObjGlossary::getPresentationMode ( )

Get presentation mode.

Returns
string presentation mode

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

Referenced by cloneObject(), and update().

{
return $this->pres_mode;
}

+ Here is the caller graph for this function:

ilObjGlossary::getPublicExportFile (   $a_type)

get public export file

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

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

Referenced by update().

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

+ Here is the caller graph for this function:

ilObjGlossary::getShowTaxonomy ( )

Get show taxonomy.

Returns
bool show taxonomy

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

Referenced by update().

{
return $this->show_tax;
}

+ Here is the caller graph for this function:

ilObjGlossary::getSnippetLength ( )

Get snippet length.

Returns
int snippet length

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

Referenced by cloneObject(), and update().

{
return $this->snippet_length;
}

+ Here is the caller graph for this function:

ilObjGlossary::getStyleSheetId ( )

Get ID of assigned style sheet object.

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

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

{
return $this->style_id;
}

+ Here is the caller graph for this function:

ilObjGlossary::getTaxonomyId ( )

Get taxonomy.

Returns
int taxononmy ID

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

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

Referenced by cloneObject().

{
include_once("./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
$tax_ids = ilObjTaxonomy::getUsageOfObject($this->getId());
if (count($tax_ids) > 0)
{
// glossaries handle max. one taxonomy
return $tax_ids[0];
}
return 0;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjGlossary::getTermList (   $searchterm = "",
  $a_letter = "",
  $a_def = "",
  $a_tax_node = 0,
  $a_include_offline_childs = false,
  $a_add_amet_fields = false,
  $a_amet_filter = "" 
)

Get term list.

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

References getAllGlossaryIds().

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

{
$glo_ids = $this->getAllGlossaryIds($a_include_offline_childs);
$list = ilGlossaryTerm::getTermList($glo_ids, $searchterm, $a_letter, $a_def, $a_tax_node,
$a_add_amet_fields, $a_amet_filter);
return $list;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjGlossary::getTitle ( )

get title of glossary object

Returns
string title

Reimplemented from ilObject.

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

Referenced by cloneObject(), and exportHTMLGlossaryTerms().

{
return parent::getTitle();
}

+ Here is the caller graph for this function:

ilObjGlossary::getVirtualMode ( )

get glossary type (normal or virtual)

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

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

{
return $this->virtual_mode;
}

+ Here is the caller graph for this function:

ilObjGlossary::getXMLZip ( )

Get zipped xml file for glossary.

Reimplemented from ilObject.

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

{
include_once("./Modules/Glossary/classes/class.ilGlossaryExport.php");
$glo_exp = new ilGlossaryExport($this);
return $glo_exp->buildExportFile();
}
ilObjGlossary::ilObjGlossary (   $a_id = 0,
  $a_call_by_reference = true 
)

Constructor public.

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

References ilObject\ilObject().

{
$this->type = "glo";
$this->ilObject($a_id,$a_call_by_reference);
}

+ Here is the call graph for this function:

ilObjGlossary::isActiveDownloads ( )

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

Referenced by update().

{
return $this->downloads_active;
}

+ Here is the caller graph for this function:

ilObjGlossary::isActiveGlossaryMenu ( )

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

Referenced by update().

{
return $this->glo_menu_active;
}

+ Here is the caller graph for this function:

ilObjGlossary::isVirtual ( )

returns true if glossary type is virtual (any mode)

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

Referenced by delete(), and getAllGlossaryIds().

{
return $this->virtual;
}

+ Here is the caller graph for this function:

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

Lookup glossary property.

Parameters
intglossary id
stringproperty

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

Referenced by lookupSnippetLength().

{
global $ilDB;
$set = $ilDB->query("SELECT $a_property FROM glossary WHERE id = ".
$ilDB->quote($a_id, "integer"));
$rec = $ilDB->fetchAssoc($set);
return $rec[$a_property];
}

+ Here is the caller graph for this function:

static ilObjGlossary::lookupSnippetLength (   $a_id)
static

Lookup snippet length.

Parameters
intglossary id
Returns
int snippet length

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

References lookup().

Referenced by ilGlossaryDefinition\shortenShortText().

{
return ilObjGlossary::lookup($a_id, "snippet_length");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

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

References ilObject\getId().

{
if ($a_tag == "Identifier" && $a_param == "Entry")
{
$a_value = "il_".IL_INST_ID."_glo_".$this->getId();
}
return $a_value;
}

+ Here is the call graph for this function:

ilObjGlossary::notify (   $a_event,
  $a_ref_id,
  $a_parent_non_rbac_id,
  $a_node_id,
  $a_params = 0 
)

notifys an object about an event occured Based on the event happend, each object may decide how it reacts.

public

Parameters
stringevent
integerreference id of object where the event occured
arraypasses optional paramters if required
Returns
boolean

Reimplemented from ilObject.

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

References $_GET, and ilObject\getType().

{
global $tree;
switch ($a_event)
{
case "link":
//var_dump("<pre>",$a_params,"</pre>");
//echo "Glossary ".$this->getRefId()." triggered by link event. Objects linked into target object ref_id: ".$a_ref_id;
//exit;
break;
case "cut":
//echo "Glossary ".$this->getRefId()." triggered by cut event. Objects are removed from target object ref_id: ".$a_ref_id;
//exit;
break;
case "copy":
//var_dump("<pre>",$a_params,"</pre>");
//echo "Glossary ".$this->getRefId()." triggered by copy event. Objects are copied into target object ref_id: ".$a_ref_id;
//exit;
break;
case "paste":
//echo "Glossary ".$this->getRefId()." triggered by paste (cut) event. Objects are pasted into target object ref_id: ".$a_ref_id;
//exit;
break;
case "new":
//echo "Glossary ".$this->getRefId()." triggered by paste (new) event. Objects are applied to target object ref_id: ".$a_ref_id;
//exit;
break;
}
// At the beginning of the recursive process it avoids second call of the notify function with the same parameter
if ($a_node_id==$_GET["ref_id"])
{
$parent_obj =& $this->ilias->obj_factory->getInstanceByRefId($a_node_id);
$parent_type = $parent_obj->getType();
if($parent_type == $this->getType())
{
$a_node_id = (int) $tree->getParentId($a_node_id);
}
}
parent::notify($a_event,$a_ref_id,$a_parent_non_rbac_id,$a_node_id,$a_params);
}

+ Here is the call graph for this function:

ilObjGlossary::read ( )

read data of content object

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

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

{
global $ilDB;
# echo "Glossary<br>\n";
$q = "SELECT * FROM glossary WHERE id = ".
$ilDB->quote($this->getId(), "integer");
$gl_set = $ilDB->query($q);
$gl_rec = $ilDB->fetchAssoc($gl_set);
$this->setOnline(ilUtil::yn2tf($gl_rec["is_online"]));
$this->setVirtualMode($gl_rec["virtual"]);
$this->setPublicExportFile("xml", $gl_rec["public_xml_file"]);
$this->setPublicExportFile("html", $gl_rec["public_html_file"]);
$this->setActiveGlossaryMenu(ilUtil::yn2tf($gl_rec["glo_menu_active"]));
$this->setActiveDownloads(ilUtil::yn2tf($gl_rec["downloads_active"]));
$this->setPresentationMode($gl_rec["pres_mode"]);
$this->setSnippetLength($gl_rec["snippet_length"]);
$this->setShowTaxonomy($gl_rec["show_tax"]);
include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
}

+ Here is the call graph for this function:

ilObjGlossary::removeOfflineGlossaries (   $a_glo_ids)

Remove offline glossaries from obj id array.

Parameters
@return

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

Referenced by getAllGlossaryIds().

{
global $ilDB;
$set = $ilDB->query("SELECT id FROM glossary ".
" WHERE ".$ilDB->in("id", $a_glo_ids, false, "integer").
" AND is_online = ".$ilDB->quote("y", "text")
);
$glo_ids = array();
while ($rec = $ilDB->fetchAssoc($set))
{
$glo_ids[] = $rec["id"];
}
return $glo_ids;
}

+ Here is the caller graph for this function:

ilObjGlossary::setActiveDownloads (   $a_down)

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

Referenced by read().

{
$this->downloads_active = $a_down;
}

+ Here is the caller graph for this function:

ilObjGlossary::setActiveGlossaryMenu (   $a_act_glo_menu)

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

Referenced by read().

{
$this->glo_menu_active = $a_act_glo_menu;
}

+ Here is the caller graph for this function:

ilObjGlossary::setDescription (   $a_description)

set description of glossary object

Reimplemented from ilObject.

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

{
parent::setDescription($a_description);
}
ilObjGlossary::setOnline (   $a_online)

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

Referenced by read().

{
$this->online = $a_online;
}

+ Here is the caller graph for this function:

ilObjGlossary::setPresentationMode (   $a_val)

Set presentation mode.

Parameters
stringpresentation mode

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

Referenced by create(), and read().

{
$this->pres_mode = $a_val;
}

+ Here is the caller graph for this function:

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 507 of file class.ilObjGlossary.php.

Referenced by read().

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

+ Here is the caller graph for this function:

ilObjGlossary::setShowTaxonomy (   $a_val)

Set show taxonomy.

Parameters
bool$a_valshow taxonomy

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

Referenced by read().

{
$this->show_tax = $a_val;
}

+ Here is the caller graph for this function:

ilObjGlossary::setSnippetLength (   $a_val)

Set snippet length.

Parameters
intsnippet length

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

Referenced by create(), and read().

{
$this->snippet_length = $a_val;
}

+ Here is the caller graph for this function:

ilObjGlossary::setStyleSheetId (   $a_style_id)

Set ID of assigned style sheet object.

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

Referenced by read().

{
$this->style_id = $a_style_id;
}

+ Here is the caller graph for this function:

ilObjGlossary::setTitle (   $a_title)

set title of glossary object

Reimplemented from ilObject.

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

{
parent::setTitle($a_title);
// $this->meta_data->setTitle($a_title);
}
ilObjGlossary::setVirtualMode (   $a_mode)

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

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

Referenced by read().

{
switch ($a_mode)
{
case "level":
case "subtree":
// case "fixed":
$this->virtual_mode = $a_mode;
$this->virtual = true;
break;
default:
$this->virtual_mode = "none";
$this->virtual = false;
break;
}
}

+ Here is the caller graph for this function:

ilObjGlossary::update ( )

Update object.

Reimplemented from ilObject.

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

References ilObject\getId(), getPresentationMode(), getPublicExportFile(), getShowTaxonomy(), getSnippetLength(), getStyleSheetId(), getVirtualMode(), isActiveDownloads(), isActiveGlossaryMenu(), ilUtil\tf2yn(), ilObject\updateMetaData(), and ilObjStyleSheet\writeStyleUsage().

{
global $ilDB;
$this->updateMetaData();
$ilDB->manipulate("UPDATE glossary SET ".
" is_online = ".$ilDB->quote(ilUtil::tf2yn($this->getOnline()), "text").",".
" virtual = ".$ilDB->quote($this->getVirtualMode(), "text").",".
" public_xml_file = ".$ilDB->quote($this->getPublicExportFile("xml"), "text").",".
" public_html_file = ".$ilDB->quote($this->getPublicExportFile("html"), "text").",".
" glo_menu_active = ".$ilDB->quote(ilUtil::tf2yn($this->isActiveGlossaryMenu()), "text").",".
" downloads_active = ".$ilDB->quote(ilUtil::tf2yn($this->isActiveDownloads()), "text").", ".
" pres_mode = ".$ilDB->quote($this->getPresentationMode(), "text").", ".
" show_tax = ".$ilDB->quote((int) $this->getShowTaxonomy(), "integer").", ".
" snippet_length = ".$ilDB->quote($this->getSnippetLength(), "integer")." ".
" WHERE id = ".$ilDB->quote($this->getId(), "integer"));
include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
}

+ Here is the call graph for this function:


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