ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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...
 
 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...
 
 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...
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html. 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
 
 $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

 $error
 
 $term_id
 
 $ctrl
 
 $user
 
 $toolbar
 
 $tabs
 
 $setting
 
 $access
 
 $rbacsystem
 
 $help
 
 $term_perm
 
 $log
 
- Protected Attributes inherited from ilObjectGUI
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 

Additional Inherited Members

- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 Get object service. More...
 
 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...
 
 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 97 of file class.ilObjGlossaryGUI.php.

98 {
99 $this->error = $DIC["ilErr"];
100 global $DIC;
101
102 $this->ctrl = $DIC->ctrl();
103 $this->lng = $DIC->language();
104 $this->user = $DIC->user();
105 $this->toolbar = $DIC->toolbar();
106 $this->tabs = $DIC->tabs();
107 $this->setting = $DIC["ilSetting"];
108 $this->access = $DIC->access();
109 $this->rbacsystem = $DIC->rbac()->system();
110 $this->help = $DIC["ilHelp"];
111
112 $this->log = ilLoggerFactory::getLogger('glo');
113
114 include_once("./Modules/Glossary/classes/class.ilGlossaryTermPermission.php");
115 $this->term_perm = ilGlossaryTermPermission::getInstance();
116
117 $this->ctrl->saveParameter($this, array("ref_id", "offset"));
118
119 $this->lng->loadLanguageModule("content");
120 $this->lng->loadLanguageModule("glo");
121
122 $this->type = "glo";
123 parent::__construct($a_data, $a_id, $a_call_by_reference, false);
124
125 // determine term id and check whether it is valid (belongs to
126 // current glossary)
127 $this->term_id = (int) $_GET["term_id"];
128 $term_glo_id = ilGlossaryTerm::_lookGlossaryID($this->term_id);
129 include_once("./Modules/Glossary/classes/class.ilGlossaryTermReferences.php");
130 if ($this->term_id > 0 && $term_glo_id != $this->object->getId()
131 && !ilGlossaryTermReferences::isReferenced($this->object->getId(), $this->term_id)) {
132 $this->term_id = "";
133 }
134
135 $this->tax_id = $this->object->getTaxonomyId();
136 if ($this->tax_id > 0) {
137 $this->ctrl->saveParameter($this, array("show_tax", "tax_node"));
138
139 include_once("./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
140 $this->tax = new ilObjTaxonomy($this->tax_id);
141 }
142 if ((int) $_GET["tax_node"] > 1 && $this->tax->getTree()->readRootId() != $_GET["tax_node"]) {
143 $this->tax_node = (int) $_GET["tax_node"];
144 }
145 }
user()
Definition: user.php:4
$_GET["client_id"]
error($a_errmsg)
set error message @access public
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
Definition: saml.php:7

References $_GET, $DIC, ilGlossaryTerm\_lookGlossaryID(), error(), 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 1441 of file class.ilObjGlossaryGUI.php.

1442 {
1443 global $DIC;
1444
1445 $lng = $DIC->language();
1446 $ilAccess = $DIC->access();
1447 $ilErr = $DIC["ilErr"];
1448
1449 if ($ilAccess->checkAccess("read", "", $a_target)) {
1450 $_GET["ref_id"] = $a_target;
1451 $_GET["baseClass"] = "ilGlossaryPresentationGUI";
1452 include("ilias.php");
1453 exit;
1454 } elseif ($ilAccess->checkAccess("visible", "", $a_target)) {
1455 $_GET["ref_id"] = $a_target;
1456 $_GET["cmd"] = "infoScreen";
1457 $_GET["baseClass"] = "ilGlossaryPresentationGUI";
1458 include("ilias.php");
1459 exit;
1460 } elseif ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
1461 ilUtil::sendFailure(sprintf(
1462 $lng->txt("msg_no_perm_read_item"),
1464 ), true);
1466 }
1467
1468 $ilErr->raiseError($lng->txt("msg_no_perm_read_lm"), $ilErr->FATAL);
1469 }
exit
Definition: backend.php:16
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.

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

+ Here is the call graph for this function:

◆ actTaxonomy()

ilObjGlossaryGUI::actTaxonomy ( )

Show Taxonomy.

Parameters

return

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

834 {
835 $this->ctrl->setParameter($this, "show_tax", 1);
836 $this->ctrl->redirect($this, "listTerms");
837 }

◆ addDefinition()

ilObjGlossaryGUI::addDefinition ( )

add definition

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

1248 {
1249 $term_id = (int) $_GET["term_id"];
1250
1251 include_once("./Modules/Glossary/classes/class.ilGlossaryTerm.php");
1252 $term_glo_id = ilGlossaryTerm::_lookGlossaryID((int) $term_id);
1253 if ($term_glo_id != $this->object->getId()) {
1254 ilUtil::sendFailure($this->lng->txt("glo_term_must_belong_to_glo"), true);
1255 $this->ctrl->redirect($this, "listTerms");
1256 }
1257
1258 // add term
1259 include_once("./Modules/Glossary/classes/class.ilGlossaryTerm.php");
1261
1262 // add first definition
1263 $def = new ilGlossaryDefinition();
1264 $def->setTermId($term->getId());
1265 $def->setTitle(ilUtil::stripSlashes($term->getTerm()));
1266 $def->create();
1267
1268 $this->ctrl->setParameterByClass("ilglossarydefpagegui", "term_id", $term->getId());
1269 $this->ctrl->setParameterByClass("ilglossarydefpagegui", "def", $def->getId());
1270 $this->ctrl->redirectByClass(array("ilglossarytermgui",
1271 "iltermdefinitioneditorgui", "ilglossarydefpagegui"), "edit");
1272 }
Class ilGlossaryDefinition.
Class ilGlossaryTerm.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
$def
Definition: croninfo.php:21

References $_GET, $def, $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 885 of file class.ilObjGlossaryGUI.php.

886 {
887 if (trim($_POST["new_term"]) == "") {
888 ilUtil::sendFailure($this->lng->txt("cont_please_enter_a_term"), true);
889 $this->ctrl->redirect($this, "listTerms");
890 }
891
892 // add term
893 include_once("./Modules/Glossary/classes/class.ilGlossaryTerm.php");
894 $term = new ilGlossaryTerm();
895 $term->setGlossary($this->object);
896 $term->setTerm(ilUtil::stripSlashes($_POST["new_term"]));
897 $term->setLanguage($_POST["term_language"]);
898 $_SESSION["il_text_lang_" . $_GET["ref_id"]] = $_POST["term_language"];
899 $term->create();
900
901 // add first definition
903 $def->setTermId($term->getId());
904 $def->setTitle(ilUtil::stripSlashes($_POST["new_term"]));
905 $def->create();
906
907 $this->ctrl->setParameterByClass("ilglossarydefpagegui", "term_id", $term->getId());
908 $this->ctrl->setParameterByClass("ilglossarydefpagegui", "def", $def->getId());
909 $this->ctrl->redirectByClass(array("ilglossarytermgui",
910 "iltermdefinitioneditorgui", "ilglossarydefpagegui"), "edit");
911 }
$_POST["username"]
$_SESSION["AccountId"]

