ILIAS  release_7 Revision v7.30-3-g800a261c036
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 public. More...
 
 executeCommand ()
 execute command More...
 
 assignObject ()
 
 initCreateForm ($a_new_type)
 
 importObject ()
 
 saveObject ()
 save new content object to db More...
 
 showInfoScreen ()
 Show info screen. More...
 
 viewObject ()
 
 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 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 ()
 viewObject container presentation for "administration -> repository, trash, permissions" 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...
 
 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 ($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 ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
 
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
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $rbacsystem
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 
 $favourites
 
 $request
 

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...
 
 setTabs ()
 set admin tabs public More...
 
 setAdminTabs ()
 set admin tabs 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 public.

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

References $_GET, $DIC, $term_id, ILIAS\GlobalScreen\Provider\__construct(), ilGlossaryTerm\_lookGlossaryID(), ilGlossaryTermPermission\getInstance(), ilLoggerFactory\getLogger(), help(), ilGlossaryTermReferences\isReferenced(), and user().

88  {
89  $this->error = $DIC["ilErr"];
90  global $DIC;
91 
92  $this->ctrl = $DIC->ctrl();
93  $this->lng = $DIC->language();
94  $this->user = $DIC->user();
95  $this->toolbar = $DIC->toolbar();
96  $this->tabs = $DIC->tabs();
97  $this->setting = $DIC["ilSetting"];
98  $this->access = $DIC->access();
99  $this->rbacsystem = $DIC->rbac()->system();
100  $this->help = $DIC["ilHelp"];
101 
102  $this->log = ilLoggerFactory::getLogger('glo');
103 
104  $this->term_perm = ilGlossaryTermPermission::getInstance();
105 
106  $this->ctrl->saveParameter($this, array("ref_id", "offset"));
107 
108  $this->lng->loadLanguageModule("content");
109  $this->lng->loadLanguageModule("glo");
110 
111  $this->type = "glo";
112  parent::__construct($a_data, $a_id, $a_call_by_reference, false);
113 
114  // determine term id and check whether it is valid (belongs to
115  // current glossary)
116  $this->term_id = (int) $_GET["term_id"];
117  $term_glo_id = ilGlossaryTerm::_lookGlossaryID($this->term_id);
118  if ($this->term_id > 0 && $term_glo_id != $this->object->getId()
119  && !ilGlossaryTermReferences::isReferenced($this->object->getId(), $this->term_id)) {
120  $this->term_id = "";
121  }
122 
123  $this->tax_id = $this->object->getTaxonomyId();
124  if ($this->tax_id > 0) {
125  $this->ctrl->saveParameter($this, array("show_tax", "tax_node"));
126 
127  $this->tax = new ilObjTaxonomy($this->tax_id);
128  }
129  if ((int) $_GET["tax_node"] > 1 && $this->tax->getTree()->readRootId() != $_GET["tax_node"]) {
130  $this->tax_node = (int) $_GET["tax_node"];
131  }
132  }
static isReferenced($a_glo_id, $a_term_id)
Is a term referenced by one or multiple glossaries.
$_GET["client_id"]
user()
Definition: user.php:4
help()
Definition: help.php:2
global $DIC
Definition: goto.php:24
static _lookGlossaryID($term_id)
get glossary id form term id
__construct(Container $dic, ilPlugin $plugin)
static getLogger($a_component_id)
Get component logger.
+ 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 1376 of file class.ilObjGlossaryGUI.php.

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

1377  {
1378  global $DIC;
1379 
1380  $lng = $DIC->language();
1381  $ilAccess = $DIC->access();
1382  $ilErr = $DIC["ilErr"];
1383 
1384  if ($ilAccess->checkAccess("read", "", $a_target)) {
1385  $_GET["ref_id"] = $a_target;
1386  $_GET["baseClass"] = "ilGlossaryPresentationGUI";
1387  include("ilias.php");
1388  exit;
1389  } elseif ($ilAccess->checkAccess("visible", "", $a_target)) {
1390  $_GET["ref_id"] = $a_target;
1391  $_GET["cmd"] = "infoScreen";
1392  $_GET["baseClass"] = "ilGlossaryPresentationGUI";
1393  include("ilias.php");
1394  exit;
1395  } elseif ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
1396  ilUtil::sendFailure(sprintf(
1397  $lng->txt("msg_no_perm_read_item"),
1399  ), true);
1401  }
1402 
1403  $ilErr->raiseError($lng->txt("msg_no_perm_read_lm"), $ilErr->FATAL);
1404  }
exit
Definition: login.php:29
const ROOT_FOLDER_ID
Definition: constants.php:30
$_GET["client_id"]
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
static _lookupTitle($a_id)
lookup object title
static _lookupObjId($a_id)
global $DIC
Definition: goto.php:24
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:

◆ actTaxonomy()

ilObjGlossaryGUI::actTaxonomy ( )

Show Taxonomy.

Parameters

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

788  {
789  $this->ctrl->setParameter($this, "show_tax", 1);
790  $this->ctrl->redirect($this, "listTerms");
791  }

◆ addDefinition()

ilObjGlossaryGUI::addDefinition ( )

add definition

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

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

1187  {
1188  $term_id = (int) $_GET["term_id"];
1189 
1190  $term_glo_id = ilGlossaryTerm::_lookGlossaryID((int) $term_id);
1191  if ($term_glo_id != $this->object->getId()) {
1192  ilUtil::sendFailure($this->lng->txt("glo_term_must_belong_to_glo"), true);
1193  $this->ctrl->redirect($this, "listTerms");
1194  }
1195 
1196  // add term
1197  $term = new ilGlossaryTerm($term_id);
1198 
1199  // add first definition
1200  $def = new ilGlossaryDefinition();
1201  $def->setTermId($term->getId());
1202  $def->setTitle(ilUtil::stripSlashes($term->getTerm()));
1203  $def->create();
1204 
1205  $this->ctrl->setParameterByClass("ilglossarydefpagegui", "term_id", $term->getId());
1206  $this->ctrl->setParameterByClass("ilglossarydefpagegui", "def", $def->getId());
1207  $this->ctrl->redirectByClass(array("ilglossarytermgui",
1208  "iltermdefinitioneditorgui", "ilglossarydefpagegui"), "edit");
1209  }
$_GET["client_id"]
Glossary terms.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static _lookGlossaryID($term_id)
get glossary id form term id
Class ilGlossaryDefinition.
+ Here is the call graph for this function:

◆ addTerm()

ilObjGlossaryGUI::addTerm ( )

add term

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

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

840  {
841  if (trim($_POST["new_term"]) == "") {
842  ilUtil::sendFailure($this->lng->txt("cont_please_enter_a_term"), true);
843  $this->ctrl->redirect($this, "listTerms");
844  }
845 
846  // add term
847  $term = new ilGlossaryTerm();
848  $term->setGlossary($this->object);
849  $term->setTerm(ilUtil::stripSlashes($_POST["new_term"]));
850  $term->setLanguage($_POST["term_language"]);
851  $_SESSION["il_text_lang_" . $_GET["ref_id"]] = $_POST["term_language"];
852  $term->create();
853 
854  // add first definition
855  $def = new ilGlossaryDefinition();
856  $def->setTermId($term->getId());
857  $def->setTitle(ilUtil::stripSlashes($_POST["new_term"]));
858  $def->create();
859 
860  $this->ctrl->setParameterByClass("ilglossarydefpagegui", "term_id", $term->getId());
861  $this->ctrl->setParameterByClass("ilglossarydefpagegui", "def", $def->getId());
862  $this->ctrl->redirectByClass(array("ilglossarytermgui",
863  "iltermdefinitioneditorgui", "ilglossarydefpagegui"), "edit");
864  }
$_SESSION["AccountId"]
$_GET["client_id"]
Glossary terms.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
Class ilGlossaryDefinition.
$_POST["username"]
+ Here is the call graph for this function:

◆ addUsagesToInfo()

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

Add usages to info.

Parameters

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

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

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

451  {
452  global $DIC;
453 
454  $lng = $DIC->language();
455  $ilAccess = $DIC->access();
456 
457  $info->addSection($lng->txt("glo_usages"));
459  foreach ($sms as $sm) {
460  $link = false;
461  $refs = ilObject::_getAllReferences($sm);
462  foreach ($refs as $ref) {
463  if ($link === false) {
464  if ($ilAccess->checkAccess("write", "", $ref)) {
465  $link = ilLink::_getLink($ref, 'sahs');
466  }
467  }
468  }
469 
470  $entry = ilObject::_lookupTitle($sm);
471  if ($link !== false) {
472  $entry = "<a href='" . $link . "' target='_top'>" . $entry . "</a>";
473  }
474 
475  $info->addProperty($lng->txt("obj_sahs"), $entry);
476  }
477  }
static _lookupTitle($a_id)
lookup object title
static _getAllReferences($a_id)
get all reference ids of object
global $DIC
Definition: goto.php:24
static getScormModulesForGlossary($a_glo_id)
Get SCORM modules that assign a certain glossary.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ applyFilter()

