5require_once(
"./Modules/Glossary/classes/class.ilGlossaryTerm.php");
 
   44                $this->ctrl->saveParameter($this, array(
"term_id"));
 
   45                $this->tabs_gui = $ilTabs;
 
   52                        require_once(
"./Modules/Glossary/classes/class.ilObjGlossary.php");
 
   64                $next_class = $this->ctrl->getNextClass($this);
 
   65                $cmd = $this->ctrl->getCmd();
 
   67                $this->log->debug(
"glossary term, next class ".$next_class.
", cmd: ".
$cmd);
 
   71                        case "iltermdefinitioneditorgui":
 
   75                                $ret = $this->ctrl->forwardCommand($def_edit);
 
   79                        case "ilpropertyformgui";
 
   81                                $this->ctrl->forwardCommand($form);
 
   84                        case "ilobjectmetadatagui";             
 
   86                                $ilTabs->activateTab(
'meta_data');
 
   87                                include_once 
'Services/Object/classes/class.ilObjectMetaDataGUI.php';
 
   89                                        'term', $this->term->
getId());  
 
   90                                $this->ctrl->forwardCommand($md_gui);
 
  106                $this->offline_directory = $offdir;
 
  115                return $this->offline_directory;
 
  121                $this->glossary = $a_glossary;
 
  122                if (!is_object($this->term_glossary))
 
  124                        $this->term_glossary = $a_glossary;
 
  130                $this->link_xml = $a_link_xml;
 
  165                $ilTabs->activateTab(
"properties");
 
  167                $this->tpl->setTitle($this->lng->txt(
"cont_term").
": ".$this->term->getTerm());
 
  175                $this->tpl->setContent(
$ilCtrl->getHTML($a_form));
 
  190                include_once 
"Services/Form/classes/class.ilPropertyFormGUI.php";
 
  192                $form->setFormAction($this->ctrl->getFormAction($this, 
"updateTerm"));
 
  193                $form->setTitle($this->lng->txt(
"cont_edit_term"));
 
  196                $term->setRequired(
true);
 
  197                $term->setValue($this->term->getTerm());
 
  198                $form->addItem(
$term);
 
  201                $lang->setRequired(
true);
 
  203                $lang->setValue($this->term->getLanguage());
 
  204                $form->addItem(
$lang);
 
  207                if ($this->term_glossary->getTaxonomyId() > 0)
 
  209                        include_once(
"./Services/Taxonomy/classes/class.ilTaxSelectInputGUI.php");
 
  210                        $tax_node_assign = 
new ilTaxSelectInputGUI($this->term_glossary->getTaxonomyId(), 
"tax_node", 
true);
 
  212                        include_once(
"./Services/Taxonomy/classes/class.ilTaxNodeAssignment.php");
 
  213                        $ta = 
new ilTaxNodeAssignment(
"glo", $this->term_glossary->getId(), 
"term", $this->term_glossary->getTaxonomyId());
 
  214                        $assgnmts = $ta->getAssignmentsOfItem($this->term->getId());
 
  216                        foreach ($assgnmts as $a)
 
  218                                $node_ids[] = $a[
"node_id"];
 
  220                        $tax_node_assign->setValue($node_ids);
 
  222                        $form->addItem($tax_node_assign);
 
  227                include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
 
  229                        $this->term->getId());
 
  230                $this->record_gui->setPropertyForm($form);              
 
  231                $this->record_gui->parse();
 
  233                $form->addCommandButton(
"updateTerm", $this->lng->txt(
"save"));
 
  246                if($form->checkInput() &&
 
  247                        $this->record_gui->importEditFormPostValues())
 
  251                        $this->term->setLanguage(
$_POST[
"term_language"]);
 
  252                        $this->term->update();
 
  255                        if ($this->term_glossary->getTaxonomyId() > 0)
 
  257                                include_once(
"./Services/Taxonomy/classes/class.ilTaxNodeAssignment.php");
 
  258                                $ta = 
