ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilObjExternalToolsSettingsGUI Class Reference

Class ilObjExternalToolsSettingsGUI. More...

+ Inheritance diagram for ilObjExternalToolsSettingsGUI:
+ Collaboration diagram for ilObjExternalToolsSettingsGUI:

Public Member Functions

 __construct ($a_data, $a_id, $a_call_by_reference, $a_prepare_output=true)
 Constructor @access public. More...
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getTabs ()
 get tabs @access public More...
 
 editMathJaxObject ()
 Configure MathJax settings. More...
 
 saveMathJaxObject ()
 Save MathJax Setttings. More...
 
 clearMathJaxCacheObject ()
 Clear the directory with cached LaTeX graphics. More...
 
 editMapsObject ()
 Configure maps settings. More...
 
 saveMapsObject ()
 Save Maps Setttings. More...
 
 __initSubTabs ($a_cmd)
 
 executeCommand ()
 execute command More...
 
- Public Member Functions inherited from ilObjectGUI
 executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ()
 cancel action and go back to previous page @access public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 edit object More...
 
 addExternalEditFormCustom (ilPropertyFormGUI $a_form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 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 ()
 @inheritDoc More...
 
 removeFromDeskObject ()
 @inheritDoc More...
 

Protected Attributes

 $rbacsystem
 
 $access
 
 $rbacreview
 
- Protected Attributes inherited from ilObjectGUI
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $rbacsystem
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 
 $favourites
 

Additional Inherited Members

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

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

Constructor @access public.

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

40 {
41 global $DIC;
42
43 $this->lng = $DIC->language();
44 $this->rbacsystem = $DIC->rbac()->system();
45 $this->access = $DIC->access();
46 $this->rbacreview = $DIC->rbac()->review();
47 $this->ctrl = $DIC->ctrl();
48 $this->tpl = $DIC["tpl"];
49 $lng = $DIC->language();
50
51 $this->type = "extt";
52 parent::__construct($a_data, $a_id, $a_call_by_reference, false);
53
54 $lng->loadLanguageModule("delic");
55 $lng->loadLanguageModule("maps");
56 $lng->loadLanguageModule("mathjax");
57 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$DIC
Definition: xapitoken.php:46

References $DIC, ilObjectGUI\$lng, and ILIAS\GlobalScreen\Provider\__construct().

+ Here is the call graph for this function:

Member Function Documentation

◆ __initSubTabs()

ilObjExternalToolsSettingsGUI::__initSubTabs (   $a_cmd)

Definition at line 363 of file class.ilObjExternalToolsSettingsGUI.php.

364 {
365 $maps = ($a_cmd == 'editMaps') ? true : false;
366 $mathjax = ($a_cmd == 'editMathJax') ? true : false;
367
368 $this->tabs_gui->addSubTabTarget(
369 "maps_extt_maps",
370 $this->ctrl->getLinkTarget($this, "editMaps"),
371 "",
372 "",
373 "",
374 $maps
375 );
376 $this->tabs_gui->addSubTabTarget(
377 "mathjax_mathjax",
378 $this->ctrl->getLinkTarget($this, "editMathJax"),
379 "",
380 "",
381 "",
382 $mathjax
383 );
384 }

Referenced by editMapsObject(), and editMathJaxObject().

+ Here is the caller graph for this function:

◆ clearMathJaxCacheObject()

ilObjExternalToolsSettingsGUI::clearMathJaxCacheObject ( )

Clear the directory with cached LaTeX graphics.

Definition at line 251 of file class.ilObjExternalToolsSettingsGUI.php.

252 {
254
255 include_once './Services/MathJax/classes/class.ilMathJax.php';
256 ilMathJax::getInstance()->clearCache();
257
258 ilUtil::sendSuccess($lng->txt('mathjax_server_cache_cleared'), true);
259 $this->ctrl->redirect($this, 'editMathJax');
260 }
static getInstance()
Singleton: get instance.

References ilObjectGUI\$lng, and ilMathJax\getInstance().

+ Here is the call graph for this function:

◆ editMapsObject()

ilObjExternalToolsSettingsGUI::editMapsObject ( )

Configure maps settings.

@access public

Definition at line 267 of file class.ilObjExternalToolsSettingsGUI.php.

268 {
269 require_once("Services/Maps/classes/class.ilMapUtil.php");
270
271 $ilAccess = $this->access;
275
276 $this->__initSubTabs("editMaps");
277 $std_latitude = ilMapUtil::getStdLatitude();
278 $std_longitude = ilMapUtil::getStdLongitude();
279 $std_zoom = ilMapUtil::getStdZoom();
281
282 include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
283 include_once("./Services/Form/classes/class.ilCheckboxOption.php");
284 $form = new ilPropertyFormGUI();
285 $form->setFormAction($ilCtrl->getFormAction($this));
286 $form->setTitle($lng->txt("maps_settings"));
287
288 // Enable Maps
289 $enable = new ilCheckboxInputGUI($lng->txt("maps_enable_maps"), "enable");
290 $enable->setChecked(ilMapUtil::isActivated());
291 $enable->setInfo($lng->txt("maps_enable_maps_info"));
292 $form->addItem($enable);
293
294 // Select type
295 $types = new ilSelectInputGUI($lng->txt("maps_map_type"), "type");
296 $types->setOptions(ilMapUtil::getAvailableMapTypes());
297 $types->setValue($type);
298 $form->addItem($types);
299
300 // map data server property
301 if ($type == "openlayers") {
302 $tile = new ilTextInputGUI($lng->txt("maps_tile_server"), "tile");
303 $tile->setValue(ilMapUtil::getStdTileServers());
304 $tile->setInfo(sprintf($lng->txt("maps_custom_tile_server_info"), ilMapUtil::DEFAULT_TILE));
305 $geolocation = new ilTextInputGUI($lng->txt("maps_geolocation_server"), "geolocation");
306 $geolocation->setValue(ilMapUtil::getStdGeolocationServer());
307 $geolocation->setInfo($lng->txt("maps_custom_geolocation_server_info"));
308
309 $form->addItem($tile);
310 $form->addItem($geolocation);
311 } else {
312 // api key for google
313 $key = new ilTextInputGUI("Google API Key", "api_key");
314 $key->setMaxLength(200);
315 $key->setValue(ilMapUtil::getApiKey());
316 $form->addItem($key);
317 }
318
319 // location property
320 $loc_prop = new ilLocationInputGUI(
321 $lng->txt("maps_std_location"),
322 "std_location"
323 );
324
325 $loc_prop->setLatitude($std_latitude);
326 $loc_prop->setLongitude($std_longitude);
327 $loc_prop->setZoom($std_zoom);
328 $form->addItem($loc_prop);
329
330 if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
331 $form->addCommandButton("saveMaps", $lng->txt("save"));
332 $form->addCommandButton("view", $lng->txt("cancel"));
333 }
334
335 $tpl->setVariable("ADM_CONTENT", $form->getHTML());
336 }
This class represents a checkbox property in a property form.
This class represents a location property in a property form.
static getApiKey()
static getStdGeolocationServer()
Returns the reverse geolocation server to be used in the installation.
static getStdLatitude()
static getStdTileServers()
Returns the tile server to be used in the installation.
static getStdLongitude()
static getStdZoom()
const DEFAULT_TILE
static isActivated()
Checks whether Map feature is activated.
static getAvailableMapTypes()
Get a dict { $id => $name } for available maps services.
static getType()
This class represents a property form user interface.
This class represents a selection list property in a property form.
This class represents a text property in a property form.
global $ilCtrl
Definition: ilias.php:18
$type

References $access, ilObjectGUI\$ctrl, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, $type, __initSubTabs(), ilMapUtil\DEFAULT_TILE, ilMapUtil\getApiKey(), ilMapUtil\getAvailableMapTypes(), ilMapUtil\getStdGeolocationServer(), ilMapUtil\getStdLatitude(), ilMapUtil\getStdLongitude(), ilMapUtil\getStdTileServers(), ilMapUtil\getStdZoom(), ilMapUtil\getType(), and ilMapUtil\isActivated().

+ Here is the call graph for this function:

◆ editMathJaxObject()

ilObjExternalToolsSettingsGUI::editMathJaxObject ( )

Configure MathJax settings.

Definition at line 99 of file class.ilObjExternalToolsSettingsGUI.php.

100 {
101 $ilAccess = $this->access;
106
107 $mathJaxSetting = new ilSetting("MathJax");
108 $path_to_mathjax = $mathJaxSetting->get("path_to_mathjax");
109
110 $this->__initSubTabs("editMathJax");
111
112 include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
113 $form = new ilPropertyFormGUI();
114 $form->setFormAction($ilCtrl->getFormAction($this));
115 $form->setTitle($lng->txt("mathjax_settings"));
116
117 // Enable MathJax
118 $enable = new ilCheckboxInputGUI($lng->txt("mathjax_enable_client"), "enable");
119 $enable->setChecked($mathJaxSetting->get("enable"));
120 $enable->setInfo($lng->txt("mathjax_enable_mathjax_info") . " <a target='blank' href='http://www.mathjax.org/'>"
121 . $lng->txt("mathjax_home_link") . "</a>");
122 $form->addItem($enable);
123
124 // Path to mathjax
125 $text_prop = new ilTextInputGUI($lng->txt("mathjax_path_to_mathjax"), "path_to_mathjax");
126 $text_prop->setInfo($lng->txt("mathjax_path_to_mathjax_desc"));
127 $text_prop->setValue($path_to_mathjax);
128 $text_prop->setRequired(true);
129 $text_prop->setMaxLength(400);
130 $text_prop->setSize(100);
131 $enable->addSubItem($text_prop);
132
133 // mathjax limiter
134 $options = array(
135 0 => '\&#8203;(...\&#8203;)',
136 1 => '[tex]...[/tex]',
137 2 => '&lt;span class="math"&gt;...&lt;/span&gt;'
138 );
139 $si = new ilSelectInputGUI($this->lng->txt("mathjax_limiter"), "limiter");
140 $si->setOptions($options);
141 $si->setValue($mathJaxSetting->get("limiter"));
142 $si->setInfo($this->lng->txt("mathjax_limiter_info"));
143 $enable->addSubItem($si);
144
145 include_once './Services/MathJax/classes/class.ilMathJax.php';
146 $install_link = ' <a target="_blank" href="Services/MathJax/docs/Install-MathJax-Server.txt">'
147 . $lng->txt("mathjax_server_installation") . '</a>';
148 $clear_cache_link = ' <a href="' . $this->ctrl->getLinkTarget($this, 'clearMathJaxCache') . '"">'
149 . $lng->txt("mathjax_server_clear_cache") . '</a>';
150
151 // Enable Server MathJax
152 $server = new ilCheckboxInputGUI($lng->txt("mathjax_enable_server"), "enable_server");
153 $server->setChecked($mathJaxSetting->get("enable_server"));
154 $server->setInfo($lng->txt("mathjax_enable_server_info") . $install_link);
155
156 $form->addItem($server);
157
158 // Path to Server MathJax
159 $text_prop = new ilTextInputGUI($lng->txt("mathjax_server_address"), "server_address");
160 $text_prop->setInfo($lng->txt("mathjax_server_address_info"));
161 $text_prop->setValue($mathJaxSetting->get("server_address"));
162 $text_prop->setRequired(true);
163 $text_prop->setMaxLength(400);
164 $text_prop->setSize(100);
165 $server->addSubItem($text_prop);
166
167 // Server Timeout
168 $number_prop = new ilNumberInputGUI($lng->txt("mathjax_server_timeout"), "server_timeout");
169 $number_prop->setInfo($lng->txt("mathjax_server_timeout_info"));
170 $number_prop->setValue($mathJaxSetting->get("server_timeout") ? (int) $mathJaxSetting->get("server_timeout") : 5);
171 $number_prop->setRequired(true);
172 $number_prop->setSize(3);
173 $server->addSubItem($number_prop);
174
175 // Server for Browser
176 $checkbox = new ilCheckboxInputGUI($lng->txt("mathjax_server_for_browser"), "server_for_browser");
177 $checkbox->setInfo($lng->txt("mathjax_server_for_browser_info"));
178 $checkbox->setChecked((bool) $mathJaxSetting->get("server_for_browser"));
179 $server->addSubItem($checkbox);
180
181 // Server for HTML Export
182 $checkbox = new ilCheckboxInputGUI($lng->txt("mathjax_server_for_export"), "server_for_export");
183 $checkbox->setInfo($lng->txt("mathjax_server_for_export_info"));
184 $checkbox->setChecked((bool) $mathJaxSetting->get("server_for_export"));
185 $server->addSubItem($checkbox);
186
187 // Server for PDF
188 $checkbox = new ilCheckboxInputGUI($lng->txt("mathjax_server_for_pdf"), "server_for_pdf");
189 $checkbox->setInfo($lng->txt("mathjax_server_for_pdf_info"));
190 $checkbox->setChecked((bool) $mathJaxSetting->get("server_for_pdf"));
191 $server->addSubItem($checkbox);
192
193 // Cache Size / Clear Cache
194 $size = new ilNonEditableValueGUI($lng->txt("mathjax_server_cache_size"));
195 $size->setInfo($lng->txt("mathjax_server_cache_size_info") . $clear_cache_link);
196 $size->setValue(ilMathJax::getInstance()->getCacheSize());
197 $server->addSubItem($size);
198
199 // Test expression
200 $test = new ilCustomInputGUI($lng->txt("mathjax_test_expression"));
201 include_once './Services/MathJax/classes/class.ilMathJax.php';
202 $html = ilMathJax::getInstance()->insertLatexImages('[tex]f(x)=\int_{-\infty}^x e^{-t^2}dt[/tex]');
203 $test->setHtml($html);
204 $test->setInfo($lng->txt('mathjax_test_expression_info'));
205 $form->addItem($test);
206
207 if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
208 $form->addCommandButton("saveMathJax", $lng->txt("save"));
209 }
210
211 $tpl->setVariable("ADM_CONTENT", $form->getHTML());
212 }
$size
Definition: RandomTest.php:84
$test
Definition: Utf8Test.php:84
This class represents a custom property in a property form.
This class represents a non editable value in a property form.
This class represents a number property in a property form.
ILIAS Setting Class.
$server
if(strpos( $jquery_path, './')===0) elseif(strpos($jquery_path, '.')===0) $mathJaxSetting
Definition: latex.php:32