References $_GET, $_POST, $_SESSION, $def, $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 481 of file class.ilObjGlossaryGUI.php.

482 {
483 global $DIC;
484
485 $lng = $DIC->language();
486 $ilAccess = $DIC->access();
487
488 $info->addSection($lng->txt("glo_usages"));
489 include_once("./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php");
491 foreach ($sms as $sm) {
492 $link = false;
493 $refs = ilObject::_getAllReferences($sm);
494 foreach ($refs as $ref) {
495 if ($link === false) {
496 if ($ilAccess->checkAccess("write", "", $ref)) {
497 include_once("./Services/Link/classes/class.ilLink.php");
498 $link = ilLink::_getLink($ref, 'sahs');
499 }
500 }
501 }
502
503 $entry = ilObject::_lookupTitle($sm);
504 if ($link !== false) {
505 $entry = "<a href='" . $link . "' target='_top'>" . $entry . "</a>";
506 }
507
508 $info->addProperty($lng->txt("obj_sahs"), $entry);
509 }
510 }
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: index.php:5

References $DIC, $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 1474 of file class.ilObjGlossaryGUI.php.

1475 {
1476 include_once("./Modules/Glossary/classes/class.ilTermListTableGUI.php");
1477 $prtab = new ilTermListTableGUI($this, "listTerms", $this->tax_node);
1478 $prtab->resetOffset();
1479 $prtab->writeFilterToSession();
1480 $this->listTerms();
1481 }

References listTerms().

+ Here is the call graph for this function:

◆ assignObject()

ilObjGlossaryGUI::assignObject ( )

Reimplemented from ilObjectGUI.

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

342 {
343 include_once("./Modules/Glossary/classes/class.ilObjGlossary.php");
344
345 $this->object = new ilObjGlossary($this->id, true);
346 }
Class ilObjGlossary.

◆ cancelDefinitionDeletion()

ilObjGlossaryGUI::cancelDefinitionDeletion ( )

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

998 {
999 $this->ctrl->redirect($this, "listTerms");
1000 }

◆ cancelTermDeletion()

ilObjGlossaryGUI::cancelTermDeletion ( )

cancel deletion of object

@access public

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

1161 {
1162 $this->ctrl->redirect($this, "listTerms");
1163 }

◆ clearClipboard()

ilObjGlossaryGUI::clearClipboard ( )

Clear clipboard.

Parameters

return

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

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

References user().

+ Here is the call graph for this function:

◆ confirmDefinitionDeletion()

ilObjGlossaryGUI::confirmDefinitionDeletion ( )

deletion confirmation screen

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

943 {
944 //$this->getTemplate();
945 //$this->displayLocator();
946 //$this->setTabs();
947
948 $term = new ilGlossaryTerm($this->term_id);
949
950 $add = "";
951 $nr = ilGlossaryTerm::getNumberOfUsages($this->term_id);
952 if ($nr > 0) {
953 $this->ctrl->setParameterByClass(
954 "ilglossarytermgui",
955 "term_id",
956 $this->term_id
957 );
958 $link = "[<a href='" .
959 $this->ctrl->getLinkTargetByClass("ilglossarytermgui", "listUsages") .
960 "'>" . $this->lng->txt("glo_list_usages") . "</a>]";
961 $add = "<br/>" . sprintf($this->lng->txt("glo_term_is_used_n_times"), $nr) . " " . $link;
962 }
963
964 include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
965 $cgui = new ilConfirmationGUI();
966 $cgui->setHeaderText($this->lng->txt("info_delete_sure") . $add);
967
968 $cgui->setFormAction($this->ctrl->getFormAction($this));
969 $cgui->setCancel($this->lng->txt("cancel"), "cancelDefinitionDeletion");
970 $cgui->setConfirm($this->lng->txt("confirm"), "deleteDefinition");
971
972 // content style
973 $this->setContentStyleSheet($this->tpl);
974
975 // syntax style
976 $this->tpl->setCurrentBlock("SyntaxStyle");
977 $this->tpl->setVariable(
978 "LOCATION_SYNTAX_STYLESHEET",
980 );
981 $this->tpl->parseCurrentBlock();
982
983 $definition = new ilGlossaryDefinition($_GET["def"]);
984 $page_gui = new ilGlossaryDefPageGUI($definition->getId());
985 $page_gui->setTemplateOutput(false);
986 $page_gui->setStyleId($this->object->getStyleSheetId());
987 $page_gui->setSourcecodeDownloadScript("ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=" . $_GET["ref_id"]);
988 $page_gui->setFileDownloadLink("ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=" . $_GET["ref_id"]);
989 $page_gui->setFullscreenLink("ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=" . $_GET["ref_id"]);
990 $output = $page_gui->preview();
991
992 $cgui->addItem("def", $_GET["def"], $term->getTerm() . $output);
993
994 $this->tpl->setContent($cgui->getHTML());
995 }
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

References $_GET, Sabre\VObject\$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 1746 of file class.ilObjGlossaryGUI.php.

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

References $_GET.

◆ confirmTermDeletion()

ilObjGlossaryGUI::confirmTermDeletion ( )

confirm term deletion

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

1098 {
1099 //$this->prepareOutput();
1100 if (!isset($_POST["id"])) {
1101 ilUtil::sendFailure($this->lng->txt("no_checkbox"), true);
1102 $this->ctrl->redirect($this, "listTerms");
1103 }
1104
1105 // check ids
1106 include_once("./Modules/Glossary/classes/class.ilGlossaryTerm.php");
1107 include_once("./Modules/Glossary/classes/class.ilGlossaryTermReferences.php");
1108 foreach ($_POST["id"] as $term_id) {
1109 $term_glo_id = ilGlossaryTerm::_lookGlossaryID((int) $term_id);
1110 if ($term_glo_id != $this->object->getId() && !ilGlossaryTermReferences::isReferenced($this->object->getId(), $term_id)) {
1111 ilUtil::sendFailure($this->lng->txt("glo_term_must_belong_to_glo"), true);
1112 $this->ctrl->redirect($this, "listTerms");
1113 }
1114 }
1115
1116 // display confirmation message
1117 include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
1118 $cgui = new ilConfirmationGUI();
1119 $cgui->setFormAction($this->ctrl->getFormAction($this));
1120 $cgui->setHeaderText($this->lng->txt("info_delete_sure"));
1121 $cgui->setCancel($this->lng->txt("cancel"), "cancelTermDeletion");
1122 $cgui->setConfirm($this->lng->txt("confirm"), "deleteTerms");
1123
1124 include_once("./Modules/Glossary/classes/class.ilGlossaryTermReferences.php");
1125
1126 foreach ($_POST["id"] as $id) {
1127 $term = new ilGlossaryTerm($id);
1128
1129 $add = "";
1131 if ($nr > 0) {
1132 $this->ctrl->setParameterByClass(
1133 "ilglossarytermgui",
1134 "term_id",
1135 $id
1136 );
1137
1138 if (ilGlossaryTermReferences::isReferenced($this->object->getId(), $id)) {
1139 $add = " (" . $this->lng->txt("glo_term_reference") . ")";
1140 } else {
1141 $link = "[<a href='" .
1142 $this->ctrl->getLinkTargetByClass("ilglossarytermgui", "listUsages") .
1143 "'>" . $this->lng->txt("glo_list_usages") . "</a>]";
1144 $add = "<div class='small'>" .
1145 sprintf($this->lng->txt("glo_term_is_used_n_times"), $nr) . " " . $link . "</div>";
1146 }
1147 }
1148
1149 $cgui->addItem("id[]", $id, $term->getTerm() . $add);
1150 }
1151
1152 $this->tpl->setContent($cgui->getHTML());
1153 }
if(!array_key_exists('StateId', $_REQUEST)) $id

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