ilObjGlossaryGUI::applyFilter ( )

Apply filter.

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

References listTerms().

1410  {
1411  $prtab = new ilTermListTableGUI($this, "listTerms", $this->tax_node);
1412  $prtab->resetOffset();
1413  $prtab->writeFilterToSession();
1414  $this->listTerms();
1415  }
+ Here is the call graph for this function:

◆ assignObject()

ilObjGlossaryGUI::assignObject ( )

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

317  {
318  $this->object = new ilObjGlossary($this->id, true);
319  }
Class ilObjGlossary.

◆ cancelDefinitionDeletion()

ilObjGlossaryGUI::cancelDefinitionDeletion ( )

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

946  {
947  $this->ctrl->redirect($this, "listTerms");
948  }

◆ cancelTermDeletion()

ilObjGlossaryGUI::cancelTermDeletion ( )

cancel deletion of object

public

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

1102  {
1103  $this->ctrl->redirect($this, "listTerms");
1104  }

◆ clearClipboard()

ilObjGlossaryGUI::clearClipboard ( )

Clear clipboard.

Parameters

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

References user().

1842  {
1843  $this->user->clipboardDeleteObjectsOfType("term");
1844  $this->ctrl->redirect($this, "listTerms");
1845  }
user()
Definition: user.php:4
+ Here is the call graph for this function:

◆ confirmDefinitionDeletion()

ilObjGlossaryGUI::confirmDefinitionDeletion ( )

deletion confirmation screen

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

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

892  {
893  //$this->getTemplate();
894  //$this->displayLocator();
895  //$this->setTabs();
896 
897  $term = new ilGlossaryTerm($this->term_id);
898 
899  $add = "";
900  $nr = ilGlossaryTerm::getNumberOfUsages($this->term_id);
901  if ($nr > 0) {
902  $this->ctrl->setParameterByClass(
903  "ilglossarytermgui",
904  "term_id",
905  $this->term_id
906  );
907  $link = "[<a href='" .
908  $this->ctrl->getLinkTargetByClass("ilglossarytermgui", "listUsages") .
909  "'>" . $this->lng->txt("glo_list_usages") . "</a>]";
910  $add = "<br/>" . sprintf($this->lng->txt("glo_term_is_used_n_times"), $nr) . " " . $link;
911  }
912 
913  $cgui = new ilConfirmationGUI();
914  $cgui->setHeaderText($this->lng->txt("info_delete_sure") . $add);
915 
916  $cgui->setFormAction($this->ctrl->getFormAction($this));
917  $cgui->setCancel($this->lng->txt("cancel"), "cancelDefinitionDeletion");
918  $cgui->setConfirm($this->lng->txt("confirm"), "deleteDefinition");
919 
920  // content style
921  $this->setContentStyleSheet($this->tpl);
922 
923  // syntax style
924  $this->tpl->setCurrentBlock("SyntaxStyle");
925  $this->tpl->setVariable(
926  "LOCATION_SYNTAX_STYLESHEET",
928  );
929  $this->tpl->parseCurrentBlock();
930 
931  $definition = new ilGlossaryDefinition($_GET["def"]);
932  $page_gui = new ilGlossaryDefPageGUI($definition->getId());
933  $page_gui->setTemplateOutput(false);
934  $page_gui->setStyleId($this->object->getStyleSheetId());
935  $page_gui->setSourcecodeDownloadScript("ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=" . $_GET["ref_id"]);
936  $page_gui->setFileDownloadLink("ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=" . $_GET["ref_id"]);
937  $page_gui->setFullscreenLink("ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=" . $_GET["ref_id"]);
938  $output = $page_gui->preview();
939 
940  $cgui->addItem("def", $_GET["def"], $term->getTerm() . $output);
941 
942  $this->tpl->setContent($cgui->getHTML());
943  }
setTemplateOutput($a_output=true)
$_GET["client_id"]
static getNumberOfUsages($a_term_id)
Get number of usages.
Glossary terms.
static getSyntaxStylePath()
get syntax style path
Class ilGlossaryDefinition.
setContentStyleSheet($a_tpl=null)
Set content style sheet.
Glossary definition page GUI class.
Confirmation screen class.
+ Here is the call graph for this function:

◆ confirmGlossarySelection()

ilObjGlossaryGUI::confirmGlossarySelection ( )

Confirm glossary selection.

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

References $_GET.

1703  {
1704  $cgui = new ilConfirmationGUI();
1705  $this->ctrl->setParameter($this, "glo_ref_id", $_GET["root_id"]);
1706  $cgui->setFormAction($this->ctrl->getFormAction($this));
1707  $cgui->setHeaderText($this->lng->txt("glo_link_glo_in_glo"));
1708  $cgui->setCancel($this->lng->txt("no"), "selectGlossary");
1709  $cgui->setConfirm($this->lng->txt("yes"), "selectGlossaryLink");
1710  $this->tpl->setContent($cgui->getHTML());
1711  }
$_GET["client_id"]
Confirmation screen class.

◆ confirmTermDeletion()

ilObjGlossaryGUI::confirmTermDeletion ( )

confirm term deletion

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

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

1044  {
1045  //$this->prepareOutput();
1046  if (!isset($_POST["id"])) {
1047  ilUtil::sendFailure($this->lng->txt("no_checkbox"), true);
1048  $this->ctrl->redirect($this, "listTerms");
1049  }
1050 
1051  // check ids
1052  foreach ($_POST["id"] as $term_id) {
1053  $term_glo_id = ilGlossaryTerm::_lookGlossaryID((int) $term_id);
1054  if ($term_glo_id != $this->object->getId() && !ilGlossaryTermReferences::isReferenced($this->object->getId(), $term_id)) {
1055  ilUtil::sendFailure($this->lng->txt("glo_term_must_belong_to_glo"), true);
1056  $this->ctrl->redirect($this, "listTerms");
1057  }
1058  }
1059 
1060  // display confirmation message
1061  $cgui = new ilConfirmationGUI();
1062  $cgui->setFormAction($this->ctrl->getFormAction($this));
1063  $cgui->setHeaderText($this->lng->txt("info_delete_sure"));
1064  $cgui->setCancel($this->lng->txt("cancel"), "cancelTermDeletion");
1065  $cgui->setConfirm($this->lng->txt("confirm"), "deleteTerms");
1066 
1067  foreach ($_POST["id"] as $id) {
1068  $term = new ilGlossaryTerm($id);
1069 
1070  $add = "";
1072  if ($nr > 0) {
1073  $this->ctrl->setParameterByClass(
1074  "ilglossarytermgui",
1075  "term_id",
1076  $id
1077  );
1078 
1079  if (ilGlossaryTermReferences::isReferenced($this->object->getId(), $id)) {
1080  $add = " (" . $this->lng->txt("glo_term_reference") . ")";
1081  } else {
1082  $link = "[<a href='" .
1083  $this->ctrl->getLinkTargetByClass("ilglossarytermgui", "listUsages") .
1084  "'>" . $this->lng->txt("glo_list_usages") . "</a>]";
1085  $add = "<div class='small'>" .
1086  sprintf($this->lng->txt("glo_term_is_used_n_times"), $nr) . " " . $link . "</div>";
1087  }
1088  }
1089 
1090  $cgui->addItem("id[]", $id, $term->getTerm() . $add);
1091  }
1092 
1093  $this->tpl->setContent($cgui->getHTML());
1094  }
static isReferenced($a_glo_id, $a_term_id)
Is a term referenced by one or multiple glossaries.
static getNumberOfUsages($a_term_id)
Get number of usages.
Glossary terms.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static _lookGlossaryID($term_id)
get glossary id form term id
$_POST["username"]
Confirmation screen class.
+ Here is the call graph for this function:

◆ copyTerms()

ilObjGlossaryGUI::copyTerms ( )

Copy terms.

Parameters

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

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

1771  {
1772  $items = ilUtil::stripSlashesArray($_POST["id"]);
1773  if (!is_array($items)) {
1774  ilUtil::sendFailure($this->lng->txt("no_checkbox"), true);
1775  $this->ctrl->redirect($this, "listTerms");
1776  }
1777 
1778  $this->user->clipboardDeleteObjectsOfType("term");
1779 
1780  // put them into the clipboard
1781  $time = date("Y-m-d H:i:s", time());
1782  $order = 0;
1783  foreach ($items as $id) {
1784  $this->user->addObjectToClipboard(
1785  $id,
1786  "term",
1788  0,
1789  $time,
1790  $order
1791  );
1792  }
1793 
1795  ilUtil::sendInfo($this->lng->txt("glo_selected_terms_have_been_copied"), true);
1796  $this->ctrl->redirect($this, "listTerms");
1797  }
user()
Definition: user.php:4
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static stripSlashesArray($a_arr, $a_strip_html=true, $a_allow="")
Strip slashes from array.
static setAction($a_action)
static _lookGlossaryTerm($term_id)
get glossary term
$_POST["username"]
+ Here is the call graph for this function:

◆ create()

ilObjGlossaryGUI::create ( )