References $access, ilObjectGUI\$ctrl, $ilCtrl, ilObjectGUI\$lng, $mathJaxSetting, $rbacreview, $server, $si, $size, $test, ilObjectGUI\$tpl, __initSubTabs(), and ilMathJax\getInstance().

+ Here is the call graph for this function:

◆ executeCommand()

ilObjExternalToolsSettingsGUI::executeCommand ( )

execute command

Reimplemented from ilObjectGUI.

Definition at line 386 of file class.ilObjExternalToolsSettingsGUI.php.

387 {
388 $ilAccess = $this->access;
389
390 $next_class = $this->ctrl->getNextClass($this);
391 $cmd = $this->ctrl->getCmd();
392 $this->prepareOutput();
393
394 if (!$this->rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
395 $this->ilias->raiseError($this->lng->txt("permission_denied"), $this->ilias->error_obj->MESSAGE);
396 }
397
398 switch ($next_class) {
399 case 'ilecssettingsgui':
400 $this->tabs_gui->setTabActive('ecs_server_settings');
401 include_once('./Services/WebServices/ECS/classes/class.ilECSSettingsGUI.php');
402 $this->ctrl->forwardCommand(new ilECSSettingsGUI());
403 break;
404
405 case 'ilpermissiongui':
406 include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
407 $perm_gui = new ilPermissionGUI($this);
408 $ret = &$this->ctrl->forwardCommand($perm_gui);
409 $this->tabs_gui->setTabActive('perm_settings');
410 break;
411
412 default:
413 $this->tabs_gui->setTabActive('settings');
414 if (!$cmd || $cmd == 'view') {
415 $cmd = "editMaps";
416 }
417 $cmd .= "Object";
418 $this->$cmd();
419
420 break;
421 }
422 return true;
423 }
prepareOutput($a_show_subobjects=true)
prepare output
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
redirection script todo: (a better solution should control the processing via a xml file)
$ret
Definition: parser.php:6