+ Here is the call graph for this function:

◆ copyTerms()

ilObjGlossaryGUI::copyTerms ( )

Copy terms.

Parameters

return

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

1816 {
1817 $items = ilUtil::stripSlashesArray($_POST["id"]);
1818 if (!is_array($items)) {
1819 ilUtil::sendFailure($this->lng->txt("no_checkbox"), true);
1820 $this->ctrl->redirect($this, "listTerms");
1821 }
1822
1823 include_once("./Modules/LearningModule/classes/class.ilEditClipboard.php");
1824 $this->user->clipboardDeleteObjectsOfType("term");
1825
1826 // put them into the clipboard
1827 $time = date("Y-m-d H:i:s", time());
1828 $order = 0;
1829 foreach ($items as $id) {
1830 $this->user->addObjectToClipboard(
1831 $id,
1832 "term",
1834 0,
1835 $time,
1836 $order
1837 );
1838 }
1839
1841 ilUtil::sendInfo($this->lng->txt("glo_selected_terms_have_been_copied"), true);
1842 $this->ctrl->redirect($this, "listTerms");
1843 }
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.
$time
Definition: cron.php:21

References $_POST, $id, $time, ilGlossaryTerm\_lookGlossaryTerm(), 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 1221 of file class.ilObjGlossaryGUI.php.

1222 {
1223 switch ($_POST["new_type"]) {
1224 case "term":
1225 $term_gui = new ilGlossaryTermGUI();
1226 $term_gui->create();
1227 break;
1228 }
1229 }
GUI class for glossary terms.

References $_POST.

◆ createStyle()

ilObjGlossaryGUI::createStyle ( )

Create Style.

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

1617 {
1618 $this->ctrl->redirectByClass("ilobjstylesheetgui", "create");
1619 }

◆ deactTaxonomy()

ilObjGlossaryGUI::deactTaxonomy ( )

Hide Taxonomy.

Parameters

return

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

846 {
847 $this->ctrl->setParameter($this, "show_tax", "");
848 $this->ctrl->redirect($this, "listTerms");
849 }

◆ deleteDefinition()

ilObjGlossaryGUI::deleteDefinition ( )

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

1004 {
1005 $definition = new ilGlossaryDefinition($_REQUEST["def"]);
1006 $definition->delete();
1007 $this->ctrl->redirect($this, "listTerms");
1008 }

◆ deleteStyle()

ilObjGlossaryGUI::deleteStyle ( )

Delete Style.

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

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

◆ deleteTerms()

ilObjGlossaryGUI::deleteTerms ( )

delete selected terms

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

1169 {
1170 include_once("./Modules/Glossary/classes/class.ilGlossaryTermReferences.php");
1171 foreach ($_POST["id"] as $id) {
1172 if (ilGlossaryTermReferences::isReferenced($this->object->getId(), $id)) {
1173 $refs = new ilGlossaryTermReferences($this->object->getId());
1174 $refs->deleteTerm($id);
1175 $refs->update();
1176 } else {
1177 $term = new ilGlossaryTerm($id);
1178 $term->delete();
1179 }
1180 }
1181 $this->ctrl->redirect($this, "listTerms");
1182 }

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

+ Here is the call graph for this function:

◆ editGlossaries()

ilObjGlossaryGUI::editGlossaries ( )

Edit automatically linked glossaries.

Parameters

return

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

1702 {
1703 $this->tabs->setTabActive("settings");
1704 $this->setSettingsSubTabs("glossaries");
1705
1706 $this->toolbar->addButton(
1707 $this->lng->txt("add"),
1708 $this->ctrl->getLinkTarget($this, "showGlossarySelector")
1709 );
1710
1711 include_once("./Modules/Glossary/classes/class.ilGlossaryAutoLinkTableGUI.php");
1712 $tab = new ilGlossaryAutoLinkTableGUI($this->object, $this, "editGlossaries");
1713
1714 $this->tpl->setContent($tab->getHTML());
1715 }
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 1624 of file class.ilObjGlossaryGUI.php.

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

◆ editStyleProperties()

ilObjGlossaryGUI::editStyleProperties ( )

Edit style properties.

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

1525 {
1526 $this->checkPermission("write");
1527
1528 $this->initStylePropertiesForm();
1529 $this->tpl->setContent($this->form->getHTML());
1530
1531 $this->tabs->activateTab("settings");
1532 $this->setSettingsSubTabs("style");
1533 }
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 1013 of file class.ilObjGlossaryGUI.php.

1014 {
1015 // deprecated
1016 }

◆ executeCommand()

ilObjGlossaryGUI::executeCommand ( )

execute command

Reimplemented from ilObjectGUI.

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

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

References $_GET, $_POST, $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 1038 of file class.ilObjGlossaryGUI.php.

1039 {
1040 $this->checkPermission("write");
1041
1042 require_once("./Modules/Glossary/classes/class.ilGlossaryExport.php");
1043 $glo_exp = new ilGlossaryExport($this->object);
1044 $glo_exp->buildExportFile();
1045 $this->ctrl->redirectByClass("ilexportgui", "");
1046 }
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 1051 of file class.ilObjGlossaryGUI.php.

1052 {
1053 require_once("./Modules/Glossary/classes/class.ilGlossaryExport.php");
1054 $glo_exp = new ilGlossaryExport($this->object, "html");
1055 $glo_exp->buildExportFile();
1056 //echo $this->tpl->get();
1057 $this->ctrl->redirectByClass("ilexportgui", "");
1058 }

◆ getPublicAccessColValue()

ilObjGlossaryGUI::getPublicAccessColValue (   $a_type,
  $a_file 
)

Get public access value for export table.

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

1657 {
1658 if ($this->object->getPublicExportFile($a_type) == $a_file) {
1659 return $this->lng->txt("yes");
1660 }
1661
1662 return " ";
1663 }
$a_type
Definition: workflow.php:92

References $a_type.

◆ getTabs()

ilObjGlossaryGUI::getTabs ( )

get tabs

Reimplemented from ilObjectGUI.

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

