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

GUI class for glossary terms. More...

+ Collaboration diagram for ilGlossaryTermGUI:

Public Member Functions

 ilGlossaryTermGUI ($a_id=0)
 Constructor public.
 executeCommand ()
 execute command
 setOfflineDirectory ($offdir)
 set offline directory to offdir
 getOfflineDirectory ()
 get offline directory
 setGlossary ($a_glossary)
 setLinkXML ($a_link_xml)
 getLinkXML ()
 create ()
 form for new content object creation
 saveTerm ()
 save term
 editTerm ()
 Edit term.
 getEditTermForm ()
 Get edit term form.
 updateTerm ()
 update term
 getOverlayHTML ($a_close_el_id, $a_glo_ov_id="", $a_lang="", $a_outputmode="offline")
 Get overlay html.
 output ($a_offline=false, $a_tpl="", $a_outputmode="presentation")
 output glossary term definitions
 getInternalLinks ()
 get internal links
 listDefinitions ()
 list definitions
 confirmDefinitionDeletion ()
 deletion confirmation screen
 cancelDefinitionDeletion ()
 deleteDefinition ()
 moveUp ()
 move definition upwards
 moveDown ()
 move definition downwards
 addDefinition ()
 add definition
 cancel ()
 cancel adding definition
 saveDefinition ()
 save definition
 getTemplate ()
 get template
 setTabs ()
 output tabs
 displayLocator ()
 display locator
 getTabs (&$tabs_gui)
 get tabs
 _goto ($a_target, $a_ref_id="")
 redirect script
 listUsages ()
 List usage.
 quickList ()
 Set quick term list cmd into left navigation URL.

Data Fields

 $ilias
 $lng
 $tpl
 $glossary
 $term
 $link_xml

Detailed Description

GUI class for glossary terms.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
Id:
class.ilGlossaryTermGUI.php 58647 2015-04-03 16:41:17Z gitmgr

ilGlossaryTermGUI: ilTermDefinitionEditorGUI, ilGlossaryDefPageGUI, ilPropertyFormGUI

Definition at line 17 of file class.ilGlossaryTermGUI.php.

Member Function Documentation

ilGlossaryTermGUI::_goto (   $a_target,
  $a_ref_id = "" 
)

redirect script

Parameters
string$a_target

Definition at line 715 of file class.ilGlossaryTermGUI.php.

References $_GET, $ilErr, $lng, $ref_id, ilObject\_getAllReferences(), ilObjectGUI\_gotoRepositoryRoot(), ilGlossaryTerm\_lookGlossaryID(), ilObject\_lookupTitle(), exit, and ilUtil\sendFailure().

{
global $rbacsystem, $ilErr, $lng, $ilAccess;
$glo_id = ilGlossaryTerm::_lookGlossaryID($a_target);//::_lookupContObjID($a_target);
// get all references
if ($a_ref_id > 0)
{
$ref_ids = array($a_ref_id);
}
else
{
$ref_ids = ilObject::_getAllReferences($glo_id);
}
// check read permissions
foreach ($ref_ids as $ref_id)
{
// Permission check
if ($ilAccess->checkAccess("read", "", $ref_id))
{
$_GET["baseClass"] = "ilGlossaryPresentationGUI";
$_GET["term_id"] = $a_target;
$_GET["ref_id"] = $ref_id;
$_GET["cmd"] = "listDefinitions";
include_once("ilias.php");
}
}
if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID))
{
ilUtil::sendFailure(sprintf($lng->txt("msg_no_perm_read_item"),
ilObject::_lookupTitle($glo_id)), true);
}
$ilErr->raiseError($lng->txt("msg_no_perm_read_lm"), $ilErr->FATAL);
}

+ Here is the call graph for this function:

ilGlossaryTermGUI::addDefinition ( )

add definition

Definition at line 583 of file class.ilGlossaryTermGUI.php.