create new (subobject) in glossary

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

References $_POST.

1161  {
1162  switch ($_POST["new_type"]) {
1163  case "term":
1164  $term_gui = new ilGlossaryTermGUI();
1165  $term_gui->create();
1166  break;
1167  }
1168  }
GUI class for glossary terms.
$_POST["username"]

◆ createStyle()

ilObjGlossaryGUI::createStyle ( )

Create Style.

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

1548  {
1549  $this->ctrl->redirectByClass("ilobjstylesheetgui", "create");
1550  }

◆ deactTaxonomy()

ilObjGlossaryGUI::deactTaxonomy ( )

Hide Taxonomy.

Parameters

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

800  {
801  $this->ctrl->setParameter($this, "show_tax", "");
802  $this->ctrl->redirect($this, "listTerms");
803  }

◆ deleteDefinition()

ilObjGlossaryGUI::deleteDefinition ( )

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

952  {
953  $definition = new ilGlossaryDefinition($_REQUEST["def"]);
954  $definition->delete();
955  $this->ctrl->redirect($this, "listTerms");
956  }
Class ilGlossaryDefinition.

◆ deleteStyle()

ilObjGlossaryGUI::deleteStyle ( )

Delete Style.

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

1564  {
1565  $this->ctrl->redirectByClass("ilobjstylesheetgui", "delete");
1566  }

◆ deleteTerms()

ilObjGlossaryGUI::deleteTerms ( )

delete selected terms

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

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

1110  {
1111  foreach ($_POST["id"] as $id) {
1112  if (ilGlossaryTermReferences::isReferenced($this->object->getId(), $id)) {
1113  $refs = new ilGlossaryTermReferences($this->object->getId());
1114  $refs->deleteTerm($id);
1115  $refs->update();
1116  } else {
1117  $term = new ilGlossaryTerm($id);
1118  $term->delete();
1119  }
1120  }
1121  $this->ctrl->redirect($this, "listTerms");
1122  }
static isReferenced($a_glo_id, $a_term_id)
Is a term referenced by one or multiple glossaries.
Glossary terms.
$_POST["username"]
+ Here is the call graph for this function:

◆ editGlossaries()

ilObjGlossaryGUI::editGlossaries ( )

Edit automatically linked glossaries.

Parameters

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

References setSettingsSubTabs().

1661  {
1662  $this->tabs->setTabActive("settings");
1663  $this->setSettingsSubTabs("glossaries");
1664 
1665  $this->toolbar->addButton(
1666  $this->lng->txt("add"),
1667  $this->ctrl->getLinkTarget($this, "showGlossarySelector")
1668  );
1669 
1670  $tab = new ilGlossaryAutoLinkTableGUI($this->object, $this, "editGlossaries");
1671 
1672  $this->tpl->setContent($tab->getHTML());
1673  }
setSettingsSubTabs($a_active)
Set sub tabs.
TableGUI class for auto link glossaries.
+ Here is the call graph for this function:

◆ editStyle()

ilObjGlossaryGUI::editStyle ( )

Edit Style.

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

1556  {
1557  $this->ctrl->redirectByClass("ilobjstylesheetgui", "edit");
1558  }

◆ editStyleProperties()

ilObjGlossaryGUI::editStyleProperties ( )

Edit style properties.

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

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

1458  {
1459  $this->checkPermission("write");
1460 
1461  $this->initStylePropertiesForm();
1462  $this->tpl->setContent($this->form->getHTML());
1463 
1464  $this->tabs->activateTab("settings");
1465  $this->setSettingsSubTabs("style");
1466  }
setSettingsSubTabs($a_active)
Set sub tabs.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
initStylePropertiesForm()
Init style properties form.
+ Here is the call graph for this function:

◆ editTerm()

ilObjGlossaryGUI::editTerm ( )

edit term

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

962  {
963  // deprecated
964  }

◆ executeCommand()

ilObjGlossaryGUI::executeCommand ( )

execute command

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

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

138  {
139  $cmd = $this->ctrl->getCmd();
140  $next_class = $this->ctrl->getNextClass($this);
141 
142  $this->log->debug("glossary term, next class " . $next_class . ", cmd: " . $cmd);
143 
144  switch ($next_class) {
145  case 'ilobjectmetadatagui':
146  $this->checkPermission("write");
147 
148  $this->getTemplate();
149  $this->setTabs();
150  $this->setLocator();
151  $this->addHeaderAction();
152 
153  $this->tabs_gui->activateTab('meta_data');
154  $md_gui = new ilObjectMetaDataGUI($this->object, 'term');
155  $this->ctrl->forwardCommand($md_gui);
156  break;
157 
158  case "ilglossarytermgui":
159  if (!$this->term_perm->checkPermission("edit_content", $this->term_id) &&
160  !$this->term_perm->checkPermission("write", $this->term_id)) {
161  throw new ilGlossaryException("No permission.");
162  }
163  $this->getTemplate();
164 // $this->quickList();
165  $this->ctrl->setReturn($this, "listTerms");
166  $term_gui = new ilGlossaryTermGUI($this->term_id);
167  $term_gui->setGlossary($this->object);
168  //$ret = $term_gui->executeCommand();
169  $ret = $this->ctrl->forwardCommand($term_gui);
170  break;
171 
172  case "ilinfoscreengui":
173  $this->addHeaderAction();
174  $this->showInfoScreen();
175  break;
176 
177  case "ilobjstylesheetgui":
178  $this->ctrl->setReturn($this, "editStyleProperties");
179  $style_gui = new ilObjStyleSheetGUI("", $this->object->getStyleSheetId(), false, false);
180  $style_gui->omitLocator();
181  if ($cmd == "create" || $_GET["new_type"] == "sty") {
182  $style_gui->setCreationMode(true);
183  }
184 
185  if ($cmd == "confirmedDelete") {
186  $this->object->setStyleSheetId(0);
187  $this->object->update();
188  }
189 
190  $ret = $this->ctrl->forwardCommand($style_gui);
191 
192  if ($cmd == "save" || $cmd == "copyStyle" || $cmd == "importStyle") {
193  $style_id = $ret;
194  $this->object->setStyleSheetId($style_id);
195  $this->object->update();
196  $this->ctrl->redirectByClass("ilobjstylesheetgui", "edit");
197  }
198  break;
199 
200 
201  case 'ilpermissiongui':
202  if (strtolower($_GET["baseClass"]) == "iladministrationgui") {
203  $this->prepareOutput();
204  } else {
205  $this->getTemplate();
206  $this->setTabs();
207  $this->setLocator();
208  $this->addHeaderAction();
209  }
210  $perm_gui = new ilPermissionGUI($this);
211  $ret = $this->ctrl->forwardCommand($perm_gui);
212  break;
213 
214  case "ilcommonactiondispatchergui":
216  $this->prepareOutput();
217  $this->ctrl->forwardCommand($gui);
218  break;
219 
220  case "ilobjtaxonomygui":
221  $this->getTemplate();
222  $this->setTabs();
223  $this->setLocator();
224  $this->addHeaderAction();
225  $this->tabs->activateTab("settings");
226  $this->setSettingsSubTabs("taxonomy");
227 
228  $this->ctrl->setReturn($this, "properties");
229  $tax_gui = new ilObjTaxonomyGUI();
230  $tax_gui->setMultiple(false);
231 
232  $tax_gui->setAssignedObject($this->object->getId());
233  $ret = $this->ctrl->forwardCommand($tax_gui);
234  break;
235 
236  case "ilexportgui":
237  $this->getTemplate();
238  $this->setTabs();
239  $this->tabs->activateTab("export");
240  $this->setLocator();
241  $exp_gui = new ilExportGUI($this);
242  //$exp_gui->addFormat("xml", "", $this, "export");
243  $exp_gui->addFormat("xml");
244  $exp_gui->addFormat("html", "", $this, "exportHTML");
245  $exp_gui->addCustomColumn(
246  $this->lng->txt("cont_public_access"),
247  $this,
248  "getPublicAccessColValue"
249  );
250  $exp_gui->addCustomMultiCommand(
251  $this->lng->txt("cont_public_access"),
252  $this,
253  "publishExportFile"
254  );
255  $ret = $this->ctrl->forwardCommand($exp_gui);
256  break;
257 
258  case 'ilobjectcopygui':
259  $this->prepareOutput();
260  $cp = new ilObjectCopyGUI($this);
261  $cp->setType('glo');
262  $this->ctrl->forwardCommand($cp);
263  break;
264 
265  case "ilglossaryforeigntermcollectorgui":
266  $this->ctrl->setReturn($this, "");
267  $this->getTemplate();
268  $this->setTabs();
269  $this->setLocator();
270  $this->addHeaderAction();
272  $this->ctrl->forwardCommand($coll);
273  break;
274 
275  default:
276  $cmd = $this->ctrl->getCmd("listTerms");
277 
278  if (($cmd == "create") && ($_POST["new_type"] == "term")) {
279  $this->ctrl->setCmd("create");
280  $this->ctrl->setCmdClass("ilGlossaryTermGUI");
281  $ret = $this->executeCommand();
282  return;
283  } else {
284  if (!in_array($cmd, array("quickList"))) {
285  if (strtolower($_GET["baseClass"]) == "iladministrationgui" ||
286  $this->getCreationMode() == true) {
287  $this->prepareOutput();
288  $cmd .= "Object";
289  } else {
290  $this->getTemplate();
291  $this->setTabs();
292  $this->setLocator();
293  $this->addHeaderAction();
294 
295  if ($cmd == "redrawHeaderAction") {
296  $cmd = "redrawHeaderActionObject";
297  }
298  }
299  }
300  $ret = $this->$cmd();
301  }
302  break;
303  }
304 
305  if (!in_array($cmd, array("quickList"))) {
306  if (strtolower($_GET["baseClass"]) != "iladministrationgui") {
307  if (!$this->getCreationMode()) {
308  $this->tpl->printToStdout();
309  }
310  }
311  } else {
312  $this->tpl->printToStdout(false);
313  }
314  }
static getInstance(ilObjGlossaryGUI $a_glossary_gui)
Get instance.
Class ilObjectMetaDataGUI.
showInfoScreen()
Show info screen.
setSettingsSubTabs($a_active)
Set sub tabs.
GUI class for the workflow of copying objects.
$_GET["client_id"]
executeCommand()
execute command
Export User Interface Class.
prepareOutput($a_show_subobjects=true)
prepare output
Taxonomy GUI class.
omitLocator($a_omit=true)
GUI class for glossary terms.
Class ilObjStyleSheetGUI.
$ret
Definition: parser.php:6
getCreationMode()
get creation mode
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
addHeaderAction()
Add header action menu.
$_POST["username"]
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
setLocator()
set Locator
+ Here is the call graph for this function:

◆ export()

ilObjGlossaryGUI::export ( )

export content object

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

References ilObjectGUI\checkPermission().

987  {
988  $this->checkPermission("write");
989 
990  $glo_exp = new ilGlossaryExport($this->object);
991  $glo_exp->buildExportFile();
992  $this->ctrl->redirectByClass("ilexportgui", "");
993  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
Export class for content objects.
+ Here is the call graph for this function:

◆ exportHTML()

ilObjGlossaryGUI::exportHTML ( )

create html package

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

999  {
1000  $glo_exp = new ilGlossaryExport($this->object, "html");
1001  $glo_exp->buildExportFile();
1002  //echo $this->tpl->get();
1003  $this->ctrl->redirectByClass("ilexportgui", "");
1004  }
Export class for content objects.

◆ getPublicAccessColValue()

ilObjGlossaryGUI::getPublicAccessColValue (   $a_type,
  $a_file 
)

Get public access value for export table.

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

1587  {
1588  if ($this->object->getPublicExportFile($a_type) == $a_file) {
1589  return $this->lng->txt("yes");
1590  }
1591 
1592  return " ";
1593  }

◆ getTabs()

ilObjGlossaryGUI::getTabs ( )

get tabs

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

References $_GET, and help().

Referenced by setTabs().

1240  {
1241  $this->help->setScreenIdComponent("glo");
1242 
1243  // list terms
1244  $force_active = ($_GET["cmd"] == "" || $_GET["cmd"] == "listTerms")
1245  ? true
1246  : false;
1247  $this->tabs_gui->addTarget(
1248  "cont_terms",
1249  $this->ctrl->getLinkTarget($this, "listTerms"),
1250  array("listTerms", ""),
1251  get_class($this),
1252  "",
1253  $force_active
1254  );
1255 
1256  $force_active = false;
1257  if ($this->ctrl->getCmd() == "showSummary" ||
1258  strtolower($this->ctrl->getNextClass()) == "ilinfoscreengui") {
1259  $force_active = true;
1260  }
1261  $this->tabs_gui->addTarget(
1262  "info_short",
1263  $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary"),
1264  "",
1265  "ilInfoScreenGUI",
1266  "",
1267  $force_active
1268  );
1269 
1270  // properties
1271  if ($this->rbacsystem->checkAccess('write', $this->object->getRefId())) {
1272  $this->tabs_gui->addTarget(
1273  "settings",
1274  $this->ctrl->getLinkTarget($this, "properties"),
1275  "properties",
1276  get_class($this)
1277  );
1278 
1279  // meta data
1280  $mdgui = new ilObjectMetaDataGUI($this->object, "term");
1281  $mdtab = $mdgui->getTab();
1282  if ($mdtab) {
1283  $this->tabs_gui->addTarget(
1284  "meta_data",
1285  $mdtab,
1286  "",
1287  "ilobjectmetadatagui"
1288  );
1289  }
1290 
1291  // export
1292  /*$tabs_gui->addTarget("export",
1293  $this->ctrl->getLinkTarget($this, "exportList"),
1294  array("exportList", "viewExportLog"), get_class($this));*/
1295 
1296  // export
1297  $this->tabs_gui->addTarget(
1298  "export",
1299  $this->ctrl->getLinkTargetByClass("ilexportgui", ""),
1300  "",
1301  "ilexportgui"
1302  );
1303  }
1304 
1305  // permissions
1306  if ($this->rbacsystem->checkAccess('edit_permission', $this->object->getRefId())) {
1307  /*$tabs_gui->addTarget("permission_settings",
1308  $this->ctrl->getLinkTarget($this, "perm"),
1309  array("perm", "info"),
1310  get_class($this));
1311  */
1312  $this->tabs_gui->addTarget(
1313  "perm_settings",
1314  $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"),
1315  array("perm","info","owner"),
1316  'ilpermissiongui'
1317  );
1318  }
1319 
1320  $this->tabs_gui->addNonTabbedLink(
1321  "presentation_view",
1322  $this->lng->txt("glo_presentation_view"),
1323  "ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=" . $this->object->getRefID(),
1324  "_top"
1325  );
1326  }
Class ilObjectMetaDataGUI.
$_GET["client_id"]
help()
Definition: help.php:2
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTemplate()

ilObjGlossaryGUI::getTemplate ( )

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

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

Referenced by executeCommand(), and showInfoScreen().

1212  {
1213  $this->tpl->loadStandardTemplate();
1214 
1215  $title = $this->object->getTitle();
1216 
1217 
1218  if ($this->term_id > 0) {
1219  $this->tpl->setTitle($this->lng->txt("term") . ": " .
1220  ilGlossaryTerm::_lookGlossaryTerm($this->term_id));
1221  } else {
1222  parent::setTitleAndDescription();
1223  $this->tpl->setTitleIcon(ilUtil::getImagePath("icon_glo.svg"));
1224  $this->tpl->setTitle($this->lng->txt("glo") . ": " . $title);
1225  }
1226  }
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static _lookGlossaryTerm($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 362 of file class.ilObjGlossaryGUI.php.

References ilObjectGUI\createObject().

363  {
364  $this->createObject();
365  }
createObject()
create new object form
+ Here is the call graph for this function:

◆ initCreateForm()

ilObjGlossaryGUI::initCreateForm (   $a_new_type)

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

References ilObjectGUI\initDidacticTemplate(), ilTextAreaInputGUI\setCols(), and ilObject\TITLE_LENGTH.

Referenced by saveObject().

322  {
323  $form = new ilPropertyFormGUI();
324  $form->setTarget("_top");
325  $form->setFormAction($this->ctrl->getFormAction($this));
326  $form->setTitle($this->lng->txt($a_new_type . "_new"));
327 
328  // title
329  $ti = new ilTextInputGUI($this->lng->txt("title"), "title");
330  $ti->setSize(min(40, ilObject::TITLE_LENGTH));
331  $ti->setMaxLength(ilObject::TITLE_LENGTH);
332  $ti->setRequired(true);
333  $form->addItem($ti);
334 
335  // description
336  $ta = new ilTextAreaInputGUI($this->lng->txt("description"), "desc");
337  $ta->setCols(40);
338  $ta->setRows(2);
339  $form->addItem($ta);
340 
341  // mode
342  $stati = array(
343  "none" => $this->lng->txt("glo_mode_normal"),
344  "level" => $this->lng->txt("glo_mode_level"),
345  "subtree" => $this->lng->txt("glo_mode_subtree")
346  );
347  $tm = new ilSelectInputGUI($this->lng->txt("glo_mode"), "glo_mode");
348  $tm->setOptions($stati);
349  $tm->setInfo($this->lng->txt("glo_mode_desc"));
350  $tm->setRequired(true);
351  $form->addItem($tm);
352 
353  // didactic template
354  $form = $this->initDidacticTemplate($form);
355 
356  $form->addCommandButton("save", $this->lng->txt($a_new_type . "_add"));
357  $form->addCommandButton("cancel", $this->lng->txt("cancel"));
358 
359  return $form;
360  }
This class represents a property form user interface.
const TITLE_LENGTH
max length of object title
initDidacticTemplate(ilPropertyFormGUI $form)
Show didactic template types.
This class represents a text area property in a property form.
+ Here is the call graph for this function:
+ 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 519 of file class.ilObjGlossaryGUI.php.

References $cols, $section, ilSubEnabledFormPropertyGUI\addSubItem(), ilObjectServiceSettingsGUI\CUSTOM_METADATA, ilObjectGUI\getObjectService(), ilObjTaxonomy\getUsageOfObject(), ilObjectServiceSettingsGUI\initServiceSettingsForm(), ilRadioOption\setInfo(), ilFormPropertyGUI\setInfo(), ilGloAdvColSortInputGUI\setValue(), ilCheckboxInputGUI\setValue(), ilRadioGroupInputGUI\setValue(), and ilRadioOption\setValue().

Referenced by properties(), and saveProperties().

520  {
521  $obj_service = $this->getObjectService();
522 
523 
524  $this->form = new ilPropertyFormGUI();
525 
526  // title
527  $title = new ilTextInputGUI($this->lng->txt("title"), "title");
528  $title->setRequired(true);
529  $this->form->addItem($title);
530 
531  // description
532  $desc = new ilTextAreaInputGUI($this->lng->txt("desc"), "description");
533  $this->form->addItem($desc);
534 
535  $this->lng->loadLanguageModule("rep");
537  $section->setTitle($this->lng->txt('rep_activation_availability'));
538  $this->form->addItem($section);
539 
540  // online
541  $online = new ilCheckboxInputGUI($this->lng->txt("cont_online"), "cobj_online");
542  $online->setValue("y");
543  $online->setInfo($this->lng->txt("glo_online_info"));
544  $this->form->addItem($online);
545 
547  $section->setTitle($this->lng->txt('glo_content_settings'));
548  $this->form->addItem($section);
549 
550  // glossary mode
551  $glo_mode = new ilRadioGroupInputGUI($this->lng->txt("glo_mode"), "glo_mode");
552  //$glo_mode->setInfo($this->lng->txt("glo_mode_desc"));
553  $op1 = new ilRadioOption($this->lng->txt("glo_mode_normal"), "none", $this->lng->txt("glo_mode_normal_info"));
554  $glo_mode->addOption($op1);
555  $op2 = new ilRadioOption($this->lng->txt("glo_mode_level"), "level", $this->lng->txt("glo_mode_level_info"));
556  $glo_mode->addOption($op2);
557  $op3 = new ilRadioOption($this->lng->txt("glo_mode_subtree"), "subtree", $this->lng->txt("glo_mode_subtree_info"));
558  $glo_mode->addOption($op3);
559  $this->form->addItem($glo_mode);
560 
561  // glossary mode
562  /*$options = array(
563  "none"=>$this->lng->txt("glo_mode_normal"),
564  "level"=>$this->lng->txt("glo_mode_level"),
565  "subtree"=>$this->lng->txt("glo_mode_subtree")
566  );
567  $glo_mode = new ilSelectInputGUI($this->lng->txt("glo_mode"), "glo_mode");
568  $glo_mode->setOptions($options);
569  $glo_mode->setInfo($this->lng->txt("glo_mode_desc"));
570  $this->form->addItem($glo_mode);*/
571 
572 
574  $section->setTitle($this->lng->txt('cont_presentation'));
575  $this->form->addItem($section);
576 
577  // tile image
578  $obj_service->commonSettings()->legacyForm($this->form, $this->object)->addTileImage();
579 
580  // presentation mode
581  $pres_mode = new ilRadioGroupInputGUI($this->lng->txt("glo_presentation_mode"), "pres_mode");
582  $pres_mode->setValue("table");
583  $op1 = new ilRadioOption($this->lng->txt("glo_table_form"), "table", $this->lng->txt("glo_table_form_info"));
584 
585  // short text length
586  $snl = new ilNumberInputGUI($this->lng->txt("glo_text_snippet_length"), "snippet_length");
587  $snl->setMaxValue(3000);
588  $snl->setMinValue(100);
589  $snl->setMaxLength(4);
590  $snl->setSize(4);
591  $snl->setInfo($this->lng->txt("glo_text_snippet_length_info"));
592  $snl->setValue(200);
593  $op1->addSubItem($snl);
594 
595  $pres_mode->addOption($op1);
596  $op2 = new ilRadioOption($this->lng->txt("glo_full_definitions"), "full_def", $this->lng->txt("glo_full_definitions_info"));
597  $pres_mode->addOption($op2);
598  $this->form->addItem($pres_mode);
599 
600  // show taxonomy
601  $tax_ids = ilObjTaxonomy::getUsageOfObject($this->object->getId());
602  if (count($tax_ids) > 0) {
603  $show_tax = new ilCheckboxInputGUI($this->lng->txt("glo_show_taxonomy"), "show_tax");
604  $show_tax->setInfo($this->lng->txt("glo_show_taxonomy_info"));
605  $this->form->addItem($show_tax);
606  }
607 
608  // downloads
609  $down = new ilCheckboxInputGUI($this->lng->txt("cont_downloads"), "glo_act_downloads");
610  $down->setValue("y");
611  $down->setInfo($this->lng->txt("cont_downloads_desc"));
612  $this->form->addItem($down);
613 
614  if ($a_mode == "edit") {
615  $title->setValue($this->object->getTitle());
616  $desc->setValue($this->object->getDescription());
617  $online->setChecked($this->object->getOnline());
618  $glo_mode->setValue($this->object->getVirtualMode());
619  $pres_mode->setValue($this->object->getPresentationMode());
620  $snl->setValue($this->object->getSnippetLength());
621  if (count($tax_ids) > 0) {
622  $show_tax->setChecked($this->object->getShowTaxonomy());
623  }
624 
625  $down->setChecked($this->object->isActiveDownloads());
626 
627  // additional features
628  $feat = new ilFormSectionHeaderGUI();
629  $feat->setTitle($this->lng->txt('obj_features'));
630  $this->form->addItem($feat);
631 
633  $this->object->getId(),
634  $this->form,
635  array(
637  )
638  );
639  }
640 
641  // sort columns, if adv fields are given
642  $adv_ap = new ilGlossaryAdvMetaDataAdapter($this->object->getRefId());
643  $cols = $adv_ap->getColumnOrder();
644  if (count($cols) > 1) {
645  $ti = new ilGloAdvColSortInputGUI($this->lng->txt("cont_col_ordering"), "field_order");
646  $this->form->addItem($ti);
647  $ti->setValue($cols);
648  }
649 
650  // save and cancel commands
651  $this->form->addCommandButton("saveProperties", $this->lng->txt("save"));
652 
653  $this->form->setTitle($this->lng->txt("cont_glo_properties"));
654  $this->form->setFormAction($this->ctrl->getFormAction($this));
655  }
This class represents an option in a radio group.
static getUsageOfObject($a_obj_id, $a_include_titles=false)
Get usage of object.
This class represents a property form user interface.
This class represents a section header in a property form.
This class represents a checkbox property in a property form.
setInfo($a_info)
Set Info.
setInfo($a_info)
Set Information Text.
$section
Definition: Utf8Test.php:83
This class represents a property in a property form.
setValue($a_value)
Set Value.
This class represents a number property in a property form.
setValue($a_value)
Set Value.
This class represents a text area property in a property form.
static initServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Init service settings form.
getObjectService()
Get object service.
$cols
Definition: xhr_table.php:11
Input for adv meta data column sorting in glossaries.
+ 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 1471 of file class.ilObjGlossaryGUI.php.

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

Referenced by editStyleProperties().

1472  {
1473  $this->lng->loadLanguageModule("style");
1474 
1475  $this->form = new ilPropertyFormGUI();
1476 
1477  $fixed_style = $this->setting->get("fixed_content_style_id");
1478  $style_id = $this->object->getStyleSheetId();
1479 
1480  if ($fixed_style > 0) {
1481  $st = new ilNonEditableValueGUI($this->lng->txt("style_current_style"));
1482  $st->setValue(ilObject::_lookupTitle($fixed_style) . " (" .
1483  $this->lng->txt("global_fixed") . ")");
1484  $this->form->addItem($st);
1485  } else {
1487  true,
1488  false,
1489  $_GET["ref_id"]
1490  );
1491 
1492  $st_styles[0] = $this->lng->txt("default");
1493  ksort($st_styles);
1494 
1495  if ($style_id > 0) {
1496  // individual style
1497  if (!ilObjStyleSheet::_lookupStandard($style_id)) {
1498  $st = new ilNonEditableValueGUI($this->lng->txt("style_current_style"));
1499  $st->setValue(ilObject::_lookupTitle($style_id));
1500  $this->form->addItem($st);
1501 
1502  //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "edit"));
1503 
1504  // delete command
1505  $this->form->addCommandButton(
1506  "editStyle",
1507  $this->lng->txt("style_edit_style")
1508  );
1509  $this->form->addCommandButton(
1510  "deleteStyle",
1511  $this->lng->txt("style_delete_style")
1512  );
1513  //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "delete"));
1514  }
1515  }
1516 
1517  if ($style_id <= 0 || ilObjStyleSheet::_lookupStandard($style_id)) {
1518  $style_sel = ilUtil::formSelect(
1519  $style_id,
1520  "style_id",
1521  $st_styles,
1522  false,
1523  true
1524  );
1525  $style_sel = new ilSelectInputGUI($this->lng->txt("style_current_style"), "style_id");
1526  $style_sel->setOptions($st_styles);
1527  $style_sel->setValue($style_id);
1528  $this->form->addItem($style_sel);
1529  //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "create"));
1530  $this->form->addCommandButton(
1531  "saveStyleSettings",
1532  $this->lng->txt("save")
1533  );
1534  $this->form->addCommandButton(
1535  "createStyle",
1536  $this->lng->txt("sty_create_ind_style")
1537  );
1538  }
1539  }
1540  $this->form->setTitle($this->lng->txt("glo_style"));
1541  $this->form->setFormAction($this->ctrl->getFormAction($this));
1542  }
This class represents a property form user interface.
$_GET["client_id"]
static _lookupTitle($a_id)
lookup object title
static _getStandardStyles( $a_exclude_default_style=false, $a_include_deactivated=false, $a_scope=0)
Get standard styles.
static _lookupStandard($a_id)
Lookup standard flag.
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.
This class represents a non editable value in a property form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ listTerms()

