ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilObjGlossaryGUI Class Reference

Class ilGlossaryGUI. More...

+ Inheritance diagram for ilObjGlossaryGUI:
+ Collaboration diagram for ilObjGlossaryGUI:

Public Member Functions

 __construct ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor @access public. More...
 
 executeCommand ()
 execute command More...
 
 assignObject ()
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 importObject ()
 
 saveObject ()
 save new content object to db More...
 
 showInfoScreen ()
 Show info screen. More...
 
 viewObject ()
 list childs of current object More...
 
 properties ()
 edit properties of object (admin form) More...
 
 initSettingsForm ($a_mode="edit")
 Init settings form. More...
 
 saveProperties ()
 save properties More...
 
 listTerms ()
 list terms More...
 
 actTaxonomy ()
 Show Taxonomy. More...
 
 deactTaxonomy ()
 Hide Taxonomy. More...
 
 showActions ($a_actions)
 show possible action (form buttons) More...
 
 addTerm ()
 add term More...
 
 moveDefinitionUp ()
 move a definiton up More...
 
 moveDefinitionDown ()
 move a definiton down More...
 
 confirmDefinitionDeletion ()
 deletion confirmation screen More...
 
 cancelDefinitionDeletion ()
 
 deleteDefinition ()
 
 editTerm ()
 edit term More...
 
 updateTerm ()
 update term More...
 
 export ()
 export content object More...
 
 exportHTML ()
 create html package More...
 
 publishExportFile ()
 download export file More...
 
 viewExportLog ()
 
 confirmTermDeletion ()
 confirm term deletion More...
 
 cancelTermDeletion ()
 cancel deletion of object More...
 
 deleteTerms ()
 delete selected terms More...
 
 setLocator ($a_tree="", $a_id="")
 set Locator More...
 
 view ()
 view content More...
 
 create ()
 create new (subobject) in glossary More...
 
 saveTerm ()
 
 addDefinition ()
 add definition More...
 
 getTemplate ()
 
 setTabs ()
 output tabs More...
 
 getTabs ()
 get tabs More...
 
 setSettingsSubTabs ($a_active)
 Set sub tabs. More...
 
 applyFilter ()
 Apply filter. More...
 
 resetFilter ()
 Reset filter (note: this function existed before data table filter has been introduced. More...
 
 setContentStyleSheet ($a_tpl=null)
 Set content style sheet. More...
 
 editStyleProperties ()
 Edit style properties. More...
 
 initStylePropertiesForm ()
 Init style properties form. More...
 
 createStyle ()
 Create Style. More...
 
 editStyle ()
 Edit Style. More...
 
 deleteStyle ()
 Delete Style. More...
 
 saveStyleSettings ()
 Save style settings. More...
 
 getPublicAccessColValue ($a_type, $a_file)
 Get public access value for export table. More...
 
 showTaxonomy ()
 Show taxonomy. More...
 
 editGlossaries ()
 Edit automatically linked glossaries. More...
 
 showGlossarySelector ()
 Select LM Glossary. More...
 
 confirmGlossarySelection ()
 Confirm glossary selection. More...
 
 selectGlossaryLink ()
 Select a glossary and link all its terms. More...
 
 selectGlossary ()
 Select lm glossary. More...
 
 removeGlossary ()
 Remove lm glossary. More...
 
 copyTerms ()
 Copy terms. More...
 
 referenceTerms ()
 Reference terms. More...
 
 clearClipboard ()
 Clear clipboard. More...
 
 pasteTerms ()
 Paste Terms. More...
 
- Public Member Functions inherited from ilObjectGUI
 executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ()
 cancel action and go back to previous page @access public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 editObject ()
 edit object More...
 
 addExternalEditFormCustom (ilPropertyFormGUI $a_form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 list childs of current object More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 

Static Public Member Functions

static addUsagesToInfo ($info, $glo_id)
 Add usages to info. More...
 
static _goto ($a_target)
 redirect script More...
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root. More...
 

Data Fields

 $admin_tabs
 
 $mode
 
 $term
 
- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $ilias
 
 $objDefinition
 
 $tpl
 
 $tree
 
 $lng
 
 $data
 
 $object
 
 $ref_id
 
 $obj_id
 
 $maxcount
 
 $formaction
 
 $return_location
 
 $target_frame
 
 $tab_target_script
 
 $actions
 
 $sub_objects
 
 $omit_locator = false
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 

Protected Attributes

 $term_id
 
 $ctrl
 
 $user
 
 $toolbar
 
 $tabs
 
 $setting
 
 $access
 
 $rbacsystem
 
 $help
 
 $term_perm
 
 $log
 
- Protected Attributes inherited from ilObjectGUI
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 

Additional Inherited Members

- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 showMountWebfolderIcon ()
 
 setTabs ()
 set admin tabs @access public More...
 
 setAdminTabs ()
 set admin tabs @access public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null, $a_catch_errors=true)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 getTabs ()
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 redirectToRefId ($a_ref_id, $a_cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current $_GET["ref_id"] value More...
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjGlossaryGUI::__construct (   $a_data,
  $a_id = 0,
  $a_call_by_reference = true,
  $a_prepare_output = true 
)

Constructor @access public.

Definition at line 92 of file class.ilObjGlossaryGUI.php.

93 {
94 global $DIC;
95
96 $this->ctrl = $DIC->ctrl();
97 $this->lng = $DIC->language();
98 $this->user = $DIC->user();
99 $this->toolbar = $DIC->toolbar();
100 $this->tabs = $DIC->tabs();
101 $this->setting = $DIC["ilSetting"];
102 $this->access = $DIC->access();
103 $this->rbacsystem = $DIC->rbac()->system();
104 $this->help = $DIC["ilHelp"];
105
106 $this->log = ilLoggerFactory::getLogger('glo');
107
108 include_once("./Modules/Glossary/classes/class.ilGlossaryTermPermission.php");
109 $this->term_perm = ilGlossaryTermPermission::getInstance();
110
111 $this->ctrl->saveParameter($this, array("ref_id", "offset"));
112
113 $this->lng->loadLanguageModule("content");
114 $this->lng->loadLanguageModule("glo");
115
116 $this->type = "glo";
117 parent::__construct($a_data, $a_id, $a_call_by_reference, false);
118
119 // determine term id and check whether it is valid (belongs to
120 // current glossary)
121 $this->term_id = (int) $_GET["term_id"];
122 $term_glo_id = ilGlossaryTerm::_lookGlossaryID($this->term_id);
123 include_once("./Modules/Glossary/classes/class.ilGlossaryTermReferences.php");
124 if ($this->term_id > 0 && $term_glo_id != $this->object->getId()
125 && !ilGlossaryTermReferences::isReferenced($this->object->getId(), $this->term_id))
126 {
127 $this->term_id = "";
128 }
129
130 $this->tax_id = $this->object->getTaxonomyId();
131 if ($this->tax_id > 0)
132 {
133 $this->ctrl->saveParameter($this, array("show_tax", "tax_node"));
134
135 include_once("./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
136 $this->tax = new ilObjTaxonomy($this->tax_id);
137 }
138 if ((int) $_GET["tax_node"] > 1 && $this->tax->getTree()->readRootId() != $_GET["tax_node"])
139 {
140 $this->tax_node = (int) $_GET["tax_node"];
141 }
142 }
user()
Definition: user.php:4
$_GET["client_id"]
static isReferenced($a_glo_id, $a_term_id)
Is a term referenced by one or multiple glossaries.
static _lookGlossaryID($term_id)
get glossary id form term id
static getLogger($a_component_id)
Get component logger.
global $DIC

References $_GET, $DIC, ilGlossaryTerm\_lookGlossaryID(), ilGlossaryTermPermission\getInstance(), ilLoggerFactory\getLogger(), ilGlossaryTermReferences\isReferenced(), and user().

+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

static ilObjGlossaryGUI::_goto (   $a_target)
static

redirect script

Parameters
string$a_target

Definition at line 1454 of file class.ilObjGlossaryGUI.php.

1455 {
1456 global $DIC;
1457
1458 $lng = $DIC->language();
1459 $ilAccess = $DIC->access();
1460 $ilErr = $DIC["ilErr"];
1461
1462 if ($ilAccess->checkAccess("read", "", $a_target))
1463 {
1464 $_GET["ref_id"] = $a_target;
1465 $_GET["baseClass"] = "ilGlossaryPresentationGUI";
1466 include("ilias.php");
1467 exit;
1468 }
1469 else if ($ilAccess->checkAccess("visible", "", $a_target))
1470 {
1471 $_GET["ref_id"] = $a_target;
1472 $_GET["cmd"] = "infoScreen";
1473 $_GET["baseClass"] = "ilGlossaryPresentationGUI";
1474 include("ilias.php");
1475 exit;
1476 }
1477 else if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID))
1478 {
1479 ilUtil::sendFailure(sprintf($lng->txt("msg_no_perm_read_item"),
1482 }
1483
1484 $ilErr->raiseError($lng->txt("msg_no_perm_read_lm"), $ilErr->FATAL);
1485 }
sprintf('%.4f', $callTime)
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
global $ilErr
Definition: raiseError.php:16

References $_GET, $DIC, $ilErr, ilObjectGUI\$lng, ilObjectGUI\_gotoRepositoryRoot(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), exit, ilUtil\sendFailure(), and sprintf.

+ Here is the call graph for this function:

◆ actTaxonomy()

ilObjGlossaryGUI::actTaxonomy ( )

Show Taxonomy.

Parameters

return

Definition at line 849 of file class.ilObjGlossaryGUI.php.

850 {
851 $this->ctrl->setParameter($this, "show_tax", 1);
852 $this->ctrl->redirect($this, "listTerms");
853 }

◆ addDefinition()

ilObjGlossaryGUI::addDefinition ( )

add definition

Definition at line 1283 of file class.ilObjGlossaryGUI.php.

1284 {
1285 $term_id = (int) $_GET["term_id"];
1286
1287 include_once("./Modules/Glossary/classes/class.ilGlossaryTerm.php");
1288 $term_glo_id = ilGlossaryTerm::_lookGlossaryID((int) $term_id);
1289 if ($term_glo_id != $this->object->getId())
1290 {
1291 ilUtil::sendFailure($this->lng->txt("glo_term_must_belong_to_glo"), true);
1292 $this->ctrl->redirect($this, "listTerms");
1293 }
1294
1295 // add term
1296 include_once ("./Modules/Glossary/classes/class.ilGlossaryTerm.php");
1298
1299 // add first definition
1300 $def = new ilGlossaryDefinition();
1301 $def->setTermId($term->getId());
1302 $def->setTitle(ilUtil::stripSlashes($term->getTerm()));
1303 $def->create();
1304
1305 $this->ctrl->setParameterByClass("ilglossarydefpagegui", "term_id", $term->getId());
1306 $this->ctrl->setParameterByClass("ilglossarydefpagegui", "def", $def->getId());
1307 $this->ctrl->redirectByClass(array("ilglossarytermgui",
1308 "iltermdefinitioneditorgui", "ilglossarydefpagegui"), "edit");
1309
1310 }
Class ilGlossaryDefinition.
Class ilGlossaryTerm.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled

References $_GET, $term, $term_id, ilGlossaryTerm\_lookGlossaryID(), ilUtil\sendFailure(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ addTerm()

ilObjGlossaryGUI::addTerm ( )

add term

Definition at line 904 of file class.ilObjGlossaryGUI.php.

905 {
906 if (trim($_POST["new_term"]) == "")
907 {
908 ilUtil::sendFailure($this->lng->txt("cont_please_enter_a_term"), true);
909 $this->ctrl->redirect($this, "listTerms");
910 }
911
912 // add term
913 include_once ("./Modules/Glossary/classes/class.ilGlossaryTerm.php");
914 $term = new ilGlossaryTerm();
915 $term->setGlossary($this->object);
916 $term->setTerm(ilUtil::stripSlashes($_POST["new_term"]));
917 $term->setLanguage($_POST["term_language"]);
918 $_SESSION["il_text_lang_".$_GET["ref_id"]] = $_POST["term_language"];
919 $term->create();
920
921 // add first definition
922 $def = new ilGlossaryDefinition();
923 $def->setTermId($term->getId());
924 $def->setTitle(ilUtil::stripSlashes($_POST["new_term"]));
925 $def->create();
926
927 $this->ctrl->setParameterByClass("ilglossarydefpagegui", "term_id", $term->getId());
928 $this->ctrl->setParameterByClass("ilglossarydefpagegui", "def", $def->getId());
929 $this->ctrl->redirectByClass(array("ilglossarytermgui",
930 "iltermdefinitioneditorgui", "ilglossarydefpagegui"), "edit");
931 }
$_POST["username"]
$_SESSION["AccountId"]

References $_POST, $_SESSION, $term, ilUtil\sendFailure(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ addUsagesToInfo()

static ilObjGlossaryGUI::addUsagesToInfo (   $info,
  $glo_id 
)
static

Add usages to info.

Parameters

return

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

496 {
497 global $lng, $ilAccess;
498
499 $info->addSection($lng->txt("glo_usages"));
500 include_once("./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php");
502 foreach ($sms as $sm)
503 {
504 $link = false;
505 $refs = ilObject::_getAllReferences($sm);
506 foreach ($refs as $ref)
507 {
508 if ($link === false)
509 {
510 if ($ilAccess->checkAccess("write", "", $ref))
511 {
512 include_once("./Services/Link/classes/class.ilLink.php");
513 $link = ilLink::_getLink($ref,'sahs');
514 }
515 }
516 }
517
518 $entry = ilObject::_lookupTitle($sm);
519 if ($link !== false)
520 {
521 $entry = "<a href='".$link."' target='_top'>".$entry."</a>";
522 }
523
524 $info->addProperty($lng->txt("obj_sahs"), $entry);
525 }
526 }
static getScormModulesForGlossary($a_glo_id)
Get SCORM modules that assign a certain glossary.
static _getAllReferences($a_id)
get all reference ids of object
$info
Definition: example_052.php:80

References $info, ilObjectGUI\$lng, ilObject\_getAllReferences(), ilLink\_getLink(), ilObject\_lookupTitle(), and ilObjSAHSLearningModule\getScormModulesForGlossary().

Referenced by ilGlossaryPresentationGUI\outputInfoScreen(), and showInfoScreen().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ applyFilter()

ilObjGlossaryGUI::applyFilter ( )

Apply filter.

Definition at line 1490 of file class.ilObjGlossaryGUI.php.

1491 {
1492 include_once("./Modules/Glossary/classes/class.ilTermListTableGUI.php");
1493 $prtab = new ilTermListTableGUI($this, "listTerms", $this->tax_node);
1494 $prtab->resetOffset();
1495 $prtab->writeFilterToSession();
1496 $this->listTerms();
1497 }

References listTerms().

+ Here is the call graph for this function:

◆ assignObject()

ilObjGlossaryGUI::assignObject ( )

Reimplemented from ilObjectGUI.

Definition at line 353 of file class.ilObjGlossaryGUI.php.

354 {
355 include_once("./Modules/Glossary/classes/class.ilObjGlossary.php");
356
357 $this->object = new ilObjGlossary($this->id, true);
358 }
Class ilObjGlossary.

◆ cancelDefinitionDeletion()

ilObjGlossaryGUI::cancelDefinitionDeletion ( )

Definition at line 1013 of file class.ilObjGlossaryGUI.php.

1014 {
1015 $this->ctrl->redirect($this, "listTerms");
1016 }

◆ cancelTermDeletion()

ilObjGlossaryGUI::cancelTermDeletion ( )

cancel deletion of object

@access public

Definition at line 1185 of file class.ilObjGlossaryGUI.php.

1186 {
1187 $this->ctrl->redirect($this, "listTerms");
1188 }

◆ clearClipboard()

ilObjGlossaryGUI::clearClipboard ( )

Clear clipboard.

Parameters

return

Definition at line 1887 of file class.ilObjGlossaryGUI.php.

1888 {
1889 $this->user->clipboardDeleteObjectsOfType("term");
1890 $this->ctrl->redirect($this, "listTerms");
1891 }

References user().

+ Here is the call graph for this function:

◆ confirmDefinitionDeletion()

ilObjGlossaryGUI::confirmDefinitionDeletion ( )

deletion confirmation screen

Definition at line 962 of file class.ilObjGlossaryGUI.php.

963 {
964 //$this->getTemplate();
965 //$this->displayLocator();
966 //$this->setTabs();
967
968 $term = new ilGlossaryTerm($this->term_id);
969
970 $add = "";
971 $nr = ilGlossaryTerm::getNumberOfUsages($this->term_id);
972 if ($nr > 0)
973 {
974 $this->ctrl->setParameterByClass("ilglossarytermgui",
975 "term_id", $this->term_id);
976 $link = "[<a href='".
977 $this->ctrl->getLinkTargetByClass("ilglossarytermgui", "listUsages").
978 "'>".$this->lng->txt("glo_list_usages")."</a>]";
979 $add = "<br/>".sprintf($this->lng->txt("glo_term_is_used_n_times"), $nr)." ".$link;
980 }
981
982 include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
983 $cgui = new ilConfirmationGUI();
984 $cgui->setHeaderText($this->lng->txt("info_delete_sure").$add);
985
986 $cgui->setFormAction($this->ctrl->getFormAction($this));
987 $cgui->setCancel($this->lng->txt("cancel"), "cancelDefinitionDeletion");
988 $cgui->setConfirm($this->lng->txt("confirm"), "deleteDefinition");
989
990 // content style
991 $this->setContentStyleSheet($this->tpl);
992
993 // syntax style
994 $this->tpl->setCurrentBlock("SyntaxStyle");
995 $this->tpl->setVariable("LOCATION_SYNTAX_STYLESHEET",
997 $this->tpl->parseCurrentBlock();
998
999 $definition = new ilGlossaryDefinition($_GET["def"]);
1000 $page_gui = new ilGlossaryDefPageGUI($definition->getId());
1001 $page_gui->setTemplateOutput(false);
1002 $page_gui->setStyleId($this->object->getStyleSheetId());
1003 $page_gui->setSourcecodeDownloadScript("ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=".$_GET["ref_id"]);
1004 $page_gui->setFileDownloadLink("ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=".$_GET["ref_id"]);
1005 $page_gui->setFullscreenLink("ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=".$_GET["ref_id"]);
1006 $output = $page_gui->preview();
1007
1008 $cgui->addItem("def", $_GET["def"], $term->getTerm().$output);
1009
1010 $this->tpl->setContent($cgui->getHTML());
1011 }
Confirmation screen class.
Glossary definition page GUI class.
static getNumberOfUsages($a_term_id)
Get number of usages.
setContentStyleSheet($a_tpl=null)
Set content style sheet.
static getSyntaxStylePath()
get syntax style path
if(!is_dir( $entity_dir)) exit("Fatal Error ([A-Za-z0-9]+)\s+" &#(? foreach( $entity_files as $file) $output

References $_GET, $output, $term, ilGlossaryTerm\getNumberOfUsages(), ilObjStyleSheet\getSyntaxStylePath(), and setContentStyleSheet().

+ Here is the call graph for this function:

◆ confirmGlossarySelection()

ilObjGlossaryGUI::confirmGlossarySelection ( )

Confirm glossary selection.

Definition at line 1752 of file class.ilObjGlossaryGUI.php.

1753 {
1754 include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
1755 $cgui = new ilConfirmationGUI();
1756 $this->ctrl->setParameter($this, "glo_ref_id", $_GET["root_id"]);
1757 $cgui->setFormAction($this->ctrl->getFormAction($this));
1758 $cgui->setHeaderText($this->lng->txt("glo_link_glo_in_glo"));
1759 $cgui->setCancel($this->lng->txt("no"), "selectGlossary");
1760 $cgui->setConfirm($this->lng->txt("yes"), "selectGlossaryLink");
1761 $this->tpl->setContent($cgui->getHTML());
1762 }

References $_GET.

◆ confirmTermDeletion()

ilObjGlossaryGUI::confirmTermDeletion ( )

confirm term deletion

Definition at line 1116 of file class.ilObjGlossaryGUI.php.

1117 {
1118 //$this->prepareOutput();
1119 if (!isset($_POST["id"]))
1120 {
1121 ilUtil::sendFailure($this->lng->txt("no_checkbox"), true);
1122 $this->ctrl->redirect($this, "listTerms");
1123 }
1124
1125 // check ids
1126 include_once("./Modules/Glossary/classes/class.ilGlossaryTerm.php");
1127 include_once("./Modules/Glossary/classes/class.ilGlossaryTermReferences.php");
1128 foreach ($_POST["id"] as $term_id)
1129 {
1130 $term_glo_id = ilGlossaryTerm::_lookGlossaryID((int) $term_id);
1131 if ($term_glo_id != $this->object->getId() && !ilGlossaryTermReferences::isReferenced($this->object->getId(), $term_id))
1132 {
1133 ilUtil::sendFailure($this->lng->txt("glo_term_must_belong_to_glo"), true);
1134 $this->ctrl->redirect($this, "listTerms");
1135 }
1136 }
1137
1138 // display confirmation message
1139 include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
1140 $cgui = new ilConfirmationGUI();
1141 $cgui->setFormAction($this->ctrl->getFormAction($this));
1142 $cgui->setHeaderText($this->lng->txt("info_delete_sure"));
1143 $cgui->setCancel($this->lng->txt("cancel"), "cancelTermDeletion");
1144 $cgui->setConfirm($this->lng->txt("confirm"), "deleteTerms");
1145
1146 include_once("./Modules/Glossary/classes/class.ilGlossaryTermReferences.php");
1147
1148 foreach($_POST["id"] as $id)
1149 {
1150 $term = new ilGlossaryTerm($id);
1151
1152 $add = "";
1154 if ($nr > 0)
1155 {
1156 $this->ctrl->setParameterByClass("ilglossarytermgui",
1157 "term_id", $id);
1158
1159 if (ilGlossaryTermReferences::isReferenced($this->object->getId(), $id))
1160 {
1161 $add = " (".$this->lng->txt("glo_term_reference").")";
1162 }
1163 else
1164 {
1165 $link = "[<a href='".
1166 $this->ctrl->getLinkTargetByClass("ilglossarytermgui", "listUsages").
1167 "'>".$this->lng->txt("glo_list_usages")."</a>]";
1168 $add = "<div class='small'>".
1169 sprintf($this->lng->txt("glo_term_is_used_n_times"), $nr)." ".$link."</div>";
1170
1171 }
1172 }
1173
1174 $cgui->addItem("id[]", $id, $term->getTerm().$add);
1175 }
1176
1177 $this->tpl->setContent($cgui->getHTML());
1178 }

References $_POST, $term, $term_id, ilGlossaryTerm\_lookGlossaryID(), ilGlossaryTerm\getNumberOfUsages(), ilGlossaryTermReferences\isReferenced(), ilUtil\sendFailure(), and sprintf.

+ Here is the call graph for this function:

◆ copyTerms()

ilObjGlossaryGUI::copyTerms ( )

Copy terms.

Parameters

return

Definition at line 1822 of file class.ilObjGlossaryGUI.php.

1823 {
1824 $items = ilUtil::stripSlashesArray($_POST["id"]);
1825 if (!is_array($items))
1826 {
1827 ilUtil::sendFailure($this->lng->txt("no_checkbox"), true);
1828 $this->ctrl->redirect($this, "listTerms");
1829 }
1830
1831 include_once("./Modules/LearningModule/classes/class.ilEditClipboard.php");
1832 $this->user->clipboardDeleteObjectsOfType("term");
1833
1834 // put them into the clipboard
1835 $time = date("Y-m-d H:i:s", time());
1836 $order = 0;
1837 foreach ($items as $id)
1838 {
1839 $this->user->addObjectToClipboard($id,
1840 "term", ilGlossaryTerm::_lookGlossaryTerm($id), 0, $time, $order);
1841 }
1842
1844 ilUtil::sendInfo($this->lng->txt("glo_selected_terms_have_been_copied"), true);
1845 $this->ctrl->redirect($this, "listTerms");
1846 }
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
static setAction($a_action)
static _lookGlossaryTerm($term_id)
get glossary term
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static stripSlashesArray($a_arr, $a_strip_html=true, $a_allow="")
Strip slashes from array.

References $_POST, ilGlossaryTerm\_lookGlossaryTerm(), date, ilUtil\sendFailure(), ilUtil\sendInfo(), ilEditClipboard\setAction(), ilUtil\stripSlashesArray(), and user().

+ Here is the call graph for this function:

◆ create()

ilObjGlossaryGUI::create ( )

create new (subobject) in glossary

Definition at line 1256 of file class.ilObjGlossaryGUI.php.

1257 {
1258 switch($_POST["new_type"])
1259 {
1260 case "term":
1261 $term_gui = new ilGlossaryTermGUI();
1262 $term_gui->create();
1263 break;
1264 }
1265 }
GUI class for glossary terms.

References $_POST.

◆ createStyle()

ilObjGlossaryGUI::createStyle ( )

Create Style.

Definition at line 1623 of file class.ilObjGlossaryGUI.php.

1624 {
1625 $this->ctrl->redirectByClass("ilobjstylesheetgui", "create");
1626 }

◆ deactTaxonomy()

ilObjGlossaryGUI::deactTaxonomy ( )

Hide Taxonomy.

Parameters

return

Definition at line 861 of file class.ilObjGlossaryGUI.php.

862 {
863 $this->ctrl->setParameter($this, "show_tax", "");
864 $this->ctrl->redirect($this, "listTerms");
865 }

◆ deleteDefinition()

ilObjGlossaryGUI::deleteDefinition ( )

Definition at line 1019 of file class.ilObjGlossaryGUI.php.

1020 {
1021 $definition = new ilGlossaryDefinition($_REQUEST["def"]);
1022 $definition->delete();
1023 $this->ctrl->redirect($this, "listTerms");
1024 }

◆ deleteStyle()

ilObjGlossaryGUI::deleteStyle ( )

Delete Style.

Definition at line 1639 of file class.ilObjGlossaryGUI.php.

1640 {
1641 $this->ctrl->redirectByClass("ilobjstylesheetgui", "delete");
1642 }

◆ deleteTerms()

ilObjGlossaryGUI::deleteTerms ( )

delete selected terms

Definition at line 1193 of file class.ilObjGlossaryGUI.php.

1194 {
1195 include_once("./Modules/Glossary/classes/class.ilGlossaryTermReferences.php");
1196 foreach($_POST["id"] as $id)
1197 {
1198 if (ilGlossaryTermReferences::isReferenced($this->object->getId(), $id))
1199 {
1200 $refs = new ilGlossaryTermReferences($this->object->getId());
1201 $refs->deleteTerm($id);
1202 $refs->update();
1203 }
1204 else
1205 {
1206 $term = new ilGlossaryTerm($id);
1207 $term->delete();
1208 }
1209 }
1210 $this->ctrl->redirect($this, "listTerms");
1211 }

References $_POST, $term, and ilGlossaryTermReferences\isReferenced().

+ Here is the call graph for this function:

◆ editGlossaries()

ilObjGlossaryGUI::editGlossaries ( )

Edit automatically linked glossaries.

Parameters

return

Definition at line 1708 of file class.ilObjGlossaryGUI.php.

1709 {
1710 $this->tabs->setTabActive("settings");
1711 $this->setSettingsSubTabs("glossaries");
1712
1713 $this->toolbar->addButton($this->lng->txt("add"),
1714 $this->ctrl->getLinkTarget($this, "showGlossarySelector"));
1715
1716 include_once("./Modules/Glossary/classes/class.ilGlossaryAutoLinkTableGUI.php");
1717 $tab = new ilGlossaryAutoLinkTableGUI($this->object, $this, "editGlossaries");
1718
1719 $this->tpl->setContent($tab->getHTML());
1720 }
TableGUI class for auto link glossaries.
setSettingsSubTabs($a_active)
Set sub tabs.

References $tab, and setSettingsSubTabs().

+ Here is the call graph for this function:

◆ editStyle()

ilObjGlossaryGUI::editStyle ( )

Edit Style.

Definition at line 1631 of file class.ilObjGlossaryGUI.php.

1632 {
1633 $this->ctrl->redirectByClass("ilobjstylesheetgui", "edit");
1634 }

◆ editStyleProperties()

ilObjGlossaryGUI::editStyleProperties ( )

Edit style properties.

Definition at line 1541 of file class.ilObjGlossaryGUI.php.

1542 {
1543 $this->checkPermission("write");
1544
1545 $this->initStylePropertiesForm();
1546 $this->tpl->setContent($this->form->getHTML());
1547
1548 $this->tabs->activateTab("settings");
1549 $this->setSettingsSubTabs("style");
1550 }
initStylePropertiesForm()
Init style properties form.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.

References ilObjectGUI\checkPermission(), initStylePropertiesForm(), and setSettingsSubTabs().

+ Here is the call graph for this function:

◆ editTerm()

ilObjGlossaryGUI::editTerm ( )

edit term

Definition at line 1029 of file class.ilObjGlossaryGUI.php.

1030 {
1031 // deprecated
1032 }

◆ executeCommand()

ilObjGlossaryGUI::executeCommand ( )

execute command

Reimplemented from ilObjectGUI.

Definition at line 147 of file class.ilObjGlossaryGUI.php.

148 {
149 $cmd = $this->ctrl->getCmd();
150 $next_class = $this->ctrl->getNextClass($this);
151
152 $this->log->debug("glossary term, next class ".$next_class.", cmd: ".$cmd);
153
154 switch ($next_class)
155 {
156 case 'ilobjectmetadatagui';
157 $this->checkPermission("write");
158
159 $this->getTemplate();
160 $this->setTabs();
161 $this->setLocator();
162 $this->addHeaderAction();
163
164 $this->tabs_gui->activateTab('meta_data');
165 include_once 'Services/Object/classes/class.ilObjectMetaDataGUI.php';
166 $md_gui = new ilObjectMetaDataGUI($this->object, 'term');
167 $this->ctrl->forwardCommand($md_gui);
168 break;
169
170 case "ilglossarytermgui":
171 if (!$this->term_perm->checkPermission("edit_content", $this->term_id) &&
172 !$this->term_perm->checkPermission("write", $this->term_id))
173 {
174 include_once("./Modules/Glossary/exceptions/class.ilGlossaryException.php");
175 throw new ilGlossaryException("No permission.");
176 }
177 $this->getTemplate();
178// $this->quickList();
179 $this->ctrl->setReturn($this, "listTerms");
180 $term_gui = new ilGlossaryTermGUI($this->term_id);
181 $term_gui->setGlossary($this->object);
182 //$ret = $term_gui->executeCommand();
183 $ret = $this->ctrl->forwardCommand($term_gui);
184 break;
185
186 case "ilinfoscreengui":
187 $this->addHeaderAction();
188 $this->showInfoScreen();
189 break;
190
191 case "ilobjstylesheetgui":
192 include_once ("./Services/Style/Content/classes/class.ilObjStyleSheetGUI.php");
193 $this->ctrl->setReturn($this, "editStyleProperties");
194 $style_gui = new ilObjStyleSheetGUI("", $this->object->getStyleSheetId(), false, false);
195 $style_gui->omitLocator();
196 if ($cmd == "create" || $_GET["new_type"]=="sty")
197 {
198 $style_gui->setCreationMode(true);
199 }
200
201 if ($cmd == "confirmedDelete")
202 {
203 $this->object->setStyleSheetId(0);
204 $this->object->update();
205 }
206
207 $ret = $this->ctrl->forwardCommand($style_gui);
208
209 if ($cmd == "save" || $cmd == "copyStyle" || $cmd == "importStyle")
210 {
211 $style_id = $ret;
212 $this->object->setStyleSheetId($style_id);
213 $this->object->update();
214 $this->ctrl->redirectByClass("ilobjstylesheetgui", "edit");
215 }
216 break;
217
218
219 case 'ilpermissiongui':
220 if (strtolower($_GET["baseClass"]) == "iladministrationgui")
221 {
222 $this->prepareOutput();
223 }
224 else
225 {
226 $this->getTemplate();
227 $this->setTabs();
228 $this->setLocator();
229 $this->addHeaderAction();
230 }
231 include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
232 $perm_gui = new ilPermissionGUI($this);
233 $ret = $this->ctrl->forwardCommand($perm_gui);
234 break;
235
236 case "ilcommonactiondispatchergui":
237 include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
239 $this->ctrl->forwardCommand($gui);
240 break;
241
242 case "ilobjtaxonomygui":
243 $this->getTemplate();
244 $this->setTabs();
245 $this->setLocator();
246 $this->addHeaderAction();
247 $this->tabs->activateTab("settings");
248 $this->setSettingsSubTabs("taxonomy");
249
250 include_once("./Services/Taxonomy/classes/class.ilObjTaxonomyGUI.php");
251 $this->ctrl->setReturn($this, "properties");
252 $tax_gui = new ilObjTaxonomyGUI();
253 $tax_gui->setMultiple(false);
254
255 /*include_once("./Modules/Glossary/classes/class.ilTermTaxInfo.php");
256 $term_info = new ilTermTaxInfo();*/
257 //$tax_gui->activateAssignedItemSorting($term_info, "glo", "term");
258
259 $tax_gui->setAssignedObject($this->object->getId());
260 $ret = $this->ctrl->forwardCommand($tax_gui);
261 break;
262
263 case "ilexportgui":
264 $this->getTemplate();
265 $this->setTabs();
266 $this->tabs->activateTab("export");
267 $this->setLocator();
268 include_once("./Services/Export/classes/class.ilExportGUI.php");
269 $exp_gui = new ilExportGUI($this);
270 //$exp_gui->addFormat("xml", "", $this, "export");
271 $exp_gui->addFormat("xml");
272 $exp_gui->addFormat("html", "", $this, "exportHTML");
273 $exp_gui->addCustomColumn($this->lng->txt("cont_public_access"),
274 $this, "getPublicAccessColValue");
275 $exp_gui->addCustomMultiCommand($this->lng->txt("cont_public_access"),
276 $this, "publishExportFile");
277 $ret = $this->ctrl->forwardCommand($exp_gui);
278 break;
279
280 case 'ilobjectcopygui':
281 $this->prepareOutput();
282 include_once './Services/Object/classes/class.ilObjectCopyGUI.php';
283 $cp = new ilObjectCopyGUI($this);
284 $cp->setType('glo');
285 $this->ctrl->forwardCommand($cp);
286 break;
287
288 case "ilglossaryforeigntermcollectorgui":
289 $this->ctrl->setReturn($this, "");
290 $this->getTemplate();
291 $this->setTabs();
292 $this->setLocator();
293 $this->addHeaderAction();
294 include_once("./Modules/Glossary/classes/class.ilGlossaryForeignTermCollectorGUI.php");
296 $this->ctrl->forwardCommand($coll);
297 break;
298
299 default:
300 $cmd = $this->ctrl->getCmd("listTerms");
301
302 if (($cmd == "create") && ($_POST["new_type"] == "term"))
303 {
304 $this->ctrl->setCmd("create");
305 $this->ctrl->setCmdClass("ilGlossaryTermGUI");
306 $ret = $this->executeCommand();
307 return;
308 }
309 else
310 {
311 if (!in_array($cmd, array("quickList")))
312 {
313 if (strtolower($_GET["baseClass"]) == "iladministrationgui" ||
314 $this->getCreationMode() == true)
315 {
316 $this->prepareOutput();
317 $cmd.= "Object";
318 }
319 else
320 {
321 $this->getTemplate();
322 $this->setTabs();
323 $this->setLocator();
324 $this->addHeaderAction();
325
326 if($cmd == "redrawHeaderAction")
327 {
328 $cmd = "redrawHeaderActionObject";
329 }
330 }
331 }
332 $ret = $this->$cmd();
333 }
334 break;
335 }
336
337 if (!in_array($cmd, array("quickList")))
338 {
339 if (strtolower($_GET["baseClass"]) != "iladministrationgui")
340 {
341 if (!$this->getCreationMode())
342 {
343 $this->tpl->show();
344 }
345 }
346 }
347 else
348 {
349 $this->tpl->show(false);
350 }
351 }
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
Export User Interface Class.
static getInstance(ilObjGlossaryGUI $a_glossary_gui)
Get instance.
executeCommand()
execute command
showInfoScreen()
Show info screen.
Class ilObjStyleSheetGUI.
Taxonomy GUI class.
GUI class for the workflow of copying objects.
prepareOutput($a_show_subobjects=true)
prepare output
getCreationMode()
get creation mode
addHeaderAction()
Add header action menu.
setLocator()
set Locator
Class ilObjectMetaDataGUI.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
$ret
Definition: parser.php:6
$cmd
Definition: sahs_server.php:35

References $_GET, $_POST, $cmd, $ret, ilObjectGUI\addHeaderAction(), ilObjectGUI\checkPermission(), executeCommand(), ilObjectGUI\getCreationMode(), ilGlossaryForeignTermCollectorGUI\getInstance(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), getTemplate(), ilObjectGUI\prepareOutput(), ilObjectGUI\setLocator(), setSettingsSubTabs(), setTabs(), and showInfoScreen().

Referenced by executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ export()

ilObjGlossaryGUI::export ( )

export content object

Definition at line 1054 of file class.ilObjGlossaryGUI.php.

1055 {
1056 $this->checkPermission("write");
1057
1058 require_once("./Modules/Glossary/classes/class.ilGlossaryExport.php");
1059 $glo_exp = new ilGlossaryExport($this->object);
1060 $glo_exp->buildExportFile();
1061 $this->ctrl->redirectByClass("ilexportgui", "");
1062 }
Export class for content objects.

References ilObjectGUI\checkPermission().

+ Here is the call graph for this function:

◆ exportHTML()

ilObjGlossaryGUI::exportHTML ( )

create html package

Definition at line 1067 of file class.ilObjGlossaryGUI.php.

1068 {
1069 require_once("./Modules/Glossary/classes/class.ilGlossaryExport.php");
1070 $glo_exp = new ilGlossaryExport($this->object, "html");
1071 $glo_exp->buildExportFile();
1072//echo $this->tpl->get();
1073 $this->ctrl->redirectByClass("ilexportgui", "");
1074 }

◆ getPublicAccessColValue()

ilObjGlossaryGUI::getPublicAccessColValue (   $a_type,
  $a_file 
)

Get public access value for export table.

Definition at line 1664 of file class.ilObjGlossaryGUI.php.

1665 {
1666 if ($this->object->getPublicExportFile($a_type) == $a_file)
1667 {
1668 return $this->lng->txt("yes");
1669 }
1670
1671 return " ";
1672 }
$a_type
Definition: workflow.php:93

References $a_type.

◆ getTabs()

ilObjGlossaryGUI::getTabs ( )

get tabs

Reimplemented from ilObjectGUI.

Definition at line 1343 of file class.ilObjGlossaryGUI.php.

1344 {
1345 $this->help->setScreenIdComponent("glo");
1346
1347 // list terms
1348 $force_active = ($_GET["cmd"] == "" || $_GET["cmd"] == "listTerms")
1349 ? true
1350 : false;
1351 $this->tabs_gui->addTarget("cont_terms",
1352 $this->ctrl->getLinkTarget($this, "listTerms"), array("listTerms", ""),
1353 get_class($this), "", $force_active);
1354
1355 $force_active = false;
1356 if ($this->ctrl->getCmd() == "showSummary" ||
1357 strtolower($this->ctrl->getNextClass()) == "ilinfoscreengui")
1358 {
1359 $force_active = true;
1360 }
1361 $this->tabs_gui->addTarget("info_short",
1362 $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary"), "",
1363 "ilInfoScreenGUI", "", $force_active);
1364
1365 // properties
1366 if ($this->rbacsystem->checkAccess('write',$this->object->getRefId()))
1367 {
1368 $this->tabs_gui->addTarget("settings",
1369 $this->ctrl->getLinkTarget($this, "properties"), "properties",
1370 get_class($this));
1371
1372 // meta data
1373 include_once "Services/Object/classes/class.ilObjectMetaDataGUI.php";
1374 $mdgui = new ilObjectMetaDataGUI($this->object, "term");
1375 $mdtab = $mdgui->getTab();
1376 if($mdtab)
1377 {
1378 $this->tabs_gui->addTarget("meta_data", $mdtab,
1379 "", "ilobjectmetadatagui");
1380 }
1381
1382 // export
1383 /*$tabs_gui->addTarget("export",
1384 $this->ctrl->getLinkTarget($this, "exportList"),
1385 array("exportList", "viewExportLog"), get_class($this));*/
1386
1387 // export
1388 $this->tabs_gui->addTarget("export",
1389 $this->ctrl->getLinkTargetByClass("ilexportgui", ""),
1390 "", "ilexportgui");
1391 }
1392
1393 // permissions
1394 if ($this->rbacsystem->checkAccess('edit_permission',$this->object->getRefId()))
1395 {
1396 /*$tabs_gui->addTarget("permission_settings",
1397 $this->ctrl->getLinkTarget($this, "perm"),
1398 array("perm", "info"),
1399 get_class($this));
1400 */
1401 $this->tabs_gui->addTarget("perm_settings",
1402 $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"), array("perm","info","owner"), 'ilpermissiongui');
1403
1404 }
1405
1406 $this->tabs_gui->addNonTabbedLink("presentation_view",
1407 $this->lng->txt("glo_presentation_view"),
1408 "ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=".$this->object->getRefID(),
1409 "_top"
1410 );
1411
1412 }

References $_GET.

Referenced by setTabs().

+ Here is the caller graph for this function:

◆ getTemplate()

ilObjGlossaryGUI::getTemplate ( )

Definition at line 1312 of file class.ilObjGlossaryGUI.php.

1313 {
1314 $this->tpl->getStandardTemplate();
1315
1316 $title = $this->object->getTitle();
1317
1318
1319 if ($this->term_id > 0)
1320 {
1321 $this->tpl->setTitle($this->lng->txt("term").": ".
1322 ilGlossaryTerm::_lookGlossaryTerm($this->term_id));
1323 }
1324 else
1325 {
1326 parent::setTitleAndDescription();
1327 $this->tpl->setTitleIcon(ilUtil::getImagePath("icon_glo.svg"));
1328 $this->tpl->setTitle($this->lng->txt("glo").": ".$title);
1329 }
1330 }
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)

References $title, ilGlossaryTerm\_lookGlossaryTerm(), and ilUtil\getImagePath().

Referenced by executeCommand(), and showInfoScreen().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ importObject()

ilObjGlossaryGUI::importObject ( )

Definition at line 409 of file class.ilObjGlossaryGUI.php.

410 {
411 $this->createObject();
412 }
createObject()
create new object form

References ilObjectGUI\createObject().

+ Here is the call graph for this function:

◆ initCreateForm()

ilObjGlossaryGUI::initCreateForm (   $a_new_type)

Init object creation form.

Parameters
string$a_new_type
Returns
ilPropertyFormGUI

Reimplemented from ilObjectGUI.

Definition at line 370 of file class.ilObjGlossaryGUI.php.

371 {
372 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
373 $form = new ilPropertyFormGUI();
374 $form->setTarget("_top");
375 $form->setFormAction($this->ctrl->getFormAction($this));
376 $form->setTitle($this->lng->txt($a_new_type."_new"));
377
378 // title
379 $ti = new ilTextInputGUI($this->lng->txt("title"), "title");
380 $ti->setSize(min(40, ilObject::TITLE_LENGTH));
381 $ti->setMaxLength(ilObject::TITLE_LENGTH);
382 $ti->setRequired(true);
383 $form->addItem($ti);
384
385 // description
386 $ta = new ilTextAreaInputGUI($this->lng->txt("description"), "desc");
387 $ta->setCols(40);
388 $ta->setRows(2);
389 $form->addItem($ta);
390
391 // mode
392 $stati = array(
393 "none"=>$this->lng->txt("glo_mode_normal"),
394 "level"=>$this->lng->txt("glo_mode_level"),
395 "subtree"=>$this->lng->txt("glo_mode_subtree")
396 );
397 $tm = new ilSelectInputGUI($this->lng->txt("glo_mode"), "glo_mode");
398 $tm->setOptions($stati);
399 $tm->setInfo($this->lng->txt("glo_mode_desc"));
400 $tm->setRequired(true);
401 $form->addItem($tm);
402
403 $form->addCommandButton("save", $this->lng->txt($a_new_type."_add"));
404 $form->addCommandButton("cancel", $this->lng->txt("cancel"));
405
406 return $form;
407 }
const TITLE_LENGTH
max length of object title
This class represents a property form user interface.
This class represents a selection list property in a property form.
This class represents a text area property in a property form.
This class represents a text property in a property form.

References ilObject\TITLE_LENGTH.

Referenced by saveObject().

+ Here is the caller graph for this function:

◆ initSettingsForm()

ilObjGlossaryGUI::initSettingsForm (   $a_mode = "edit")

Init settings form.

Parameters
int$a_modeEdit Mode

Definition at line 570 of file class.ilObjGlossaryGUI.php.

571 {
572 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
573 $this->form = new ilPropertyFormGUI();
574
575 // title
576 $title = new ilTextInputGUI($this->lng->txt("title"), "title");
577 $title->setRequired(true);
578 $this->form->addItem($title);
579
580 // description
581 $desc = new ilTextAreaInputGUI($this->lng->txt("desc"), "description");
582 $this->form->addItem($desc);
583
584 $this->lng->loadLanguageModule("rep");
586 $section->setTitle($this->lng->txt('rep_activation_availability'));
587 $this->form->addItem($section);
588
589 // online
590 $online = new ilCheckboxInputGUI($this->lng->txt("cont_online"), "cobj_online");
591 $online->setValue("y");
592 $online->setInfo($this->lng->txt("glo_online_info"));
593 $this->form->addItem($online);
594
596 $section->setTitle($this->lng->txt('glo_content_settings'));
597 $this->form->addItem($section);
598
599 // glossary mode
600 $glo_mode = new ilRadioGroupInputGUI($this->lng->txt("glo_mode"), "glo_mode");
601 //$glo_mode->setInfo($this->lng->txt("glo_mode_desc"));
602 $op1 = new ilRadioOption($this->lng->txt("glo_mode_normal"), "none",$this->lng->txt("glo_mode_normal_info"));
603 $glo_mode->addOption($op1);
604 $op2 = new ilRadioOption($this->lng->txt("glo_mode_level"), "level",$this->lng->txt("glo_mode_level_info"));
605 $glo_mode->addOption($op2);
606 $op3 = new ilRadioOption($this->lng->txt("glo_mode_subtree"), "subtree",$this->lng->txt("glo_mode_subtree_info"));
607 $glo_mode->addOption($op3);
608 $this->form->addItem($glo_mode);
609
610 // glossary mode
611 /*$options = array(
612 "none"=>$this->lng->txt("glo_mode_normal"),
613 "level"=>$this->lng->txt("glo_mode_level"),
614 "subtree"=>$this->lng->txt("glo_mode_subtree")
615 );
616 $glo_mode = new ilSelectInputGUI($this->lng->txt("glo_mode"), "glo_mode");
617 $glo_mode->setOptions($options);
618 $glo_mode->setInfo($this->lng->txt("glo_mode_desc"));
619 $this->form->addItem($glo_mode);*/
620
621
623 $section->setTitle($this->lng->txt('cont_presentation'));
624 $this->form->addItem($section);
625
626 // presentation mode
627 $pres_mode = new ilRadioGroupInputGUI($this->lng->txt("glo_presentation_mode"), "pres_mode");
628 $pres_mode->setValue("table");
629 $op1 = new ilRadioOption($this->lng->txt("glo_table_form"), "table", $this->lng->txt("glo_table_form_info"));
630
631 // short text length
632 $snl = new ilNumberInputGUI($this->lng->txt("glo_text_snippet_length"), "snippet_length");
633 $snl->setMaxValue(3000);
634 $snl->setMinValue(100);
635 $snl->setMaxLength(4);
636 $snl->setSize(4);
637 $snl->setInfo($this->lng->txt("glo_text_snippet_length_info"));
638 $snl->setValue(200);
639 $op1->addSubItem($snl);
640
641 $pres_mode->addOption($op1);
642 $op2 = new ilRadioOption($this->lng->txt("glo_full_definitions"), "full_def", $this->lng->txt("glo_full_definitions_info"));
643 $pres_mode->addOption($op2);
644 $this->form->addItem($pres_mode);
645
646 // show taxonomy
647 include_once("./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
648 $tax_ids = ilObjTaxonomy::getUsageOfObject($this->object->getId());
649 if (count($tax_ids) > 0)
650 {
651 $show_tax = new ilCheckboxInputGUI($this->lng->txt("glo_show_taxonomy"), "show_tax");
652 $show_tax->setInfo($this->lng->txt("glo_show_taxonomy_info"));
653 $this->form->addItem($show_tax);
654 }
655
656 // downloads
657 $down = new ilCheckboxInputGUI($this->lng->txt("cont_downloads"), "glo_act_downloads");
658 $down->setValue("y");
659 $down->setInfo($this->lng->txt("cont_downloads_desc"));
660 $this->form->addItem($down);
661
662 if ($a_mode == "edit")
663 {
664 $title->setValue($this->object->getTitle());
665 $desc->setValue($this->object->getDescription());
666 $online->setChecked($this->object->getOnline());
667 $glo_mode->setValue($this->object->getVirtualMode());
668 $pres_mode->setValue($this->object->getPresentationMode());
669 $snl->setValue($this->object->getSnippetLength());
670 if (count($tax_ids) > 0)
671 {
672 $show_tax->setChecked($this->object->getShowTaxonomy());
673 }
674
675 $down->setChecked($this->object->isActiveDownloads());
676
677 // additional features
678 $feat = new ilFormSectionHeaderGUI();
679 $feat->setTitle($this->lng->txt('obj_features'));
680 $this->form->addItem($feat);
681
682 include_once './Services/Container/classes/class.ilContainer.php';
683 include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
685 $this->object->getId(),
686 $this->form,
687 array(
689 )
690 );
691 }
692
693 // sort columns, if adv fields are given
694 include_once("./Modules/Glossary/classes/class.ilGlossaryAdvMetaDataAdapter.php");
695 $adv_ap = new ilGlossaryAdvMetaDataAdapter($this->object->getId());
696 $cols = $adv_ap->getColumnOrder();
697 if (count($cols) > 1)
698 {
699 include_once './Modules/Glossary/classes/class.ilGloAdvColSortInputGUI.php';
700 $ti = new ilGloAdvColSortInputGUI($this->lng->txt("cont_col_ordering"), "field_order");
701 $this->form->addItem($ti);
702 $ti->setValue($cols);
703 }
704
705 // save and cancel commands
706 $this->form->addCommandButton("saveProperties", $this->lng->txt("save"));
707
708 $this->form->setTitle($this->lng->txt("cont_glo_properties"));
709 $this->form->setFormAction($this->ctrl->getFormAction($this));
710 }
$section
Definition: Utf8Test.php:83
This class represents a checkbox property in a property form.
This class represents a section header in a property form.
Input for adv meta data column sorting in glossaries.
This class represents a number property in a property form.
static getUsageOfObject($a_obj_id, $a_include_titles=false)
Get usage of object.
static initServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Init service settings form.
This class represents a property in a property form.
This class represents an option in a radio group.

References $section, $title, ilObjectServiceSettingsGUI\CUSTOM_METADATA, ilObjTaxonomy\getUsageOfObject(), and ilObjectServiceSettingsGUI\initServiceSettingsForm().

Referenced by properties(), and saveProperties().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initStylePropertiesForm()

ilObjGlossaryGUI::initStylePropertiesForm ( )

Init style properties form.

Definition at line 1555 of file class.ilObjGlossaryGUI.php.

1556 {
1557 include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
1558 $this->lng->loadLanguageModule("style");
1559
1560 include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
1561 $this->form = new ilPropertyFormGUI();
1562
1563 $fixed_style = $this->setting->get("fixed_content_style_id");
1564 $style_id = $this->object->getStyleSheetId();
1565
1566 if ($fixed_style > 0)
1567 {
1568 $st = new ilNonEditableValueGUI($this->lng->txt("style_current_style"));
1569 $st->setValue(ilObject::_lookupTitle($fixed_style)." (".
1570 $this->lng->txt("global_fixed").")");
1571 $this->form->addItem($st);
1572 }
1573 else
1574 {
1575 $st_styles = ilObjStyleSheet::_getStandardStyles(true, false,
1576 $_GET["ref_id"]);
1577
1578 $st_styles[0] = $this->lng->txt("default");
1579 ksort($st_styles);
1580
1581 if ($style_id > 0)
1582 {
1583 // individual style
1584 if (!ilObjStyleSheet::_lookupStandard($style_id))
1585 {
1586 $st = new ilNonEditableValueGUI($this->lng->txt("style_current_style"));
1587 $st->setValue(ilObject::_lookupTitle($style_id));
1588 $this->form->addItem($st);
1589
1590//$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "edit"));
1591
1592 // delete command
1593 $this->form->addCommandButton("editStyle",
1594 $this->lng->txt("style_edit_style"));
1595 $this->form->addCommandButton("deleteStyle",
1596 $this->lng->txt("style_delete_style"));
1597//$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "delete"));
1598 }
1599 }
1600
1601 if ($style_id <= 0 || ilObjStyleSheet::_lookupStandard($style_id))
1602 {
1603 $style_sel = ilUtil::formSelect ($style_id, "style_id",
1604 $st_styles, false, true);
1605 $style_sel = new ilSelectInputGUI($this->lng->txt("style_current_style"), "style_id");
1606 $style_sel->setOptions($st_styles);
1607 $style_sel->setValue($style_id);
1608 $this->form->addItem($style_sel);
1609//$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "create"));
1610 $this->form->addCommandButton("saveStyleSettings",
1611 $this->lng->txt("save"));
1612 $this->form->addCommandButton("createStyle",
1613 $this->lng->txt("sty_create_ind_style"));
1614 }
1615 }
1616 $this->form->setTitle($this->lng->txt("glo_style"));
1617 $this->form->setFormAction($this->ctrl->getFormAction($this));
1618 }
This class represents a non editable value in a property form.
static _lookupStandard($a_id)
Lookup standard flag.
static _getStandardStyles($a_exclude_default_style=false, $a_include_deactivated=false, $a_scope=0)
Get standard styles.
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.

References $_GET, ilObjStyleSheet\_getStandardStyles(), ilObjStyleSheet\_lookupStandard(), ilObject\_lookupTitle(), and ilUtil\formSelect().

Referenced by editStyleProperties().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ listTerms()

ilObjGlossaryGUI::listTerms ( )

list terms

Definition at line 772 of file class.ilObjGlossaryGUI.php.

773 {
774 if ($_GET["show_tax"])
775 {
776 $this->showTaxonomy();
777 }
778
779 // term
780 include_once("./Services/Form/classes/class.ilTextInputGUI.php");
781 $ti = new ilTextInputGUI($this->lng->txt("cont_new_term"), "new_term");
782 $ti->setMaxLength(80);
783 $ti->setSize(20);
784 $this->toolbar->addInputItem($ti, true);
785
786 // language
787 $this->lng->loadLanguageModule("meta");
789 if ($_SESSION["il_text_lang_".$_GET["ref_id"]] != "")
790 {
791 $s_lang = $_SESSION["il_text_lang_".$_GET["ref_id"]];
792 }
793 else
794 {
795 $s_lang = $this->user->getLanguage();
796 }
797 include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
798 $si = new ilSelectInputGUI($this->lng->txt("language"), "term_language");
799 $si->setOptions($lang);
800 $si->setValue($s_lang);
801 $this->toolbar->addInputItem($si, true);
802
803 $this->toolbar->setFormAction($this->ctrl->getFormAction($this));
804 $this->toolbar->addFormButton($this->lng->txt("glo_add_new_term"), "addTerm");
805
806 $this->toolbar->addSeparator();
807
808 //ilEditClipboard::getAction() == "copy"
809 include_once("./Modules/LearningModule/classes/class.ilEditClipboard.php");
810 if ($this->user->clipboardHasObjectsOfType("term"))
811 {
812 $this->toolbar->addButton($this->lng->txt("paste"),
813 $this->ctrl->getLinkTarget($this, "pasteTerms"));
814 $this->toolbar->addButton($this->lng->txt("clear_clipboard"),
815 $this->ctrl->getLinkTarget($this, "clearClipboard"));
816 }
817 else
818 {
819 $this->toolbar->addButton($this->lng->txt("glo_add_from_other"),
820 $this->ctrl->getLinkTargetByClass("ilglossaryforeigntermcollectorgui", ""));
821 }
822
823 if (is_object($this->tax))
824 {
825 $this->toolbar->addSeparator();
826 if ($_GET["show_tax"])
827 {
828 $this->toolbar->addButton($this->lng->txt("glo_hide_taxonomy"),
829 $this->ctrl->getLinkTarget($this, "deactTaxonomy"));
830 }
831 else
832 {
833 $this->toolbar->addButton($this->lng->txt("glo_show_taxonomy"),
834 $this->ctrl->getLinkTarget($this, "actTaxonomy"));
835 }
836 }
837
838 include_once("./Modules/Glossary/classes/class.ilTermListTableGUI.php");
839 $tab = new ilTermListTableGUI($this, "listTerms", $this->tax_node);
840 $this->tpl->setContent($tab->getHTML());
841 }
showTaxonomy()
Show taxonomy.
for($i=1; $i<=count($kw_cases_sel); $i+=1) $lang
Definition: langwiz.php:349

References $_GET, $_SESSION, $lang, $si, $tab, ilMDLanguageItem\_getLanguages(), showTaxonomy(), and user().

Referenced by applyFilter(), and resetFilter().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ moveDefinitionDown()

ilObjGlossaryGUI::moveDefinitionDown ( )

move a definiton down

Definition at line 949 of file class.ilObjGlossaryGUI.php.

950 {
951 include_once("./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
952
953 $definition = new ilGlossaryDefinition($_GET["def"]);
954 $definition->moveDown();
955
956 $this->ctrl->redirect($this, "listTerms");
957 }

References $_GET.

◆ moveDefinitionUp()

ilObjGlossaryGUI::moveDefinitionUp ( )

move a definiton up

Definition at line 936 of file class.ilObjGlossaryGUI.php.

937 {
938 include_once("./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
939
940 $definition = new ilGlossaryDefinition($_GET["def"]);
941 $definition->moveUp();
942
943 $this->ctrl->redirect($this, "listTerms");
944 }

References $_GET.

◆ pasteTerms()

ilObjGlossaryGUI::pasteTerms ( )

Paste Terms.

Definition at line 1896 of file class.ilObjGlossaryGUI.php.

1897 {
1898 include_once("./Modules/LearningModule/classes/class.ilEditClipboard.php");
1899 if (ilEditClipboard::getAction() == "copy")
1900 {
1901 foreach ($this->user->getClipboardObjects("term") as $item)
1902 {
1903 ilGlossaryTerm::_copyTerm($item["id"], $this->object->getId());
1904 }
1905 }
1906 if (ilEditClipboard::getAction() == "link")
1907 {
1908 include_once("./Modules/Glossary/classes/class.ilGlossaryTermReferences.php");
1909 $refs = new ilGlossaryTermReferences($this->object->getId());
1910 foreach ($this->user->getClipboardObjects("term") as $item)
1911 {
1912 $refs->addTerm($item["id"]);
1913 }
1914 $refs->update();
1915 }
1916 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
1917 $this->ctrl->redirect($this, "listTerms");
1918 }
static _copyTerm($a_term_id, $a_glossary_id)
Copy a term to a glossary.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.

References ilGlossaryTerm\_copyTerm(), ilEditClipboard\getAction(), ilUtil\sendSuccess(), and user().

+ Here is the call graph for this function:

◆ properties()

ilObjGlossaryGUI::properties ( )

edit properties of object (admin form)

@access public

Definition at line 549 of file class.ilObjGlossaryGUI.php.

550 {
551 $this->checkPermission("write");
552
553 $this->setSettingsSubTabs("general_settings");
554
555 $this->initSettingsForm();
556
557 // Edit ecs export settings
558 include_once 'Modules/Glossary/classes/class.ilECSGlossarySettings.php';
559 $ecs = new ilECSGlossarySettings($this->object);
560 $ecs->addSettingsToForm($this->form, 'glo');
561
562 $this->tpl->setContent($this->form->getHTML());
563 }
Class ilECSGlossarySettings.
initSettingsForm($a_mode="edit")
Init settings form.

References ilObjectGUI\checkPermission(), initSettingsForm(), and setSettingsSubTabs().

+ Here is the call graph for this function:

◆ publishExportFile()

ilObjGlossaryGUI::publishExportFile ( )

download export file

Definition at line 1079 of file class.ilObjGlossaryGUI.php.

1080 {
1081 if(!isset($_POST["file"]))
1082 {
1083 $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
1084 }
1085 if (count($_POST["file"]) > 1)
1086 {
1087 $this->ilias->raiseError($this->lng->txt("cont_select_max_one_item"),$this->ilias->error_obj->MESSAGE);
1088 }
1089
1090 $file = explode(":", $_POST["file"][0]);
1091 $export_dir = $this->object->getExportDirectory($file[0]);
1092
1093 if ($this->object->getPublicExportFile($file[0]) ==
1094 $file[1])
1095 {
1096 $this->object->setPublicExportFile($file[0], "");
1097 }
1098 else
1099 {
1100 $this->object->setPublicExportFile($file[0], $file[1]);
1101 }
1102 $this->object->update();
1103 $this->ctrl->redirectByClass("ilexportgui", "");
1104 }
redirection script todo: (a better solution should control the processing via a xml file)
if(!file_exists("$old.txt")) if( $old===$new) if(file_exists("$new.txt")) $file

References $_POST, and $file.

◆ referenceTerms()

ilObjGlossaryGUI::referenceTerms ( )

Reference terms.

Parameters

return

Definition at line 1854 of file class.ilObjGlossaryGUI.php.

1855 {
1856 $items = ilUtil::stripSlashesArray($_POST["id"]);
1857 if (!is_array($items))
1858 {
1859 ilUtil::sendFailure($this->lng->txt("no_checkbox"), true);
1860 $this->ctrl->redirect($this, "listTerms");
1861 }
1862
1863 include_once("./Modules/LearningModule/classes/class.ilEditClipboard.php");
1864 $this->user->clipboardDeleteObjectsOfType("term");
1865
1866 // put them into the clipboard
1867 $time = date("Y-m-d H:i:s", time());
1868 $order = 0;
1869 foreach ($items as $id)
1870 {
1871 $this->user->addObjectToClipboard($id,
1872 "term", ilGlossaryTerm::_lookGlossaryTerm($id), 0, $time, $order);
1873 }
1874
1876 ilUtil::sendInfo($this->lng->txt("glo_selected_terms_have_been_copied"), true);
1877 $this->ctrl->redirect($this, "listTerms");
1878 }

References $_POST, ilGlossaryTerm\_lookGlossaryTerm(), date, ilUtil\sendFailure(), ilUtil\sendInfo(), ilEditClipboard\setAction(), ilUtil\stripSlashesArray(), and user().

+ Here is the call graph for this function:

◆ removeGlossary()

ilObjGlossaryGUI::removeGlossary ( )

Remove lm glossary.

Parameters

return

Definition at line 1807 of file class.ilObjGlossaryGUI.php.

1808 {
1809 $this->object->removeAutoGlossary((int) $_GET["glo_id"]);
1810 $this->object->update();
1811
1812 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
1813 $this->ctrl->redirect($this, "editGlossaries");
1814 }

References $_GET, and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ resetFilter()

ilObjGlossaryGUI::resetFilter ( )

Reset filter (note: this function existed before data table filter has been introduced.

Definition at line 1503 of file class.ilObjGlossaryGUI.php.

1504 {
1505 include_once("./Modules/Glossary/classes/class.ilTermListTableGUI.php");
1506 $prtab = new ilTermListTableGUI($this, "listTerms", $this->tax_node);
1507 $prtab->resetOffset();
1508 $prtab->resetFilter();
1509 $this->listTerms();
1510 }

References listTerms().

+ Here is the call graph for this function:

◆ saveObject()

ilObjGlossaryGUI::saveObject ( )

save new content object to db

Reimplemented from ilObjectGUI.

Definition at line 417 of file class.ilObjGlossaryGUI.php.

418 {
419 $new_type = $_REQUEST["new_type"];
420
421 // create permission is already checked in createObject. This check here is done to prevent hacking attempts
422 if (!$this->checkPermissionBool("create", "", $new_type))
423 {
424 $this->ilias->raiseError($this->lng->txt("no_create_permission"), $this->ilias->error_obj->MESSAGE);
425 }
426
427 $this->lng->loadLanguageModule($new_type);
428 $this->ctrl->setParameter($this, "new_type", $new_type);
429
430 $form = $this->initCreateForm($new_type);
431 if ($form->checkInput())
432 {
433 $this->ctrl->setParameter($this, "new_type", "");
434
435 include_once("./Modules/Glossary/classes/class.ilObjGlossary.php");
436 $newObj = new ilObjGlossary();
437 $newObj->setType($new_type);
438 $newObj->setTitle($form->getInput("title"));
439 $newObj->setDescription($form->getInput("desc"));
440 $newObj->setVirtualMode($form->getInput("glo_mode"));
441 $newObj->create();
442
443 $this->putObjectInTree($newObj);
444
445 // always send a message
446 ilUtil::sendSuccess($this->lng->txt("glo_added"),true);
447 ilUtil::redirect("ilias.php?baseClass=ilGlossaryEditorGUI&ref_id=".$newObj->getRefId());
448 }
449
450 // display only this form to correct input
451 $form->setValuesByPost();
452 $this->tpl->setContent($form->getHtml());
453 }
initCreateForm($a_new_type)
Init object creation form.
putObjectInTree(ilObject $a_obj, $a_parent_node_id=null)
Add object to tree at given position.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
static redirect($a_script)
http redirect to other script

References ilObjectGUI\checkPermissionBool(), initCreateForm(), ilObjectGUI\putObjectInTree(), ilUtil\redirect(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ saveProperties()

ilObjGlossaryGUI::saveProperties ( )

save properties

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

717 {
718 $this->initSettingsForm();
719 if ($this->form->checkInput())
720 {
721 $this->object->setTitle($_POST['title']);
722 $this->object->setDescription($_POST['description']);
723 $this->object->setOnline(ilUtil::yn2tf($_POST["cobj_online"]));
724 $this->object->setVirtualMode($_POST["glo_mode"]);
725// $this->object->setActiveGlossaryMenu(ilUtil::yn2tf($_POST["glo_act_menu"]));
726 $this->object->setActiveDownloads(ilUtil::yn2tf($_POST["glo_act_downloads"]));
727 $this->object->setPresentationMode($_POST["pres_mode"]);
728 $this->object->setSnippetLength($_POST["snippet_length"]);
729 $this->object->setShowTaxonomy($_POST["show_tax"]);
730 $this->object->update();
731
732 // field order of advanced metadata
733 include_once("./Modules/Glossary/classes/class.ilGlossaryAdvMetaDataAdapter.php");
734 $adv_ap = new ilGlossaryAdvMetaDataAdapter($this->object->getId());
735 $cols = $adv_ap->getColumnOrder();
736 if (count($cols) > 1)
737 {
738 $adv_ap->saveColumnOrder($_POST["field_order"]);
739 }
740
741 // set definition short texts dirty
742 include_once("./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
743 ilGlossaryDefinition::setShortTextsDirty($this->object->getId());
744
745 include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
747 $this->object->getId(),
748 $this->form,
749 array(
751 )
752 );
753
754 // Update ecs export settings
755 include_once 'Modules/Glossary/classes/class.ilECSGlossarySettings.php';
756 $ecs = new ilECSGlossarySettings($this->object);
757 if($ecs->handleSettingsUpdate())
758 {
759 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
760 $this->ctrl->redirect($this, "properties");
761 }
762
763 }
764 $this->form->setValuesByPost();
765 $this->tpl->setContent($this->form->getHTML());
766 }
static setShortTextsDirty($a_glo_id)
Set short texts dirty.
static updateServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Update service settings.
static yn2tf($a_yn)
convert "y"/"n" to true/false

References $_POST, ilObjectServiceSettingsGUI\CUSTOM_METADATA, initSettingsForm(), ilUtil\sendSuccess(), ilGlossaryDefinition\setShortTextsDirty(), ilObjectServiceSettingsGUI\updateServiceSettingsForm(), and ilUtil\yn2tf().

+ Here is the call graph for this function:

◆ saveStyleSettings()

ilObjGlossaryGUI::saveStyleSettings ( )

Save style settings.

Definition at line 1647 of file class.ilObjGlossaryGUI.php.

1648 {
1649 include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
1650 if ($this->setting->get("fixed_content_style_id") <= 0 &&
1651 (ilObjStyleSheet::_lookupStandard($this->object->getStyleSheetId())
1652 || $this->object->getStyleSheetId() == 0))
1653 {
1654 $this->object->setStyleSheetId(ilUtil::stripSlashes($_POST["style_id"]));
1655 $this->object->update();
1656 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
1657 }
1658 $this->ctrl->redirect($this, "editStyleProperties");
1659 }

References $_POST, ilObjStyleSheet\_lookupStandard(), ilUtil\sendSuccess(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ saveTerm()

ilObjGlossaryGUI::saveTerm ( )

Definition at line 1267 of file class.ilObjGlossaryGUI.php.

1268 {
1269 $term_gui = new ilGlossaryTermGUI();
1270 $term_gui->setGlossary($this->object);
1271 $term_gui->save();
1272
1273 ilUtil::sendSuccess($this->lng->txt("cont_added_term"),true);
1274
1275 //ilUtil::redirect("glossary_edit.php?ref_id=".$_GET["ref_id"]."&cmd=listTerms");
1276 $this->ctrl->redirect($this, "listTerms");
1277 }

References ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ selectGlossary()

ilObjGlossaryGUI::selectGlossary ( )

Select lm glossary.

Parameters

return

Definition at line 1785 of file class.ilObjGlossaryGUI.php.

1786 {
1787 $glos = $this->object->getAutoGlossaries();
1788 $glo_ref_id = (int) $_GET["glo_ref_id"];
1789 $glo_id = ilObject::_lookupObjId($glo_ref_id);
1790 if (!in_array($glo_id, $glos))
1791 {
1792 $glos[] = $glo_id;
1793 }
1794 $this->object->setAutoGlossaries($glos);
1795 $this->object->update();
1796
1797 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
1798 $this->ctrl->redirect($this, "editGlossaries");
1799 }

References $_GET, ilObject\_lookupObjId(), and ilUtil\sendSuccess().

Referenced by selectGlossaryLink().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ selectGlossaryLink()

ilObjGlossaryGUI::selectGlossaryLink ( )

Select a glossary and link all its terms.

Parameters

return

Definition at line 1770 of file class.ilObjGlossaryGUI.php.

1771 {
1772 $glo_ref_id = (int) $_GET["glo_ref_id"];
1773 $glo_id = ilObject::_lookupObjId($glo_ref_id);
1774 $this->object->autoLinkGlossaryTerms($glo_id);
1775 $this->selectGlossary();
1776 }
selectGlossary()
Select lm glossary.

References $_GET, ilObject\_lookupObjId(), and selectGlossary().

+ Here is the call graph for this function:

◆ setContentStyleSheet()

ilObjGlossaryGUI::setContentStyleSheet (   $a_tpl = null)

Set content style sheet.

Definition at line 1520 of file class.ilObjGlossaryGUI.php.

1521 {
1522 if ($a_tpl != null)
1523 {
1524 $ctpl = $a_tpl;
1525 }
1526 else
1527 {
1528 $ctpl = $this->tpl;
1529 }
1530
1531 $ctpl->setCurrentBlock("ContentStyle");
1532 $ctpl->setVariable("LOCATION_CONTENT_STYLESHEET",
1533 ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId()));
1534 $ctpl->parseCurrentBlock();
1535 }
static getContentStylePath($a_style_id)
get content style path

References ilObjectGUI\$tpl, and ilObjStyleSheet\getContentStylePath().

Referenced by confirmDefinitionDeletion().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setLocator()

ilObjGlossaryGUI::setLocator (   $a_tree = "",
  $a_id = "" 
)

set Locator

Parameters
objecttree object
integerreference id @access public

Definition at line 1220 of file class.ilObjGlossaryGUI.php.

1221 {
1222 if(strtolower($_GET["baseClass"]) != "ilglossaryeditorgui")
1223 {
1224 parent::setLocator($a_tree, $a_id);
1225 }
1226 else
1227 {
1228 if(is_object($this->object))
1229 {
1230 require_once("./Modules/Glossary/classes/class.ilGlossaryLocatorGUI.php");
1231 $gloss_loc = new ilGlossaryLocatorGUI();
1232 if (is_object($this->term))
1233 {
1234 $gloss_loc->setTerm($this->term);
1235 }
1236 $gloss_loc->setGlossary($this->object);
1237 //$gloss_loc->setDefinition($this->definition);
1238 $gloss_loc->display();
1239 }
1240 }
1241
1242 }

References $_GET.

◆ setSettingsSubTabs()

ilObjGlossaryGUI::setSettingsSubTabs (   $a_active)

Set sub tabs.

Definition at line 1417 of file class.ilObjGlossaryGUI.php.

1418 {
1419 if (in_array($a_active,
1420 array("general_settings", "style", "taxonomy", "glossaries")))
1421 {
1422 // general properties
1423 $this->tabs->addSubTab("general_settings",
1424 $this->lng->txt("settings"),
1425 $this->ctrl->getLinkTarget($this, 'properties'));
1426
1427 // style properties
1428 $this->tabs->addSubTab("style",
1429 $this->lng->txt("obj_sty"),
1430 $this->ctrl->getLinkTarget($this, 'editStyleProperties'));
1431
1432 // taxonomy
1433 include_once("./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
1435 $this->tabs->addSubTab("taxonomy",
1436 $this->lng->txt("tax_taxonomy"),
1437 $this->ctrl->getLinkTargetByClass("ilobjtaxonomygui", ''));
1438
1439 // style properties
1440 $this->tabs->addSubTab("glossaries",
1441 $this->lng->txt("cont_auto_glossaries"),
1442 $this->ctrl->getLinkTarget($this, 'editGlossaries'));
1443
1444 $this->tabs->activateSubTab($a_active);
1445 }
1446 }
static loadLanguageModule()
Load language module.

References ilObjTaxonomy\loadLanguageModule().

Referenced by editGlossaries(), editStyleProperties(), executeCommand(), properties(), and showGlossarySelector().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setTabs()

ilObjGlossaryGUI::setTabs ( )

output tabs

Reimplemented from ilObjectGUI.

Definition at line 1335 of file class.ilObjGlossaryGUI.php.

1336 {
1337 $this->getTabs();
1338 }

References getTabs().

Referenced by executeCommand(), and showInfoScreen().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showActions()

ilObjGlossaryGUI::showActions (   $a_actions)

show possible action (form buttons)

@access public

Definition at line 873 of file class.ilObjGlossaryGUI.php.

874 {
875 foreach ($a_actions as $name => $lng)
876 {
877 $d[$name] = array("name" => $name, "lng" => $lng);
878 }
879
880 $notoperations = array();
881 $operations = array();
882
883 $operations = $d;
884
885 if (count($operations) > 0)
886 {
887 foreach ($operations as $val)
888 {
889 $this->tpl->setCurrentBlock("tbl_action_btn");
890 $this->tpl->setVariable("BTN_NAME", $val["name"]);
891 $this->tpl->setVariable("BTN_VALUE", $this->lng->txt($val["lng"]));
892 $this->tpl->parseCurrentBlock();
893 }
894
895 $this->tpl->setCurrentBlock("tbl_action_row");
896 $this->tpl->setVariable("IMG_ARROW",ilUtil::getImagePath("arrow_downright.svg"));
897 $this->tpl->parseCurrentBlock();
898 }
899 }
for($col=0; $col< 50; $col++) $d

References $d, ilObjectGUI\$lng, and ilUtil\getImagePath().

+ Here is the call graph for this function:

◆ showGlossarySelector()

ilObjGlossaryGUI::showGlossarySelector ( )

Select LM Glossary.

Parameters

return

Definition at line 1728 of file class.ilObjGlossaryGUI.php.

1729 {
1730 $this->tabs->setTabActive("settings");
1731 $this->setSettingsSubTabs("glossaries");
1732
1733 include_once 'Services/Search/classes/class.ilSearchRootSelector.php';
1734
1735 $exp = new ilSearchRootSelector($this->ctrl->getLinkTarget($this,'showGlossarySelector'));
1736 $exp->setExpand($_GET["search_root_expand"] ? $_GET["search_root_expand"] : $this->tree->readRootId());
1737 $exp->setExpandTarget($this->ctrl->getLinkTarget($this,'showGlossarySelector'));
1738 $exp->setTargetClass(get_class($this));
1739 $exp->setCmd('confirmGlossarySelection');
1740 $exp->setClickableTypes(array("glo"));
1741 $exp->addFilter("glo");
1742
1743 // build html-output
1744 $exp->setOutput(0);
1745 $this->tpl->setContent($exp->getOutput());
1746
1747 }

References $_GET, and setSettingsSubTabs().

+ Here is the call graph for this function:

◆ showInfoScreen()

ilObjGlossaryGUI::showInfoScreen ( )

Show info screen.

Parameters

return

Definition at line 461 of file class.ilObjGlossaryGUI.php.

462 {
463 $this->getTemplate();
464 $this->setTabs();
465 $this->setLocator();
466 $this->lng->loadLanguageModule("meta");
467 include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
468
469 $info = new ilInfoScreenGUI($this);
470 $info->enablePrivateNotes();
471 $info->enableNews();
472 if ($this->access->checkAccess("write", "", $_GET["ref_id"]))
473 {
474 $info->enableNewsEditing();
475 $news_set = new ilSetting("news");
476 $enable_internal_rss = $news_set->get("enable_rss_for_internal");
477 if ($enable_internal_rss)
478 {
479 $info->setBlockProperty("news", "settings", true);
480 }
481 }
482 $info->addMetaDataSections($this->object->getId(),0, $this->object->getType());
483
484 ilObjGlossaryGUI::addUsagesToInfo($info, $this->object->getId());
485
486 $this->ctrl->forwardCommand($info);
487 }
Class ilInfoScreenGUI.
static addUsagesToInfo($info, $glo_id)
Add usages to info.
ILIAS Setting Class.

References $_GET, $info, addUsagesToInfo(), getTemplate(), ilObjectGUI\setLocator(), and setTabs().

Referenced by executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showTaxonomy()

ilObjGlossaryGUI::showTaxonomy ( )

Show taxonomy.

Parameters

return

Definition at line 1680 of file class.ilObjGlossaryGUI.php.

1681 {
1682 include_once("./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
1683 $tax_ids = ilObjTaxonomy::getUsageOfObject($this->object->getId());
1684 if (count($tax_ids) > 0)
1685 {
1686 include_once("./Services/Taxonomy/classes/class.ilTaxonomyExplorerGUI.php");
1687 $tax_exp = new ilTaxonomyExplorerGUI($this, "showTaxonomy", $tax_ids[0],
1688 "ilobjglossarygui", "listTerms");
1689 if (!$tax_exp->handleCommand())
1690 {
1691 //$this->tpl->setLeftNavContent($tax_exp->getHTML());
1692 $this->tpl->setLeftNavContent($tax_exp->getHTML()."&nbsp;");
1693 }
1694 }
1695
1696 }
Taxonomy explorer GUI class.

References ilObjTaxonomy\getUsageOfObject().

Referenced by listTerms().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateTerm()

ilObjGlossaryGUI::updateTerm ( )

update term

Definition at line 1038 of file class.ilObjGlossaryGUI.php.

1039 {
1040 $term = new ilGlossaryTerm($this->term_id);
1041
1042 $term->setTerm(ilUtil::stripSlashes($_POST["term"]));
1043 $term->setLanguage($_POST["term_language"]);
1044 $term->update();
1045 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"),true);
1046 $this->ctrl->redirect($this, "listTerms");
1047 }

References $_POST, $term, ilUtil\sendSuccess(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ view()

ilObjGlossaryGUI::view ( )

view content

Definition at line 1247 of file class.ilObjGlossaryGUI.php.

1248 {
1249 //$this->prepareOutput();
1250 $this->viewObject();
1251 }
viewObject()
list childs of current object

References viewObject().

+ Here is the call graph for this function:

◆ viewExportLog()

ilObjGlossaryGUI::viewExportLog ( )

Definition at line 1109 of file class.ilObjGlossaryGUI.php.

1110 {
1111 }

◆ viewObject()

ilObjGlossaryGUI::viewObject ( )

list childs of current object

@access public

Reimplemented from ilObjectGUI.

Definition at line 529 of file class.ilObjGlossaryGUI.php.

530 {
531 if (strtolower($_GET["baseClass"]) == "iladministrationgui")
532 {
533 parent::viewObject();
534 return;
535 }
536
537 if (!$this->rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
538 {
539 $this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
540 }
541
542 }

References $_GET.

Referenced by view().

+ Here is the caller graph for this function:

Field Documentation

◆ $access

ilObjGlossaryGUI::$access
protected

Definition at line 66 of file class.ilObjGlossaryGUI.php.

◆ $admin_tabs

ilObjGlossaryGUI::$admin_tabs

Definition at line 29 of file class.ilObjGlossaryGUI.php.

◆ $ctrl

ilObjGlossaryGUI::$ctrl
protected

Definition at line 41 of file class.ilObjGlossaryGUI.php.

◆ $help

ilObjGlossaryGUI::$help
protected

Definition at line 76 of file class.ilObjGlossaryGUI.php.

◆ $log

ilObjGlossaryGUI::$log
protected

Definition at line 86 of file class.ilObjGlossaryGUI.php.

◆ $mode

ilObjGlossaryGUI::$mode

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

◆ $rbacsystem

ilObjGlossaryGUI::$rbacsystem
protected

Definition at line 71 of file class.ilObjGlossaryGUI.php.

◆ $setting

ilObjGlossaryGUI::$setting
protected

Definition at line 61 of file class.ilObjGlossaryGUI.php.

◆ $tabs

ilObjGlossaryGUI::$tabs
protected

Definition at line 56 of file class.ilObjGlossaryGUI.php.

◆ $term

ilObjGlossaryGUI::$term

◆ $term_id

ilObjGlossaryGUI::$term_id
protected

Definition at line 36 of file class.ilObjGlossaryGUI.php.

Referenced by addDefinition(), and confirmTermDeletion().

◆ $term_perm

ilObjGlossaryGUI::$term_perm
protected

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

◆ $toolbar

ilObjGlossaryGUI::$toolbar
protected

Definition at line 51 of file class.ilObjGlossaryGUI.php.

◆ $user

ilObjGlossaryGUI::$user
protected

Definition at line 46 of file class.ilObjGlossaryGUI.php.


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