5require_once(
"./Modules/Glossary/classes/class.ilGlossaryTerm.php");
 
   38                $this->ctrl->saveParameter($this, array(
"term_id"));
 
   51                $next_class = $this->ctrl->getNextClass($this);
 
   52                $cmd = $this->ctrl->getCmd();
 
   57                        case "iltermdefinitioneditorgui":
 
   61                                $ret =& $this->ctrl->forwardCommand($def_edit);
 
   65                        case "ilpropertyformgui";
 
   67                                $this->ctrl->forwardCommand($form);
 
   82                $this->offline_directory = $offdir;
 
   91                return $this->offline_directory;
 
   97                $this->glossary = $a_glossary;
 
  102                $this->link_xml = $a_link_xml;
 
  137                $ilTabs->activateTab(
"properties");
 
  139                $this->tpl->setTitle($this->lng->txt(
"cont_term").
": ".$this->term->getTerm());
 
  144                $this->tpl->setContent(
$ilCtrl->getHTML($form));
 
  159                include_once 
"Services/Form/classes/class.ilPropertyFormGUI.php";
 
  161                $form->setFormAction($this->ctrl->getFormAction($this, 
"updateTerm"));
 
  162                $form->setTitle($this->lng->txt(
"cont_edit_term"));
 
  165                $term->setRequired(
true);
 
  166                $term->setValue($this->term->getTerm());
 
  167                $form->addItem(
$term);
 
  170                $lang->setRequired(
true);
 
  172                $lang->setValue($this->term->getLanguage());
 
  173                $form->addItem(
$lang);
 
  176                if ($this->glossary->getTaxonomyId() > 0)
 
  178                        include_once(
"./Services/Taxonomy/classes/class.ilTaxSelectInputGUI.php");
 
  179                        $tax_node_assign = 
new ilTaxSelectInputGUI($this->glossary->getTaxonomyId(), 
"tax_node", 
true);
 
  181                        include_once(
"./Services/Taxonomy/classes/class.ilTaxNodeAssignment.php");
 
  182                        $ta = 
new ilTaxNodeAssignment(
"glo", $this->glossary->getId(), 
"term", $this->glossary->getTaxonomyId());
 
  183                        $assgnmts = $ta->getAssignmentsOfItem($this->term->getId());
 
  185                        foreach ($assgnmts as $a)
 
  187                                $node_ids[] = $a[
"node_id"];
 
  189                        $tax_node_assign->setValue($node_ids);
 
  191                        $form->addItem($tax_node_assign);
 
  196                include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
 
  198                        $this->term->getId());
 
  199                $this->record_gui->setPropertyForm($form);
 
  200                $this->record_gui->setSelectedOnly(
true);
 
  201                $this->record_gui->parse();
 
  203                $form->addCommandButton(
"updateTerm", $this->lng->txt(
"save"));
 
  217                $this->term->setLanguage(
$_POST[
"term_language"]);
 
  218                $this->term->update();
 
  221                if ($this->glossary->getTaxonomyId() > 0)
 
  223                        include_once(
"./Services/Taxonomy/classes/class.ilTaxNodeAssignment.php");
 
  224                        $ta = 
new ilTaxNodeAssignment(
"glo", $this->glossary->getId(), 
"term", $this->glossary->getTaxonomyId());
 
  225                        $ta->deleteAssignmentsOfItem($this->term->getId());
 
  226                        if (is_array(
$_POST[
"tax_node"]))
 
  228                                foreach (
$_POST[
"tax_node"] as $node_id)
 
  230                                        $ta->addAssignment($node_id, $this->term->getId());
 
  237                include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
 
  239                        'glo',$this->glossary->getId(),
'term', $this->term->getId());
 
  245                if($this->record_gui->importEditFormPostValues())
 
  247                        $this->record_gui->writeEditForm();
 
  251                $this->ctrl->redirect($this, 
"editTerm");
 
  260        function getOverlayHTML($a_close_el_id, $a_glo_ov_id = 
"", $a_lang = 
"", $a_outputmode = 
"offline")
 
  266                        $a_lang = 