References displayLocator(), ilUtil\getImagePath(), getTemplate(), ilFormPropertyGUI\setRequired(), and setTabs().

{
global $ilTabs;
$this->getTemplate();
$this->displayLocator();
$this->setTabs();
$ilTabs->activateTab("definitions");
$this->tpl->setTitle($this->lng->txt("cont_term").": ".$this->term->getTerm());
$this->tpl->setTitleIcon(ilUtil::getImagePath("icon_term_b.png"));
include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this, "saveDefinition"));
$form->setTitle($this->lng->txt("gdf_new"));
$title = new ilTextInputGUI($this->lng->txt("title"), "title");
$title->setRequired(true);
$form->addItem($title);
$desc = new ilTextAreaInputGUI($this->lng->txt("description"), "desc");
$form->addItem($desc);
$form->addCommandButton("saveDefinition", $this->lng->txt("gdf_add"));
$form->addCommandButton("cancel", $this->lng->txt("cancel"));
$this->tpl->setContent($form->getHTML());
}

+ Here is the call graph for this function:

ilGlossaryTermGUI::cancel ( )

cancel adding definition

Definition at line 616 of file class.ilGlossaryTermGUI.php.

{
$this->ctrl->redirect($this, "listDefinitions");
}
ilGlossaryTermGUI::cancelDefinitionDeletion ( )

Definition at line 544 of file class.ilGlossaryTermGUI.php.

{
$this->ctrl->redirect($this, "listDefinitions");
}
ilGlossaryTermGUI::confirmDefinitionDeletion ( )

deletion confirmation screen

Definition at line 493 of file class.ilGlossaryTermGUI.php.

References $_GET, displayLocator(), ilObjStyleSheet\getContentStylePath(), ilUtil\getImagePath(), ilObjStyleSheet\getSyntaxStylePath(), getTemplate(), ilUtil\sendQuestion(), setTabs(), and ilPageObjectGUI\setTemplateOutput().

{
global $ilTabs;
$this->getTemplate();
$this->displayLocator();
$this->setTabs();
$ilTabs->activateTab("definitions");
// content style
$this->tpl->setCurrentBlock("ContentStyle");
$this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
ilObjStyleSheet::getContentStylePath($this->glossary->getStyleSheetId()));
$this->tpl->parseCurrentBlock();
// syntax style
$this->tpl->setCurrentBlock("SyntaxStyle");
$this->tpl->setVariable("LOCATION_SYNTAX_STYLESHEET",
$this->tpl->parseCurrentBlock();
$this->tpl->setTitle(
$this->lng->txt("cont_term").": ".$this->term->getTerm());
$this->tpl->setTitleIcon(ilUtil::getImagePath("icon_term_b.png"));
$this->tpl->addBlockfile("ADM_CONTENT", "def_list", "tpl.glossary_definition_delete.html", true);
ilUtil::sendQuestion($this->lng->txt("info_delete_sure"));
$this->tpl->setVariable("TXT_TERM", $this->term->getTerm());
$definition =& new ilGlossaryDefinition($_GET["def"]);
$page_gui = new ilGlossaryDefPageGUI($definition->getId());
$page_gui->setTemplateOutput(false);
$page_gui->setStyleId($this->glossary->getStyleSheetId());
$page_gui->setSourcecodeDownloadScript("ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=".$_GET["ref_id"]);
$page_gui->setFileDownloadLink("ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=".$_GET["ref_id"]);
$page_gui->setFullscreenLink("ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=".$_GET["ref_id"]);
$output = $page_gui->preview();
$this->tpl->setCurrentBlock("definition");
$this->tpl->setVariable("PAGE_CONTENT", $output);
$this->tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
$this->tpl->setVariable("LINK_CANCEL",
$this->ctrl->getLinkTarget($this, "cancelDefinitionDeletion"));
$this->tpl->setVariable("TXT_CONFIRM", $this->lng->txt("confirm"));
$this->ctrl->setParameter($this, "def", $definition->getId());
$this->tpl->setVariable("LINK_CONFIRM",
$this->ctrl->getLinkTarget($this, "deleteDefinition"));
$this->tpl->parseCurrentBlock();
}