1303 {
1304 $this->help->setScreenIdComponent("glo");
1305
1306 // list terms
1307 $force_active = ($_GET["cmd"] == "" || $_GET["cmd"] == "listTerms")
1308 ? true
1309 : false;
1310 $this->tabs_gui->addTarget(
1311 "cont_terms",
1312 $this->ctrl->getLinkTarget($this, "listTerms"),
1313 array("listTerms", ""),
1314 get_class($this),
1315 "",
1316 $force_active
1317 );
1318
1319 $force_active = false;
1320 if ($this->ctrl->getCmd() == "showSummary" ||
1321 strtolower($this->ctrl->getNextClass()) == "ilinfoscreengui") {
1322 $force_active = true;
1323 }
1324 $this->tabs_gui->addTarget(
1325 "info_short",
1326 $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary"),
1327 "",
1328 "ilInfoScreenGUI",
1329 "",
1330 $force_active
1331 );
1332
1333 // properties
1334 if ($this->rbacsystem->checkAccess('write', $this->object->getRefId())) {
1335 $this->tabs_gui->addTarget(
1336 "settings",
1337 $this->ctrl->getLinkTarget($this, "properties"),
1338 "properties",
1339 get_class($this)
1340 );
1341
1342 // meta data
1343 include_once "Services/Object/classes/class.ilObjectMetaDataGUI.php";
1344 $mdgui = new ilObjectMetaDataGUI($this->object, "term");
1345 $mdtab = $mdgui->getTab();
1346 if ($mdtab) {
1347 $this->tabs_gui->addTarget(
1348 "meta_data",
1349 $mdtab,
1350 "",
1351 "ilobjectmetadatagui"
1352 );
1353 }
1354
1355 // export
1356 /*$tabs_gui->addTarget("export",
1357 $this->ctrl->getLinkTarget($this, "exportList"),
1358 array("exportList", "viewExportLog"), get_class($this));*/
1359
1360 // export
1361 $this->tabs_gui->addTarget(
1362 "export",
1363 $this->ctrl->getLinkTargetByClass("ilexportgui", ""),
1364 "",
1365 "ilexportgui"
1366 );
1367 }
1368
1369 // permissions
1370 if ($this->rbacsystem->checkAccess('edit_permission', $this->object->getRefId())) {
1371 /*$tabs_gui->addTarget("permission_settings",
1372 $this->ctrl->getLinkTarget($this, "perm"),
1373 array("perm", "info"),
1374 get_class($this));
1375 */
1376 $this->tabs_gui->addTarget(
1377 "perm_settings",
1378 $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"),
1379 array("perm","info","owner"),
1380 'ilpermissiongui'
1381 );
1382 }
1383
1384 $this->tabs_gui->addNonTabbedLink(
1385 "presentation_view",
1386 $this->lng->txt("glo_presentation_view"),
1387 "ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=" . $this->object->getRefID(),
1388 "_top"
1389 );
1390 }

References $_GET.

Referenced by setTabs().

+ Here is the caller graph for this function:

◆ getTemplate()

ilObjGlossaryGUI::getTemplate ( )

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

1275 {
1276 $this->tpl->getStandardTemplate();
1277
1278 $title = $this->object->getTitle();
1279
1280
1281 if ($this->term_id > 0) {
1282 $this->tpl->setTitle($this->lng->txt("term") . ": " .
1283 ilGlossaryTerm::_lookGlossaryTerm($this->term_id));
1284 } else {
1285 parent::setTitleAndDescription();
1286 $this->tpl->setTitleIcon(ilUtil::getImagePath("icon_glo.svg"));
1287 $this->tpl->setTitle($this->lng->txt("glo") . ": " . $title);
1288 }
1289 }
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 397 of file class.ilObjGlossaryGUI.php.

398 {
399 $this->createObject();
400 }
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 358 of file class.ilObjGlossaryGUI.php.

359 {
360 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
361 $form = new ilPropertyFormGUI();
362 $form->setTarget("_top");
363 $form->setFormAction($this->ctrl->getFormAction($this));
364 $form->setTitle($this->lng->txt($a_new_type . "_new"));
365
366 // title
367 $ti = new ilTextInputGUI($this->lng->txt("title"), "title");
368 $ti->setSize(min(40, ilObject::TITLE_LENGTH));
369 $ti->setMaxLength(ilObject::TITLE_LENGTH);
370 $ti->setRequired(true);
371 $form->addItem($ti);
372
373 // description
374 $ta = new ilTextAreaInputGUI($this->lng->txt("description"), "desc");
375 $ta->setCols(40);
376 $ta->setRows(2);
377 $form->addItem($ta);
378
379 // mode
380 $stati = array(
381 "none" => $this->lng->txt("glo_mode_normal"),
382 "level" => $this->lng->txt("glo_mode_level"),
383 "subtree" => $this->lng->txt("glo_mode_subtree")
384 );
385 $tm = new ilSelectInputGUI($this->lng->txt("glo_mode"), "glo_mode");
386 $tm->setOptions($stati);
387 $tm->setInfo($this->lng->txt("glo_mode_desc"));
388 $tm->setRequired(true);
389 $form->addItem($tm);
390
391 $form->addCommandButton("save", $this->lng->txt($a_new_type . "_add"));
392 $form->addCommandButton("cancel", $this->lng->txt("cancel"));
393
394 return $form;
395 }
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.
if(isset($_POST['submit'])) $form

References $form, and 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 553 of file class.ilObjGlossaryGUI.php.

