5require_once(
"./Services/Object/classes/class.ilObjectGUI.php");
 
    6require_once(
"./Modules/Glossary/classes/class.ilObjGlossary.php");
 
    7require_once(
"./Modules/Glossary/classes/class.ilGlossaryTermGUI.php");
 
    8require_once(
"./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
 
    9require_once(
"./Modules/Glossary/classes/class.ilTermDefinitionEditorGUI.php");
 
   10require_once(
"./Services/COPage/classes/class.ilPCParagraph.php");
 
   37        function ilObjGlossaryGUI($a_data,$a_id = 0,$a_call_by_reference = 
true, $a_prepare_output = 
true)
 
   42                $this->ctrl->saveParameter($this, array(
"ref_id", 
"offset"));
 
   44                $lng->loadLanguageModule(
"content");
 
   47                parent::ilObjectGUI($a_data, $a_id, $a_call_by_reference, 
false);
 
   51                $this->term_id = (int) 
$_GET[
"term_id"];
 
   53                if ($this->term_id > 0 && $term_glo_id != $this->object->getId())
 
   58                $this->tax_id = $this->
object->getTaxonomyId();
 
   59                if ($this->tax_id > 0)
 
   61                        $this->ctrl->saveParameter($this, array(
"show_tax", 
"tax_node"));
 
   63                        include_once(
"./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
 
   66                if ((
int) 
$_GET[
"tax_node"] > 1 && $this->tax->getTree()->readRootId() != 
$_GET[
"tax_node"])
 
   68                        $this->tax_node = (int) 
$_GET[
"tax_node"];
 
   79                $cmd = $this->ctrl->getCmd();
 
   80                $next_class = $this->ctrl->getNextClass($this);
 
   84                        case 'ilobjectmetadatagui';
 
   92                                $this->tabs_gui->activateTab(
'meta_data');
 
   93                                include_once 
'Services/Object/classes/class.ilObjectMetaDataGUI.php';
 
   95                                $this->ctrl->forwardCommand($md_gui);
 
   98                        case "ilglossarytermgui":
 
  101                                $this->ctrl->setReturn($this, 
"listTerms");
 
  103                                $term_gui->setGlossary($this->
object);
 
  105                                $ret =& $this->ctrl->forwardCommand($term_gui);
 
  108                        case "ilinfoscreengui":
 
  113                        case "ilobjstylesheetgui":
 
  114                                include_once (
"./Services/Style/classes/class.ilObjStyleSheetGUI.php");
 
  115                                $this->ctrl->setReturn($this, 
"editStyleProperties");
 
  116                                $style_gui = 
new ilObjStyleSheetGUI(
"", $this->object->getStyleSheetId(), 
false, 
false);
 
  117                                $style_gui->omitLocator();
 
  118                                if (
$cmd == 
"create" || 
$_GET[
"new_type"]==
"sty")
 
  120                                        $style_gui->setCreationMode(
true);
 
  123                                if (
$cmd == 
"confirmedDelete")
 
  125                                        $this->
object->setStyleSheetId(0);
 
  126                                        $this->
object->update();
 
  129                                $ret = $this->ctrl->forwardCommand($style_gui);
 
  131                                if (
$cmd == 
"save" || 
$cmd == 
"copyStyle" || 
$cmd == 
"importStyle")
 
  134                                        $this->
object->setStyleSheetId($style_id);
 
  135                                        $this->
object->update();
 
  136                                        $this->ctrl->redirectByClass(
"ilobjstylesheetgui", 
"edit");
 
  141                        case 'ilpermissiongui':
 
  142                                if (strtolower(
$_GET[
"baseClass"]) == 
"iladministrationgui")
 
  153                                include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
 
  155                                $ret =& $this->ctrl->forwardCommand($perm_gui);
 
  158                        case "ilcommonactiondispatchergui":
 
  159                                include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
 
  161                                $this->ctrl->forwardCommand($gui);
 
  164                        case "ilobjtaxonomygui":
 
  169                                $ilTabs->activateTab(
"settings");
 
  172                                include_once(
"./Services/Taxonomy/classes/class.ilObjTaxonomyGUI.php");
 
  173                                $this->ctrl->setReturn($this, 
"properties");
 
  175                                $tax_gui->setMultiple(
false);
 
  181                                $tax_gui->setAssignedObject($this->object->getId());
 
  182                                $ret = $this->ctrl->forwardCommand($tax_gui);
 
  188                                $ilTabs->activateTab(
"export");
 
  190                                include_once(
"./Services/Export/classes/class.ilExportGUI.php");
 
  193                                $exp_gui->addFormat(
"xml");
 
  194                                $exp_gui->addFormat(
"html", 
"", $this, 
"exportHTML");
 
  195                                $exp_gui->addCustomColumn(
$lng->txt(
"cont_public_access"),
 
  196                                                $this, 
"getPublicAccessColValue");
 
  197                                $exp_gui->addCustomMultiCommand(
$lng->txt(
"cont_public_access"),
 
  198                                                $this, 
"publishExportFile");
 
  199                                $ret = $this->ctrl->forwardCommand($exp_gui);
 
  202                        case 'ilobjectcopygui':
 
  204                                include_once 
'./Services/Object/classes/class.ilObjectCopyGUI.php';
 
  207                                $this->ctrl->forwardCommand($cp);
 
  211                                $cmd = $this->ctrl->getCmd(
"listTerms");
 
  213                                if ((
$cmd == 
"create") && (
$_POST[
"new_type"] == 
"term"))
 
  215                                        $this->ctrl->setCmd(
"create");
 
  216                                        $this->ctrl->setCmdClass(
"ilGlossaryTermGUI");
 
  222                                        if (!in_array(
$cmd, array(
"frameset", 
"quickList")))
 
  224                                                if (strtolower(
$_GET[
"baseClass"]) == 
"iladministrationgui" ||
 
  237                                                        if(
$cmd == 
"redrawHeaderAction")
 
  239                                                                $cmd = 
"redrawHeaderActionObject";
 
  248                if (!in_array(
$cmd, array(
"frameset", 
"quickList")))
 
  250                        if (strtolower(
$_GET[
"baseClass"]) != 
"iladministrationgui")
 
  260                        $this->tpl->show(
false);
 
  266                include_once(
"./Modules/Glossary/classes/class.ilObjGlossary.php");
 
  283                include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
  285                $form->setTarget(
"_top");
 
  286                $form->setFormAction($this->ctrl->getFormAction($this));
 
  287                $form->setTitle($this->lng->txt($a_new_type.
"_new"));
 
  293                $ti->setRequired(
true);
 
  304                                                "none"=>$this->lng->txt(
"glo_mode_normal"),
 
  305                                                "level"=>$this->lng->txt(
"glo_mode_level"),
 
  306                                                "subtree"=>$this->lng->txt(
"glo_mode_subtree")
 
  309                $tm->setOptions($stati);
 
  310                $tm->setInfo($this->lng->txt(
"glo_mode_desc"));
 
  311                $tm->setRequired(
true);
 
  314                $form->addCommandButton(
"save", $this->lng->txt($a_new_type.
"_add"));
 
  315                $form->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
 
  337                        $this->
ilias->raiseError($this->lng->txt(
"no_create_permission"), $this->ilias->error_obj->MESSAGE);
 
  340                $this->lng->loadLanguageModule($new_type);
 
  341                $this->ctrl->setParameter($this, 
"new_type", $new_type);
 
  344                if ($form->checkInput())
 
  346                        $this->ctrl->setParameter($this, 
"new_type", 
"");
 
  348                        include_once(
"./Modules/Glossary/classes/class.ilObjGlossary.php");
 
  350                        $newObj->setType($new_type);
 
  351                        $newObj->setTitle($form->getInput(
"title"));
 
  352                        $newObj->setDescription($form->getInput(
"desc"));
 
  353                        $newObj->setVirtualMode($form->getInput(
"glo_mode"));
 
  360                        ilUtil::redirect(
"ilias.php?baseClass=ilGlossaryEditorGUI&ref_id=".$newObj->getRefId());
 
  364                $form->setValuesByPost();
 
  365                $tpl->setContent($form->getHtml());
 
  381                $this->lng->loadLanguageModule(
"meta");
 
  382                include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
 
  385                $info->enablePrivateNotes();
 
  387                if ($ilAccess->checkAccess(
"write", 
"", 
$_GET[
"ref_id"]))
 
  389                        $info->enableNewsEditing();
 
  391                        $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
 
  392                        if ($enable_internal_rss)
 
  394                                $info->setBlockProperty(
"news", 
"settings", 
true);
 
  397                $info->addMetaDataSections($this->object->getId(),0, $this->object->getType());
 
  401                $this->ctrl->forwardCommand(
$info);
 
  412                global 
$lng, $ilAccess;
 
  414                $info->addSection(
$lng->txt(
"glo_usages"));
 
  415                include_once(
"./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php");
 
  417                foreach ($sms as $sm)
 
  421                        foreach ($refs as $ref)
 
  425                                        if ($ilAccess->checkAccess(
"write", 
"", $ref))
 
  427                                                include_once(
"./Services/Link/classes/class.ilLink.php");
 
  436                                $entry = 
"<a href='".$link.
"' target='_top'>".$entry.
"</a>";
 
  439                        $info->addProperty(
$lng->txt(
"obj_sahs"), $entry);
 
  448                if (strtolower(
$_GET[
"baseClass"]) == 
"iladministrationgui")
 
  450                        parent::viewObject();
 
  454                if (!$rbacsystem->checkAccess(
"visible,read",$this->object->getRefId()))
 
  456                        $this->
ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
 
  477                include_once 
'Modules/Glossary/classes/class.ilECSGlossarySettings.php';
 
  479                $ecs->addSettingsToForm($this->form, 
'glo');            
 
  481                $tpl->setContent($this->form->getHTML());
 
  493                include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
  498                $title->setRequired(
true);
 
  499                $this->form->addItem($title);
 
  503                $this->form->addItem($desc);
 
  505                $lng->loadLanguageModule(
"rep");
 
  507                $section->setTitle($this->lng->txt(
'rep_activation_availability'));
 
  512                $online->setValue(
"y");
 
  513                $online->setInfo(
$lng->txt(
"glo_online_info"));
 
  514                $this->form->addItem($online);
 
  517                $section->setTitle($this->lng->txt(
'glo_content_settings'));
 
  524                        $glo_mode->addOption($op1);
 
  526                        $glo_mode->addOption($op2);
 
  527                        $op3 = 
new ilRadioOption(
$lng->txt(
"glo_mode_subtree"), 
"subtree",
$lng->txt(
"glo_mode_subtree_info"));
 
  528                        $glo_mode->addOption($op3);
 
  529                $this->form->addItem($glo_mode);
 
  544                $section->setTitle($this->lng->txt(
'cont_presentation'));
 
  549                $pres_mode->setValue(
"table");
 
  554                        $snl->setMaxValue(3000);
 
  555                        $snl->setMinValue(100);
 
  556                        $snl->setMaxLength(4);
 
  558                        $snl->setInfo(
$lng->txt(
"glo_text_snippet_length_info"));
 
  560                        $op1->addSubItem($snl);
 
  562                $pres_mode->addOption($op1);
 
  563                $op2 = 
new ilRadioOption(
$lng->txt(
"glo_full_definitions"), 
"full_def", 
$lng->txt(
"glo_full_definitions_info"));
 
  564                $pres_mode->addOption($op2);
 
  565                $this->form->addItem($pres_mode);
 
  568                include_once(
"./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
 
  570                if (count($tax_ids) > 0)
 
  573                        $show_tax->setInfo($this->lng->txt(
"glo_show_taxonomy_info"));
 
  574                        $this->form->addItem($show_tax);
 
  579                $down->setValue(
"y");
 
  580                $down->setInfo(
$lng->txt(
"cont_downloads_desc"));
 
  581                $this->form->addItem($down);
 
  583                if ($a_mode == 
"edit")
 
  585                        $title->setValue($this->object->getTitle());
 
  586                        $desc->setValue($this->object->getDescription());
 
  587                        $online->setChecked($this->object->getOnline());
 
  588                        $glo_mode->setValue($this->object->getVirtualMode());
 
  589                        $pres_mode->setValue($this->object->getPresentationMode());
 
  590                        $snl->setValue($this->object->getSnippetLength());
 
  591                        if (count($tax_ids) > 0)
 
  593                                $show_tax->setChecked($this->object->getShowTaxonomy());
 
  596                        $down->setChecked($this->object->isActiveDownloads());
 
  600                        $feat->setTitle($this->lng->txt(
'obj_features'));
 
  601                        $this->form->addItem($feat);
 
  603                        include_once 
'./Services/Container/classes/class.ilContainer.php';
 
  604                        include_once 
'./Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
 
  606                                        $this->object->getId(),
 
  615                include_once(
"./Modules/Glossary/classes/class.ilGlossaryAdvMetaDataAdapter.php");
 
  617                $cols = $adv_ap->getColumnOrder();
 
  618                if (count($cols) > 1)
 
  620                        include_once 
'./Modules/Glossary/classes/class.ilGloAdvColSortInputGUI.php';
 
  622                        $this->form->addItem($ti);
 
  623                        $ti->setValue($cols);
 
  627                $this->form->addCommandButton(
"saveProperties", 
$lng->txt(
"save"));
 
  629                $this->form->setTitle(
$lng->txt(
"cont_glo_properties"));
 
  630                $this->form->setFormAction(
$ilCtrl->getFormAction($this));
 
  642                if ($this->form->checkInput())
 
  644                        $this->
object->setTitle(
$_POST[
'title']);
 
  645                        $this->
object->setDescription(
$_POST[
'description']);
 
  647                        $this->
object->setVirtualMode(
$_POST[
"glo_mode"]);
 
  650                        $this->
object->setPresentationMode(
$_POST[
"pres_mode"]);
 
  651                        $this->
object->setSnippetLength(
$_POST[
"snippet_length"]);
 
  652                        $this->
object->setShowTaxonomy(
$_POST[
"show_tax"]);
 
  653                        $this->
object->update();
 
  656                        include_once(
"./Modules/Glossary/classes/class.ilGlossaryAdvMetaDataAdapter.php");
 
  658                        $cols = $adv_ap->getColumnOrder();
 
  659                        if (count($cols) > 1)
 
  661                                $adv_ap->saveColumnOrder(
$_POST[
"field_order"]);
 
  665                        include_once(
"./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
 
  668                        include_once 
'./Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
 
  670                                $this->object->getId(),
 
  678                        include_once 
'Modules/Glossary/classes/class.ilECSGlossarySettings.php';        
 
  680                        if($ecs->handleSettingsUpdate())
 
  683                                $this->ctrl->redirect($this, 
"properties");
 
  687                $this->form->setValuesByPost();
 
  688                $tpl->setContent($this->form->getHTML());
 
  698                include_once(
"Services/Frameset/classes/class.ilFramesetGUI.php");
 
  700                $fs_gui->setFramesetTitle($this->object->getTitle());
 
  701                if ((
int) 
$_GET[
"edit_term"] > 0)
 
  703                        $ilCtrl->setParameterByClass(
"ilglossarytermgui", 
"term_id", (
int) 
$_GET[
"edit_term"]);
 
  704                        $fs_gui->setMainFrameSource($this->ctrl->getLinkTargetByClass(
"ilglossarytermgui", 
"listDefinitions"));
 
  708                        $fs_gui->setMainFrameSource($this->ctrl->getLinkTarget($this, 
"listTerms"));
 
  710                $fs_gui->setSideFrameSource($this->ctrl->getLinkTarget($this, 
"quickList"));
 
  711                $fs_gui->setMainFrameName(
"content");
 
  712                $fs_gui->setSideFrameName(
"tree");
 
  734                if (
$_GET[
"show_tax"])
 
  740                include_once(
"./Services/Form/classes/class.ilTextInputGUI.php");
 
  742                $ti->setMaxLength(80);
 
  744                $ilToolbar->addInputItem($ti, 
true);
 
  747                $this->lng->loadLanguageModule(
"meta");
 
  751                        $s_lang = 
$_SESSION[
"il_text_lang_".$_GET[
"ref_id"]];
 
  755                        $s_lang = 
$ilUser->getLanguage();
 
  757                include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
 
  760                $si->setValue($s_lang);
 
  761                $ilToolbar->addInputItem(
$si, 
true);
 
  763                $ilToolbar->setFormAction(
$ilCtrl->getFormAction($this));
 
  764                $ilToolbar->addFormButton(
$lng->txt(
"glo_add_new_term"), 
"addTerm");
 
  768                if (is_object($this->tax))
 
  770                        $ilToolbar->addSeparator();
 
  771                        if (
$_GET[
"show_tax"])
 
  773                                $ilToolbar->addButton(
$lng->txt(
"glo_hide_taxonomy"),
 
  774                                                $ilCtrl->getLinkTarget($this, 
"deactTaxonomy"));                                
 
  778                                $ilToolbar->addButton(
$lng->txt(
"glo_show_taxonomy"),
 
  779                                                $ilCtrl->getLinkTarget($this, 
"actTaxonomy"));
 
  783                include_once(
"./Modules/Glossary/classes/class.ilTermListTableGUI.php");
 
  798                $ilCtrl->setParameter($this, 
"show_tax", 1);
 
  799                $ilCtrl->redirect($this, 
"listTerms");
 
  812                $ilCtrl->setParameter($this, 
"show_tax", 
"");
 
  813                $ilCtrl->redirect($this, 
"listTerms");
 
  824                foreach ($a_actions as $name => 
$lng)
 
  826                        $d[$name] = array(
"name" => $name, 
"lng" => 
$lng);
 
  829                $notoperations = array();
 
  830                $operations = array();
 
  834                if (count($operations) > 0)
 
  836                        foreach ($operations as $val)
 
  838                                $this->tpl->setCurrentBlock(
"tbl_action_btn");
 
  839                                $this->tpl->setVariable(
"BTN_NAME", $val[
"name"]);
 
  840                                $this->tpl->setVariable(
"BTN_VALUE", $this->lng->txt($val[
"lng"]));
 
  841                                $this->tpl->parseCurrentBlock();
 
  844                        $this->tpl->setCurrentBlock(
"tbl_action_row");
 
  846                        $this->tpl->parseCurrentBlock();
 
  857                if (trim(
$_POST[
"new_term"]) == 
"")
 
  860                        $ilCtrl->redirect($this, 
"listTerms");
 
  864                include_once (
"./Modules/Glossary/classes/class.ilGlossaryTerm.php");
 
  866                $term->setGlossary($this->
object);
 
  874                $def->setTermId(
$term->getId());
 
  878                $this->ctrl->setParameterByClass(
"ilglossarydefpagegui", 
"term_id", 
$term->getId());
 
  879                $this->ctrl->setParameterByClass(
"ilglossarydefpagegui", 
"def", $def->getId());
 
  880                $this->ctrl->redirectByClass(array(
"ilglossarytermgui",
 
  881                        "iltermdefinitioneditorgui", 
"ilglossarydefpagegui"), 
"edit");
 
  889                include_once(
"./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
 
  892                $definition->moveUp();
 
  894                $this->ctrl->redirect($this, 
"listTerms");
 
  902                include_once(
"./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
 
  905                $definition->moveDown();
 
  907                $this->ctrl->redirect($this, 
"listTerms");
 
  927                        $ilCtrl->setParameterByClass(
"ilglossarytermgui",
 
  928                                "term_id", $this->term_id);
 
  929                        $link = 
"[<a href='".
 
  930                                $ilCtrl->getLinkTargetByClass(
"ilglossarytermgui", 
"listUsages").
 
  931                                "'>".$lng->txt(
"glo_list_usages").
"</a>]";
 
  932                        $add = 
"<br/>".sprintf(
$lng->txt(
"glo_term_is_used_n_times"), $nr).
" ".$link;
 
  935                include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
 
  937                $cgui->setHeaderText($this->lng->txt(
"info_delete_sure").$add);
 
  939                $cgui->setFormAction($this->ctrl->getFormAction($this));
 
  940                $cgui->setCancel($this->lng->txt(
"cancel"), 
"cancelDefinitionDeletion");
 
  941                $cgui->setConfirm($this->lng->txt(
"confirm"), 
"deleteDefinition");
 
  947                $this->tpl->setCurrentBlock(
"SyntaxStyle");
 
  948                $this->tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
 
  950                $this->tpl->parseCurrentBlock();
 
  954                $page_gui->setTemplateOutput(
false);
 
  955                $page_gui->setStyleId($this->object->getStyleSheetId());
 
  956                $page_gui->setSourcecodeDownloadScript(
"ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=".
$_GET[
"ref_id"]);
 
  957                $page_gui->setFileDownloadLink(
"ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=".
$_GET[
"ref_id"]);
 
  958                $page_gui->setFullscreenLink(
"ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=".
$_GET[
"ref_id"]);
 
  959                $output = $page_gui->preview();
 
  961                $cgui->addItem(
"def", 
$_GET[
"def"], 
$term->getTerm().$output);
 
  963                $this->tpl->setContent($cgui->getHTML());
 
  968                $this->ctrl->redirect($this, 
"listTerms");
 
  975                $definition->delete();
 
  976                $this->ctrl->redirect($this, 
"listTerms");
 
  999                $this->ctrl->redirect($this, 
"listTerms");
 
 1011                require_once(
"./Modules/Glossary/classes/class.ilGlossaryExport.php");
 
 1013                $glo_exp->buildExportFile();
 
 1014                $this->ctrl->redirectByClass(
"ilexportgui", 
"");
 
 1022                require_once(
"./Modules/Glossary/classes/class.ilGlossaryExport.php");
 
 1024                $glo_exp->buildExportFile();
 
 1026                $this->ctrl->redirectByClass(
"ilexportgui", 
"");
 
 1034                if(!isset(
$_POST[
"file"]))
 
 1036                        $this->
ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->ilias->error_obj->MESSAGE);
 
 1038                if (count(
$_POST[
"file"]) > 1)
 
 1040                        $this->
ilias->raiseError($this->lng->txt(
"cont_select_max_one_item"),$this->ilias->error_obj->MESSAGE);
 
 1044                $export_dir = $this->
object->getExportDirectory(
$file[0]);
 
 1046                if ($this->object->getPublicExportFile(
$file[0]) ==
 
 1049                        $this->
object->setPublicExportFile(
$file[0], 
"");
 
 1053                        $this->
object->setPublicExportFile(
$file[0], 
$file[1]);
 
 1055                $this->
object->update();
 
 1056                $this->ctrl->redirectByClass(
"ilexportgui", 
"");
 
 1074                if (!isset(
$_POST[
"id"]))
 
 1077                        $ilCtrl->redirect($this, 
"listTerms");
 
 1081                include_once(
"./Modules/Glossary/classes/class.ilGlossaryTerm.php");
 
 1082                foreach (
$_POST[
"id"] as $term_id)
 
 1085                        if ($term_glo_id != $this->object->getId())
 
 1088                                $ilCtrl->redirect($this, 
"listTerms");
 
 1093                include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
 
 1095                $cgui->setFormAction($this->ctrl->getFormAction($this));
 
 1096                $cgui->setHeaderText($this->lng->txt(
"info_delete_sure"));
 
 1097                $cgui->setCancel($this->lng->txt(
"cancel"), 
"cancelTermDeletion");
 
 1098                $cgui->setConfirm($this->lng->txt(
"confirm"), 
"deleteTerms");
 
 1100                foreach(
$_POST[
"id"] as $id)
 
 1108                                $ilCtrl->setParameterByClass(
"ilglossarytermgui",
 
 1110                                $link = 
"[<a href='".
 
 1111                                        $ilCtrl->getLinkTargetByClass(
"ilglossarytermgui", 
"listUsages").
 
 1112                                        "'>".$lng->txt(
"glo_list_usages").
"</a>]";
 
 1113                                $add = 
"<div class='small'>".
 
 1114                                        sprintf(
$lng->txt(
"glo_term_is_used_n_times"), $nr).
" ".$link.
"</div>";
 
 1117                        $cgui->addItem(
"id[]", $id, 
$term->getTerm().$add);
 
 1120                $this->tpl->setContent($cgui->getHTML());
 
 1130                $this->ctrl->redirect($this, 
"listTerms");
 
 1138                foreach(
$_POST[
"id"] as $id)
 
 1143                $this->ctrl->redirect($this, 
"listTerms");
 
 1155                if(strtolower(
$_GET[
"baseClass"]) != 
"ilglossaryeditorgui")
 
 1157                        parent::setLocator($a_tree, $a_id);
 
 1161                        if(is_object($this->
object))
 
 1163                                require_once(
"./Modules/Glossary/classes/class.ilGlossaryLocatorGUI.php");
 
 1165                                if (is_object($this->term))
 
 1167                                        $gloss_loc->setTerm($this->term);
 
 1169                                $gloss_loc->setGlossary($this->
object);
 
 1171                                $gloss_loc->display();
 
 1191                switch(
$_POST[
"new_type"])
 
 1195                                $term_gui->create();
 
 1203                $term_gui->setGlossary($this->
object);
 
 1209                $ilCtrl->redirect($this, 
"listTerms");
 
 1220                $term_id = (int) 
$_GET[
"term_id"];
 
 1222                include_once(
"./Modules/Glossary/classes/class.ilGlossaryTerm.php");
 
 1224                if ($term_glo_id != $this->object->getId())
 
 1227                        $ilCtrl->redirect($this, 
"listTerms");
 
 1231                include_once (
"./Modules/Glossary/classes/class.ilGlossaryTerm.php");
 
 1236                $def->setTermId(
$term->getId());
 
 1240                $this->ctrl->setParameterByClass(
"ilglossarydefpagegui", 
"term_id", 
$term->getId());
 
 1241                $this->ctrl->setParameterByClass(
"ilglossarydefpagegui", 
"def", $def->getId());
 
 1242                $this->ctrl->redirectByClass(array(
"ilglossarytermgui",
 
 1243                        "iltermdefinitioneditorgui", 
"ilglossarydefpagegui"), 
"edit");
 
 1249                $this->tpl->getStandardTemplate();
 
 1251                $title = $this->
object->getTitle();
 
 1254                if ($this->term_id > 0)
 
 1256                        $this->tpl->setTitle($this->lng->txt(
"term").
": ".
 
 1261                        parent::setTitleAndDescription();
 
 1263                        $this->tpl->setTitle($this->lng->txt(
"glo").
": ".$title);
 
 1272                $this->
getTabs($this->tabs_gui);
 
 1280                global $rbacsystem, $ilHelp;
 
 1282                $ilHelp->setScreenIdComponent(
"glo");
 
 1285                $force_active = (
$_GET[
"cmd"] == 
"" || 
$_GET[
"cmd"] == 
"listTerms")
 
 1288                $tabs_gui->addTarget(
"cont_terms",
 
 1289                        $this->ctrl->getLinkTarget($this, 
"listTerms"), array(
"listTerms", 
""),
 
 1290                        get_class($this), 
"", $force_active);
 
 1292                $force_active = 
false;
 
 1293                if ($this->ctrl->getCmd() == 
"showSummary" ||
 
 1294                        strtolower($this->ctrl->getNextClass()) == 
"ilinfoscreengui")
 
 1296                        $force_active = 
true;
 
 1298                $tabs_gui->addTarget(
"info_short",
 
 1299                        $this->ctrl->getLinkTargetByClass(
"ilinfoscreengui", 
"showSummary"), 
"",
 
 1300                        "ilInfoScreenGUI", 
"", $force_active);
 
 1303                if ($rbacsystem->checkAccess(
'write',$this->object->getRefId()))
 
 1305                        $tabs_gui->addTarget(
"settings",
 
 1306                                $this->ctrl->getLinkTarget($this, 
"properties"), 
"properties",
 
 1310                        include_once 
"Services/Object/classes/class.ilObjectMetaDataGUI.php";
 
 1312                        $mdtab = $mdgui->getTab();
 
 1315                                $tabs_gui->addTarget(
"meta_data", $mdtab,
 
 1316                                        "", 
"ilobjectmetadatagui");
 
 1325                        $tabs_gui->addTarget(
"export",
 
 1326                                 $this->ctrl->getLinkTargetByClass(
"ilexportgui", 
""),
 
 1331                if ($rbacsystem->checkAccess(
'edit_permission',$this->object->getRefId()))
 
 1338                        $tabs_gui->addTarget(
"perm_settings",
 
 1339                                $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'), 
"perm"), array(
"perm",
"info",
"owner"), 
'ilpermissiongui');
 
 1343                $tabs_gui->addNonTabbedLink(
"presentation_view",
 
 1344                        $this->lng->txt(
"glo_presentation_view"),
 
 1345                        "ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=".$this->object->getRefID(),
 
 1358                if (in_array($a_active,
 
 1359                        array(
"general_settings", 
"style", 
"taxonomy")))
 
 1362                        $ilTabs->addSubTab(
"general_settings",
 
 1363                                $lng->txt(
"settings"),
 
 1364                                $ilCtrl->getLinkTarget($this, 
'properties'));
 
 1367                        $ilTabs->addSubTab(
"style",
 
 1368                                $lng->txt(
"obj_sty"),
 
 1369                                $ilCtrl->getLinkTarget($this, 
'editStyleProperties'));
 
 1372                        include_once(
"./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
 
 1374                        $ilTabs->addSubTab(
"taxonomy",
 
 1375                                $lng->txt(
"tax_taxonomy"),
 
 1376                                $ilCtrl->getLinkTargetByClass(
"ilobjtaxonomygui", 
''));
 
 1378                        $ilTabs->activateSubTab($a_active);
 
 1392                if ($ilAccess->checkAccess(
"read", 
"", $a_target))
 
 1394                        $_GET[
"ref_id"] = $a_target;
 
 1395                        $_GET[
"baseClass"] = 
"ilGlossaryPresentationGUI";
 
 1396                        include(
"ilias.php");
 
 1399                else if ($ilAccess->checkAccess(
"visible", 
"", $a_target))
 
 1401                        $_GET[
"ref_id"] = $a_target;
 
 1402                        $_GET[
"cmd"] = 
"infoScreen";
 
 1403                        $_GET[
"baseClass"] = 
"ilGlossaryPresentationGUI";
 
 1404                        include(
"ilias.php");
 
 1407                else if ($ilAccess->checkAccess(
"read", 
"", ROOT_FOLDER_ID))
 
 1422                include_once(
"./Modules/Glossary/classes/class.ilTermListTableGUI.php");
 
 1424                $prtab->resetOffset();
 
 1425                $prtab->writeFilterToSession();
 
 1435                include_once(
"./Modules/Glossary/classes/class.ilTermListTableGUI.php");
 
 1437                $prtab->resetOffset();
 
 1438                $prtab->resetFilter();
 
 1463                $ctpl->setCurrentBlock(
"ContentStyle");
 
 1464                $ctpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
 
 1466                $ctpl->parseCurrentBlock();
 
 1475                global $ilTabs, 
$tpl;
 
 1480                $tpl->setContent($this->form->getHTML());
 
 1482                $ilTabs->activateTab(
"settings");
 
 1493                include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
 
 1494                $lng->loadLanguageModule(
"style");
 
 1496                include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
 
 1499                $fixed_style = 
$ilSetting->get(
"fixed_content_style_id");
 
 1500                $style_id = $this->
object->getStyleSheetId();
 
 1502                if ($fixed_style > 0)
 
 1506                                $this->lng->txt(
"global_fixed").
")");
 
 1507                        $this->form->addItem($st);
 
 1514                        $st_styles[0] = $this->lng->txt(
"default");
 
 1524                                        $this->form->addItem($st);
 
 1529                                        $this->form->addCommandButton(
"editStyle",
 
 1530                                                $lng->txt(
"style_edit_style"));
 
 1531                                        $this->form->addCommandButton(
"deleteStyle",
 
 1532                                                $lng->txt(
"style_delete_style"));
 
 1540                                        $st_styles, 
false, 
true);
 
 1542                                $style_sel->setOptions($st_styles);
 
 1543                                $style_sel->setValue($style_id);
 
 1544                                $this->form->addItem($style_sel);
 
 1546                                $this->form->addCommandButton(
"saveStyleSettings",
 
 1548                                $this->form->addCommandButton(
"createStyle",
 
 1549                                        $lng->txt(
"sty_create_ind_style"));
 
 1552                $this->form->setTitle(
$lng->txt(
"glo_style"));
 
 1553                $this->form->setFormAction(
$ilCtrl->getFormAction($this));
 
 1563                $ilCtrl->redirectByClass(
"ilobjstylesheetgui", 
"create");
 
 1573                $ilCtrl->redirectByClass(
"ilobjstylesheetgui", 
"edit");
 
 1583                $ilCtrl->redirectByClass(
"ilobjstylesheetgui", 
"delete");
 
 1593                include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
 
 1594                if (
$ilSetting->get(
"fixed_content_style_id") <= 0 &&
 
 1596                        || $this->object->getStyleSheetId() == 0))
 
 1599                        $this->
object->update();
 
 1602                $this->ctrl->redirect($this, 
"editStyleProperties");
 
 1612                if ($this->object->getPublicExportFile($a_type) == $a_file)
 
 1614                        return $lng->txt(
"yes");
 
 1630                include_once(
"./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
 
 1632                if (count($tax_ids) > 0)
 
 1634                        include_once(
"./Services/Taxonomy/classes/class.ilTaxonomyExplorerGUI.php");
 
 1636                                "ilobjglossarygui", 
"listTerms");
 
 1637                        if (!$tax_exp->handleCommand())
 
 1640                                $tpl->setLeftNavContent($tax_exp->getHTML().
" ");
 
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
Confirmation screen class.
Class ilECSGlossarySettings.
Export User Interface Class.
Glossary definition page GUI class.
Class ilGlossaryDefinition.
static setShortTextsDirty($a_glo_id)
Set short texts dirty.
Export class for content objects.
GUI class for glossary terms.
static getNumberOfUsages($a_term_id)
Get number of usages.
static _lookGlossaryID($term_id)
get glossary id form term id
static _lookGlossaryTerm($term_id)
get glossary term
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
This class represents a non editable value in a property form.
initSettingsForm($a_mode="edit")
Init settings form.
exportHTML()
create html package
addDefinition()
add definition
deleteStyle()
Delete Style.
moveDefinitionDown()
move a definiton down
setLocator($a_tree="", $a_id="")
set Locator
static _goto($a_target)
redirect script
addUsagesToInfo($info, $glo_id)
Add usages to info.
setContentStyleSheet($a_tpl=null)
Set content style sheet.
setSettingsSubTabs($a_active)
Set sub tabs.
createStyle()
Create Style.
initStylePropertiesForm()
Init style properties form.
frameset()
glossary edit frameset
confirmTermDeletion()
confirm term deletion
confirmDefinitionDeletion()
deletion confirmation screen
getTabs(&$tabs_gui)
get tabs
getPublicAccessColValue($a_type, $a_file)
Get public access value for export table.
applyFilter()
Apply filter.
actTaxonomy()
Show Taxonomy.
showActions($a_actions)
show possible action (form buttons)
properties()
edit properties of object (admin form)
deleteTerms()
delete selected terms
& executeCommand()
execute command
moveDefinitionUp()
move a definiton up
viewObject()
list childs of current object
showTaxonomy()
Show taxonomy.
editStyleProperties()
Edit style properties.
publishExportFile()
download export file
saveObject()
save new content object to db
cancelDefinitionDeletion()
resetFilter()
Reset filter (note: this function existed before data table filter has been introduced.
create()
create new (subobject) in glossary
quickList()
quick term list
deactTaxonomy()
Hide Taxonomy.
export()
export content object
saveStyleSettings()
Save style settings.
initCreateForm($a_new_type)
Init object creation form.
ilObjGlossaryGUI($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
Constructor @access public.
cancelTermDeletion()
cancel deletion of object
showInfoScreen()
Show info screen.
saveProperties()
save properties
static getScormModulesForGlossary($a_glo_id)
Get SCORM modules that assign a certain glossary.
Class ilObjStyleSheetGUI.
getContentStylePath($a_style_id)
get content style path
_getStandardStyles($a_exclude_default_style=false, $a_include_deactivated=false, $a_scope=0)
Get standard styles.
getSyntaxStylePath()
get syntax style path
_lookupStandard($a_id)
Lookup standard flag.
static getUsageOfObject($a_obj_id, $a_include_titles=false)
Get usage of object.
static loadLanguageModule()
Load language module.
GUI class for the workflow of copying objects.
Class ilObjectGUI Basic methods of all Output classes.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
putObjectInTree(ilObject $a_obj, $a_parent_node_id=null)
Add object to tree at given position.
prepareOutput()
prepare output
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
getCreationMode()
get creation mode
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
addHeaderAction()
Add header action menu.
createObject()
create new object form
static initServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Init service settings form.
static updateServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Update service settings.
static _lookupObjId($a_id)
const TITLE_LENGTH
max length of object title
static _lookupTitle($a_id)
lookup object title
static _getAllReferences($a_id)
get all reference ids of object
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
This class represents an option in a radio group.
Taxonomy explorer GUI class.
This class represents a text area property in a property form.
This class represents a text property in a property form.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static redirect($a_script)
http redirect to other script
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 yn2tf($a_yn)
convert "y"/"n" to true/false
static formSelect($selected, $varname, $options, $multiple=false, $direct_text=false, $size="0", $style_class="", $attribs="", $disabled=false)
Builds a select form field with options and shows the selected option first.
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)
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']