+ Here is the call graph for this function:

ilGlossaryTermGUI::create ( )

form for new content object creation

Definition at line 113 of file class.ilGlossaryTermGUI.php.

{
// deprecated
}
ilGlossaryTermGUI::deleteDefinition ( )

Definition at line 550 of file class.ilGlossaryTermGUI.php.

References $_GET.

{
$definition =& new ilGlossaryDefinition($_GET["def"]);
$definition->delete();
$this->ctrl->redirect($this, "listDefinitions");
}
ilGlossaryTermGUI::displayLocator ( )

display locator

Definition at line 657 of file class.ilGlossaryTermGUI.php.

Referenced by addDefinition(), confirmDefinitionDeletion(), editTerm(), listDefinitions(), and listUsages().

{
require_once ("./Modules/Glossary/classes/class.ilGlossaryLocatorGUI.php");
$gloss_loc =& new ilGlossaryLocatorGUI();
$gloss_loc->setTerm($this->term);
$gloss_loc->setGlossary($this->glossary);
//$gloss_loc->setDefinition($this->definition);
$gloss_loc->display();
}

+ Here is the caller graph for this function:

ilGlossaryTermGUI::editTerm ( )

Edit term.

Definition at line 130 of file class.ilGlossaryTermGUI.php.

References $ilCtrl, displayLocator(), getEditTermForm(), ilUtil\getImagePath(), getTemplate(), quickList(), and setTabs().

{
global $ilTabs, $ilCtrl;
$this->getTemplate();
$this->displayLocator();
$this->setTabs();
$ilTabs->activateTab("properties");
$this->tpl->setTitle($this->lng->txt("cont_term").": ".$this->term->getTerm());
$this->tpl->setTitleIcon(ilUtil::getImagePath("icon_term_b.png"));
$form = $this->getEditTermForm();
$this->tpl->setContent($ilCtrl->getHTML($form));
$this->quickList();
}

+ Here is the call graph for this function:

ilGlossaryTermGUI::executeCommand ( )

execute command

Definition at line 49 of file class.ilGlossaryTermGUI.php.

References $cmd, $ret, getEditTermForm(), and quickList().

{
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd();
switch ($next_class)
{
case "iltermdefinitioneditorgui":
//$this->ctrl->setReturn($this, "listDefinitions");
$def_edit =& new ilTermDefinitionEditorGUI();
//$ret =& $def_edit->executeCommand();
$ret =& $this->ctrl->forwardCommand($def_edit);
$this->quickList("edit", $def_edit);
break;
case "ilpropertyformgui";
$form = $this->getEditTermForm();
$this->ctrl->forwardCommand($form);
break;
default:
$ret =& $this->$cmd();
break;
}
}

+ Here is the call graph for this function:

ilGlossaryTermGUI::getEditTermForm ( )

Get edit term form.

Parameters
@return

Definition at line 155 of file class.ilGlossaryTermGUI.php.

References $ilCtrl, $lang, $term, ilMDLanguageItem\_getLanguages(), ilTaxNodeAssignment\getAssignmentsOfItem(), ilAdvancedMDRecordGUI\MODE_EDITOR, and ilAdvancedMDRecordGUI\setPropertyForm().

Referenced by editTerm(), and executeCommand().