References $access, $ret, and ilObjectGUI\prepareOutput().

+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjExternalToolsSettingsGUI::getAdminTabs ( )

administration tabs show only permissions and trash folder

Reimplemented from ilObjectGUI.

Definition at line 59 of file class.ilObjExternalToolsSettingsGUI.php.

60 {
61 $this->getTabs();
62 }

References getTabs().

+ Here is the call graph for this function:

◆ getTabs()

ilObjExternalToolsSettingsGUI::getTabs ( )

get tabs @access public

Parameters
objecttabs gui object

Reimplemented from ilObjectGUI.

Definition at line 69 of file class.ilObjExternalToolsSettingsGUI.php.

70 {
72
73 $this->ctrl->setParameter($this, "ref_id", $this->object->getRefId());
74
75 if ($rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
76 $this->tabs_gui->addTarget(
77 "settings",
78 $this->ctrl->getLinkTarget($this, "view"),
79 array("editMaps", "editMathJax", ""),
80 "",
81 ""
82 );
83 $this->lng->loadLanguageModule('ecs');
84 }
85
86 if ($rbacsystem->checkAccess('edit_permission', $this->object->getRefId())) {
87 $this->tabs_gui->addTarget(
88 "perm_settings",
89 $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"),
90 array("perm","info","owner"),
91 'ilpermissiongui'
92 );
93 }
94 }