554 {
555 $obj_service = $this->getObjectService();
556
557 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
558 $this->form = new ilPropertyFormGUI();
559
560 // title
561 $title = new ilTextInputGUI($this->lng->txt("title"), "title");
562 $title->setRequired(true);
563 $this->form->addItem($title);
564
565 // description
566 $desc = new ilTextAreaInputGUI($this->lng->txt("desc"), "description");
567 $this->form->addItem($desc);
568
569 $this->lng->loadLanguageModule("rep");
571 $section->setTitle($this->lng->txt('rep_activation_availability'));
572 $this->form->addItem($section);
573
574 // online
575 $online = new ilCheckboxInputGUI($this->lng->txt("cont_online"), "cobj_online");
576 $online->setValue("y");
577 $online->setInfo($this->lng->txt("glo_online_info"));
578 $this->form->addItem($online);
579
581 $section->setTitle($this->lng->txt('glo_content_settings'));
582 $this->form->addItem($section);
583
584 // glossary mode
585 $glo_mode = new ilRadioGroupInputGUI($this->lng->txt("glo_mode"), "glo_mode");
586 //$glo_mode->setInfo($this->lng->txt("glo_mode_desc"));
587 $op1 = new ilRadioOption($this->lng->txt("glo_mode_normal"), "none", $this->lng->txt("glo_mode_normal_info"));
588 $glo_mode->addOption($op1);
589 $op2 = new ilRadioOption($this->lng->txt("glo_mode_level"), "level", $this->lng->txt("glo_mode_level_info"));
590 $glo_mode->addOption($op2);
591 $op3 = new ilRadioOption($this->lng->txt("glo_mode_subtree"), "subtree", $this->lng->txt("glo_mode_subtree_info"));
592 $glo_mode->addOption($op3);
593 $this->form->addItem($glo_mode);
594
595 // glossary mode
596 /*$options = array(
597 "none"=>$this->lng->txt("glo_mode_normal"),
598 "level"=>$this->lng->txt("glo_mode_level"),
599 "subtree"=>$this->lng->txt("glo_mode_subtree")
600 );
601 $glo_mode = new ilSelectInputGUI($this->lng->txt("glo_mode"), "glo_mode");
602 $glo_mode->setOptions($options);
603 $glo_mode->setInfo($this->lng->txt("glo_mode_desc"));
604 $this->form->addItem($glo_mode);*/
605
606
608 $section->setTitle($this->lng->txt('cont_presentation'));
609 $this->form->addItem($section);
610
611 // tile image
612 $obj_service->commonSettings()->legacyForm($this->form, $this->object)->addTileImage();
613
614 // presentation mode
615 $pres_mode = new ilRadioGroupInputGUI($this->lng->txt("glo_presentation_mode"), "pres_mode");
616 $pres_mode->setValue("table");
617 $op1 = new ilRadioOption($this->lng->txt("glo_table_form"), "table", $this->lng->txt("glo_table_form_info"));
618
619 // short text length
620 $snl = new ilNumberInputGUI($this->lng->txt("glo_text_snippet_length"), "snippet_length");
621 $snl->setMaxValue(3000);
622 $snl->setMinValue(100);
623 $snl->setMaxLength(4);
624 $snl->setSize(4);
625 $snl->setInfo($this->lng->txt("glo_text_snippet_length_info"));
626 $snl->setValue(200);
627 $op1->addSubItem($snl);
628
629 $pres_mode->addOption($op1);
630 $op2 = new ilRadioOption($this->lng->txt("glo_full_definitions"), "full_def", $this->lng->txt("glo_full_definitions_info"));
631 $pres_mode->addOption($op2);
632 $this->form->addItem($pres_mode);
633
634 // show taxonomy
635 include_once("./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
636 $tax_ids = ilObjTaxonomy::getUsageOfObject($this->object->getId());
637 if (count($tax_ids) > 0) {
638 $show_tax = new ilCheckboxInputGUI($this->lng->txt("glo_show_taxonomy"), "show_tax");
639 $show_tax->setInfo($this->lng->txt("glo_show_taxonomy_info"));
640 $this->form->addItem($show_tax);
641 }
642
643 // downloads
644 $down = new ilCheckboxInputGUI($this->lng->txt("cont_downloads"), "glo_act_downloads");
645 $down->setValue("y");
646 $down->setInfo($this->lng->txt("cont_downloads_desc"));
647 $this->form->addItem($down);
648
649 if ($a_mode == "edit") {
650 $title->setValue($this->object->getTitle());
651 $desc->setValue($this->object->getDescription());
652 $online->setChecked($this->object->getOnline());
653 $glo_mode->setValue($this->object->getVirtualMode());
654 $pres_mode->setValue($this->object->getPresentationMode());
655 $snl->setValue($this->object->getSnippetLength());
656 if (count($tax_ids) > 0) {
657 $show_tax->setChecked($this->object->getShowTaxonomy());
658 }
659
660 $down->setChecked($this->object->isActiveDownloads());
661
662 // additional features
663 $feat = new ilFormSectionHeaderGUI();
664 $feat->setTitle($this->lng->txt('obj_features'));
665 $this->form->addItem($feat);
666
667 include_once './Services/Container/classes/class.ilContainer.php';
668 include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
670 $this->object->getId(),
671 $this->form,
672 array(
674 )
675 );
676 }
677
678 // sort columns, if adv fields are given
679 include_once("./Modules/Glossary/classes/class.ilGlossaryAdvMetaDataAdapter.php");
680 $adv_ap = new ilGlossaryAdvMetaDataAdapter($this->object->getRefId());
681 $cols = $adv_ap->getColumnOrder();
682 if (count($cols) > 1) {
683 include_once './Modules/Glossary/classes/class.ilGloAdvColSortInputGUI.php';
684 $ti = new ilGloAdvColSortInputGUI($this->lng->txt("cont_col_ordering"), "field_order");
685 $this->form->addItem($ti);
686 $ti->setValue($cols);
687 }
688
689 // save and cancel commands
690 $this->form->addCommandButton("saveProperties", $this->lng->txt("save"));
691
692 $this->form->setTitle($this->lng->txt("cont_glo_properties"));
693 $this->form->setFormAction($this->ctrl->getFormAction($this));
694 }
$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.
getObjectService()
Get object service.
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.
$cols
Definition: xhr_table.php:11

References $cols, $section, $title, ilObjectServiceSettingsGUI\CUSTOM_METADATA, ilObjectGUI\getObjectService(), 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 1538 of file class.ilObjGlossaryGUI.php.

1539 {
1540 include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
1541 $this->lng->loadLanguageModule("style");
1542
1543 include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
1544 $this->form = new ilPropertyFormGUI();
1545
1546 $fixed_style = $this->setting->get("fixed_content_style_id");
1547 $style_id = $this->object->getStyleSheetId();
1548
1549 if ($fixed_style > 0) {
1550 $st = new ilNonEditableValueGUI($this->lng->txt("style_current_style"));
1551 $st->setValue(ilObject::_lookupTitle($fixed_style) . " (" .
1552 $this->lng->txt("global_fixed") . ")");
1553 $this->form->addItem($st);
1554 } else {
1556 true,
1557 false,
1558 $_GET["ref_id"]
1559 );
1560
1561 $st_styles[0] = $this->lng->txt("default");
1562 ksort($st_styles);
1563
1564 if ($style_id > 0) {
1565 // individual style
1566 if (!ilObjStyleSheet::_lookupStandard($style_id)) {
1567 $st = new ilNonEditableValueGUI($this->lng->txt("style_current_style"));
1568 $st->setValue(ilObject::_lookupTitle($style_id));
1569 $this->form->addItem($st);
1570
1571 //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "edit"));
1572
1573 // delete command
1574 $this->form->addCommandButton(
1575 "editStyle",
1576 $this->lng->txt("style_edit_style")
1577 );
1578 $this->form->addCommandButton(
1579 "deleteStyle",
1580 $this->lng->txt("style_delete_style")
1581 );
1582 //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "delete"));
1583 }
1584 }
1585
1586 if ($style_id <= 0 || ilObjStyleSheet::_lookupStandard($style_id)) {
1587 $style_sel = ilUtil::formSelect(
1588 $style_id,
1589 "style_id",
1590 $st_styles,
1591 false,
1592 true
1593 );
1594 $style_sel = new ilSelectInputGUI($this->lng->txt("style_current_style"), "style_id");
1595 $style_sel->setOptions($st_styles);
1596 $style_sel->setValue($style_id);
1597 $this->form->addItem($style_sel);
1598 //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "create"));
1599 $this->form->addCommandButton(
1600 "saveStyleSettings",
1601 $this->lng->txt("save")
1602 );
1603 $this->form->addCommandButton(
1604 "createStyle",
1605 $this->lng->txt("sty_create_ind_style")
1606 );
1607 }
1608 }
1609 $this->form->setTitle($this->lng->txt("glo_style"));
1610 $this->form->setFormAction($this->ctrl->getFormAction($this));
1611 }
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 757 of file class.ilObjGlossaryGUI.php.