{
global $ilTabs, $ilCtrl;
include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this, "updateTerm"));
$form->setTitle($this->lng->txt("cont_edit_term"));
$term = new ilTextInputGUI($this->lng->txt("cont_term"), "term");
$term->setRequired(true);
$term->setValue($this->term->getTerm());
$form->addItem($term);
$lang = new ilSelectInputGUI($this->lng->txt("language"), "term_language");
$lang->setRequired(true);
$lang->setValue($this->term->getLanguage());
$form->addItem($lang);
// taxonomy
if ($this->glossary->getTaxonomyId() > 0)
{
include_once("./Services/Taxonomy/classes/class.ilTaxSelectInputGUI.php");
$tax_node_assign = new ilTaxSelectInputGUI($this->glossary->getTaxonomyId(), "tax_node", true);
include_once("./Services/Taxonomy/classes/class.ilTaxNodeAssignment.php");
$ta = new ilTaxNodeAssignment("glo", $this->glossary->getId(), "term", $this->glossary->getTaxonomyId());
$assgnmts = $ta->getAssignmentsOfItem($this->term->getId());
$node_ids = array();
foreach ($assgnmts as $a)
{
$node_ids[] = $a["node_id"];
}
$tax_node_assign->setValue($node_ids);
$form->addItem($tax_node_assign);
}
// advanced metadata
include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
$record_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_EDITOR,'glo',$this->glossary->getId(),'term',
$this->term->getId());
$record_gui->setPropertyForm($form);
$record_gui->setSelectedOnly(true);
$record_gui->parse();
$form->addCommandButton("updateTerm", $this->lng->txt("save"));
return $form;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilGlossaryTermGUI::getInternalLinks ( )

get internal links

Definition at line 362 of file class.ilGlossaryTermGUI.php.

References ilGlossaryDefinition\getDefinitionList().

