ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
All Data Structures Namespaces Files Functions Variables Modules Pages
ilObjGlossaryGUI Class Reference

Class ilGlossaryGUI. More...

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

Public Member Functions

 ilObjGlossaryGUI ($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...
 
 importFileObject ()
 display status information or report errors messages in case of error More...
 
 showInfoScreen ()
 Show info screen. More...
 
 addUsagesToInfo ($info, $glo_id)
 Add usages to info. More...
 
 viewObject ()
 
 properties ()
 edit properties of object (admin form) More...
 
 initSettingsForm ($a_mode="edit")
 Init settings form. More...
 
 saveProperties ()
 save properties More...
 
 frameset ()
 glossary edit frameset More...
 
 quickList ()
 quick term list 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 (&$tabs_gui)
 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...
 
- Public Member Functions inherited from ilObjectGUI
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public. More...
 
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...
 
 getAdminTabs (&$tabs_gui)
 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 ($in_rep=false)
 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...
 
 editObject ()
 edit object More...
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 list childs of current object More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 

Static Public Member Functions

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

Data Fields

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

Additional Inherited Members

- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 
 prepareOutput ()
 prepare output More...
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 showMountWebfolderIcon ()
 
 setTabs ()
 set admin tabs 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...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null)
 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...
 
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste More...
 
 getTabs (&$tabs_gui)
 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 ($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

Member Function Documentation

◆ _goto()

static ilObjGlossaryGUI::_goto (   $a_target)
static

redirect script

Parameters
string$a_target

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

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

1471  {
1472  global $rbacsystem, $ilErr, $lng, $ilAccess;
1473 
1474  if ($ilAccess->checkAccess("read", "", $a_target))
1475  {
1476  $_GET["ref_id"] = $a_target;
1477  $_GET["baseClass"] = "ilGlossaryPresentationGUI";
1478  include("ilias.php");
1479  exit;
1480  }
1481  else if ($ilAccess->checkAccess("visible", "", $a_target))
1482  {
1483  $_GET["ref_id"] = $a_target;
1484  $_GET["cmd"] = "infoScreen";
1485  $_GET["baseClass"] = "ilGlossaryPresentationGUI";
1486  include("ilias.php");
1487  exit;
1488  }
1489  else if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID))
1490  {
1491  ilUtil::sendFailure(sprintf($lng->txt("msg_no_perm_read_item"),
1492  ilObject::_lookupTitle(ilObject::_lookupObjId($a_target))), true);
1494  }
1495 
1496  $ilErr->raiseError($lng->txt("msg_no_perm_read_lm"), $ilErr->FATAL);
1497  }
exit
Definition: login.php:54
$_GET["client_id"]
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
static _lookupTitle($a_id)
lookup object title
static _lookupObjId($a_id)
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 881 of file class.ilObjGlossaryGUI.php.

References $ilCtrl.

882  {
883  global $ilCtrl;
884 
885  $ilCtrl->setParameter($this, "show_tax", 1);
886  $ilCtrl->redirect($this, "listTerms");
887  }
global $ilCtrl
Definition: ilias.php:18

◆ addDefinition()

ilObjGlossaryGUI::addDefinition ( )

add definition

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

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

1304  {
1305  global $ilCtrl;
1306 
1307  $term_id = (int) $_GET["term_id"];
1308 
1309  include_once("./Modules/Glossary/classes/class.ilGlossaryTerm.php");
1310  $term_glo_id = ilGlossaryTerm::_lookGlossaryID((int) $term_id);
1311  if ($term_glo_id != $this->object->getId())
1312  {
1313  ilUtil::sendFailure($this->lng->txt("glo_term_must_belong_to_glo"), true);
1314  $ilCtrl->redirect($this, "listTerms");
1315  }
1316 
1317  // add term
1318  include_once ("./Modules/Glossary/classes/class.ilGlossaryTerm.php");
1319  $term = new ilGlossaryTerm($term_id);
1320 
1321  // add first definition
1322  $def = new ilGlossaryDefinition();
1323  $def->setTermId($term->getId());
1324  $def->setTitle(ilUtil::stripSlashes($term->getTerm()));
1325  $def->create();
1326 
1327  $this->ctrl->setParameterByClass("ilglossarydefpagegui", "term_id", $term->getId());
1328  $this->ctrl->setParameterByClass("ilglossarydefpagegui", "def", $def->getId());
1329  $this->ctrl->redirectByClass(array("ilglossarytermgui",
1330  "iltermdefinitioneditorgui", "ilglossarydefpagegui"), "edit");
1331 
1332  }
$_GET["client_id"]
Class ilGlossaryTerm.
global $ilCtrl
Definition: ilias.php:18
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 940 of file class.ilObjGlossaryGUI.php.

References $_POST, $_SESSION, $ilCtrl, ilObjectGUI\$lng, ilUtil\sendFailure(), and ilUtil\stripSlashes().