758 {
759 if ($_GET["show_tax"]) {
760 $this->showTaxonomy();
761 }
762
763 // term
764 include_once("./Services/Form/classes/class.ilTextInputGUI.php");
765 $ti = new ilTextInputGUI($this->lng->txt("cont_new_term"), "new_term");
766 $ti->setMaxLength(80);
767 $ti->setSize(20);
768 $this->toolbar->addInputItem($ti, true);
769
770 // language
771 $this->lng->loadLanguageModule("meta");
773 if ($_SESSION["il_text_lang_" . $_GET["ref_id"]] != "") {
774 $s_lang = $_SESSION["il_text_lang_" . $_GET["ref_id"]];
775 } else {
776 $s_lang = $this->user->getLanguage();
777 }
778 include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
779 $si = new ilSelectInputGUI($this->lng->txt("language"), "term_language");
780 $si->setOptions($lang);
781 $si->setValue($s_lang);
782 $this->toolbar->addInputItem($si, true);
783
784 $this->toolbar->setFormAction($this->ctrl->getFormAction($this));
785 $this->toolbar->addFormButton($this->lng->txt("glo_add_new_term"), "addTerm");
786
787 $this->toolbar->addSeparator();
788
789 //ilEditClipboard::getAction() == "copy"
790 include_once("./Modules/LearningModule/classes/class.ilEditClipboard.php");
791 if ($this->user->clipboardHasObjectsOfType("term")) {
792 $this->toolbar->addButton(
793 $this->lng->txt("paste"),
794 $this->ctrl->getLinkTarget($this, "pasteTerms")
795 );
796 $this->toolbar->addButton(
797 $this->lng->txt("clear_clipboard"),
798 $this->ctrl->getLinkTarget($this, "clearClipboard")
799 );
800 } else {
801 $this->toolbar->addButton(
802 $this->lng->txt("glo_add_from_other"),
803 $this->ctrl->getLinkTargetByClass("ilglossaryforeigntermcollectorgui", "")
804 );
805 }
806
807 if (is_object($this->tax)) {
808 $this->toolbar->addSeparator();
809 if ($_GET["show_tax"]) {
810 $this->toolbar->addButton(
811 $this->lng->txt("glo_hide_taxonomy"),
812 $this->ctrl->getLinkTarget($this, "deactTaxonomy")
813 );
814 } else {
815 $this->toolbar->addButton(
816 $this->lng->txt("glo_show_taxonomy"),
817 $this->ctrl->getLinkTarget($this, "actTaxonomy")
818 );
819 }
820 }
821
822 include_once("./Modules/Glossary/classes/class.ilTermListTableGUI.php");
823 $tab = new ilTermListTableGUI($this, "listTerms", $this->tax_node);
824 $this->tpl->setContent($tab->getHTML());
825 }
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 929 of file class.ilObjGlossaryGUI.php.