ilObjGlossaryGUI::listTerms ( )

list terms

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

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

Referenced by applyFilter(), and resetFilter().

715  {
716  //if ($_GET["show_tax"]) {
717  $this->showTaxonomy();
718  //}
719 
720  // term
721  $ti = new ilTextInputGUI($this->lng->txt("cont_new_term"), "new_term");
722  $ti->setMaxLength(80);
723  $ti->setSize(20);
724  $this->toolbar->addInputItem($ti, true);
725 
726  // language
727  $this->lng->loadLanguageModule("meta");
729  if ($_SESSION["il_text_lang_" . $_GET["ref_id"]] != "") {
730  $s_lang = $_SESSION["il_text_lang_" . $_GET["ref_id"]];
731  } else {
732  $s_lang = $this->user->getLanguage();
733  }
734  $si = new ilSelectInputGUI($this->lng->txt("language"), "term_language");
735  $si->setOptions($lang);
736  $si->setValue($s_lang);
737  $this->toolbar->addInputItem($si, true);
738 
739  $this->toolbar->setFormAction($this->ctrl->getFormAction($this));
740  $this->toolbar->addFormButton($this->lng->txt("glo_add_new_term"), "addTerm");
741 
742  $this->toolbar->addSeparator();
743 
744  //ilEditClipboard::getAction() == "copy"
745  if ($this->user->clipboardHasObjectsOfType("term")) {
746  $this->toolbar->addButton(
747  $this->lng->txt("paste"),
748  $this->ctrl->getLinkTarget($this, "pasteTerms")
749  );
750  $this->toolbar->addButton(
751  $this->lng->txt("clear_clipboard"),
752  $this->ctrl->getLinkTarget($this, "clearClipboard")
753  );
754  } else {
755  $this->toolbar->addButton(
756  $this->lng->txt("glo_add_from_other"),
757  $this->ctrl->getLinkTargetByClass("ilglossaryforeigntermcollectorgui", "")
758  );
759  }
760 
761  /* this is done by collapsing the tool now
762  if (is_object($this->tax)) {
763  $this->toolbar->addSeparator();
764  if ($_GET["show_tax"]) {
765  $this->toolbar->addButton(
766  $this->lng->txt("glo_hide_taxonomy"),
767  $this->ctrl->getLinkTarget($this, "deactTaxonomy")
768  );
769  } else {
770  $this->toolbar->addButton(
771  $this->lng->txt("glo_show_taxonomy"),
772  $this->ctrl->getLinkTarget($this, "actTaxonomy")
773  );
774  }
775  }*/
776 
777  $tab = new ilTermListTableGUI($this, "listTerms", $this->tax_node);
778  $this->tpl->setContent($tab->getHTML());
779  }
$_SESSION["AccountId"]
$_GET["client_id"]
user()
Definition: user.php:4
showTaxonomy()
Show taxonomy.
$lang
Definition: xapiexit.php:8
+ 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 880 of file class.ilObjGlossaryGUI.php.

