ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
ilObjGlossaryGUI Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

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

Public Member Functions

 __construct ( $a_data, int $a_id=0, bool $a_call_by_reference=true, bool $a_prepare_output=true)
 
 executeCommand ()
 
 importObject ()
 
 saveObject ()
 
 showInfoScreen ()
 
 viewObject ()
 
 properties ()
 
 initSettingsForm (string $a_mode="edit")
 
 saveProperties ()
 
 listTerms ()
 
 actTaxonomy ()
 
 deactTaxonomy ()
 Hide Taxonomy. More...
 
 addTerm ()
 add term More...
 
 moveDefinitionUp ()
 move a definition up More...
 
 moveDefinitionDown ()
 move a definition down More...
 
 confirmDefinitionDeletion ()
 deletion confirmation screen More...
 
 cancelDefinitionDeletion ()
 
 deleteDefinition ()
 
 export ()
 
 exportHTML ()
 create html package More...
 
 publishExportFile ()
 download export file More...
 
 confirmTermDeletion ()
 
 cancelTermDeletion ()
 
 deleteTerms ()
 
 view ()
 
 addDefinition ()
 
 getTemplate ()
 
 setSettingsSubTabs (string $a_active)
 
 applyFilter ()
 
 resetFilter ()
 
 setContentStyleSheet (ilGlobalTemplateInterface $a_tpl=null)
 
 getPublicAccessColValue (string $a_type, string $a_file)
 Get public access value for export table. More...
 
 showTaxonomy ()
 Show taxonomy. More...
 
 editGlossaries ()
 Edit automatically linked glossaries. More...
 
 showGlossarySelector ()
 Show auto glossary selection. More...
 
 confirmGlossarySelection ()
 
 selectGlossaryLink ()
 Select a glossary and link all its terms. More...
 
 selectGlossary ()
 Select auto glossary. More...
 
 removeGlossary ()
 
 copyTerms ()
 Copy terms to clipboard. More...
 
 referenceTerms ()
 Add terms to be referenced to clipboard. More...
 
 clearClipboard ()
 
 pasteTerms ()
 