941  {
942  global $lng, $ilCtrl;
943 
944  if (trim($_POST["new_term"]) == "")
945  {
946  ilUtil::sendFailure($lng->txt("cont_please_enter_a_term"), true);
947  $ilCtrl->redirect($this, "listTerms");
948  }
949 
950  // add term
951  include_once ("./Modules/Glossary/classes/class.ilGlossaryTerm.php");
952  $term =& new ilGlossaryTerm();
953  $term->setGlossary($this->object);
954  $term->setTerm(ilUtil::stripSlashes($_POST["new_term"]));
955  $term->setLanguage($_POST["term_language"]);
956  $_SESSION["il_text_lang_".$_GET["ref_id"]] = $_POST["term_language"];
957  $term->create();
958 
959  // add first definition
960  $def =& new ilGlossaryDefinition();
961  $def->setTermId($term->getId());
962  $def->setTitle(ilUtil::stripSlashes($_POST["new_term"]));
963  $def->create();
964 
965  $this->ctrl->setParameterByClass("ilglossarydefpagegui", "term_id", $term->getId());
966  $this->ctrl->setParameterByClass("ilglossarydefpagegui", "def", $def->getId());
967  $this->ctrl->redirectByClass(array("ilglossarytermgui",
968  "iltermdefinitioneditorgui", "ilglossarydefpagegui"), "edit");
969  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
$_POST['username']
Definition: cron.php:12
Class ilGlossaryTerm.
global $ilCtrl
Definition: ilias.php:18
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.
+ Here is the call graph for this function:

◆ addUsagesToInfo()

ilObjGlossaryGUI::addUsagesToInfo (   $info,
  $glo_id 
)

Add usages to info.

Parameters

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

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

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

511  {
512  global $lng, $ilAccess;
513 
514  $info->addSection($lng->txt("glo_usages"));
515  include_once("./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php");
517  foreach ($sms as $sm)
518  {
519  $link = false;
520  $refs = ilObject::_getAllReferences($sm);
521  foreach ($refs as $ref)
522  {
523  if ($link === false)
524  {
525  if ($ilAccess->checkAccess("write", "", $ref))
526  {
527  include_once("./Services/Link/classes/class.ilLink.php");
528  $link = ilLink::_getLink($ref,'sahs');
529  }
530  }
531  }
532 
533  $entry = ilObject::_lookupTitle($sm);
534  if ($link !== false)
535  {
536  $entry = "<a href='".$link."' target='_top'>".$entry."</a>";
537  }
538 
539  $info->addProperty($lng->txt("obj_sahs"), $entry);
540  }
541  }
static _lookupTitle($a_id)
lookup object title
static _getAllReferences($a_id)
get all reference ids of object
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 1502 of file class.ilObjGlossaryGUI.php.

References listTerms().

1503  {
1504  include_once("./Modules/Glossary/classes/class.ilTermListTableGUI.php");
1505  $prtab = new ilTermListTableGUI($this, "listTerms", $this->tax_node);
1506  $prtab->resetOffset();
1507  $prtab->writeFilterToSession();
1508  $this->listTerms();
1509  }
+ Here is the call graph for this function:

◆ assignObject()

ilObjGlossaryGUI::assignObject ( )

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

266  {
267  include_once("./Modules/Glossary/classes/class.ilObjGlossary.php");
268 
269  $this->object =& new ilObjGlossary($this->id, true);
270  }
Class ilObjGlossary.

◆ cancelDefinitionDeletion()

ilObjGlossaryGUI::cancelDefinitionDeletion ( )

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

1054  {
1055  $this->ctrl->redirect($this, "listTerms");
1056  }

◆ cancelTermDeletion()

ilObjGlossaryGUI::cancelTermDeletion ( )

cancel deletion of object

public

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

1216  {
1217  $this->ctrl->redirect($this, "listTerms");
1218  }

◆ confirmDefinitionDeletion()

ilObjGlossaryGUI::confirmDefinitionDeletion ( )

deletion confirmation screen

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

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

1001  {
1002  global $ilCtrl, $lng;
1003 
1004  //$this->getTemplate();
1005  //$this->displayLocator();
1006  //$this->setTabs();
1007 
1008  $term = new ilGlossaryTerm($this->term_id);
1009 
1010  $add = "";
1011  $nr = ilGlossaryTerm::getNumberOfUsages($this->term_id);
1012  if ($nr > 0)
1013  {
1014  $ilCtrl->setParameterByClass("ilglossarytermgui",
1015  "term_id", $this->term_id);
1016  $link = "[<a href='".
1017  $ilCtrl->getLinkTargetByClass("ilglossarytermgui", "listUsages").
1018  "'>".$lng->txt("glo_list_usages")."</a>]";
1019  $add = "<br/>".sprintf($lng->txt("glo_term_is_used_n_times"), $nr)." ".$link;
1020  }
1021 
1022  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
1023  $cgui = new ilConfirmationGUI();
1024  $cgui->setHeaderText($this->lng->txt("info_delete_sure").$add);
1025 
1026  $cgui->setFormAction($this->ctrl->getFormAction($this));
1027  $cgui->setCancel($this->lng->txt("cancel"), "cancelDefinitionDeletion");
1028  $cgui->setConfirm($this->lng->txt("confirm"), "deleteDefinition");
1029 
1030  // content style
1031  $this->setContentStyleSheet($this->tpl);
1032 
1033  // syntax style
1034  $this->tpl->setCurrentBlock("SyntaxStyle");
1035  $this->tpl->setVariable("LOCATION_SYNTAX_STYLESHEET",
1037  $this->tpl->parseCurrentBlock();
1038 
1039  $definition = new ilGlossaryDefinition($_GET["def"]);
1040  $page_gui = new ilGlossaryDefPageGUI($definition->getId());
1041  $page_gui->setTemplateOutput(false);
1042  $page_gui->setStyleId($this->object->getStyleSheetId());
1043  $page_gui->setSourcecodeDownloadScript("ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=".$_GET["ref_id"]);
1044  $page_gui->setFileDownloadLink("ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=".$_GET["ref_id"]);
1045  $page_gui->setFullscreenLink("ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=".$_GET["ref_id"]);
1046  $output = $page_gui->preview();
1047 
1048  $cgui->addItem("def", $_GET["def"], $term->getTerm().$output);
1049 
1050  $this->tpl->setContent($cgui->getHTML());
1051  }
setTemplateOutput($a_output=true)
$_GET["client_id"]
static getNumberOfUsages($a_term_id)
Get number of usages.
Class ilGlossaryTerm.
getSyntaxStylePath()
get syntax style path
global $ilCtrl
Definition: ilias.php:18
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:

◆ confirmTermDeletion()

ilObjGlossaryGUI::confirmTermDeletion ( )

confirm term deletion

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

References $_POST, $ilCtrl, ilObjectGUI\$lng, ilGlossaryTerm\_lookGlossaryID(), ilGlossaryTerm\getNumberOfUsages(), and ilUtil\sendFailure().

1157  {
1158  global $ilCtrl, $lng;
1159 
1160  //$this->prepareOutput();
1161  if (!isset($_POST["id"]))
1162  {
1163  ilUtil::sendFailure($this->lng->txt("no_checkbox"), true);
1164  $ilCtrl->redirect($this, "listTerms");
1165  }
1166 
1167  // check ids
1168  include_once("./Modules/Glossary/classes/class.ilGlossaryTerm.php");
1169  foreach ($_POST["id"] as $term_id)
1170  {
1171  $term_glo_id = ilGlossaryTerm::_lookGlossaryID((int) $term_id);
1172  if ($term_glo_id != $this->object->getId())
1173  {
1174  ilUtil::sendFailure($this->lng->txt("glo_term_must_belong_to_glo"), true);
1175  $ilCtrl->redirect($this, "listTerms");
1176  }
1177  }
1178 
1179  // display confirmation message
1180  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
1181  $cgui = new ilConfirmationGUI();
1182  $cgui->setFormAction($this->ctrl->getFormAction($this));
1183  $cgui->setHeaderText($this->lng->txt("info_delete_sure"));
1184  $cgui->setCancel($this->lng->txt("cancel"), "cancelTermDeletion");
1185  $cgui->setConfirm($this->lng->txt("confirm"), "deleteTerms");
1186 
1187  foreach($_POST["id"] as $id)
1188  {
1189  $term = new ilGlossaryTerm($id);
1190 
1191  $add = "";
1193  if ($nr > 0)
1194  {
1195  $ilCtrl->setParameterByClass("ilglossarytermgui",
1196  "term_id", $id);
1197  $link = "[<a href='".
1198  $ilCtrl->getLinkTargetByClass("ilglossarytermgui", "listUsages").
1199  "'>".$lng->txt("glo_list_usages")."</a>]";
1200  $add = "<div class='small'>".
1201  sprintf($lng->txt("glo_term_is_used_n_times"), $nr)." ".$link."</div>";
1202  }
1203 
1204  $cgui->addItem("id[]", $id, $term->getTerm().$add);
1205  }
1206 
1207  $this->tpl->setContent($cgui->getHTML());
1208  }
$_POST['username']
Definition: cron.php:12
static getNumberOfUsages($a_term_id)
Get number of usages.
Class ilGlossaryTerm.
global $ilCtrl
Definition: ilias.php:18
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static _lookGlossaryID($term_id)
get glossary id form term id
Confirmation screen class.
+ Here is the call graph for this function:

◆ create()

ilObjGlossaryGUI::create ( )

create new (subobject) in glossary

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

References $_POST.

1277  {
1278  switch($_POST["new_type"])
1279  {
1280  case "term":
1281  $term_gui =& new ilGlossaryTermGUI();
1282  $term_gui->create();
1283  break;
1284  }
1285  }
$_POST['username']
Definition: cron.php:12
GUI class for glossary terms.

◆ createStyle()

ilObjGlossaryGUI::createStyle ( )

Create Style.

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

References $ilCtrl.

1642  {
1643  global $ilCtrl;
1644 
1645  $ilCtrl->redirectByClass("ilobjstylesheetgui", "create");
1646  }
global $ilCtrl
Definition: ilias.php:18

◆ deactTaxonomy()

ilObjGlossaryGUI::deactTaxonomy ( )

Hide Taxonomy.

Parameters

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

References $ilCtrl.

896  {
897  global $ilCtrl;
898 
899  $ilCtrl->setParameter($this, "show_tax", "");
900  $ilCtrl->redirect($this, "listTerms");
901  }
global $ilCtrl
Definition: ilias.php:18

◆ deleteDefinition()

ilObjGlossaryGUI::deleteDefinition ( )

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

References $_REQUEST.

1060  {
1061  $definition =& new ilGlossaryDefinition($_REQUEST["def"]);
1062  $definition->delete();
1063  $this->ctrl->redirect($this, "listTerms");
1064  }
Class ilGlossaryDefinition.
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7

◆ deleteStyle()

ilObjGlossaryGUI::deleteStyle ( )

Delete Style.

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

References $ilCtrl.

1662  {
1663  global $ilCtrl;
1664 
1665  $ilCtrl->redirectByClass("ilobjstylesheetgui", "delete");
1666  }
global $ilCtrl
Definition: ilias.php:18

◆ deleteTerms()

ilObjGlossaryGUI::deleteTerms ( )

delete selected terms

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

References $_POST.

1224  {
1225  foreach($_POST["id"] as $id)
1226  {
1227  $term = new ilGlossaryTerm($id);
1228  $term->delete();
1229  }
1230  $this->ctrl->redirect($this, "listTerms");
1231  }
$_POST['username']
Definition: cron.php:12
Class ilGlossaryTerm.

◆ editStyle()

ilObjGlossaryGUI::editStyle ( )

Edit Style.

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

References $ilCtrl.

1652  {
1653  global $ilCtrl;
1654 
1655  $ilCtrl->redirectByClass("ilobjstylesheetgui", "edit");
1656  }
global $ilCtrl
Definition: ilias.php:18

◆ editStyleProperties()

ilObjGlossaryGUI::editStyleProperties ( )

Edit style properties.

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

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

1556  {
1557  global $ilTabs, $tpl;
1558 
1559  $this->checkPermission("write");
1560 
1561  $this->initStylePropertiesForm();
1562  $tpl->setContent($this->form->getHTML());
1563 
1564  $ilTabs->activateTab("settings");
1565  $this->setSettingsSubTabs("style");
1566  }
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 1069 of file class.ilObjGlossaryGUI.php.

1070  {
1071  // deprecated
1072  }

◆ executeCommand()

& ilObjGlossaryGUI::executeCommand ( )

execute command

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

References $_GET, $_POST, $cmd, $ilErr, ilObjectGUI\$lng, $ret, ilObjectGUI\addHeaderAction(), ilMDEditorGUI\addObserver(), ilObjectGUI\checkPermission(), ilObjectGUI\getCreationMode(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), getTemplate(), ilObjectGUI\omitLocator(), ilObjectGUI\prepareOutput(), ilObjectGUI\setLocator(), setSettingsSubTabs(), setTabs(), and showInfoScreen().

75  {
76  global $lng, $ilAccess, $ilTabs, $ilErr;
77 
78  $cmd = $this->ctrl->getCmd();
79  $next_class = $this->ctrl->getNextClass($this);
80 
81  switch ($next_class)
82  {
83  case 'ilmdeditorgui':
84  $this->checkPermission("write");
85 
86  $this->getTemplate();
87  $this->setTabs();
88  $this->setLocator();
89  $this->addHeaderAction();
90 
91  include_once 'Services/MetaData/classes/class.ilMDEditorGUI.php';
92 
93  $md_gui =& new ilMDEditorGUI($this->object->getId(), 0, $this->object->getType());
94  $md_gui->addObserver($this->object,'MDUpdateListener','General');
95 
96  $this->ctrl->forwardCommand($md_gui);
97  break;
98 
99  case "ilglossarytermgui":
100  $this->getTemplate();
101 // $this->quickList();
102  $this->ctrl->setReturn($this, "listTerms");
103  $term_gui =& new ilGlossaryTermGUI($this->term_id);
104  $term_gui->setGlossary($this->object);
105  //$ret =& $term_gui->executeCommand();
106  $ret =& $this->ctrl->forwardCommand($term_gui);
107  break;
108 
109  case "ilinfoscreengui":
110  $this->addHeaderAction();
111  $this->showInfoScreen();
112  break;
113 
114  case "ilobjstylesheetgui":
115  include_once ("./Services/Style/classes/class.ilObjStyleSheetGUI.php");
116  $this->ctrl->setReturn($this, "editStyleProperties");
117  $style_gui = new ilObjStyleSheetGUI("", $this->object->getStyleSheetId(), false, false);
118  $style_gui->omitLocator();
119  if ($cmd == "create" || $_GET["new_type"]=="sty")
120  {
121  $style_gui->setCreationMode(true);
122  }
123 
124  if ($cmd == "confirmedDelete")
125  {
126  $this->object->setStyleSheetId(0);
127  $this->object->update();
128  }
129 
130  $ret = $this->ctrl->forwardCommand($style_gui);
131 
132  if ($cmd == "save" || $cmd == "copyStyle" || $cmd == "importStyle")
133  {
134  $style_id = $ret;
135  $this->object->setStyleSheetId($style_id);
136  $this->object->update();
137  $this->ctrl->redirectByClass("ilobjstylesheetgui", "edit");
138  }
139  break;
140 
141 
142  case 'ilpermissiongui':
143  if (strtolower($_GET["baseClass"]) == "iladministrationgui")
144  {
145  $this->prepareOutput();
146  }
147  else
148  {
149  $this->getTemplate();
150  $this->setTabs();
151  $this->setLocator();
152  $this->addHeaderAction();
153  }
154  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
155  $perm_gui =& new ilPermissionGUI($this);
156  $ret =& $this->ctrl->forwardCommand($perm_gui);
157  break;
158 
159  case "ilcommonactiondispatchergui":
160  include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
162  $this->ctrl->forwardCommand($gui);
163  break;
164 
165  case "ilobjtaxonomygui":
166  $this->getTemplate();
167  $this->setTabs();
168  $this->setLocator();
169  $this->addHeaderAction();
170  $ilTabs->activateTab("settings");
171  $this->setSettingsSubTabs("taxonomy");
172 
173  include_once("./Services/Taxonomy/classes/class.ilObjTaxonomyGUI.php");
174  $this->ctrl->setReturn($this, "properties");
175  $tax_gui = new ilObjTaxonomyGUI();
176  $tax_gui->setMultiple(false);
177 
178  /*include_once("./Modules/Glossary/classes/class.ilTermTaxInfo.php");
179  $term_info = new ilTermTaxInfo();*/
180  //$tax_gui->activateAssignedItemSorting($term_info, "glo", "term");
181 
182  $tax_gui->setAssignedObject($this->object->getId());
183  $ret = $this->ctrl->forwardCommand($tax_gui);
184  break;
185 
186  case "ilexportgui":
187  $this->getTemplate();
188  $this->setTabs();
189  $ilTabs->activateTab("export");
190  $this->setLocator();
191  include_once("./Services/Export/classes/class.ilExportGUI.php");
192  $exp_gui = new ilExportGUI($this);
193  //$exp_gui->addFormat("xml", "", $this, "export");
194  $exp_gui->addFormat("xml");
195  $exp_gui->addFormat("html", "", $this, "exportHTML");
196  $exp_gui->addCustomColumn($lng->txt("cont_public_access"),
197  $this, "getPublicAccessColValue");
198  $exp_gui->addCustomMultiCommand($lng->txt("cont_public_access"),
199  $this, "publishExportFile");
200  $ret = $this->ctrl->forwardCommand($exp_gui);
201  break;
202 
203  case 'ilobjectcopygui':
204  $this->prepareOutput();
205  include_once './Services/Object/classes/class.ilObjectCopyGUI.php';
206  $cp = new ilObjectCopyGUI($this);
207  $cp->setType('glo');
208  $this->ctrl->forwardCommand($cp);
209  break;
210 
211  default:
212  $cmd = $this->ctrl->getCmd("listTerms");
213 
214  if (($cmd == "create") && ($_POST["new_type"] == "term"))
215  {
216  $this->ctrl->setCmd("create");
217  $this->ctrl->setCmdClass("ilGlossaryTermGUI");
218  $ret =& $this->executeCommand();
219  return;
220  }
221  else
222  {
223  if (!in_array($cmd, array("frameset", "quickList")))
224  {
225  if (strtolower($_GET["baseClass"]) == "iladministrationgui" ||
226  $this->getCreationMode() == true)
227  {
228  $this->prepareOutput();
229  $cmd.= "Object";
230  }
231  else
232  {
233  $this->getTemplate();
234  $this->setTabs();
235  $this->setLocator();
236  $this->addHeaderAction();
237 
238  if($cmd == "redrawHeaderAction")
239  {
240  $cmd = "redrawHeaderActionObject";
241  }
242  }
243  }
244  $ret =& $this->$cmd();
245  }
246  break;
247  }
248 
249  if (!in_array($cmd, array("frameset", "quickList")))
250  {
251  if (strtolower($_GET["baseClass"]) != "iladministrationgui")
252  {
253  if (!$this->getCreationMode())
254  {
255  $this->tpl->show();
256  }
257  }
258  }
259  else
260  {
261  $this->tpl->show(false);
262  }
263  }
showInfoScreen()
Show info screen.
$_POST['username']
Definition: cron.php:12
setSettingsSubTabs($a_active)
Set sub tabs.
GUI class for the workflow of copying objects.
$_GET["client_id"]
$cmd
Definition: sahs_server.php:35
addObserver(&$a_class, $a_method, $a_element)
Export User Interface Class.
Taxonomy GUI class.
omitLocator($a_omit=true)
GUI class for glossary terms.
prepareOutput()
prepare output
Class ilObjStyleSheetGUI.
getCreationMode()
get creation mode
& executeCommand()
execute command
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.
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 1094 of file class.ilObjGlossaryGUI.php.

References ilObjectGUI\checkPermission().

1095  {
1096  $this->checkPermission("write");
1097 
1098  require_once("./Modules/Glossary/classes/class.ilGlossaryExport.php");
1099  $glo_exp = new ilGlossaryExport($this->object);
1100  $glo_exp->buildExportFile();
1101  $this->ctrl->redirectByClass("ilexportgui", "");
1102  }
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 1107 of file class.ilObjGlossaryGUI.php.

1108  {
1109  require_once("./Modules/Glossary/classes/class.ilGlossaryExport.php");
1110  $glo_exp = new ilGlossaryExport($this->object, "html");
1111  $glo_exp->buildExportFile();
1112 //echo $this->tpl->get();
1113  $this->ctrl->redirectByClass("ilexportgui", "");
1114  }
Export class for content objects.

◆ frameset()

ilObjGlossaryGUI::frameset ( )

glossary edit frameset

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

References $_GET, $ilCtrl, and exit.

782  {
783  global $ilCtrl;
784 
785  include_once("Services/Frameset/classes/class.ilFramesetGUI.php");
786  $fs_gui = new ilFramesetGUI();
787  $fs_gui->setFramesetTitle($this->object->getTitle());
788  if ((int) $_GET["edit_term"] > 0)
789  {
790  $ilCtrl->setParameterByClass("ilglossarytermgui", "term_id", (int) $_GET["edit_term"]);
791  $fs_gui->setMainFrameSource($this->ctrl->getLinkTargetByClass("ilglossarytermgui", "listDefinitions"));
792  }
793  else
794  {
795  $fs_gui->setMainFrameSource($this->ctrl->getLinkTarget($this, "listTerms"));
796  }
797  $fs_gui->setSideFrameSource($this->ctrl->getLinkTarget($this, "quickList"));
798  $fs_gui->setMainFrameName("content");
799  $fs_gui->setSideFrameName("tree");
800  $fs_gui->show();
801  exit;
802  }
exit
Definition: login.php:54
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
Class ilFramesetGUI.

◆ getPublicAccessColValue()

ilObjGlossaryGUI::getPublicAccessColValue (   $a_type,
  $a_file 
)

Get public access value for export table.

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

References $ilCtrl, and ilObjectGUI\$lng.

1691  {
1692  global $lng, $ilCtrl;
1693 
1694  if ($this->object->getPublicExportFile($a_type) == $a_file)
1695  {
1696  return $lng->txt("yes");
1697  }
1698 
1699  return " ";
1700  }
global $ilCtrl
Definition: ilias.php:18

◆ getTabs()

ilObjGlossaryGUI::getTabs ( $tabs_gui)

get tabs

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

References $_GET.

Referenced by setTabs().

1366  {
1367  global $rbacsystem, $ilHelp;
1368 
1369  $ilHelp->setScreenIdComponent("glo");
1370 
1371  // list terms
1372  $force_active = ($_GET["cmd"] == "" || $_GET["cmd"] == "listTerms")
1373  ? true
1374  : false;
1375  $tabs_gui->addTarget("cont_terms",
1376  $this->ctrl->getLinkTarget($this, "listTerms"), array("listTerms", ""),
1377  get_class($this), "", $force_active);
1378 
1379  $force_active = false;
1380  if ($this->ctrl->getCmd() == "showSummary" ||
1381  strtolower($this->ctrl->getNextClass()) == "ilinfoscreengui")
1382  {
1383  $force_active = true;
1384  }
1385  $tabs_gui->addTarget("info_short",
1386  $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary"), "",
1387  "ilInfoScreenGUI", "", $force_active);
1388 
1389  // properties
1390  if ($rbacsystem->checkAccess('write',$this->object->getRefId()))
1391  {
1392  $tabs_gui->addTarget("settings",
1393  $this->ctrl->getLinkTarget($this, "properties"), "properties",
1394  get_class($this));
1395 
1396  // meta data
1397  $tabs_gui->addTarget("meta_data",
1398  $this->ctrl->getLinkTargetByClass('ilmdeditorgui','listSection'),
1399  "", "ilmdeditorgui");
1400 
1401  // export
1402  /*$tabs_gui->addTarget("export",
1403  $this->ctrl->getLinkTarget($this, "exportList"),
1404  array("exportList", "viewExportLog"), get_class($this));*/
1405 
1406  // export
1407  $tabs_gui->addTarget("export",
1408  $this->ctrl->getLinkTargetByClass("ilexportgui", ""),
1409  "", "ilexportgui");
1410  }
1411 
1412  // permissions
1413  if ($rbacsystem->checkAccess('edit_permission',$this->object->getRefId()))
1414  {
1415  /*$tabs_gui->addTarget("permission_settings",
1416  $this->ctrl->getLinkTarget($this, "perm"),
1417  array("perm", "info"),
1418  get_class($this));
1419  */
1420  $tabs_gui->addTarget("perm_settings",
1421  $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"), array("perm","info","owner"), 'ilpermissiongui');
1422 
1423  }
1424 
1425  $tabs_gui->addNonTabbedLink("presentation_view",
1426  $this->lng->txt("glo_presentation_view"),
1427  "ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=".$this->object->getRefID(),
1428  "_top"
1429  );
1430 
1431  }
$_GET["client_id"]
+ Here is the caller graph for this function:

◆ getTemplate()

ilObjGlossaryGUI::getTemplate ( )

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

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

Referenced by executeCommand(), and showInfoScreen().

1335  {
1336  $this->tpl->getStandardTemplate();
1337 
1338  $title = $this->object->getTitle();
1339 
1340 
1341  if ($this->term_id > 0)
1342  {
1343  $this->tpl->setTitle($this->lng->txt("term").": ".
1344  ilGlossaryTerm::_lookGlossaryTerm($this->term_id));
1345  }
1346  else
1347  {
1348  parent::setTitleAndDescription();
1349  $this->tpl->setTitleIcon(ilUtil::getImagePath("icon_glo.svg"));
1350  $this->tpl->setTitle($this->lng->txt("glo").": ".$title);
1351  }
1352  }
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:

◆ ilObjGlossaryGUI()

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

Constructor public.

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

References $_GET, $ilCtrl, ilObjectGUI\$lng, and ilGlossaryTerm\_lookGlossaryID().

37  {
38  global $ilCtrl, $lng;
39 
40  $this->ctrl =& $ilCtrl;
41  $this->ctrl->saveParameter($this, array("ref_id", "offset"));
42 
43  $lng->loadLanguageModule("content");
44 
45  $this->type = "glo";
46  parent::ilObjectGUI($a_data, $a_id, $a_call_by_reference, false);
47 
48  // determine term id and check whether it is valid (belongs to
49  // current glossary)
50  $this->term_id = (int) $_GET["term_id"];
51  $term_glo_id = ilGlossaryTerm::_lookGlossaryID($this->term_id);
52  if ($this->term_id > 0 && $term_glo_id != $this->object->getId())
53  {
54  $this->term_id = "";
55  }
56 
57  $this->tax_id = $this->object->getTaxonomyId();
58  if ($this->tax_id > 0)
59  {
60  $this->ctrl->saveParameter($this, array("show_tax", "tax_node"));
61 
62  include_once("./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
63  $this->tax = new ilObjTaxonomy($this->tax_id);
64  }
65  if ((int) $_GET["tax_node"] > 1 && $this->tax->getTree()->readRootId() != $_GET["tax_node"])
66  {
67  $this->tax_node = (int) $_GET["tax_node"];
68  }
69  }
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
static _lookGlossaryID($term_id)
get glossary id form term id
+ Here is the call graph for this function:

◆ importFileObject()

ilObjGlossaryGUI::importFileObject ( )

display status information or report errors messages in case of error

public

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

References $_GET, $_REQUEST, $file, $ilErr, ilObjectGUI\$tpl, ilObject\_writeImportId(), ilObjectGUI\checkPermissionBool(), ilUtil\delDir(), ilObjectGUI\initImportForm(), ilUtil\moveUploadedFile(), ilObjectGUI\putObjectInTree(), ilUtil\redirect(), ilUtil\sendSuccess(), and ilUtil\unzip().

376  {
377  global $tpl, $ilErr;
378 
379  $new_type = $_REQUEST["new_type"];
380 
381  // create permission is already checked in createObject. This check here is done to prevent hacking attempts
382  if (!$this->checkPermissionBool("create", "", $new_type))
383  {
384  $ilErr->raiseError($this->lng->txt("no_create_permission"));
385  }
386 
387  $this->lng->loadLanguageModule($new_type);
388  $this->ctrl->setParameter($this, "new_type", $new_type);
389 
390  $form = $this->initImportForm($new_type);
391  if ($form->checkInput())
392  {
393  $this->ctrl->setParameter($this, "new_type", "");
394  $upload = $_FILES["importfile"];
395 
396  // create and insert object in objecttree
397  include_once("./Modules/Glossary/classes/class.ilObjGlossary.php");
398  $newObj = new ilObjGlossary();
399  $newObj->setType($new_type);
400  $newObj->setTitle($upload["name"]);
401  $newObj->create(true);
402 
403  $this->putObjectInTree($newObj);
404 
405  // create import directory
406  $newObj->createImportDirectory();
407 
408  // copy uploaded file to import directory
409  $file = pathinfo($upload["name"]);
410  $full_path = $newObj->getImportDirectory()."/".$upload["name"];
411 
412  ilUtil::moveUploadedFile($upload["tmp_name"], $upload["name"],
413  $full_path);
414 
415  // unzip file
416  ilUtil::unzip($full_path);
417 
418  // determine filename of xml file
419  $subdir = basename($file["basename"],".".$file["extension"]);
420  $xml_file = $newObj->getImportDirectory()."/".$subdir."/".$subdir.".xml";
421 
422  // check whether this is a new export file.
423  // this is the case if manifest.xml exits
424 //echo "1-".$newObj->getImportDirectory()."/".$subdir."/manifest.xml"."-";
425  if (is_file($newObj->getImportDirectory()."/".$subdir."/manifest.xml"))
426  {
427  include_once("./Services/Export/classes/class.ilImport.php");
428  $imp = new ilImport((int) $_GET["ref_id"]);
429  $map = $imp->getMapping();
430  $map->addMapping("Modules/Glossary", "glo", "new_id", $newObj->getId());
431  $imp->importObject($newObj, $full_path, $upload["name"], "glo",
432  "Modules/Glossary", true);
433  ilUtil::sendSuccess($this->lng->txt("glo_added"),true);
434  ilUtil::redirect("ilias.php?baseClass=ilGlossaryEditorGUI&ref_id=".$newObj->getRefId());
435  }
436 
437  // check whether subdirectory exists within zip file
438  if (!is_dir($newObj->getImportDirectory()."/".$subdir))
439  {
440  $this->ilias->raiseError(sprintf($this->lng->txt("cont_no_subdir_in_zip"), $subdir),
441  $this->ilias->error_obj->MESSAGE);
442  }
443 
444  // check whether xml file exists within zip file
445  if (!is_file($xml_file))
446  {
447  $this->ilias->raiseError(sprintf($this->lng->txt("cont_zip_file_invalid"), $subdir."/".$subdir.".xml"),
448  $this->ilias->error_obj->MESSAGE);
449  }
450 
451  include_once ("./Modules/LearningModule/classes/class.ilContObjParser.php");
452  $contParser = new ilContObjParser($newObj, $xml_file, $subdir);
453  $contParser->startParsing();
454  ilObject::_writeImportId($newObj->getId(), $newObj->getImportId());
455 
456  // delete import directory
457  ilUtil::delDir($newObj->getImportDirectory());
458 
459  ilUtil::sendSuccess($this->lng->txt("glo_added"),true);
460  ilUtil::redirect("ilias.php?baseClass=ilGlossaryEditorGUI&ref_id=".$newObj->getRefId());
461  }
462 
463  // display form to correct errors
464  $form->setValuesByPost();
465  $tpl->setContent($form->getHtml());
466  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
print $file
Content Object Parser.
$_GET["client_id"]
Class ilObjGlossary.
static unzip($a_file, $overwrite=false, $a_flat=false)
unzip file
Import class.
initImportForm($a_new_type)
Init object import form.
_writeImportId($a_obj_id, $a_import_id)
write import id to db (static)
static moveUploadedFile($a_file, $a_name, $a_target, $a_raise_errors=true, $a_mode="move_uploaded")
move uploaded file
redirection script todo: (a better solution should control the processing via a xml file) ...
putObjectInTree(ilObject $a_obj, $a_parent_node_id=null)
Add object to tree at given position.
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7
static redirect($a_script)
http redirect to other script
static delDir($a_dir, $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
+ Here is the call graph for this function:

◆ importObject()

ilObjGlossaryGUI::importObject ( )

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

References ilObjectGUI\createObject().

322  {
323  $this->createObject();
324  }
createObject()
create new object form
+ Here is the call graph for this function:

◆ initCreateForm()

ilObjGlossaryGUI::initCreateForm (   $a_new_type)

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

References ilTextAreaInputGUI\setCols(), ilSelectInputGUI\setOptions(), ilTextInputGUI\setSize(), and ilObject\TITLE_LENGTH.

Referenced by saveObject().

283  {
284  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
285  $form = new ilPropertyFormGUI();
286  $form->setTarget("_top");
287  $form->setFormAction($this->ctrl->getFormAction($this));
288  $form->setTitle($this->lng->txt($a_new_type."_new"));
289 
290  // title
291  $ti = new ilTextInputGUI($this->lng->txt("title"), "title");
292  $ti->setSize(min(40, ilObject::TITLE_LENGTH));
293  $ti->setMaxLength(ilObject::TITLE_LENGTH);
294  $ti->setRequired(true);
295  $form->addItem($ti);
296 
297  // description
298  $ta = new ilTextAreaInputGUI($this->lng->txt("description"), "desc");
299  $ta->setCols(40);
300  $ta->setRows(2);
301  $form->addItem($ta);
302 
303  // mode
304  $stati = array(
305  "none"=>$this->lng->txt("glo_mode_normal"),
306  "level"=>$this->lng->txt("glo_mode_level"),
307  "subtree"=>$this->lng->txt("glo_mode_subtree")
308  );
309  $tm = new ilSelectInputGUI($this->lng->txt("glo_mode"), "glo_mode");
310  $tm->setOptions($stati);
311  $tm->setInfo($this->lng->txt("glo_mode_desc"));
312  $tm->setRequired(true);
313  $form->addItem($tm);
314 
315  $form->addCommandButton("save", $this->lng->txt($a_new_type."_add"));
316  $form->addCommandButton("cancel", $this->lng->txt("cancel"));
317 
318  return $form;
319  }
This class represents a selection list property in a property form.
This class represents a property form user interface.
const TITLE_LENGTH
max length of object title
setSize($a_size)
Set Size.
This class represents a text property in a property form.
setOptions($a_options)
Set Options.
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 589 of file class.ilObjGlossaryGUI.php.

References $ilCtrl, ilObjectGUI\$lng, $section, ilSubEnabledFormPropertyGUI\addSubItem(), ilGlossaryAdvMetaDataAdapter\getColumnOrder(), ilObjTaxonomy\getUsageOfObject(), ilAdvancedMDRecordGUI\MODE_REC_SELECTION, ilRadioOption\setInfo(), ilFormPropertyGUI\setInfo(), ilAdvancedMDRecordGUI\setPropertyForm(), ilFormPropertyGUI\setRequired(), ilGloAdvColSortInputGUI\setValue(), ilCheckboxInputGUI\setValue(), ilRadioGroupInputGUI\setValue(), and ilRadioOption\setValue().

Referenced by properties(), and saveProperties().

590  {
591  global $lng, $ilCtrl;
592 
593  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
594  $this->form = new ilPropertyFormGUI();
595 
596  // title
597  $title = new ilTextInputGUI($lng->txt("title"), "title");
598  $title->setRequired(true);
599  $this->form->addItem($title);
600 
601  // description
602  $desc = new ilTextAreaInputGUI($lng->txt("desc"), "description");
603  $this->form->addItem($desc);
604 
605  $lng->loadLanguageModule("rep");
607  $section->setTitle($this->lng->txt('rep_activation_availability'));
608  $this->form->addItem($section);
609 
610  // online
611  $online = new ilCheckboxInputGUI($lng->txt("cont_online"), "cobj_online");
612  $online->setValue("y");
613  $online->setInfo($lng->txt("glo_online_info"));
614  $this->form->addItem($online);
615 
617  $section->setTitle($this->lng->txt('glo_content_settings'));
618  $this->form->addItem($section);
619 
620  // glossary mode
621  $glo_mode = new ilRadioGroupInputGUI($lng->txt("glo_mode"), "glo_mode");
622  //$glo_mode->setInfo($lng->txt("glo_mode_desc"));
623  $op1 = new ilRadioOption($lng->txt("glo_mode_normal"), "none",$lng->txt("glo_mode_normal_info"));
624  $glo_mode->addOption($op1);
625  $op2 = new ilRadioOption($lng->txt("glo_mode_level"), "level",$lng->txt("glo_mode_level_info"));
626  $glo_mode->addOption($op2);
627  $op3 = new ilRadioOption($lng->txt("glo_mode_subtree"), "subtree",$lng->txt("glo_mode_subtree_info"));
628  $glo_mode->addOption($op3);
629  $this->form->addItem($glo_mode);
630 
631  // glossary mode
632  /*$options = array(
633  "none"=>$this->lng->txt("glo_mode_normal"),
634  "level"=>$this->lng->txt("glo_mode_level"),
635  "subtree"=>$this->lng->txt("glo_mode_subtree")
636  );
637  $glo_mode = new ilSelectInputGUI($lng->txt("glo_mode"), "glo_mode");
638  $glo_mode->setOptions($options);
639  $glo_mode->setInfo($lng->txt("glo_mode_desc"));
640  $this->form->addItem($glo_mode);*/
641 
642 
644  $section->setTitle($this->lng->txt('cont_presentation'));
645  $this->form->addItem($section);
646 
647  // presentation mode
648  $pres_mode = new ilRadioGroupInputGUI($lng->txt("glo_presentation_mode"), "pres_mode");
649  $pres_mode->setValue("table");
650  $op1 = new ilRadioOption($lng->txt("glo_table_form"), "table", $lng->txt("glo_table_form_info"));
651 
652  // short text length
653  $snl = new ilNumberInputGUI($lng->txt("glo_text_snippet_length"), "snippet_length");
654  $snl->setMaxValue(3000);
655  $snl->setMinValue(100);
656  $snl->setMaxLength(4);
657  $snl->setSize(4);
658  $snl->setInfo($lng->txt("glo_text_snippet_length_info"));
659  $snl->setValue(200);
660  $op1->addSubItem($snl);
661 
662  $pres_mode->addOption($op1);
663  $op2 = new ilRadioOption($lng->txt("glo_full_definitions"), "full_def", $lng->txt("glo_full_definitions_info"));
664  $pres_mode->addOption($op2);
665  $this->form->addItem($pres_mode);
666 
667  // show taxonomy
668  include_once("./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
669  $tax_ids = ilObjTaxonomy::getUsageOfObject($this->object->getId());
670  if (count($tax_ids) > 0)
671  {
672  $show_tax = new ilCheckboxInputGUI($this->lng->txt("glo_show_taxonomy"), "show_tax");
673  $show_tax->setInfo($this->lng->txt("glo_show_taxonomy_info"));
674  $this->form->addItem($show_tax);
675  }
676 
677  // downloads
678  $down = new ilCheckboxInputGUI($lng->txt("cont_downloads"), "glo_act_downloads");
679  $down->setValue("y");
680  $down->setInfo($lng->txt("cont_downloads_desc"));
681  $this->form->addItem($down);
682 
683  if ($a_mode == "edit")
684  {
685  $title->setValue($this->object->getTitle());
686  $desc->setValue($this->object->getDescription());
687  $online->setChecked($this->object->getOnline());
688  $glo_mode->setValue($this->object->getVirtualMode());
689  $pres_mode->setValue($this->object->getPresentationMode());
690  $snl->setValue($this->object->getSnippetLength());
691  if (count($tax_ids) > 0)
692  {
693  $show_tax->setChecked($this->object->getShowTaxonomy());
694  }
695 
696  $down->setChecked($this->object->isActiveDownloads());
697  }
698 
699  // advanced metadata
700  include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
701  $record_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_REC_SELECTION,'glo',$this->object->getId(), "term");
702  $record_gui->setPropertyForm($this->form);
703  $record_gui->parseRecordSelection($this->lng->txt("glo_add_term_properties"));
704 
705  // sort columns, if adv fields are given
706  include_once("./Modules/Glossary/classes/class.ilGlossaryAdvMetaDataAdapter.php");
707  $adv_ap = new ilGlossaryAdvMetaDataAdapter($this->object->getId());
708  $cols = $adv_ap->getColumnOrder();
709  if (count($cols) > 1)
710  {
711  include_once './Modules/Glossary/classes/class.ilGloAdvColSortInputGUI.php';
712  $ti = new ilGloAdvColSortInputGUI($lng->txt("cont_col_ordering"), "field_order");
713  $this->form->addItem($ti);
714  $ti->setValue($cols);
715  }
716 
717  // save and cancel commands
718  $this->form->addCommandButton("saveProperties", $lng->txt("save"));
719 
720  $this->form->setTitle($lng->txt("cont_glo_properties"));
721  $this->form->setFormAction($ilCtrl->getFormAction($this));
722  }
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.
setPropertyForm($form)
set property form object
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.
global $ilCtrl
Definition: ilias.php:18
setInfo($a_info)
Set Information Text.
$section
Definition: Utf8Test.php:84
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 property in a property form.
This class represents a text area property in a property form.
setRequired($a_required)
Set Required.
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 1571 of file class.ilObjGlossaryGUI.php.

References $_GET, $ilCtrl, $ilSetting, ilObjectGUI\$lng, ilObjStyleSheet\_getStandardStyles(), ilObjStyleSheet\_lookupStandard(), ilObject\_lookupTitle(), ilUtil\formSelect(), ilSelectInputGUI\setOptions(), and ilNonEditableValueGUI\setValue().

Referenced by editStyleProperties().

1572  {
1573  global $ilCtrl, $lng, $ilTabs, $ilSetting;
1574 
1575  include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
1576  $lng->loadLanguageModule("style");
1577 
1578  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
1579  $this->form = new ilPropertyFormGUI();
1580 
1581  $fixed_style = $ilSetting->get("fixed_content_style_id");
1582  $style_id = $this->object->getStyleSheetId();
1583 
1584  if ($fixed_style > 0)
1585  {
1586  $st = new ilNonEditableValueGUI($lng->txt("style_current_style"));
1587  $st->setValue(ilObject::_lookupTitle($fixed_style)." (".
1588  $this->lng->txt("global_fixed").")");
1589  $this->form->addItem($st);
1590  }
1591  else
1592  {
1593  $st_styles = ilObjStyleSheet::_getStandardStyles(true, false,
1594  $_GET["ref_id"]);
1595 
1596  $st_styles[0] = $this->lng->txt("default");
1597  ksort($st_styles);
1598 
1599  if ($style_id > 0)
1600  {
1601  // individual style
1602  if (!ilObjStyleSheet::_lookupStandard($style_id))
1603  {
1604  $st = new ilNonEditableValueGUI($lng->txt("style_current_style"));
1605  $st->setValue(ilObject::_lookupTitle($style_id));
1606  $this->form->addItem($st);
1607 
1608 //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "edit"));
1609 
1610  // delete command
1611  $this->form->addCommandButton("editStyle",
1612  $lng->txt("style_edit_style"));
1613  $this->form->addCommandButton("deleteStyle",
1614  $lng->txt("style_delete_style"));
1615 //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "delete"));
1616  }
1617  }
1618 
1619  if ($style_id <= 0 || ilObjStyleSheet::_lookupStandard($style_id))
1620  {
1621  $style_sel = ilUtil::formSelect ($style_id, "style_id",
1622  $st_styles, false, true);
1623  $style_sel = new ilSelectInputGUI($lng->txt("style_current_style"), "style_id");
1624  $style_sel->setOptions($st_styles);
1625  $style_sel->setValue($style_id);
1626  $this->form->addItem($style_sel);
1627 //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "create"));
1628  $this->form->addCommandButton("saveStyleSettings",
1629  $lng->txt("save"));
1630  $this->form->addCommandButton("createStyle",
1631  $lng->txt("sty_create_ind_style"));
1632  }
1633  }
1634  $this->form->setTitle($lng->txt("glo_style"));
1635  $this->form->setFormAction($ilCtrl->getFormAction($this));
1636  }
This class represents a selection list property in a property form.
This class represents a property form user interface.
$_GET["client_id"]
static _lookupTitle($a_id)
lookup object title
global $ilCtrl
Definition: ilias.php:18
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.
_getStandardStyles($a_exclude_default_style=false, $a_include_deactivated=false, $a_scope=0)
Get standard styles.
setOptions($a_options)
Set Options.
_lookupStandard($a_id)
Lookup standard flag.
This class represents a non editable value in a property form.
global $ilSetting
Definition: privfeed.php:40
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ listTerms()

ilObjGlossaryGUI::listTerms ( )

list terms

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

References $_GET, $_SESSION, $ilCtrl, $ilUser, $lang, ilObjectGUI\$lng, $si, $tab, ilObjectGUI\$tpl, ilMDLanguageItem\_getLanguages(), ilTextInputGUI\setMaxLength(), and showTaxonomy().

Referenced by applyFilter(), and resetFilter().

818  {
819  global $ilUser, $ilToolbar, $lng, $ilCtrl, $tpl;
820 
821  if ($_GET["show_tax"])
822  {
823  $this->showTaxonomy();
824  }
825 
826  // term
827  include_once("./Services/Form/classes/class.ilTextInputGUI.php");
828  $ti = new ilTextInputGUI($lng->txt("cont_new_term"), "new_term");
829  $ti->setMaxLength(80);
830  $ti->setSize(20);
831  $ilToolbar->addInputItem($ti, true);
832 
833  // language
834  $this->lng->loadLanguageModule("meta");
836  if ($_SESSION["il_text_lang_".$_GET["ref_id"]] != "")
837  {
838  $s_lang = $_SESSION["il_text_lang_".$_GET["ref_id"]];
839  }
840  else
841  {
842  $s_lang = $ilUser->getLanguage();
843  }
844  include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
845  $si = new ilSelectInputGUI($lng->txt("language"), "term_language");
846  $si->setOptions($lang);
847  $si->setValue($s_lang);
848  $ilToolbar->addInputItem($si, true);
849 
850  $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
851  $ilToolbar->addFormButton($lng->txt("glo_add_new_term"), "addTerm");
852  //$select_language = ilUtil::formSelect ($s_lang, "term_language",$lang,false,true);
853  //$this->tpl->setVariable("SELECT_LANGUAGE", $select_language);
854 
855  if (is_object($this->tax))
856  {
857  $ilToolbar->addSeparator();
858  if ($_GET["show_tax"])
859  {
860  $ilToolbar->addButton($lng->txt("glo_hide_taxonomy"),
861  $ilCtrl->getLinkTarget($this, "deactTaxonomy"));
862  }
863  else
864  {
865  $ilToolbar->addButton($lng->txt("glo_show_taxonomy"),
866  $ilCtrl->getLinkTarget($this, "actTaxonomy"));
867  }
868  }
869 
870  include_once("./Modules/Glossary/classes/class.ilTermListTableGUI.php");
871  $tab = new ilTermListTableGUI($this, "listTerms", $this->tax_node);
872  $tpl->setContent($tab->getHTML());
873  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
This class represents a selection list property in a property form.
$_GET["client_id"]
showTaxonomy()
Show taxonomy.
global $ilCtrl
Definition: ilias.php:18
This class represents a text property in a property form.
setMaxLength($a_maxlength)
Set Max Length.
global $ilUser
Definition: imgupload.php:15
+ 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 987 of file class.ilObjGlossaryGUI.php.

References $_GET.

988  {
989  include_once("./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
990 
991  $definition =& new ilGlossaryDefinition($_GET["def"]);
992  $definition->moveDown();
993 
994  $this->ctrl->redirect($this, "listTerms");
995  }
$_GET["client_id"]
Class ilGlossaryDefinition.

◆ moveDefinitionUp()

ilObjGlossaryGUI::moveDefinitionUp ( )

move a definiton up

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

References $_GET.

975  {
976  include_once("./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
977 
978  $definition =& new ilGlossaryDefinition($_GET["def"]);
979  $definition->moveUp();
980 
981  $this->ctrl->redirect($this, "listTerms");
982  }
$_GET["client_id"]
Class ilGlossaryDefinition.

◆ properties()

ilObjGlossaryGUI::properties ( )

edit properties of object (admin form)

public

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

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

567  {
568  global $tpl;
569 
570  $this->checkPermission("write");
571 
572  $this->setSettingsSubTabs("general_settings");
573 
574  $this->initSettingsForm();
575 
576  // Edit ecs export settings
577  include_once 'Modules/Glossary/classes/class.ilECSGlossarySettings.php';
578  $ecs = new ilECSGlossarySettings($this->object);
579  $ecs->addSettingsToForm($this->form, 'glo');
580 
581  $tpl->setContent($this->form->getHTML());
582  }
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 1119 of file class.ilObjGlossaryGUI.php.

References $_POST, and $file.

1120  {
1121  if(!isset($_POST["file"]))
1122  {
1123  $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
1124  }
1125  if (count($_POST["file"]) > 1)
1126  {
1127  $this->ilias->raiseError($this->lng->txt("cont_select_max_one_item"),$this->ilias->error_obj->MESSAGE);
1128  }
1129 
1130  $file = explode(":", $_POST["file"][0]);
1131  $export_dir = $this->object->getExportDirectory($file[0]);
1132 
1133  if ($this->object->getPublicExportFile($file[0]) ==
1134  $file[1])
1135  {
1136  $this->object->setPublicExportFile($file[0], "");
1137  }
1138  else
1139  {
1140  $this->object->setPublicExportFile($file[0], $file[1]);
1141  }
1142  $this->object->update();
1143  $this->ctrl->redirectByClass("ilexportgui", "");
1144  }
print $file
$_POST['username']
Definition: cron.php:12
redirection script todo: (a better solution should control the processing via a xml file) ...

◆ quickList()

ilObjGlossaryGUI::quickList ( )

quick term list

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

References $ilUser, and ilObjectGUI\$tpl.

808  {
809  global $ilUser, $tpl;
810 
811  }
global $ilUser
Definition: imgupload.php:15

◆ resetFilter()

ilObjGlossaryGUI::resetFilter ( )

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

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

References listTerms().

1516  {
1517  include_once("./Modules/Glossary/classes/class.ilTermListTableGUI.php");
1518  $prtab = new ilTermListTableGUI($this, "listTerms", $this->tax_node);
1519  $prtab->resetOffset();
1520  $prtab->resetFilter();
1521  $this->listTerms();
1522  }
+ Here is the call graph for this function:

◆ saveObject()

ilObjGlossaryGUI::saveObject ( )

save new content object to db

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

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

330  {
331  global $tpl;
332 
333  $new_type = $_REQUEST["new_type"];
334 
335  // create permission is already checked in createObject. This check here is done to prevent hacking attempts
336  if (!$this->checkPermissionBool("create", "", $new_type))
337  {
338  $this->ilias->raiseError($this->lng->txt("no_create_permission"), $this->ilias->error_obj->MESSAGE);
339  }
340 
341  $this->lng->loadLanguageModule($new_type);
342  $this->ctrl->setParameter($this, "new_type", $new_type);
343 
344  $form = $this->initCreateForm($new_type);
345  if ($form->checkInput())
346  {
347  $this->ctrl->setParameter($this, "new_type", "");
348 
349  include_once("./Modules/Glossary/classes/class.ilObjGlossary.php");
350  $newObj = new ilObjGlossary();
351  $newObj->setType($new_type);
352  $newObj->setTitle($form->getInput("title"));
353  $newObj->setDescription($form->getInput("desc"));
354  $newObj->setVirtualMode($form->getInput("glo_mode"));
355  $newObj->create();
356 
357  $this->putObjectInTree($newObj);
358 
359  // always send a message
360  ilUtil::sendSuccess($this->lng->txt("glo_added"),true);
361  ilUtil::redirect("ilias.php?baseClass=ilGlossaryEditorGUI&ref_id=".$newObj->getRefId());
362  }
363 
364  // display only this form to correct input
365  $form->setValuesByPost();
366  $tpl->setContent($form->getHtml());
367  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
Class ilObjGlossary.
redirection script todo: (a better solution should control the processing via a xml file) ...
putObjectInTree(ilObject $a_obj, $a_parent_node_id=null)
Add object to tree at given position.
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7
static redirect($a_script)
http redirect to other 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 728 of file class.ilObjGlossaryGUI.php.

References $_POST, ilObjectGUI\$tpl, ilGlossaryAdvMetaDataAdapter\getColumnOrder(), initSettingsForm(), ilAdvancedMDRecordGUI\MODE_REC_SELECTION, ilAdvancedMDRecordGUI\saveSelection(), ilUtil\sendSuccess(), ilGlossaryDefinition\setShortTextsDirty(), and ilUtil\yn2tf().

729  {
730  global $tpl;
731 
732  $this->initSettingsForm();
733  if ($this->form->checkInput())
734  {
735  $this->object->setTitle($_POST['title']);
736  $this->object->setDescription($_POST['description']);
737  $this->object->setOnline(ilUtil::yn2tf($_POST["cobj_online"]));
738  $this->object->setVirtualMode($_POST["glo_mode"]);
739 // $this->object->setActiveGlossaryMenu(ilUtil::yn2tf($_POST["glo_act_menu"]));
740  $this->object->setActiveDownloads(ilUtil::yn2tf($_POST["glo_act_downloads"]));
741  $this->object->setPresentationMode($_POST["pres_mode"]);
742  $this->object->setSnippetLength($_POST["snippet_length"]);
743  $this->object->setShowTaxonomy($_POST["show_tax"]);
744  $this->object->update();
745 
746  // field order of advanced metadata
747  include_once("./Modules/Glossary/classes/class.ilGlossaryAdvMetaDataAdapter.php");
748  $adv_ap = new ilGlossaryAdvMetaDataAdapter($this->object->getId());
749  $cols = $adv_ap->getColumnOrder();
750  if (count($cols) > 1)
751  {
752  $adv_ap->saveColumnOrder($_POST["field_order"]);
753  }
754 
755  // set definition short texts dirty
756  include_once("./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
757  ilGlossaryDefinition::setShortTextsDirty($this->object->getId());
758 
759  // update metadata record selection
760  include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
761  $record_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_REC_SELECTION,'glo',$this->object->getId(), "term");
762  $record_gui->saveSelection();
763 
764  // Update ecs export settings
765  include_once 'Modules/Glossary/classes/class.ilECSGlossarySettings.php';
766  $ecs = new ilECSGlossarySettings($this->object);
767  if($ecs->handleSettingsUpdate())
768  {
769  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
770  $this->ctrl->redirect($this, "properties");
771  }
772 
773  }
774  $this->form->setValuesByPost();
775  $tpl->setContent($this->form->getHTML());
776  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
initSettingsForm($a_mode="edit")
Init settings form.
static yn2tf($a_yn)
convert "y"/"n" to true/false
saveSelection()
Save selection per object.
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 1671 of file class.ilObjGlossaryGUI.php.

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

1672  {
1673  global $ilSetting;
1674 
1675  include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
1676  if ($ilSetting->get("fixed_content_style_id") <= 0 &&
1677  (ilObjStyleSheet::_lookupStandard($this->object->getStyleSheetId())
1678  || $this->object->getStyleSheetId() == 0))
1679  {
1680  $this->object->setStyleSheetId(ilUtil::stripSlashes($_POST["style_id"]));
1681  $this->object->update();
1682  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
1683  }
1684  $this->ctrl->redirect($this, "editStyleProperties");
1685  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
_lookupStandard($a_id)
Lookup standard flag.
global $ilSetting
Definition: privfeed.php:40
+ Here is the call graph for this function:

◆ saveTerm()

ilObjGlossaryGUI::saveTerm ( )

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

References $ilCtrl, and ilUtil\sendSuccess().

1288  {
1289  $term_gui =& new ilGlossaryTermGUI();
1290  $term_gui->setGlossary($this->object);
1291  $term_gui->save();
1292 
1293  ilUtil::sendSuccess($this->lng->txt("cont_added_term"),true);
1294 
1295  //ilUtil::redirect("glossary_edit.php?ref_id=".$_GET["ref_id"]."&cmd=listTerms");
1296  $ilCtrl->redirect($this, "listTerms");
1297  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
global $ilCtrl
Definition: ilias.php:18
GUI class for glossary terms.
+ Here is the call graph for this function:

◆ setContentStyleSheet()

ilObjGlossaryGUI::setContentStyleSheet (   $a_tpl = null)

Set content style sheet.

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

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

Referenced by confirmDefinitionDeletion().

1533  {
1534  global $tpl;
1535 
1536  if ($a_tpl != null)
1537  {
1538  $ctpl = $a_tpl;
1539  }
1540  else
1541  {
1542  $ctpl = $tpl;
1543  }
1544 
1545  $ctpl->setCurrentBlock("ContentStyle");
1546  $ctpl->setVariable("LOCATION_CONTENT_STYLESHEET",
1547  ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId()));
1548  $ctpl->parseCurrentBlock();
1549  }
getContentStylePath($a_style_id)
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 1240 of file class.ilObjGlossaryGUI.php.

References $_GET.

1241  {
1242  if(strtolower($_GET["baseClass"]) != "ilglossaryeditorgui")
1243  {
1244  parent::setLocator($a_tree, $a_id);
1245  }
1246  else
1247  {
1248  if(is_object($this->object))
1249  {
1250  require_once("./Modules/Glossary/classes/class.ilGlossaryLocatorGUI.php");
1251  $gloss_loc =& new ilGlossaryLocatorGUI();
1252  if (is_object($this->term))
1253  {
1254  $gloss_loc->setTerm($this->term);
1255  }
1256  $gloss_loc->setGlossary($this->object);
1257  //$gloss_loc->setDefinition($this->definition);
1258  $gloss_loc->display();
1259  }
1260  }
1261 
1262  }
$_GET["client_id"]

◆ setSettingsSubTabs()

ilObjGlossaryGUI::setSettingsSubTabs (   $a_active)

Set sub tabs.

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

References $ilCtrl, ilObjectGUI\$lng, and ilObjTaxonomy\loadLanguageModule().

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

1437  {
1438  global $ilTabs, $ilCtrl, $lng;
1439 
1440  if (in_array($a_active,
1441  array("general_settings", "style", "taxonomy")))
1442  {
1443  // general properties
1444  $ilTabs->addSubTab("general_settings",
1445  $lng->txt("settings"),
1446  $ilCtrl->getLinkTarget($this, 'properties'));
1447 
1448  // style properties
1449  $ilTabs->addSubTab("style",
1450  $lng->txt("obj_sty"),
1451  $ilCtrl->getLinkTarget($this, 'editStyleProperties'));
1452 
1453  // taxonomy
1454  include_once("./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
1456  $ilTabs->addSubTab("taxonomy",
1457  $lng->txt("tax_taxonomy"),
1458  $ilCtrl->getLinkTargetByClass("ilobjtaxonomygui", ''));
1459 
1460  $ilTabs->activateSubTab($a_active);
1461  }
1462  }
global $ilCtrl
Definition: ilias.php:18
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 1357 of file class.ilObjGlossaryGUI.php.

References getTabs().

Referenced by executeCommand(), and showInfoScreen().

1358  {
1359  $this->getTabs($this->tabs_gui);
1360  }
getTabs(&$tabs_gui)
get tabs
+ 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 909 of file class.ilObjGlossaryGUI.php.

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

910  {
911  foreach ($a_actions as $name => $lng)
912  {
913  $d[$name] = array("name" => $name, "lng" => $lng);
914  }
915 
916  $notoperations = array();
917  $operations = array();
918 
919  $operations = $d;
920 
921  if (count($operations) > 0)
922  {
923  foreach ($operations as $val)
924  {
925  $this->tpl->setCurrentBlock("tbl_action_btn");
926  $this->tpl->setVariable("BTN_NAME", $val["name"]);
927  $this->tpl->setVariable("BTN_VALUE", $this->lng->txt($val["lng"]));
928  $this->tpl->parseCurrentBlock();
929  }
930 
931  $this->tpl->setCurrentBlock("tbl_action_row");
932  $this->tpl->setVariable("IMG_ARROW",ilUtil::getImagePath("arrow_downright.svg"));
933  $this->tpl->parseCurrentBlock();
934  }
935  }
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
+ Here is the call graph for this function:

◆ showInfoScreen()

ilObjGlossaryGUI::showInfoScreen ( )

Show info screen.

Parameters

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

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

Referenced by executeCommand().

475  {
476  global $ilAccess;
477 
478  $this->getTemplate();
479  $this->setTabs();
480  $this->setLocator();
481  $this->lng->loadLanguageModule("meta");
482  include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
483 
484  $info = new ilInfoScreenGUI($this);
485  $info->enablePrivateNotes();
486  $info->enableNews();
487  if ($ilAccess->checkAccess("write", "", $_GET["ref_id"]))
488  {
489  $info->enableNewsEditing();
490  $news_set = new ilSetting("news");
491  $enable_internal_rss = $news_set->get("enable_rss_for_internal");
492  if ($enable_internal_rss)
493  {
494  $info->setBlockProperty("news", "settings", true);
495  }
496  }
497  $info->addMetaDataSections($this->object->getId(),0, $this->object->getType());
498 
499  ilObjGlossaryGUI::addUsagesToInfo($info, $this->object->getId());
500 
501  $this->ctrl->forwardCommand($info);
502  }
ILIAS Setting Class.
Class ilInfoScreenGUI.
$_GET["client_id"]
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.

Parameters

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

References ilObjectGUI\$lng, ilObjectGUI\$tpl, and ilObjTaxonomy\getUsageOfObject().

Referenced by listTerms().

1709  {
1710  global $tpl, $lng;
1711 
1712  include_once("./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
1713  $tax_ids = ilObjTaxonomy::getUsageOfObject($this->object->getId());
1714  if (count($tax_ids) > 0)
1715  {
1716  include_once("./Services/Taxonomy/classes/class.ilTaxonomyExplorerGUI.php");
1717  $tax_exp = new ilTaxonomyExplorerGUI($this, "showTaxonomy", $tax_ids[0],
1718  "ilobjglossarygui", "listTerms");
1719  if (!$tax_exp->handleCommand())
1720  {
1721  //$tpl->setLeftNavContent($tax_exp->getHTML());
1722  $tpl->setLeftNavContent($tax_exp->getHTML()."&nbsp;");
1723  }
1724  }
1725 
1726  }
static getUsageOfObject($a_obj_id, $a_include_titles=false)
Get usage of object.
Taxonomy explorer GUI class.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateTerm()

ilObjGlossaryGUI::updateTerm ( )

update term

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

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

1079  {
1080  $term = new ilGlossaryTerm($this->term_id);
1081 
1082  $term->setTerm(ilUtil::stripSlashes($_POST["term"]));
1083  $term->setLanguage($_POST["term_language"]);
1084  $term->update();
1085  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"),true);
1086  $this->ctrl->redirect($this, "listTerms");
1087  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
Class ilGlossaryTerm.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
+ Here is the call graph for this function:

◆ view()

ilObjGlossaryGUI::view ( )

view content

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

References viewObject().

1268  {
1269  //$this->prepareOutput();
1270  $this->viewObject();
1271  }
+ Here is the call graph for this function:

◆ viewExportLog()

ilObjGlossaryGUI::viewExportLog ( )

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

1150  {
1151  }

◆ viewObject()

ilObjGlossaryGUI::viewObject ( )

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

References $_GET.

Referenced by view().

545  {
546  global $rbacsystem;
547 
548  if (strtolower($_GET["baseClass"]) == "iladministrationgui")
549  {
550  parent::viewObject();
551  return;
552  }
553 
554  if (!$rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
555  {
556  $this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
557  }
558 
559  }
$_GET["client_id"]
redirection script todo: (a better solution should control the processing via a xml file) ...
+ Here is the caller graph for this function:

Field Documentation

◆ $admin_tabs

ilObjGlossaryGUI::$admin_tabs

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

◆ $mode

ilObjGlossaryGUI::$mode

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

◆ $term

ilObjGlossaryGUI::$term

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


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