$lng->getLangKey();
 
  269                $tpl = 
new ilTemplate(
"tpl.glossary_overlay.html", 
true, 
true, 
"Modules/Glossary");
 
  271                if ($a_outputmode == 
"preview")
 
  273                        $a_outputmode = 
"presentation";
 
  275                if ($a_outputmode == 
"offline")
 
  277                        $this->
output(
true, $tpl, $a_outputmode);
 
  281                        $this->
output(
false, $tpl, $a_outputmode);
 
  283                if ($a_glo_ov_id != 
"")
 
  285                        $tpl->setCurrentBlock(
"glovlink");
 
  286                        $tpl->setVariable(
"TXT_LINK", 
$lng->txtlng(
"content", 
"cont_sco_glossary", $a_lang));
 
  287                        $tpl->setVariable(
"ID_LINK", $a_glo_ov_id);
 
  288                        $tpl->parseCurrentBlock();
 
  290                $tpl->setVariable(
"TXT_CLOSE", 
$lng->txtlng(
"common", 
"close", $a_lang));
 
  291                $tpl->setVariable(
"ID_CLOSE", $a_close_el_id);
 
  300        function output($a_offline = 
false, $a_tpl = 
"", $a_outputmode = 
"presentation")
 
  311                require_once(
"./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
 
  312                require_once(
"./Modules/Glossary/classes/class.ilGlossaryDefPageGUI.php");
 
  316                $tpl->setVariable(
"TXT_TERM", $this->term->getTerm());
 
  318                for($j=0; $j<count($defs); $j++)
 
  322                        $page_gui->setSourcecodeDownloadScript(
"ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=".
$_GET[
"ref_id"]);
 
  330                                $page_gui->setFullscreenLink(
"fullscreen.html");        
 
  332                        $page_gui->setFileDownloadLink(
"ilias.php?baseClass=ilGlossaryPresentationGUI&cmd=downloadFile&ref_id=".
$_GET[
"ref_id"]);
 
  336                                $page_gui->setOutputMode($a_outputmode);
 
  340                                $page_gui->setOutputMode(
"offline");
 
  347                        $page_gui->setTemplateOutput(
false);
 
  348                        $output = $page_gui->presentation($page_gui->getOutputMode());
 
  350                        if (count($defs) > 1)
 
  352                                $tpl->setCurrentBlock(
"definition_header");
 
  353                                                $tpl->setVariable(
"TXT_DEFINITION",
 
  354                                $this->lng->txt(
"cont_definition").
" ".($j+1));
 
  355                                $tpl->parseCurrentBlock();
 
  360                        $tpl->setCurrentBlock(
"definition");
 
  361                        $tpl->setVariable(
"PAGE_CONTENT", $output);
 
  362                        $tpl->parseCurrentBlock();
 
  371                require_once(
"./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
 
  372                require_once(
"./Modules/Glossary/classes/class.ilGlossaryDefPageGUI.php");
 
  376                $term_links = array();
 
  377                for($j=0; $j<count($defs); $j++)
 
  382                        $page_links = $page->getInternalLinks();
 
  383                        foreach($page_links as $key => $page_link)
 
  385                                $term_links[$key] = $page_link;
 
  402                $ilTabs->activateTab(
"definitions");
 
  403                require_once(
"./Modules/Glossary/classes/class.ilGlossaryDefPageGUI.php");
 
  406                $this->tpl->setCurrentBlock(
"ContentStyle");
 
  407                $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
 
  409                $this->tpl->parseCurrentBlock();
 
  412                $this->tpl->setCurrentBlock(
"SyntaxStyle");
 
  413                $this->tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
 
  415                $this->tpl->parseCurrentBlock();
 
  418                $this->tpl->addBlockfile(
"ADM_CONTENT", 
"def_list", 
"tpl.glossary_definition_list.html", 
true);
 
  421                $this->tpl->addBlockfile(
"STATUSLINE", 
"statusline", 
"tpl.statusline.html");
 
  422                $this->tpl->setTitle(
 
  423                        $this->lng->txt(
"cont_term").
": ".$this->term->getTerm());
 
  426                $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
 
  428                $this->tpl->setCurrentBlock(
"add_def");
 
  429                $this->tpl->setVariable(
"TXT_ADD_DEFINITION",
 
  430                        $this->lng->txt(
"cont_add_definition"));
 
  431                $this->tpl->setVariable(
"BTN_ADD", 
"addDefinition");
 
  432                $this->tpl->parseCurrentBlock();
 
  433                $this->tpl->setCurrentBlock(
"def_list");
 
  437                $this->tpl->setVariable(
"TXT_TERM", $this->term->getTerm());
 
  439                for($j=0; $j<count($defs); $j++)
 
  443                        $page_gui->setStyleId($this->glossary->getStyleSheetId());
 
  444                        $page_gui->setSourcecodeDownloadScript(
"ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=".
$_GET[
"ref_id"]);
 
  445                        $page_gui->setTemplateOutput(
false);
 
  446                        $output = $page_gui->preview();
 
  448                        if (count($defs) > 1)
 
  450                                $this->tpl->setCurrentBlock(
"definition_header");
 
  451                                                $this->tpl->setVariable(
"TXT_DEFINITION",
 
  452                                $this->lng->txt(
"cont_definition").
" ".($j+1));
 
  453                                $this->tpl->parseCurrentBlock();
 
  458                                $this->tpl->setCurrentBlock(
"up");
 
  459                                $this->tpl->setVariable(
"TXT_UP", $this->lng->txt(
"up"));
 
  460                                $this->ctrl->setParameter($this, 
"def", $def[
"id"]);
 
  461                                $this->tpl->setVariable(
"LINK_UP",
 
  462                                        $this->ctrl->getLinkTarget($this, 
"moveUp"));
 
  463                                $this->tpl->parseCurrentBlock();
 
  466                        if ($j+1 < count($defs))
 
  468                                $this->tpl->setCurrentBlock(
"down");
 
  469                                $this->tpl->setVariable(
"TXT_DOWN", $this->lng->txt(
"down"));
 
  470                                $this->ctrl->setParameter($this, 
"def", $def[
"id"]);
 
  471                                $this->tpl->setVariable(
"LINK_DOWN",
 
  472                                        $this->ctrl->getLinkTarget($this, 
"moveDown"));
 
  473                                $this->tpl->parseCurrentBlock();
 
  475                        $this->tpl->setCurrentBlock(
"submit_btns");
 
  476                        $this->tpl->setVariable(
"TXT_EDIT", $this->lng->txt(
"edit"));
 
  477                        $this->ctrl->setParameter($this, 
"def", $def[
"id"]);
 
  478                        $this->ctrl->setParameterByClass(
"ilTermDefinitionEditorGUI", 
"def", $def[
"id"]);
 
  479                        $this->tpl->setVariable(
"LINK_EDIT",
 
  480                                $this->ctrl->getLinkTargetByClass(array(
"ilTermDefinitionEditorGUI", 
"ilGlossaryDefPageGUI"), 
"edit"));
 
  481                        $this->tpl->setVariable(
"TXT_DELETE", $this->lng->txt(
"delete"));
 
  482                        $this->tpl->setVariable(
"LINK_DELETE",
 
  483                                $this->ctrl->getLinkTarget($this, 
"confirmDefinitionDeletion"));
 
  484                        $this->tpl->parseCurrentBlock();
 
  486                        $this->tpl->setCurrentBlock(
"definition");
 
  487                        $this->tpl->setVariable(
"PAGE_CONTENT", $output);
 
  488                        $this->tpl->parseCurrentBlock();
 
  507                $ilTabs->activateTab(
"definitions");
 
  510                $this->tpl->setCurrentBlock(
"ContentStyle");
 
  511                $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
 
  513                $this->tpl->parseCurrentBlock();
 
  516                $this->tpl->setCurrentBlock(
"SyntaxStyle");
 
  517                $this->tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
 
  519                $this->tpl->parseCurrentBlock();
 
  521                $this->tpl->setTitle(
 
  522                        $this->lng->txt(
"cont_term").
": ".$this->term->getTerm());
 
  525                $this->tpl->addBlockfile(
"ADM_CONTENT", 
"def_list", 
"tpl.glossary_definition_delete.html", 
true);
 
  528                $this->tpl->setVariable(
"TXT_TERM", $this->term->getTerm());
 
  532                $page_gui->setTemplateOutput(
false);
 
  533                $page_gui->setStyleId($this->glossary->getStyleSheetId());
 
  534                $page_gui->setSourcecodeDownloadScript(
"ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=".
$_GET[
"ref_id"]);
 
  535                $page_gui->setFileDownloadLink(
"ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=".
$_GET[
"ref_id"]);
 
  536                $page_gui->setFullscreenLink(
"ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=".
$_GET[
"ref_id"]);
 
  537                $output = $page_gui->preview();
 
  539                $this->tpl->setCurrentBlock(
"definition");
 
  540                $this->tpl->setVariable(
"PAGE_CONTENT", $output);
 
  541                $this->tpl->setVariable(
"TXT_CANCEL", $this->lng->txt(
"cancel"));
 
  542                $this->tpl->setVariable(
"LINK_CANCEL",
 
  543                        $this->ctrl->getLinkTarget($this, 
"cancelDefinitionDeletion"));
 
  544                $this->tpl->setVariable(
"TXT_CONFIRM", $this->lng->txt(
"confirm"));
 
  545                $this->ctrl->setParameter($this, 
"def", $definition->getId());
 
  546                $this->tpl->setVariable(
"LINK_CONFIRM",
 
  547                        $this->ctrl->getLinkTarget($this, 
"deleteDefinition"));
 
  548                $this->tpl->parseCurrentBlock();
 
  553                $this->ctrl->redirect($this, 
"listDefinitions");
 
  560                $definition->delete();
 
  561                $this->ctrl->redirect($this, 
"listDefinitions");
 
  571                $definition->moveUp();
 
  572                $this->ctrl->redirect($this, 
"listDefinitions");
 
  582                $definition->moveDown();
 
  583                $this->ctrl->redirect($this, 
"listDefinitions");
 
  597                $ilTabs->activateTab(
"definitions");
 
  599                $this->tpl->setTitle($this->lng->txt(
"cont_term").
": ".$this->term->getTerm());
 
  602                include_once 
"Services/Form/classes/class.ilPropertyFormGUI.php";
 
  604                $form->setFormAction($this->ctrl->getFormAction($this, 
"saveDefinition"));
 
  605                $form->setTitle($this->lng->txt(
"gdf_new"));
 
  608                $title->setRequired(
true);
 
  609                $form->addItem($title);
 
  612                $form->addItem($desc);
 
  614                $form->addCommandButton(
"saveDefinition", $this->lng->txt(
"gdf_add"));
 
  615                $form->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
 
  617                $this->tpl->setContent($form->getHTML());
 
  625                $this->ctrl->redirect($this, 
"listDefinitions");
 
  634                $def->setTermId(
$_GET[
"term_id"]);
 
  639                $this->ctrl->redirect($this, 
"listDefinitions");
 
  648                $this->tpl->addBlockFile(
"CONTENT", 
"content", 
"tpl.adm_content.html");
 
  649                $this->tpl->addBlockFile(
"STATUSLINE", 
"statusline", 
"tpl.statusline.html");
 
  666                require_once (
"./Modules/Glossary/classes/class.ilGlossaryLocatorGUI.php");
 
  668                $gloss_loc->setTerm($this->term);
 
  669                $gloss_loc->setGlossary($this->glossary);
 
  671                $gloss_loc->display();
 
  680                global 
$lng, $ilHelp;
 
  683                $ilHelp->setScreenIdComponent(
"glo_term");
 
  686                if (
$_GET[
"term_id"] != 
"")
 
  688                        $tabs_gui->addTab(
"properties",
 
  690                                $this->ctrl->getLinkTarget($this, 
"editTerm"));
 
  692                        $tabs_gui->addTab(
"definitions",
 
  693                                $lng->txt(
"cont_definitions"),
 
  694                                $this->ctrl->getLinkTarget($this, 
"listDefinitions"));
 
  696                        $tabs_gui->addTab(
"usage",
 
  698                                $this->ctrl->getLinkTarget($this, 
"listUsages"));
 
  700                        $tabs_gui->addNonTabbedLink(
"presentation_view",
 
  701                                $this->lng->txt(
"glo_presentation_view"),
 
  705                                "_".$_GET[
"term_id"].
"_".
$_GET[
"ref_id"].
"&client_id=".CLIENT_ID,
 
  712                $tabs_gui->setBackTarget($this->lng->txt(
"glossary"),
 
  713                        $this->ctrl->getLinkTargetByClass(
"ilobjglossarygui", 
"listTerms"));
 
  722        public static function _goto($a_target, $a_ref_id = 
"")
 
  731                        $ref_ids = array($a_ref_id);
 
  742                        if ($ilAccess->checkAccess(
"read", 
"", 
$ref_id))
 
  744                                $_GET[
"baseClass"] = 
"ilGlossaryPresentationGUI";
 
  745                                $_GET[
"term_id"] = $a_target;
 
  747                                $_GET[
"cmd"] = 
"listDefinitions";
 
  748                                include_once(
"ilias.php");
 
  752                if ($ilAccess->checkAccess(
"read", 
"", ROOT_FOLDER_ID))
 
  768                global $ilTabs, 
$tpl;
 
  774                $ilTabs->activateTab(
"usage");
 
  776                $this->tpl->setTitle($this->lng->txt(
"cont_term").
": ".$this->term->getTerm());
 
  779                include_once(
"./Modules/Glossary/classes/class.ilTermUsagesTableGUI.php");
 
  796                include_once(
"./Modules/Glossary/classes/class.ilTermQuickListTableGUI.php");
 
  798                $tpl->setLeftNavContent(
$tab->getHTML());
 
Glossary definition page GUI class.
Glossary definition page object.
Class ilGlossaryDefinition.
getDefinitionList($a_term_id)
static
GUI class for glossary terms.
getOfflineDirectory()
get offline directory
getOverlayHTML($a_close_el_id, $a_glo_ov_id="", $a_lang="", $a_outputmode="offline")
Get overlay html.
cancel()
cancel adding definition
moveUp()
move definition upwards
quickList()
Set quick term list cmd into left navigation URL.
listDefinitions()
list definitions
getInternalLinks()
get internal links
static _goto($a_target, $a_ref_id="")
redirect script
executeCommand()
execute command
cancelDefinitionDeletion()
getTabs(&$tabs_gui)
get tabs
getEditTermForm()
Get edit term form.
getTemplate()
get template
addDefinition()
add definition
moveDown()
move definition downwards
displayLocator()
display locator
confirmDefinitionDeletion()
deletion confirmation screen
saveDefinition()
save definition
setOfflineDirectory($offdir)
set offline directory to offdir
create()
form for new content object creation
output($a_offline=false, $a_tpl="", $a_outputmode="presentation")
output glossary term definitions
ilGlossaryTermGUI($a_id=0)
Constructor @access public.
static getNumberOfUsages($a_term_id)
Get number of usages.
static _lookGlossaryID($term_id)
get glossary id form term id
getContentStylePath($a_style_id)
get content style path
getSyntaxStylePath()
get syntax style path
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
static _lookupTitle($a_id)
lookup object title
static _getAllReferences($a_id)
get all reference ids of object
Taxonomy node <-> item assignment.
special template class to simplify handling of ITX/PEAR
GUI class for glossary term definition editor.
TableGUI class for media object usages listing.
This class represents a text area property in a property form.
This class represents a text property in a property form.
static sendQuestion($a_info="", $a_keep=false)
Send Question to Screen.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
includeMathjax($a_tpl=null)
Include Mathjax.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
redirection script todo: (a better solution should control the processing via a xml file)