References $_GET.

881  {
882  $definition = new ilGlossaryDefinition($_GET["def"]);
883  $definition->moveDown();
884 
885  $this->ctrl->redirect($this, "listTerms");
886  }
$_GET["client_id"]
Class ilGlossaryDefinition.

◆ moveDefinitionUp()

ilObjGlossaryGUI::moveDefinitionUp ( )

move a definiton up

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

References $_GET.

870  {
871  $definition = new ilGlossaryDefinition($_GET["def"]);
872  $definition->moveUp();
873 
874  $this->ctrl->redirect($this, "listTerms");
875  }
$_GET["client_id"]
Class ilGlossaryDefinition.

◆ pasteTerms()

ilObjGlossaryGUI::pasteTerms ( )

Paste Terms.

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

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

1851  {
1852  if (ilEditClipboard::getAction() == "copy") {
1853  foreach ($this->user->getClipboardObjects("term") as $item) {
1854  ilGlossaryTerm::_copyTerm($item["id"], $this->object->getId());
1855  }
1856  }
1857  if (ilEditClipboard::getAction() == "link") {
1858  $refs = new ilGlossaryTermReferences($this->object->getId());
1859  foreach ($this->user->getClipboardObjects("term") as $item) {
1860  $refs->addTerm($item["id"]);
1861  }
1862  $refs->update();
1863  }
1864  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
1865  $this->ctrl->redirect($this, "listTerms");
1866  }
user()
Definition: user.php:4
static _copyTerm($a_term_id, $a_glossary_id)
Copy a term to a glossary.
+ Here is the call graph for this function:

◆ properties()

ilObjGlossaryGUI::properties ( )

edit properties of object (admin form)

public

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

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

500  {
501  $this->checkPermission("write");
502 
503  $this->setSettingsSubTabs("general_settings");
504 
505  $this->initSettingsForm();
506 
507  // Edit ecs export settings
508  $ecs = new ilECSGlossarySettings($this->object);
509  $ecs->addSettingsToForm($this->form, 'glo');
510 
511  $this->tpl->setContent($this->form->getHTML());
512  }
setSettingsSubTabs($a_active)
Set sub tabs.
initSettingsForm($a_mode="edit")
Init settings form.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
Class ilECSGlossarySettings.
+ Here is the call graph for this function:

◆ publishExportFile()

ilObjGlossaryGUI::publishExportFile ( )

download export file

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

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

1010  {
1011  $ilErr = $this->error;
1012 
1013  if (!isset($_POST["file"])) {
1014  $ilErr->raiseError($this->lng->txt("no_checkbox"), $ilErr->MESSAGE);
1015  }
1016  if (count($_POST["file"]) > 1) {
1017  $ilErr->raiseError($this->lng->txt("cont_select_max_one_item"), $ilErr->MESSAGE);
1018  }
1019 
1020  $file = explode(":", $_POST["file"][0]);
1021  $export_dir = $this->object->getExportDirectory($file[0]);
1022 
1023  if ($this->object->getPublicExportFile($file[0]) ==
1024  $file[1]) {
1025  $this->object->setPublicExportFile($file[0], "");
1026  } else {
1027  $this->object->setPublicExportFile($file[0], $file[1]);
1028  }
1029  $this->object->update();
1030  $this->ctrl->redirectByClass("ilexportgui", "");
1031  }
$_POST["username"]

◆ referenceTerms()

ilObjGlossaryGUI::referenceTerms ( )

Reference terms.

Parameters

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

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

1806  {
1807  $items = ilUtil::stripSlashesArray($_POST["id"]);
1808  if (!is_array($items)) {
1809  ilUtil::sendFailure($this->lng->txt("no_checkbox"), true);
1810  $this->ctrl->redirect($this, "listTerms");
1811  }
1812 
1813  $this->user->clipboardDeleteObjectsOfType("term");
1814 
1815  // put them into the clipboard
1816  $time = date("Y-m-d H:i:s", time());
1817  $order = 0;
1818  foreach ($items as $id) {
1819  $this->user->addObjectToClipboard(
1820  $id,
1821  "term",
1823  0,
1824  $time,
1825  $order
1826  );
1827  }
1828 
1830  ilUtil::sendInfo($this->lng->txt("glo_selected_terms_have_been_copied"), true);
1831  $this->ctrl->redirect($this, "listTerms");
1832  }
user()
Definition: user.php:4
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static stripSlashesArray($a_arr, $a_strip_html=true, $a_allow="")
Strip slashes from array.
static setAction($a_action)
static _lookGlossaryTerm($term_id)
get glossary term
$_POST["username"]
+ Here is the call graph for this function:

◆ removeGlossary()

ilObjGlossaryGUI::removeGlossary ( )

Remove lm glossary.

Parameters

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

References $_GET.

1756  {
1757  $this->object->removeAutoGlossary((int) $_GET["glo_id"]);
1758  $this->object->update();
1759 
1760  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
1761  $this->ctrl->redirect($this, "editGlossaries");
1762  }
$_GET["client_id"]