- Public Member Functions inherited from ilObjectGUI
 __construct ($data, int $id=0, bool $call_by_reference=true, bool $prepare_output=true)
 
 getRefId ()
 
 setAdminMode (string $mode)
 
 getAdminMode ()
 
 getObject ()
 
 executeCommand ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode (bool $mode=true)
 if true, a creation screen is displayed the current [ref_id] don't belong to the current class! The mode is determined in ilRepositoryGUI More...
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 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 More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 
 getDidacticTemplateVar (string $type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $obj, int $parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 
 addExternalEditFormCustom (ilPropertyFormGUI $form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction (string $cmd, string $default_form_action="")
 Get form action for command (command is method name without "Object", e.g. More...
 
 isVisible (int $ref_id, string $type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject (bool $error=false)
 Display deletion confirmation screen. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html Should be overwritten and redirect to settings screen. More...
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

Static Public Member Functions

static addUsagesToInfo (ilInfoScreenGUI $info, int $glo_id)
 Add usages to info screen. More...
 
static _goto (string $a_target)
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot (bool $raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode (int $ref_id, string $cmd="")
 
static _gotoSharedWorkspaceNode (int $wsp_id)
 

Data Fields

ilGlossaryTerm $term = null
 
- Data Fields inherited from ilObjectGUI
const ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
 
const ADMIN_MODE_NONE = ""
 
const ADMIN_MODE_SETTINGS = "settings"
 
const ADMIN_MODE_REPOSITORY = "repository"
 
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 

Protected Member Functions

 assignObject ()
 
 initCreateForm (string $new_type)
 
 setLocator ()
 
 getTabs ()
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 
 assignObject ()
 
 setTitleAndDescription ()
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction (?ilObjectListGUI $list_gui=null)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 setTabs ()
 set admin tabs More...
 
 setAdminTabs ()
 set admin tabs More...
 
 setLocator ()
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator (bool $omit=true)
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms (string $new_type)
 Init creation forms. More...
 
 getCreationFormsHTML (array $forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm (string $new_type)
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm (string $new_type)
 
 importFileObject (int $parent_id=null)
 
 afterImport (ilObject $new_object)
 Post (successful) object import hook. More...
 
 setFormAction (string $cmd, string $form_action)
 
 getReturnLocation (string $cmd, string $default_location="")
 Get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation (string $cmd, string $location)
 set specific return location for command More...
 
 getTargetFrame (string $cmd, string $default_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame (string $cmd, string $target_frame)
 Set specific target frame for command. More...
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 getTabs ()
 overwrite in derived GUI class of your object type More...
 
 redirectToRefId (int $ref_id, string $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 ["ref_id"] value of the request More...
 
 fillCloneTemplate (?string $tpl_name, string $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...
 
 checkPermission (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 showCustomIconsEditing ( $input_colspan=1, ilPropertyFormGUI $form=null, $as_section=true)
 show edit section of custom icons for container More...
 

Protected Attributes

ilRbacSystem $rbacsystem
 
ilPropertyFormGUI $form
 
int $tax_node = 0
 
ilObjTaxonomy $tax
 
 $tax_id
 
bool $in_administration = false
 
ILIAS Glossary Editing EditingGUIRequest $edit_request
 
ILIAS Glossary Term TermManager $term_manager
 
int $term_id = 0
 
ilTabsGUI $tabs
 
ilSetting $setting
 
ilHelpGUI $help
 
ilGlossaryTermPermission $term_perm
 
ilLogger $log
 
ILIAS Style Content GUIService $content_style_gui
 
ILIAS Style Content Object ObjectFacade $content_style_domain
 
- Protected Attributes inherited from ilObjectGUI
ILIAS Notes Service $notes_service
 
ServerRequestInterface $request
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilSetting $settings
 
ilToolbarGUI $toolbar
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
ilObjectService $object_service
 
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilTree $tree
 
ilCtrl $ctrl
 
ilErrorHandling $error
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ILIAS $ilias
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Factory $refinery
 
ilFavouritesManager $favourites
 
ilObjectCustomIconFactory $custom_icon_factory
 
ilObject $object = null
 
bool $creation_mode = false
 
 $data
 
int $id
 
bool $call_by_reference = false
 
bool $prepare_output
 
int $ref_id
 
int $obj_id
 
int $maxcount
 
array $form_action = []
 
array $return_location = []
 
array $target_frame = []
 
string $tmp_import_dir
 
string $sub_objects = ""
 
bool $omit_locator = false
 
string $type = ""
 
string $admin_mode = self::ADMIN_MODE_NONE
 
int $requested_ref_id = 0
 
int $requested_crtptrefid = 0
 
int $requested_crtcb = 0
 
string $requested_new_type = ""
 
string $link_params
 
string $html = ""
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning GUI class for ilGlossary

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de ilObjGlossaryGUI: ilGlossaryTermGUI, ilMDEditorGUI, ilPermissionGUI ilObjGlossaryGUI: ilInfoScreenGUI, ilCommonActionDispatcherGUI, ilObjectContentStyleSettingsGUI ilObjGlossaryGUI: ilObjTaxonomyGUI, ilExportGUI, ilObjectCopyGUI ilObjGlossaryGUI: ilObjectMetaDataGUI, ilGlossaryForeignTermCollectorGUI

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

Constructor & Destructor Documentation

◆ __construct()

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

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

References $DIC, $tax_node, $term_id, ILIAS\GlobalScreen\Provider\__construct(), ilGlossaryTerm\_lookGlossaryID(), ILIAS\Repository\access(), ILIAS\Repository\ctrl(), ilGlossaryTermPermission\getInstance(), ilLoggerFactory\getLogger(), ILIAS\Repository\help(), ilGlossaryTermReferences\isReferenced(), ILIAS\Repository\lng(), ILIAS\Repository\object(), ILIAS\Repository\tabs(), ILIAS\Repository\toolbar(), and ILIAS\Repository\user().

52  {
53  global $DIC;
54 
55  $this->ctrl = $DIC->ctrl();
56  $this->lng = $DIC->language();
57  $this->user = $DIC->user();
58  $this->toolbar = $DIC->toolbar();
59  $this->tabs = $DIC->tabs();
60  $this->setting = $DIC["ilSetting"];
61  $this->access = $DIC->access();
62  $this->rbacsystem = $DIC->rbac()->system();
63  $this->help = $DIC["ilHelp"];
64 
65  $this->edit_request = $DIC->glossary()
66  ->internal()
67  ->gui()
68  ->editing()
69  ->request();
70 
71  $this->log = ilLoggerFactory::getLogger('glo');
72 
73  $this->term_perm = ilGlossaryTermPermission::getInstance();
74 
75  $this->ctrl->saveParameter($this, array("ref_id"));
76  $this->lng->loadLanguageModule("content");
77  $this->lng->loadLanguageModule("glo");
78 
79  $this->type = "glo";
80  parent::__construct($a_data, $a_id, $a_call_by_reference, false);
81 
82  // determine term id and check whether it is valid (belongs to
83  // current glossary)
84  $this->term_id = $this->edit_request->getTermId();
85  $term_glo_id = ilGlossaryTerm::_lookGlossaryID($this->term_id);
86  if ($this->term_id > 0 && $term_glo_id != $this->object->getId()
88  $this->term_id = 0;
89  }
90 
91  $this->tax_id = $this->object->getTaxonomyId();
92  if ($this->tax_id > 0) {
93  $this->ctrl->saveParameter($this, array("show_tax", "tax_node"));
94 
95  $this->tax = new ilObjTaxonomy($this->tax_id);
96  }
97  $tax_node = $this->edit_request->getTaxNode();
98  if ($tax_node > 1 && $this->tax->getTree()->readRootId() != $tax_node) {
99  $this->tax_node = $tax_node;
100  }
101 
102  if ($this->getGlossary()) {
103  $this->term_manager = $DIC->glossary()
104  ->internal()
105  ->domain()
106  ->term(
107  $this->getGlossary(),
108  $this->user->getId()
109  );
110  }
111 
112  $this->in_administration =
113  (strtolower($this->edit_request->getBaseClass()) == "iladministrationgui");
114  $cs = $DIC->contentStyle();
115  $this->content_style_gui = $cs->gui();
116  if (is_object($this->object)) {
117  $this->content_style_domain = $cs->domain()->styleForRefId($this->object->getRefId());
118  }
119  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getLogger(string $a_component_id)
Get component logger.
static isReferenced(array $a_glo_id, int $a_term_id)
Is a term referenced by a set of glossaries.
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
static _lookGlossaryID(int $term_id)
get glossary id form term id
+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

static ilObjGlossaryGUI::_goto ( string  $a_target)
static

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

References ilObjectGUI\$ctrl, $DIC, ilObjectGUI\$lng, ilObjectGUI\_gotoRepositoryRoot(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilCtrl\redirectByClass(), ROOT_FOLDER_ID, ilCtrl\setParameterByClass(), and ilLanguage\txt().

1191  : void
1192  {
1193  global $DIC;
1194  $main_tpl = $DIC->ui()->mainTemplate();
1195 
1196  $lng = $DIC->language();
1197  $ilAccess = $DIC->access();
1198  $ctrl = $DIC->ctrl();
1199 
1200  if ($ilAccess->checkAccess("read", "", $a_target)) {
1201  $ctrl->setParameterByClass("ilGlossaryPresentationGUI", "ref_id", $a_target);
1202  $ctrl->redirectByClass("ilGlossaryPresentationGUI", "");
1203  } elseif ($ilAccess->checkAccess("visible", "", $a_target)) {
1204  $ctrl->setParameterByClass("ilGlossaryPresentationGUI", "ref_id", $a_target);
1205  $ctrl->redirectByClass("ilGlossaryPresentationGUI", "infoScreen");
1206  } elseif ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
1207  $main_tpl->setOnScreenMessage('failure', sprintf(
1208  $lng->txt("msg_no_perm_read_item"),
1210  ), true);
1212  }
1213 
1214  throw new ilPermissionException($lng->txt("no_permission"));
1215  }
redirectByClass( $a_class, string $a_cmd=null, string $a_anchor=null, bool $is_async=false)
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
const ROOT_FOLDER_ID
Definition: constants.php:32
setParameterByClass(string $a_class, string $a_parameter, $a_value)
static _lookupObjId(int $ref_id)
global $DIC
Definition: feed.php:28
ilLanguage $lng
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupTitle(int $obj_id)
static _gotoRepositoryRoot(bool $raise_error=false)
Goto repository root.
+ Here is the call graph for this function:

◆ actTaxonomy()

ilObjGlossaryGUI::actTaxonomy ( )

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

References ILIAS\Repository\ctrl().

736  : void
737  {
738  $this->ctrl->setParameter($this, "show_tax", 1);
739  $this->ctrl->redirect($this, "listTerms");
740  }
+ Here is the call graph for this function:

◆ addDefinition()

ilObjGlossaryGUI::addDefinition ( )

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

References ilGlossaryTerm\_lookGlossaryID(), ILIAS\Repository\ctrl(), ilGlossaryTerm\getId(), ilGlossaryTerm\getTerm(), ILIAS\Repository\lng(), ILIAS\Repository\object(), and ilUtil\stripSlashes().

1021  : void
1022  {
1023  $term_id = $this->edit_request->getTermId();
1024 
1025  $term_glo_id = ilGlossaryTerm::_lookGlossaryID($term_id);
1026  if ($term_glo_id != $this->object->getId()) {
1027  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("glo_term_must_belong_to_glo"), true);
1028  $this->ctrl->redirect($this, "listTerms");
1029  }
1030 
1031  // add term
1032  $term = new ilGlossaryTerm($term_id);
1033 
1034  // add first definition
1035  $def = new ilGlossaryDefinition();
1036  $def->setTermId($term->getId());
1037  $def->setTitle(ilUtil::stripSlashes($term->getTerm()));
1038  $def->create();
1039 
1040  $this->ctrl->setParameterByClass("ilglossarydefpagegui", "term_id", $term->getId());
1041  $this->ctrl->setParameterByClass("ilglossarydefpagegui", "def", $def->getId());
1042  $this->ctrl->redirectByClass(array("ilglossarytermgui",
1043  "iltermdefinitioneditorgui", "ilglossarydefpagegui"), "edit");
1044  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookGlossaryID(int $term_id)
get glossary id form term id
+ Here is the call graph for this function:

◆ addTerm()

ilObjGlossaryGUI::addTerm ( )

add term

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

References $lang, ilGlossaryTerm\create(), ILIAS\Repository\ctrl(), ilGlossaryTerm\getId(), ILIAS\Repository\lng(), ilGlossaryTerm\setGlossary(), ilGlossaryTerm\setLanguage(), and ilGlossaryTerm\setTerm().

755  : void
756  {
757  $new_term = $this->edit_request->getNewTerm();
758  if ($new_term == "") {
759  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("cont_please_enter_a_term"), true);
760  $this->ctrl->redirect($this, "listTerms");
761  }
762 
763  // add term
764  $lang = $this->edit_request->getTermLanguage();
765  $term = new ilGlossaryTerm();
766  $term->setGlossary($this->getGlossary());
767  $term->setTerm($new_term);
769  $term->create();
770 
771  $this->term_manager->setSessionLang($lang);
772 
773  // add first definition
774  $def = new ilGlossaryDefinition();
775  $def->setTermId($term->getId());
776  $def->setTitle($new_term);
777  $def->create();
778 
779  $this->ctrl->setParameterByClass("ilglossarydefpagegui", "term_id", $term->getId());
780  $this->ctrl->setParameterByClass("ilglossarydefpagegui", "def", $def->getId());
781  $this->ctrl->redirectByClass(array("ilglossarytermgui",
782  "iltermdefinitioneditorgui", "ilglossarydefpagegui"), "edit");
783  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setGlossary(ilObjGlossary $a_glossary)
setTerm(string $a_term)
setLanguage(string $a_language)
$lang
Definition: xapiexit.php:26
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ addUsagesToInfo()

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

Add usages to info screen.

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

References $DIC, ilObjectGUI\$lng, ilObject\_getAllReferences(), ilLink\_getLink(), ilObject\_lookupTitle(), ilInfoScreenGUI\addProperty(), ilInfoScreenGUI\addSection(), ilObjSAHSLearningModule\getScormModulesForGlossary(), and ilLanguage\txt().

Referenced by ilGlossaryPresentationGUI\outputInfoScreen().

420  : void {
421  global $DIC;
422 
423  $lng = $DIC->language();
424  $ilAccess = $DIC->access();
425 
426  $info->addSection($lng->txt("glo_usages"));
428  foreach ($sms as $sm) {
429  $link = false;
430  $refs = ilObject::_getAllReferences($sm);
431  foreach ($refs as $ref) {
432  if ($link === false && $ilAccess->checkAccess("write", "", $ref)) {
433  $link = ilLink::_getLink($ref, 'sahs');
434  }
435  }
436 
437  $entry = ilObject::_lookupTitle($sm);
438  if ($link !== false) {
439  $entry = "<a href='" . $link . "' target='_top'>" . $entry . "</a>";
440  }
441 
442  $info->addProperty($lng->txt("obj_sahs"), $entry);
443  }
444  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static _getAllReferences(int $id)
get all reference ids for object ID
addProperty(string $a_name, string $a_value, string $a_link="")
add a property to current section
static getScormModulesForGlossary(int $a_glo_id)
Get SCORM modules that assign a certain glossary.
global $DIC
Definition: feed.php:28
ilLanguage $lng
static _lookupTitle(int $obj_id)
addSection(string $a_title)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ applyFilter()

ilObjGlossaryGUI::applyFilter ( )

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

References listTerms().

1217  : void
1218  {
1219  $prtab = new ilTermListTableGUI($this, "listTerms", $this->tax_node);
1220  $prtab->resetOffset();
1221  $prtab->writeFilterToSession();
1222  $this->listTerms();
1223  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ assignObject()

ilObjGlossaryGUI::assignObject ( )
protected

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

301  : void
302  {
303  $this->object = new ilObjGlossary($this->id, true);
304  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ cancelDefinitionDeletion()

ilObjGlossaryGUI::cancelDefinitionDeletion ( )

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

References ILIAS\Repository\ctrl().

870  : void
871  {
872  $this->ctrl->redirect($this, "listTerms");
873  }
+ Here is the call graph for this function:

◆ cancelTermDeletion()

ilObjGlossaryGUI::cancelTermDeletion ( )

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

References ILIAS\Repository\ctrl().

981  : void
982  {
983  $this->ctrl->redirect($this, "listTerms");
984  }
+ Here is the call graph for this function:

◆ clearClipboard()

ilObjGlossaryGUI::clearClipboard ( )

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

References ILIAS\Repository\ctrl(), and ILIAS\Repository\user().

1475  : void
1476  {
1477  $this->user->clipboardDeleteObjectsOfType("term");
1478  $this->ctrl->redirect($this, "listTerms");
1479  }
+ Here is the call graph for this function:

◆ confirmDefinitionDeletion()

ilObjGlossaryGUI::confirmDefinitionDeletion ( )

deletion confirmation screen

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

References ILIAS\Repository\ctrl(), ilGlossaryTerm\getNumberOfUsages(), ilObjStyleSheet\getSyntaxStylePath(), ilGlossaryTerm\getTerm(), ILIAS\Repository\lng(), and setContentStyleSheet().

814  : void
815  {
816  $term = new ilGlossaryTerm($this->term_id);
817 
818  $add = "";
819  $nr = ilGlossaryTerm::getNumberOfUsages($this->term_id);
820  if ($nr > 0) {
821  $this->ctrl->setParameterByClass(
822  "ilglossarytermgui",
823  "term_id",
824  $this->term_id
825  );
826  $link = "[<a href='" .
827  $this->ctrl->getLinkTargetByClass("ilglossarytermgui", "listUsages") .
828  "'>" . $this->lng->txt("glo_list_usages") . "</a>]";
829  $add = "<br/>" . sprintf($this->lng->txt("glo_term_is_used_n_times"), $nr) . " " . $link;
830  }
831 
832  $cgui = new ilConfirmationGUI();
833  $cgui->setHeaderText($this->lng->txt("info_delete_sure") . $add);
834 
835  $cgui->setFormAction($this->ctrl->getFormAction($this));
836  $cgui->setCancel($this->lng->txt("cancel"), "cancelDefinitionDeletion");
837  $cgui->setConfirm($this->lng->txt("confirm"), "deleteDefinition");
838 
839  // content style
840  $this->setContentStyleSheet($this->tpl);
841 
842  // syntax style
843  $this->tpl->setCurrentBlock("SyntaxStyle");
844  $this->tpl->setVariable(
845  "LOCATION_SYNTAX_STYLESHEET",
847  );
848  $this->tpl->parseCurrentBlock();
849 
850  $definition = new ilGlossaryDefinition(
851  $this->edit_request->getDefinitionId()
852  );
853  $page_gui = new ilGlossaryDefPageGUI($definition->getId());
854  $page_gui->setTemplateOutput(false);
855  $page_gui->setStyleId($this->content_style_domain->getEffectiveStyleId());
856  $page_gui->setSourcecodeDownloadScript("ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=" . $this->requested_ref_id);
857  $page_gui->setFileDownloadLink("ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=" . $this->requested_ref_id);
858  $page_gui->setFullscreenLink("ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=" . $this->requested_ref_id);
859  $output = $page_gui->preview();
860 
861  $cgui->addItem(
862  "def",
863  $this->edit_request->getDefinitionId(),
864  $term->getTerm() . $output
865  );
866 
867  $this->tpl->setContent($cgui->getHTML());
868  }
setContentStyleSheet(ilGlobalTemplateInterface $a_tpl=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getNumberOfUsages(int $a_term_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ confirmGlossarySelection()

ilObjGlossaryGUI::confirmGlossarySelection ( )

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

References ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

1361  : void
1362  {
1363  $cgui = new ilConfirmationGUI();
1364  $this->ctrl->setParameter($this, "glo_ref_id", $this->edit_request->getGlossaryRefId());
1365  $cgui->setFormAction($this->ctrl->getFormAction($this));
1366  $cgui->setHeaderText($this->lng->txt("glo_link_glo_in_glo"));
1367  $cgui->setCancel($this->lng->txt("no"), "selectGlossary");
1368  $cgui->setConfirm($this->lng->txt("yes"), "selectGlossaryLink");
1369  $this->tpl->setContent($cgui->getHTML());
1370  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ confirmTermDeletion()

ilObjGlossaryGUI::confirmTermDeletion ( )

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

References ilObjectGUI\$id, $term_id, ilGlossaryTerm\_lookGlossaryID(), ILIAS\Repository\ctrl(), ilGlossaryTerm\getNumberOfUsages(), ilGlossaryTerm\getTerm(), ilGlossaryTermReferences\isReferenced(), ILIAS\Repository\lng(), and ILIAS\Repository\object().

928  : void
929  {
930  $ids = $this->edit_request->getIds();
931  if (count($ids) == 0) {
932  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("no_checkbox"), true);
933  $this->ctrl->redirect($this, "listTerms");
934  }
935 
936  // check ids
937  foreach ($ids as $term_id) {
938  $term_glo_id = ilGlossaryTerm::_lookGlossaryID($term_id);
939  if ($term_glo_id != $this->object->getId() && !ilGlossaryTermReferences::isReferenced([$this->object->getId()], $term_id)) {
940  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("glo_term_must_belong_to_glo"), true);
941  $this->ctrl->redirect($this, "listTerms");
942  }
943  }
944 
945  // display confirmation message
946  $cgui = new ilConfirmationGUI();
947  $cgui->setFormAction($this->ctrl->getFormAction($this));
948  $cgui->setHeaderText($this->lng->txt("info_delete_sure"));
949  $cgui->setCancel($this->lng->txt("cancel"), "cancelTermDeletion");
950  $cgui->setConfirm($this->lng->txt("confirm"), "deleteTerms");
951 
952  foreach ($ids as $id) {
953  $term = new ilGlossaryTerm($id);
954 
955  $add = "";
957  if ($nr > 0) {
958  $this->ctrl->setParameterByClass(
959  "ilglossarytermgui",
960  "term_id",
961  $id
962  );
963 
964  if (ilGlossaryTermReferences::isReferenced([$this->object->getId()], $id)) {
965  $add = " (" . $this->lng->txt("glo_term_reference") . ")";
966  } else {
967  $link = "[<a href='" .
968  $this->ctrl->getLinkTargetByClass("ilglossarytermgui", "listUsages") .
969  "'>" . $this->lng->txt("glo_list_usages") . "</a>]";
970  $add = "<div class='small'>" .
971  sprintf($this->lng->txt("glo_term_is_used_n_times"), $nr) . " " . $link . "</div>";
972  }
973  }
974 
975  $cgui->addItem("id[]", $id, $term->getTerm() . $add);
976  }
977 
978  $this->tpl->setContent($cgui->getHTML());
979  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static isReferenced(array $a_glo_id, int $a_term_id)
Is a term referenced by a set of glossaries.
static getNumberOfUsages(int $a_term_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookGlossaryID(int $term_id)
get glossary id form term id
+ Here is the call graph for this function:

◆ copyTerms()

ilObjGlossaryGUI::copyTerms ( )

Copy terms to clipboard.

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

References ilObjectGUI\$id, ilGlossaryTerm\_lookGlossaryTerm(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ilEditClipboard\setAction(), and ILIAS\Repository\user().

1413  : void
1414  {
1415  $items = $this->edit_request->getIds();
1416  if (count($items) == 0) {
1417  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("no_checkbox"), true);
1418  $this->ctrl->redirect($this, "listTerms");
1419  }
1420 
1421  $this->user->clipboardDeleteObjectsOfType("term");
1422 
1423  // put them into the clipboard
1424  $time = date("Y-m-d H:i:s");
1425  $order = 0;
1426  foreach ($items as $id) {
1427  $this->user->addObjectToClipboard(
1428  $id,
1429  "term",
1431  0,
1432  $time,
1433  $order
1434  );
1435  }
1436 
1438  $this->tpl->setOnScreenMessage('info', $this->lng->txt("glo_selected_terms_have_been_copied"), true);
1439  $this->ctrl->redirect($this, "listTerms");
1440  }
static setAction(string $a_action)
static _lookGlossaryTerm(int $term_id)
get glossary term
+ Here is the call graph for this function:

◆ deactTaxonomy()

ilObjGlossaryGUI::deactTaxonomy ( )

Hide Taxonomy.

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

References ILIAS\Repository\ctrl().

745  : void
746  {
747  $this->ctrl->setParameter($this, "show_tax", "");
748  $this->ctrl->redirect($this, "listTerms");
749  }
+ Here is the call graph for this function:

◆ deleteDefinition()

ilObjGlossaryGUI::deleteDefinition ( )

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

References ILIAS\Repository\ctrl(), and ilGlossaryDefinition\delete().

875  : void
876  {
877  $definition = new ilGlossaryDefinition($this->edit_request->getDefinitionId());
878  $definition->delete();
879  $this->ctrl->redirect($this, "listTerms");
880  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ deleteTerms()

ilObjGlossaryGUI::deleteTerms ( )

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

References ilObjectGUI\$id, ILIAS\Repository\ctrl(), ilGlossaryTerm\delete(), ilGlossaryTermReferences\deleteTerm(), ilGlossaryTermReferences\isReferenced(), and ILIAS\Repository\object().

986  : void
987  {
988  $ids = $this->edit_request->getIds();
989  foreach ($ids as $id) {
990  if (ilGlossaryTermReferences::isReferenced([$this->object->getId()], $id)) {
991  $refs = new ilGlossaryTermReferences($this->object->getId());
992  $refs->deleteTerm($id);
993  $refs->update();
994  } else {
995  $term = new ilGlossaryTerm($id);
996  $term->delete();
997  }
998  }
999  $this->ctrl->redirect($this, "listTerms");
1000  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static isReferenced(array $a_glo_id, int $a_term_id)
Is a term referenced by a set of glossaries.
delete()
delete glossary term (and all its definition objects)
+ Here is the call graph for this function:

◆ editGlossaries()

ilObjGlossaryGUI::editGlossaries ( )

Edit automatically linked glossaries.

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

References ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), setSettingsSubTabs(), ILIAS\Repository\tabs(), and ILIAS\Repository\toolbar().

1324  : void
1325  {
1326  $this->tabs->setTabActive("settings");
1327  $this->setSettingsSubTabs("glossaries");
1328 
1329  $this->toolbar->addButton(
1330  $this->lng->txt("add"),
1331  $this->ctrl->getLinkTarget($this, "showGlossarySelector")
1332  );
1333 
1334  $tab = new ilGlossaryAutoLinkTableGUI($this->getGlossary(), $this, "editGlossaries");
1335 
1336  $this->tpl->setContent($tab->getHTML());
1337  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setSettingsSubTabs(string $a_active)
+ Here is the call graph for this function:

◆ executeCommand()

ilObjGlossaryGUI::executeCommand ( )

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

References ilObjectGUI\$object, ilObjectGUI\addHeaderAction(), ilObjectGUI\checkPermission(), ILIAS\Repository\ctrl(), ilObjectGUI\getCreationMode(), ilGlossaryForeignTermCollectorGUI\getInstance(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), getTemplate(), ILIAS\Repository\lng(), ILIAS\Repository\object(), ilObjectGUI\prepareOutput(), setLocator(), setSettingsSubTabs(), ilObjectGUI\setTabs(), showInfoScreen(), and ILIAS\Repository\tabs().

121  : void
122  {
123  $cmd = $this->ctrl->getCmd();
124  $next_class = $this->ctrl->getNextClass($this);
125 
126  $this->log->debug("glossary term, next class " . $next_class . ", cmd: " . $cmd);
127 
128  switch ($next_class) {
129  case 'ilobjectmetadatagui':
130  $this->checkPermission("write");
131 
132  $this->getTemplate();
133  $this->setTabs();
134  $this->setLocator();
135  $this->addHeaderAction();
136 
137  $this->tabs_gui->activateTab('meta_data');
138  $md_gui = new ilObjectMetaDataGUI($this->object, 'term');
139  $this->ctrl->forwardCommand($md_gui);
140  break;
141 
142  case "ilglossarytermgui":
143  if (!$this->term_perm->checkPermission("edit_content", $this->term_id) &&
144  !$this->term_perm->checkPermission("write", $this->term_id)) {
145  throw new ilGlossaryException("No permission.");
146  }
147  $this->getTemplate();
148 // $this->quickList();
149  $this->ctrl->setReturn($this, "listTerms");
150  $term_gui = new ilGlossaryTermGUI($this->term_id);
151  $term_gui->setGlossary($this->getGlossary());
152  $this->ctrl->forwardCommand($term_gui);
153  break;
154 
155  case "ilinfoscreengui":
156  $this->addHeaderAction();
157  $this->showInfoScreen();
158  break;
159 
160  case "ilobjectcontentstylesettingsgui":
161  $this->checkPermission("write");
162  $this->prepareOutput();
163  $this->addHeaderAction();
164  $this->tabs_gui->activateTab("settings");
165  $this->setSettingsSubTabs("style");
166  $settings_gui = $this->content_style_gui
167  ->objectSettingsGUIForRefId(
168  null,
169  $this->object->getRefId()
170  );
171  $this->ctrl->forwardCommand($settings_gui);
172  break;
173 
174 
175  case 'ilpermissiongui':
176  if ($this->in_administration) {
177  $this->prepareOutput();
178  } else {
179  $this->getTemplate();
180  $this->setTabs();
181  $this->setLocator();
182  $this->addHeaderAction();
183  }
184  $perm_gui = new ilPermissionGUI($this);
185  $ret = $this->ctrl->forwardCommand($perm_gui);
186  break;
187 
188  case "ilcommonactiondispatchergui":
190  $this->prepareOutput();
191  $this->ctrl->forwardCommand($gui);
192  break;
193 
194  case "ilobjtaxonomygui":
195  $this->getTemplate();
196  $this->setTabs();
197  $this->setLocator();
198  $this->addHeaderAction();
199  $this->tabs->activateTab("settings");
200  $this->setSettingsSubTabs("taxonomy");
201 
202  $this->ctrl->setReturn($this, "properties");
203  $tax_gui = new ilObjTaxonomyGUI();
204  $tax_gui->setMultiple(false);
205 
206  $tax_gui->setAssignedObject($this->object->getId());
207  $ret = $this->ctrl->forwardCommand($tax_gui);
208  break;
209 
210  case "ilexportgui":
211  $this->getTemplate();
212  $this->setTabs();
213  $this->tabs->activateTab("export");
214  $this->setLocator();
215  $exp_gui = new ilExportGUI($this);
216  //$exp_gui->addFormat("xml", "", $this, "export");
217  $exp_gui->addFormat("xml");
218  $exp_gui->addFormat("html", "", $this, "exportHTML");
219  $exp_gui->addCustomColumn(
220  $this->lng->txt("cont_public_access"),
221  $this,
222  "getPublicAccessColValue"
223  );
224  $exp_gui->addCustomMultiCommand(
225  $this->lng->txt("cont_public_access"),
226  $this,
227  "publishExportFile"
228  );
229  $ret = $this->ctrl->forwardCommand($exp_gui);
230  break;
231 
232  case 'ilobjectcopygui':
233  $this->prepareOutput();
234  $cp = new ilObjectCopyGUI($this);
235  $cp->setType('glo');
236  $this->ctrl->forwardCommand($cp);
237  break;
238 
239  case "ilglossaryforeigntermcollectorgui":
240  $this->ctrl->setReturn($this, "");
241  $this->getTemplate();
242  $this->setTabs();
243  $this->setLocator();
244  $this->addHeaderAction();
246  $this->ctrl->forwardCommand($coll);
247  break;
248 
249  default:
250  $cmd = $this->ctrl->getCmd("listTerms");
251 
252  if (($cmd == "create") && ($this->edit_request->getNewType() == "term")) {
253  $this->ctrl->setCmd("create");
254  $this->ctrl->setCmdClass("ilGlossaryTermGUI");
255  $this->executeCommand();
256  return;
257  } else {
258  if ($cmd != "quickList") {
259  if ($this->in_administration ||
260  $this->getCreationMode() == true) {
261  $this->prepareOutput();
262  $cmd .= "Object";
263  } else {
264  $this->getTemplate();
265  $this->setTabs();
266  $this->setLocator();
267  $this->addHeaderAction();
268 
269  if ($cmd == "redrawHeaderAction") {
270  $cmd = "redrawHeaderActionObject";
271  }
272  }
273  }
274  $this->$cmd();
275  }
276  break;
277  }
278 
279  if ($cmd != "quickList") {
280  if (!$this->in_administration && !$this->getCreationMode()) {
281  $this->tpl->printToStdout();
282  }
283  } else {
284  $this->tpl->printToStdout(false);
285  }
286  }
static getInstance(ilObjGlossaryGUI $a_glossary_gui)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
GUI class for the workflow of copying objects.
prepareOutput(bool $show_sub_objects=true)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setSettingsSubTabs(string $a_active)
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
setTabs()
set admin tabs
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
addHeaderAction()
Add header action menu.
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
+ Here is the call graph for this function:

◆ export()

ilObjGlossaryGUI::export ( )

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

References ilObjectGUI\checkPermission(), and ILIAS\Repository\ctrl().

882  : void
883  {
884  $this->checkPermission("write");
885  $glo_exp = new ilGlossaryExport($this->getGlossary());
886  $glo_exp->buildExportFile();
887  $this->ctrl->redirectByClass("ilexportgui", "");
888  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ exportHTML()

ilObjGlossaryGUI::exportHTML ( )

create html package

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

References ILIAS\Repository\ctrl().

893  : void
894  {
895  $glo_exp = new ilGlossaryExport($this->getGlossary(), "html");
896  $glo_exp->buildExportFile();
897  $this->ctrl->redirectByClass("ilexportgui", "");
898  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ getPublicAccessColValue()

ilObjGlossaryGUI::getPublicAccessColValue ( string  $a_type,
string  $a_file 
)

Get public access value for export table.

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

References ILIAS\Repository\lng(), and ILIAS\Repository\object().

1256  : string {
1257  if ($this->object->getPublicExportFile($a_type) == $a_file) {
1258  return $this->lng->txt("yes");
1259  }
1260 
1261  return " ";
1262  }
+ Here is the call graph for this function:

◆ getTabs()

ilObjGlossaryGUI::getTabs ( )
protected

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

References ILIAS\Repository\ctrl(), ILIAS\Repository\help(), and ILIAS\Repository\lng().

1063  : void
1064  {
1065  $this->help->setScreenIdComponent("glo");
1066 
1067  // list terms
1068  $cmd = $this->ctrl->getCmd();
1069  $force_active = ($cmd == "" || $cmd == "listTerms");
1070  $this->tabs_gui->addTarget(
1071  "cont_terms",
1072  $this->ctrl->getLinkTarget($this, "listTerms"),
1073  array("listTerms", ""),
1074  get_class($this),
1075  "",
1076  $force_active
1077  );
1078 
1079  $force_active = false;
1080  if ($this->ctrl->getCmd() == "showSummary" ||
1081  strtolower($this->ctrl->getNextClass()) == "ilinfoscreengui") {
1082  $force_active = true;
1083  }
1084  $this->tabs_gui->addTarget(
1085  "info_short",
1086  $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary"),
1087  "",
1088  "ilInfoScreenGUI",
1089  "",
1090  $force_active
1091  );
1092 
1093  // properties
1094  if ($this->rbacsystem->checkAccess('write', $this->object->getRefId())) {
1095  $this->tabs_gui->addTarget(
1096  "settings",
1097  $this->ctrl->getLinkTarget($this, "properties"),
1098  "properties",
1099  get_class($this)
1100  );
1101 
1102  // meta data
1103  $mdgui = new ilObjectMetaDataGUI($this->object, "term");
1104  $mdtab = $mdgui->getTab();
1105  if ($mdtab) {
1106  $this->tabs_gui->addTarget(
1107  "meta_data",
1108  $mdtab,
1109  "",
1110  "ilobjectmetadatagui"
1111  );
1112  }
1113 
1114  // export
1115  /*$tabs_gui->addTarget("export",
1116  $this->ctrl->getLinkTarget($this, "exportList"),
1117  array("exportList", "viewExportLog"), get_class($this));*/
1118 
1119  // export
1120  $this->tabs_gui->addTarget(
1121  "export",
1122  $this->ctrl->getLinkTargetByClass("ilexportgui", ""),
1123  "",
1124  "ilexportgui"
1125  );
1126  }
1127 
1128  // permissions
1129  if ($this->rbacsystem->checkAccess('edit_permission', $this->object->getRefId())) {
1130  /*$tabs_gui->addTarget("permission_settings",
1131  $this->ctrl->getLinkTarget($this, "perm"),
1132  array("perm", "info"),
1133  get_class($this));
1134  */
1135  $this->tabs_gui->addTarget(
1136  "perm_settings",
1137  $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"),
1138  array("perm","info","owner"),
1139  'ilpermissiongui'
1140  );
1141  }
1142 
1143  $this->tabs_gui->addNonTabbedLink(
1144  "presentation_view",
1145  $this->lng->txt("glo_presentation_view"),
1146  "ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=" . $this->object->getRefId(),
1147  "_top"
1148  );
1149  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ getTemplate()

ilObjGlossaryGUI::getTemplate ( )

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

References ilGlossaryTerm\_lookGlossaryTerm(), ilUtil\getImagePath(), and ILIAS\Repository\lng().

Referenced by executeCommand(), and showInfoScreen().

1046  : void
1047  {
1048  $this->tpl->loadStandardTemplate();
1049 
1050  $title = $this->object->getTitle();
1051 
1052 
1053  if ($this->term_id > 0) {
1054  $this->tpl->setTitle($this->lng->txt("term") . ": " .
1055  ilGlossaryTerm::_lookGlossaryTerm($this->term_id));
1056  } else {
1057  parent::setTitleAndDescription();
1058  $this->tpl->setTitleIcon(ilUtil::getImagePath("icon_glo.svg"));
1059  $this->tpl->setTitle($this->lng->txt("glo") . ": " . $title);
1060  }
1061  }
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
static _lookGlossaryTerm(int $term_id)
get glossary term
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ importObject()

ilObjGlossaryGUI::importObject ( )

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

References ilObjectGUI\createObject().

335  : void
336  {
337  $this->createObject();
338  }
createObject()
create new object form
+ Here is the call graph for this function:

◆ initCreateForm()

ilObjGlossaryGUI::initCreateForm ( string  $new_type)
protected

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

References $form, ilPropertyFormGUI\addCommandButton(), ilPropertyFormGUI\addItem(), ILIAS\Repository\ctrl(), ilObjectGUI\initDidacticTemplate(), ILIAS\Repository\lng(), ilTextAreaInputGUI\setCols(), ilFormGUI\setFormAction(), ilFormGUI\setTarget(), ilPropertyFormGUI\setTitle(), and ilObject\TITLE_LENGTH.

Referenced by saveObject().

307  {
308  $form = new ilPropertyFormGUI();
309  $form->setTarget("_top");
310  $form->setFormAction($this->ctrl->getFormAction($this));
311  $form->setTitle($this->lng->txt($new_type . "_new"));
312 
313  // title
314  $ti = new ilTextInputGUI($this->lng->txt("title"), "title");
315  $ti->setSize(min(40, ilObject::TITLE_LENGTH));
316  $ti->setMaxLength(ilObject::TITLE_LENGTH);
317  $ti->setRequired(true);
318  $form->addItem($ti);
319 
320  // description
321  $ta = new ilTextAreaInputGUI($this->lng->txt("description"), "desc");
322  $ta->setCols(40);
323  $ta->setRows(2);
324  $form->addItem($ta);
325 
326  // didactic template
327  $form = $this->initDidacticTemplate($form);
328 
329  $form->addCommandButton("save", $this->lng->txt($new_type . "_add"));
330  $form->addCommandButton("cancel", $this->lng->txt("cancel"));
331 
332  return $form;
333  }
const TITLE_LENGTH
setTarget(string $a_target)
setFormAction(string $a_formaction)
initDidacticTemplate(ilPropertyFormGUI $form)
addCommandButton(string $a_cmd, string $a_text, string $a_id="")
This class represents a text area property in a property form.
ilPropertyFormGUI $form
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initSettingsForm()

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

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

References $cols, $form, ilSubEnabledFormPropertyGUI\addSubItem(), ilRadioOption\addSubItem(), ILIAS\Repository\ctrl(), ilObjectServiceSettingsGUI\CUSTOM_METADATA, ILIAS\Repository\form(), ilObjectGUI\getObjectService(), ilObjTaxonomy\getUsageOfObject(), ilObjectServiceSettingsGUI\initServiceSettingsForm(), ILIAS\Repository\lng(), ILIAS\Repository\object(), ilRadioOption\setInfo(), ilFormPropertyGUI\setInfo(), ilCheckboxInputGUI\setValue(), ilRadioGroupInputGUI\setValue(), and ilRadioOption\setValue().

Referenced by properties(), and saveProperties().

476  : void {
477  $obj_service = $this->getObjectService();
478 
479  $this->form = new ilPropertyFormGUI();
480 
481  // title
482  $title = new ilTextInputGUI($this->lng->txt("title"), "title");
483  $title->setRequired(true);
484  $this->form->addItem($title);
485 
486  // description
487  $desc = new ilTextAreaInputGUI($this->lng->txt("desc"), "description");
488  $this->form->addItem($desc);
489 
490  // glossary mode
491  // for layout of this property see https://mantis.ilias.de/view.php?id=31833
492  $glo_mode = new ilRadioGroupInputGUI($this->lng->txt("glo_content_assembly"), "glo_mode");
493  //$glo_mode->setInfo($this->lng->txt("glo_mode_desc"));
494  $op1 = new ilRadioOption($this->lng->txt("glo_mode_normal"), "none", $this->lng->txt("glo_mode_normal_info"));
495  $glo_mode->addOption($op1);
496  $op2 = new ilRadioOption($this->lng->txt("glo_collection"), "coll", $this->lng->txt("glo_collection_info"));
497  $glo_mode->addOption($op2);
498 
499  $glo_mode2 = new ilRadioGroupInputGUI("", "glo_mode2");
500  $glo_mode2->setValue("level");
501  $op3 = new ilRadioOption($this->lng->txt("glo_mode_level"), "level", $this->lng->txt("glo_mode_level_info"));
502  $glo_mode2->addOption($op3);
503  $op4 = new ilRadioOption($this->lng->txt("glo_mode_subtree"), "subtree", $this->lng->txt("glo_mode_subtree_info"));
504  $glo_mode2->addOption($op4);
505  $op2->addSubItem($glo_mode2);
506  $this->form->addItem($glo_mode);
507 
508 
509  $this->lng->loadLanguageModule("rep");
510  $section = new ilFormSectionHeaderGUI();
511  $section->setTitle($this->lng->txt('rep_activation_availability'));
512  $this->form->addItem($section);
513 
514  // online
515  $online = new ilCheckboxInputGUI($this->lng->txt("cont_online"), "cobj_online");
516  $online->setValue("y");
517  $online->setInfo($this->lng->txt("glo_online_info"));
518  $this->form->addItem($online);
519 
520  /*
521  $section = new ilFormSectionHeaderGUI();
522  $section->setTitle($this->lng->txt('glo_content_settings'));
523  $this->form->addItem($section);*/
524 
525 
526  // glossary mode
527  /*$options = array(
528  "none"=>$this->lng->txt("glo_mode_normal"),
529  "level"=>$this->lng->txt("glo_mode_level"),
530  "subtree"=>$this->lng->txt("glo_mode_subtree")
531  );
532  $glo_mode = new ilSelectInputGUI($this->lng->txt("glo_mode"), "glo_mode");
533  $glo_mode->setOptions($options);
534  $glo_mode->setInfo($this->lng->txt("glo_mode_desc"));
535  $this->form->addItem($glo_mode);*/
536 
537 
538  $section = new ilFormSectionHeaderGUI();
539  $section->setTitle($this->lng->txt('cont_presentation'));
540  $this->form->addItem($section);
541 
542  // tile image
543  $obj_service->commonSettings()->legacyForm($this->form, $this->object)->addTileImage();
544 
545  // presentation mode
546  $pres_mode = new ilRadioGroupInputGUI($this->lng->txt("glo_presentation_mode"), "pres_mode");
547  $pres_mode->setValue("table");
548  $op1 = new ilRadioOption($this->lng->txt("glo_table_form"), "table", $this->lng->txt("glo_table_form_info"));
549 
550  // short text length
551  $snl = new ilNumberInputGUI($this->lng->txt("glo_text_snippet_length"), "snippet_length");
552  $snl->setMaxValue(3000);
553  $snl->setMinValue(100);
554  $snl->setMaxLength(4);
555  $snl->setSize(4);
556  $snl->setInfo($this->lng->txt("glo_text_snippet_length_info"));
557  $snl->setValue(200);
558  $snl->setSuffix($this->lng->txt("characters"));
559  $op1->addSubItem($snl);
560 
561  $pres_mode->addOption($op1);
562  $op2 = new ilRadioOption($this->lng->txt("glo_full_definitions"), "full_def", $this->lng->txt("glo_full_definitions_info"));
563  $pres_mode->addOption($op2);
564  $this->form->addItem($pres_mode);
565 
566  // show taxonomy
567  $show_tax = null;
568  $tax_ids = ilObjTaxonomy::getUsageOfObject($this->object->getId());
569  if (count($tax_ids) > 0) {
570  $show_tax = new ilCheckboxInputGUI($this->lng->txt("glo_show_taxonomy"), "show_tax");
571  $show_tax->setInfo($this->lng->txt("glo_show_taxonomy_info"));
572  $this->form->addItem($show_tax);
573  }
574 
575  // downloads
576  $down = new ilCheckboxInputGUI($this->lng->txt("cont_downloads"), "glo_act_downloads");
577  $down->setValue("y");
578  $down->setInfo($this->lng->txt("cont_downloads_desc"));
579  $this->form->addItem($down);
580 
581  if ($a_mode == "edit") {
582  $title->setValue($this->object->getTitle());
583  $desc->setValue($this->object->getDescription());
584  $online->setChecked($this->object->getOnline());
585  $mode1 = $this->object->getVirtualMode() === "none"
586  ? "none"
587  : "coll";
588  $mode2 = $this->object->getVirtualMode() !== "none"
589  ? $this->object->getVirtualMode()
590  : "level";
591  $glo_mode->setValue($mode1);
592  $glo_mode2->setValue($mode2);
593  $pres_mode->setValue($this->object->getPresentationMode());
594  $snl->setValue($this->object->getSnippetLength());
595  if (count($tax_ids) > 0) {
596  $show_tax->setChecked($this->object->getShowTaxonomy());
597  }
598 
599  $down->setChecked($this->object->isActiveDownloads());
600 
601  // additional features
602  $feat = new ilFormSectionHeaderGUI();
603  $feat->setTitle($this->lng->txt('obj_features'));
604  $this->form->addItem($feat);
605 
607  $this->object->getId(),
608  $this->form,
609  array(
611  )
612  );
613  }
614 
615  // sort columns, if adv fields are given
616  $adv_ap = new ilGlossaryAdvMetaDataAdapter($this->object->getRefId());
617  $cols = $adv_ap->getColumnOrder();
618  if (count($cols) > 1) {
619  $ti = new ilGloAdvColSortInputGUI($this->lng->txt("cont_col_ordering"), "field_order");
620  $this->form->addItem($ti);
621  $ti->setValue($cols);
622  $ti->setInfo($this->lng->txt("glo_col_ordering_info"));
623  }
624 
625  // save and cancel commands
626  $this->form->addCommandButton("saveProperties", $this->lng->txt("save"));
627 
628  $this->form->setTitle($this->lng->txt("cont_glo_properties"));
629  $this->form->setFormAction($this->ctrl->getFormAction($this));
630  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setInfo(string $a_info)
This class represents a checkbox property in a property form.
static getUsageOfObject(int $a_obj_id, bool $a_include_titles=false)
This class represents a property in a property form.
This class represents a number property in a property form.
setValue(string $a_value)
static initServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
form( $class_path, string $cmd)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This class represents a text area property in a property form.
ilPropertyFormGUI $form
$cols
Definition: xhr_table.php:11
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ listTerms()

ilObjGlossaryGUI::listTerms ( )

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

References $lang, ilMDLanguageItem\_getLanguages(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), showTaxonomy(), ILIAS\Repository\tabs(), ILIAS\Repository\toolbar(), and ILIAS\Repository\user().

Referenced by applyFilter(), and resetFilter().

684  : void
685  {
686  $this->showTaxonomy();
687 
688  // term
689  $ti = new ilTextInputGUI($this->lng->txt("cont_new_term"), "new_term");
690  $ti->setMaxLength(80);
691  $ti->setSize(20);
692  $this->toolbar->addInputItem($ti, true);
693 
694  // language
695  $this->lng->loadLanguageModule("meta");
697  $session_lang = $this->term_manager->getSessionLang();
698  if ($session_lang != "") {
699  $s_lang = $session_lang;
700  } else {
701  $s_lang = $this->user->getLanguage();
702  }
703  $si = new ilSelectInputGUI($this->lng->txt("language"), "term_language");
704  $si->setOptions($lang);
705  $si->setValue($s_lang);
706  $this->toolbar->addInputItem($si, true);
707 
708  $this->toolbar->setFormAction($this->ctrl->getFormAction($this));
709  $this->toolbar->addFormButton($this->lng->txt("glo_add_new_term"), "addTerm");
710 
711  $this->toolbar->addSeparator();
712 
713  //ilEditClipboard::getAction() == "copy"
714  if ($this->user->clipboardHasObjectsOfType("term")) {
715  $this->toolbar->addButton(
716  $this->lng->txt("paste"),
717  $this->ctrl->getLinkTarget($this, "pasteTerms")
718  );
719  $this->toolbar->addButton(
720  $this->lng->txt("clear_clipboard"),
721  $this->ctrl->getLinkTarget($this, "clearClipboard")
722  );
723  } else {
724  $this->toolbar->addButton(
725  $this->lng->txt("glo_add_from_other"),
726  $this->ctrl->getLinkTargetByClass("ilglossaryforeigntermcollectorgui", "")
727  );
728  }
729 
730  $this->tabs->activateTab("cont_terms");
731 
732  $tab = new ilTermListTableGUI($this, "listTerms", $this->tax_node);
733  $this->tpl->setContent($tab->getHTML());
734  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
showTaxonomy()
Show taxonomy.
$lang
Definition: xapiexit.php:26
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ moveDefinitionDown()

ilObjGlossaryGUI::moveDefinitionDown ( )

move a definition down

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

References ILIAS\Repository\ctrl(), and ilGlossaryDefinition\moveDown().

801  : void
802  {
803  $definition = new ilGlossaryDefinition(
804  $this->edit_request->getDefinitionId()
805  );
806  $definition->moveDown();
807 
808  $this->ctrl->redirect($this, "listTerms");
809  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ moveDefinitionUp()

ilObjGlossaryGUI::moveDefinitionUp ( )

move a definition up

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

References ILIAS\Repository\ctrl(), and ilGlossaryDefinition\moveUp().

788  : void
789  {
790  $definition = new ilGlossaryDefinition(
791  $this->edit_request->getDefinitionId()
792  );
793  $definition->moveUp();
794 
795  $this->ctrl->redirect($this, "listTerms");
796  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ pasteTerms()

ilObjGlossaryGUI::pasteTerms ( )

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

References ilGlossaryTerm\_copyTerm(), ilGlossaryTermReferences\addTerm(), ILIAS\Repository\ctrl(), ilEditClipboard\getAction(), ILIAS\Repository\lng(), ILIAS\Repository\object(), and ILIAS\Repository\user().

1481  : void
1482  {
1483  if (ilEditClipboard::getAction() == "copy") {
1484  foreach ($this->user->getClipboardObjects("term") as $item) {
1485  ilGlossaryTerm::_copyTerm($item["id"], $this->object->getId());
1486  }
1487  }
1488  if (ilEditClipboard::getAction() == "link") {
1489  $refs = new ilGlossaryTermReferences($this->object->getId());
1490  foreach ($this->user->getClipboardObjects("term") as $item) {
1491  $refs->addTerm($item["id"]);
1492  }
1493  $refs->update();
1494  }
1495  $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
1496  $this->ctrl->redirect($this, "listTerms");
1497  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _copyTerm(int $a_term_id, int $a_glossary_id)
Copy a term to a glossary.
+ Here is the call graph for this function:

◆ properties()

ilObjGlossaryGUI::properties ( )

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

References ilObjectGUI\checkPermission(), ILIAS\Repository\form(), initSettingsForm(), and setSettingsSubTabs().

459  : void
460  {
461  $this->checkPermission("write");
462 
463  $this->setSettingsSubTabs("general_settings");
464 
465  $this->initSettingsForm();
466 
467  // Edit ecs export settings
468  $ecs = new ilECSGlossarySettings($this->object);
469  $ecs->addSettingsToForm($this->form, 'glo');
470 
471  $this->tpl->setContent($this->form->getHTML());
472  }
initSettingsForm(string $a_mode="edit")
form( $class_path, string $cmd)
setSettingsSubTabs(string $a_active)
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ publishExportFile()

ilObjGlossaryGUI::publishExportFile ( )

download export file

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

References ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ILIAS\Repository\object().

903  : void
904  {
905  $files = $this->edit_request->getFiles();
906  if (count($files) == 0) {
907  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("no_checkbox"), true);
908  $this->ctrl->redirectByClass("ilexportgui", "");
909  }
910  if (count($files) > 1) {
911  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("cont_select_max_one_item"), true);
912  $this->ctrl->redirectByClass("ilexportgui", "");
913  }
914 
915  $file = explode(":", $files[0]);
916  $export_dir = $this->object->getExportDirectory($file[0]);
917 
918  if ($this->object->getPublicExportFile($file[0]) ==
919  $file[1]) {
920  $this->object->setPublicExportFile($file[0], "");
921  } else {
922  $this->object->setPublicExportFile($file[0], $file[1]);
923  }
924  $this->object->update();
925  $this->ctrl->redirectByClass("ilexportgui", "");
926  }
+ Here is the call graph for this function:

◆ referenceTerms()

ilObjGlossaryGUI::referenceTerms ( )

Add terms to be referenced to clipboard.

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

References ilObjectGUI\$id, ilGlossaryTerm\_lookGlossaryTerm(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ilEditClipboard\setAction(), and ILIAS\Repository\user().

1445  : void
1446  {
1447  $items = $this->edit_request->getIds();
1448  if (count($items) == 0) {
1449  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("no_checkbox"), true);
1450  $this->ctrl->redirect($this, "listTerms");
1451  }
1452 
1453  $this->user->clipboardDeleteObjectsOfType("term");
1454 
1455  // put them into the clipboard
1456  $time = date("Y-m-d H:i:s");
1457  $order = 0;
1458  foreach ($items as $id) {
1459  $this->user->addObjectToClipboard(
1460  $id,
1461  "term",
1463  0,
1464  $time,
1465  $order
1466  );
1467  }
1468 
1470  $this->tpl->setOnScreenMessage('info', $this->lng->txt("glo_selected_terms_have_been_copied"), true);
1471  $this->ctrl->redirect($this, "listTerms");
1472  }
static setAction(string $a_action)
static _lookGlossaryTerm(int $term_id)
get glossary term
+ Here is the call graph for this function:

◆ removeGlossary()

ilObjGlossaryGUI::removeGlossary ( )

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

References ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

1401  : void
1402  {
1403  $this->object->removeAutoGlossary($this->edit_request->getGlossaryId());
1404  $this->object->update();
1405 
1406  $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
1407  $this->ctrl->redirect($this, "editGlossaries");
1408  }
+ Here is the call graph for this function:

◆ resetFilter()

ilObjGlossaryGUI::resetFilter ( )

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

References listTerms().

1225  : void
1226  {
1227  $prtab = new ilTermListTableGUI($this, "listTerms", $this->tax_node);
1228  $prtab->resetOffset();
1229  $prtab->resetFilter();
1230  $this->listTerms();
1231  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ saveObject()

ilObjGlossaryGUI::saveObject ( )

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

References ilPropertyFormGUI\checkInput(), ilObjectGUI\checkPermissionBool(), ILIAS\Repository\ctrl(), ilObjectGUI\getDidacticTemplateVar(), ilPropertyFormGUI\getHTML(), ilPropertyFormGUI\getInput(), initCreateForm(), ILIAS\Repository\lng(), ilObjectGUI\putObjectInTree(), and ilPropertyFormGUI\setValuesByPost().

340  : void
341  {
342  $new_type = $this->edit_request->getNewType();
343 
344  // create permission is already checked in createObject. This check here is done to prevent hacking attempts
345  if (!$this->checkPermissionBool("create", "", $new_type)) {
346  throw new ilPermissionException($this->lng->txt("no_create_permission"));
347  }
348 
349  $this->lng->loadLanguageModule($new_type);
350  $this->ctrl->setParameter($this, "new_type", $new_type);
351 
352  $form = $this->initCreateForm($new_type);
353  if ($form->checkInput()) {
354  $this->ctrl->setParameter($this, "new_type", "");
355 
356  $newObj = new ilObjGlossary();
357  $newObj->setType($new_type);
358  $newObj->setTitle($form->getInput("title"));
359  $newObj->setDescription($form->getInput("desc"));
360  $newObj->setVirtualMode("none");
361  $newObj->create();
362 
363  $this->putObjectInTree($newObj);
364 
365  // apply didactic template?
366  $dtpl = $this->getDidacticTemplateVar("dtpl");
367  if ($dtpl) {
368  $newObj->applyDidacticTemplate($dtpl);
369  }
370 
371  // always send a message
372  $this->tpl->setOnScreenMessage('success', $this->lng->txt("glo_added"), true);
373  $this->ctrl->setParameterByClass(
374  ilObjGlossaryGUI::class,
375  "ref_id",
376  $newObj->getRefId()
377  );
378  $this->ctrl->redirectByClass(
379  [ilGlossaryEditorGUI::class, ilObjGlossaryGUI::class],
380  "properties"
381  );
382  }
383 
384  // display only this form to correct input
386  $this->tpl->setContent($form->getHTML());
387  }
initCreateForm(string $new_type)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getDidacticTemplateVar(string $type)
Get didactic template setting from creation screen.
getInput(string $a_post_var, bool $ensureValidation=true)
Returns the input of an item, if item provides getInput method and as fallback the value of the HTTP-...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
putObjectInTree(ilObject $obj, int $parent_node_id=null)
Add object to tree at given position.
ilPropertyFormGUI $form
+ Here is the call graph for this function:

◆ saveProperties()

ilObjGlossaryGUI::saveProperties ( )

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

References $cols, $form, ILIAS\Repository\ctrl(), ilObjectServiceSettingsGUI\CUSTOM_METADATA, ILIAS\Repository\form(), ilObjectGUI\getObjectService(), initSettingsForm(), ILIAS\Repository\lng(), ILIAS\Repository\object(), ilGlossaryDefinition\setShortTextsDirty(), ilObjectServiceSettingsGUI\updateServiceSettingsForm(), and ilUtil\yn2tf().

633  : void
634  {
635  $obj_service = $this->getObjectService();
636 
637  $this->initSettingsForm();
638  if ($this->form->checkInput()) {
639  $this->object->setTitle($this->form->getInput("title"));
640  $this->object->setDescription($this->form->getInput("description"));
641  $this->object->setOnline(ilUtil::yn2tf($this->form->getInput("cobj_online")));
642  $glo_mode = $this->form->getInput("glo_mode") === "none"
643  ? $this->form->getInput("glo_mode")
644  : $this->form->getInput("glo_mode2");
645  $this->object->setVirtualMode($glo_mode);
646  $this->object->setActiveDownloads(ilUtil::yn2tf($this->form->getInput("glo_act_downloads")));
647  $this->object->setPresentationMode($this->form->getInput("pres_mode"));
648  $this->object->setSnippetLength($this->form->getInput("snippet_length"));
649  $this->object->setShowTaxonomy($this->form->getInput("show_tax"));
650  $this->object->update();
651 
652  // tile image
653  $obj_service->commonSettings()->legacyForm($this->form, $this->object)->saveTileImage();
654 
655  // field order of advanced metadata
656  $adv_ap = new ilGlossaryAdvMetaDataAdapter($this->object->getRefId());
657  $cols = $adv_ap->getColumnOrder();
658  if (count($cols) > 1) {
659  $adv_ap->saveColumnOrder($this->form->getInput("field_order"));
660  }
661 
662  // set definition short texts dirty
664 
666  $this->object->getId(),
667  $this->form,
668  array(
670  )
671  );
672 
673  // Update ecs export settings
674  $ecs = new ilECSGlossarySettings($this->object);
675  if ($ecs->handleSettingsUpdate()) {
676  $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
677  $this->ctrl->redirect($this, "properties");
678  }
679  }
680  $this->form->setValuesByPost();
681  $this->tpl->setContent($this->form->getHTML());
682  }
static setShortTextsDirty(int $a_glo_id)
Set all short texts of glossary dirty (e.g.
initSettingsForm(string $a_mode="edit")
static updateServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
form( $class_path, string $cmd)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static yn2tf(string $a_yn)
ilPropertyFormGUI $form
$cols
Definition: xhr_table.php:11
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ selectGlossary()

ilObjGlossaryGUI::selectGlossary ( )

Select auto glossary.

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

References ilObject\_lookupObjId(), ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

Referenced by selectGlossaryLink().

1386  : void
1387  {
1388  $glos = $this->object->getAutoGlossaries();
1389  $glo_ref_id = $this->edit_request->getGlossaryRefId();
1390  $glo_id = ilObject::_lookupObjId($glo_ref_id);
1391  if (!in_array($glo_id, $glos)) {
1392  $glos[] = $glo_id;
1393  }
1394  $this->object->setAutoGlossaries($glos);
1395  $this->object->update();
1396 
1397  $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
1398  $this->ctrl->redirect($this, "editGlossaries");
1399  }
static _lookupObjId(int $ref_id)
+ 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.

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

References selectGlossary().

1375  : void
1376  {
1377  $glo_ref_id = $this->edit_request->getGlossaryRefId();
1378  $this->object->autoLinkGlossaryTerms($glo_ref_id);
1379  $this->selectGlossary();
1380  }
selectGlossary()
Select auto glossary.
+ Here is the call graph for this function:

◆ setContentStyleSheet()

ilObjGlossaryGUI::setContentStyleSheet ( ilGlobalTemplateInterface  $a_tpl = null)

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

References ilObjectGUI\$tpl, ilGlobalTemplateInterface\addCss(), and ILIAS\Repository\object().

Referenced by confirmDefinitionDeletion().

1240  : void {
1241  if ($a_tpl != null) {
1242  $ctpl = $a_tpl;
1243  } else {
1244  $ctpl = $this->tpl;
1245  }
1246 
1247  $this->content_style_gui->addCss($ctpl, $this->object->getRefId());
1248  }
ilGlobalTemplateInterface $tpl
addCss(string $a_css_file, string $media="screen")
Add a css file that should be included in the header.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setLocator()

ilObjGlossaryGUI::setLocator ( )
protected

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

Referenced by executeCommand(), and showInfoScreen().

1002  : void
1003  {
1004  if (strtolower($this->edit_request->getBaseClass()) != "ilglossaryeditorgui") {
1005  parent::setLocator();
1006  } elseif (is_object($this->object)) {
1007  $gloss_loc = new ilGlossaryLocatorGUI();
1008  if (is_object($this->term)) {
1009  $gloss_loc->setTerm($this->term);
1010  }
1011  $gloss_loc->setGlossary($this->getGlossary());
1012  $gloss_loc->display();
1013  }
1014  }
+ Here is the caller graph for this function:

◆ setSettingsSubTabs()

ilObjGlossaryGUI::setSettingsSubTabs ( string  $a_active)

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

References ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ilObjTaxonomy\loadLanguageModule(), and ILIAS\Repository\tabs().

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

1151  : void
1152  {
1153  if (in_array(
1154  $a_active,
1155  array("general_settings", "style", "taxonomy", "glossaries")
1156  )) {
1157  // general properties
1158  $this->tabs->addSubTab(
1159  "general_settings",
1160  $this->lng->txt("settings"),
1161  $this->ctrl->getLinkTarget($this, 'properties')
1162  );
1163 
1164  // style properties
1165  $this->tabs->addSubTab(
1166  "style",
1167  $this->lng->txt("obj_sty"),
1168  $this->ctrl->getLinkTargetByClass("ilobjectcontentstylesettingsgui", '')
1169  );
1170 
1171  // taxonomy
1173  $this->tabs->addSubTab(
1174  "taxonomy",
1175  $this->lng->txt("tax_taxonomy"),
1176  $this->ctrl->getLinkTargetByClass("ilobjtaxonomygui", '')
1177  );
1178 
1179  // style properties
1180  $this->tabs->addSubTab(
1181  "glossaries",
1182  $this->lng->txt("cont_auto_glossaries"),
1183  $this->ctrl->getLinkTarget($this, 'editGlossaries')
1184  );
1185 
1186  $this->tabs->activateSubTab($a_active);
1187  }
1188  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showGlossarySelector()

ilObjGlossaryGUI::showGlossarySelector ( )

Show auto glossary selection.

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

References ILIAS\Repository\ctrl(), ilExplorer\setExpand(), setSettingsSubTabs(), and ILIAS\Repository\tabs().

1342  : void
1343  {
1344  $this->tabs->setTabActive("settings");
1345  $this->setSettingsSubTabs("glossaries");
1346 
1347  $exp = new ilSearchRootSelector($this->ctrl->getLinkTarget($this, 'showGlossarySelector'));
1348  $search_root_expand = $this->edit_request->getSearchRootExpand();
1349  $exp->setExpand($search_root_expand ?: $this->tree->readRootId());
1350  $exp->setExpandTarget($this->ctrl->getLinkTarget($this, 'showGlossarySelector'));
1351  $exp->setTargetClass(get_class($this));
1352  $exp->setCmd('confirmGlossarySelection');
1353  $exp->setClickableTypes(array("glo"));
1354  $exp->addFilter("glo");
1355 
1356  // build html-output
1357  $exp->setOutput(0);
1358  $this->tpl->setContent($exp->getOutput());
1359  }
setSettingsSubTabs(string $a_active)
setExpand($a_node_id)
set the expand option this value is stored in a SESSION variable to save it different view (lo view...
+ Here is the call graph for this function:

◆ showInfoScreen()

ilObjGlossaryGUI::showInfoScreen ( )

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

References ILIAS\Repository\access(), ILIAS\Repository\ctrl(), getTemplate(), ILIAS\Repository\lng(), ILIAS\Repository\object(), setLocator(), and ilObjectGUI\setTabs().

Referenced by executeCommand().

389  : void
390  {
391  $this->getTemplate();
392  $this->setTabs();
393  $this->setLocator();
394  $this->lng->loadLanguageModule("meta");
395 
396  $info = new ilInfoScreenGUI($this);
397  $info->enablePrivateNotes();
398  $info->enableNews();
399  if ($this->access->checkAccess("write", "", $this->requested_ref_id)) {
400  $info->enableNewsEditing();
401  $news_set = new ilSetting("news");
402  $enable_internal_rss = $news_set->get("enable_rss_for_internal");
403  if ($enable_internal_rss) {
404  $info->setBlockProperty("news", "settings", true);
405  }
406  }
407  $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
408 
409  self::addUsagesToInfo($info, $this->object->getId());
410 
411  $this->ctrl->forwardCommand($info);
412  }
Class ilInfoScreenGUI.
setTabs()
set admin tabs
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showTaxonomy()

ilObjGlossaryGUI::showTaxonomy ( )

Show taxonomy.

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

References ilObjectGUI\$ctrl, $DIC, $tax_id, ilCtrl\getCurrentClassPath(), ilObjTaxonomy\getUsageOfObject(), ILIAS\Repository\object(), ilTaxonomyGSToolProvider\SHOW_TAX_TREE, ilTaxonomyGSToolProvider\TAX_ID, ilTaxonomyGSToolProvider\TAX_TREE_CMD, ilTaxonomyGSToolProvider\TAX_TREE_GUI_PATH, and ilTaxonomyGSToolProvider\TAX_TREE_PARENT_CMD.

Referenced by listTerms().

1267  : void
1268  {
1269  global $DIC;
1270 
1271  $ctrl = $DIC->ctrl();
1272 
1273  $tax_ids = ilObjTaxonomy::getUsageOfObject($this->object->getId());
1274  if (count($tax_ids) > 0) {
1275  $tax_id = $tax_ids[0];
1276  $DIC->globalScreen()->tool()->context()->current()
1277  ->addAdditionalData(
1279  true
1280  );
1281  $DIC->globalScreen()->tool()->context()->current()
1282  ->addAdditionalData(
1285  );
1286  $DIC->globalScreen()->tool()->context()->current()
1287  ->addAdditionalData(
1289  $tax_id
1290  );
1291  $DIC->globalScreen()->tool()->context()->current()
1292  ->addAdditionalData(
1294  "listTerms"
1295  );
1296  $DIC->globalScreen()->tool()->context()->current()
1297  ->addAdditionalData(
1299  "showTaxonomy"
1300  );
1301 
1302 
1303  $tax_exp = new ilTaxonomyExplorerGUI(
1304  get_class($this),
1305  "showTaxonomy",
1306  $tax_ids[0],
1307  "ilobjglossarygui",
1308  "listTerms"
1309  );
1310  if (!$tax_exp->handleCommand()) {
1311  //$this->tpl->setLeftNavContent($tax_exp->getHTML());
1312  //$this->tpl->setLeftNavContent($tax_exp->getHTML() . "&nbsp;");
1313  }
1314  }
1315  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getUsageOfObject(int $a_obj_id, bool $a_include_titles=false)
global $DIC
Definition: feed.php:28
getCurrentClassPath()
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ view()

ilObjGlossaryGUI::view ( )

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

References viewObject().

1016  : void
1017  {
1018  $this->viewObject();
1019  }
+ Here is the call graph for this function:

◆ viewObject()

ilObjGlossaryGUI::viewObject ( )

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

References ILIAS\Repository\lng().

Referenced by view().

447  : void
448  {
449  if ($this->in_administration) {
450  parent::viewObject();
451  return;
452  }
453 
454  if (!$this->rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
455  throw new ilPermissionException($this->lng->txt("permission_denied"));
456  }
457  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $content_style_domain

ILIAS Style Content Object ObjectFacade ilObjGlossaryGUI::$content_style_domain
protected

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

◆ $content_style_gui

ILIAS Style Content GUIService ilObjGlossaryGUI::$content_style_gui
protected

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

◆ $edit_request

ILIAS Glossary Editing EditingGUIRequest ilObjGlossaryGUI::$edit_request
protected

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

◆ $form

ilPropertyFormGUI ilObjGlossaryGUI::$form
protected

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

Referenced by initCreateForm(), initSettingsForm(), and saveProperties().

◆ $help

ilHelpGUI ilObjGlossaryGUI::$help
protected

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

◆ $in_administration

bool ilObjGlossaryGUI::$in_administration = false
protected

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

◆ $log

ilLogger ilObjGlossaryGUI::$log
protected

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

◆ $rbacsystem

ilRbacSystem ilObjGlossaryGUI::$rbacsystem
protected

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

◆ $setting

ilSetting ilObjGlossaryGUI::$setting
protected

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

◆ $tabs

ilTabsGUI ilObjGlossaryGUI::$tabs
protected

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

◆ $tax

ilObjTaxonomy ilObjGlossaryGUI::$tax
protected

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

◆ $tax_id

ilObjGlossaryGUI::$tax_id
protected

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

Referenced by showTaxonomy().

◆ $tax_node

int ilObjGlossaryGUI::$tax_node = 0
protected

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

Referenced by __construct().

◆ $term

ilGlossaryTerm ilObjGlossaryGUI::$term = null

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

◆ $term_id

int ilObjGlossaryGUI::$term_id = 0
protected

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

Referenced by __construct(), and confirmTermDeletion().

◆ $term_manager

ILIAS Glossary Term TermManager ilObjGlossaryGUI::$term_manager
protected

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

◆ $term_perm

ilGlossaryTermPermission ilObjGlossaryGUI::$term_perm
protected

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


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