930 {
931 include_once("./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
932
933 $definition = new ilGlossaryDefinition($_GET["def"]);
934 $definition->moveDown();
935
936 $this->ctrl->redirect($this, "listTerms");
937 }

References $_GET.

◆ moveDefinitionUp()

ilObjGlossaryGUI::moveDefinitionUp ( )

move a definiton up

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

917 {
918 include_once("./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
919
920 $definition = new ilGlossaryDefinition($_GET["def"]);
921 $definition->moveUp();
922
923 $this->ctrl->redirect($this, "listTerms");
924 }

References $_GET.

◆ pasteTerms()

ilObjGlossaryGUI::pasteTerms ( )

Paste Terms.

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

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

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

+ Here is the call graph for this function:

◆ properties()

ilObjGlossaryGUI::properties ( )

edit properties of object (admin form)

@access public

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

533 {
534 $this->checkPermission("write");
535
536 $this->setSettingsSubTabs("general_settings");
537
538 $this->initSettingsForm();
539
540 // Edit ecs export settings
541 include_once 'Modules/Glossary/classes/class.ilECSGlossarySettings.php';
542 $ecs = new ilECSGlossarySettings($this->object);
543 $ecs->addSettingsToForm($this->form, 'glo');
544
545 $this->tpl->setContent($this->form->getHTML());
546 }
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 1063 of file class.ilObjGlossaryGUI.php.

1064 {
1066
1067 if (!isset($_POST["file"])) {
1068 $ilErr->raiseError($this->lng->txt("no_checkbox"), $ilErr->MESSAGE);
1069 }
1070 if (count($_POST["file"]) > 1) {
1071 $ilErr->raiseError($this->lng->txt("cont_select_max_one_item"), $ilErr->MESSAGE);
1072 }
1073
1074 $file = explode(":", $_POST["file"][0]);
1075 $export_dir = $this->object->getExportDirectory($file[0]);
1076
1077 if ($this->object->getPublicExportFile($file[0]) ==
1078 $file[1]) {
1079 $this->object->setPublicExportFile($file[0], "");
1080 } else {
1081 $this->object->setPublicExportFile($file[0], $file[1]);
1082 }
1083 $this->object->update();
1084 $this->ctrl->redirectByClass("ilexportgui", "");
1085 }

References $_POST, $error, and ilObjectGUI\$ilErr.

◆ referenceTerms()

ilObjGlossaryGUI::referenceTerms ( )

Reference terms.

Parameters

return

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

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

References $_POST, $id, $time, ilGlossaryTerm\_lookGlossaryTerm(), 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 1800 of file class.ilObjGlossaryGUI.php.

1801 {
1802 $this->object->removeAutoGlossary((int) $_GET["glo_id"]);
1803 $this->object->update();
1804
1805 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
1806 $this->ctrl->redirect($this, "editGlossaries");
1807 }

References $_GET.

◆ resetFilter()

ilObjGlossaryGUI::resetFilter ( )

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

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

1488 {
1489 include_once("./Modules/Glossary/classes/class.ilTermListTableGUI.php");
1490 $prtab = new ilTermListTableGUI($this, "listTerms", $this->tax_node);
1491 $prtab->resetOffset();
1492 $prtab->resetFilter();
1493 $this->listTerms();
1494 }

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 405 of file class.ilObjGlossaryGUI.php.

406 {
408
409 $new_type = $_REQUEST["new_type"];
410
411 // create permission is already checked in createObject. This check here is done to prevent hacking attempts
412 if (!$this->checkPermissionBool("create", "", $new_type)) {
413 $ilErr->raiseError($this->lng->txt("no_create_permission"), $ilErr->MESSAGE);
414 }
415
416 $this->lng->loadLanguageModule($new_type);
417 $this->ctrl->setParameter($this, "new_type", $new_type);
418
419 $form = $this->initCreateForm($new_type);
420 if ($form->checkInput()) {
421 $this->ctrl->setParameter($this, "new_type", "");
422
423 include_once("./Modules/Glossary/classes/class.ilObjGlossary.php");
424 $newObj = new ilObjGlossary();
425 $newObj->setType($new_type);
426 $newObj->setTitle($form->getInput("title"));
427 $newObj->setDescription($form->getInput("desc"));
428 $newObj->setVirtualMode($form->getInput("glo_mode"));
429 $newObj->create();
430
431 $this->putObjectInTree($newObj);
432
433 // always send a message
434 ilUtil::sendSuccess($this->lng->txt("glo_added"), true);
435 ilUtil::redirect("ilias.php?baseClass=ilGlossaryEditorGUI&ref_id=" . $newObj->getRefId());
436 }
437
438 // display only this form to correct input
439 $form->setValuesByPost();
440 $this->tpl->setContent($form->getHtml());
441 }
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)

References $error, $form, ilObjectGUI\$ilErr, ilObjectGUI\checkPermissionBool(), initCreateForm(), ilObjectGUI\putObjectInTree(), and ilUtil\redirect().

+ Here is the call graph for this function:

◆ saveProperties()

ilObjGlossaryGUI::saveProperties ( )

save properties

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

701 {
702 $obj_service = $this->getObjectService();
703
704 $this->initSettingsForm();
705 if ($this->form->checkInput()) {
706 $this->object->setTitle($_POST['title']);
707 $this->object->setDescription($_POST['description']);
708 $this->object->setOnline(ilUtil::yn2tf($_POST["cobj_online"]));
709 $this->object->setVirtualMode($_POST["glo_mode"]);
710 // $this->object->setActiveGlossaryMenu(ilUtil::yn2tf($_POST["glo_act_menu"]));
711 $this->object->setActiveDownloads(ilUtil::yn2tf($_POST["glo_act_downloads"]));
712 $this->object->setPresentationMode($_POST["pres_mode"]);
713 $this->object->setSnippetLength($_POST["snippet_length"]);
714 $this->object->setShowTaxonomy($_POST["show_tax"]);
715 $this->object->update();
716
717 // tile image
718 $obj_service->commonSettings()->legacyForm($this->form, $this->object)->saveTileImage();
719
720 // field order of advanced metadata
721 include_once("./Modules/Glossary/classes/class.ilGlossaryAdvMetaDataAdapter.php");
722 $adv_ap = new ilGlossaryAdvMetaDataAdapter($this->object->getRefId());
723 $cols = $adv_ap->getColumnOrder();
724 if (count($cols) > 1) {
725 $adv_ap->saveColumnOrder($_POST["field_order"]);
726 }
727
728 // set definition short texts dirty
729 include_once("./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
730 ilGlossaryDefinition::setShortTextsDirty($this->object->getId());
731
732 include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
734 $this->object->getId(),
735 $this->form,
736 array(
738 )
739 );
740
741 // Update ecs export settings
742 include_once 'Modules/Glossary/classes/class.ilECSGlossarySettings.php';
743 $ecs = new ilECSGlossarySettings($this->object);
744 if ($ecs->handleSettingsUpdate()) {
745 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
746 $this->ctrl->redirect($this, "properties");
747 }
748 }
749 $this->form->setValuesByPost();
750 $this->tpl->setContent($this->form->getHTML());
751 }
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, $cols, ilObjectServiceSettingsGUI\CUSTOM_METADATA, ilObjectGUI\getObjectService(), initSettingsForm(), ilGlossaryDefinition\setShortTextsDirty(), ilObjectServiceSettingsGUI\updateServiceSettingsForm(), and ilUtil\yn2tf().

+ Here is the call graph for this function:

◆ saveStyleSettings()

ilObjGlossaryGUI::saveStyleSettings ( )

Save style settings.

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

1641 {
1642 include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
1643 if ($this->setting->get("fixed_content_style_id") <= 0 &&
1644 (ilObjStyleSheet::_lookupStandard($this->object->getStyleSheetId())
1645 || $this->object->getStyleSheetId() == 0)) {
1646 $this->object->setStyleSheetId(ilUtil::stripSlashes($_POST["style_id"]));
1647 $this->object->update();
1648 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
1649 }
1650 $this->ctrl->redirect($this, "editStyleProperties");
1651 }

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

+ Here is the call graph for this function:

◆ saveTerm()

ilObjGlossaryGUI::saveTerm ( )

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

1232 {
1233 $term_gui = new ilGlossaryTermGUI();
1234 $term_gui->setGlossary($this->object);
1235 $term_gui->save();
1236
1237 ilUtil::sendSuccess($this->lng->txt("cont_added_term"), true);
1238
1239 //ilUtil::redirect("glossary_edit.php?ref_id=".$_GET["ref_id"]."&cmd=listTerms");
1240 $this->ctrl->redirect($this, "listTerms");
1241 }

◆ selectGlossary()

ilObjGlossaryGUI::selectGlossary ( )

Select lm glossary.

Parameters

return

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

1780 {
1781 $glos = $this->object->getAutoGlossaries();
1782 $glo_ref_id = (int) $_GET["glo_ref_id"];
1783 $glo_id = ilObject::_lookupObjId($glo_ref_id);
1784 if (!in_array($glo_id, $glos)) {
1785 $glos[] = $glo_id;
1786 }
1787 $this->object->setAutoGlossaries($glos);
1788 $this->object->update();
1789
1790 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
1791 $this->ctrl->redirect($this, "editGlossaries");
1792 }

References $_GET, and ilObject\_lookupObjId().

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 1764 of file class.ilObjGlossaryGUI.php.

1765 {
1766 $glo_ref_id = (int) $_GET["glo_ref_id"];
1767 $glo_id = ilObject::_lookupObjId($glo_ref_id);
1768 $this->object->autoLinkGlossaryTerms($glo_ref_id);
1769 $this->selectGlossary();
1770 }
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 1504 of file class.ilObjGlossaryGUI.php.

1505 {
1506 if ($a_tpl != null) {
1507 $ctpl = $a_tpl;
1508 } else {
1509 $ctpl = $this->tpl;
1510 }
1511
1512 $ctpl->setCurrentBlock("ContentStyle");
1513 $ctpl->setVariable(
1514 "LOCATION_CONTENT_STYLESHEET",
1515 ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId())
1516 );
1517 $ctpl->parseCurrentBlock();
1518 }
static getContentStylePath($a_style_id, $add_random=true)
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 1191 of file class.ilObjGlossaryGUI.php.

1192 {
1193 if (strtolower($_GET["baseClass"]) != "ilglossaryeditorgui") {
1194 parent::setLocator($a_tree, $a_id);
1195 } else {
1196 if (is_object($this->object)) {
1197 require_once("./Modules/Glossary/classes/class.ilGlossaryLocatorGUI.php");
1198 $gloss_loc = new ilGlossaryLocatorGUI();
1199 if (is_object($this->term)) {
1200 $gloss_loc->setTerm($this->term);
1201 }
1202 $gloss_loc->setGlossary($this->object);
1203 //$gloss_loc->setDefinition($this->definition);
1204 $gloss_loc->display();
1205 }
1206 }
1207 }

References $_GET.

◆ setSettingsSubTabs()

ilObjGlossaryGUI::setSettingsSubTabs (   $a_active)