◆ resetFilter()

ilObjGlossaryGUI::resetFilter ( )

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

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

References listTerms().

1422  {
1423  $prtab = new ilTermListTableGUI($this, "listTerms", $this->tax_node);
1424  $prtab->resetOffset();
1425  $prtab->resetFilter();
1426  $this->listTerms();
1427  }
+ Here is the call graph for this function:

◆ saveObject()

ilObjGlossaryGUI::saveObject ( )

save new content object to db

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

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

371  {
373 
374  $new_type = $_REQUEST["new_type"];
375 
376  // create permission is already checked in createObject. This check here is done to prevent hacking attempts
377  if (!$this->checkPermissionBool("create", "", $new_type)) {
378  $ilErr->raiseError($this->lng->txt("no_create_permission"), $ilErr->MESSAGE);
379  }
380 
381  $this->lng->loadLanguageModule($new_type);
382  $this->ctrl->setParameter($this, "new_type", $new_type);
383 
384  $form = $this->initCreateForm($new_type);
385  if ($form->checkInput()) {
386  $this->ctrl->setParameter($this, "new_type", "");
387 
388  $newObj = new ilObjGlossary();
389  $newObj->setType($new_type);
390  $newObj->setTitle($form->getInput("title"));
391  $newObj->setDescription($form->getInput("desc"));
392  $newObj->setVirtualMode($form->getInput("glo_mode"));
393  $newObj->create();
394 
395  $this->putObjectInTree($newObj);
396 
397  // apply didactic template?
398  $dtpl = $this->getDidacticTemplateVar("dtpl");
399  if ($dtpl) {
400  $newObj->applyDidacticTemplate($dtpl);
401  }
402 
403  // always send a message
404  ilUtil::sendSuccess($this->lng->txt("glo_added"), true);
405  ilUtil::redirect("ilias.php?baseClass=ilGlossaryEditorGUI&ref_id=" . $newObj->getRefId());
406  }
407 
408  // display only this form to correct input
409  $form->setValuesByPost();
410  $this->tpl->setContent($form->getHtml());
411  }
Class ilObjGlossary.
putObjectInTree(ilObject $a_obj, $a_parent_node_id=null)
Add object to tree at given position.
getDidacticTemplateVar($a_type)
Get didactic template setting from creation screen.
static redirect($a_script)
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
+ Here is the call graph for this function:

◆ saveProperties()

ilObjGlossaryGUI::saveProperties ( )

save properties

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

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

662  {
663  $obj_service = $this->getObjectService();
664 
665  $this->initSettingsForm();
666  if ($this->form->checkInput()) {
667  $this->object->setTitle($_POST['title']);
668  $this->object->setDescription($_POST['description']);
669  $this->object->setOnline(ilUtil::yn2tf($_POST["cobj_online"]));
670  $this->object->setVirtualMode($_POST["glo_mode"]);
671  // $this->object->setActiveGlossaryMenu(ilUtil::yn2tf($_POST["glo_act_menu"]));
672  $this->object->setActiveDownloads(ilUtil::yn2tf($_POST["glo_act_downloads"]));
673  $this->object->setPresentationMode($_POST["pres_mode"]);
674  $this->object->setSnippetLength($_POST["snippet_length"]);
675  $this->object->setShowTaxonomy($_POST["show_tax"]);
676  $this->object->update();
677 
678  // tile image
679  $obj_service->commonSettings()->legacyForm($this->form, $this->object)->saveTileImage();
680 
681  // field order of advanced metadata
682  $adv_ap = new ilGlossaryAdvMetaDataAdapter($this->object->getRefId());
683  $cols = $adv_ap->getColumnOrder();
684  if (count($cols) > 1) {
685  $adv_ap->saveColumnOrder($_POST["field_order"]);
686  }
687 
688  // set definition short texts dirty
689  ilGlossaryDefinition::setShortTextsDirty($this->object->getId());
690 
692  $this->object->getId(),
693  $this->form,
694  array(
696  )
697  );
698 
699  // Update ecs export settings
700  $ecs = new ilECSGlossarySettings($this->object);
701  if ($ecs->handleSettingsUpdate()) {
702  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
703  $this->ctrl->redirect($this, "properties");
704  }
705  }
706  $this->form->setValuesByPost();
707  $this->tpl->setContent($this->form->getHTML());
708  }
initSettingsForm($a_mode="edit")
Init settings form.
static updateServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Update service settings.
getObjectService()
Get object service.
static yn2tf($a_yn)
convert "y"/"n" to true/false
$cols
Definition: xhr_table.php:11
$_POST["username"]
static setShortTextsDirty($a_glo_id)
Set short texts dirty.
Class ilECSGlossarySettings.
+ Here is the call graph for this function:

◆ saveStyleSettings()

ilObjGlossaryGUI::saveStyleSettings ( )

Save style settings.

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

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

1572  {
1573  if ($this->setting->get("fixed_content_style_id") <= 0 &&
1574  (ilObjStyleSheet::_lookupStandard($this->object->getStyleSheetId())
1575  || $this->object->getStyleSheetId() == 0)) {
1576  $this->object->setStyleSheetId(ilUtil::stripSlashes($_POST["style_id"]));
1577  $this->object->update();
1578  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
1579  }
1580  $this->ctrl->redirect($this, "editStyleProperties");
1581  }
static _lookupStandard($a_id)
Lookup standard flag.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
$_POST["username"]
+ Here is the call graph for this function:

◆ saveTerm()

ilObjGlossaryGUI::saveTerm ( )

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

1171  {
1172  $term_gui = new ilGlossaryTermGUI();
1173  $term_gui->setGlossary($this->object);
1174  $term_gui->save();
1175 
1176  ilUtil::sendSuccess($this->lng->txt("cont_added_term"), true);
1177 
1178  //ilUtil::redirect("glossary_edit.php?ref_id=".$_GET["ref_id"]."&cmd=listTerms");
1179  $this->ctrl->redirect($this, "listTerms");
1180  }
GUI class for glossary terms.

◆ selectGlossary()

ilObjGlossaryGUI::selectGlossary ( )

Select lm glossary.

Parameters

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

References $_GET, and ilObject\_lookupObjId().

Referenced by selectGlossaryLink().

1735  {
1736  $glos = $this->object->getAutoGlossaries();
1737  $glo_ref_id = (int) $_GET["glo_ref_id"];
1738  $glo_id = ilObject::_lookupObjId($glo_ref_id);
1739  if (!in_array($glo_id, $glos)) {
1740  $glos[] = $glo_id;
1741  }
1742  $this->object->setAutoGlossaries($glos);
1743  $this->object->update();
1744 
1745  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
1746  $this->ctrl->redirect($this, "editGlossaries");
1747  }
$_GET["client_id"]
static _lookupObjId($a_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.

Parameters

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

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

1720  {
1721  $glo_ref_id = (int) $_GET["glo_ref_id"];
1722  $glo_id = ilObject::_lookupObjId($glo_ref_id);
1723  $this->object->autoLinkGlossaryTerms($glo_ref_id);
1724  $this->selectGlossary();
1725  }
$_GET["client_id"]
static _lookupObjId($a_id)
selectGlossary()
Select lm glossary.
+ Here is the call graph for this function:

◆ setContentStyleSheet()

ilObjGlossaryGUI::setContentStyleSheet (   $a_tpl = null)

Set content style sheet.

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

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

Referenced by confirmDefinitionDeletion().

1438  {
1439  if ($a_tpl != null) {
1440  $ctpl = $a_tpl;
1441  } else {
1442  $ctpl = $this->tpl;
1443  }
1444 
1445  $ctpl->setCurrentBlock("ContentStyle");
1446  $ctpl->setVariable(
1447  "LOCATION_CONTENT_STYLESHEET",
1448  ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId())
1449  );
1450  $ctpl->parseCurrentBlock();
1451  }
static getContentStylePath($a_style_id, $add_random=true, $add_token=true)
get content style path
+ 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 public

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

References $_GET.

1132  {
1133  if (strtolower($_GET["baseClass"]) != "ilglossaryeditorgui") {
1134  parent::setLocator($a_tree, $a_id);
1135  } else {
1136  if (is_object($this->object)) {
1137  $gloss_loc = new ilGlossaryLocatorGUI();
1138  if (is_object($this->term)) {
1139  $gloss_loc->setTerm($this->term);
1140  }
1141  $gloss_loc->setGlossary($this->object);
1142  //$gloss_loc->setDefinition($this->definition);
1143  $gloss_loc->display();
1144  }
1145  }
1146  }
$_GET["client_id"]

◆ setSettingsSubTabs()

ilObjGlossaryGUI::setSettingsSubTabs (   $a_active)

Set sub tabs.

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

References ilObjTaxonomy\loadLanguageModule().

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