References $rbacsystem.

Referenced by getAdminTabs().

+ Here is the caller graph for this function:

◆ saveMapsObject()

ilObjExternalToolsSettingsGUI::saveMapsObject ( )

Save Maps Setttings.

Definition at line 342 of file class.ilObjExternalToolsSettingsGUI.php.

343 {
344 require_once("Services/Maps/classes/class.ilMapUtil.php");
345
347 if (ilUtil::stripSlashes($_POST["type"]) == 'openlayers' && 'openlayers' == ilMapUtil::getType()) {
350 } else {
352 }
353
356 ilMapUtil::setStdLatitude(ilUtil::stripSlashes($_POST["std_location"]["latitude"]));
357 ilMapUtil::setStdLongitude(ilUtil::stripSlashes($_POST["std_location"]["longitude"]));
358 ilMapUtil::setStdZoom(ilUtil::stripSlashes($_POST["std_location"]["zoom"]));
359 $ilCtrl->redirect($this, "editMaps");
360 }
$_POST["username"]
static setApiKey($a_api_key)
static setActivated($a_activated)
static setStdLatitude($a_lat)
static setStdZoom($a_zoom)
static setStdGeolocationServer($a_geolocation)
static setStdLongitude($a_lon)
static setStdTileServers($a_tile)
static setType($a_type)
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled

References $_POST, ilObjectGUI\$ctrl, $ilCtrl, ilMapUtil\getType(), ilMapUtil\setActivated(), ilMapUtil\setApiKey(), ilMapUtil\setStdGeolocationServer(), ilMapUtil\setStdLatitude(), ilMapUtil\setStdLongitude(), ilMapUtil\setStdTileServers(), ilMapUtil\setStdZoom(), ilMapUtil\setType(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ saveMathJaxObject()

ilObjExternalToolsSettingsGUI::saveMathJaxObject ( )

Save MathJax Setttings.

Definition at line 217 of file class.ilObjExternalToolsSettingsGUI.php.

218 {
221 $ilAccess = $this->access;
222
223 if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
224 $mathJaxSetting = new ilSetting("MathJax");
225 // Client settings
226 $path_to_mathjax = ilUtil::stripSlashes($_POST["path_to_mathjax"]);
227 if ($_POST["enable"]) {
228 $mathJaxSetting->set("path_to_mathjax", $path_to_mathjax);
229 $mathJaxSetting->set("limiter", (int) $_POST["limiter"]);
230 }
231 $mathJaxSetting->set("enable", ilUtil::stripSlashes($_POST["enable"]));
232
233 // Server settings
234 if ($_POST["enable_server"]) {
235 $mathJaxSetting->set("server_address", ilUtil::stripSlashes($_POST["server_address"]));
236 $mathJaxSetting->set("server_timeout", (int) ilUtil::stripSlashes($_POST["server_timeout"]));
237 $mathJaxSetting->set("server_for_browser", (bool) ilUtil::stripSlashes($_POST["server_for_browser"]));
238 $mathJaxSetting->set("server_for_export", (bool) ilUtil::stripSlashes($_POST["server_for_export"]));
239 $mathJaxSetting->set("server_for_pdf", (bool) ilUtil::stripSlashes($_POST["server_for_pdf"]));
240 }
241 $mathJaxSetting->set("enable_server", (bool) ilUtil::stripSlashes($_POST["enable_server"]));
242
243 ilUtil::sendInfo($lng->txt("msg_obj_modified"));
244 }
245 $ilCtrl->redirect($this, "editMathJax");
246 }
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.

References $_POST, $access, ilObjectGUI\$ctrl, $ilCtrl, ilObjectGUI\$lng, $mathJaxSetting, ilUtil\sendInfo(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

Field Documentation

◆ $access

ilObjExternalToolsSettingsGUI::$access
protected

◆ $rbacreview

ilObjExternalToolsSettingsGUI::$rbacreview
protected

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

Referenced by editMathJaxObject().

◆ $rbacsystem

ilObjExternalToolsSettingsGUI::$rbacsystem
protected

Definition at line 23 of file class.ilObjExternalToolsSettingsGUI.php.

Referenced by getTabs().


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