new ilTaxNodeAssignment(
"glo", $this->term_glossary->getId(), 
"term", $this->term_glossary->getTaxonomyId());
 
  259                                $ta->deleteAssignmentsOfItem($this->term->getId());
 
  260                                if (is_array(
$_POST[
"tax_node"]))
 
  262                                        foreach (
$_POST[
"tax_node"] as $node_id)
 
  264                                                $ta->addAssignment($node_id, $this->term->getId());
 
  270                        $this->record_gui->writeEditForm();                     
 
  272                        $this->ctrl->redirect($this, 
"editTerm");
 
  275                $form->setValuesByPost();
 
  285        function getOverlayHTML($a_close_el_id, $a_glo_ov_id = 
"", $a_lang = 
"", $a_outputmode = 
"offline")
 
  291                        $a_lang = 
$lng->getLangKey();
 
  294                $tpl = 
new ilTemplate(
"tpl.glossary_overlay.html", 
true, 
true, 
"Modules/Glossary");
 
  296                if ($a_outputmode == 
"preview")
 
  298                        $a_outputmode = 
"presentation";
 
  300                if ($a_outputmode == 
"offline")
 
  302                        $this->
output(
true, $tpl, $a_outputmode);
 
  306                        $this->
output(
false, $tpl, $a_outputmode);
 
  308                if ($a_glo_ov_id != 
"")
 
  310                        $tpl->setCurrentBlock(
"glovlink");
 
  311                        $tpl->setVariable(
"TXT_LINK", 
$lng->txtlng(
"content", 
"cont_sco_glossary", $a_lang));
 
  312                        $tpl->setVariable(
"ID_LINK", $a_glo_ov_id);
 
  313                        $tpl->parseCurrentBlock();
 
  315                $tpl->setVariable(
"TXT_CLOSE", 
$lng->txtlng(
"common", 
"close", $a_lang));
 
  316                $tpl->setVariable(
"ID_CLOSE", $a_close_el_id);
 
  325        function output($a_offline = 
false, $a_tpl = 
"", $a_outputmode = 
"presentation")
 
  336                require_once(
"./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
 
  337                require_once(
"./Modules/Glossary/classes/class.ilGlossaryDefPageGUI.php");
 
  341                $tpl->setVariable(
"TXT_TERM", $this->term->getTerm());
 
  343                for($j=0; $j<count($defs); $j++)
 
  347                        $page_gui->setSourcecodeDownloadScript(
"ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=".
$_GET[
"ref_id"]);
 
  355                                $page_gui->setFullscreenLink(
"fullscreen.html");        
 
  357                        $page_gui->setFileDownloadLink(
"ilias.php?baseClass=ilGlossaryPresentationGUI&cmd=downloadFile&ref_id=".
$_GET[
"ref_id"]);
 
  361                                $page_gui->setOutputMode($a_outputmode);
 
  365                                $page_gui->setOutputMode(
"offline");
 
  372                        $page_gui->setTemplateOutput(
false);
 
  373                        $output = $page_gui->presentation($page_gui->getOutputMode());
 
  375                        if (count($defs) > 1)
 
  377                                $tpl->setCurrentBlock(
"definition_header");
 
  378                                                $tpl->setVariable(
"TXT_DEFINITION",
 
  379                                $this->lng->txt(
"cont_definition").
" ".($j+1));
 
  380                                $tpl->parseCurrentBlock();
 
  383                        include_once 
'./Services/MathJax/classes/class.ilMathJax.php';
 
  386                        $tpl->setCurrentBlock(
"definition");
 
  388                        $tpl->parseCurrentBlock();
 
  397                require_once(
"./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
 
  398                require_once(
"./Modules/Glossary/classes/class.ilGlossaryDefPageGUI.php");
 
  402                $term_links = array();
 
  403                for($j=0; $j<count($defs); $j++)
 
  408                        $page_links = $page->getInternalLinks();
 
  409                        foreach($page_links as $key => $page_link)
 
  411                                $term_links[$key] = $page_link;
 
  428                $ilTabs->activateTab(
"definitions");
 
  429                require_once(
"./Modules/Glossary/classes/class.ilGlossaryDefPageGUI.php");
 
  432                $this->tpl->setCurrentBlock(
"ContentStyle");
 
  433                $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
 
  435                $this->tpl->parseCurrentBlock();
 
  438                $this->tpl->setCurrentBlock(
"SyntaxStyle");
 
  439                $this->tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
 
  441                $this->tpl->parseCurrentBlock();
 
  444                $this->tpl->addBlockfile(
"ADM_CONTENT", 
"def_list", 
"tpl.glossary_definition_list.html", 
true);
 
  448                $this->tpl->setTitle(
 
  449                        $this->lng->txt(
"cont_term").
": ".$this->term->getTerm());
 
  452                $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
 
  454                $this->tpl->setCurrentBlock(
"add_def");
 
  455                $this->tpl->setVariable(
"TXT_ADD_DEFINITION",
 
  456                        $this->lng->txt(
"cont_add_definition"));
 
  457                $this->tpl->setVariable(
"BTN_ADD", 
"addDefinition");
 
  458                $this->tpl->parseCurrentBlock();
 
  459                $this->tpl->setCurrentBlock(
"def_list");
 
  463                $this->tpl->setVariable(
"TXT_TERM", $this->term->getTerm());
 
  465                for($j=0; $j<count($defs); $j++)
 
  469                        $page_gui->setStyleId($this->term_glossary->getStyleSheetId());
 
  470                        $page_gui->setSourcecodeDownloadScript(
"ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=".
$_GET[
"ref_id"]);
 
  471                        $page_gui->setTemplateOutput(
false);
 
  472                        $output = $page_gui->preview();
 
  474                        if (count($defs) > 1)
 
  476                                $this->tpl->setCurrentBlock(
"definition_header");
 
  477                                                $this->tpl->setVariable(
"TXT_DEFINITION",
 
  478                                $this->lng->txt(
"cont_definition").
" ".($j+1));
 
  479                                $this->tpl->parseCurrentBlock();
 
  484                                $this->tpl->setCurrentBlock(
"up");
 
  485                                $this->tpl->setVariable(
"TXT_UP", $this->lng->txt(
"up"));
 
  486                                $this->ctrl->setParameter($this, 
"def", $def[
"id"]);
 
  487                                $this->tpl->setVariable(
"LINK_UP",
 
  488                                        $this->ctrl->getLinkTarget($this, 
"moveUp"));
 
  489                                $this->tpl->parseCurrentBlock();
 
  492                        if ($j+1 < count($defs))
 
  494                                $this->tpl->setCurrentBlock(
"down");
 
  495                                $this->tpl->setVariable(
"TXT_DOWN", $this->lng->txt(
"down"));
 
  496                                $this->ctrl->setParameter($this, 
"def", $def[
"id"]);
 
  497                                $this->tpl->setVariable(
"LINK_DOWN",
 
  498                                        $this->ctrl->getLinkTarget($this, 
"moveDown"));
 
  499                                $this->tpl->parseCurrentBlock();
 
  501                        $this->tpl->setCurrentBlock(
"submit_btns");
 
  502                        $this->tpl->setVariable(
"TXT_EDIT", $this->lng->txt(
"edit"));
 
  503                        $this->ctrl->setParameter($this, 
"def", $def[
"id"]);
 
  504                        $this->ctrl->setParameterByClass(
"ilTermDefinitionEditorGUI", 
"def", $def[
"id"]);
 
  505                        $this->tpl->setVariable(
"LINK_EDIT",
 
  506                                $this->ctrl->getLinkTargetByClass(array(
"ilTermDefinitionEditorGUI", 
"ilGlossaryDefPageGUI"), 
"edit"));
 
  507                        $this->tpl->setVariable(
"TXT_DELETE", $this->lng->txt(
"delete"));
 
  508                        $this->tpl->setVariable(
"LINK_DELETE",
 
  509                                $this->ctrl->getLinkTarget($this, 
"confirmDefinitionDeletion"));
 
  510                        $this->tpl->parseCurrentBlock();
 
  512                        $this->tpl->setCurrentBlock(
"definition");
 
  513                        $this->tpl->setVariable(
"PAGE_CONTENT", 
$output);
 
  514                        $this->tpl->parseCurrentBlock();
 
  533                $ilTabs->activateTab(
"definitions");
 
  536                $this->tpl->setCurrentBlock(
"ContentStyle");
 
  537                $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
 
  539                $this->tpl->parseCurrentBlock();
 
  542                $this->tpl->setCurrentBlock(
"SyntaxStyle");
 
  543                $this->tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
 
  545                $this->tpl->parseCurrentBlock();
 
  547                $this->tpl->setTitle(
 
  548                        $this->lng->txt(
"cont_term").
": ".$this->term->getTerm());
 
  551                $this->tpl->addBlockfile(
"ADM_CONTENT", 
"def_list", 
"tpl.glossary_definition_delete.html", 
true);
 
  554                $this->tpl->setVariable(
"TXT_TERM", $this->term->getTerm());
 
  558                $page_gui->setTemplateOutput(
false);
 
  559                $page_gui->setStyleId($this->term_glossary->getStyleSheetId());
 
  560                $page_gui->setSourcecodeDownloadScript(
"ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=".
$_GET[
"ref_id"]);
 
  561                $page_gui->setFileDownloadLink(
"ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=".
$_GET[
"ref_id"]);
 
  562                $page_gui->setFullscreenLink(
"ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=".
$_GET[
"ref_id"]);
 
  563                $output = $page_gui->preview();
 
  565                $this->tpl->setCurrentBlock(
"definition");
 
  566                $this->tpl->setVariable(
"PAGE_CONTENT", 
$output);
 
  567                $this->tpl->setVariable(
"TXT_CANCEL", $this->lng->txt(
"cancel"));
 
  568                $this->tpl->setVariable(
"LINK_CANCEL",
 
  569                        $this->ctrl->getLinkTarget($this, 
"cancelDefinitionDeletion"));
 
  570                $this->tpl->setVariable(
"TXT_CONFIRM", $this->lng->txt(
"confirm"));
 
  571                $this->ctrl->setParameter($this, 
"def", $definition->getId());
 
  572                $this->tpl->setVariable(
"LINK_CONFIRM",
 
  573                        $this->ctrl->getLinkTarget($this, 
"deleteDefinition"));
 
  574                $this->tpl->parseCurrentBlock();
 
  579                $this->ctrl->redirect($this, 
"listDefinitions");
 
  586                $definition->delete();
 
  587                $this->ctrl->redirect($this, 
"listDefinitions");
 
  597                $definition->moveUp();
 
  598                $this->ctrl->redirect($this, 
"listDefinitions");
 
  608                $definition->moveDown();
 
  609                $this->ctrl->redirect($this, 
"listDefinitions");
 
  620                $ilCtrl->setParameterByClass(
"ilobjglossarygui", 
"term_id", $this->term->getId());
 
  621                $ilCtrl->redirectByClass(
"ilobjglossarygui", 
"addDefinition");
 
  629                $this->ctrl->redirect($this, 
"listDefinitions");
 
  638                $def->setTermId(
$_GET[
"term_id"]);
 
  643                $this->ctrl->redirect($this, 
"listDefinitions");
 
  659                require_once (
"./Modules/Glossary/classes/class.ilGlossaryLocatorGUI.php");
 
  661                $gloss_loc->setTerm($this->term);
 
  662                $gloss_loc->setGlossary($this->glossary);
 
  664                $gloss_loc->display();
 
  673                global 
$lng, $ilHelp;
 
  676                $ilHelp->setScreenIdComponent(
"glo_term");
 
  679                if (
$_GET[
"term_id"] != 
"")
 
  681                        $this->tabs_gui->addTab(
"properties",
 
  683                                $this->ctrl->getLinkTarget($this, 
"editTerm"));
 
  685                        $this->tabs_gui->addTab(
"definitions",
 
  686                                $lng->txt(
"cont_definitions"),
 
  687                                $this->ctrl->getLinkTarget($this, 
"listDefinitions"));
 
  689                        $this->tabs_gui->addTab(
"usage",
 
  691                                $this->ctrl->getLinkTarget($this, 
"listUsages"));
 
  693                        include_once 
"Services/Object/classes/class.ilObjectMetaDataGUI.php";
 
  695                                "term", $this->term->
getId());                                  
 
  696                        $mdtab = $mdgui->getTab();
 
  699                                $this->tabs_gui->addTab(
"meta_data",
 
  700                                        $lng->txt(
"meta_data"),
 
  704                        $this->tabs_gui->addNonTabbedLink(
"presentation_view",
 
  705                                $this->lng->txt(
"glo_presentation_view"),
 
  709                                "_".$_GET[
"term_id"].
"_".
$_GET[
"ref_id"].
"&client_id=".CLIENT_ID,
 
  716                $this->tabs_gui->setBackTarget($this->lng->txt(
"glossary"),
 
  717                        $this->ctrl->getLinkTargetByClass(
"ilobjglossarygui", 
"listTerms"));
 
  726        public static function _goto($a_target, $a_ref_id = 
"")
 
  735                        $ref_ids = array($a_ref_id);
 
  746                        if ($ilAccess->checkAccess(
"read", 
"", 
$ref_id))
 
  748                                $_GET[
"baseClass"] = 
"ilGlossaryPresentationGUI";
 
  749                                $_GET[
"term_id"] = $a_target;
 
  751                                $_GET[
"cmd"] = 
"listDefinitions";
 
  752                                include_once(
"ilias.php");
 
  756                if ($ilAccess->checkAccess(
"read", 
"", ROOT_FOLDER_ID))
 
  772                global $ilTabs, 
$tpl;
 
  778                $ilTabs->activateTab(
"usage");
 
  780                $this->tpl->setTitle($this->lng->txt(
"cont_term").
": ".$this->term->getTerm());
 
  783                include_once(
"./Modules/Glossary/classes/class.ilTermUsagesTableGUI.php");
 
  800                include_once(
"./Modules/Glossary/classes/class.ilTermQuickListTableGUI.php");
 
  802                $tpl->setLeftNavContent(
$tab->getHTML());
 
sprintf('%.4f', $callTime)
An exception for terminatinating execution or to throw for unit testing.
Glossary definition page GUI class.
Glossary definition page object.
Class ilGlossaryDefinition.
static getDefinitionList($a_term_id)
static
GUI class for glossary terms.
getOfflineDirectory()
get offline directory
__construct($a_id=0)
Constructor @access public.
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
editTerm(ilPropertyFormGUI $a_form=null)
Edit term.
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()
getEditTermForm()
Get edit term form.
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
static getNumberOfUsages($a_term_id)
Get number of usages.
static _lookGlossaryID($term_id)
get glossary id form term id
static getLogger($a_component_id)
Get component logger.
static getInstance()
Singleton: get instance.
static getSyntaxStylePath()
get syntax style path
static getContentStylePath($a_style_id)
get content 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
getId()
get object id @access public
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 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.
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)
if(!is_dir( $entity_dir)) exit("Fatal Error ([A-Za-z0-9]+)\s+" &#(? foreach( $entity_files as $file) $output
for($i=1; $i<=count($kw_cases_sel); $i+=1) $lang
redirection script todo: (a better solution should control the processing via a xml file)