1332  {
1333  if (in_array(
1334  $a_active,
1335  array("general_settings", "style", "taxonomy", "glossaries")
1336  )) {
1337  // general properties
1338  $this->tabs->addSubTab(
1339  "general_settings",
1340  $this->lng->txt("settings"),
1341  $this->ctrl->getLinkTarget($this, 'properties')
1342  );
1343 
1344  // style properties
1345  $this->tabs->addSubTab(
1346  "style",
1347  $this->lng->txt("obj_sty"),
1348  $this->ctrl->getLinkTarget($this, 'editStyleProperties')
1349  );
1350 
1351  // taxonomy
1353  $this->tabs->addSubTab(
1354  "taxonomy",
1355  $this->lng->txt("tax_taxonomy"),
1356  $this->ctrl->getLinkTargetByClass("ilobjtaxonomygui", '')
1357  );
1358 
1359  // style properties
1360  $this->tabs->addSubTab(
1361  "glossaries",
1362  $this->lng->txt("cont_auto_glossaries"),
1363  $this->ctrl->getLinkTarget($this, 'editGlossaries')
1364  );
1365 
1366  $this->tabs->activateSubTab($a_active);
1367  }
1368  }
static loadLanguageModule()
Load language module.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setTabs()

ilObjGlossaryGUI::setTabs ( )

output tabs

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

References getTabs().

Referenced by executeCommand(), and showInfoScreen().

1232  {
1233  $this->getTabs();
1234  }
+ 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)

public

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

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

812  {
813  foreach ($a_actions as $name => $lng) {
814  $d[$name] = array("name" => $name, "lng" => $lng);
815  }
816 
817  $notoperations = array();
818  $operations = array();
819 
820  $operations = $d;
821 
822  if (count($operations) > 0) {
823  foreach ($operations as $val) {
824  $this->tpl->setCurrentBlock("tbl_action_btn");
825  $this->tpl->setVariable("BTN_NAME", $val["name"]);
826  $this->tpl->setVariable("BTN_VALUE", $this->lng->txt($val["lng"]));
827  $this->tpl->parseCurrentBlock();
828  }
829 
830  $this->tpl->setCurrentBlock("tbl_action_row");
831  $this->tpl->setVariable("IMG_ARROW", ilUtil::getImagePath("arrow_downright.svg"));
832  $this->tpl->parseCurrentBlock();
833  }
834  }
if($format !==null) $name
Definition: metadata.php:230
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
for($i=6; $i< 13; $i++) for($i=1; $i< 13; $i++) $d
Definition: date.php:296
+ Here is the call graph for this function:

◆ showGlossarySelector()

ilObjGlossaryGUI::showGlossarySelector ( )

Select LM Glossary.

Parameters

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

References $_GET, ilExplorer\setExpand(), and setSettingsSubTabs().

1682  {
1683  $this->tabs->setTabActive("settings");
1684  $this->setSettingsSubTabs("glossaries");
1685 
1686  $exp = new ilSearchRootSelector($this->ctrl->getLinkTarget($this, 'showGlossarySelector'));
1687  $exp->setExpand($_GET["search_root_expand"] ? $_GET["search_root_expand"] : $this->tree->readRootId());
1688  $exp->setExpandTarget($this->ctrl->getLinkTarget($this, 'showGlossarySelector'));
1689  $exp->setTargetClass(get_class($this));
1690  $exp->setCmd('confirmGlossarySelection');
1691  $exp->setClickableTypes(array("glo"));
1692  $exp->addFilter("glo");
1693 
1694  // build html-output
1695  $exp->setOutput(0);
1696  $this->tpl->setContent($exp->getOutput());
1697  }
setSettingsSubTabs($a_active)
Set sub tabs.
$_GET["client_id"]
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 ( )

Show info screen.

Parameters

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

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

Referenced by executeCommand().

420  {
421  $this->getTemplate();
422  $this->setTabs();
423  $this->setLocator();
424  $this->lng->loadLanguageModule("meta");
425 
426  $info = new ilInfoScreenGUI($this);
427  $info->enablePrivateNotes();
428  $info->enableNews();
429  if ($this->access->checkAccess("write", "", $_GET["ref_id"])) {
430  $info->enableNewsEditing();
431  $news_set = new ilSetting("news");
432  $enable_internal_rss = $news_set->get("enable_rss_for_internal");
433  if ($enable_internal_rss) {
434  $info->setBlockProperty("news", "settings", true);
435  }
436  }
437  $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
438 
439  ilObjGlossaryGUI::addUsagesToInfo($info, $this->object->getId());
440 
441  $this->ctrl->forwardCommand($info);
442  }
Class ilInfoScreenGUI.
$_GET["client_id"]
static addUsagesToInfo($info, $glo_id)
Add usages to info.
setLocator()
set Locator
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showTaxonomy()

ilObjGlossaryGUI::showTaxonomy ( )

Show taxonomy.

Exceptions
ilCtrlException

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

References $ctrl, $DIC, ilObjTaxonomy\getUsageOfObject(), 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().

1601  {
1602  global $DIC;
1603 
1604  $ctrl = $DIC->ctrl();
1605 
1606  $tax_ids = ilObjTaxonomy::getUsageOfObject($this->object->getId());
1607  if (count($tax_ids) > 0) {
1608  $tax_id = $tax_ids[0];
1609  $DIC->globalScreen()->tool()->context()->current()
1610  ->addAdditionalData(
1612  true
1613  );
1614  $DIC->globalScreen()->tool()->context()->current()
1615  ->addAdditionalData(
1617  $ctrl->getCurrentClassPath()
1618  );
1619  $DIC->globalScreen()->tool()->context()->current()
1620  ->addAdditionalData(
1622  $tax_id
1623  );
1624  $DIC->globalScreen()->tool()->context()->current()
1625  ->addAdditionalData(
1627  "listTerms"
1628  );
1629  $DIC->globalScreen()->tool()->context()->current()
1630  ->addAdditionalData(
1632  "showTaxonomy"
1633  );
1634 
1635 
1636  $tax_exp = new ilTaxonomyExplorerGUI(
1637  get_class($this),
1638  "showTaxonomy",
1639  $tax_ids[0],
1640  "ilobjglossarygui",
1641  "listTerms"
1642  );
1643  if (!$tax_exp->handleCommand()) {
1644  //$this->tpl->setLeftNavContent($tax_exp->getHTML());
1645  //$this->tpl->setLeftNavContent($tax_exp->getHTML() . "&nbsp;");
1646  }
1647  }
1648  }
static getUsageOfObject($a_obj_id, $a_include_titles=false)
Get usage of object.
Taxonomy explorer GUI class.
global $DIC
Definition: goto.php:24
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateTerm()

ilObjGlossaryGUI::updateTerm ( )

update term

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

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

971  {
972  $term = new ilGlossaryTerm($this->term_id);
973 
974  $term->setTerm(ilUtil::stripSlashes($_POST["term"]));
975  $term->setLanguage($_POST["term_language"]);
976  $term->update();
977  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
978  $this->ctrl->redirect($this, "listTerms");
979  }
Glossary terms.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
$_POST["username"]
+ Here is the call graph for this function:

◆ view()

ilObjGlossaryGUI::view ( )

view content

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

References viewObject().

1152  {
1153  //$this->prepareOutput();
1154  $this->viewObject();
1155  }
+ Here is the call graph for this function:

◆ viewExportLog()

ilObjGlossaryGUI::viewExportLog ( )

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

1037  {
1038  }

◆ viewObject()

ilObjGlossaryGUI::viewObject ( )

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

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

Referenced by view().

481  {
483 
484  if (strtolower($_GET["baseClass"]) == "iladministrationgui") {
485  parent::viewObject();
486  return;
487  }
488 
489  if (!$this->rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
490  $ilErr->raiseError($this->lng->txt("permission_denied"), $ilErr->MESSAGE);
491  }
492  }
$_GET["client_id"]
+ Here is the caller graph for this function:

Field Documentation

◆ $access

ilObjGlossaryGUI::$access
protected

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

◆ $admin_tabs

ilObjGlossaryGUI::$admin_tabs

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

◆ $ctrl

ilObjGlossaryGUI::$ctrl
protected

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

Referenced by showTaxonomy().

◆ $error

ilObjGlossaryGUI::$error
protected

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

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

◆ $help

ilObjGlossaryGUI::$help
protected

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

◆ $log

ilObjGlossaryGUI::$log
protected

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

◆ $mode

ilObjGlossaryGUI::$mode

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

◆ $rbacsystem

ilObjGlossaryGUI::$rbacsystem
protected

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

◆ $setting

ilObjGlossaryGUI::$setting
protected

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

◆ $tabs

ilObjGlossaryGUI::$tabs
protected

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

◆ $term

ilObjGlossaryGUI::$term

◆ $term_id

ilObjGlossaryGUI::$term_id
protected

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

Referenced by __construct(), addDefinition(), and confirmTermDeletion().

◆ $term_perm

ilObjGlossaryGUI::$term_perm
protected

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

◆ $toolbar

ilObjGlossaryGUI::$toolbar
protected

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

◆ $user

ilObjGlossaryGUI::$user
protected

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


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