{
require_once("./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
require_once("./Modules/Glossary/classes/class.ilGlossaryDefPageGUI.php");
$defs = ilGlossaryDefinition::getDefinitionList($this->term->getId());
$term_links = array();
for($j=0; $j<count($defs); $j++)
{
$def = $defs[$j];
$page = new ilGlossaryDefPage($def["id"]);
$page->buildDom();
$page_links = $page->getInternalLinks();
foreach($page_links as $key => $page_link)
{
$term_links[$key] = $page_link;
}
}
return $term_links;
}

+ Here is the call graph for this function:

ilGlossaryTermGUI::getLinkXML ( )

Definition at line 105 of file class.ilGlossaryTermGUI.php.

References $link_xml.

Referenced by output().

{
}

+ Here is the caller graph for this function:

ilGlossaryTermGUI::getOfflineDirectory ( )

get offline directory

Returns
directory where to store offline files

Definition at line 90 of file class.ilGlossaryTermGUI.php.

Referenced by output().

{
return $this->offline_directory;
}

+ Here is the caller graph for this function:

ilGlossaryTermGUI::getOverlayHTML (   $a_close_el_id,
  $a_glo_ov_id = "",
  $a_lang = "",
  $a_outputmode = "offline" 
)

Get overlay html.

Parameters
@return

Definition at line 253 of file class.ilGlossaryTermGUI.php.

References $lng, $tpl, and output().

{
global $lng;
if ($a_lang == "")
{
$a_lang = $lng->getLangKey();
}
$tpl = new ilTemplate("tpl.glossary_overlay.html", true, true, "Modules/Glossary");
// $this->output(true, $tpl);
if ($a_outputmode == "preview")
{
$a_outputmode = "presentation";
}
if ($a_outputmode == "offline")
{
$this->output(true, $tpl, $a_outputmode);
}
else
{
$this->output(false, $tpl, $a_outputmode);
}
if ($a_glo_ov_id != "")
{
$tpl->setCurrentBlock("glovlink");
$tpl->setVariable("TXT_LINK", $lng->txtlng("content", "cont_sco_glossary", $a_lang));
$tpl->setVariable("ID_LINK", $a_glo_ov_id);
$tpl->parseCurrentBlock();
}
$tpl->setVariable("TXT_CLOSE", $lng->txtlng("common", "close", $a_lang));
$tpl->setVariable("ID_CLOSE", $a_close_el_id);
return $tpl->get();
}

+ Here is the call graph for this function:

ilGlossaryTermGUI::getTabs ( $tabs_gui)

get tabs

Definition at line 671 of file class.ilGlossaryTermGUI.php.

References $_GET, $lng, and ilGlossaryTerm\getNumberOfUsages().

Referenced by setTabs().

{
global $lng, $ilHelp;
$ilHelp->setScreenIdComponent("glo_term");
//echo ":".$_GET["term_id"].":";
if ($_GET["term_id"] != "")
{
$tabs_gui->addTab("properties",
$lng->txt("properties"),
$this->ctrl->getLinkTarget($this, "editTerm"));
$tabs_gui->addTab("definitions",
$lng->txt("cont_definitions"),
$this->ctrl->getLinkTarget($this, "listDefinitions"));
$tabs_gui->addTab("usage",
$lng->txt("cont_usage")." (".ilGlossaryTerm::getNumberOfUsages($_GET["term_id"]).")",
$this->ctrl->getLinkTarget($this, "listUsages"));
$tabs_gui->addNonTabbedLink("presentation_view",
$this->lng->txt("glo_presentation_view"),
ILIAS_HTTP_PATH.
"/goto.php?target=".
"git".
"_".$_GET["term_id"]."_".$_GET["ref_id"]."&client_id=".CLIENT_ID,
"_top"
);
}
// back to glossary
$tabs_gui->setBackTarget($this->lng->txt("glossary"),
$this->ctrl->getLinkTargetByClass("ilobjglossarygui", "listTerms"));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilGlossaryTermGUI::getTemplate ( )

get template

Definition at line 639 of file class.ilGlossaryTermGUI.php.

Referenced by addDefinition(), confirmDefinitionDeletion(), editTerm(), listDefinitions(), and listUsages().

{
$this->tpl->addBlockFile("CONTENT", "content", "tpl.adm_content.html");
$this->tpl->addBlockFile("STATUSLINE", "statusline", "tpl.statusline.html");
}

+ Here is the caller graph for this function:

ilGlossaryTermGUI::ilGlossaryTermGUI (   $a_id = 0)

Constructor public.

Definition at line 30 of file class.ilGlossaryTermGUI.php.

References $ilCtrl, $ilias, $lng, and $tpl.

{
global $lng, $ilias, $tpl, $ilCtrl;
$this->lng =& $lng;
$this->ilias =& $ilias;
$this->tpl =& $tpl;
$this->ctrl =& $ilCtrl;
$this->ctrl->saveParameter($this, array("term_id"));
if($a_id != 0)
{
$this->term =& new ilGlossaryTerm($a_id);
}
}
ilGlossaryTermGUI::listDefinitions ( )

list definitions

Definition at line 388 of file class.ilGlossaryTermGUI.php.

References $_GET, displayLocator(), ilObjStyleSheet\getContentStylePath(), ilGlossaryDefinition\getDefinitionList(), ilUtil\getImagePath(), ilObjStyleSheet\getSyntaxStylePath(), getTemplate(), quickList(), and setTabs().

{
global $ilTabs;
$this->getTemplate();
$this->displayLocator();
$this->setTabs();
$ilTabs->activateTab("definitions");
require_once("./Modules/Glossary/classes/class.ilGlossaryDefPageGUI.php");
// content style
$this->tpl->setCurrentBlock("ContentStyle");
$this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
ilObjStyleSheet::getContentStylePath($this->glossary->getStyleSheetId()));
$this->tpl->parseCurrentBlock();
// syntax style
$this->tpl->setCurrentBlock("SyntaxStyle");
$this->tpl->setVariable("LOCATION_SYNTAX_STYLESHEET",
$this->tpl->parseCurrentBlock();
// load template for table
$this->tpl->addBlockfile("ADM_CONTENT", "def_list", "tpl.glossary_definition_list.html", true);
//$this->tpl->addBlockfile("CONTENT", "def_list", "tpl.glossary_definition_list.html", true);
//ilUtil::sendInfo();
$this->tpl->addBlockfile("STATUSLINE", "statusline", "tpl.statusline.html");
$this->tpl->setTitle(
$this->lng->txt("cont_term").": ".$this->term->getTerm());
$this->tpl->setTitleIcon(ilUtil::getImagePath("icon_term_b.png"));
$this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
$this->tpl->setCurrentBlock("add_def");
$this->tpl->setVariable("TXT_ADD_DEFINITION",
$this->lng->txt("cont_add_definition"));
$this->tpl->setVariable("BTN_ADD", "addDefinition");
$this->tpl->parseCurrentBlock();
$this->tpl->setCurrentBlock("def_list");
$this->tpl->setVariable("TXT_TERM", $this->term->getTerm());
for($j=0; $j<count($defs); $j++)
{
$def = $defs[$j];
$page_gui = new ilGlossaryDefPageGUI($def["id"]);
$page_gui->setStyleId($this->glossary->getStyleSheetId());
$page_gui->setSourcecodeDownloadScript("ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=".$_GET["ref_id"]);
$page_gui->setTemplateOutput(false);
$output = $page_gui->preview();
if (count($defs) > 1)
{
$this->tpl->setCurrentBlock("definition_header");
$this->tpl->setVariable("TXT_DEFINITION",
$this->lng->txt("cont_definition")." ".($j+1));
$this->tpl->parseCurrentBlock();
}
if ($j > 0)
{
$this->tpl->setCurrentBlock("up");
$this->tpl->setVariable("TXT_UP", $this->lng->txt("up"));
$this->ctrl->setParameter($this, "def", $def["id"]);
$this->tpl->setVariable("LINK_UP",
$this->ctrl->getLinkTarget($this, "moveUp"));
$this->tpl->parseCurrentBlock();
}
if ($j+1 < count($defs))
{
$this->tpl->setCurrentBlock("down");
$this->tpl->setVariable("TXT_DOWN", $this->lng->txt("down"));
$this->ctrl->setParameter($this, "def", $def["id"]);
$this->tpl->setVariable("LINK_DOWN",
$this->ctrl->getLinkTarget($this, "moveDown"));
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("submit_btns");
$this->tpl->setVariable("TXT_EDIT", $this->lng->txt("edit"));
$this->ctrl->setParameter($this, "def", $def["id"]);
$this->ctrl->setParameterByClass("ilTermDefinitionEditorGUI", "def", $def["id"]);
$this->tpl->setVariable("LINK_EDIT",
$this->ctrl->getLinkTargetByClass(array("ilTermDefinitionEditorGUI", "ilGlossaryDefPageGUI"), "edit"));
$this->tpl->setVariable("TXT_DELETE", $this->lng->txt("delete"));
$this->tpl->setVariable("LINK_DELETE",
$this->ctrl->getLinkTarget($this, "confirmDefinitionDeletion"));
$this->tpl->parseCurrentBlock();
$this->tpl->setCurrentBlock("definition");
$this->tpl->setVariable("PAGE_CONTENT", $output);
$this->tpl->parseCurrentBlock();
}
//$this->tpl->setCurrentBlock("def_list");
//$this->tpl->parseCurrentBlock();
$this->quickList();
}

+ Here is the call graph for this function:

ilGlossaryTermGUI::listUsages ( )

List usage.

Definition at line 759 of file class.ilGlossaryTermGUI.php.

References $_GET, $tab, $tpl, displayLocator(), ilUtil\getImagePath(), getTemplate(), quickList(), and setTabs().

{
global $ilTabs, $tpl;
//$this->displayLocator();
$this->getTemplate();
$this->displayLocator();
$this->setTabs();
$ilTabs->activateTab("usage");
$this->tpl->setTitle($this->lng->txt("cont_term").": ".$this->term->getTerm());
$this->tpl->setTitleIcon(ilUtil::getImagePath("icon_term_b.png"));
include_once("./Modules/Glossary/classes/class.ilTermUsagesTableGUI.php");
$tab = new ilTermUsagesTableGUI($this, "listUsages", $_GET["term_id"]);
$tpl->setContent($tab->getHTML());
$this->quickList();
}

+ Here is the call graph for this function:

ilGlossaryTermGUI::moveDown ( )

move definition downwards

Definition at line 572 of file class.ilGlossaryTermGUI.php.

References $_GET.

{
$definition =& new ilGlossaryDefinition($_GET["def"]);
$definition->moveDown();
$this->ctrl->redirect($this, "listDefinitions");
}
ilGlossaryTermGUI::moveUp ( )

move definition upwards

Definition at line 561 of file class.ilGlossaryTermGUI.php.

References $_GET.

{
$definition =& new ilGlossaryDefinition($_GET["def"]);
$definition->moveUp();
$this->ctrl->redirect($this, "listDefinitions");
}
ilGlossaryTermGUI::output (   $a_offline = false,
  $a_tpl = "",
  $a_outputmode = "presentation" 
)

output glossary term definitions

used in ilLMPresentationGUI->ilGlossary()

Definition at line 293 of file class.ilGlossaryTermGUI.php.

References $_GET, $tpl, ilGlossaryDefinition\getDefinitionList(), getLinkXML(), getOfflineDirectory(), and ilUtil\includeMathjax().

Referenced by getOverlayHTML().

{
if ($a_tpl != "")
{
$tpl = $a_tpl;
}
else
{
}
require_once("./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
require_once("./Modules/Glossary/classes/class.ilGlossaryDefPageGUI.php");
$defs = ilGlossaryDefinition::getDefinitionList($this->term->getId());
$tpl->setVariable("TXT_TERM", $this->term->getTerm());
for($j=0; $j<count($defs); $j++)
{
$def = $defs[$j];
$page_gui = new ilGlossaryDefPageGUI($def["id"]);
$page_gui->setSourcecodeDownloadScript("ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=".$_GET["ref_id"]);
if (!$a_offline)
{
//$page_gui->setFullscreenLink(
// "ilias.php?baseClass=ilGlossaryPresentationGUI&cmd=fullscreen&ref_id=".$_GET["ref_id"]);
}
else
{
$page_gui->setFullscreenLink("fullscreen.html"); // id is set by xslt
}
$page_gui->setFileDownloadLink("ilias.php?baseClass=ilGlossaryPresentationGUI&amp;cmd=downloadFile&amp;ref_id=".$_GET["ref_id"]);
if (!$a_offline)
{
$page_gui->setOutputMode($a_outputmode);
}
else
{
$page_gui->setOutputMode("offline");
$page_gui->setOfflineDirectory($this->getOfflineDirectory());
}
//$page_gui->setOutputMode("edit");
//$page_gui->setPresentationTitle($this->term->getTerm());
$page_gui->setLinkXML($this->getLinkXML());
$page_gui->setTemplateOutput(false);
$output = $page_gui->presentation($page_gui->getOutputMode());
if (count($defs) > 1)
{
$tpl->setCurrentBlock("definition_header");
$tpl->setVariable("TXT_DEFINITION",
$this->lng->txt("cont_definition")." ".($j+1));
$tpl->parseCurrentBlock();
}
$tpl->setCurrentBlock("definition");
$tpl->setVariable("PAGE_CONTENT", $output);
$tpl->parseCurrentBlock();
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilGlossaryTermGUI::quickList ( )

Set quick term list cmd into left navigation URL.

Definition at line 783 of file class.ilGlossaryTermGUI.php.

References $ilCtrl, $tab, and $tpl.

Referenced by editTerm(), executeCommand(), listDefinitions(), and listUsages().

{
global $tpl, $ilCtrl;
//$tpl->setLeftNavUrl($ilCtrl->getLinkTarget($this, "showQuickList"));
include_once("./Modules/Glossary/classes/class.ilTermQuickListTableGUI.php");
$tab = new ilTermQuickListTableGUI($this, "editTerm");
$tpl->setLeftNavContent($tab->getHTML());
}

+ Here is the caller graph for this function:

ilGlossaryTermGUI::saveDefinition ( )

save definition

Definition at line 624 of file class.ilGlossaryTermGUI.php.

References $_GET, $_POST, and ilUtil\stripSlashes().

{
$def =& new ilGlossaryDefinition();
$def->setTermId($_GET["term_id"]);
$def->setTitle(ilUtil::stripSlashes($_POST["title"]));#"content object ".$newObj->getId()); // set by meta_gui->save
$def->setDescription(ilUtil::stripSlashes($_POST["desc"])); // set by meta_gui->save
$def->create();
$this->ctrl->redirect($this, "listDefinitions");
}

+ Here is the call graph for this function:

ilGlossaryTermGUI::saveTerm ( )

save term

Definition at line 121 of file class.ilGlossaryTermGUI.php.

{
// deprecated
}
ilGlossaryTermGUI::setGlossary (   $a_glossary)

Definition at line 95 of file class.ilGlossaryTermGUI.php.

{
$this->glossary = $a_glossary;
}
ilGlossaryTermGUI::setLinkXML (   $a_link_xml)

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

{
$this->link_xml = $a_link_xml;
}
ilGlossaryTermGUI::setOfflineDirectory (   $offdir)

set offline directory to offdir

Parameters
offdircontains diretory where to store files

Definition at line 81 of file class.ilGlossaryTermGUI.php.

{
$this->offline_directory = $offdir;
}
ilGlossaryTermGUI::setTabs ( )

output tabs

Definition at line 648 of file class.ilGlossaryTermGUI.php.

References getTabs().

Referenced by addDefinition(), confirmDefinitionDeletion(), editTerm(), listDefinitions(), and listUsages().

{
global $ilTabs;
$this->getTabs($ilTabs);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilGlossaryTermGUI::updateTerm ( )

update term

Definition at line 213 of file class.ilGlossaryTermGUI.php.

References $_POST, ilTaxNodeAssignment\deleteAssignmentsOfItem(), ilAdvancedMDRecordGUI\loadFromPost(), ilAdvancedMDRecordGUI\MODE_EDITOR, ilUtil\sendSuccess(), and ilUtil\stripSlashes().

{
// update term
$this->term->setTerm(ilUtil::stripSlashes($_POST["term"]));
$this->term->setLanguage($_POST["term_language"]);
$this->term->update();
// update taxonomy assignment
if ($this->glossary->getTaxonomyId() > 0)
{
include_once("./Services/Taxonomy/classes/class.ilTaxNodeAssignment.php");
$ta = new ilTaxNodeAssignment("glo", $this->glossary->getId(), "term", $this->glossary->getTaxonomyId());
$ta->deleteAssignmentsOfItem($this->term->getId());
if (is_array($_POST["tax_node"]))
{
foreach ($_POST["tax_node"] as $node_id)
{
$ta->addAssignment($node_id, $this->term->getId());
}
}
}
// advanced metadata
include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
'glo',$this->glossary->getId(),'term', $this->term->getId());
$record_gui->loadFromPost();
$record_gui->saveValues();
ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"),true);
$this->ctrl->redirect($this, "editTerm");
}

+ Here is the call graph for this function:

Field Documentation

ilGlossaryTermGUI::$glossary

Definition at line 22 of file class.ilGlossaryTermGUI.php.

ilGlossaryTermGUI::$ilias

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

Referenced by ilGlossaryTermGUI().

ilGlossaryTermGUI::$link_xml

Definition at line 24 of file class.ilGlossaryTermGUI.php.

Referenced by getLinkXML().

ilGlossaryTermGUI::$lng

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

Referenced by _goto(), getOverlayHTML(), getTabs(), and ilGlossaryTermGUI().

ilGlossaryTermGUI::$term

Definition at line 23 of file class.ilGlossaryTermGUI.php.

Referenced by getEditTermForm().

ilGlossaryTermGUI::$tpl

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