Set sub tabs.

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

1396 {
1397 if (in_array(
1398 $a_active,
1399 array("general_settings", "style", "taxonomy", "glossaries")
1400 )) {
1401 // general properties
1402 $this->tabs->addSubTab(
1403 "general_settings",
1404 $this->lng->txt("settings"),
1405 $this->ctrl->getLinkTarget($this, 'properties')
1406 );
1407
1408 // style properties
1409 $this->tabs->addSubTab(
1410 "style",
1411 $this->lng->txt("obj_sty"),
1412 $this->ctrl->getLinkTarget($this, 'editStyleProperties')
1413 );
1414
1415 // taxonomy
1416 include_once("./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
1418 $this->tabs->addSubTab(
1419 "taxonomy",
1420 $this->lng->txt("tax_taxonomy"),
1421 $this->ctrl->getLinkTargetByClass("ilobjtaxonomygui", '')
1422 );
1423
1424 // style properties
1425 $this->tabs->addSubTab(
1426 "glossaries",
1427 $this->lng->txt("cont_auto_glossaries"),
1428 $this->ctrl->getLinkTarget($this, 'editGlossaries')
1429 );
1430
1431 $this->tabs->activateSubTab($a_active);
1432 }
1433 }
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 1294 of file class.ilObjGlossaryGUI.php.

1295 {
1296 $this->getTabs();
1297 }

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 857 of file class.ilObjGlossaryGUI.php.

858 {
859 foreach ($a_actions as $name => $lng) {
860 $d[$name] = array("name" => $name, "lng" => $lng);
861 }
862
863 $notoperations = array();
864 $operations = array();
865
866 $operations = $d;
867
868 if (count($operations) > 0) {
869 foreach ($operations as $val) {
870 $this->tpl->setCurrentBlock("tbl_action_btn");
871 $this->tpl->setVariable("BTN_NAME", $val["name"]);
872 $this->tpl->setVariable("BTN_VALUE", $this->lng->txt($val["lng"]));
873 $this->tpl->parseCurrentBlock();
874 }
875
876 $this->tpl->setCurrentBlock("tbl_action_row");
877 $this->tpl->setVariable("IMG_ARROW", ilUtil::getImagePath("arrow_downright.svg"));
878 $this->tpl->parseCurrentBlock();
879 }
880 }
for( $i=6;$i< 13;$i++) for($i=1; $i< 13; $i++) $d
Definition: date.php:296

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

+ Here is the call graph for this function:

◆ showGlossarySelector()

ilObjGlossaryGUI::showGlossarySelector ( )

Select LM Glossary.

Parameters

return

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

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

References $_GET, and setSettingsSubTabs().

+ Here is the call graph for this function:

◆ showInfoScreen()

ilObjGlossaryGUI::showInfoScreen ( )

Show info screen.

Parameters

return

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

450 {
451 $this->getTemplate();
452 $this->setTabs();
453 $this->setLocator();
454 $this->lng->loadLanguageModule("meta");
455 include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
456
457 $info = new ilInfoScreenGUI($this);
458 $info->enablePrivateNotes();
459 $info->enableNews();
460 if ($this->access->checkAccess("write", "", $_GET["ref_id"])) {
461 $info->enableNewsEditing();
462 $news_set = new ilSetting("news");
463 $enable_internal_rss = $news_set->get("enable_rss_for_internal");
464 if ($enable_internal_rss) {
465 $info->setBlockProperty("news", "settings", true);
466 }
467 }
468 $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
469
470 ilObjGlossaryGUI::addUsagesToInfo($info, $this->object->getId());
471
472 $this->ctrl->forwardCommand($info);
473 }
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 1671 of file class.ilObjGlossaryGUI.php.

1672 {
1673 include_once("./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
1674 $tax_ids = ilObjTaxonomy::getUsageOfObject($this->object->getId());
1675 if (count($tax_ids) > 0) {
1676 include_once("./Services/Taxonomy/classes/class.ilTaxonomyExplorerGUI.php");
1677 $tax_exp = new ilTaxonomyExplorerGUI(
1678 $this,
1679 "showTaxonomy",
1680 $tax_ids[0],
1681 "ilobjglossarygui",
1682 "listTerms"
1683 );
1684 if (!$tax_exp->handleCommand()) {
1685 //$this->tpl->setLeftNavContent($tax_exp->getHTML());
1686 $this->tpl->setLeftNavContent($tax_exp->getHTML() . "&nbsp;");
1687 }
1688 }
1689 }
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 1022 of file class.ilObjGlossaryGUI.php.

1023 {
1024 $term = new ilGlossaryTerm($this->term_id);
1025
1026 $term->setTerm(ilUtil::stripSlashes($_POST["term"]));
1027 $term->setLanguage($_POST["term_language"]);
1028 $term->update();
1029 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
1030 $this->ctrl->redirect($this, "listTerms");
1031 }

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

+ Here is the call graph for this function:

◆ view()

ilObjGlossaryGUI::view ( )

view content

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

1213 {
1214 //$this->prepareOutput();
1215 $this->viewObject();
1216 }
viewObject()
list childs of current object

References viewObject().

+ Here is the call graph for this function:

◆ viewExportLog()

ilObjGlossaryGUI::viewExportLog ( )

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

1091 {
1092 }

◆ viewObject()

ilObjGlossaryGUI::viewObject ( )

list childs of current object

@access public

Reimplemented from ilObjectGUI.

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

514 {
516
517 if (strtolower($_GET["baseClass"]) == "iladministrationgui") {
518 parent::viewObject();
519 return;
520 }
521
522 if (!$this->rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
523 $ilErr->raiseError($this->lng->txt("permission_denied"), $ilErr->MESSAGE);
524 }
525 }

References $_GET, $error, and ilObjectGUI\$ilErr.

Referenced by view().

+ Here is the caller graph for this function:

Field Documentation

◆ $access

ilObjGlossaryGUI::$access
protected

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

◆ $admin_tabs

ilObjGlossaryGUI::$admin_tabs

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

◆ $ctrl

ilObjGlossaryGUI::$ctrl
protected

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

◆ $error

ilObjGlossaryGUI::$error
protected

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

Referenced by publishExportFile(), saveObject(), and viewObject().

◆ $help

ilObjGlossaryGUI::$help
protected

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

◆ $log

ilObjGlossaryGUI::$log
protected

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

◆ $mode

ilObjGlossaryGUI::$mode

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

◆ $rbacsystem

ilObjGlossaryGUI::$rbacsystem
protected

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

◆ $setting

ilObjGlossaryGUI::$setting
protected

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

◆ $tabs

ilObjGlossaryGUI::$tabs
protected

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

◆ $term

ilObjGlossaryGUI::$term

◆ $term_id

ilObjGlossaryGUI::$term_id
protected

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

Referenced by addDefinition(), and confirmTermDeletion().

◆ $term_perm

ilObjGlossaryGUI::$term_perm
protected

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

◆ $toolbar

ilObjGlossaryGUI::$toolbar
protected

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

◆ $user

ilObjGlossaryGUI::$user
protected

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


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